@stacksjs/dtsx 0.9.12 → 0.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/cli.js +6 -6
- package/dist/{chunk-7vj8vtzh.js → chunk-0f9tt1yd.js} +1 -1
- package/dist/{chunk-jddkdjap.js → chunk-188ep5ns.js} +1 -1
- package/dist/{chunk-v96rjx7x.js → chunk-1t76q5wk.js} +1 -1
- package/dist/chunk-2vw7w2j4.js +23 -0
- package/dist/{chunk-f18nyrrb.js → chunk-365avtde.js} +1 -1
- package/dist/chunk-446n992h.js +2 -0
- package/dist/{chunk-efkpkyz9.js → chunk-49b3ran6.js} +1 -1
- package/dist/{chunk-gpxdn99a.js → chunk-50hbgzrj.js} +1 -1
- package/dist/{chunk-qn0xktfx.js → chunk-6jpqpjkc.js} +1 -1
- package/dist/{chunk-p1d09y82.js → chunk-94h87sgb.js} +1 -1
- package/dist/{chunk-3j7r0fxz.js → chunk-a592hfkt.js} +1 -1
- package/dist/chunk-at36dtgx.js +2 -0
- package/dist/{chunk-2w3g3g00.js → chunk-b0bkjk0p.js} +1 -1
- package/dist/chunk-chbk4344.js +2 -0
- package/dist/{chunk-7cpp6v8f.js → chunk-ck86m3vf.js} +1 -1
- package/dist/{chunk-kge8a5vc.js → chunk-e0gx49tv.js} +1 -1
- package/dist/{chunk-8j312sjx.js → chunk-e38jw5aa.js} +1 -1
- package/dist/{chunk-20kdv9bh.js → chunk-emwe4zbk.js} +1 -1
- package/dist/chunk-ez568rby.js +2 -0
- package/dist/{chunk-fjjs2r77.js → chunk-f0mvmcmj.js} +1 -1
- package/dist/{chunk-91gpfz27.js → chunk-hbd2nj9p.js} +1 -1
- package/dist/{chunk-r1m3q3dj.js → chunk-hwm87z68.js} +1 -1
- package/dist/{chunk-8dx98fd5.js → chunk-jfk0hw36.js} +1 -1
- package/dist/{chunk-jm5ywn4e.js → chunk-mrk48ejm.js} +1 -1
- package/dist/chunk-myvmq7hz.js +2 -0
- package/dist/{chunk-6s7n1gt0.js → chunk-nd0xbpbz.js} +1 -1
- package/dist/{chunk-5fveksya.js → chunk-nfeqwqca.js} +1 -1
- package/dist/{chunk-d9my0n30.js → chunk-nr1gxnen.js} +1 -1
- package/dist/chunk-ns3hznyf.js +3 -0
- package/dist/{chunk-xe1z54pq.js → chunk-pdt5pc9f.js} +1 -1
- package/dist/{chunk-97pgeywh.js → chunk-pdvve1gm.js} +1 -1
- package/dist/chunk-sv136qag.js +17 -0
- package/dist/{chunk-r1ywapeb.js → chunk-te9r0j9z.js} +1 -1
- package/dist/chunk-trftkghj.js +2 -0
- package/dist/{chunk-p09jmjq8.js → chunk-tzrvp0n2.js} +1 -1
- package/dist/{chunk-3g2v2ns2.js → chunk-vf7ywnxz.js} +1 -1
- package/dist/chunk-xqymptjk.js +2 -0
- package/dist/src/index.js +1 -1
- package/dist/src/plugins/bun.js +1 -1
- package/dist/src/plugins/esbuild.js +1 -1
- package/dist/src/plugins/index.js +1 -1
- package/dist/src/plugins/tsup.js +1 -1
- package/dist/src/plugins/vite.js +1 -1
- package/dist/src/plugins/webpack.js +1 -1
- package/dist/transformers.d.ts +12 -0
- package/dist/type-mappings.d.ts +32 -16
- package/package.json +1 -1
- package/dist/chunk-0fhq2wva.js +0 -17
- package/dist/chunk-1e5c83wa.js +0 -2
- package/dist/chunk-1vc477cq.js +0 -2
- package/dist/chunk-7p1sfeeg.js +0 -2
- package/dist/chunk-bzsvvb81.js +0 -2
- package/dist/chunk-j40mkvfg.js +0 -2
- package/dist/chunk-kpp6ajgg.js +0 -2
- package/dist/chunk-me2ae6f0.js +0 -23
- package/dist/chunk-rw6j20e2.js +0 -3
- package/dist/chunk-zsznaama.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ec as $}from"./chunk-
|
|
2
|
+
import{ec as $}from"./chunk-b0bkjk0p.js";import{existsSync as U,readFileSync as O,writeFileSync as q}from"fs";function _(G){let j=[],H=/\b([A-Z][a-zA-Z0-9]*)\b/g,L;while((L=H.exec(G))!==null){let J=L[1];if(!N(J))j.push(J)}return[...new Set(j)]}function N(G){return new Set(["Array","Object","String","Number","Boolean","Symbol","BigInt","Function","Promise","Map","Set","WeakMap","WeakSet","Date","RegExp","Error","TypeError","RangeError","SyntaxError","Partial","Required","Readonly","Pick","Omit","Record","Exclude","Extract","NonNullable","ReturnType","Parameters","ConstructorParameters","InstanceType","ThisType","Uppercase","Lowercase","Capitalize","Uncapitalize","Awaited","NoInfer","Generator","AsyncGenerator","IterableIterator","AsyncIterableIterator","PropertyKey","Iterable","AsyncIterable","ArrayLike","PromiseLike","ArrayBuffer","SharedArrayBuffer","DataView","Int8Array","Uint8Array","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"]).has(G)}function C(G){if(G.kind!=="type")return!1;let j=G.typeAnnotation||"";if(G.generics)return!1;if(j.includes("{")||j.includes("(")||j.includes("<"))return!1;return/^[\w\s|&]+$/.test(j)}function E(G){if(G.kind!=="interface")return!1;if(!G.members||G.members.length===0){if(!G.extends)return!0}return!1}function F(G,j){let H={...G,members:[...G.members||[],...j.members||[]],leadingComments:[...G.leadingComments||[],...j.leadingComments||[]]};if(G.extends&&j.extends){let L=G.extends.split(",").map((K)=>K.trim()),J=j.extends.split(",").map((K)=>K.trim());H.extends=[...new Set([...L,...J])].join(", ")}else H.extends=G.extends||j.extends;return H}function D(G){let j=["import","interface","type","class","enum","function","variable","export"];return[...G].sort((H,L)=>{let J=j.indexOf(H.kind)-j.indexOf(L.kind);if(J!==0)return J;return H.name.localeCompare(L.name)})}function R(G){let j=G.filter((J)=>J.kind==="import"),H=G.filter((J)=>J.kind!=="import");return[...[...j].sort((J,K)=>{let M=J.source||"",Q=K.source||"",V=M.startsWith("node:")||M==="bun",W=Q.startsWith("node:")||Q==="bun";if(V&&!W)return-1;if(!V&&W)return 1;let Y=!M.startsWith("."),X=!Q.startsWith(".");if(Y&&!X)return-1;if(!Y&&X)return 1;return M.localeCompare(Q)}),...H]}function k(G){let j=new Set;for(let J of G){if(J.kind==="import")continue;let K=J.text||"",M=J.typeAnnotation||"",Q=J.returnType||"",V=J.extends||"",W=J.implements?.join(" ")||"",Y=`${K} ${M} ${Q} ${V} ${W}`;for(let X of _(Y))j.add(X);if(J.members)for(let X of J.members){let Z=`${X.typeAnnotation||""} ${X.returnType||""}`;for(let w of _(Z))j.add(w)}if(J.parameters){for(let X of J.parameters)if(X.type)for(let Z of _(X.type))j.add(Z)}}let H=0;return{declarations:G.map((J)=>{if(J.kind!=="import"||!J.specifiers)return J;let K=J.specifiers.filter((M)=>{let Q=M.alias||M.name;return j.has(Q)});if(K.length===0){if(!J.isSideEffect)return H++,null}if(K.length<(J.specifiers?.length||0))return H+=(J.specifiers?.length||0)-K.length,{...J,specifiers:K};return J}).filter((J)=>J!==null),removed:H}}function A(G){let j=new Map,H=0;for(let L of G){if(L.kind==="import"){let K=`import:${L.source}`;if(j.has(K)){let M=j.get(K),Q=[...M.specifiers||[],...L.specifiers||[]],V=Array.from(new Map(Q.map((W)=>[W.alias||W.name,W])).values());j.set(K,{...M,specifiers:V}),H++}else j.set(K,L);continue}let J=`${L.kind}:${L.name}`;if(j.has(J))H++;else j.set(J,L)}return{declarations:Array.from(j.values()),removed:H}}function z(G){let j=new Map,H=[];for(let K of G)if(K.kind==="interface"){let M=K.name;if(!j.has(M))j.set(M,[]);j.get(M).push(K)}else H.push(K);let L=0,J=[];for(let[K,M]of j)if(M.length>1){let Q=M[0];for(let V=1;V<M.length;V++)Q=F(Q,M[V]),L++;J.push(Q)}else J.push(M[0]);return{declarations:[...H,...J],merged:L}}function P(G){let j=new Map,H=new Set;for(let K of G)if(C(K))j.set(K.name,K.typeAnnotation||""),H.add(K.name);if(j.size===0)return{declarations:G,inlined:0};function L(K){let M=K;for(let[Q,V]of j){let W=new RegExp(`\\b${Q}\\b`,"g");M=M.replace(W,V)}return M}return{declarations:G.filter((K)=>K.kind!=="type"||!H.has(K.name)).map((K)=>{if(K.typeAnnotation)K={...K,typeAnnotation:L(K.typeAnnotation)};if(K.returnType)K={...K,returnType:L(K.returnType)};if(K.extends)K={...K,extends:L(K.extends)};return K}),inlined:j.size}}function v(G){let j=G.length,H=G.filter((L)=>!E(L));return{declarations:H,removed:j-H.length}}function B(G,j={}){let H=[...G],L={originalSize:0,optimizedSize:0,savings:0,savingsPercent:0,removedImports:0,removedDeclarations:0,mergedInterfaces:0,inlinedTypes:0};if(j.removeUnusedImports){let{declarations:J,removed:K}=k(H);H=J,L.removedImports=K}if(j.deduplicateDeclarations){let{declarations:J,removed:K}=A(H);H=J,L.removedDeclarations+=K}if(j.mergeInterfaces){let{declarations:J,merged:K}=z(H);H=J,L.mergedInterfaces=K}if(j.removeEmptyInterfaces){let{declarations:J,removed:K}=v(H);H=J,L.removedDeclarations+=K}if(j.inlineSimpleTypes){let{declarations:J,inlined:K}=P(H);H=J,L.inlinedTypes=K}if(j.sortImports)H=R(H);if(j.sortDeclarations)H=D(H);return{declarations:H,result:L}}async function g(G,j={}){if(!U(G))throw Error(`File not found: ${G}`);let H=O(G,"utf-8"),L=Buffer.byteLength(H,"utf-8"),J=$(H,G,!j.removeComments),{declarations:K,result:M}=B(J,j),Q=h(K,j);if(j.minify)Q=x(Q);let V=Buffer.byteLength(Q,"utf-8");return M.originalSize=L,M.optimizedSize=V,M.savings=L-V,M.savingsPercent=Math.round(M.savings/L*100),q(G,Q),M}function h(G,j){let H=[];for(let L of G){if(!j.removeComments&&L.leadingComments)for(let J of L.leadingComments)H.push(J);if(L.text)H.push(L.text);else H.push(I(L));H.push("")}return H.join(`
|
|
3
3
|
`)}function I(G){let j=[];if(G.isExported)j.push("export");if(G.isDefault)j.push("default");switch(G.kind){case"import":if(G.isTypeOnly)j.push("import type");else j.push("import");if(G.specifiers&&G.specifiers.length>0){let H=G.specifiers.map((L)=>{let J=L.isType?"type ":"";return L.alias?`${J}${L.name} as ${L.alias}`:`${J}${L.name}`}).join(", ");j.push(`{ ${H} }`)}j.push("from"),j.push(`'${G.source}'`);break;case"function":if(j.push("declare function"),j.push(G.name),G.generics)j.push(G.generics);if(j.push(`(${S(G.parameters)})`),G.returnType)j.push(`: ${G.returnType}`);break;case"variable":if(j.push("declare const"),j.push(G.name),G.typeAnnotation)j.push(`: ${G.typeAnnotation}`);break;case"interface":if(j.push("interface"),j.push(G.name),G.generics)j.push(G.generics);if(G.extends)j.push(`extends ${G.extends}`);if(j.push("{"),G.members)for(let H of G.members)j.push(` ${H.name}${H.typeAnnotation?`: ${H.typeAnnotation}`:""}`);j.push("}");break;case"type":if(j.push("type"),j.push(G.name),G.generics)j.push(G.generics);j.push("="),j.push(G.typeAnnotation||"unknown");break;case"class":if(j.push("declare class"),j.push(G.name),G.generics)j.push(G.generics);if(G.extends)j.push(`extends ${G.extends}`);if(G.implements?.length)j.push(`implements ${G.implements.join(", ")}`);j.push("{ }");break;case"enum":j.push("declare enum"),j.push(G.name),j.push("{ }");break;default:return G.text||""}return j.join(" ")}function S(G){if(!G)return"";return G.map((j)=>{let H="";if(j.rest)H+="...";if(H+=j.name,j.optional)H+="?";if(j.type)H+=`: ${j.type}`;return H}).join(", ")}function x(G){return G.replace(/(?<!\/\*\*)\/\/[^\n]*/g,"").replace(/^\s*[\r\n]/gm,"").replace(/ {2,}/g," ").replace(/\s*([{}[\]();,:])\s*/g,"$1").replace(/(\w)(\{)/g,"$1 $2").replace(/(\})([a-z])/gi,"$1 $2").replace(/(export|import|type|interface|class|function|const|let|var|extends|implements|declare)\s*/g,"$1 ").trim()}
|
|
4
4
|
export{B as a,g as b,x as c};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{nc as J}from"./chunk-
|
|
2
|
+
import{nc as J}from"./chunk-2vw7w2j4.js";var S=typeof globalThis.Bun?.hash==="function";function z(u){if(S)return Bun.hash(u);let g=0;for(let f=0;f<u.length;f++){let b=u.charCodeAt(f);g=(g<<5)-g+b,g=g&g}return g}var T=100,G=0,B=new Map;function Y(u,g,f=!0,b=!1){let x=z(u),F=`${g}:${f?1:0}:${b?1:0}`,p=B.get(F);if(p&&p.contentHash===x)return p.lastAccess=++G,p.declarations;let j=J(u,g,f,b);if(B.set(F,{declarations:j,contentHash:x,lastAccess:++G}),B.size>T){let w=null,q=1/0;for(let[Q,v]of B)if(v.lastAccess<q)q=v.lastAccess,w=Q;if(w)B.delete(w)}return j}function $(){B.clear()}
|
|
3
3
|
export{z as kc,Y as lc,$ as mc};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{lc as I}from"./chunk-
|
|
2
|
+
import{lc as I}from"./chunk-50hbgzrj.js";import{nc as H}from"./chunk-2vw7w2j4.js";import{Bc as G}from"./chunk-pdvve1gm.js";function N(q,v="stdin.ts",z=!0,B=["bun"],E=!1){let A=I(q,v,z,E);return G(A,{filePath:v,sourceCode:q,declarations:A},z,B)}function P(q,v="stdin.ts",z=!0,B=["bun"],E=!1){let A=H(q,v,z,E);return G(A,{filePath:v,sourceCode:q,declarations:A},z,B)}
|
|
3
3
|
export{N as ic,P as jc};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{bd as TD,cd as $B}from"./chunk-rw6j20e2.js";var BM0=TD((aW8)=>{var GM0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");aW8.encode=function(B8){if(0<=B8&&B8<GM0.length)return GM0[B8];throw TypeError("Must be between 0 and 63: "+B8)};aW8.decode=function(B8){var i0=65,j8=90,e8=97,S1=122,C1=48,QJ=57,SX=43,AX=47,CX=26,QX=52;if(i0<=B8&&B8<=j8)return B8-i0;if(e8<=B8&&B8<=S1)return B8-e8+CX;if(C1<=B8&&B8<=QJ)return B8-C1+QX;if(B8==SX)return 62;if(B8==AX)return 63;return-1}});var CQ0=TD((K68)=>{var OM0=BM0(),IQ0=5,UM0=1<<IQ0,TM0=UM0-1,qM0=UM0;function J68(B8){return B8<0?(-B8<<1)+1:(B8<<1)+0}function X68(B8){var i0=(B8&1)===1,j8=B8>>1;return i0?-j8:j8}K68.encode=function(i0){var j8="",e8,S1=J68(i0);do{if(e8=S1&TM0,S1>>>=IQ0,S1>0)e8|=qM0;j8+=OM0.encode(e8)}while(S1>0);return j8};K68.decode=function(i0,j8,e8){var S1=i0.length,C1=0,QJ=0,SX,AX;do{if(j8>=S1)throw Error("Expected more digits in base 64 VLQ value.");if(AX=OM0.decode(i0.charCodeAt(j8++)),AX===-1)throw Error("Invalid base64 digit: "+i0.charAt(j8-1));SX=!!(AX&qM0),AX&=TM0,C1=C1+(AX<<QJ),QJ+=IQ0}while(SX);e8.value=X68(C1),e8.rest=j8}});var _N=TD((O68)=>{function z68(B8,i0,j8){if(i0 in B8)return B8[i0];else if(arguments.length===3)return j8;else throw Error('"'+i0+'" is a required argument.')}O68.getArg=z68;var bM0=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,W68=/^data:.+\,.+$/;function uf(B8){var i0=B8.match(bM0);if(!i0)return null;return{scheme:i0[1],auth:i0[2],host:i0[3],port:i0[4],path:i0[5]}}O68.urlParse=uf;function DN(B8){var i0="";if(B8.scheme)i0+=B8.scheme+":";if(i0+="//",B8.auth)i0+=B8.auth+"@";if(B8.host)i0+=B8.host;if(B8.port)i0+=":"+B8.port;if(B8.path)i0+=B8.path;return i0}O68.urlGenerate=DN;function xQ0(B8){var i0=B8,j8=uf(B8);if(j8){if(!j8.path)return B8;i0=j8.path}var e8=O68.isAbsolute(i0),S1=i0.split(/\/+/);for(var C1,QJ=0,SX=S1.length-1;SX>=0;SX--)if(C1=S1[SX],C1===".")S1.splice(SX,1);else if(C1==="..")QJ++;else if(QJ>0)if(C1==="")S1.splice(SX+1,QJ),QJ=0;else S1.splice(SX,2),QJ--;if(i0=S1.join("/"),i0==="")i0=e8?"/":".";if(j8)return j8.path=i0,DN(j8);return i0}O68.normalize=xQ0;function wM0(B8,i0){if(B8==="")B8=".";if(i0==="")i0=".";var j8=uf(i0),e8=uf(B8);if(e8)B8=e8.path||"/";if(j8&&!j8.scheme){if(e8)j8.scheme=e8.scheme;return DN(j8)}if(j8||i0.match(W68))return i0;if(e8&&!e8.host&&!e8.path)return e8.host=i0,DN(e8);var S1=i0.charAt(0)==="/"?i0:xQ0(B8.replace(/\/+$/,"")+"/"+i0);if(e8)return e8.path=S1,DN(e8);return S1}O68.join=wM0;O68.isAbsolute=function(B8){return B8.charAt(0)==="/"||bM0.test(B8)};function Q68(B8,i0){if(B8==="")B8=".";B8=B8.replace(/\/$/,"");var j8=0;while(i0.indexOf(B8+"/")!==0){var e8=B8.lastIndexOf("/");if(e8<0)return i0;if(B8=B8.slice(0,e8),B8.match(/^([^\/]+:\/)?\/*$/))return i0;++j8}return Array(j8+1).join("../")+i0.substr(B8.length+1)}O68.relative=Q68;var FM0=function(){var B8=Object.create(null);return!("__proto__"in B8)}();function yM0(B8){return B8}function E68(B8){if(kM0(B8))return"$"+B8;return B8}O68.toSetString=FM0?yM0:E68;function D68(B8){if(kM0(B8))return B8.slice(1);return B8}O68.fromSetString=FM0?yM0:D68;function kM0(B8){if(!B8)return!1;var i0=B8.length;if(i0<9)return!1;if(B8.charCodeAt(i0-1)!==95||B8.charCodeAt(i0-2)!==95||B8.charCodeAt(i0-3)!==111||B8.charCodeAt(i0-4)!==116||B8.charCodeAt(i0-5)!==111||B8.charCodeAt(i0-6)!==114||B8.charCodeAt(i0-7)!==112||B8.charCodeAt(i0-8)!==95||B8.charCodeAt(i0-9)!==95)return!1;for(var j8=i0-10;j8>=0;j8--)if(B8.charCodeAt(j8)!==36)return!1;return!0}function V68(B8,i0,j8){var e8=VN(B8.source,i0.source);if(e8!==0)return e8;if(e8=B8.originalLine-i0.originalLine,e8!==0)return e8;if(e8=B8.originalColumn-i0.originalColumn,e8!==0||j8)return e8;if(e8=B8.generatedColumn-i0.generatedColumn,e8!==0)return e8;if(e8=B8.generatedLine-i0.generatedLine,e8!==0)return e8;return VN(B8.name,i0.name)}O68.compareByOriginalPositions=V68;function _68(B8,i0,j8){var e8=B8.generatedLine-i0.generatedLine;if(e8!==0)return e8;if(e8=B8.generatedColumn-i0.generatedColumn,e8!==0||j8)return e8;if(e8=VN(B8.source,i0.source),e8!==0)return e8;if(e8=B8.originalLine-i0.originalLine,e8!==0)return e8;if(e8=B8.originalColumn-i0.originalColumn,e8!==0)return e8;return VN(B8.name,i0.name)}O68.compareByGeneratedPositionsDeflated=_68;function VN(B8,i0){if(B8===i0)return 0;if(B8===null)return 1;if(i0===null)return-1;if(B8>i0)return 1;return-1}function H68(B8,i0){var j8=B8.generatedLine-i0.generatedLine;if(j8!==0)return j8;if(j8=B8.generatedColumn-i0.generatedColumn,j8!==0)return j8;if(j8=VN(B8.source,i0.source),j8!==0)return j8;if(j8=B8.originalLine-i0.originalLine,j8!==0)return j8;if(j8=B8.originalColumn-i0.originalColumn,j8!==0)return j8;return VN(B8.name,i0.name)}O68.compareByGeneratedPositionsInflated=H68;function G68(B8){return JSON.parse(B8.replace(/^\)]}'[^\n]*\n/,""))}O68.parseSourceMapInput=G68;function B68(B8,i0,j8){if(i0=i0||"",B8){if(B8[B8.length-1]!=="/"&&i0[0]!=="/")B8+="/";i0=B8+i0}if(j8){var e8=uf(j8);if(!e8)throw Error("sourceMapURL could not be parsed");if(e8.path){var S1=e8.path.lastIndexOf("/");if(S1>=0)e8.path=e8.path.substring(0,S1+1)}i0=wM0(DN(e8),i0)}return xQ0(i0)}O68.computeSourceURL=B68});var hQ0=TD((v68)=>{var SQ0=_N(),fQ0=Object.prototype.hasOwnProperty,ik=typeof Map<"u";function NT(){this._array=[],this._set=ik?new Map:Object.create(null)}NT.fromArray=function(i0,j8){var e8=new NT;for(var S1=0,C1=i0.length;S1<C1;S1++)e8.add(i0[S1],j8);return e8};NT.prototype.size=function(){return ik?this._set.size:Object.getOwnPropertyNames(this._set).length};NT.prototype.add=function(i0,j8){var e8=ik?i0:SQ0.toSetString(i0),S1=ik?this.has(i0):fQ0.call(this._set,e8),C1=this._array.length;if(!S1||j8)this._array.push(i0);if(!S1)if(ik)this._set.set(i0,C1);else this._set[e8]=C1};NT.prototype.has=function(i0){if(ik)return this._set.has(i0);else{var j8=SQ0.toSetString(i0);return fQ0.call(this._set,j8)}};NT.prototype.indexOf=function(i0){if(ik){var j8=this._set.get(i0);if(j8>=0)return j8}else{var e8=SQ0.toSetString(i0);if(fQ0.call(this._set,e8))return this._set[e8]}throw Error('"'+i0+'" is not in the set.')};NT.prototype.at=function(i0){if(i0>=0&&i0<this._array.length)return this._array[i0];throw Error("No element indexed by "+i0)};NT.prototype.toArray=function(){return this._array.slice()};v68.ArraySet=NT});var jM0=TD((C68)=>{var AM0=_N();function I68(B8,i0){var j8=B8.generatedLine,e8=i0.generatedLine,S1=B8.generatedColumn,C1=i0.generatedColumn;return e8>j8||e8==j8&&C1>=S1||AM0.compareByGeneratedPositionsInflated(B8,i0)<=0}function bn(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}bn.prototype.unsortedForEach=function(i0,j8){this._array.forEach(i0,j8)};bn.prototype.add=function(i0){if(I68(this._last,i0))this._last=i0,this._array.push(i0);else this._sorted=!1,this._array.push(i0)};bn.prototype.toArray=function(){if(!this._sorted)this._array.sort(AM0.compareByGeneratedPositionsInflated),this._sorted=!0;return this._array};C68.MappingList=bn});var dQ0=TD((f68)=>{var gf=CQ0(),N6=_N(),wn=hQ0().ArraySet,S68=jM0().MappingList;function PH(B8){if(!B8)B8={};this._file=N6.getArg(B8,"file",null),this._sourceRoot=N6.getArg(B8,"sourceRoot",null),this._skipValidation=N6.getArg(B8,"skipValidation",!1),this._sources=new wn,this._names=new wn,this._mappings=new S68,this._sourcesContents=null}PH.prototype._version=3;PH.fromSourceMap=function(i0){var j8=i0.sourceRoot,e8=new PH({file:i0.file,sourceRoot:j8});return i0.eachMapping(function(S1){var C1={generated:{line:S1.generatedLine,column:S1.generatedColumn}};if(S1.source!=null){if(C1.source=S1.source,j8!=null)C1.source=N6.relative(j8,C1.source);if(C1.original={line:S1.originalLine,column:S1.originalColumn},S1.name!=null)C1.name=S1.name}e8.addMapping(C1)}),i0.sources.forEach(function(S1){var C1=S1;if(j8!==null)C1=N6.relative(j8,S1);if(!e8._sources.has(C1))e8._sources.add(C1);var QJ=i0.sourceContentFor(S1);if(QJ!=null)e8.setSourceContent(S1,QJ)}),e8};PH.prototype.addMapping=function(i0){var j8=N6.getArg(i0,"generated"),e8=N6.getArg(i0,"original",null),S1=N6.getArg(i0,"source",null),C1=N6.getArg(i0,"name",null);if(!this._skipValidation)this._validateMapping(j8,e8,S1,C1);if(S1!=null){if(S1=String(S1),!this._sources.has(S1))this._sources.add(S1)}if(C1!=null){if(C1=String(C1),!this._names.has(C1))this._names.add(C1)}this._mappings.add({generatedLine:j8.line,generatedColumn:j8.column,originalLine:e8!=null&&e8.line,originalColumn:e8!=null&&e8.column,source:S1,name:C1})};PH.prototype.setSourceContent=function(i0,j8){var e8=i0;if(this._sourceRoot!=null)e8=N6.relative(this._sourceRoot,e8);if(j8!=null){if(!this._sourcesContents)this._sourcesContents=Object.create(null);this._sourcesContents[N6.toSetString(e8)]=j8}else if(this._sourcesContents){if(delete this._sourcesContents[N6.toSetString(e8)],Object.keys(this._sourcesContents).length===0)this._sourcesContents=null}};PH.prototype.applySourceMap=function(i0,j8,e8){var S1=j8;if(j8==null){if(i0.file==null)throw Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);S1=i0.file}var C1=this._sourceRoot;if(C1!=null)S1=N6.relative(C1,S1);var QJ=new wn,SX=new wn;this._mappings.unsortedForEach(function(AX){if(AX.source===S1&&AX.originalLine!=null){var CX=i0.originalPositionFor({line:AX.originalLine,column:AX.originalColumn});if(CX.source!=null){if(AX.source=CX.source,e8!=null)AX.source=N6.join(e8,AX.source);if(C1!=null)AX.source=N6.relative(C1,AX.source);if(AX.originalLine=CX.line,AX.originalColumn=CX.column,CX.name!=null)AX.name=CX.name}}var QX=AX.source;if(QX!=null&&!QJ.has(QX))QJ.add(QX);var Kz=AX.name;if(Kz!=null&&!SX.has(Kz))SX.add(Kz)},this),this._sources=QJ,this._names=SX,i0.sources.forEach(function(AX){var CX=i0.sourceContentFor(AX);if(CX!=null){if(e8!=null)AX=N6.join(e8,AX);if(C1!=null)AX=N6.relative(C1,AX);this.setSourceContent(AX,CX)}},this)};PH.prototype._validateMapping=function(i0,j8,e8,S1){if(j8&&typeof j8.line!=="number"&&typeof j8.column!=="number")throw Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(i0&&"line"in i0&&"column"in i0&&i0.line>0&&i0.column>=0&&!j8&&!e8&&!S1)return;else if(i0&&"line"in i0&&"column"in i0&&j8&&"line"in j8&&"column"in j8&&i0.line>0&&i0.column>=0&&j8.line>0&&j8.column>=0&&e8)return;else throw Error("Invalid mapping: "+JSON.stringify({generated:i0,source:e8,original:j8,name:S1}))};PH.prototype._serializeMappings=function(){var i0=0,j8=1,e8=0,S1=0,C1=0,QJ=0,SX="",AX,CX,QX,Kz,d0=this._mappings.toArray();for(var vz=0,k1=d0.length;vz<k1;vz++){if(CX=d0[vz],AX="",CX.generatedLine!==j8){i0=0;while(CX.generatedLine!==j8)AX+=";",j8++}else if(vz>0){if(!N6.compareByGeneratedPositionsInflated(CX,d0[vz-1]))continue;AX+=","}if(AX+=gf.encode(CX.generatedColumn-i0),i0=CX.generatedColumn,CX.source!=null){if(Kz=this._sources.indexOf(CX.source),AX+=gf.encode(Kz-QJ),QJ=Kz,AX+=gf.encode(CX.originalLine-1-S1),S1=CX.originalLine-1,AX+=gf.encode(CX.originalColumn-e8),e8=CX.originalColumn,CX.name!=null)QX=this._names.indexOf(CX.name),AX+=gf.encode(QX-C1),C1=QX}SX+=AX}return SX};PH.prototype._generateSourcesContent=function(i0,j8){return i0.map(function(e8){if(!this._sourcesContents)return null;if(j8!=null)e8=N6.relative(j8,e8);var S1=N6.toSetString(e8);return Object.prototype.hasOwnProperty.call(this._sourcesContents,S1)?this._sourcesContents[S1]:null},this)};PH.prototype.toJSON=function(){var i0={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null)i0.file=this._file;if(this._sourceRoot!=null)i0.sourceRoot=this._sourceRoot;if(this._sourcesContents)i0.sourcesContent=this._generateSourcesContent(i0.sources,i0.sourceRoot);return i0};PH.prototype.toString=function(){return JSON.stringify(this.toJSON())};f68.SourceMapGenerator=PH});var LM0=TD((d68)=>{d68.GREATEST_LOWER_BOUND=1;d68.LEAST_UPPER_BOUND=2;function mQ0(B8,i0,j8,e8,S1,C1){var QJ=Math.floor((i0-B8)/2)+B8,SX=S1(j8,e8[QJ],!0);if(SX===0)return QJ;else if(SX>0){if(i0-QJ>1)return mQ0(QJ,i0,j8,e8,S1,C1);if(C1==d68.LEAST_UPPER_BOUND)return i0<e8.length?i0:-1;else return QJ}else{if(QJ-B8>1)return mQ0(B8,QJ,j8,e8,S1,C1);if(C1==d68.LEAST_UPPER_BOUND)return QJ;else return B8<0?-1:B8}}d68.search=function(i0,j8,e8,S1){if(j8.length===0)return-1;var C1=mQ0(-1,j8.length,i0,j8,e8,S1||d68.GREATEST_LOWER_BOUND);if(C1<0)return-1;while(C1-1>=0){if(e8(j8[C1],j8[C1-1],!0)!==0)break;--C1}return C1}});var RM0=TD((g68)=>{function gQ0(B8,i0,j8){var e8=B8[i0];B8[i0]=B8[j8],B8[j8]=e8}function u68(B8,i0){return Math.round(B8+Math.random()*(i0-B8))}function cQ0(B8,i0,j8,e8){if(j8<e8){var S1=u68(j8,e8),C1=j8-1;gQ0(B8,S1,e8);var QJ=B8[e8];for(var SX=j8;SX<e8;SX++)if(i0(B8[SX],QJ)<=0)C1+=1,gQ0(B8,C1,SX);gQ0(B8,C1+1,SX);var AX=C1+1;cQ0(B8,i0,j8,AX-1),cQ0(B8,i0,AX+1,e8)}}g68.quickSort=function(B8,i0){cQ0(B8,i0,0,B8.length-1)}});var vM0=TD((p68)=>{var p9=_N(),lQ0=LM0(),HN=hQ0().ArraySet,l68=CQ0(),cf=RM0().quickSort;function R4(B8,i0){var j8=B8;if(typeof B8==="string")j8=p9.parseSourceMapInput(B8);return j8.sections!=null?new KB(j8,i0):new NQ(j8,i0)}R4.fromSourceMap=function(B8,i0){return NQ.fromSourceMap(B8,i0)};R4.prototype._version=3;R4.prototype.__generatedMappings=null;Object.defineProperty(R4.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__generatedMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__generatedMappings}});R4.prototype.__originalMappings=null;Object.defineProperty(R4.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__originalMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__originalMappings}});R4.prototype._charIsMappingSeparator=function(i0,j8){var e8=i0.charAt(j8);return e8===";"||e8===","};R4.prototype._parseMappings=function(i0,j8){throw Error("Subclasses must implement _parseMappings")};R4.GENERATED_ORDER=1;R4.ORIGINAL_ORDER=2;R4.GREATEST_LOWER_BOUND=1;R4.LEAST_UPPER_BOUND=2;R4.prototype.eachMapping=function(i0,j8,e8){var S1=j8||null,C1=e8||R4.GENERATED_ORDER,QJ;switch(C1){case R4.GENERATED_ORDER:QJ=this._generatedMappings;break;case R4.ORIGINAL_ORDER:QJ=this._originalMappings;break;default:throw Error("Unknown order of iteration.")}var SX=this.sourceRoot;QJ.map(function(AX){var CX=AX.source===null?null:this._sources.at(AX.source);return CX=p9.computeSourceURL(SX,CX,this._sourceMapURL),{source:CX,generatedLine:AX.generatedLine,generatedColumn:AX.generatedColumn,originalLine:AX.originalLine,originalColumn:AX.originalColumn,name:AX.name===null?null:this._names.at(AX.name)}},this).forEach(i0,S1)};R4.prototype.allGeneratedPositionsFor=function(i0){var j8=p9.getArg(i0,"line"),e8={source:p9.getArg(i0,"source"),originalLine:j8,originalColumn:p9.getArg(i0,"column",0)};if(e8.source=this._findSourceIndex(e8.source),e8.source<0)return[];var S1=[],C1=this._findMapping(e8,this._originalMappings,"originalLine","originalColumn",p9.compareByOriginalPositions,lQ0.LEAST_UPPER_BOUND);if(C1>=0){var QJ=this._originalMappings[C1];if(i0.column===void 0){var SX=QJ.originalLine;while(QJ&&QJ.originalLine===SX)S1.push({line:p9.getArg(QJ,"generatedLine",null),column:p9.getArg(QJ,"generatedColumn",null),lastColumn:p9.getArg(QJ,"lastGeneratedColumn",null)}),QJ=this._originalMappings[++C1]}else{var AX=QJ.originalColumn;while(QJ&&QJ.originalLine===j8&&QJ.originalColumn==AX)S1.push({line:p9.getArg(QJ,"generatedLine",null),column:p9.getArg(QJ,"generatedColumn",null),lastColumn:p9.getArg(QJ,"lastGeneratedColumn",null)}),QJ=this._originalMappings[++C1]}}return S1};p68.SourceMapConsumer=R4;function NQ(B8,i0){var j8=B8;if(typeof B8==="string")j8=p9.parseSourceMapInput(B8);var e8=p9.getArg(j8,"version"),S1=p9.getArg(j8,"sources"),C1=p9.getArg(j8,"names",[]),QJ=p9.getArg(j8,"sourceRoot",null),SX=p9.getArg(j8,"sourcesContent",null),AX=p9.getArg(j8,"mappings"),CX=p9.getArg(j8,"file",null);if(e8!=this._version)throw Error("Unsupported version: "+e8);if(QJ)QJ=p9.normalize(QJ);S1=S1.map(String).map(p9.normalize).map(function(QX){return QJ&&p9.isAbsolute(QJ)&&p9.isAbsolute(QX)?p9.relative(QJ,QX):QX}),this._names=HN.fromArray(C1.map(String),!0),this._sources=HN.fromArray(S1,!0),this._absoluteSources=this._sources.toArray().map(function(QX){return p9.computeSourceURL(QJ,QX,i0)}),this.sourceRoot=QJ,this.sourcesContent=SX,this._mappings=AX,this._sourceMapURL=i0,this.file=CX}NQ.prototype=Object.create(R4.prototype);NQ.prototype.consumer=R4;NQ.prototype._findSourceIndex=function(B8){var i0=B8;if(this.sourceRoot!=null)i0=p9.relative(this.sourceRoot,i0);if(this._sources.has(i0))return this._sources.indexOf(i0);var j8;for(j8=0;j8<this._absoluteSources.length;++j8)if(this._absoluteSources[j8]==B8)return j8;return-1};NQ.fromSourceMap=function(i0,j8){var e8=Object.create(NQ.prototype),S1=e8._names=HN.fromArray(i0._names.toArray(),!0),C1=e8._sources=HN.fromArray(i0._sources.toArray(),!0);e8.sourceRoot=i0._sourceRoot,e8.sourcesContent=i0._generateSourcesContent(e8._sources.toArray(),e8.sourceRoot),e8.file=i0._file,e8._sourceMapURL=j8,e8._absoluteSources=e8._sources.toArray().map(function(vz){return p9.computeSourceURL(e8.sourceRoot,vz,j8)});var QJ=i0._mappings.toArray().slice(),SX=e8.__generatedMappings=[],AX=e8.__originalMappings=[];for(var CX=0,QX=QJ.length;CX<QX;CX++){var Kz=QJ[CX],d0=new NM0;if(d0.generatedLine=Kz.generatedLine,d0.generatedColumn=Kz.generatedColumn,Kz.source){if(d0.source=C1.indexOf(Kz.source),d0.originalLine=Kz.originalLine,d0.originalColumn=Kz.originalColumn,Kz.name)d0.name=S1.indexOf(Kz.name);AX.push(d0)}SX.push(d0)}return cf(e8.__originalMappings,p9.compareByOriginalPositions),e8};NQ.prototype._version=3;Object.defineProperty(NQ.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function NM0(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}NQ.prototype._parseMappings=function(i0,j8){var e8=1,S1=0,C1=0,QJ=0,SX=0,AX=0,CX=i0.length,QX=0,Kz={},d0={},vz=[],k1=[],$1,vT,$K,qD,ek;while(QX<CX)if(i0.charAt(QX)===";")e8++,QX++,S1=0;else if(i0.charAt(QX)===",")QX++;else{$1=new NM0,$1.generatedLine=e8;for(qD=QX;qD<CX;qD++)if(this._charIsMappingSeparator(i0,qD))break;if(vT=i0.slice(QX,qD),$K=Kz[vT],$K)QX+=vT.length;else{$K=[];while(QX<qD)l68.decode(i0,QX,d0),ek=d0.value,QX=d0.rest,$K.push(ek);if($K.length===2)throw Error("Found a source, but no line and column");if($K.length===3)throw Error("Found a source and line, but no column");Kz[vT]=$K}if($1.generatedColumn=S1+$K[0],S1=$1.generatedColumn,$K.length>1){if($1.source=SX+$K[1],SX+=$K[1],$1.originalLine=C1+$K[2],C1=$1.originalLine,$1.originalLine+=1,$1.originalColumn=QJ+$K[3],QJ=$1.originalColumn,$K.length>4)$1.name=AX+$K[4],AX+=$K[4]}if(k1.push($1),typeof $1.originalLine==="number")vz.push($1)}cf(k1,p9.compareByGeneratedPositionsDeflated),this.__generatedMappings=k1,cf(vz,p9.compareByOriginalPositions),this.__originalMappings=vz};NQ.prototype._findMapping=function(i0,j8,e8,S1,C1,QJ){if(i0[e8]<=0)throw TypeError("Line must be greater than or equal to 1, got "+i0[e8]);if(i0[S1]<0)throw TypeError("Column must be greater than or equal to 0, got "+i0[S1]);return lQ0.search(i0,j8,C1,QJ)};NQ.prototype.computeColumnSpans=function(){for(var i0=0;i0<this._generatedMappings.length;++i0){var j8=this._generatedMappings[i0];if(i0+1<this._generatedMappings.length){var e8=this._generatedMappings[i0+1];if(j8.generatedLine===e8.generatedLine){j8.lastGeneratedColumn=e8.generatedColumn-1;continue}}j8.lastGeneratedColumn=1/0}};NQ.prototype.originalPositionFor=function(i0){var j8={generatedLine:p9.getArg(i0,"line"),generatedColumn:p9.getArg(i0,"column")},e8=this._findMapping(j8,this._generatedMappings,"generatedLine","generatedColumn",p9.compareByGeneratedPositionsDeflated,p9.getArg(i0,"bias",R4.GREATEST_LOWER_BOUND));if(e8>=0){var S1=this._generatedMappings[e8];if(S1.generatedLine===j8.generatedLine){var C1=p9.getArg(S1,"source",null);if(C1!==null)C1=this._sources.at(C1),C1=p9.computeSourceURL(this.sourceRoot,C1,this._sourceMapURL);var QJ=p9.getArg(S1,"name",null);if(QJ!==null)QJ=this._names.at(QJ);return{source:C1,line:p9.getArg(S1,"originalLine",null),column:p9.getArg(S1,"originalColumn",null),name:QJ}}}return{source:null,line:null,column:null,name:null}};NQ.prototype.hasContentsOfAllSources=function(){if(!this.sourcesContent)return!1;return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(i0){return i0==null})};NQ.prototype.sourceContentFor=function(i0,j8){if(!this.sourcesContent)return null;var e8=this._findSourceIndex(i0);if(e8>=0)return this.sourcesContent[e8];var S1=i0;if(this.sourceRoot!=null)S1=p9.relative(this.sourceRoot,S1);var C1;if(this.sourceRoot!=null&&(C1=p9.urlParse(this.sourceRoot))){var QJ=S1.replace(/^file:\/\//,"");if(C1.scheme=="file"&&this._sources.has(QJ))return this.sourcesContent[this._sources.indexOf(QJ)];if((!C1.path||C1.path=="/")&&this._sources.has("/"+S1))return this.sourcesContent[this._sources.indexOf("/"+S1)]}if(j8)return null;else throw Error('"'+S1+'" is not in the SourceMap.')};NQ.prototype.generatedPositionFor=function(i0){var j8=p9.getArg(i0,"source");if(j8=this._findSourceIndex(j8),j8<0)return{line:null,column:null,lastColumn:null};var e8={source:j8,originalLine:p9.getArg(i0,"line"),originalColumn:p9.getArg(i0,"column")},S1=this._findMapping(e8,this._originalMappings,"originalLine","originalColumn",p9.compareByOriginalPositions,p9.getArg(i0,"bias",R4.GREATEST_LOWER_BOUND));if(S1>=0){var C1=this._originalMappings[S1];if(C1.source===e8.source)return{line:p9.getArg(C1,"generatedLine",null),column:p9.getArg(C1,"generatedColumn",null),lastColumn:p9.getArg(C1,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};p68.BasicSourceMapConsumer=NQ;function KB(B8,i0){var j8=B8;if(typeof B8==="string")j8=p9.parseSourceMapInput(B8);var e8=p9.getArg(j8,"version"),S1=p9.getArg(j8,"sections");if(e8!=this._version)throw Error("Unsupported version: "+e8);this._sources=new HN,this._names=new HN;var C1={line:-1,column:0};this._sections=S1.map(function(QJ){if(QJ.url)throw Error("Support for url field in sections not implemented.");var SX=p9.getArg(QJ,"offset"),AX=p9.getArg(SX,"line"),CX=p9.getArg(SX,"column");if(AX<C1.line||AX===C1.line&&CX<C1.column)throw Error("Section offsets must be ordered and non-overlapping.");return C1=SX,{generatedOffset:{generatedLine:AX+1,generatedColumn:CX+1},consumer:new R4(p9.getArg(QJ,"map"),i0)}})}KB.prototype=Object.create(R4.prototype);KB.prototype.constructor=R4;KB.prototype._version=3;Object.defineProperty(KB.prototype,"sources",{get:function(){var B8=[];for(var i0=0;i0<this._sections.length;i0++)for(var j8=0;j8<this._sections[i0].consumer.sources.length;j8++)B8.push(this._sections[i0].consumer.sources[j8]);return B8}});KB.prototype.originalPositionFor=function(i0){var j8={generatedLine:p9.getArg(i0,"line"),generatedColumn:p9.getArg(i0,"column")},e8=lQ0.search(j8,this._sections,function(C1,QJ){var SX=C1.generatedLine-QJ.generatedOffset.generatedLine;if(SX)return SX;return C1.generatedColumn-QJ.generatedOffset.generatedColumn}),S1=this._sections[e8];if(!S1)return{source:null,line:null,column:null,name:null};return S1.consumer.originalPositionFor({line:j8.generatedLine-(S1.generatedOffset.generatedLine-1),column:j8.generatedColumn-(S1.generatedOffset.generatedLine===j8.generatedLine?S1.generatedOffset.generatedColumn-1:0),bias:i0.bias})};KB.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(i0){return i0.consumer.hasContentsOfAllSources()})};KB.prototype.sourceContentFor=function(i0,j8){for(var e8=0;e8<this._sections.length;e8++){var S1=this._sections[e8],C1=S1.consumer.sourceContentFor(i0,!0);if(C1)return C1}if(j8)return null;else throw Error('"'+i0+'" is not in the SourceMap.')};KB.prototype.generatedPositionFor=function(i0){for(var j8=0;j8<this._sections.length;j8++){var e8=this._sections[j8];if(e8.consumer._findSourceIndex(p9.getArg(i0,"source"))===-1)continue;var S1=e8.consumer.generatedPositionFor(i0);if(S1){var C1={line:S1.line+(e8.generatedOffset.generatedLine-1),column:S1.column+(e8.generatedOffset.generatedLine===S1.line?e8.generatedOffset.generatedColumn-1:0)};return C1}}return{line:null,column:null}};KB.prototype._parseMappings=function(i0,j8){this.__generatedMappings=[],this.__originalMappings=[];for(var e8=0;e8<this._sections.length;e8++){var S1=this._sections[e8],C1=S1.consumer._generatedMappings;for(var QJ=0;QJ<C1.length;QJ++){var SX=C1[QJ],AX=S1.consumer._sources.at(SX.source);AX=p9.computeSourceURL(S1.consumer.sourceRoot,AX,this._sourceMapURL),this._sources.add(AX),AX=this._sources.indexOf(AX);var CX=null;if(SX.name)CX=S1.consumer._names.at(SX.name),this._names.add(CX),CX=this._names.indexOf(CX);var QX={source:AX,generatedLine:SX.generatedLine+(S1.generatedOffset.generatedLine-1),generatedColumn:SX.generatedColumn+(S1.generatedOffset.generatedLine===SX.generatedLine?S1.generatedOffset.generatedColumn-1:0),originalLine:SX.originalLine,originalColumn:SX.originalColumn,name:CX};if(this.__generatedMappings.push(QX),typeof QX.originalLine==="number")this.__originalMappings.push(QX)}}cf(this.__generatedMappings,p9.compareByGeneratedPositionsDeflated),cf(this.__originalMappings,p9.compareByOriginalPositions)};p68.IndexedSourceMapConsumer=KB});var MM0=TD((a68)=>{var r68=dQ0().SourceMapGenerator,Fn=_N(),n68=/(\r?\n)/,i68=10,GN="$$$isSourceNode$$$";function sV(B8,i0,j8,e8,S1){if(this.children=[],this.sourceContents={},this.line=B8==null?null:B8,this.column=i0==null?null:i0,this.source=j8==null?null:j8,this.name=S1==null?null:S1,this[GN]=!0,e8!=null)this.add(e8)}sV.fromStringWithSourceMap=function(i0,j8,e8){var S1=new sV,C1=i0.split(n68),QJ=0,SX=function(){var d0=k1(),vz=k1()||"";return d0+vz;function k1(){return QJ<C1.length?C1[QJ++]:void 0}},AX=1,CX=0,QX=null;if(j8.eachMapping(function(d0){if(QX!==null)if(AX<d0.generatedLine)Kz(QX,SX()),AX++,CX=0;else{var vz=C1[QJ]||"",k1=vz.substr(0,d0.generatedColumn-CX);C1[QJ]=vz.substr(d0.generatedColumn-CX),CX=d0.generatedColumn,Kz(QX,k1),QX=d0;return}while(AX<d0.generatedLine)S1.add(SX()),AX++;if(CX<d0.generatedColumn){var vz=C1[QJ]||"";S1.add(vz.substr(0,d0.generatedColumn)),C1[QJ]=vz.substr(d0.generatedColumn),CX=d0.generatedColumn}QX=d0},this),QJ<C1.length){if(QX)Kz(QX,SX());S1.add(C1.splice(QJ).join(""))}return j8.sources.forEach(function(d0){var vz=j8.sourceContentFor(d0);if(vz!=null){if(e8!=null)d0=Fn.join(e8,d0);S1.setSourceContent(d0,vz)}}),S1;function Kz(d0,vz){if(d0===null||d0.source===void 0)S1.add(vz);else{var k1=e8?Fn.join(e8,d0.source):d0.source;S1.add(new sV(d0.originalLine,d0.originalColumn,k1,vz,d0.name))}}};sV.prototype.add=function(i0){if(Array.isArray(i0))i0.forEach(function(j8){this.add(j8)},this);else if(i0[GN]||typeof i0==="string"){if(i0)this.children.push(i0)}else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+i0);return this};sV.prototype.prepend=function(i0){if(Array.isArray(i0))for(var j8=i0.length-1;j8>=0;j8--)this.prepend(i0[j8]);else if(i0[GN]||typeof i0==="string")this.children.unshift(i0);else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+i0);return this};sV.prototype.walk=function(i0){var j8;for(var e8=0,S1=this.children.length;e8<S1;e8++)if(j8=this.children[e8],j8[GN])j8.walk(i0);else if(j8!=="")i0(j8,{source:this.source,line:this.line,column:this.column,name:this.name})};sV.prototype.join=function(i0){var j8,e8,S1=this.children.length;if(S1>0){j8=[];for(e8=0;e8<S1-1;e8++)j8.push(this.children[e8]),j8.push(i0);j8.push(this.children[e8]),this.children=j8}return this};sV.prototype.replaceRight=function(i0,j8){var e8=this.children[this.children.length-1];if(e8[GN])e8.replaceRight(i0,j8);else if(typeof e8==="string")this.children[this.children.length-1]=e8.replace(i0,j8);else this.children.push("".replace(i0,j8));return this};sV.prototype.setSourceContent=function(i0,j8){this.sourceContents[Fn.toSetString(i0)]=j8};sV.prototype.walkSourceContents=function(i0){for(var j8=0,e8=this.children.length;j8<e8;j8++)if(this.children[j8][GN])this.children[j8].walkSourceContents(i0);var S1=Object.keys(this.sourceContents);for(var j8=0,e8=S1.length;j8<e8;j8++)i0(Fn.fromSetString(S1[j8]),this.sourceContents[S1[j8]])};sV.prototype.toString=function(){var i0="";return this.walk(function(j8){i0+=j8}),i0};sV.prototype.toStringWithSourceMap=function(i0){var j8={code:"",line:1,column:0},e8=new r68(i0),S1=!1,C1=null,QJ=null,SX=null,AX=null;return this.walk(function(CX,QX){if(j8.code+=CX,QX.source!==null&&QX.line!==null&&QX.column!==null){if(C1!==QX.source||QJ!==QX.line||SX!==QX.column||AX!==QX.name)e8.addMapping({source:QX.source,original:{line:QX.line,column:QX.column},generated:{line:j8.line,column:j8.column},name:QX.name});C1=QX.source,QJ=QX.line,SX=QX.column,AX=QX.name,S1=!0}else if(S1)e8.addMapping({generated:{line:j8.line,column:j8.column}}),C1=null,S1=!1;for(var Kz=0,d0=CX.length;Kz<d0;Kz++)if(CX.charCodeAt(Kz)===i68){if(j8.line++,j8.column=0,Kz+1===d0)C1=null,S1=!1;else if(S1)e8.addMapping({source:QX.source,original:{line:QX.line,column:QX.column},generated:{line:j8.line,column:j8.column},name:QX.name})}else j8.column++}),this.walkSourceContents(function(CX,QX){e8.setSourceContent(CX,QX)}),{code:j8.code,map:e8}};a68.SourceNode=sV});var IM0=TD((Y58)=>{Y58.SourceMapGenerator=dQ0().SourceMapGenerator;Y58.SourceMapConsumer=vM0().SourceMapConsumer;Y58.SourceNode=MM0().SourceNode});var xM0=TD((g58,CM0)=>{var $58=Object.prototype.toString,pQ0=typeof Buffer<"u"&&typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function Z58(B8){return $58.call(B8).slice(8,-1)==="ArrayBuffer"}function z58(B8,i0,j8){i0>>>=0;var e8=B8.byteLength-i0;if(e8<0)throw RangeError("'offset' is out of bounds");if(j8===void 0)j8=e8;else if(j8>>>=0,j8>e8)throw RangeError("'length' is out of bounds");return pQ0?Buffer.from(B8.slice(i0,i0+j8)):new Buffer(new Uint8Array(B8.slice(i0,i0+j8)))}function W58(B8,i0){if(typeof i0!=="string"||i0==="")i0="utf8";if(!Buffer.isEncoding(i0))throw TypeError('"encoding" must be a valid string encoding');return pQ0?Buffer.from(B8,i0):new Buffer(B8,i0)}function Q58(B8,i0,j8){if(typeof B8==="number")throw TypeError('"value" argument must not be a number');if(Z58(B8))return z58(B8,i0,j8);if(typeof B8==="string")return W58(B8,i0);return pQ0?Buffer.from(B8):new Buffer(B8)}CM0.exports=Q58});var cM0=TD((y58,rQ0)=>{var E58=IM0().SourceMapConsumer,oQ0=$B("path"),ZU;try{if(ZU=$B("fs"),!ZU.existsSync||!ZU.readFileSync)ZU=null}catch(B8){}var D58=xM0();function SM0(B8,i0){return B8.require(i0)}var fM0=!1,hM0=!1,sQ0=!1,lf="auto",ak={},pf={},V58=/^data:application\/json[^,]+base64,/,Vw=[],_w=[];function nQ0(){if(lf==="browser")return!0;if(lf==="node")return!1;return typeof window<"u"&&typeof XMLHttpRequest==="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function _58(){return typeof process==="object"&&process!==null&&typeof process.on==="function"}function H58(){if(typeof process==="object"&&process!==null)return process.version;else return""}function G58(){if(typeof process==="object"&&process!==null)return process.stderr}function B58(B8){if(typeof process==="object"&&process!==null&&typeof process.exit==="function")return process.exit(B8)}function yn(B8){return function(i0){for(var j8=0;j8<B8.length;j8++){var e8=B8[j8](i0);if(e8)return e8}return null}}var iQ0=yn(Vw);Vw.push(function(B8){if(B8=B8.trim(),/^file:/.test(B8))B8=B8.replace(/file:\/\/\/(\w:)?/,function(e8,S1){return S1?"":"/"});if(B8 in ak)return ak[B8];var i0="";try{if(!ZU){var j8=new XMLHttpRequest;if(j8.open("GET",B8,!1),j8.send(null),j8.readyState===4&&j8.status===200)i0=j8.responseText}else if(ZU.existsSync(B8))i0=ZU.readFileSync(B8,"utf8")}catch(e8){}return ak[B8]=i0});function tQ0(B8,i0){if(!B8)return i0;var j8=oQ0.dirname(B8),e8=/^\w+:\/\/[^\/]*/.exec(j8),S1=e8?e8[0]:"",C1=j8.slice(S1.length);if(S1&&/^\/\w\:/.test(C1))return S1+="/",S1+oQ0.resolve(j8.slice(S1.length),i0).replace(/\\/g,"/");return S1+oQ0.resolve(j8.slice(S1.length),i0)}function O58(B8){var i0;if(nQ0())try{var j8=new XMLHttpRequest;j8.open("GET",B8,!1),j8.send(null),i0=j8.readyState===4?j8.responseText:null;var e8=j8.getResponseHeader("SourceMap")||j8.getResponseHeader("X-SourceMap");if(e8)return e8}catch(SX){}i0=iQ0(B8);var S1=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg,C1,QJ;while(QJ=S1.exec(i0))C1=QJ;if(!C1)return null;return C1[1]}var aQ0=yn(_w);_w.push(function(B8){var i0=O58(B8);if(!i0)return null;var j8;if(V58.test(i0)){var e8=i0.slice(i0.indexOf(",")+1);j8=D58(e8,"base64").toString(),i0=B8}else i0=tQ0(B8,i0),j8=iQ0(i0);if(!j8)return null;return{url:i0,map:j8}});function eQ0(B8){var i0=pf[B8.source];if(!i0){var j8=aQ0(B8.source);if(j8){if(i0=pf[B8.source]={url:j8.url,map:new E58(j8.map)},i0.map.sourcesContent)i0.map.sources.forEach(function(S1,C1){var QJ=i0.map.sourcesContent[C1];if(QJ){var SX=tQ0(i0.url,S1);ak[SX]=QJ}})}else i0=pf[B8.source]={url:null,map:null}}if(i0&&i0.map&&typeof i0.map.originalPositionFor==="function"){var e8=i0.map.originalPositionFor(B8);if(e8.source!==null)return e8.source=tQ0(i0.url,e8.source),e8}return B8}function mM0(B8){var i0=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(B8);if(i0){var j8=eQ0({source:i0[2],line:+i0[3],column:i0[4]-1});return"eval at "+i0[1]+" ("+j8.source+":"+j8.line+":"+(j8.column+1)+")"}if(i0=/^eval at ([^(]+) \((.+)\)$/.exec(B8),i0)return"eval at "+i0[1]+" ("+mM0(i0[2])+")";return B8}function U58(){var B8,i0="";if(this.isNative())i0="native";else{if(B8=this.getScriptNameOrSourceURL(),!B8&&this.isEval())i0=this.getEvalOrigin(),i0+=", ";if(B8)i0+=B8;else i0+="<anonymous>";var j8=this.getLineNumber();if(j8!=null){i0+=":"+j8;var e8=this.getColumnNumber();if(e8)i0+=":"+e8}}var S1="",C1=this.getFunctionName(),QJ=!0,SX=this.isConstructor(),AX=!(this.isToplevel()||SX);if(AX){var CX=this.getTypeName();if(CX==="[object Object]")CX="null";var QX=this.getMethodName();if(C1){if(CX&&C1.indexOf(CX)!=0)S1+=CX+".";if(S1+=C1,QX&&C1.indexOf("."+QX)!=C1.length-QX.length-1)S1+=" [as "+QX+"]"}else S1+=CX+"."+(QX||"<anonymous>")}else if(SX)S1+="new "+(C1||"<anonymous>");else if(C1)S1+=C1;else S1+=i0,QJ=!1;if(QJ)S1+=" ("+i0+")";return S1}function dM0(B8){var i0={};return Object.getOwnPropertyNames(Object.getPrototypeOf(B8)).forEach(function(j8){i0[j8]=/^(?:is|get)/.test(j8)?function(){return B8[j8].call(B8)}:B8[j8]}),i0.toString=U58,i0}function uM0(B8,i0){if(i0===void 0)i0={nextPosition:null,curPosition:null};if(B8.isNative())return i0.curPosition=null,B8;var j8=B8.getFileName()||B8.getScriptNameOrSourceURL();if(j8){var e8=B8.getLineNumber(),S1=B8.getColumnNumber()-1,C1=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/,QJ=C1.test(H58())?0:62;if(e8===1&&S1>QJ&&!nQ0()&&!B8.isEval())S1-=QJ;var SX=eQ0({source:j8,line:e8,column:S1});i0.curPosition=SX,B8=dM0(B8);var AX=B8.getFunctionName;return B8.getFunctionName=function(){if(i0.nextPosition==null)return AX();return i0.nextPosition.name||AX()},B8.getFileName=function(){return SX.source},B8.getLineNumber=function(){return SX.line},B8.getColumnNumber=function(){return SX.column+1},B8.getScriptNameOrSourceURL=function(){return SX.source},B8}var CX=B8.isEval()&&B8.getEvalOrigin();if(CX)return CX=mM0(CX),B8=dM0(B8),B8.getEvalOrigin=function(){return CX},B8;return B8}function T58(B8,i0){if(sQ0)ak={},pf={};var j8=B8.name||"Error",e8=B8.message||"",S1=j8+": "+e8,C1={nextPosition:null,curPosition:null},QJ=[];for(var SX=i0.length-1;SX>=0;SX--)QJ.push(`
|
|
2
|
+
import{bd as TD,cd as $B}from"./chunk-ns3hznyf.js";var BM0=TD((aW8)=>{var GM0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");aW8.encode=function(B8){if(0<=B8&&B8<GM0.length)return GM0[B8];throw TypeError("Must be between 0 and 63: "+B8)};aW8.decode=function(B8){var i0=65,j8=90,e8=97,S1=122,C1=48,QJ=57,SX=43,AX=47,CX=26,QX=52;if(i0<=B8&&B8<=j8)return B8-i0;if(e8<=B8&&B8<=S1)return B8-e8+CX;if(C1<=B8&&B8<=QJ)return B8-C1+QX;if(B8==SX)return 62;if(B8==AX)return 63;return-1}});var CQ0=TD((K68)=>{var OM0=BM0(),IQ0=5,UM0=1<<IQ0,TM0=UM0-1,qM0=UM0;function J68(B8){return B8<0?(-B8<<1)+1:(B8<<1)+0}function X68(B8){var i0=(B8&1)===1,j8=B8>>1;return i0?-j8:j8}K68.encode=function(i0){var j8="",e8,S1=J68(i0);do{if(e8=S1&TM0,S1>>>=IQ0,S1>0)e8|=qM0;j8+=OM0.encode(e8)}while(S1>0);return j8};K68.decode=function(i0,j8,e8){var S1=i0.length,C1=0,QJ=0,SX,AX;do{if(j8>=S1)throw Error("Expected more digits in base 64 VLQ value.");if(AX=OM0.decode(i0.charCodeAt(j8++)),AX===-1)throw Error("Invalid base64 digit: "+i0.charAt(j8-1));SX=!!(AX&qM0),AX&=TM0,C1=C1+(AX<<QJ),QJ+=IQ0}while(SX);e8.value=X68(C1),e8.rest=j8}});var _N=TD((O68)=>{function z68(B8,i0,j8){if(i0 in B8)return B8[i0];else if(arguments.length===3)return j8;else throw Error('"'+i0+'" is a required argument.')}O68.getArg=z68;var bM0=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,W68=/^data:.+\,.+$/;function uf(B8){var i0=B8.match(bM0);if(!i0)return null;return{scheme:i0[1],auth:i0[2],host:i0[3],port:i0[4],path:i0[5]}}O68.urlParse=uf;function DN(B8){var i0="";if(B8.scheme)i0+=B8.scheme+":";if(i0+="//",B8.auth)i0+=B8.auth+"@";if(B8.host)i0+=B8.host;if(B8.port)i0+=":"+B8.port;if(B8.path)i0+=B8.path;return i0}O68.urlGenerate=DN;function xQ0(B8){var i0=B8,j8=uf(B8);if(j8){if(!j8.path)return B8;i0=j8.path}var e8=O68.isAbsolute(i0),S1=i0.split(/\/+/);for(var C1,QJ=0,SX=S1.length-1;SX>=0;SX--)if(C1=S1[SX],C1===".")S1.splice(SX,1);else if(C1==="..")QJ++;else if(QJ>0)if(C1==="")S1.splice(SX+1,QJ),QJ=0;else S1.splice(SX,2),QJ--;if(i0=S1.join("/"),i0==="")i0=e8?"/":".";if(j8)return j8.path=i0,DN(j8);return i0}O68.normalize=xQ0;function wM0(B8,i0){if(B8==="")B8=".";if(i0==="")i0=".";var j8=uf(i0),e8=uf(B8);if(e8)B8=e8.path||"/";if(j8&&!j8.scheme){if(e8)j8.scheme=e8.scheme;return DN(j8)}if(j8||i0.match(W68))return i0;if(e8&&!e8.host&&!e8.path)return e8.host=i0,DN(e8);var S1=i0.charAt(0)==="/"?i0:xQ0(B8.replace(/\/+$/,"")+"/"+i0);if(e8)return e8.path=S1,DN(e8);return S1}O68.join=wM0;O68.isAbsolute=function(B8){return B8.charAt(0)==="/"||bM0.test(B8)};function Q68(B8,i0){if(B8==="")B8=".";B8=B8.replace(/\/$/,"");var j8=0;while(i0.indexOf(B8+"/")!==0){var e8=B8.lastIndexOf("/");if(e8<0)return i0;if(B8=B8.slice(0,e8),B8.match(/^([^\/]+:\/)?\/*$/))return i0;++j8}return Array(j8+1).join("../")+i0.substr(B8.length+1)}O68.relative=Q68;var FM0=function(){var B8=Object.create(null);return!("__proto__"in B8)}();function yM0(B8){return B8}function E68(B8){if(kM0(B8))return"$"+B8;return B8}O68.toSetString=FM0?yM0:E68;function D68(B8){if(kM0(B8))return B8.slice(1);return B8}O68.fromSetString=FM0?yM0:D68;function kM0(B8){if(!B8)return!1;var i0=B8.length;if(i0<9)return!1;if(B8.charCodeAt(i0-1)!==95||B8.charCodeAt(i0-2)!==95||B8.charCodeAt(i0-3)!==111||B8.charCodeAt(i0-4)!==116||B8.charCodeAt(i0-5)!==111||B8.charCodeAt(i0-6)!==114||B8.charCodeAt(i0-7)!==112||B8.charCodeAt(i0-8)!==95||B8.charCodeAt(i0-9)!==95)return!1;for(var j8=i0-10;j8>=0;j8--)if(B8.charCodeAt(j8)!==36)return!1;return!0}function V68(B8,i0,j8){var e8=VN(B8.source,i0.source);if(e8!==0)return e8;if(e8=B8.originalLine-i0.originalLine,e8!==0)return e8;if(e8=B8.originalColumn-i0.originalColumn,e8!==0||j8)return e8;if(e8=B8.generatedColumn-i0.generatedColumn,e8!==0)return e8;if(e8=B8.generatedLine-i0.generatedLine,e8!==0)return e8;return VN(B8.name,i0.name)}O68.compareByOriginalPositions=V68;function _68(B8,i0,j8){var e8=B8.generatedLine-i0.generatedLine;if(e8!==0)return e8;if(e8=B8.generatedColumn-i0.generatedColumn,e8!==0||j8)return e8;if(e8=VN(B8.source,i0.source),e8!==0)return e8;if(e8=B8.originalLine-i0.originalLine,e8!==0)return e8;if(e8=B8.originalColumn-i0.originalColumn,e8!==0)return e8;return VN(B8.name,i0.name)}O68.compareByGeneratedPositionsDeflated=_68;function VN(B8,i0){if(B8===i0)return 0;if(B8===null)return 1;if(i0===null)return-1;if(B8>i0)return 1;return-1}function H68(B8,i0){var j8=B8.generatedLine-i0.generatedLine;if(j8!==0)return j8;if(j8=B8.generatedColumn-i0.generatedColumn,j8!==0)return j8;if(j8=VN(B8.source,i0.source),j8!==0)return j8;if(j8=B8.originalLine-i0.originalLine,j8!==0)return j8;if(j8=B8.originalColumn-i0.originalColumn,j8!==0)return j8;return VN(B8.name,i0.name)}O68.compareByGeneratedPositionsInflated=H68;function G68(B8){return JSON.parse(B8.replace(/^\)]}'[^\n]*\n/,""))}O68.parseSourceMapInput=G68;function B68(B8,i0,j8){if(i0=i0||"",B8){if(B8[B8.length-1]!=="/"&&i0[0]!=="/")B8+="/";i0=B8+i0}if(j8){var e8=uf(j8);if(!e8)throw Error("sourceMapURL could not be parsed");if(e8.path){var S1=e8.path.lastIndexOf("/");if(S1>=0)e8.path=e8.path.substring(0,S1+1)}i0=wM0(DN(e8),i0)}return xQ0(i0)}O68.computeSourceURL=B68});var hQ0=TD((v68)=>{var SQ0=_N(),fQ0=Object.prototype.hasOwnProperty,ik=typeof Map<"u";function NT(){this._array=[],this._set=ik?new Map:Object.create(null)}NT.fromArray=function(i0,j8){var e8=new NT;for(var S1=0,C1=i0.length;S1<C1;S1++)e8.add(i0[S1],j8);return e8};NT.prototype.size=function(){return ik?this._set.size:Object.getOwnPropertyNames(this._set).length};NT.prototype.add=function(i0,j8){var e8=ik?i0:SQ0.toSetString(i0),S1=ik?this.has(i0):fQ0.call(this._set,e8),C1=this._array.length;if(!S1||j8)this._array.push(i0);if(!S1)if(ik)this._set.set(i0,C1);else this._set[e8]=C1};NT.prototype.has=function(i0){if(ik)return this._set.has(i0);else{var j8=SQ0.toSetString(i0);return fQ0.call(this._set,j8)}};NT.prototype.indexOf=function(i0){if(ik){var j8=this._set.get(i0);if(j8>=0)return j8}else{var e8=SQ0.toSetString(i0);if(fQ0.call(this._set,e8))return this._set[e8]}throw Error('"'+i0+'" is not in the set.')};NT.prototype.at=function(i0){if(i0>=0&&i0<this._array.length)return this._array[i0];throw Error("No element indexed by "+i0)};NT.prototype.toArray=function(){return this._array.slice()};v68.ArraySet=NT});var jM0=TD((C68)=>{var AM0=_N();function I68(B8,i0){var j8=B8.generatedLine,e8=i0.generatedLine,S1=B8.generatedColumn,C1=i0.generatedColumn;return e8>j8||e8==j8&&C1>=S1||AM0.compareByGeneratedPositionsInflated(B8,i0)<=0}function bn(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}bn.prototype.unsortedForEach=function(i0,j8){this._array.forEach(i0,j8)};bn.prototype.add=function(i0){if(I68(this._last,i0))this._last=i0,this._array.push(i0);else this._sorted=!1,this._array.push(i0)};bn.prototype.toArray=function(){if(!this._sorted)this._array.sort(AM0.compareByGeneratedPositionsInflated),this._sorted=!0;return this._array};C68.MappingList=bn});var dQ0=TD((f68)=>{var gf=CQ0(),N6=_N(),wn=hQ0().ArraySet,S68=jM0().MappingList;function PH(B8){if(!B8)B8={};this._file=N6.getArg(B8,"file",null),this._sourceRoot=N6.getArg(B8,"sourceRoot",null),this._skipValidation=N6.getArg(B8,"skipValidation",!1),this._sources=new wn,this._names=new wn,this._mappings=new S68,this._sourcesContents=null}PH.prototype._version=3;PH.fromSourceMap=function(i0){var j8=i0.sourceRoot,e8=new PH({file:i0.file,sourceRoot:j8});return i0.eachMapping(function(S1){var C1={generated:{line:S1.generatedLine,column:S1.generatedColumn}};if(S1.source!=null){if(C1.source=S1.source,j8!=null)C1.source=N6.relative(j8,C1.source);if(C1.original={line:S1.originalLine,column:S1.originalColumn},S1.name!=null)C1.name=S1.name}e8.addMapping(C1)}),i0.sources.forEach(function(S1){var C1=S1;if(j8!==null)C1=N6.relative(j8,S1);if(!e8._sources.has(C1))e8._sources.add(C1);var QJ=i0.sourceContentFor(S1);if(QJ!=null)e8.setSourceContent(S1,QJ)}),e8};PH.prototype.addMapping=function(i0){var j8=N6.getArg(i0,"generated"),e8=N6.getArg(i0,"original",null),S1=N6.getArg(i0,"source",null),C1=N6.getArg(i0,"name",null);if(!this._skipValidation)this._validateMapping(j8,e8,S1,C1);if(S1!=null){if(S1=String(S1),!this._sources.has(S1))this._sources.add(S1)}if(C1!=null){if(C1=String(C1),!this._names.has(C1))this._names.add(C1)}this._mappings.add({generatedLine:j8.line,generatedColumn:j8.column,originalLine:e8!=null&&e8.line,originalColumn:e8!=null&&e8.column,source:S1,name:C1})};PH.prototype.setSourceContent=function(i0,j8){var e8=i0;if(this._sourceRoot!=null)e8=N6.relative(this._sourceRoot,e8);if(j8!=null){if(!this._sourcesContents)this._sourcesContents=Object.create(null);this._sourcesContents[N6.toSetString(e8)]=j8}else if(this._sourcesContents){if(delete this._sourcesContents[N6.toSetString(e8)],Object.keys(this._sourcesContents).length===0)this._sourcesContents=null}};PH.prototype.applySourceMap=function(i0,j8,e8){var S1=j8;if(j8==null){if(i0.file==null)throw Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);S1=i0.file}var C1=this._sourceRoot;if(C1!=null)S1=N6.relative(C1,S1);var QJ=new wn,SX=new wn;this._mappings.unsortedForEach(function(AX){if(AX.source===S1&&AX.originalLine!=null){var CX=i0.originalPositionFor({line:AX.originalLine,column:AX.originalColumn});if(CX.source!=null){if(AX.source=CX.source,e8!=null)AX.source=N6.join(e8,AX.source);if(C1!=null)AX.source=N6.relative(C1,AX.source);if(AX.originalLine=CX.line,AX.originalColumn=CX.column,CX.name!=null)AX.name=CX.name}}var QX=AX.source;if(QX!=null&&!QJ.has(QX))QJ.add(QX);var Kz=AX.name;if(Kz!=null&&!SX.has(Kz))SX.add(Kz)},this),this._sources=QJ,this._names=SX,i0.sources.forEach(function(AX){var CX=i0.sourceContentFor(AX);if(CX!=null){if(e8!=null)AX=N6.join(e8,AX);if(C1!=null)AX=N6.relative(C1,AX);this.setSourceContent(AX,CX)}},this)};PH.prototype._validateMapping=function(i0,j8,e8,S1){if(j8&&typeof j8.line!=="number"&&typeof j8.column!=="number")throw Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(i0&&"line"in i0&&"column"in i0&&i0.line>0&&i0.column>=0&&!j8&&!e8&&!S1)return;else if(i0&&"line"in i0&&"column"in i0&&j8&&"line"in j8&&"column"in j8&&i0.line>0&&i0.column>=0&&j8.line>0&&j8.column>=0&&e8)return;else throw Error("Invalid mapping: "+JSON.stringify({generated:i0,source:e8,original:j8,name:S1}))};PH.prototype._serializeMappings=function(){var i0=0,j8=1,e8=0,S1=0,C1=0,QJ=0,SX="",AX,CX,QX,Kz,d0=this._mappings.toArray();for(var vz=0,k1=d0.length;vz<k1;vz++){if(CX=d0[vz],AX="",CX.generatedLine!==j8){i0=0;while(CX.generatedLine!==j8)AX+=";",j8++}else if(vz>0){if(!N6.compareByGeneratedPositionsInflated(CX,d0[vz-1]))continue;AX+=","}if(AX+=gf.encode(CX.generatedColumn-i0),i0=CX.generatedColumn,CX.source!=null){if(Kz=this._sources.indexOf(CX.source),AX+=gf.encode(Kz-QJ),QJ=Kz,AX+=gf.encode(CX.originalLine-1-S1),S1=CX.originalLine-1,AX+=gf.encode(CX.originalColumn-e8),e8=CX.originalColumn,CX.name!=null)QX=this._names.indexOf(CX.name),AX+=gf.encode(QX-C1),C1=QX}SX+=AX}return SX};PH.prototype._generateSourcesContent=function(i0,j8){return i0.map(function(e8){if(!this._sourcesContents)return null;if(j8!=null)e8=N6.relative(j8,e8);var S1=N6.toSetString(e8);return Object.prototype.hasOwnProperty.call(this._sourcesContents,S1)?this._sourcesContents[S1]:null},this)};PH.prototype.toJSON=function(){var i0={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null)i0.file=this._file;if(this._sourceRoot!=null)i0.sourceRoot=this._sourceRoot;if(this._sourcesContents)i0.sourcesContent=this._generateSourcesContent(i0.sources,i0.sourceRoot);return i0};PH.prototype.toString=function(){return JSON.stringify(this.toJSON())};f68.SourceMapGenerator=PH});var LM0=TD((d68)=>{d68.GREATEST_LOWER_BOUND=1;d68.LEAST_UPPER_BOUND=2;function mQ0(B8,i0,j8,e8,S1,C1){var QJ=Math.floor((i0-B8)/2)+B8,SX=S1(j8,e8[QJ],!0);if(SX===0)return QJ;else if(SX>0){if(i0-QJ>1)return mQ0(QJ,i0,j8,e8,S1,C1);if(C1==d68.LEAST_UPPER_BOUND)return i0<e8.length?i0:-1;else return QJ}else{if(QJ-B8>1)return mQ0(B8,QJ,j8,e8,S1,C1);if(C1==d68.LEAST_UPPER_BOUND)return QJ;else return B8<0?-1:B8}}d68.search=function(i0,j8,e8,S1){if(j8.length===0)return-1;var C1=mQ0(-1,j8.length,i0,j8,e8,S1||d68.GREATEST_LOWER_BOUND);if(C1<0)return-1;while(C1-1>=0){if(e8(j8[C1],j8[C1-1],!0)!==0)break;--C1}return C1}});var RM0=TD((g68)=>{function gQ0(B8,i0,j8){var e8=B8[i0];B8[i0]=B8[j8],B8[j8]=e8}function u68(B8,i0){return Math.round(B8+Math.random()*(i0-B8))}function cQ0(B8,i0,j8,e8){if(j8<e8){var S1=u68(j8,e8),C1=j8-1;gQ0(B8,S1,e8);var QJ=B8[e8];for(var SX=j8;SX<e8;SX++)if(i0(B8[SX],QJ)<=0)C1+=1,gQ0(B8,C1,SX);gQ0(B8,C1+1,SX);var AX=C1+1;cQ0(B8,i0,j8,AX-1),cQ0(B8,i0,AX+1,e8)}}g68.quickSort=function(B8,i0){cQ0(B8,i0,0,B8.length-1)}});var vM0=TD((p68)=>{var p9=_N(),lQ0=LM0(),HN=hQ0().ArraySet,l68=CQ0(),cf=RM0().quickSort;function R4(B8,i0){var j8=B8;if(typeof B8==="string")j8=p9.parseSourceMapInput(B8);return j8.sections!=null?new KB(j8,i0):new NQ(j8,i0)}R4.fromSourceMap=function(B8,i0){return NQ.fromSourceMap(B8,i0)};R4.prototype._version=3;R4.prototype.__generatedMappings=null;Object.defineProperty(R4.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__generatedMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__generatedMappings}});R4.prototype.__originalMappings=null;Object.defineProperty(R4.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__originalMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__originalMappings}});R4.prototype._charIsMappingSeparator=function(i0,j8){var e8=i0.charAt(j8);return e8===";"||e8===","};R4.prototype._parseMappings=function(i0,j8){throw Error("Subclasses must implement _parseMappings")};R4.GENERATED_ORDER=1;R4.ORIGINAL_ORDER=2;R4.GREATEST_LOWER_BOUND=1;R4.LEAST_UPPER_BOUND=2;R4.prototype.eachMapping=function(i0,j8,e8){var S1=j8||null,C1=e8||R4.GENERATED_ORDER,QJ;switch(C1){case R4.GENERATED_ORDER:QJ=this._generatedMappings;break;case R4.ORIGINAL_ORDER:QJ=this._originalMappings;break;default:throw Error("Unknown order of iteration.")}var SX=this.sourceRoot;QJ.map(function(AX){var CX=AX.source===null?null:this._sources.at(AX.source);return CX=p9.computeSourceURL(SX,CX,this._sourceMapURL),{source:CX,generatedLine:AX.generatedLine,generatedColumn:AX.generatedColumn,originalLine:AX.originalLine,originalColumn:AX.originalColumn,name:AX.name===null?null:this._names.at(AX.name)}},this).forEach(i0,S1)};R4.prototype.allGeneratedPositionsFor=function(i0){var j8=p9.getArg(i0,"line"),e8={source:p9.getArg(i0,"source"),originalLine:j8,originalColumn:p9.getArg(i0,"column",0)};if(e8.source=this._findSourceIndex(e8.source),e8.source<0)return[];var S1=[],C1=this._findMapping(e8,this._originalMappings,"originalLine","originalColumn",p9.compareByOriginalPositions,lQ0.LEAST_UPPER_BOUND);if(C1>=0){var QJ=this._originalMappings[C1];if(i0.column===void 0){var SX=QJ.originalLine;while(QJ&&QJ.originalLine===SX)S1.push({line:p9.getArg(QJ,"generatedLine",null),column:p9.getArg(QJ,"generatedColumn",null),lastColumn:p9.getArg(QJ,"lastGeneratedColumn",null)}),QJ=this._originalMappings[++C1]}else{var AX=QJ.originalColumn;while(QJ&&QJ.originalLine===j8&&QJ.originalColumn==AX)S1.push({line:p9.getArg(QJ,"generatedLine",null),column:p9.getArg(QJ,"generatedColumn",null),lastColumn:p9.getArg(QJ,"lastGeneratedColumn",null)}),QJ=this._originalMappings[++C1]}}return S1};p68.SourceMapConsumer=R4;function NQ(B8,i0){var j8=B8;if(typeof B8==="string")j8=p9.parseSourceMapInput(B8);var e8=p9.getArg(j8,"version"),S1=p9.getArg(j8,"sources"),C1=p9.getArg(j8,"names",[]),QJ=p9.getArg(j8,"sourceRoot",null),SX=p9.getArg(j8,"sourcesContent",null),AX=p9.getArg(j8,"mappings"),CX=p9.getArg(j8,"file",null);if(e8!=this._version)throw Error("Unsupported version: "+e8);if(QJ)QJ=p9.normalize(QJ);S1=S1.map(String).map(p9.normalize).map(function(QX){return QJ&&p9.isAbsolute(QJ)&&p9.isAbsolute(QX)?p9.relative(QJ,QX):QX}),this._names=HN.fromArray(C1.map(String),!0),this._sources=HN.fromArray(S1,!0),this._absoluteSources=this._sources.toArray().map(function(QX){return p9.computeSourceURL(QJ,QX,i0)}),this.sourceRoot=QJ,this.sourcesContent=SX,this._mappings=AX,this._sourceMapURL=i0,this.file=CX}NQ.prototype=Object.create(R4.prototype);NQ.prototype.consumer=R4;NQ.prototype._findSourceIndex=function(B8){var i0=B8;if(this.sourceRoot!=null)i0=p9.relative(this.sourceRoot,i0);if(this._sources.has(i0))return this._sources.indexOf(i0);var j8;for(j8=0;j8<this._absoluteSources.length;++j8)if(this._absoluteSources[j8]==B8)return j8;return-1};NQ.fromSourceMap=function(i0,j8){var e8=Object.create(NQ.prototype),S1=e8._names=HN.fromArray(i0._names.toArray(),!0),C1=e8._sources=HN.fromArray(i0._sources.toArray(),!0);e8.sourceRoot=i0._sourceRoot,e8.sourcesContent=i0._generateSourcesContent(e8._sources.toArray(),e8.sourceRoot),e8.file=i0._file,e8._sourceMapURL=j8,e8._absoluteSources=e8._sources.toArray().map(function(vz){return p9.computeSourceURL(e8.sourceRoot,vz,j8)});var QJ=i0._mappings.toArray().slice(),SX=e8.__generatedMappings=[],AX=e8.__originalMappings=[];for(var CX=0,QX=QJ.length;CX<QX;CX++){var Kz=QJ[CX],d0=new NM0;if(d0.generatedLine=Kz.generatedLine,d0.generatedColumn=Kz.generatedColumn,Kz.source){if(d0.source=C1.indexOf(Kz.source),d0.originalLine=Kz.originalLine,d0.originalColumn=Kz.originalColumn,Kz.name)d0.name=S1.indexOf(Kz.name);AX.push(d0)}SX.push(d0)}return cf(e8.__originalMappings,p9.compareByOriginalPositions),e8};NQ.prototype._version=3;Object.defineProperty(NQ.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function NM0(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}NQ.prototype._parseMappings=function(i0,j8){var e8=1,S1=0,C1=0,QJ=0,SX=0,AX=0,CX=i0.length,QX=0,Kz={},d0={},vz=[],k1=[],$1,vT,$K,qD,ek;while(QX<CX)if(i0.charAt(QX)===";")e8++,QX++,S1=0;else if(i0.charAt(QX)===",")QX++;else{$1=new NM0,$1.generatedLine=e8;for(qD=QX;qD<CX;qD++)if(this._charIsMappingSeparator(i0,qD))break;if(vT=i0.slice(QX,qD),$K=Kz[vT],$K)QX+=vT.length;else{$K=[];while(QX<qD)l68.decode(i0,QX,d0),ek=d0.value,QX=d0.rest,$K.push(ek);if($K.length===2)throw Error("Found a source, but no line and column");if($K.length===3)throw Error("Found a source and line, but no column");Kz[vT]=$K}if($1.generatedColumn=S1+$K[0],S1=$1.generatedColumn,$K.length>1){if($1.source=SX+$K[1],SX+=$K[1],$1.originalLine=C1+$K[2],C1=$1.originalLine,$1.originalLine+=1,$1.originalColumn=QJ+$K[3],QJ=$1.originalColumn,$K.length>4)$1.name=AX+$K[4],AX+=$K[4]}if(k1.push($1),typeof $1.originalLine==="number")vz.push($1)}cf(k1,p9.compareByGeneratedPositionsDeflated),this.__generatedMappings=k1,cf(vz,p9.compareByOriginalPositions),this.__originalMappings=vz};NQ.prototype._findMapping=function(i0,j8,e8,S1,C1,QJ){if(i0[e8]<=0)throw TypeError("Line must be greater than or equal to 1, got "+i0[e8]);if(i0[S1]<0)throw TypeError("Column must be greater than or equal to 0, got "+i0[S1]);return lQ0.search(i0,j8,C1,QJ)};NQ.prototype.computeColumnSpans=function(){for(var i0=0;i0<this._generatedMappings.length;++i0){var j8=this._generatedMappings[i0];if(i0+1<this._generatedMappings.length){var e8=this._generatedMappings[i0+1];if(j8.generatedLine===e8.generatedLine){j8.lastGeneratedColumn=e8.generatedColumn-1;continue}}j8.lastGeneratedColumn=1/0}};NQ.prototype.originalPositionFor=function(i0){var j8={generatedLine:p9.getArg(i0,"line"),generatedColumn:p9.getArg(i0,"column")},e8=this._findMapping(j8,this._generatedMappings,"generatedLine","generatedColumn",p9.compareByGeneratedPositionsDeflated,p9.getArg(i0,"bias",R4.GREATEST_LOWER_BOUND));if(e8>=0){var S1=this._generatedMappings[e8];if(S1.generatedLine===j8.generatedLine){var C1=p9.getArg(S1,"source",null);if(C1!==null)C1=this._sources.at(C1),C1=p9.computeSourceURL(this.sourceRoot,C1,this._sourceMapURL);var QJ=p9.getArg(S1,"name",null);if(QJ!==null)QJ=this._names.at(QJ);return{source:C1,line:p9.getArg(S1,"originalLine",null),column:p9.getArg(S1,"originalColumn",null),name:QJ}}}return{source:null,line:null,column:null,name:null}};NQ.prototype.hasContentsOfAllSources=function(){if(!this.sourcesContent)return!1;return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(i0){return i0==null})};NQ.prototype.sourceContentFor=function(i0,j8){if(!this.sourcesContent)return null;var e8=this._findSourceIndex(i0);if(e8>=0)return this.sourcesContent[e8];var S1=i0;if(this.sourceRoot!=null)S1=p9.relative(this.sourceRoot,S1);var C1;if(this.sourceRoot!=null&&(C1=p9.urlParse(this.sourceRoot))){var QJ=S1.replace(/^file:\/\//,"");if(C1.scheme=="file"&&this._sources.has(QJ))return this.sourcesContent[this._sources.indexOf(QJ)];if((!C1.path||C1.path=="/")&&this._sources.has("/"+S1))return this.sourcesContent[this._sources.indexOf("/"+S1)]}if(j8)return null;else throw Error('"'+S1+'" is not in the SourceMap.')};NQ.prototype.generatedPositionFor=function(i0){var j8=p9.getArg(i0,"source");if(j8=this._findSourceIndex(j8),j8<0)return{line:null,column:null,lastColumn:null};var e8={source:j8,originalLine:p9.getArg(i0,"line"),originalColumn:p9.getArg(i0,"column")},S1=this._findMapping(e8,this._originalMappings,"originalLine","originalColumn",p9.compareByOriginalPositions,p9.getArg(i0,"bias",R4.GREATEST_LOWER_BOUND));if(S1>=0){var C1=this._originalMappings[S1];if(C1.source===e8.source)return{line:p9.getArg(C1,"generatedLine",null),column:p9.getArg(C1,"generatedColumn",null),lastColumn:p9.getArg(C1,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};p68.BasicSourceMapConsumer=NQ;function KB(B8,i0){var j8=B8;if(typeof B8==="string")j8=p9.parseSourceMapInput(B8);var e8=p9.getArg(j8,"version"),S1=p9.getArg(j8,"sections");if(e8!=this._version)throw Error("Unsupported version: "+e8);this._sources=new HN,this._names=new HN;var C1={line:-1,column:0};this._sections=S1.map(function(QJ){if(QJ.url)throw Error("Support for url field in sections not implemented.");var SX=p9.getArg(QJ,"offset"),AX=p9.getArg(SX,"line"),CX=p9.getArg(SX,"column");if(AX<C1.line||AX===C1.line&&CX<C1.column)throw Error("Section offsets must be ordered and non-overlapping.");return C1=SX,{generatedOffset:{generatedLine:AX+1,generatedColumn:CX+1},consumer:new R4(p9.getArg(QJ,"map"),i0)}})}KB.prototype=Object.create(R4.prototype);KB.prototype.constructor=R4;KB.prototype._version=3;Object.defineProperty(KB.prototype,"sources",{get:function(){var B8=[];for(var i0=0;i0<this._sections.length;i0++)for(var j8=0;j8<this._sections[i0].consumer.sources.length;j8++)B8.push(this._sections[i0].consumer.sources[j8]);return B8}});KB.prototype.originalPositionFor=function(i0){var j8={generatedLine:p9.getArg(i0,"line"),generatedColumn:p9.getArg(i0,"column")},e8=lQ0.search(j8,this._sections,function(C1,QJ){var SX=C1.generatedLine-QJ.generatedOffset.generatedLine;if(SX)return SX;return C1.generatedColumn-QJ.generatedOffset.generatedColumn}),S1=this._sections[e8];if(!S1)return{source:null,line:null,column:null,name:null};return S1.consumer.originalPositionFor({line:j8.generatedLine-(S1.generatedOffset.generatedLine-1),column:j8.generatedColumn-(S1.generatedOffset.generatedLine===j8.generatedLine?S1.generatedOffset.generatedColumn-1:0),bias:i0.bias})};KB.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(i0){return i0.consumer.hasContentsOfAllSources()})};KB.prototype.sourceContentFor=function(i0,j8){for(var e8=0;e8<this._sections.length;e8++){var S1=this._sections[e8],C1=S1.consumer.sourceContentFor(i0,!0);if(C1)return C1}if(j8)return null;else throw Error('"'+i0+'" is not in the SourceMap.')};KB.prototype.generatedPositionFor=function(i0){for(var j8=0;j8<this._sections.length;j8++){var e8=this._sections[j8];if(e8.consumer._findSourceIndex(p9.getArg(i0,"source"))===-1)continue;var S1=e8.consumer.generatedPositionFor(i0);if(S1){var C1={line:S1.line+(e8.generatedOffset.generatedLine-1),column:S1.column+(e8.generatedOffset.generatedLine===S1.line?e8.generatedOffset.generatedColumn-1:0)};return C1}}return{line:null,column:null}};KB.prototype._parseMappings=function(i0,j8){this.__generatedMappings=[],this.__originalMappings=[];for(var e8=0;e8<this._sections.length;e8++){var S1=this._sections[e8],C1=S1.consumer._generatedMappings;for(var QJ=0;QJ<C1.length;QJ++){var SX=C1[QJ],AX=S1.consumer._sources.at(SX.source);AX=p9.computeSourceURL(S1.consumer.sourceRoot,AX,this._sourceMapURL),this._sources.add(AX),AX=this._sources.indexOf(AX);var CX=null;if(SX.name)CX=S1.consumer._names.at(SX.name),this._names.add(CX),CX=this._names.indexOf(CX);var QX={source:AX,generatedLine:SX.generatedLine+(S1.generatedOffset.generatedLine-1),generatedColumn:SX.generatedColumn+(S1.generatedOffset.generatedLine===SX.generatedLine?S1.generatedOffset.generatedColumn-1:0),originalLine:SX.originalLine,originalColumn:SX.originalColumn,name:CX};if(this.__generatedMappings.push(QX),typeof QX.originalLine==="number")this.__originalMappings.push(QX)}}cf(this.__generatedMappings,p9.compareByGeneratedPositionsDeflated),cf(this.__originalMappings,p9.compareByOriginalPositions)};p68.IndexedSourceMapConsumer=KB});var MM0=TD((a68)=>{var r68=dQ0().SourceMapGenerator,Fn=_N(),n68=/(\r?\n)/,i68=10,GN="$$$isSourceNode$$$";function sV(B8,i0,j8,e8,S1){if(this.children=[],this.sourceContents={},this.line=B8==null?null:B8,this.column=i0==null?null:i0,this.source=j8==null?null:j8,this.name=S1==null?null:S1,this[GN]=!0,e8!=null)this.add(e8)}sV.fromStringWithSourceMap=function(i0,j8,e8){var S1=new sV,C1=i0.split(n68),QJ=0,SX=function(){var d0=k1(),vz=k1()||"";return d0+vz;function k1(){return QJ<C1.length?C1[QJ++]:void 0}},AX=1,CX=0,QX=null;if(j8.eachMapping(function(d0){if(QX!==null)if(AX<d0.generatedLine)Kz(QX,SX()),AX++,CX=0;else{var vz=C1[QJ]||"",k1=vz.substr(0,d0.generatedColumn-CX);C1[QJ]=vz.substr(d0.generatedColumn-CX),CX=d0.generatedColumn,Kz(QX,k1),QX=d0;return}while(AX<d0.generatedLine)S1.add(SX()),AX++;if(CX<d0.generatedColumn){var vz=C1[QJ]||"";S1.add(vz.substr(0,d0.generatedColumn)),C1[QJ]=vz.substr(d0.generatedColumn),CX=d0.generatedColumn}QX=d0},this),QJ<C1.length){if(QX)Kz(QX,SX());S1.add(C1.splice(QJ).join(""))}return j8.sources.forEach(function(d0){var vz=j8.sourceContentFor(d0);if(vz!=null){if(e8!=null)d0=Fn.join(e8,d0);S1.setSourceContent(d0,vz)}}),S1;function Kz(d0,vz){if(d0===null||d0.source===void 0)S1.add(vz);else{var k1=e8?Fn.join(e8,d0.source):d0.source;S1.add(new sV(d0.originalLine,d0.originalColumn,k1,vz,d0.name))}}};sV.prototype.add=function(i0){if(Array.isArray(i0))i0.forEach(function(j8){this.add(j8)},this);else if(i0[GN]||typeof i0==="string"){if(i0)this.children.push(i0)}else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+i0);return this};sV.prototype.prepend=function(i0){if(Array.isArray(i0))for(var j8=i0.length-1;j8>=0;j8--)this.prepend(i0[j8]);else if(i0[GN]||typeof i0==="string")this.children.unshift(i0);else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+i0);return this};sV.prototype.walk=function(i0){var j8;for(var e8=0,S1=this.children.length;e8<S1;e8++)if(j8=this.children[e8],j8[GN])j8.walk(i0);else if(j8!=="")i0(j8,{source:this.source,line:this.line,column:this.column,name:this.name})};sV.prototype.join=function(i0){var j8,e8,S1=this.children.length;if(S1>0){j8=[];for(e8=0;e8<S1-1;e8++)j8.push(this.children[e8]),j8.push(i0);j8.push(this.children[e8]),this.children=j8}return this};sV.prototype.replaceRight=function(i0,j8){var e8=this.children[this.children.length-1];if(e8[GN])e8.replaceRight(i0,j8);else if(typeof e8==="string")this.children[this.children.length-1]=e8.replace(i0,j8);else this.children.push("".replace(i0,j8));return this};sV.prototype.setSourceContent=function(i0,j8){this.sourceContents[Fn.toSetString(i0)]=j8};sV.prototype.walkSourceContents=function(i0){for(var j8=0,e8=this.children.length;j8<e8;j8++)if(this.children[j8][GN])this.children[j8].walkSourceContents(i0);var S1=Object.keys(this.sourceContents);for(var j8=0,e8=S1.length;j8<e8;j8++)i0(Fn.fromSetString(S1[j8]),this.sourceContents[S1[j8]])};sV.prototype.toString=function(){var i0="";return this.walk(function(j8){i0+=j8}),i0};sV.prototype.toStringWithSourceMap=function(i0){var j8={code:"",line:1,column:0},e8=new r68(i0),S1=!1,C1=null,QJ=null,SX=null,AX=null;return this.walk(function(CX,QX){if(j8.code+=CX,QX.source!==null&&QX.line!==null&&QX.column!==null){if(C1!==QX.source||QJ!==QX.line||SX!==QX.column||AX!==QX.name)e8.addMapping({source:QX.source,original:{line:QX.line,column:QX.column},generated:{line:j8.line,column:j8.column},name:QX.name});C1=QX.source,QJ=QX.line,SX=QX.column,AX=QX.name,S1=!0}else if(S1)e8.addMapping({generated:{line:j8.line,column:j8.column}}),C1=null,S1=!1;for(var Kz=0,d0=CX.length;Kz<d0;Kz++)if(CX.charCodeAt(Kz)===i68){if(j8.line++,j8.column=0,Kz+1===d0)C1=null,S1=!1;else if(S1)e8.addMapping({source:QX.source,original:{line:QX.line,column:QX.column},generated:{line:j8.line,column:j8.column},name:QX.name})}else j8.column++}),this.walkSourceContents(function(CX,QX){e8.setSourceContent(CX,QX)}),{code:j8.code,map:e8}};a68.SourceNode=sV});var IM0=TD((Y58)=>{Y58.SourceMapGenerator=dQ0().SourceMapGenerator;Y58.SourceMapConsumer=vM0().SourceMapConsumer;Y58.SourceNode=MM0().SourceNode});var xM0=TD((g58,CM0)=>{var $58=Object.prototype.toString,pQ0=typeof Buffer<"u"&&typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function Z58(B8){return $58.call(B8).slice(8,-1)==="ArrayBuffer"}function z58(B8,i0,j8){i0>>>=0;var e8=B8.byteLength-i0;if(e8<0)throw RangeError("'offset' is out of bounds");if(j8===void 0)j8=e8;else if(j8>>>=0,j8>e8)throw RangeError("'length' is out of bounds");return pQ0?Buffer.from(B8.slice(i0,i0+j8)):new Buffer(new Uint8Array(B8.slice(i0,i0+j8)))}function W58(B8,i0){if(typeof i0!=="string"||i0==="")i0="utf8";if(!Buffer.isEncoding(i0))throw TypeError('"encoding" must be a valid string encoding');return pQ0?Buffer.from(B8,i0):new Buffer(B8,i0)}function Q58(B8,i0,j8){if(typeof B8==="number")throw TypeError('"value" argument must not be a number');if(Z58(B8))return z58(B8,i0,j8);if(typeof B8==="string")return W58(B8,i0);return pQ0?Buffer.from(B8):new Buffer(B8)}CM0.exports=Q58});var cM0=TD((y58,rQ0)=>{var E58=IM0().SourceMapConsumer,oQ0=$B("path"),ZU;try{if(ZU=$B("fs"),!ZU.existsSync||!ZU.readFileSync)ZU=null}catch(B8){}var D58=xM0();function SM0(B8,i0){return B8.require(i0)}var fM0=!1,hM0=!1,sQ0=!1,lf="auto",ak={},pf={},V58=/^data:application\/json[^,]+base64,/,Vw=[],_w=[];function nQ0(){if(lf==="browser")return!0;if(lf==="node")return!1;return typeof window<"u"&&typeof XMLHttpRequest==="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function _58(){return typeof process==="object"&&process!==null&&typeof process.on==="function"}function H58(){if(typeof process==="object"&&process!==null)return process.version;else return""}function G58(){if(typeof process==="object"&&process!==null)return process.stderr}function B58(B8){if(typeof process==="object"&&process!==null&&typeof process.exit==="function")return process.exit(B8)}function yn(B8){return function(i0){for(var j8=0;j8<B8.length;j8++){var e8=B8[j8](i0);if(e8)return e8}return null}}var iQ0=yn(Vw);Vw.push(function(B8){if(B8=B8.trim(),/^file:/.test(B8))B8=B8.replace(/file:\/\/\/(\w:)?/,function(e8,S1){return S1?"":"/"});if(B8 in ak)return ak[B8];var i0="";try{if(!ZU){var j8=new XMLHttpRequest;if(j8.open("GET",B8,!1),j8.send(null),j8.readyState===4&&j8.status===200)i0=j8.responseText}else if(ZU.existsSync(B8))i0=ZU.readFileSync(B8,"utf8")}catch(e8){}return ak[B8]=i0});function tQ0(B8,i0){if(!B8)return i0;var j8=oQ0.dirname(B8),e8=/^\w+:\/\/[^\/]*/.exec(j8),S1=e8?e8[0]:"",C1=j8.slice(S1.length);if(S1&&/^\/\w\:/.test(C1))return S1+="/",S1+oQ0.resolve(j8.slice(S1.length),i0).replace(/\\/g,"/");return S1+oQ0.resolve(j8.slice(S1.length),i0)}function O58(B8){var i0;if(nQ0())try{var j8=new XMLHttpRequest;j8.open("GET",B8,!1),j8.send(null),i0=j8.readyState===4?j8.responseText:null;var e8=j8.getResponseHeader("SourceMap")||j8.getResponseHeader("X-SourceMap");if(e8)return e8}catch(SX){}i0=iQ0(B8);var S1=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg,C1,QJ;while(QJ=S1.exec(i0))C1=QJ;if(!C1)return null;return C1[1]}var aQ0=yn(_w);_w.push(function(B8){var i0=O58(B8);if(!i0)return null;var j8;if(V58.test(i0)){var e8=i0.slice(i0.indexOf(",")+1);j8=D58(e8,"base64").toString(),i0=B8}else i0=tQ0(B8,i0),j8=iQ0(i0);if(!j8)return null;return{url:i0,map:j8}});function eQ0(B8){var i0=pf[B8.source];if(!i0){var j8=aQ0(B8.source);if(j8){if(i0=pf[B8.source]={url:j8.url,map:new E58(j8.map)},i0.map.sourcesContent)i0.map.sources.forEach(function(S1,C1){var QJ=i0.map.sourcesContent[C1];if(QJ){var SX=tQ0(i0.url,S1);ak[SX]=QJ}})}else i0=pf[B8.source]={url:null,map:null}}if(i0&&i0.map&&typeof i0.map.originalPositionFor==="function"){var e8=i0.map.originalPositionFor(B8);if(e8.source!==null)return e8.source=tQ0(i0.url,e8.source),e8}return B8}function mM0(B8){var i0=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(B8);if(i0){var j8=eQ0({source:i0[2],line:+i0[3],column:i0[4]-1});return"eval at "+i0[1]+" ("+j8.source+":"+j8.line+":"+(j8.column+1)+")"}if(i0=/^eval at ([^(]+) \((.+)\)$/.exec(B8),i0)return"eval at "+i0[1]+" ("+mM0(i0[2])+")";return B8}function U58(){var B8,i0="";if(this.isNative())i0="native";else{if(B8=this.getScriptNameOrSourceURL(),!B8&&this.isEval())i0=this.getEvalOrigin(),i0+=", ";if(B8)i0+=B8;else i0+="<anonymous>";var j8=this.getLineNumber();if(j8!=null){i0+=":"+j8;var e8=this.getColumnNumber();if(e8)i0+=":"+e8}}var S1="",C1=this.getFunctionName(),QJ=!0,SX=this.isConstructor(),AX=!(this.isToplevel()||SX);if(AX){var CX=this.getTypeName();if(CX==="[object Object]")CX="null";var QX=this.getMethodName();if(C1){if(CX&&C1.indexOf(CX)!=0)S1+=CX+".";if(S1+=C1,QX&&C1.indexOf("."+QX)!=C1.length-QX.length-1)S1+=" [as "+QX+"]"}else S1+=CX+"."+(QX||"<anonymous>")}else if(SX)S1+="new "+(C1||"<anonymous>");else if(C1)S1+=C1;else S1+=i0,QJ=!1;if(QJ)S1+=" ("+i0+")";return S1}function dM0(B8){var i0={};return Object.getOwnPropertyNames(Object.getPrototypeOf(B8)).forEach(function(j8){i0[j8]=/^(?:is|get)/.test(j8)?function(){return B8[j8].call(B8)}:B8[j8]}),i0.toString=U58,i0}function uM0(B8,i0){if(i0===void 0)i0={nextPosition:null,curPosition:null};if(B8.isNative())return i0.curPosition=null,B8;var j8=B8.getFileName()||B8.getScriptNameOrSourceURL();if(j8){var e8=B8.getLineNumber(),S1=B8.getColumnNumber()-1,C1=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/,QJ=C1.test(H58())?0:62;if(e8===1&&S1>QJ&&!nQ0()&&!B8.isEval())S1-=QJ;var SX=eQ0({source:j8,line:e8,column:S1});i0.curPosition=SX,B8=dM0(B8);var AX=B8.getFunctionName;return B8.getFunctionName=function(){if(i0.nextPosition==null)return AX();return i0.nextPosition.name||AX()},B8.getFileName=function(){return SX.source},B8.getLineNumber=function(){return SX.line},B8.getColumnNumber=function(){return SX.column+1},B8.getScriptNameOrSourceURL=function(){return SX.source},B8}var CX=B8.isEval()&&B8.getEvalOrigin();if(CX)return CX=mM0(CX),B8=dM0(B8),B8.getEvalOrigin=function(){return CX},B8;return B8}function T58(B8,i0){if(sQ0)ak={},pf={};var j8=B8.name||"Error",e8=B8.message||"",S1=j8+": "+e8,C1={nextPosition:null,curPosition:null},QJ=[];for(var SX=i0.length-1;SX>=0;SX--)QJ.push(`
|
|
3
3
|
at `+uM0(i0[SX],C1)),C1.nextPosition=C1.curPosition;return C1.curPosition=C1.nextPosition=null,S1+QJ.reverse().join("")}function gM0(B8){var i0=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(B8.stack);if(i0){var j8=i0[1],e8=+i0[2],S1=+i0[3],C1=ak[j8];if(!C1&&ZU&&ZU.existsSync(j8))try{C1=ZU.readFileSync(j8,"utf8")}catch(SX){C1=""}if(C1){var QJ=C1.split(/(?:\r\n|\r|\n)/)[e8-1];if(QJ)return j8+":"+e8+`
|
|
4
4
|
`+QJ+`
|
|
5
5
|
`+Array(S1).join(" ")+"^"}}return null}function q58(B8){var i0=gM0(B8),j8=G58();if(j8&&j8._handle&&j8._handle.setBlocking)j8._handle.setBlocking(!0);if(i0)console.error(),console.error(i0);console.error(B8.stack),B58(1)}function b58(){var B8=process.emit;process.emit=function(i0){if(i0==="uncaughtException"){var j8=arguments[1]&&arguments[1].stack,e8=this.listeners(i0).length>0;if(j8&&!e8)return q58(arguments[1])}return B8.apply(this,arguments)}}var w58=Vw.slice(0),F58=_w.slice(0);y58.wrapCallSite=uM0;y58.getErrorSource=gM0;y58.mapSourcePosition=eQ0;y58.retrieveSourceMap=aQ0;y58.install=function(B8){if(B8=B8||{},B8.environment){if(lf=B8.environment,["node","browser","auto"].indexOf(lf)===-1)throw Error("environment "+lf+" was unknown. Available options are {auto, browser, node}")}if(B8.retrieveFile){if(B8.overrideRetrieveFile)Vw.length=0;Vw.unshift(B8.retrieveFile)}if(B8.retrieveSourceMap){if(B8.overrideRetrieveSourceMap)_w.length=0;_w.unshift(B8.retrieveSourceMap)}if(B8.hookRequire&&!nQ0()){var i0=SM0(rQ0,"module"),j8=i0.prototype._compile;if(!j8.__sourceMapSupport)i0.prototype._compile=function(C1,QJ){return ak[QJ]=C1,pf[QJ]=void 0,j8.call(this,C1,QJ)},i0.prototype._compile.__sourceMapSupport=!0}if(!sQ0)sQ0="emptyCacheBetweenOperations"in B8?B8.emptyCacheBetweenOperations:!1;if(!fM0)fM0=!0,Error.prepareStackTrace=T58;if(!hM0){var e8="handleUncaughtExceptions"in B8?B8.handleUncaughtExceptions:!0;try{var S1=SM0(rQ0,"worker_threads");if(S1.isMainThread===!1)e8=!1}catch(C1){}if(e8&&_58())hM0=!0,b58()}};y58.resetRetrieveHandlers=function(){Vw.length=0,_w.length=0,Vw=w58.slice(0),_w=F58.slice(0),aQ0=yn(_w),iQ0=yn(Vw)}});var N58=TD((c58,kn)=>{var __dirname="/home/runner/work/dtsx/dtsx/node_modules/typescript/lib",__filename="/home/runner/work/dtsx/dtsx/node_modules/typescript/lib/typescript.js";/*! *****************************************************************************
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Q as a,R as b,S as c,T as d,U as e,V as f,W as g,X as h,Y as i}from"./chunk-
|
|
2
|
+
import{Q as a,R as b,S as c,T as d,U as e,V as f,W as g,X as h,Y as i}from"./chunk-te9r0j9z.js";import"./chunk-94h87sgb.js";import"./chunk-ns3hznyf.js";export{e as getGraphSummary,d as formatCircularAnalysis,f as findAllDependents,g as findAllDependencies,i as exportGraphAsJson,h as exportGraphAsDot,b as detectCircularDependencies,a as buildDependencyGraph,c as analyzeCircularDependencies};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{hc as D}from"./chunk-
|
|
2
|
+
import{hc as D}from"./chunk-94h87sgb.js";import{kc as p,lc as Jq,mc as Oq}from"./chunk-50hbgzrj.js";import{Ec as wq}from"./chunk-sv136qag.js";import{ad as E}from"./chunk-ns3hznyf.js";var z=E(D(),1);var I=E(D(),1);var A=new Map,S=new Map,Gq=100;function _q(){if(A.size<=Gq)return;let q=null,$=1/0;for(let[W,Q]of A)if(Q.lastAccess<$)$=Q.lastAccess,q=W;if(q)A.delete(q)}function jq(){A.clear()}function Bq(){return A.size}var Uq={asyncThreshold:1e5,chunkSize:50000,yieldInterval:0};function u(q){return new Promise(($)=>{if(q===0)if(typeof setImmediate<"u")setImmediate($);else setTimeout($,0);else setTimeout($,q)})}async function zq(q,$,W){if($.length<W.asyncThreshold)return I.createSourceFile(q,$,I.ScriptTarget.Latest,!0,I.ScriptKind.TS);await u(W.yieldInterval);let Q=I.createSourceFile(q,$,I.ScriptTarget.Latest,!1,I.ScriptKind.TS);return await u(W.yieldInterval),Q}async function g(q,$,W={}){let Q={...Uq,...W},V=p($),j=q,U=Date.now(),X=A.get(j);if(X&&X.contentHash===V)return X.lastAccess=U,X.sourceFile;let Z=S.get(j);if(Z)return Z;let w=(async()=>{try{let H=await zq(q,$,Q);return A.set(j,{sourceFile:H,contentHash:V,lastAccess:U}),_q(),H}finally{S.delete(j)}})();return S.set(j,w),w}async function Lq(q,$={}){let W=$.concurrency??4,Q=new Map,V=[];for(let j=0;j<q.length;j+=W){let U=q.slice(j,j+W),X=await Promise.allSettled(U.map(async({filePath:Z,sourceCode:w})=>{let H=await g(Z,w,$);return{filePath:Z,sourceFile:H}}));for(let Z of X)if(Z.status==="fulfilled")Q.set(Z.value.filePath,Z.value.sourceFile);else V.push({filePath:U[X.indexOf(Z)].filePath,error:Z.reason});if(j+W<q.length)await u(0)}if(V.length>0)console.warn(`[dtsx] ${V.length} file(s) failed to parse:`,V.map((j)=>j.filePath));return Q}function Iq(q,$={}){let W=$.asyncThreshold??Uq.asyncThreshold;return q.length>=W}function vq(){return S.size}var R=E(D(),1);var Y=E(D(),1);var B=E(D(),1);function M(q,$,W){return $.slice(W?q.getStart(W):q.getStart(),q.getEnd())}function L(q,$){let W=[],Q=q.getFullStart(),V=q.getStart($);if(Q!==V){let j=$.text.substring(Q,V),U=j.match(/\/\*\*[\s\S]*?\*\//g);if(U)W.push(...U);let X=j.match(/\/\*(?!\*)[\s\S]*?\*\//g);if(X)W.push(...X);let Z=j.split(`
|
|
3
3
|
`),w=[];for(let H=Z.length-1;H>=0;H--){let O=Z[H].trim();if(O.startsWith("//"))w.unshift(O);else if(O==="")continue;else break}if(w.length>0)W.push(w.join(`
|
|
4
4
|
`))}return W}function P(q,$){if(B.isObjectBindingPattern(q.name)){let W=q.name.elements.map((Q)=>{if(B.isBindingElement(Q)&&B.isIdentifier(Q.name))return Q.name.getText($);return""}).filter(Boolean);if(W.length>3)return`{
|
|
5
5
|
${W.join(`,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{A as b,B as c,C as d,D as e,E as f,F as g,G as h,H as i,z as a}from"./chunk-
|
|
2
|
+
import{A as b,B as c,C as d,D as e,E as f,F as g,G as h,H as i,z as a}from"./chunk-mrk48ejm.js";import"./chunk-94h87sgb.js";import"./chunk-ns3hznyf.js";export{i as validateGeneratedDeclarations,c as validateDeclarations,h as typeCheckWithConfig,b as typeCheck,a as loadCompilerOptions,e as getTypeAtPosition,f as getQuickInfo,g as formatTypeCheckResults,d as checkIsolatedDeclarations};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$b as G,Ab as e,Bb as g,Cb as h,Db as i,Eb as j,Fb as k,Gb as l,Hb as m,Ib as n,Jb as o,Kb as p,Lb as q,Mb as r,Nb as s,Ob as t,Pb as u,Qb as v,Rb as w,Sb as x,Tb as y,Ub as z,Vb as A,Wb as B,Xb as C,Yb as D,Zb as E,_b as F,ac as H,bc as I,cc as J,dc as K,ec as L,fc as M,gc as N,wb as a,xb as b,yb as c,zb as d}from"./chunk-
|
|
2
|
+
import{$b as G,Ab as e,Bb as g,Cb as h,Db as i,Eb as j,Fb as k,Gb as l,Hb as m,Ib as n,Jb as o,Kb as p,Lb as q,Mb as r,Nb as s,Ob as t,Pb as u,Qb as v,Rb as w,Sb as x,Tb as y,Ub as z,Vb as A,Wb as B,Xb as C,Yb as D,Zb as E,_b as F,ac as H,bc as I,cc as J,dc as K,ec as L,fc as M,gc as N,wb as a,xb as b,yb as c,zb as d}from"./chunk-b0bkjk0p.js";import"./chunk-94h87sgb.js";import"./chunk-50hbgzrj.js";import"./chunk-2vw7w2j4.js";import{Nc as f}from"./chunk-sv136qag.js";import"./chunk-ns3hznyf.js";export{d as shouldUseAsyncParsing,m as shouldIncludeNonExportedInterface,l as shouldIncludeNonExportedFunction,n as isBuiltInType,j as hasExportModifier,k as hasAsyncModifier,a as getSourceFileCacheSize,b as getSourceFileAsync,e as getPendingParseCount,i as getParameterName,g as getNodeText,s as getInterfaceBody,I as findReferencedTypes,C as extractVariableStatement,o as extractTypesFromModuleText,E as extractTypeAliasDeclaration,f as extractTripleSlashDirectives,J as extractReferencedTypeDeclarations,H as extractModuleDeclaration,h as extractJSDocComments,D as extractInterfaceDeclaration,y as extractImportDeclaration,B as extractFunctionDeclaration,z as extractExportDeclaration,A as extractExportAssignment,G as extractEnumDeclaration,M as extractDeclarationsAsync,L as extractDeclarations,F as extractClassDeclaration,K as clearSourceFileCache,q as buildVariableDeclaration,t as buildTypeDeclaration,w as buildModuleDeclaration,x as buildModuleBody,r as buildInterfaceDeclaration,p as buildFunctionSignature,u as buildClassDeclaration,v as buildClassBody,c as batchParseSourceFiles,N as batchExtractDeclarations};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ac as v,Bc as w,oc as j,pc as k,qc as l,rc as m,sc as n,tc as o,uc as p,vc as q,wc as r,xc as s,yc as t,zc as u}from"./chunk-
|
|
2
|
+
import{Ac as v,Bc as w,oc as j,pc as k,qc as l,rc as m,sc as n,tc as o,uc as p,vc as q,wc as r,xc as s,yc as t,zc as u}from"./chunk-pdvve1gm.js";import{Ec as a,Fc as b,Gc as c,Hc as d,Ic as e,Jc as f,Kc as g,Lc as h,Mc as i}from"./chunk-sv136qag.js";import"./chunk-ns3hznyf.js";export{l as processVariableDeclaration,n as processTypeDeclaration,s as processModuleDeclaration,m as processInterfaceDeclaration,q as processImportDeclaration,k as processFunctionDeclaration,r as processExportDeclaration,p as processEnumDeclaration,w as processDeclarations,o as processClassDeclaration,u as parseImportStatement,d as parseArrayElements,h as isGenericType,e as inferObjectType,b as inferNarrowTypeInUnion,a as inferNarrowType,g as inferFunctionType,c as inferArrayType,j as formatComments,f as findMatchingBracket,i as extractSatisfiesType,v as extractAllImportedItems,t as clearProcessorCaches};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ec as K}from"./chunk-
|
|
2
|
+
import{ec as K}from"./chunk-b0bkjk0p.js";import{Vc as _}from"./chunk-57agx6g8.js";import{existsSync as j,mkdirSync as w,readFileSync as b,writeFileSync as V}from"fs";import{basename as H,join as R}from"path";function N(q){let z={description:"",params:[],examples:[],tags:{},see:[],throws:[]};if(!q||q.length===0)return z;for(let A of q){let G=A.replace(/^\/\*\*/,"").replace(/\*\/$/,"").split(`
|
|
3
3
|
`).map((X)=>X.replace(/^\s*\*\s?/,"")).join(`
|
|
4
4
|
`).trim(),Q=G.search(/@\w+/);if(Q===-1){z.description=G;continue}else if(Q>0)z.description=G.slice(0,Q).trim(),G=G.slice(Q);let U=/@(\w+)(?:\s+\{([^}]+)\})?\s*([^\n@]*(?:\n(?!@)[^\n@]*)*)/g,W;while((W=U.exec(G))!==null){let[,X,Y,Z]=W,$=Z.trim();switch(X){case"param":{let v=$.match(/^(\[)?(\w+)\]?\s*(?:-\s*)?(.*)/);if(v)z.params.push({name:v[2],type:Y,description:v[3].trim(),optional:!!v[1]});break}case"returns":case"return":z.returns={type:Y,description:$};break;case"example":z.examples.push($);break;case"deprecated":z.deprecated=$||"Deprecated";break;case"since":z.since=$;break;case"see":z.see.push($);break;case"throws":case"throw":z.throws.push({type:Y,description:$});break;case"category":z.category=$;break;default:if(!z.tags[X])z.tags[X]=[];z.tags[X].push($)}}}return z}function M(q,z){let A=N(q.leadingComments),G="";switch(q.kind){case"function":G=h(q);break;case"variable":G=T(q);break;case"interface":G=F(q);break;case"type":G=S(q);break;case"class":G=k(q);break;case"enum":G=x(q);break;default:G=q.text||q.name}let Q={name:q.name,kind:q.kind,signature:G,jsdoc:A,isExported:q.isExported,isDefault:q.isDefault,sourceFile:z};if(q.members&&q.members.length>0)Q.members=q.members.map((U)=>M(U,z));return Q}function h(q){let z=[];if(q.isExported)z.push("export");if(q.isDefault)z.push("default");if(z.push("function"),z.push(q.name),q.generics)z.push(q.generics);if(q.parameters){let A=q.parameters.map((G)=>{let Q="";if(G.rest)Q+="...";if(Q+=G.name,G.optional)Q+="?";if(G.type)Q+=`: ${G.type}`;return Q}).join(", ");z.push(`(${A})`)}else z.push("()");if(q.returnType)z.push(`: ${q.returnType}`);return z.join(" ").replace(/\s+/g," ")}function T(q){let z=[];if(q.isExported)z.push("export");if(z.push("const"),z.push(q.name),q.typeAnnotation)z.push(`: ${q.typeAnnotation}`);return z.join(" ")}function F(q){let z=[];if(q.isExported)z.push("export");if(z.push("interface"),z.push(q.name),q.generics)z.push(q.generics);if(q.extends)z.push(`extends ${q.extends}`);return z.join(" ")}function S(q){let z=[];if(q.isExported)z.push("export");if(z.push("type"),z.push(q.name),q.generics)z.push(q.generics);if(z.push("="),q.typeAnnotation)z.push(q.typeAnnotation);return z.join(" ")}function k(q){let z=[];if(q.isExported)z.push("export");if(q.isDefault)z.push("default");if(z.push("class"),z.push(q.name),q.generics)z.push(q.generics);if(q.extends)z.push(`extends ${q.extends}`);if(q.implements&&q.implements.length>0)z.push(`implements ${q.implements.join(", ")}`);return z.join(" ")}function x(q){let z=[];if(q.isExported)z.push("export");return z.push("enum"),z.push(q.name),z.join(" ")}async function P(q,z={}){let A=[],G=new Map;for(let Q of q){if(!j(Q)){_.warn(`File not found: ${Q}`);continue}let U=b(Q,"utf-8"),W=K(U,Q,!0);for(let X of W){if(X.kind==="import")continue;if(!z.includePrivate&&X.name.startsWith("_"))continue;if(!z.includeInternal&&X.leadingComments?.some((Z)=>Z.includes("@internal")))continue;let Y=M(X,Q);if(A.push(Y),z.groupByCategory&&Y.jsdoc.category){let Z=Y.jsdoc.category;if(!G.has(Z))G.set(Z,[]);G.get(Z).push(Y)}}}return{title:z.title||"API Documentation",description:z.description,entries:A,categories:G,generatedAt:new Date}}function B(q,z={}){let A=[];if(A.push(`# ${q.title}`),A.push(""),q.description)A.push(q.description),A.push("");if(A.push(`> Generated on ${q.generatedAt.toISOString()}`),A.push(""),A.push("## Table of Contents"),A.push(""),z.groupByCategory&&q.categories.size>0)for(let G of q.categories.keys())A.push(`- [${G}](#${E(G)})`);else{let G=I(q.entries);for(let[Q,U]of G)if(U.length>0)A.push(`- [${O(Q)}](#${E(O(Q))})`)}if(A.push(""),z.groupByCategory&&q.categories.size>0)for(let[G,Q]of q.categories){A.push(`## ${G}`),A.push("");for(let U of Q)A.push(...L(U,z))}else{let G=I(q.entries);for(let[Q,U]of G)if(U.length>0){A.push(`## ${O(Q)}`),A.push("");for(let W of U)A.push(...L(W,z))}}return A.join(`
|
|
5
5
|
`)}function L(q,z){let A=[];if(A.push(`### ${q.name}`),A.push(""),q.jsdoc.deprecated)A.push(`> **Deprecated:** ${q.jsdoc.deprecated}`),A.push("");if(A.push("```typescript"),A.push(q.signature),A.push("```"),A.push(""),q.jsdoc.description)A.push(q.jsdoc.description),A.push("");if(q.jsdoc.params.length>0){A.push("**Parameters:**"),A.push(""),A.push("| Name | Type | Description |"),A.push("|------|------|-------------|");for(let G of q.jsdoc.params){let Q=G.optional?" (optional)":"",U=G.type||"any";A.push(`| \`${G.name}\`${Q} | \`${U}\` | ${G.description} |`)}A.push("")}if(q.jsdoc.returns){A.push("**Returns:**"),A.push("");let G=q.jsdoc.returns.type?`\`${q.jsdoc.returns.type}\``:"";A.push(`${G} ${q.jsdoc.returns.description}`),A.push("")}if(q.jsdoc.throws.length>0){A.push("**Throws:**"),A.push("");for(let G of q.jsdoc.throws){let Q=G.type?`\`${G.type}\``:"";A.push(`- ${Q} ${G.description}`)}A.push("")}if(q.jsdoc.examples.length>0){A.push("**Examples:**"),A.push("");for(let G of q.jsdoc.examples)A.push("```typescript"),A.push(G),A.push("```"),A.push("")}if(q.jsdoc.see.length>0){A.push("**See also:**"),A.push("");for(let G of q.jsdoc.see)A.push(`- ${G}`);A.push("")}if(q.jsdoc.since)A.push(`*Since: ${q.jsdoc.since}*`),A.push("");if(z.includeSourceLinks&&q.sourceFile){let G=q.sourceFile;if(z.sourceBaseUrl)A.push(`[Source](${z.sourceBaseUrl}/${G})`);else A.push(`*Source: ${G}*`);A.push("")}if(q.members&&q.members.length>0){A.push("**Members:**"),A.push("");for(let G of q.members)if(A.push(`#### ${G.name}`),A.push(""),A.push("```typescript"),A.push(G.signature),A.push("```"),A.push(""),G.jsdoc.description)A.push(G.jsdoc.description),A.push("")}return A.push("---"),A.push(""),A}function C(q,z={}){let A=B(q,z);return`<!DOCTYPE html>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h}from"./chunk-emwe4zbk.js";import"./chunk-b0bkjk0p.js";import"./chunk-94h87sgb.js";import"./chunk-50hbgzrj.js";import"./chunk-2vw7w2j4.js";import"./chunk-sv136qag.js";import"./chunk-57agx6g8.js";import"./chunk-ns3hznyf.js";export{a as parseJSDoc,f as generateTypeDocJSON,c as generateMarkdown,e as generateJSON,d as generateHTML,g as generateDocs,b as extractDocumentation,h as createDocsGenerator};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{tb as C}from"./chunk-
|
|
2
|
+
import{tb as C}from"./chunk-jfk0hw36.js";function y(F={}){let{onStart:H=!1,onEnd:I=!0,onGenerated:J,onError:z,...q}=F,B=async()=>{try{let k=await C(q);J?.(k)}catch(k){let j=k instanceof Error?k:Error(String(k));if(z?.(j),!z)console.error("[dtsx] Generation failed:",j.message)}};return{name:"dtsx",setup(k){let j=k.initialOptions;if(!q.entrypoints&&j.entryPoints)if(Array.isArray(j.entryPoints))q.entrypoints=j.entryPoints;else q.entrypoints=Object.values(j.entryPoints);if(!q.outdir){if(j.outdir)q.outdir=j.outdir;else if(j.outfile){let w=j.outfile.lastIndexOf("/");if(w!==-1)q.outdir=j.outfile.substring(0,w)}}if(H)k.onStart(async()=>{await B()});if(I)k.onEnd(async(w)=>{if(w.errors.length===0)await B()})}}}var L=y,M=y,P=y;
|
|
3
3
|
export{y as ia,L as ja,M as ka,P as la};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{tb as I}from"./chunk-
|
|
2
|
+
import{tb as I}from"./chunk-jfk0hw36.js";function z(J={}){let{onBuildStart:K=!1,onBuildEnd:L=!0,onGenerated:M,onError:C,...N}=J,w,q,F=async()=>{let j={...N};if(!j.outdir&&w)j.outdir=w;if(!j.entrypoints&&q)j.entrypoints=q;try{let k=await I(j);M?.(k)}catch(k){let H=k instanceof Error?k:Error(String(k));if(C?.(H),!C)console.error("[dtsx] Generation failed:",H.message)}};return{name:"dtsx",esbuildOptions(j){if(j.outdir&&typeof j.outdir==="string")w=j.outdir;if(j.entryPoints){if(Array.isArray(j.entryPoints))q=j.entryPoints;else if(typeof j.entryPoints==="object")q=Object.values(j.entryPoints)}},async buildStart(){if(K)await F()},async buildEnd(j){if(L)await F()}}}var R=z,T=z,V=z;
|
|
3
3
|
export{z as ma,R as na,T as oa,V as pa};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$ as c,Z as a,_ as b,aa as d,ba as e}from"./chunk-6qv7p9sg.js";import"./chunk-57agx6g8.js";import"./chunk-
|
|
2
|
+
import{$ as c,Z as a,_ as b,aa as d,ba as e}from"./chunk-6qv7p9sg.js";import"./chunk-57agx6g8.js";import"./chunk-ns3hznyf.js";export{c as parallelProcess,b as createWorkerPool,e as calculateOptimalBatchSize,d as batchFiles,a as WorkerPool};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ec as u}from"./chunk-
|
|
2
|
+
import{ec as u}from"./chunk-b0bkjk0p.js";import{hc as TY}from"./chunk-94h87sgb.js";import{kc as XJ}from"./chunk-50hbgzrj.js";import{Bc as gJ}from"./chunk-pdvve1gm.js";import{Tc as m}from"./chunk-365avtde.js";import{Vc as W,Xc as n}from"./chunk-57agx6g8.js";import{ad as kY,cd as BJ}from"./chunk-ns3hznyf.js";var{Glob:pJ}=globalThis.Bun;import{mkdir as i}from"fs/promises";import{availableParallelism as FY}from"os";import{dirname as g,relative as S,resolve as y}from"path";import{existsSync as YJ,mkdirSync as sJ,readFileSync as aJ,writeFileSync as iJ}from"fs";import{dirname as nJ,relative as oJ,resolve as rJ}from"path";async function KJ(J,Y,$){let X=new Map,Z=[],Q=new Set,U=0,z=0,H=0;for(let q of J){let G=Y.get(q);if(!G)continue;let O=u(G,q,$.keepComments);U+=O.length;for(let V of O)if(V.kind==="import"){z++;let K=V.source||"";if(K.startsWith("."))continue;if(!X.has(K))X.set(K,{source:K,specifiers:new Map,isTypeOnly:V.isTypeOnly||!1,isSideEffect:V.isSideEffect||!1});let B=X.get(K);if(V.specifiers)for(let k of V.specifiers){let T=k.alias||k.name;if(!B.specifiers.has(T))B.specifiers.set(T,{name:k.name,alias:k.alias,isType:k.isType||!1})}if(!V.isTypeOnly)B.isTypeOnly=!1}else if(V.isExported||V.kind==="export"){if(H++,V.name&&Q.has(V.name))continue;if(V.name)Q.add(V.name);Z.push({declaration:V,file:q})}}let j=[];j.push("/**"),j.push(" * Bundled TypeScript declarations"),j.push(` * Generated from ${J.length} source files`),j.push(" */"),j.push("");let _=Array.from(X.values()).sort((q,G)=>{let O=$.importOrder||["bun"],V=O.findIndex((B)=>q.source.startsWith(B)),K=O.findIndex((B)=>G.source.startsWith(B));if(V!==-1&&K!==-1)return V-K;if(V!==-1)return-1;if(K!==-1)return 1;return q.source.localeCompare(G.source)});for(let q of _)if(q.isSideEffect)j.push(`import '${q.source}';`);else if(q.specifiers.size>0){let O=Array.from(q.specifiers.values()).map((K)=>{let B=K.isType?"type ":"";return K.alias?`${B}${K.name} as ${K.alias}`:`${B}${K.name}`}),V=q.isTypeOnly?"type ":"";j.push(`import ${V}{ ${O.join(", ")} } from '${q.source}';`)}if(_.length>0)j.push("");let A=new Map;for(let{declaration:q,file:G}of Z){if(!A.has(G))A.set(G,[]);A.get(G).push(q)}for(let[q,G]of A){let O=oJ($.cwd,q);j.push(`// From: ${O}`);for(let V of G){if($.keepComments&&V.leadingComments)for(let K of V.leadingComments)j.push(K);j.push(OJ(V))}j.push("")}let R=j.join(`
|
|
3
3
|
`);return{content:R,files:J,declarationCount:U,importCount:z,exportCount:H,size:Buffer.byteLength(R,"utf8"),warnings:[]}}function OJ(J){if(J.text){let $=J.text.trim();if(J.isExported&&!$.startsWith("export"))$=`export ${$}`;if(!$.endsWith(";")&&!$.endsWith("}"))$+=";";return $}let Y=[];if(J.isExported)Y.push("export");if(J.isDefault)Y.push("default");switch(J.kind){case"function":if(Y.push("declare function"),Y.push(J.name),J.generics)Y.push(J.generics);if(Y.push(`(${tJ(J.parameters)})`),J.returnType)Y.push(`: ${J.returnType}`);break;case"variable":if(Y.push("declare const"),Y.push(J.name),J.typeAnnotation)Y.push(`: ${J.typeAnnotation}`);break;case"interface":if(Y.push("interface"),Y.push(J.name),J.generics)Y.push(J.generics);if(J.extends)Y.push(`extends ${J.extends}`);if(Y.push("{"),J.members)for(let $ of J.members)Y.push(` ${$.name}${$.typeAnnotation?`: ${$.typeAnnotation}`:""};`);Y.push("}");break;case"type":if(Y.push("type"),Y.push(J.name),J.generics)Y.push(J.generics);Y.push("="),Y.push(J.typeAnnotation||"unknown");break;case"class":if(Y.push("declare class"),Y.push(J.name),J.generics)Y.push(J.generics);if(J.extends)Y.push(`extends ${J.extends}`);if(J.implements&&J.implements.length>0)Y.push(`implements ${J.implements.join(", ")}`);if(Y.push("{"),J.members)for(let $ of J.members)Y.push(` ${OJ($)}`);Y.push("}");break;case"enum":if(Y.push("declare enum"),Y.push(J.name),Y.push("{"),J.members){let $=J.members.map((X)=>X.value!==void 0?`${X.name} = ${X.value}`:X.name);Y.push(` ${$.join(`,
|
|
4
4
|
`)}`)}Y.push("}");break;default:return J.text||""}return Y.join(" ")}function tJ(J){if(!J||J.length===0)return"";return J.map((Y)=>{let $="";if(Y.rest)$+="...";if($+=Y.name,Y.optional)$+="?";if(Y.type)$+=`: ${Y.type}`;if(Y.defaultValue)$+=` = ${Y.defaultValue}`;return $}).join(", ")}async function AJ(J,Y={}){let $=[],X=new Map,Z=[],Q=[],U=new Set,z=0,H=0,j=0;for(let q of J){if(!YJ(q)){$.push(`File not found: ${q}`);continue}let G=aJ(q,"utf-8");Q.push(q);let O=G.split(`
|
|
5
5
|
`),V=[],K=0,B=!1;for(let k of O){let T=k.trim();if(!T&&!B)continue;if(T.startsWith("import ")){H++;let M=T.match(/import\s+(type\s+)?(?:\{([^}]+)\}|(\w+)|\*\s+as\s+(\w+))\s+from\s+['"]([^'"]+)['"]/);if(M){let[,N,L,D,GJ,F]=M;if(Y.externals?.some((o)=>F.startsWith(o))){Z.push(T);continue}if(F.startsWith("."))continue;if(!X.has(F))X.set(F,{source:F,specifiers:new Map,isTypeOnly:!!N,isSideEffect:!1});let HJ=X.get(F);if(L){let o=L.split(",").map((r)=>r.trim());for(let r of o){let[t,e]=r.split(/\s+as\s+/).map((lJ)=>lJ.trim()),WJ=t.startsWith("type "),JJ=WJ?t.replace("type ",""):t;HJ.specifiers.set(e||JJ,{name:JJ,alias:e!==JJ?e:void 0,isType:WJ})}}if(!N)HJ.isTypeOnly=!1}continue}if(/^(export\s+)?(declare\s+)?(interface|type|class|function|const|let|var|enum|namespace|module)\s/.test(T)){if(B=!0,V=[k],K=(k.match(/\{/g)||[]).length-(k.match(/\}/g)||[]).length,K===0&&(T.endsWith(";")||!T.includes("{"))){let M=p(T);if(!U.has(M)||!Y.mergeDuplicates){if(U.add(M),Z.push(k),z++,T.startsWith("export"))j++}B=!1,V=[]}}else if(B){if(V.push(k),K+=(k.match(/\{/g)||[]).length-(k.match(/\}/g)||[]).length,K<=0){let M=V.join(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{hc as y}from"./chunk-
|
|
2
|
+
import{hc as y}from"./chunk-94h87sgb.js";import{ad as k}from"./chunk-ns3hznyf.js";var H=k(y(),1);import{dirname as C,resolve as F}from"path";function v(q,j){let B=H.default.readConfigFile(q,H.default.sys.readFile);if(B.error)throw Error(`Error reading tsconfig.json: ${b(B.error)}`);let J=H.default.parseJsonConfigFileContent(B.config,H.default.sys,C(q));if(J.errors.length>0){let I=J.errors.map(b).join(`
|
|
3
3
|
`);throw Error(`Error parsing tsconfig.json:
|
|
4
4
|
${I}`)}return{...J.options,...j}}function b(q){if(q.file&&q.start!==void 0){let{line:j,character:B}=q.file.getLineAndCharacterOfPosition(q.start),J=H.default.flattenDiagnosticMessageText(q.messageText,`
|
|
5
5
|
`);return`${q.file.fileName}(${j+1},${B+1}): ${J}`}return H.default.flattenDiagnosticMessageText(q.messageText,`
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{l as a,m as b,n as c,o as d,p as e,q as f,r as g}from"./chunk-nfeqwqca.js";import"./chunk-jfk0hw36.js";import"./chunk-b0bkjk0p.js";import"./chunk-94h87sgb.js";import"./chunk-6jpqpjkc.js";import"./chunk-50hbgzrj.js";import"./chunk-2vw7w2j4.js";import"./chunk-pdvve1gm.js";import"./chunk-sv136qag.js";import"./chunk-365avtde.js";import"./chunk-57agx6g8.js";import"./chunk-ns3hznyf.js";export{b as sortProjectsByDependencies,f as resolveWorkspacePatterns,c as generateWorkspace,d as generateMonorepo,g as generateFromPackageWorkspaces,a as discoverWorkspaceProjects,e as discoverWorkspaceFromPackageJson};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Oc as a,Pc as b,Qc as c,Rc as d,Sc as e,Tc as f}from"./chunk-
|
|
2
|
+
import{Oc as a,Pc as b,Qc as c,Rc as d,Sc as e,Tc as f}from"./chunk-365avtde.js";import"./chunk-57agx6g8.js";import"./chunk-ns3hznyf.js";export{c as resetConfig,b as getConfig,e as defineConfigAsync,d as defineConfig,a as defaultConfig,f as config};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{tb as y}from"./chunk-
|
|
2
|
+
import{tb as y}from"./chunk-jfk0hw36.js";import{Vc as H,Xc as F}from"./chunk-57agx6g8.js";import{cd as R}from"./chunk-ns3hznyf.js";import{existsSync as V,readFileSync as G}from"fs";import{dirname as M,join as X,resolve as x}from"path";async function S(E){let A=[],z=new Set;async function q(I,L){let w=x(I);if(z.has(w))return;if(z.add(w),!V(w)){H.warn(`tsconfig not found: ${w}`);return}try{let O=G(w,"utf-8").replace(/\/\*[\s\S]*?\*\/|\/\/.*/g,""),K=JSON.parse(O),U=M(w),Y=B(U,L),W=[];if(K.references)for(let D of K.references){let $=x(U,D.path),J=V(X($,"tsconfig.json"))?X($,"tsconfig.json"):$;await q(J,Y);let b=B(M(J),Y);W.push(b)}let Z="./src";if(K.compilerOptions?.rootDir)Z=K.compilerOptions.rootDir;else if(K.include&&K.include.length>0){if(K.include[0].startsWith("src/"))Z="./src"}let _="./dist";if(K.compilerOptions?.outDir)_=K.compilerOptions.outDir;else if(K.compilerOptions?.declarationDir)_=K.compilerOptions.declarationDir;A.push({name:Y,root:U,tsconfigPath:w,references:W,config:{root:Z,outdir:_}})}catch(Q){let O=Q instanceof Error?Q.message:String(Q);H.warn(`Failed to parse ${w}: ${O}`)}}return await q(E),A}function B(E,A){let z=X(E,"package.json");if(V(z))try{let I=G(z,"utf-8"),L=JSON.parse(I);if(L.name)return L.name}catch{}let q=E.split("/").pop()||"unknown";return A?`${A}/${q}`:q}function N(E){let A=new Map(E.map((w)=>[w.name,w])),z=[],q=new Set,I=new Set;function L(w){if(q.has(w))return;if(I.has(w)){H.warn(`Circular dependency detected involving: ${w}`);return}I.add(w);let Q=A.get(w);if(Q){for(let O of Q.references)L(O);z.push(Q)}I.delete(w),q.add(w)}for(let w of E)L(w.name);return z}async function T(E){let A=Date.now(),z=N(E.projects);H.info(`Generating declarations for ${z.length} projects...`);let q=[],I=!0;for(let O of z){H.info(`
|
|
3
3
|
[${O.name}] Generating...`);try{let K={...E.sharedConfig,...O.config,cwd:O.root,tsconfigPath:O.tsconfigPath},U=await y(K),Y=U.filesFailed===0;if(!Y)I=!1;q.push({name:O.name,stats:U,success:Y}),H.info(`[${O.name}] Generated ${U.filesGenerated} files`)}catch(K){I=!1;let U=K instanceof Error?K.message:String(K);q.push({name:O.name,stats:{filesProcessed:0,filesGenerated:0,filesFailed:0,filesValidated:0,validationErrors:0,declarationsFound:0,importsProcessed:0,exportsProcessed:0,durationMs:0,errors:[]},success:!1,error:U}),H.error(`[${O.name}] Failed: ${U}`)}}let L=Date.now()-A,w=q.filter((O)=>O.success).length,Q=q.length-w;if(H.info(`
|
|
4
4
|
--- Workspace Generation Summary ---`),H.info(`Projects processed: ${q.length}`),H.info(`Successful: ${w}`),Q>0)H.info(`Failed: ${Q}`);return H.info(`Total duration: ${L}ms`),H.info(`------------------------------------
|
|
5
5
|
`),{success:I,projects:q,durationMs:L}}async function f(E,A){if(A?.logLevel)F(A.logLevel);let z=X(E,"tsconfig.json");if(!V(z))throw Error(`Root tsconfig.json not found at: ${z}`);H.info("Discovering workspace projects...");let q=await S(z);if(q.length===0)return H.warn("No projects found in workspace"),{success:!0,projects:[],durationMs:0};return H.info(`Found ${q.length} projects`),T({root:E,projects:q,sharedConfig:A})}async function v(E){let A=X(E,"package.json");if(!V(A))return[];try{let z=G(A,"utf-8"),q=JSON.parse(z),I=[];if(Array.isArray(q.workspaces))I=q.workspaces;else if(q.workspaces?.packages)I=q.workspaces.packages;return I}catch{return[]}}async function C(E,A){let{Glob:z}=awaitPromise.resolve(globalThis.Bun),q=[];for(let I of A){let L=new z(I);for await(let w of L.scan({cwd:E,absolute:!0,onlyFiles:!1})){let Q=X(w,"package.json");if(V(Q))q.push(w)}}return q}async function l(E,A){if(A?.logLevel)F(A.logLevel);let z=await v(E);if(z.length===0)return H.warn("No workspace patterns found in package.json"),{success:!0,projects:[],durationMs:0};H.info(`Found workspace patterns: ${z.join(", ")}`);let q=await C(E,z);if(q.length===0)return H.warn("No projects found matching workspace patterns"),{success:!0,projects:[],durationMs:0};H.info(`Found ${q.length} workspace packages`);let I=q.map((L)=>{let w=X(L,"tsconfig.json");return{name:B(L),root:L,tsconfigPath:V(w)?w:"",references:[]}});return T({root:E,projects:I,sharedConfig:A})}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-ns3hznyf.js";var e="@stacksjs/dtsx",i="module",n="0.9.13",r=!0,c="A modern, fast .d.ts generation tool, powered by Bun.",o="Chris Breuer <chris@stacksjs.org>",u="MIT",d="https://github.com/stacksjs/dtsx#readme",p={type:"git",url:"git+https://github.com/stacksjs/dtsx.git"},a={url:"https://github.com/stacksjs/dtsx/issues"},b=["dts","generation","isolated declarations","development","bun","stacks","typescript","javascript"],g={".":{import:"./dist/index.js"},"./*":{import:"./dist/*"}},l="./dist/index.js",m="./dist/index.d.ts",k={dtsx:"./dist/cli.js"},x=["dist"],h={benchmark:"bun benchmark/index.ts",build:"bun --filter './packages/dtsx' build",test:"bun test",lint:"bunx --bun pickier run . --mode lint --config .config/pickier.ts","lint:fix":"bunx --bun pickier run . --mode lint --fix --config .config/pickier.ts",changelog:"bunx logsmith --verbose","changelog:generate":"bunx logsmith --output CHANGELOG.md",release:"bun --bun run changelog:generate && bunx --bun bumpx prompt --recursive",typecheck:"bunx tsc --noEmit","dev:docs":"bun --bun vitepress dev docs","build:docs":"bun --bun vitepress build docs","preview:docs":"bun --bun vitepress preview docs"},v={"@stacksjs/bumpx":"^0.2.4","@stacksjs/bunpress":"^0.1.1","@stacksjs/clapp":"^0.2.0",pickier:"^0.1.18","@stacksjs/gitlint":"^0.1.5","@stacksjs/logsmith":"^0.2.1","@types/bun":"^1.3.9","@typescript/native-preview":"^7.0.0-dev.20260216.1","buddy-bot":"^0.9.16","bun-git-hooks":"^0.3.1","bun-plugin-dtsx":"workspace:*",mitata:"^1.0.34","oxc-transform":"^0.112.0",typescript:"^5.9.3"},j=["packages/*"],y={name:e,type:i,version:n,private:r,description:c,author:o,license:u,homepage:d,repository:p,bugs:a,keywords:b,exports:g,module:l,types:m,bin:k,files:x,scripts:h,devDependencies:v,workspaces:j};export{j as workspaces,n as version,m as types,i as type,h as scripts,p as repository,r as private,e as name,l as module,u as license,b as keywords,d as homepage,x as files,g as exports,v as devDependencies,c as description,y as default,a as bugs,k as bin,o as author};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var j=Object.create;var{getPrototypeOf:k,defineProperty:i,getOwnPropertyNames:l}=Object;var m=Object.prototype.hasOwnProperty;function n(a){return this[a]}var o,p,q=(a,b,d)=>{var f=a!=null&&typeof a==="object";if(f){var g=b?o??=new WeakMap:p??=new WeakMap,h=g.get(a);if(h)return h}d=a!=null?j(k(a)):{};let c=b||!a||!a.__esModule?i(d,"default",{value:a,enumerable:!0}):d;for(let e of l(a))if(!m.call(c,e))i(c,e,{get:n.bind(a,e),enumerable:!0});if(f)g.set(a,c);return c};var r=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var s=import.meta.require;
|
|
3
|
+
export{q as ad,r as bd,s as cd};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{tb as K}from"./chunk-
|
|
2
|
+
import{tb as K}from"./chunk-jfk0hw36.js";function L(N={}){let{buildStart:P=!0,buildEnd:Q=!1,writeBundle:T=!1,modes:y,onGenerated:U,onError:H,...W}=N,I="production",z=async()=>{try{let q=await K(W);U?.(q)}catch(q){let J=q instanceof Error?q:Error(String(q));if(H?.(J),!H)console.error("[dtsx] Generation failed:",J.message)}},F=()=>{if(!y||y.length===0)return!0;return y.includes(I)};return{name:"dtsx",apply(q){return I=q.mode,!0},async buildStart(){if(P&&F())await z()},async buildEnd(){if(Q&&F())await z()},async writeBundle(){if(T&&F())await z()}}}var Y=L,_=L;
|
|
3
3
|
export{L as ca,Y as da,_ as ea};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Cc as Kz,Dc as Uz,Ec as P,Lc as u,Mc as p,Nc as jz}from"./chunk-
|
|
2
|
+
import{Cc as Kz,Dc as Uz,Ec as P,Lc as u,Mc as p,Nc as jz}from"./chunk-sv136qag.js";function _(z,X=!0){if(!X||!z||z.length===0)return"";if(z.length===1)return z[0].trim()+`
|
|
3
3
|
`;let K="";for(let Z=0;Z<z.length;Z++){if(Z>0)K+=`
|
|
4
4
|
`;K+=z[Z].trim()}return`${K}
|
|
5
5
|
`}function Jz(z){if(z.includes(`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var k=!1,M=null;function p(J){let Y="",X=0;while(X<J.length)if(J.charCodeAt(X)===47&&X+1<J.length&&J.charCodeAt(X+1)===42){X+=2;while(X<J.length-1){if(J.charCodeAt(X)===42&&J.charCodeAt(X+1)===47){X+=2;break}X++}}else Y+=J.charAt(X),X++;return Y.trim()}function t(){k=!0,M=null}function e(){k=!1;let J=M;return M=null,J}function g(J){let Y=J.length;if(Y===0)return!1;let X=0;if(J.charCodeAt(X)===45)X++;if(X>=Y)return!1;let $=X;while(X<Y&&J.charCodeAt(X)>=48&&J.charCodeAt(X)<=57)X++;if(X===$)return!1;if(X<Y&&J.charCodeAt(X)===46){X++;let z=X;while(X<Y&&J.charCodeAt(X)>=48&&J.charCodeAt(X)<=57)X++;if(X===z)return!1}return X===Y}function l(J){for(let Y=0,X=J.length-1;Y<X;Y++){let $=J.charCodeAt(Y);if($<48||$>57)return!1}return!0}function E(J,Y){let X=0,$=0;while(($=J.indexOf(Y,$))!==-1)X++,$+=Y.length;return X}function P(J){let Y=J.length,X=!1;for(let Z=1;Z<Y;Z++)if(J.charCodeAt(Z)<=32&&J.charCodeAt(Z-1)<=32){X=!0;break}if(!X)for(let Z=0;Z<Y;Z++){let H=J.charCodeAt(Z);if(H===10||H===13||H===9){X=!0;break}}if(!X)return J;let $=[],z=-1,B=!1;for(let Z=0;Z<Y;Z++)if(J.charCodeAt(Z)<=32){if(!B){if(z>=0)$.push(J.substring(z,Z));$.push(" "),B=!0,z=-1}}else{if(B||z<0)z=Z;B=!1}if(z>=0)$.push(J.substring(z));return $.join("")}function V(J,Y=!1,X=!1,$=0){if(!J||typeof J!=="string")return"unknown";if($>=20)return"unknown";let z=J.trim();if(z.startsWith("BigInt("))return"bigint";if(z.startsWith("Symbol.for("))return"symbol";if(z.includes(".raw`")||z.includes("String.raw`"))return"string";if(z.startsWith('"')&&z.endsWith('"')||z.startsWith("'")&&z.endsWith("'")||z.startsWith("`")&&z.endsWith("`")){if(!z.includes("${")){if(!Y)return"string";return z}if(Y)return z;return"string"}if(g(z)){if(!Y)return"number";return z}if(z==="true"||z==="false"){if(!Y)return"boolean";return z}if(z==="null")return"null";if(z==="undefined")return"undefined";if(z.startsWith("[")&&z.endsWith("]"))return D(z,Y,$+1);if(z.startsWith("{")&&z.endsWith("}"))return i(z,Y,$+1);if(z.startsWith("new "))return d(z);if(z.includes("=>")||z.startsWith("function")||z.startsWith("async"))return h(z,X,$,Y);if(z.endsWith("as const")){let B=z.slice(0,-8).trim();if(B.startsWith("[")&&B.endsWith("]")){let Z=B.slice(1,-1).trim();if(!Z)return"readonly []";return`readonly [${U(Z).map((j)=>V(j.trim(),!0,!1,$+1)).join(", ")}]`}return V(B,!0,X,$+1)}if(z.startsWith("`")&&z.endsWith("`"))return c(z,Y);if(z.startsWith("Promise."))return y(z,Y,$);if(z.startsWith("await "))return"unknown";if(z.charCodeAt(z.length-1)===110&&z.length>1&&l(z)){if(Y)return z;return"bigint"}if(z.startsWith("Symbol(")||z==="Symbol.for")return"symbol";return"unknown"}function m(J,Y=!1,X=0){return V(J,Y,!0,X)}function c(J,Y){if(J.includes(".raw`")||J.includes("String.raw`"))return"string";if(!Y)return"string";if(!J.includes("${"))return J;return"string"}function d(J){let Y=4;while(Y<J.length&&J.charCodeAt(Y)<=32)Y++;let X=Y,$=J.charCodeAt(Y);if($<65||$>90)return"unknown";while(Y<J.length&&T(J.charCodeAt(Y)))Y++;if(Y===X)return"unknown";let z=J.slice(X,Y);{let B=J.slice(Y);if(B.startsWith("<")){let Z=0,H=-1;for(let G=0;G<B.length;G++)if(B[G]==="<")Z++;else if(B[G]===">"){if(Z--,Z===0){H=G;break}}if(H!==-1){let G=B.slice(0,H+1);return`${z}${G}`}}switch(z){case"Date":return"Date";case"Map":return"Map<any, any>";case"Set":return"Set<any>";case"WeakMap":return"WeakMap<any, any>";case"WeakSet":return"WeakSet<any>";case"RegExp":return"RegExp";case"Error":return"Error";case"Array":return"any[]";case"Object":return"object";case"Function":return"Function";case"Promise":return"Promise<any>";default:return z}}return"unknown"}function y(J,Y,X=0){if(J.startsWith("Promise.resolve(")){let z=J.indexOf(")",16);if(z!==-1){let B=J.slice(16,z).trim();if(B)return`Promise<${V(B,Y,!1,X+1)}>`}return"Promise<unknown>"}if(J.startsWith("Promise.reject("))return"Promise<never>";if(J.startsWith("Promise.all(")){let $=J.indexOf("[",12),z=J.lastIndexOf("]");if($!==-1&&z>$){let B=J.slice($+1,z).trim();return`Promise<[${U(B).map((G)=>{let j=G.trim();if(j.startsWith("Promise.resolve(")){let O=y(j,Y,X+1),Q=O.indexOf("<"),K=O.lastIndexOf(">");return Q!==-1&&K>Q?O.slice(Q+1,K):"unknown"}return V(j,Y,!1,X+1)}).join(", ")}]>`}return"Promise<unknown[]>"}return"Promise<unknown>"}function D(J,Y,X=0){let $=J.slice(1,-1).trim();if(!$)return"never[]";if(X>=20)return"unknown[]";let z=U($),B=!1;for(let Q=0;Q<z.length;Q++){let K=z[Q],F=K.length;while(F>0&&K.charCodeAt(F-1)<=32)F--;if(F>=8&&K.slice(F-8,F)==="as const"){B=!0;break}}if(B)return`readonly [
|
|
3
|
+
${z.map((K)=>{let F=K.trim();if(F.endsWith("as const")){let L=F.slice(0,-8).trim();if(L.startsWith("[")&&L.endsWith("]")){let W=L.slice(1,-1).trim();return`readonly [${U(W).map((R)=>V(R.trim(),!0,!1,X+1)).join(", ")}]`}return V(L,!0,!1,X+1)}if(F.startsWith("[")&&F.endsWith("]"))return D(F,!0,X+1);return V(F,!0,!1,X+1)}).join(` |
|
|
4
|
+
`)}
|
|
5
|
+
]`;let Z=k&&!Y,H=[],G=[];for(let Q of z){let K=Q.trim(),F=M;if(M=null,K.startsWith("[")&&K.endsWith("]"))H.push(D(K,Y,X+1));else H.push(m(K,Y,X+1));if(Z)G.push(M);M=F}if(Z)if(_(J))M=P(J);else{let Q=[];for(let K=0;K<z.length;K++){let F=z[K].trim();if(F.endsWith("as const"))continue;if(w(F)||F==="null"||F==="undefined")Q.push(F);else if(F.startsWith("[")&&_(F))Q.push(P(F));else if(F.startsWith("{")){if(G[K])Q.push(G[K])}else{let L=V(F,!1,!1,0);if(L!=="unknown")Q.push(L)}}if(Q.length>0)M=`[${Q.join(", ")}]`}if(Y)return`readonly [${H.join(", ")}]`;let j=[],O=!0;for(let Q of H){let K=!1;for(let F of j)if(Q===F){K=!0;break}if(!K)j.push(Q);if(O){if(!(g(Q)||Q==="true"||Q==="false"||Q.charCodeAt(0)===34&&Q.charCodeAt(Q.length-1)===34||Q.charCodeAt(0)===39&&Q.charCodeAt(Q.length-1)===39))O=!1}}if(O&&H.length<=10)return`readonly [${H.join(", ")}]`;if(j.length===1)return`${j[0]}[]`;return`(${j.join(" | ")})[]`}function U(J){let Y=[],X=0,$=0,z=!1,B=0;for(let H=0;H<J.length;H++){let G=J.charCodeAt(H);if(!z&&(G===34||G===39||G===96))z=!0,B=G;else if(z&&G===B&&(H===0||J.charCodeAt(H-1)!==92))z=!1;if(!z){if(G===91||G===123||G===40)$++;else if(G===93||G===125||G===41)$--;else if(G===44&&$===0){let j=J.substring(X,H).trim();if(j)Y.push(j);X=H+1;continue}}}let Z=J.substring(X).trim();if(Z)Y.push(Z);return Y}function w(J){if(g(J))return!0;if(J==="true"||J==="false")return!0;if(J.startsWith('"')&&J.endsWith('"')||J.startsWith("'")&&J.endsWith("'"))return!0;return!1}function s(J){return J==="number"||J==="string"||J==="boolean"}function _(J){let Y=!1,X=0,$=J.length;for(let z=0;z<$;z++){let B=J.charCodeAt(z);if(Y){if(B===92){z++;continue}if(B===X)Y=!1;continue}if(B===34||B===39||B===96){Y=!0,X=B;continue}if(B===61&&z+1<$&&J.charCodeAt(z+1)===62)return!1;if(B>=97&&B<=122){let Z=z;while(z<$&&(J.charCodeAt(z)>=97&&J.charCodeAt(z)<=122||J.charCodeAt(z)>=65&&J.charCodeAt(z)<=90||J.charCodeAt(z)>=48&&J.charCodeAt(z)<=57||J.charCodeAt(z)===95||J.charCodeAt(z)===36))z++;let H=J.slice(Z,z);if(H==="new"||H==="async"||H==="await"||H==="function"||H==="yield"||H==="console"||H==="process")return!1;let G=z;while(G<$&&J.charCodeAt(G)<=32)G++;if(G<$&&J.charCodeAt(G)===40)return!1;z--}}return!0}function i(J,Y,X=0){let $=J.slice(1,-1).trim();if(!$)return"{}";if(X>=20)return"Record<string, unknown>";let z=a($),B=[],Z=k&&!Y,H=[];for(let[G,j]of z){let O=M;M=null;let Q=V(j,Y,!1,X+1),K=M;if(M=O,Q.includes("=>")||Q.includes("function")||Q.includes("async"))Q=I(Q);let F=j.trim();if(!Y&&s(Q)&&w(F))B.push(`/** @defaultValue ${F} */
|
|
6
|
+
${G}: ${Q}`);else B.push(`${G}: ${Q}`);if(Z){let L=p(G);if(F.endsWith("as const"));else if(w(F))H.push(`${L}: ${F}`);else if(F.startsWith("[")&&_(F))H.push(`${L}: ${P(F)}`);else if(F.startsWith("{")){if(K)H.push(`${L}: ${K}`)}else if(!F.startsWith("[")&&(F.includes("=>")||F.startsWith("function")||F.startsWith("async"))){let W=h(F,!1,0,!0);H.push(`${L}: ${W}`)}}}if(Z&&H.length>0){let G=X>0?(X-1)/2:0,j=`{ ${H.join(", ")} }`;if(j.length<=80)M=j;else{let O=" ".repeat((G+1)*2),Q=" ".repeat(G*2);M=`{
|
|
7
|
+
${O}${H.join(`,
|
|
8
|
+
${O}`)}
|
|
9
|
+
${Q}}`}}return`{
|
|
10
|
+
${B.join(`;
|
|
11
|
+
`)}
|
|
12
|
+
}`}function I(J){let X=J.split(`
|
|
13
|
+
`).map((O)=>u(O)).join(`
|
|
14
|
+
`),$=X.indexOf("async");if($!==-1){let O=$>0?X.charCodeAt($-1):32,Q=$+5<X.length?X.charCodeAt($+5):32;if(!T(O)&&!T(Q))X=(X.slice(0,$)+X.slice($+5)).trim()}let z=X.indexOf("(");if(z!==-1){let O=x(X,z,"(",")");if(O!==-1){let Q=X.slice(z,O+1),K=b(Q);X=X.slice(0,z)+K+X.slice(O+1)}}let B=X.length,Z="",H=[],G=!1,j=!1;for(let O=0;O<B;O++){let Q=X.charCodeAt(O);if(Q===123||Q===40)H.push(Q);else if(Q===125||Q===41)H.pop();if(Q<=32){if(G=!0,Q===10||Q===13)j=!0;continue}if(G&&Z.length>0){let F=(H.length>0?H[H.length-1]:0)===123;if(j&&F){let L=Z.charCodeAt(Z.length-1),W=L===59||L===44||L===123||Q===125,q=Z.length>=2&&Z.charCodeAt(Z.length-1)===47&&Z.charCodeAt(Z.length-2)===42;if(!W&&!q)Z+="; ";else Z+=" "}else Z+=" "}G=!1,j=!1,Z+=X[O]}return Z.trim()}function T(J){return J>=97&&J<=122||J>=65&&J<=90||J>=48&&J<=57||J===95||J===36}function b(J){let Y=J.trim(),X,$=!1;if(Y.startsWith("(")&&Y.endsWith(")"))X=Y.slice(1,-1),$=!0;else X=Y;let z=X.trim();if(!z)return $?"()":"";let B=!1;{let L=0;for(let W=0;W<z.length;W++){let q=z.charCodeAt(W);if(q===40||q===60||q===91||q===123)L++;else if(q===41||q===62||q===93||q===125)L--;else if(L===0&&q===61){let N=W>0?z.charCodeAt(W-1):0,R=W+1<z.length?z.charCodeAt(W+1):0;if(N!==61&&N!==33&&N!==60&&N!==62&&R!==61&&R!==62){B=!0;break}}}}if(!B)return Y;let Z=[],H=[],G=0,j=0,O=!1,Q=0;for(let L=0;L<=z.length;L++){if(L===z.length){Z.push(z.slice(G));break}let W=z.charCodeAt(L);if(O){if(W===92){L++;continue}if(W===Q)O=!1;continue}if(W===39||W===34||W===96){O=!0,Q=W;continue}if(W===40||W===60||W===91||W===123)j++;else if(W===41||W===62||W===93||W===125)j--;else if(W===44&&j===0){Z.push(z.slice(G,L));let q=",",N=L+1;while(N<z.length&&z.charCodeAt(N)<=32)q+=z[N],N++;H.push(q),G=N}}let K=[];for(let L of Z){let W=L.trim();if(!W){K.push(L);continue}if(W.startsWith("//"))continue;let q=u(W),N=L.slice(0,L.length-L.trimStart().length);K.push(N+n(q))}let F=K[0]||"";for(let L=1;L<K.length;L++)F+=(H[L-1]||", ")+K[L];return $?`(${F})`:F}function u(J){let Y=!1,X=0;for(let $=0;$<J.length-1;$++){let z=J.charCodeAt($);if(Y){if(z===92){$++;continue}if(z===X)Y=!1;continue}if(z===39||z===34||z===96){Y=!0,X=z;continue}if(z===47&&J.charCodeAt($+1)===47)return J.slice(0,$).trimEnd()}return J}function n(J){if(J.startsWith("..."))return J;let Y=-1,X=-1,$=0,z=!1,B=0;for(let H=0;H<J.length;H++){let G=J.charCodeAt(H);if(z){if(G===92){H++;continue}if(G===B)z=!1;continue}if(G===39||G===34||G===96){z=!0,B=G;continue}if(G===40||G===60||G===91||G===123)$++;else if(G===41||G===62||G===93||G===125)$--;else if($===0){if(G===58&&Y===-1)Y=H;else if(G===61&&X===-1&&(H===0||J.charCodeAt(H-1)!==61)&&(H+1>=J.length||J.charCodeAt(H+1)!==61&&J.charCodeAt(H+1)!==62))X=H}}let Z=X!==-1;if(Y!==-1&&(X===-1||Y<X)){let H=J.slice(0,Y).trim(),G=X!==-1?J.slice(Y+1,X).trim():J.slice(Y+1).trim(),j=Z&&!H.endsWith("?")?"?":"";return`${H}${j}: ${G}`}else if(X!==-1){let H=J.slice(0,X).trim(),G=!H.endsWith("?")?"?":"",j=J.slice(X+1).trim(),O="unknown";if(j==="true"||j==="false")O="boolean";else if(/^-?\d+(\.\d+)?$/.test(j))O="number";else if(j.startsWith("'")&&j.endsWith("'")||j.startsWith('"')&&j.endsWith('"'))O="string";else if(j.startsWith("["))O="unknown[]";else if(j.startsWith("{"))O="Record<string, unknown>";return`${H}${G}: ${O}`}return J}function a(J){let Y=[],X="",$="",z=0,B=!1,Z="",H=!0,G=!1,j=0;for(let O=0;O<J.length;O++){let Q=J[O],K=O>0?J[O-1]:"",F=O<J.length-1?J[O+1]:"";if(!B&&!G&&Q==="/"&&F==="/"){O+=2;while(O<J.length&&J[O]!==`
|
|
15
|
+
`)O++;continue}if(!B&&!G&&Q==="/"&&F==="*"){G=!0,j=1,X+="/*",O++;continue}else if(G&&Q==="*"&&F==="/"){if(j--,X+="*/",O++,j===0)G=!1;continue}else if(G&&Q==="/"&&F==="*"){j++,X+="/*",O++;continue}if(!B&&(Q==='"'||Q==="'"||Q==="`"))B=!0,Z=Q,X+=Q;else if(B&&Q===Z&&K!=="\\")B=!1,X+=Q;else if(!B&&!G)if(Q==="("&&z===0&&H){if($=X.trim(),$.startsWith("async "))$=$.slice(6).trim();X=Q,H=!1,z=1}else if(Q==="{"||Q==="["||Q==="(")z++,X+=Q;else if(Q==="}"||Q==="]"||Q===")")z--,X+=Q;else if(Q===":"&&z===0&&H)$=X.trim(),X="",H=!1;else if(Q===","&&z===0){if($&&X.trim()){let L=X.trim();if(L.startsWith("("))L=C($,L);else if(L.includes("=>")||L.includes("function")||L.includes("async"))L=I(L);Y.push([$,L])}X="",$="",H=!0}else X+=Q;else X+=Q}if($&&X.trim()){let O=X.trim();if(O.startsWith("("))O=C($,O);else if(O.includes("=>")||O.includes("function")||O.includes("async"))O=I(O);Y.push([$,O])}return Y}function C(J,Y){let X=Y,$=0;while($<X.length&&X.charCodeAt($)<=32)$++;if(X.startsWith("async",$)&&$+5<X.length&&X.charCodeAt($+5)<=32)X=X.slice($+5).trimStart();let z="";if(X.charCodeAt(0)===60){let Q=0,K=-1;for(let F=0;F<X.length;F++)if(X.charCodeAt(F)===60)Q++;else if(X.charCodeAt(F)===62){if(Q--,Q===0){K=F;break}}if(K!==-1)z=X.slice(0,K+1),X=X.slice(K+1).trimStart()}let B=X.indexOf("("),Z=x(X,B,"(",")");if(B===-1||Z===-1)return"() => unknown";let H=X.slice(B,Z+1),G="unknown",j=X.slice(Z+1).trimStart();if(j.charCodeAt(0)===58){let Q=j.slice(1),K=0,F=-1,L=!1;for(let W=0;W<Q.length;W++){let q=Q.charCodeAt(W);if(q===40||q===91)K++;else if(q===41||q===93)K--;else if(q===123&&K===0){F=W;break}else if(q===61&&W+1<Q.length&&Q.charCodeAt(W+1)===62&&K===0){F=W,L=!0;break}}if(F!==-1)G=Q.slice(0,F).trim();else G=Q.trim()}let O=b(H);return`${z}${O} => ${G}`}function x(J,Y,X,$){let z=0;for(let B=Y;B<J.length;B++)if(J[B]===X)z++;else if(J[B]===$){if(z--,z===0)return B}return-1}function r(J){let Y=0,X=0,$=!1,z="";for(let B=0;B<J.length-1;B++){let Z=J[B],H=J[B+1],G=B>0?J[B-1]:"";if(!$&&(Z==='"'||Z==="'"||Z==="`"))$=!0,z=Z;else if($&&Z===z&&G!=="\\")$=!1;if(!$){if(Z==="(")Y++;else if(Z===")")Y--;else if(Z==="[")X++;else if(Z==="]")X--;if(Z==="="&&H===">"&&Y===0&&X===0)return B}}return-1}function h(J,Y=!1,X=0,$=!0){let z=J.trim();if(z.length>200&&E(z,"=>")>2&&E(z,"<")>5&&!z.startsWith("function"))return Y?"((...args: any[]) => any)":"(...args: any[]) => any";if(z.startsWith("async ")&&z.includes("=>")){let Z=z.slice(5).trim(),H=Z.indexOf("=>"),G=Z.substring(0,H).trim(),j=Z.substring(H+2).trim();if(G=b(G),G==="()"||G==="")G="()";else if(!G.startsWith("("))G=`(${G})`;let O="unknown";if(j.startsWith("{"))O="unknown";else O=V(j,$,!1,X+1);let Q=`${G} => Promise<${O}>`;return Y?`(${Q})`:Q}if(z.includes("=>")){let Z="",H=z;if(z.startsWith("<")){let W=x(z,0,"<",">");if(W!==-1)Z=z.substring(0,W+1),H=z.substring(W+1).trim()}let G=r(H);if(G===-1)return Y?"(() => unknown)":"() => unknown";let j=H.substring(0,G).trim(),O=H.substring(G+2).trim(),Q="",K=j.lastIndexOf("):");if(K!==-1){let W=j.substring(K+2).trim();if(W&&!W.includes("=>")&&!W.includes("="))Q=W,j=j.substring(0,K+1)}if(j=b(j),j==="()"||j==="")j="()";else if(!j.startsWith("("))j=`(${j})`;let F="unknown";if(Q)F=Q;else if(O.startsWith("{"))F="unknown";else if(O.includes("=>")){let W=O.trimStart(),q=W.indexOf("("),N=q!==-1?W.indexOf(")",q):-1,R=N!==-1?W.indexOf("=>",N):-1;if(q===0&&N!==-1&&R!==-1){let A=W.substring(q+1,N).trim();if(Z.includes("T")&&A.includes("T"))F=`(${A}) => T`;else F=`(${A}) => any`}else F="any"}else if(Y)F="unknown";else F=V(O,$,!1,X+1);let L=`${Z}${j} => ${F}`;return Y?`(${L})`:L}if(z.startsWith("function")){let Z=8,H=z.length;while(Z<H&&z.charCodeAt(Z)<=32)Z++;let G=!1;if(Z<H&&z.charCodeAt(Z)===42){G=!0,Z++;while(Z<H&&z.charCodeAt(Z)<=32)Z++}let j="";if(Z<H&&z.charCodeAt(Z)===60){let K=Z,F=1;Z++;while(Z<H&&F>0){let L=z.charCodeAt(Z);if(L===60)F++;else if(L===62)F--;Z++}j=z.substring(K,Z);while(Z<H&&z.charCodeAt(Z)<=32)Z++}let O=z.indexOf("(",Z);if(O!==-1){let K=1,F=O+1;while(F<H&&K>0){let N=z.charCodeAt(F);if(N===40)K++;else if(N===41)K--;F++}let L=z.substring(O+1,F-1).trim(),W=L?`(${L})`:"()";if(G){let N=z.substring(F).trim(),R=N.indexOf("Generator<");if(R!==-1){let S=R+10,f=N.indexOf(">",S);if(f!==-1){let o=N.substring(S,f),v=`${j}${W} => Generator<${o}>`;return Y?`(${v})`:v}}let A=`${j}${W} => Generator<any, any, any>`;return Y?`(${A})`:A}let q=`${j}${W} => unknown`;return Y?`(${q})`:q}let Q="(...args: any[]) => unknown";return Y?`(${Q})`:Q}if(z.includes("=>")&&z.includes("(")&&z.includes(")")){if(z.length>100||E(z,"=>")>2){let Z="";if(z.charCodeAt(0)===60){let Q=z.indexOf(">");if(Q!==-1)Z=z.substring(0,Q+1)}let H=z.indexOf("("),G=H!==-1?z.indexOf(")",H):-1,j=H!==-1&&G!==-1?z.substring(H,G+1):"(...args: any[])",O=`${Z}${j} => any`;return Y?`(${O})`:O}return Y?`(${z})`:z}let B="() => unknown";return Y?`(${B})`:B}function zz(J){let Y=J.trim();if(Y==="any"||Y==="object"||Y==="unknown")return!0;if(Y.startsWith("Record<")&&Y.endsWith(">"))return!0;if(Y.startsWith("Array<")&&Y.endsWith(">"))return!0;if(/^\{\s*\[[^\]]*\]:\s*(any|string|number|unknown)\s*\}$/.test(Y))return!0;return!1}function Jz(J){let Y=J.lastIndexOf(" satisfies ");if(Y===-1)return null;let X=J.slice(Y+11).trim();if(X.endsWith(";"))X=X.slice(0,-1).trim();return X||null}function Yz(J){let Y=[],X=0;for(let $=0;$<=J.length;$++)if($===J.length||J[$]===`
|
|
16
|
+
`){let z=X,B=$;while(z<B&&(J[z]===" "||J[z]==="\t"||J[z]==="\r"))z++;while(B>z&&(J[B-1]===" "||J[B-1]==="\t"||J[B-1]==="\r"))B--;let Z=J.slice(z,B);if(X=$+1,Z.startsWith("///")){if(Z.match(/^\/\/\/\s*<reference\s+(path|types|lib|no-default-lib)\s*=\s*["'][^"']+["']\s*\/>/))Y.push(Z);else if(Z.match(/^\/\/\/\s*<amd-module\s+name\s*=\s*["'][^"']+["']\s*\/>/))Y.push(Z);else if(Z.match(/^\/\/\/\s*<amd-dependency\s+path\s*=\s*["'][^"']+["']/))Y.push(Z)}else if(Z===""||Z.startsWith("//"))continue;else break}return Y}
|
|
17
|
+
export{t as Cc,e as Dc,V as Ec,m as Fc,D as Gc,U as Hc,i as Ic,x as Jc,h as Kc,zz as Lc,Jz as Mc,Yz as Nc};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{hc as z}from"./chunk-
|
|
2
|
+
import{hc as z}from"./chunk-94h87sgb.js";import{ad as R}from"./chunk-ns3hznyf.js";var V=R(z(),1);import{readFile as I}from"fs/promises";import{dirname as T,relative as $,resolve as k}from"path";async function M(j,B={}){let A=new Map,K=B.rootDir||process.cwd();for(let H of j){if(B.ignore?.some((L)=>q(H,L)))continue;if(!B.includeNodeModules&&H.includes("node_modules"))continue;let Q=await b(H,K);if(Q)A.set(H,Q)}for(let[H,Q]of A)for(let L of Q.dependencies){let U=A.get(L);if(U)U.dependents.add(H)}return A}async function b(j,B){try{let A=await I(j,"utf-8"),K=V.default.createSourceFile(j,A,V.default.ScriptTarget.Latest,!0,V.default.ScriptKind.TS),H={path:j,exports:new Set,imports:new Map,dependencies:new Set,dependents:new Set};return V.default.forEachChild(K,(Q)=>{F(Q,H,j,B)}),H}catch{return null}}function F(j,B,A,K){if(V.default.isImportDeclaration(j)){let H=j.moduleSpecifier;if(V.default.isStringLiteral(H)){let Q=w(H.text,A,K);if(Q){B.dependencies.add(Q);let L=j.importClause;if(L){if(L.name)B.imports.set(L.name.text,Q);if(L.namedBindings){if(V.default.isNamedImports(L.namedBindings))for(let U of L.namedBindings.elements)B.imports.set(U.name.text,Q);else if(V.default.isNamespaceImport(L.namedBindings))B.imports.set(L.namedBindings.name.text,Q)}}}}}if(V.default.isExportDeclaration(j)){if(j.moduleSpecifier&&V.default.isStringLiteral(j.moduleSpecifier)){let H=w(j.moduleSpecifier.text,A,K);if(H)B.dependencies.add(H)}if(j.exportClause&&V.default.isNamedExports(j.exportClause))for(let H of j.exportClause.elements)B.exports.add(H.name.text)}if(V.default.isFunctionDeclaration(j)&&j.name&&X(j))B.exports.add(j.name.text);if(V.default.isClassDeclaration(j)&&j.name&&X(j))B.exports.add(j.name.text);if(V.default.isInterfaceDeclaration(j)&&X(j))B.exports.add(j.name.text);if(V.default.isTypeAliasDeclaration(j)&&X(j))B.exports.add(j.name.text);if(V.default.isEnumDeclaration(j)&&X(j))B.exports.add(j.name.text);if(V.default.isVariableStatement(j)&&X(j)){for(let H of j.declarationList.declarations)if(V.default.isIdentifier(H.name))B.exports.add(H.name.text)}}function X(j){return(V.default.canHaveModifiers(j)?V.default.getModifiers(j):void 0)?.some((A)=>A.kind===V.default.SyntaxKind.ExportKeyword)??!1}function w(j,B,A){if(!j.startsWith(".")&&!j.startsWith("/"))return null;let K=T(B),H=k(K,j),Q=[".ts",".tsx",".d.ts","/index.ts","/index.tsx","/index.d.ts"];for(let L of Q){let U=H.endsWith(".ts")||H.endsWith(".tsx")?H:H+L;if(!U.includes("node_modules"))return U.replace(/\.tsx?$/,".ts")}return`${H}.ts`}function q(j,B){let A=B.replace(/\./g,"\\.").replace(/\*/g,".*").replace(/\?/g,".");return new RegExp(A).test(j)}function E(j,B={}){let A=[],K=new Set,H=new Set,Q=B.maxDepth||100;function L(U,W,G){if(G>Q)return;if(H.has(U)){let Y=W.indexOf(U),Z=[...W.slice(Y),U],O=S(Z,j),_=v(Z,j);if(!B.typesOnly||_)A.push({chain:Z,symbols:O,severity:_?"error":"warning",reason:_?"Type-level circular dependency can cause compilation issues":"Value-level circular dependency may cause runtime issues"});return}if(K.has(U))return;let J=j.get(U);if(!J)return;K.add(U),H.add(U),W.push(U);for(let Y of J.dependencies)L(Y,[...W],G+1);H.delete(U)}for(let U of j.keys())K.clear(),H.clear(),L(U,[],0);return C(A)}function S(j,B){let A=[];for(let K=0;K<j.length-1;K++){let H=B.get(j[K]),Q=j[K+1];if(H){for(let[L,U]of H.imports)if(U===Q)A.push(L)}}return[...new Set(A)]}function v(j,B){return j.some((A)=>A.endsWith(".d.ts")||B.get(A)?.exports.has("type")||[...B.get(A)?.imports.keys()||[]].some((K)=>K.startsWith("type ")||K==="type"))}function C(j){let B=new Set,A=[];for(let K of j){let H=x(K.chain),Q=H.join(" -> ");if(!B.has(Q))B.add(Q),A.push({...K,chain:H})}return A}function x(j){if(j.length<=1)return j;let B=j.slice(0,-1),A=B;for(let K=1;K<B.length;K++){let H=[...B.slice(K),...B.slice(0,K)];if(H.join("")<A.join(""))A=H}return[...A,A[0]]}async function g(j,B={}){let A=Date.now(),K=await M(j,B),H=E(K,B);return{hasCircular:H.length>0,cycles:H,graph:K,filesAnalyzed:j,durationMs:Date.now()-A}}function y(j,B){let A=[];if(!j.hasCircular)return A.push(`\u2713 No circular dependencies found (${j.filesAnalyzed.length} files analyzed in ${j.durationMs}ms)`),A.join(`
|
|
3
3
|
`);A.push(`\u2717 Found ${j.cycles.length} circular dependency chain(s)`),A.push("");for(let K of j.cycles){let H=K.severity==="error"?"\uD83D\uDD34":"\uD83D\uDFE1";A.push(`${H} ${K.severity.toUpperCase()}: Circular dependency`);let Q=K.chain.map((L)=>B?$(B,L):L);if(A.push(` ${Q.join(" \u2192 ")}`),K.symbols.length>0)A.push(` Symbols: ${K.symbols.join(", ")}`);A.push(` ${K.reason}`),A.push("")}return A.push(`Analyzed ${j.filesAnalyzed.length} files in ${j.durationMs}ms`),A.join(`
|
|
4
4
|
`)}function m(j){let B=0,A={file:"",count:0},K={file:"",count:0},H=[];for(let[Q,L]of j){let U=L.dependencies.size;if(B+=U,U>A.count)A={file:Q,count:U};if(U===0&&L.dependents.size===0)H.push(Q);if(L.dependents.size>K.count)K={file:Q,count:L.dependents.size}}return{totalFiles:j.size,totalDependencies:B,avgDependencies:j.size>0?B/j.size:0,maxDependencies:A,isolatedFiles:H,mostDepended:K}}function P(j,B){let A=new Set,K=[j];while(K.length>0){let H=K.shift(),Q=B.get(H);if(Q){for(let L of Q.dependents)if(!A.has(L))A.add(L),K.push(L)}}return A}function u(j,B){let A=new Set,K=[j];while(K.length>0){let H=K.shift(),Q=B.get(H);if(Q){for(let L of Q.dependencies)if(!A.has(L))A.add(L),K.push(L)}}return A}function f(j,B){let A=["digraph dependencies {"," rankdir=LR;"," node [shape=box];",""];for(let[K,H]of j){let Q=B?$(B,K):K,L=K.replace(/[^a-z0-9]/gi,"_");A.push(` ${L} [label="${Q}"];`);for(let U of H.dependencies){let W=U.replace(/[^a-z0-9]/gi,"_");A.push(` ${L} -> ${W};`)}}return A.push("}"),A.join(`
|
|
5
5
|
`)}function c(j,B){let A=[];for(let[K,H]of j){let Q=B?$(B,K):K;A.push({id:K,path:Q,exports:[...H.exports],imports:Object.fromEntries(H.imports),dependencies:[...H.dependencies],dependents:[...H.dependents]})}return JSON.stringify({nodes:A},null,2)}
|