@dtsx/dtsx 0.11.54 → 0.11.56
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 +1 -1
- package/dist/{chunk-bys9tn88.js → chunk-0a1xppye.js} +1 -1
- package/dist/{chunk-x569v6av.js → chunk-20jq5v1p.js} +1 -1
- package/dist/{chunk-rc1zpm7f.js → chunk-2qbj76ap.js} +8 -8
- package/dist/{chunk-j4w3zxc1.js → chunk-38r6thfe.js} +1 -1
- package/dist/{chunk-aw6spwvp.js → chunk-4cr1q0yf.js} +2 -2
- package/dist/{chunk-0gy70m6b.js → chunk-555w3kcr.js} +1 -1
- package/dist/{chunk-wvdy228e.js → chunk-5bdwrsqt.js} +1 -1
- package/dist/{chunk-egmen4qn.js → chunk-5tn8854w.js} +12 -12
- package/dist/{chunk-d6cwtv8p.js → chunk-5yx2x4v4.js} +1 -1
- package/dist/{chunk-z6amkx8m.js → chunk-62428w6e.js} +1 -1
- package/dist/{chunk-365k5pgj.js → chunk-6j6dvj8a.js} +1 -1
- package/dist/{chunk-ywff3fq9.js → chunk-7rdazac9.js} +14 -14
- package/dist/{chunk-6sdswv08.js → chunk-81jrzxr6.js} +3 -3
- package/dist/{chunk-na7saw10.js → chunk-9h17ws4c.js} +1 -1
- package/dist/{chunk-9gdtzkjv.js → chunk-9wwsqemm.js} +1 -1
- package/dist/{chunk-8apqea4x.js → chunk-b6994asf.js} +1 -1
- package/dist/{chunk-g3737b7k.js → chunk-bt2n0b75.js} +1 -1
- package/dist/{chunk-9xvmk7pg.js → chunk-c726s7aj.js} +1 -1
- package/dist/{chunk-geqq4mmz.js → chunk-cfjd81h8.js} +1 -1
- package/dist/{chunk-cdq514ff.js → chunk-daasy0pw.js} +2 -2
- package/dist/{chunk-zp7a7th9.js → chunk-djbck65n.js} +1 -1
- package/dist/{chunk-cp8xdvb6.js → chunk-ekf33t9z.js} +1 -1
- package/dist/{chunk-gdzqt46g.js → chunk-eskywkxz.js} +1 -1
- package/dist/{chunk-990m77vr.js → chunk-ewgs91y1.js} +1 -1
- package/dist/{chunk-rymbw083.js → chunk-f5jc2v3k.js} +1 -1
- package/dist/{chunk-h7nk8ywf.js → chunk-g25sbqbw.js} +1 -1
- package/dist/{chunk-6y728pph.js → chunk-h7ebvy8j.js} +1 -1
- package/dist/{chunk-193aw7d6.js → chunk-hj7gs32r.js} +1 -1
- package/dist/{chunk-srfpcjtn.js → chunk-mew3f4wh.js} +2 -2
- package/dist/{chunk-2q4d5dqw.js → chunk-njknd1pt.js} +1 -1
- package/dist/{chunk-r0mj8ky4.js → chunk-qhkxctek.js} +1 -1
- package/dist/{chunk-0xjw2vdt.js → chunk-qt9gjs57.js} +1 -1
- package/dist/{chunk-g743tp4d.js → chunk-r46rw8gr.js} +2 -2
- package/dist/{chunk-15qy51py.js → chunk-rzcnab8j.js} +1 -1
- package/dist/{chunk-pggbb1c0.js → chunk-sjbm1trn.js} +2 -2
- package/dist/{chunk-87mk4nnk.js → chunk-srm0ddsk.js} +9 -9
- package/dist/{chunk-j67chb8m.js → chunk-tw99ftp1.js} +1 -1
- package/dist/{chunk-3d49h0bx.js → chunk-vt5hr8vs.js} +1 -1
- package/dist/chunk-wq5r1ms9.js +38 -0
- package/dist/{chunk-1k5r7bpf.js → chunk-yxcyqezk.js} +1 -1
- package/dist/src/augmentation-graph.js +1 -1
- package/dist/src/bundle-linker.js +1 -1
- package/dist/src/bundler.js +1 -1
- package/dist/src/circular.js +1 -1
- package/dist/src/concurrency.js +1 -1
- package/dist/src/config.js +1 -1
- package/dist/src/declaration-project.js +1 -1
- package/dist/src/declaration-publication.js +1 -1
- package/dist/src/declaration-references.js +1 -1
- package/dist/src/docs.js +1 -1
- package/dist/src/extractor/extract.js +1 -1
- package/dist/src/extractor/scanner.js +1 -1
- package/dist/src/extractor.js +1 -1
- package/dist/src/function-properties.js +1 -1
- package/dist/src/generator.js +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/inferred-imports.js +1 -1
- package/dist/src/initializer-type-spans.js +1 -1
- package/dist/src/lsp.js +1 -1
- package/dist/src/native-checker.js +1 -1
- package/dist/src/native-extractor.js +1 -1
- package/dist/src/native-generation.js +1 -1
- package/dist/src/native-project.js +1 -1
- package/dist/src/optimizer.js +1 -1
- package/dist/src/parallel-processor.js +1 -1
- package/dist/src/parser.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/tsdown.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/src/process-source.js +1 -1
- package/dist/src/processor/declarations.js +1 -1
- package/dist/src/processor/import-usage.js +1 -1
- package/dist/src/processor/index.js +1 -1
- package/dist/src/processor/type-inference.js +1 -1
- package/dist/src/processor.js +1 -1
- package/dist/src/return-type-scope.js +1 -1
- package/dist/src/security.js +1 -1
- package/dist/src/source-cache.js +1 -1
- package/dist/src/utils.js +1 -1
- package/dist/src/value-inference.js +1 -1
- package/dist/src/worker-thread.js +1 -1
- package/dist/src/workspace.js +1 -1
- package/native/darwin-arm64/libzig-dtsx.dylib +0 -0
- package/native/darwin-x64/libzig-dtsx.dylib +0 -0
- package/native/freebsd-x64/libzig-dtsx.so +0 -0
- package/native/linux-arm64/libzig-dtsx.so +0 -0
- package/native/linux-x64/libzig-dtsx.so +0 -0
- package/native/windows-x64/zig-dtsx.dll +0 -0
- package/package.json +1 -1
- package/dist/chunk-6j4wx5mf.js +0 -38
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ms,wt,Lr,Os,Nr,Is,Ls,Ns,Fs}from"../chunk-
|
|
2
|
+
import{Ms,wt,Lr,Os,Nr,Is,Ls,Ns,Fs}from"../chunk-c726s7aj.js";import"../chunk-hgg4aqvf.js";import"../chunk-0a1xppye.js";import"../chunk-vt5hr8vs.js";import"../chunk-fpa2ea8k.js";import"../chunk-qbk49jz5.js";import"../chunk-tw99ftp1.js";import"../chunk-mew3f4wh.js";import"../chunk-v6fwy63g.js";import"../chunk-wq5r1ms9.js";import"../chunk-555w3kcr.js";import"../chunk-h28vzayq.js";import"../chunk-r46rw8gr.js";import"../chunk-h7ebvy8j.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-4cr1q0yf.js";import"../chunk-7rdazac9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-daasy0pw.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{Os as checkIsolatedDeclarations,Ls as formatTypeCheckResults,Is as getQuickInfo,Nr as getTypeAtPosition,Ms as loadCompilerOptions,wt as typeCheck,Ns as typeCheckWithConfig,Lr as validateDeclarations,Fs as validateGeneratedDeclarations};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Mi,r,Wn,Oi}from"../chunk-
|
|
2
|
+
import{Mi,r,Wn,Oi}from"../chunk-0a1xppye.js";import"../chunk-vt5hr8vs.js";import"../chunk-fpa2ea8k.js";import"../chunk-qbk49jz5.js";import{_t,ue,jn,Vn,zn,Un}from"../chunk-tw99ftp1.js";import"../chunk-mew3f4wh.js";import"../chunk-v6fwy63g.js";import"../chunk-wq5r1ms9.js";import"../chunk-555w3kcr.js";import"../chunk-h28vzayq.js";import"../chunk-r46rw8gr.js";import"../chunk-h7ebvy8j.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-4cr1q0yf.js";import"../chunk-7rdazac9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-daasy0pw.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{Oi as batchExtractDeclarations,jn as batchParseSourceFiles,Mi as clearSourceFileCache,r as extractDeclarations,Wn as extractDeclarationsAsync,zn as getPendingParseCount,_t as getSourceFile,ue as getSourceFileAsync,Vn as getSourceFileCacheSize,Un as shouldUseAsyncParsing};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{zi}from"../chunk-
|
|
2
|
+
import{zi}from"../chunk-6j6dvj8a.js";import"../chunk-hj7gs32r.js";import"../chunk-20jq5v1p.js";import"../chunk-hgg4aqvf.js";import"../chunk-v22xpr7j.js";import"../chunk-nnayqrp5.js";import"../chunk-djbck65n.js";import"../chunk-yxcyqezk.js";import"../chunk-38r6thfe.js";import"../chunk-bt2n0b75.js";import"../chunk-2qbj76ap.js";import"../chunk-1t77gtcx.js";import"../chunk-x6ddycvm.js";import"../chunk-g9emajpc.js";import"../chunk-6b6rt0yh.js";import"../chunk-8vvryt8p.js";import"../chunk-0a1xppye.js";import"../chunk-vt5hr8vs.js";import"../chunk-fpa2ea8k.js";import"../chunk-qbk49jz5.js";import"../chunk-tw99ftp1.js";import"../chunk-mew3f4wh.js";import"../chunk-v6fwy63g.js";import"../chunk-wq5r1ms9.js";import"../chunk-555w3kcr.js";import"../chunk-h28vzayq.js";import"../chunk-r46rw8gr.js";import"../chunk-h7ebvy8j.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-4cr1q0yf.js";import"../chunk-7rdazac9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-daasy0pw.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{zi as generateNativeDeclarationProject};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Fn}from"../chunk-
|
|
2
|
+
import{Fn}from"../chunk-djbck65n.js";import"../chunk-yxcyqezk.js";import"../chunk-38r6thfe.js";import"../chunk-bt2n0b75.js";import"../chunk-2qbj76ap.js";import"../chunk-1t77gtcx.js";import"../chunk-x6ddycvm.js";import"../chunk-g9emajpc.js";import"../chunk-6b6rt0yh.js";import"../chunk-8vvryt8p.js";import"../chunk-0a1xppye.js";import"../chunk-vt5hr8vs.js";import"../chunk-fpa2ea8k.js";import"../chunk-qbk49jz5.js";import"../chunk-tw99ftp1.js";import"../chunk-mew3f4wh.js";import"../chunk-v6fwy63g.js";import"../chunk-wq5r1ms9.js";import"../chunk-555w3kcr.js";import"../chunk-h28vzayq.js";import"../chunk-r46rw8gr.js";import"../chunk-h7ebvy8j.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-4cr1q0yf.js";import"../chunk-7rdazac9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-daasy0pw.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{Fn as planNativeDeclarationProject};
|
package/dist/src/optimizer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{gr,Vi,hr}from"../chunk-
|
|
2
|
+
import{gr,Vi,hr}from"../chunk-g25sbqbw.js";import"../chunk-0a1xppye.js";import"../chunk-vt5hr8vs.js";import"../chunk-fpa2ea8k.js";import"../chunk-qbk49jz5.js";import"../chunk-tw99ftp1.js";import"../chunk-mew3f4wh.js";import"../chunk-v6fwy63g.js";import"../chunk-wq5r1ms9.js";import"../chunk-555w3kcr.js";import"../chunk-h28vzayq.js";import"../chunk-r46rw8gr.js";import"../chunk-h7ebvy8j.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-4cr1q0yf.js";import"../chunk-7rdazac9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-daasy0pw.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{hr as minifyDts,gr as optimizeDeclarations,Vi as optimizeFile};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Er,gs,hs,kr,Tr,ys}from"../chunk-
|
|
2
|
+
import{Er,gs,hs,kr,Tr,ys}from"../chunk-9wwsqemm.js";import"../chunk-81jrzxr6.js";import"../chunk-pnfjhm01.js";import"../chunk-bt2n0b75.js";import"../chunk-0a1xppye.js";import"../chunk-vt5hr8vs.js";import"../chunk-fpa2ea8k.js";import"../chunk-qbk49jz5.js";import"../chunk-tw99ftp1.js";import"../chunk-mew3f4wh.js";import"../chunk-v6fwy63g.js";import"../chunk-wq5r1ms9.js";import"../chunk-555w3kcr.js";import"../chunk-h28vzayq.js";import"../chunk-r46rw8gr.js";import"../chunk-h7ebvy8j.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-4cr1q0yf.js";import"../chunk-7rdazac9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-daasy0pw.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{ys as analyzeParallelizationPotential,Er as buildProcessingGraph,kr as findIndependentFiles,Tr as getProcessingLevels,hs as getTopologicalOrder,gs as processInParallel};
|
package/dist/src/parser.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Zs,Qs,mn,eo,to,gn,no,ro,io,so}from"../chunk-mqv5m22t.js";import{o}from"../chunk-
|
|
2
|
+
import{Zs,Qs,mn,eo,to,gn,no,ro,io,so}from"../chunk-mqv5m22t.js";import{o}from"../chunk-7rdazac9.js";import{f}from"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-daasy0pw.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{gn as extractBalancedSymbols,eo as extractLeadingComments,Qs as extractLeadingCommentsFromNode,to as extractTrailingComment,o as findMatchingBracket,f as formatComments,Zs as getNodeText,ro as isExportStatement,io as isTypeOnlyExport,no as parseFunctionDeclaration,so as parseVariableDeclaration,mn as removeLeadingComments};
|
package/dist/src/plugins/bun.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{qe,Oa,Ia}from"../../chunk-
|
|
2
|
+
import{qe,Oa,Ia}from"../../chunk-rzcnab8j.js";import"../../chunk-5tn8854w.js";import"../../chunk-spdw3tc0.js";import"../../chunk-msa98cgm.js";import"../../chunk-5yx2x4v4.js";import"../../chunk-81jrzxr6.js";import"../../chunk-pnfjhm01.js";import"../../chunk-tgaear7n.js";import"../../chunk-h6ddkhyq.js";import"../../chunk-hj7gs32r.js";import"../../chunk-dak0dhnx.js";import"../../chunk-20jq5v1p.js";import"../../chunk-hgg4aqvf.js";import"../../chunk-srm0ddsk.js";import"../../chunk-0d5nemtn.js";import"../../chunk-v22xpr7j.js";import"../../chunk-nnayqrp5.js";import"../../chunk-cfjd81h8.js";import"../../chunk-7pw9ayve.js";import"../../chunk-yxcyqezk.js";import"../../chunk-38r6thfe.js";import"../../chunk-bt2n0b75.js";import"../../chunk-2qbj76ap.js";import"../../chunk-1t77gtcx.js";import"../../chunk-x6ddycvm.js";import"../../chunk-g9emajpc.js";import"../../chunk-6b6rt0yh.js";import"../../chunk-8vvryt8p.js";import"../../chunk-0a1xppye.js";import"../../chunk-vt5hr8vs.js";import"../../chunk-fpa2ea8k.js";import"../../chunk-qbk49jz5.js";import"../../chunk-tw99ftp1.js";import"../../chunk-mew3f4wh.js";import"../../chunk-v6fwy63g.js";import"../../chunk-wq5r1ms9.js";import"../../chunk-555w3kcr.js";import"../../chunk-h28vzayq.js";import"../../chunk-r46rw8gr.js";import"../../chunk-h7ebvy8j.js";import"../../chunk-9mdgtq38.js";import"../../chunk-6ekemc3h.js";import"../../chunk-4cr1q0yf.js";import"../../chunk-7rdazac9.js";import"../../chunk-587w6ktw.js";import"../../chunk-hkcqbex1.js";import"../../chunk-daasy0pw.js";import"../../chunk-vk5r6pgx.js";import"../../chunk-6r01zgys.js";import"../../chunk-gwa4hmfa.js";import"../../chunk-mzxxgnp8.js";import"../../chunk-t5nmnzy6.js";import"../../chunk-cgqg1br8.js";export{Oa as bunDts,Ia as default,qe as dts};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ce,Da,dr,Pa}from"../../chunk-
|
|
2
|
+
import{Ce,Da,dr,Pa}from"../../chunk-qt9gjs57.js";import"../../chunk-5tn8854w.js";import"../../chunk-spdw3tc0.js";import"../../chunk-msa98cgm.js";import"../../chunk-5yx2x4v4.js";import"../../chunk-81jrzxr6.js";import"../../chunk-pnfjhm01.js";import"../../chunk-tgaear7n.js";import"../../chunk-h6ddkhyq.js";import"../../chunk-hj7gs32r.js";import"../../chunk-dak0dhnx.js";import"../../chunk-20jq5v1p.js";import"../../chunk-hgg4aqvf.js";import"../../chunk-srm0ddsk.js";import"../../chunk-0d5nemtn.js";import"../../chunk-v22xpr7j.js";import"../../chunk-nnayqrp5.js";import"../../chunk-cfjd81h8.js";import"../../chunk-7pw9ayve.js";import"../../chunk-yxcyqezk.js";import"../../chunk-38r6thfe.js";import"../../chunk-bt2n0b75.js";import"../../chunk-2qbj76ap.js";import"../../chunk-1t77gtcx.js";import"../../chunk-x6ddycvm.js";import"../../chunk-g9emajpc.js";import"../../chunk-6b6rt0yh.js";import"../../chunk-8vvryt8p.js";import"../../chunk-0a1xppye.js";import"../../chunk-vt5hr8vs.js";import"../../chunk-fpa2ea8k.js";import"../../chunk-qbk49jz5.js";import"../../chunk-tw99ftp1.js";import"../../chunk-mew3f4wh.js";import"../../chunk-v6fwy63g.js";import"../../chunk-wq5r1ms9.js";import"../../chunk-555w3kcr.js";import"../../chunk-h28vzayq.js";import"../../chunk-r46rw8gr.js";import"../../chunk-h7ebvy8j.js";import"../../chunk-9mdgtq38.js";import"../../chunk-6ekemc3h.js";import"../../chunk-4cr1q0yf.js";import"../../chunk-7rdazac9.js";import"../../chunk-587w6ktw.js";import"../../chunk-hkcqbex1.js";import"../../chunk-daasy0pw.js";import"../../chunk-vk5r6pgx.js";import"../../chunk-6r01zgys.js";import"../../chunk-gwa4hmfa.js";import"../../chunk-mzxxgnp8.js";import"../../chunk-t5nmnzy6.js";import"../../chunk-cgqg1br8.js";export{Pa as default,dr as dts,Ce as dtsx,Da as esbuildDts};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"../../chunk-6b6rt0yh.js";import"../../chunk-
|
|
2
|
+
import"../../chunk-6b6rt0yh.js";import"../../chunk-mew3f4wh.js";import"../../chunk-cgqg1br8.js";import"../../chunk-t5nmnzy6.js";import"../../chunk-qbk49jz5.js";import"../../chunk-fpa2ea8k.js";import"../../chunk-v6fwy63g.js";import"../../chunk-gwa4hmfa.js";import"../../chunk-mzxxgnp8.js";import"../../chunk-hkcqbex1.js";import"../../chunk-4cr1q0yf.js";import"../../chunk-h28vzayq.js";import"../../chunk-vk5r6pgx.js";import"../../chunk-daasy0pw.js";import"../../chunk-6r01zgys.js";import"../../chunk-587w6ktw.js";import"../../chunk-7rdazac9.js";import"../../chunk-555w3kcr.js";import"../../chunk-r46rw8gr.js";import"../../chunk-wq5r1ms9.js";import"../../chunk-6ekemc3h.js";import"../../chunk-9mdgtq38.js";import"../../chunk-h7ebvy8j.js";import"../../chunk-vt5hr8vs.js";import"../../chunk-tw99ftp1.js";import"../../chunk-0a1xppye.js";import"../../chunk-bt2n0b75.js";import"../../chunk-38r6thfe.js";import"../../chunk-8vvryt8p.js";import"../../chunk-g9emajpc.js";import"../../chunk-x6ddycvm.js";import"../../chunk-1t77gtcx.js";import"../../chunk-srm0ddsk.js";import"../../chunk-h6ddkhyq.js";import"../../chunk-2qbj76ap.js";import"../../chunk-yxcyqezk.js";import"../../chunk-nnayqrp5.js";import"../../chunk-v22xpr7j.js";import"../../chunk-hgg4aqvf.js";import"../../chunk-20jq5v1p.js";import"../../chunk-hj7gs32r.js";import"../../chunk-tgaear7n.js";import"../../chunk-spdw3tc0.js";import"../../chunk-cfjd81h8.js";import"../../chunk-dak0dhnx.js";import"../../chunk-msa98cgm.js";import"../../chunk-7pw9ayve.js";import"../../chunk-pnfjhm01.js";import"../../chunk-81jrzxr6.js";import"../../chunk-0d5nemtn.js";import"../../chunk-5yx2x4v4.js";import"../../chunk-5tn8854w.js";import{Ke}from"../../chunk-qhkxctek.js";import{qe}from"../../chunk-rzcnab8j.js";import{Ce,dr}from"../../chunk-qt9gjs57.js";import{ve,pr}from"../../chunk-ewgs91y1.js";import{mt}from"../../chunk-b6994asf.js";import{He,Jt,fr}from"../../chunk-f5jc2v3k.js";export{He as DtsxWebpackPlugin,qe as bun,qe as bunDts,Ce as esbuild,Ce as esbuildDts,dr as esbuildPlugin,mt as tsdown,mt as tsdownDts,ve as tsup,ve as tsupDts,pr as tsupPlugin,Ke as vite,Ke as viteDts,Jt as webpackDts,fr as webpackPlugin};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{mt,La}from"../../chunk-
|
|
2
|
+
import{mt,La}from"../../chunk-b6994asf.js";import"../../chunk-5tn8854w.js";import"../../chunk-spdw3tc0.js";import"../../chunk-msa98cgm.js";import"../../chunk-5yx2x4v4.js";import"../../chunk-81jrzxr6.js";import"../../chunk-pnfjhm01.js";import"../../chunk-tgaear7n.js";import"../../chunk-h6ddkhyq.js";import"../../chunk-hj7gs32r.js";import"../../chunk-dak0dhnx.js";import"../../chunk-20jq5v1p.js";import"../../chunk-hgg4aqvf.js";import"../../chunk-srm0ddsk.js";import"../../chunk-0d5nemtn.js";import"../../chunk-v22xpr7j.js";import"../../chunk-nnayqrp5.js";import"../../chunk-cfjd81h8.js";import"../../chunk-7pw9ayve.js";import"../../chunk-yxcyqezk.js";import"../../chunk-38r6thfe.js";import"../../chunk-bt2n0b75.js";import"../../chunk-2qbj76ap.js";import"../../chunk-1t77gtcx.js";import"../../chunk-x6ddycvm.js";import"../../chunk-g9emajpc.js";import"../../chunk-6b6rt0yh.js";import"../../chunk-8vvryt8p.js";import"../../chunk-0a1xppye.js";import"../../chunk-vt5hr8vs.js";import"../../chunk-fpa2ea8k.js";import"../../chunk-qbk49jz5.js";import"../../chunk-tw99ftp1.js";import"../../chunk-mew3f4wh.js";import"../../chunk-v6fwy63g.js";import"../../chunk-wq5r1ms9.js";import"../../chunk-555w3kcr.js";import"../../chunk-h28vzayq.js";import"../../chunk-r46rw8gr.js";import"../../chunk-h7ebvy8j.js";import"../../chunk-9mdgtq38.js";import"../../chunk-6ekemc3h.js";import"../../chunk-4cr1q0yf.js";import"../../chunk-7rdazac9.js";import"../../chunk-587w6ktw.js";import"../../chunk-hkcqbex1.js";import"../../chunk-daasy0pw.js";import"../../chunk-vk5r6pgx.js";import"../../chunk-6r01zgys.js";import"../../chunk-gwa4hmfa.js";import"../../chunk-mzxxgnp8.js";import"../../chunk-t5nmnzy6.js";import"../../chunk-cgqg1br8.js";export{La as default,mt as dts};
|
package/dist/src/plugins/tsup.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ve,Na,pr,Fa}from"../../chunk-
|
|
2
|
+
import{ve,Na,pr,Fa}from"../../chunk-ewgs91y1.js";import"../../chunk-5tn8854w.js";import"../../chunk-spdw3tc0.js";import"../../chunk-msa98cgm.js";import"../../chunk-5yx2x4v4.js";import"../../chunk-81jrzxr6.js";import"../../chunk-pnfjhm01.js";import"../../chunk-tgaear7n.js";import"../../chunk-h6ddkhyq.js";import"../../chunk-hj7gs32r.js";import"../../chunk-dak0dhnx.js";import"../../chunk-20jq5v1p.js";import"../../chunk-hgg4aqvf.js";import"../../chunk-srm0ddsk.js";import"../../chunk-0d5nemtn.js";import"../../chunk-v22xpr7j.js";import"../../chunk-nnayqrp5.js";import"../../chunk-cfjd81h8.js";import"../../chunk-7pw9ayve.js";import"../../chunk-yxcyqezk.js";import"../../chunk-38r6thfe.js";import"../../chunk-bt2n0b75.js";import"../../chunk-2qbj76ap.js";import"../../chunk-1t77gtcx.js";import"../../chunk-x6ddycvm.js";import"../../chunk-g9emajpc.js";import"../../chunk-6b6rt0yh.js";import"../../chunk-8vvryt8p.js";import"../../chunk-0a1xppye.js";import"../../chunk-vt5hr8vs.js";import"../../chunk-fpa2ea8k.js";import"../../chunk-qbk49jz5.js";import"../../chunk-tw99ftp1.js";import"../../chunk-mew3f4wh.js";import"../../chunk-v6fwy63g.js";import"../../chunk-wq5r1ms9.js";import"../../chunk-555w3kcr.js";import"../../chunk-h28vzayq.js";import"../../chunk-r46rw8gr.js";import"../../chunk-h7ebvy8j.js";import"../../chunk-9mdgtq38.js";import"../../chunk-6ekemc3h.js";import"../../chunk-4cr1q0yf.js";import"../../chunk-7rdazac9.js";import"../../chunk-587w6ktw.js";import"../../chunk-hkcqbex1.js";import"../../chunk-daasy0pw.js";import"../../chunk-vk5r6pgx.js";import"../../chunk-6r01zgys.js";import"../../chunk-gwa4hmfa.js";import"../../chunk-mzxxgnp8.js";import"../../chunk-t5nmnzy6.js";import"../../chunk-cgqg1br8.js";export{Fa as default,pr as dts,ve as dtsxPlugin,Na as tsupDts};
|
package/dist/src/plugins/vite.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ke,Ra,Ma}from"../../chunk-
|
|
2
|
+
import{Ke,Ra,Ma}from"../../chunk-qhkxctek.js";import"../../chunk-5tn8854w.js";import"../../chunk-spdw3tc0.js";import"../../chunk-msa98cgm.js";import"../../chunk-5yx2x4v4.js";import"../../chunk-81jrzxr6.js";import"../../chunk-pnfjhm01.js";import"../../chunk-tgaear7n.js";import"../../chunk-h6ddkhyq.js";import"../../chunk-hj7gs32r.js";import"../../chunk-dak0dhnx.js";import"../../chunk-20jq5v1p.js";import"../../chunk-hgg4aqvf.js";import"../../chunk-srm0ddsk.js";import"../../chunk-0d5nemtn.js";import"../../chunk-v22xpr7j.js";import"../../chunk-nnayqrp5.js";import"../../chunk-cfjd81h8.js";import"../../chunk-7pw9ayve.js";import"../../chunk-yxcyqezk.js";import"../../chunk-38r6thfe.js";import"../../chunk-bt2n0b75.js";import"../../chunk-2qbj76ap.js";import"../../chunk-1t77gtcx.js";import"../../chunk-x6ddycvm.js";import"../../chunk-g9emajpc.js";import"../../chunk-6b6rt0yh.js";import"../../chunk-8vvryt8p.js";import"../../chunk-0a1xppye.js";import"../../chunk-vt5hr8vs.js";import"../../chunk-fpa2ea8k.js";import"../../chunk-qbk49jz5.js";import"../../chunk-tw99ftp1.js";import"../../chunk-mew3f4wh.js";import"../../chunk-v6fwy63g.js";import"../../chunk-wq5r1ms9.js";import"../../chunk-555w3kcr.js";import"../../chunk-h28vzayq.js";import"../../chunk-r46rw8gr.js";import"../../chunk-h7ebvy8j.js";import"../../chunk-9mdgtq38.js";import"../../chunk-6ekemc3h.js";import"../../chunk-4cr1q0yf.js";import"../../chunk-7rdazac9.js";import"../../chunk-587w6ktw.js";import"../../chunk-hkcqbex1.js";import"../../chunk-daasy0pw.js";import"../../chunk-vk5r6pgx.js";import"../../chunk-6r01zgys.js";import"../../chunk-gwa4hmfa.js";import"../../chunk-mzxxgnp8.js";import"../../chunk-t5nmnzy6.js";import"../../chunk-cgqg1br8.js";export{Ma as default,Ke as dts,Ra as viteDts};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{He,Jt,fr,Aa}from"../../chunk-
|
|
2
|
+
import{He,Jt,fr,Aa}from"../../chunk-f5jc2v3k.js";import"../../chunk-5tn8854w.js";import"../../chunk-spdw3tc0.js";import"../../chunk-msa98cgm.js";import"../../chunk-5yx2x4v4.js";import"../../chunk-81jrzxr6.js";import"../../chunk-pnfjhm01.js";import"../../chunk-tgaear7n.js";import"../../chunk-h6ddkhyq.js";import"../../chunk-hj7gs32r.js";import"../../chunk-dak0dhnx.js";import"../../chunk-20jq5v1p.js";import"../../chunk-hgg4aqvf.js";import"../../chunk-srm0ddsk.js";import"../../chunk-0d5nemtn.js";import"../../chunk-v22xpr7j.js";import"../../chunk-nnayqrp5.js";import"../../chunk-cfjd81h8.js";import"../../chunk-7pw9ayve.js";import"../../chunk-yxcyqezk.js";import"../../chunk-38r6thfe.js";import"../../chunk-bt2n0b75.js";import"../../chunk-2qbj76ap.js";import"../../chunk-1t77gtcx.js";import"../../chunk-x6ddycvm.js";import"../../chunk-g9emajpc.js";import"../../chunk-6b6rt0yh.js";import"../../chunk-8vvryt8p.js";import"../../chunk-0a1xppye.js";import"../../chunk-vt5hr8vs.js";import"../../chunk-fpa2ea8k.js";import"../../chunk-qbk49jz5.js";import"../../chunk-tw99ftp1.js";import"../../chunk-mew3f4wh.js";import"../../chunk-v6fwy63g.js";import"../../chunk-wq5r1ms9.js";import"../../chunk-555w3kcr.js";import"../../chunk-h28vzayq.js";import"../../chunk-r46rw8gr.js";import"../../chunk-h7ebvy8j.js";import"../../chunk-9mdgtq38.js";import"../../chunk-6ekemc3h.js";import"../../chunk-4cr1q0yf.js";import"../../chunk-7rdazac9.js";import"../../chunk-587w6ktw.js";import"../../chunk-hkcqbex1.js";import"../../chunk-daasy0pw.js";import"../../chunk-vk5r6pgx.js";import"../../chunk-6r01zgys.js";import"../../chunk-gwa4hmfa.js";import"../../chunk-mzxxgnp8.js";import"../../chunk-t5nmnzy6.js";import"../../chunk-cgqg1br8.js";export{He as DtsxWebpackPlugin,Aa as default,fr as dts,Jt as dtsxWebpack};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ze,$t,ci,li,ui,Ba,kn}from"../chunk-
|
|
2
|
+
import{Ze,$t,ci,li,ui,Ba,kn}from"../chunk-5yx2x4v4.js";import"../chunk-81jrzxr6.js";import"../chunk-pnfjhm01.js";import"../chunk-dak0dhnx.js";import"../chunk-bt2n0b75.js";import"../chunk-vt5hr8vs.js";import"../chunk-fpa2ea8k.js";import"../chunk-qbk49jz5.js";import"../chunk-v6fwy63g.js";import"../chunk-wq5r1ms9.js";import"../chunk-555w3kcr.js";import"../chunk-h28vzayq.js";import"../chunk-r46rw8gr.js";import"../chunk-h7ebvy8j.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-4cr1q0yf.js";import"../chunk-7rdazac9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-daasy0pw.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{ui as clearResultCache,Ze as emitNatively,$t as processSource,Ba as processSourceDirect,ci as processSourceIsolated,li as processSourceSemantic,kn as processSourceWithTypeScriptEngine};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{fe,x,de,pe,me,ge,qn,Jn,he}from"../../chunk-
|
|
2
|
+
import{fe,x,de,pe,me,ge,qn,Jn,he}from"../../chunk-r46rw8gr.js";import"../../chunk-7rdazac9.js";import"../../chunk-587w6ktw.js";import"../../chunk-hkcqbex1.js";import"../../chunk-daasy0pw.js";import"../../chunk-vk5r6pgx.js";import"../../chunk-6r01zgys.js";import"../../chunk-gwa4hmfa.js";import"../../chunk-t5nmnzy6.js";import"../../chunk-cgqg1br8.js";export{me as processClassDeclaration,ge as processEnumDeclaration,Jn as processExportDeclaration,fe as processFunctionDeclaration,qn as processImportDeclaration,de as processInterfaceDeclaration,he as processModuleDeclaration,pe as processTypeDeclaration,x as processVariableDeclaration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Me}from"../../chunk-
|
|
2
|
+
import{Me}from"../../chunk-bt2n0b75.js";import"../../chunk-r46rw8gr.js";import"../../chunk-9mdgtq38.js";import"../../chunk-6ekemc3h.js";import"../../chunk-7rdazac9.js";import"../../chunk-587w6ktw.js";import"../../chunk-hkcqbex1.js";import"../../chunk-daasy0pw.js";import"../../chunk-vk5r6pgx.js";import"../../chunk-6r01zgys.js";import"../../chunk-gwa4hmfa.js";import"../../chunk-t5nmnzy6.js";import"../../chunk-cgqg1br8.js";export{Me as analyzeDeclarationImportUsage};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{l}from"../../chunk-
|
|
2
|
+
import{l}from"../../chunk-81jrzxr6.js";import"../../chunk-pnfjhm01.js";import"../../chunk-bt2n0b75.js";import{fe,x,de,pe,me,ge,qn,Jn,he}from"../../chunk-r46rw8gr.js";import{Xn,C}from"../../chunk-9mdgtq38.js";import{er}from"../../chunk-6ekemc3h.js";import"../../chunk-4cr1q0yf.js";import{n,Ht,Be,Q,dt,o,pt,We,H}from"../../chunk-7rdazac9.js";import{f}from"../../chunk-587w6ktw.js";import"../../chunk-hkcqbex1.js";import"../../chunk-daasy0pw.js";import"../../chunk-vk5r6pgx.js";import"../../chunk-6r01zgys.js";import"../../chunk-gwa4hmfa.js";import"../../chunk-t5nmnzy6.js";import"../../chunk-cgqg1br8.js";export{er as clearProcessorCaches,C as extractAllImportedItems,H as extractSatisfiesType,o as findMatchingBracket,f as formatComments,Be as inferArrayType,pt as inferFunctionType,n as inferNarrowType,Ht as inferNarrowTypeInUnion,dt as inferObjectType,We as isGenericType,Q as parseArrayElements,Xn as parseImportStatement,me as processClassDeclaration,l as processDeclarations,ge as processEnumDeclaration,Jn as processExportDeclaration,fe as processFunctionDeclaration,qn as processImportDeclaration,de as processInterfaceDeclaration,he as processModuleDeclaration,pe as processTypeDeclaration,x as processVariableDeclaration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{zt,Ut,n,Ht,B,$a,W,Kt,Be,Q,ir,qt,dt,
|
|
2
|
+
import{zt,Ut,n,Ht,B,$a,W,Kt,Be,Q,ir,qt,dt,U,ye,o,pt,We,H,za,Ua,Ha,Ka,qa,Ja,Ya,Ea,Xa,Za,Qa}from"../../chunk-7rdazac9.js";import"../../chunk-587w6ktw.js";import"../../chunk-hkcqbex1.js";import"../../chunk-daasy0pw.js";import{y,ee,K}from"../../chunk-vk5r6pgx.js";import"../../chunk-6r01zgys.js";import"../../chunk-gwa4hmfa.js";import"../../chunk-t5nmnzy6.js";import"../../chunk-cgqg1br8.js";export{qt as classFieldDefaultDoc,ye as cleanParameterDefaults,Ut as consumeCleanDefault,zt as enableCleanDefaultCollection,Ka as extractInferTypes,H as extractSatisfiesType,o as findMatchingBracket,W as indentNestedType,Be as inferArrayType,U as inferCallType,Ua as inferConditionalType,B as inferFunctionBodyReturnType,pt as inferFunctionType,Xa as inferKeyofType,za as inferMappedType,n as inferNarrowType,Ht as inferNarrowTypeInUnion,Kt as inferNewExpressionType,dt as inferObjectType,Ha as inferTemplateLiteralTypeAdvanced,Za as inferTypeofType,ee as isBigIntLiteral,qa as isComplexType,We as isGenericType,Qa as isIndexedAccessType,y as isNumericLiteral,ir as leadingSourceComments,K as numericLiteralType,Q as parseArrayElements,Ea as parseTypeParameters,Ya as parseUtilityType,$a as primitiveMethodReturnType,Ja as simplifyComplexType};
|
package/dist/src/processor.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"../chunk-cgqg1br8.js";import"../chunk-t5nmnzy6.js";import"../chunk-gwa4hmfa.js";import"../chunk-
|
|
2
|
+
import"../chunk-cgqg1br8.js";import"../chunk-t5nmnzy6.js";import"../chunk-gwa4hmfa.js";import"../chunk-4cr1q0yf.js";import"../chunk-pnfjhm01.js";import{f}from"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-vk5r6pgx.js";import"../chunk-daasy0pw.js";import"../chunk-6r01zgys.js";import{n,Ht,Be,Q,dt,o,pt,We,H}from"../chunk-7rdazac9.js";import{fe,x,de,pe,me,ge,qn,Jn,he}from"../chunk-r46rw8gr.js";import{er}from"../chunk-6ekemc3h.js";import{Xn,C}from"../chunk-9mdgtq38.js";import"../chunk-bt2n0b75.js";import{l}from"../chunk-81jrzxr6.js";export{er as clearProcessorCaches,C as extractAllImportedItems,H as extractSatisfiesType,o as findMatchingBracket,f as formatComments,Be as inferArrayType,pt as inferFunctionType,n as inferNarrowType,Ht as inferNarrowTypeInUnion,dt as inferObjectType,We as isGenericType,Q as parseArrayElements,Xn as parseImportStatement,me as processClassDeclaration,l as processDeclarations,ge as processEnumDeclaration,Jn as processExportDeclaration,fe as processFunctionDeclaration,qn as processImportDeclaration,de as processInterfaceDeclaration,he as processModuleDeclaration,pe as processTypeDeclaration,x as processVariableDeclaration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ii}from"../chunk-
|
|
2
|
+
import{Ii}from"../chunk-wq5r1ms9.js";import"../chunk-555w3kcr.js";import"../chunk-h28vzayq.js";import"../chunk-r46rw8gr.js";import"../chunk-h7ebvy8j.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-4cr1q0yf.js";import"../chunk-7rdazac9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-daasy0pw.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{Ii as createReturnTypeScope};
|
package/dist/src/security.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{j,k,Ye,Yr,hn,Xr,Zr,Qr,vt,yn,St,ei,oo,ao,co,lo}from"../chunk-sjbm1trn.js";export{j as DEFAULT_SECURITY_CONFIG,k as SecurityError,oo as createSecureBatchProcessor,ei as createSecureProcessor,lo as createSecurityMiddleware,hn as isBlockedPath,co as isSafePath,Zr as isSymlink,ao as sanitizeFilename,yn as validateFileBatch,vt as validateFilePath,Xr as validateFileSize,Ye as validatePath,Yr as validatePaths,Qr as validateSymlink,St as withTimeout};
|
package/dist/src/source-cache.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{_t,ue,jn,Gn,Vn,zn,Un}from"../chunk-
|
|
2
|
+
import{_t,ue,jn,Gn,Vn,zn,Un}from"../chunk-tw99ftp1.js";import"../chunk-mew3f4wh.js";import"../chunk-v6fwy63g.js";export{jn as batchParseSourceFiles,Gn as clearSourceFileCache,zn as getPendingParseCount,_t as getSourceFile,ue as getSourceFileAsync,Vn as getSourceFileCacheSize,Un as shouldUseAsyncParsing};
|
package/dist/src/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{tt,Oo,Y,bi,re,Tt,At,Dt,Pt}from"../chunk-
|
|
2
|
+
import{tt,Oo,Y,bi,re,Tt,At,Dt,Pt}from"../chunk-20jq5v1p.js";import"../chunk-hgg4aqvf.js";import"../chunk-v22xpr7j.js";import"../chunk-nnayqrp5.js";import"../chunk-2qbj76ap.js";import"../chunk-x6ddycvm.js";import"../chunk-g9emajpc.js";import"../chunk-6b6rt0yh.js";import"../chunk-8vvryt8p.js";export{Pt as addSourceMapComment,Oo as assertNever,re as checkIsolatedDeclarationsConfig,At as createDiff,Dt as generateDeclarationMap,bi as getAllTypeScriptFiles,tt as sourceMapCommentPrefix,Tt as validateDtsContent,Y as writeToFile};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Gt,Yn}from"../chunk-
|
|
2
|
+
import{Gt,Yn}from"../chunk-h7ebvy8j.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-4cr1q0yf.js";import"../chunk-7rdazac9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-daasy0pw.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{Gt as inferDeclarationCallTypes,Yn as inferDeclarationValueAliases};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"../chunk-
|
|
2
|
+
import"../chunk-mew3f4wh.js";import"../chunk-cgqg1br8.js";import"../chunk-t5nmnzy6.js";import"../chunk-qbk49jz5.js";import"../chunk-fpa2ea8k.js";import"../chunk-v6fwy63g.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-hkcqbex1.js";import"../chunk-4cr1q0yf.js";import"../chunk-h28vzayq.js";import"../chunk-vk5r6pgx.js";import"../chunk-daasy0pw.js";import"../chunk-6r01zgys.js";import"../chunk-587w6ktw.js";import"../chunk-7rdazac9.js";import"../chunk-555w3kcr.js";import"../chunk-r46rw8gr.js";import"../chunk-wq5r1ms9.js";import"../chunk-6ekemc3h.js";import"../chunk-9mdgtq38.js";import"../chunk-h7ebvy8j.js";import"../chunk-vt5hr8vs.js";import"../chunk-tw99ftp1.js";import{r}from"../chunk-0a1xppye.js";import"../chunk-dak0dhnx.js";import"../chunk-pnfjhm01.js";import"../chunk-bt2n0b75.js";import{l}from"../chunk-81jrzxr6.js";import{Ze}from"../chunk-5yx2x4v4.js";import*as R from"fs";import{parentPort as M}from"worker_threads";var P=typeof Bun<"u"?Bun:null,S=P?null:R,T=Promise.resolve({extractDeclarations:r,processDeclarations:l});async function N(e){let u=Date.now();try{let{extractDeclarations:m,processDeclarations:A}=await T,f=e.config?.keepComments,C=e.config?.isolatedDeclarations,v=e.config?.importOrder,B=e.config?.engine;if(e.type==="process-batch"){let{filePaths:o,outPaths:D}=e,p=o?null:e.files||[],d=o?o.length:p.length,w=e.writeOutput===!0,g=w?null:Array(d),c=null,b=e.sources;if(!b&&d>0){let t=Array(d);for(let s=0;s<d;s++){let n=p?p[s]:null,h=n?n.sourceCode:void 0,i=o?o[s]:n.filePath;if(h!=null)t[s]=Promise.resolve(h);else if(P)t[s]=P.file(i).text();else t[s]=Promise.resolve(S.readFileSync(i,"utf-8"))}b=await Promise.all(t)}let x={filePath:"",sourceCode:"",declarations:[]},O=w&&P?Array(d):null,F=!0;for(let t=0;t<d;t++){let s=p?p[t]:null,n=o?o[t]:s.filePath,h=D?D[t]:s?s.outPath:void 0;try{let i=b?b[t]:s?.sourceCode||"",a=null,y=Ze(i,n,f??!0,v??["bun"],C??!1,B);if(y===null)a=m(i,n,f,C),x.filePath=n,x.sourceCode=i,x.declarations=a,y=A(a,x,f??!0,v);if(w){if(!h)throw Error(`Missing outPath for ${n}`);if(P)O[t]=P.write(h,y);else S.writeFileSync(h,y)}else if(g)g[t]={filePath:n,success:!0,content:y,declarations:a}}catch(i){let a=i&&i.message?i.message:String(i);if(w){if(!c)c=[];c.push({filePath:n,success:!1,error:a})}else if(g)g[t]={filePath:n,success:!1,error:a};F=!1}}if(O)await Promise.all(O);let E=c?.length?`${c[0].filePath}: ${c[0].error||"Worker batch failed"}`:void 0;return{id:e.id,success:F,filePath:e.filePath,batchResults:w?c||void 0:g,error:E,duration:Date.now()-u}}if(e.type==="extract"){let o=m(e.sourceCode,e.filePath,f,C);return{id:e.id,success:!0,filePath:e.filePath,declarations:o,duration:Date.now()-u}}if(e.type==="process"){let o=m(e.sourceCode,e.filePath,f,C),D=A(o,{filePath:e.filePath,sourceCode:e.sourceCode,declarations:o},f??!0,v);return{id:e.id,success:!0,filePath:e.filePath,content:D,declarations:o,duration:Date.now()-u}}throw Error(`Unknown task type: ${e.type}`)}catch(m){return{id:e.id,success:!1,filePath:e.filePath,error:m.message,duration:Date.now()-u}}}M?.on("message",async(e)=>{let u=await N(e);M.postMessage(u)});
|
package/dist/src/workspace.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ti,ni,bn,uo,ri,ii,fo}from"../chunk-
|
|
2
|
+
import{ti,ni,bn,uo,ri,ii,fo}from"../chunk-ekf33t9z.js";import"../chunk-5tn8854w.js";import"../chunk-spdw3tc0.js";import"../chunk-msa98cgm.js";import"../chunk-5yx2x4v4.js";import"../chunk-81jrzxr6.js";import"../chunk-pnfjhm01.js";import"../chunk-tgaear7n.js";import"../chunk-h6ddkhyq.js";import"../chunk-hj7gs32r.js";import"../chunk-dak0dhnx.js";import"../chunk-20jq5v1p.js";import"../chunk-hgg4aqvf.js";import"../chunk-srm0ddsk.js";import"../chunk-0d5nemtn.js";import"../chunk-v22xpr7j.js";import"../chunk-nnayqrp5.js";import"../chunk-cfjd81h8.js";import"../chunk-7pw9ayve.js";import"../chunk-yxcyqezk.js";import"../chunk-38r6thfe.js";import"../chunk-bt2n0b75.js";import"../chunk-2qbj76ap.js";import"../chunk-1t77gtcx.js";import"../chunk-x6ddycvm.js";import"../chunk-g9emajpc.js";import"../chunk-6b6rt0yh.js";import"../chunk-8vvryt8p.js";import"../chunk-0a1xppye.js";import"../chunk-vt5hr8vs.js";import"../chunk-fpa2ea8k.js";import"../chunk-qbk49jz5.js";import"../chunk-tw99ftp1.js";import"../chunk-mew3f4wh.js";import"../chunk-v6fwy63g.js";import"../chunk-wq5r1ms9.js";import"../chunk-555w3kcr.js";import"../chunk-h28vzayq.js";import"../chunk-r46rw8gr.js";import"../chunk-h7ebvy8j.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-4cr1q0yf.js";import"../chunk-7rdazac9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-daasy0pw.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{ri as discoverWorkspaceFromPackageJson,ti as discoverWorkspaceProjects,fo as generateFromPackageWorkspaces,uo as generateMonorepo,bn as generateWorkspace,ii as resolveWorkspacePatterns,ni as sortProjectsByDependencies};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/dist/chunk-6j4wx5mf.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{a,i,h,g,xe,Ue}from"./chunk-cgqg1br8.js";import{t,m,d,ze,b}from"./chunk-t5nmnzy6.js";import{lr}from"./chunk-gwa4hmfa.js";import{Ve}from"./chunk-mzxxgnp8.js";import{sr}from"./chunk-hkcqbex1.js";import{V,rr}from"./chunk-aw6spwvp.js";import{Kn}from"./chunk-h28vzayq.js";import{y,K}from"./chunk-vk5r6pgx.js";import{H}from"./chunk-cdq514ff.js";import{_e,we,je}from"./chunk-6r01zgys.js";import{n,B,W,Kt,ir,qt,z,U}from"./chunk-ywff3fq9.js";import{Hn}from"./chunk-0gy70m6b.js";import{x}from"./chunk-g743tp4d.js";import{Gt,Yn}from"./chunk-6y728pph.js";function Ii(E,ie,Q,Y,ue=""){let le=new Map,f={start:0,end:E.length,header:0,name:"",children:[],results:new Map},ee=t(E),ge=[],S=[],Ze=[],Ye=new Map;for(let J=0;J<ee.length;J++){let he=ee[J];if(he.kind!=="punctuation")continue;let Ce=E.slice(he.start,he.end);if(Ce==="(")Ze.push(J);else if(Ce===")"){let e=Ze.pop();if(e!==void 0)Ye.set(J,e)}else if(Ce==="{")S.push(J);else if(Ce==="}"){let e=S.pop();if(e===void 0)continue;let Z=ee[e].start,se=e-1,P=se>=0?E.slice(ee[se].start,ee[se].end):"";if(P===")"){let ce=Ye.get(se);if(ce!==void 0&&ce>0&&["if","for","while","switch","catch","with"].includes(E.slice(ee[ce-1].start,ee[ce-1].end)))Z=ee[ce-1].start}else if(["else","try","finally","do"].includes(P))Z=ee[se].start;ge.push({open:ee[e].start,close:he.start,header:Z})}}let q=0,me=(J,he=new Set)=>{let Ce=new Set(he),e=t(E.slice(J.start,J.end)),Z=0;for(let de=0;de+1<e.length;de++){let Qe=E.slice(J.start+e[de].start,J.start+e[de].end);if(Qe==="{")Z++;else if(Qe==="}")Z--;else if(!Z&&["type","interface"].includes(Qe))Ce.add(E.slice(J.start+e[de+1].start,J.start+e[de+1].end))}let se="",P=J.start,ce=[...J.results].map(([de,Qe])=>({type:de,name:Qe}));for(let de of J.children.sort((Qe,ot)=>Qe.header-ot.header)){let Qe=me(de,Ce);se+=E.slice(P,de.header)+`
|
|
3
|
-
declare namespace ${de.name} {
|
|
4
|
-
${Qe.text}
|
|
5
|
-
}
|
|
6
|
-
`,P=de.end+1;for(let ot of Qe.exports)ce.push({type:`${de.name}.${ot.name}`,name:ot.name})}se+=`${E.slice(P,J.end)}
|
|
7
|
-
;
|
|
8
|
-
${ce.map((de)=>`export type ${de.name} = ${de.type};`).join(`
|
|
9
|
-
`)}`;let Ee=F(se,ie,!1);for(let de of ce)Ce.add(de.name);let pe=ue?Ut(ue).map((de,Qe)=>[de,`${Le}_capture_${Qe}`]):[],Ke=Ee.map((de)=>ue&&["type","interface"].includes(de.kind)?zn(de,ue,pe,Ce):(de.kind==="variable"?x(de,!1):de.text).replace(/^export\s+/,"").replace(/^declare\s+/,"")).join(`
|
|
10
|
-
`);return{declarations:Ee,text:Ke,exports:ce}},Le;return{resolve(J,he){Le??=Q();let Ce=f;for(let Z of ge.filter((se)=>se.open<he&&he<se.close).sort((se,P)=>se.open-P.open)){let se=Ce.children.find((P)=>P.start===Z.open+1);if(!se)se={start:Z.open+1,end:Z.close,header:Z.header,name:`${Le}_scope_${q++}`,children:[],results:new Map},Ce.children.push(se);Ce=se}let e=Ce.results.get(J);if(!e)e=`${Le}_result_${le.size}`,Ce.results.set(J,e),le.set(e,J);return`${Le}.${e}`},finish(J){if(!Le)return J;let he=me(f),Ce=he.declarations,e=new Set(le.keys());if(Ce.every((se)=>e.has(se.name))){let se=new Map(le),P=t(J),ce="",Ee=0;for(let pe=0;pe+2<P.length;pe++){if(J.slice(P[pe].start,P[pe].end)!==Le||J.slice(P[pe+1].start,P[pe+1].end)!==".")continue;let Ke=se.get(J.slice(P[pe+2].start,P[pe+2].end));if(!Ke)continue;ce+=J.slice(Ee,P[pe].start)+`(${Ke})`,Ee=P[pe+2].end,pe+=2}return ce+J.slice(Ee)}if(ue){let se=Ut(ue).join(", "),P=t(J),ce="",Ee=0;for(let pe=0;pe+2<P.length;pe++){if(J.slice(P[pe].start,P[pe].end)!==Le||J.slice(P[pe+1].start,P[pe+1].end)!=="."||!e.has(J.slice(P[pe+2].start,P[pe+2].end)))continue;ce+=`${J.slice(Ee,P[pe+2].end)}<${se}>`,Ee=P[pe+2].end,pe+=2}J=ce+J.slice(Ee)}let Z=he.text;return Y({kind:"module",name:Le,text:`declare namespace ${Le} {
|
|
11
|
-
${Z}
|
|
12
|
-
}`,moduleForm:"namespace",isExported:!1}),J}}}function Ut(E){let ie=t(E),Q=[],Y=0,ue=0,le=!1;for(let f of ie){let ee=E.slice(f.start,f.end);if(ee==="<"){if(Y++,Y===1)le=!0}else if(ee===">"&&E[f.start-1]!=="=")Y--;else if(["(","[","{"].includes(ee))ue++;else if([")","]","}"].includes(ee))ue--;else if(ee===","&&Y===1&&!ue)le=!0;else if(le&&f.kind==="word"&&!["const","in","out"].includes(ee))Q.push(ee),le=!1}return Q}function zn(E,ie,Q,Y){let ue=new Set(Ut(E.generics||"")),le=(me,Le,J)=>{let he=t(me),Ce="",e=0;for(let Z=0;Z<he.length;Z++){let se=he[Z],P=me.slice(se.start,se.end),ce=he[Z+1]&&me.slice(he[Z+1].start,he[Z+1].end),Ee=he[Z+2]&&me.slice(he[Z+2].start,he[Z+2].end),pe=he[Z-1]&&me.slice(he[Z-1].start,he[Z-1].end);if(se.kind!=="word"||ce===":"||ce==="?"&&Ee===":")continue;let Ke=!J.has(P)&&pe!=="."&&Q.find(([de])=>de===P)?.[1];if(Ke)Ce+=me.slice(e,se.start)+Ke,e=se.end;else if(Le&&Y.has(P)&&!J.has(P)){let de=Q.map(([,Qe])=>Qe).join(", ");Ce+=`${me.slice(e,se.end)}<${de}${ce==="<"?", ":">"}`,e=ce==="<"?he[++Z].end:se.end}}return Ce+me.slice(e)},f=t(E.text),ee=f.findIndex((me)=>["type","interface"].includes(E.text.slice(me.start,me.end))),ge=f[ee+1],S=E.generics||"",Ze=S?E.text.indexOf(S,ge.end)+S.length:ge.end,Ye=le(qn(ie),!1,new Set),q=S?`, ${le(S.slice(1,-1),!0,ue)}`:"";return`${E.text.slice(0,ge.end)}<${Ye}${q}>${le(E.text.slice(Ze),!0,ue)}`.replace(/^export\s+/,"").replace(/^declare\s+/,"")}function qn(E){let ie=E.slice(1,-1),Q=t(ie),Y=0,ue=0,le=!1,f="";for(let ee=0;ee<Q.length;ee++){let ge=Q[ee],S=ie.slice(ge.start,ge.end);if(["(","[","{","<"].includes(S))Y++;else if([")","]","}"].includes(S)||S===">"&&ie[ge.start-1]!=="=")Y--;else if(!Y&&S==="const")f+=ie.slice(ue,ge.start),ue=ge.end;else if(!Y&&S==="="&&ie.slice(Q[ee+1]?.start,Q[ee+1]?.end)!==">")f+=ie.slice(ue,ge.start),le=!0;else if(!Y&&S===","&&le)ue=ge.start,le=!1}return f+(le?"":ie.slice(ue))}var Fe=32,Ge=9,ye=10,Oe=13,te=47,ke=42,be=39,$e=34,We=96,tt=92,N=123,ne=125,ae=40,Ae=41,De=91,Me=93,Se=60,Te=62,oe=59,nt=58,Ie=61,it=44,Ct=46,Ot=63,Cn=35,jn=64,Fn=36;function He(E){return E===Fe||E===Ge||E===ye||E===Oe}function An(E){let ie=!0;for(let Q=0;Q<E.length;Q++){let Y=E.charCodeAt(Q);if(Y===Ct){if(ie)return!1;ie=!0}else if(ie){if(!a(Y))return!1;ie=!1}else if(!i(Y))return!1}return E.length>0&&!ie}function $t(E,ie,Q){let Y=ie+1;while(Y<E.length){let ue=E.charCodeAt(Y);if(ue===tt){Y+=2;continue}if(Y++,ue===Q)break}return Y}function Gn(E){if(E==="any"||E==="object"||E==="unknown")return!0;if(E.startsWith("Record<")||E.startsWith("Array<"))return!0;return E.charCodeAt(0)===N&&E.includes("[")&&E.includes("]:")}var Qt=["public","protected","private","readonly","override"];function Wa(E,ie,Q=!0,Y=!1){return Y?R(E,ie,Q):F(E,ie,Q)}function R(E,ie,Q=!0){return Jt(E,ie,Q,!0)}function F(E,ie,Q=!0,Y){return Jt(E,ie,Q,!1,!1,Y)}function jt(E,ie,Q=!0){return Jt(E,ie,Q,!0,!0)}function Jt(E,ie,Q,Y,ue=!1,le){let f=E,ee=Q,ge=Y,S=f.length,Ze=Ue(f),Ye=V(f),q=[],me=new Map,Le=new Map;function J(s,o){let r=o.kind==="interface"||o.kind==="type";if(r){let l=Le.get(s);if(l)l.push(o);else Le.set(s,[o])}let c=me.get(s);if(!r||!c||c.kind!=="variable"&&c.kind!=="function")me.set(s,o)}let he=new Map,Ce=new Set,e=0,Z,se=0,P=[],ce=[],Ee=[],pe=[],Ke;function de(s,o=!1){let r=`__dtsx_constructor_field_${pe.length}__`;Ke??=new Set(m(f).filter((c)=>c.kind==="word").map((c)=>f.slice(c.start,c.end)).filter((c)=>c.startsWith("__dtsx_constructor_field_")));while(Ke.has(r))r+="_";return pe.push({marker:r,initializer:s,classes:P.map((c)=>c.name),namespaces:[...Ee],binding:o}),r}function Qe(s){let o=/^this\.([\w$]+)$/.exec(s);if(o){let w=P.at(-1);return w?.fields.get(`${w.isStatic?"static:":""}${o[1]}`)}let r=/^([\w$]+)\s*\(/.exec(s);if(!r||!s.endsWith(")"))return;let c=t(s),l=0;for(let w=1;w<c.length;w++){let C=s.slice(c[w].start,c[w].end);if(C==="(")l++;else if(C===")"&&--l===0&&w!==c.length-1)return}let u=[...q,...me.values()].filter((w)=>w.kind==="function"&&w.name===r[1]);if(u.length!==1||u[0].generics||Ve(f,r[1])!==1)return;return u[0].returnType}function ot(s){let o=s.trim(),r=Qe(o);if(r)return r;if(!o.startsWith("class"))return;let c=t(o);if(c[0]?.kind!=="word"||o.slice(c[0].start,c[0].end)!=="class")return;let l;do l=`__dtsx_class_${se++}`;while(f.includes(l));let u=c[1],w=u?o.slice(u.start,u.end):"",C=u?.kind==="word"&&!["extends","implements"].includes(w),A=C?w:`${l}_value`,p=C?`export ${o}`:`export class ${A} ${o.slice(5)}`,k=F(p,ie,ee),O=k.find((v)=>v.kind==="class");if(!O)throw Error("Cannot extract the class expression declaration");if(t(p.slice(O.end??p.length)).some((v)=>p.slice((O.end??0)+v.start,(O.end??0)+v.end)!==";"))return;let M=k.map((v)=>v.text.replace(/^export\s+/,"").replace(/^declare\s+/,"")).join(`
|
|
13
|
-
`);return J(l,{kind:"module",name:l,text:`declare namespace ${l} {
|
|
14
|
-
${M}
|
|
15
|
-
}`,moduleForm:"namespace",isExported:!1,start:e,end:e}),`typeof ${l}.${A}`}function xt(s,o){let r=/^this\.([\w$]+)$/.exec(s);if(r)return P.at(-1)?.fields.get(`${o?"static:":""}${r[1]}`);return ot(s)}function Zt(s){let o=he.get(s.name);if(o)o.push(s);else he.set(s.name,[s]);J(s.name,s)}if(e<S&&f.charCodeAt(e)===65279)e++;function ve(s,o){if(s<o){let r=f.charCodeAt(s),c=f.charCodeAt(o-1);if(r!==Fe&&r!==Ge&&r!==ye&&r!==Oe&&c!==Fe&&c!==Ge&&c!==ye&&c!==Oe)return f.slice(s,o)}while(s<o&&He(f.charCodeAt(s)))s++;while(o>s&&He(f.charCodeAt(o-1)))o--;return f.slice(s,o)}let Xt=/[\r\n]/g;function ft(s){return Xt.lastIndex=s,Xt.exec(f)?.index??S}function T(){if(e>=S)return;let s=f.charCodeAt(e);if(s!==Fe&&s!==Ge&&s!==ye&&s!==Oe&&s!==te)return;while(e<S){let o=f.charCodeAt(e);if(o===Fe||o===Ge||o===ye||o===Oe){e++;continue}if(o===te&&e+1<S){let r=f.charCodeAt(e+1);if(r===te){e=ft(e+2);continue}if(r===ke){let c=f.indexOf("*/",e+2);e=c===-1?S:c+2;continue}}break}}function wn(s){if(s.indexOf("//")===-1&&s.indexOf("/*")===-1)return s;let o=0,r=0;while(r<s.length){let c=s.charCodeAt(r);if(c===be||c===$e||c===We){r=$t(s,r,c),o=r;continue}if(c===tt){r+=2,o=Math.min(r,s.length);continue}if(c===te&&s.charCodeAt(r+1)===te){while(r<s.length&&s.charCodeAt(r)!==ye&&s.charCodeAt(r)!==Oe)r++;continue}if(c===te&&s.charCodeAt(r+1)===ke){let l=s.indexOf("*/",r+2);r=l===-1?s.length:l+2;continue}if(r++,c>32)o=r}return o<s.length?s.slice(0,o).trimEnd():s}function $n(s){let o=s.length,r=0,c=o;for(let l=0;l<o;l++){let u=s.charCodeAt(l);if(r){if(u===tt){l++;continue}if(u===r)r=0;continue}if(u===be||u===$e||u===We){r=u;continue}if(u===te&&l+1<o){let w=s.charCodeAt(l+1);if(w===te){c=l;while(c>0&&(s.charCodeAt(c-1)===Fe||s.charCodeAt(c-1)===Ge))c--;return s.slice(0,c)}if(w===ke){let C=s.indexOf("*/",l+2);if(C!==-1){s=`${s.slice(0,l)} ${s.slice(C+2)}`,l--;continue}}}}c=o;while(c>0&&(s.charCodeAt(c-1)===Fe||s.charCodeAt(c-1)===Ge||s.charCodeAt(c-1)===Oe))c--;return c<o?s.slice(0,c):s}function st(s){e++;let o=s===be?"'":'"';while(e<S){let r=f.indexOf(o,e);if(r===-1){e=S;return}let c=0,l=r-1;while(l>=0&&f.charCodeAt(l)===tt)c++,l--;if(c%2===0){e=r+1;return}e=r+1}}function At(){e++;let s=[];while(e<S){let o=f.charCodeAt(e);if(s.length===0){if(o===tt){e+=2;continue}if(o===We){e++;return}if(o===Fn&&e+1<S&&f.charCodeAt(e+1)===N){e+=2,s.push(0);continue}e++;continue}if(o===be||o===$e){st(o);continue}if(o===We){At();continue}if(o===te&&e+1<S){let r=f.charCodeAt(e+1);if(r===te){e=ft(e+2);continue}if(r===ke){let c=f.indexOf("*/",e+2);e=c===-1?S:c+2;continue}if(Yt()){en();continue}e++;continue}if(o===N){s[s.length-1]++,e++;continue}if(o===ne){let r=s[s.length-1];if(r===0){s.pop(),e++;continue}s[s.length-1]=r-1,e++;continue}e++}}let Et=!1;function qe(){Et=!1;let s=f.charCodeAt(e);if(s===be||s===$e)return st(s),!0;if(s===We)return At(),!0;if(s===te&&e+1<S){let o=f.charCodeAt(e+1);if(o===te)return e=ft(e+2),!0;if(o===ke){let r=f.indexOf("*/",e+2);return Et=ft(e+2)<(r===-1?S:r),e=r===-1?S:r+2,!0}if(Yt())return en(),!0}return!1}function Yt(){return h(f,e)}function en(){e=g(f,e)}function Re(){let s=e;while(e<S&&i(f.charCodeAt(e)))e++;return f.slice(s,e)}function _(s){if(e+s.length>S)return!1;for(let o=0;o<s.length;o++)if(f.charCodeAt(e+o)!==s.charCodeAt(o))return!1;if(e+s.length<S&&i(f.charCodeAt(e+s.length)))return!1;return!0}function yt(s){let o=e+s;while(o<S){let r=f.charCodeAt(o);if(r===Fe||r===Ge||r===ye||r===Oe){o++;continue}return r!==Ct&&r!==Ie}return!1}function tn(){if(!Et)return!1;let s=e;T();let o=e>=S||Rt()||f.charCodeAt(e)===ne;return e=s,o}function Rt(){if(e>=S)return!1;switch(f.charCodeAt(e)){case 101:return _("export")||_("enum");case 105:return _("import")||_("interface");case 102:return _("function");case 99:return _("class")||_("const");case 116:return _("type");case 108:return _("let");case 118:return _("var");case 100:return _("declare")||_("default");case 109:return _("module");case 110:return _("namespace");case 97:return _("abstract")||_("async");default:return!1}}function ht(){let s=f.charCodeAt(e);if(s!==ye&&s!==Oe)return!1;let o=e;if(e++,s===Oe&&e<S&&f.charCodeAt(e)===ye)e++;while(e<S){let c=f.charCodeAt(e);if(c===Fe||c===Ge||c===Oe||c===ye){e++;continue}if(c===te&&e+1<S){let l=f.charCodeAt(e+1);if(l===te){e=ft(e+2);continue}if(l===ke){let u=f.indexOf("*/",e+2);e=u===-1?S:u+2;continue}}break}let r=e>=S||Rt()||f.charCodeAt(e)===ne;return e=o,r}function xn(s){let o=s-1;while(o>=0){let A=f.charCodeAt(o);if(A===Fe||A===Ge||A===Oe||A===ye){o--;continue}break}if(o<0)return!0;let r=f[o];if("+-*/%=<>&|^!~?:,.([{".includes(r))return!0;let c=o;while(c>0&&f.charCodeAt(c-1)!==ye)c--;let l=f.slice(c,o+1),u=l.lastIndexOf("<");if(u!==-1&&/^<[A-Za-z]/.test(l.slice(u))&&!l.slice(u).includes(">"))return!0;let w=o;while(w>=0&&/[a-z]/i.test(f[w]))w--;let C=f.slice(w+1,o+1);return["as","in","of","new","typeof","keyof","extends","instanceof","satisfies","await","return","yield","void"].includes(C)}function yn(s,o){let r=f.charCodeAt(e);if(r!==ye&&r!==Oe&&!(r===te&&(f[e+1]==="/"||f[e+1]==="*")))return!1;let c=m(f),l=0,u=c.length;while(l<u){let k=l+u>>>1;if(c[k].start<e)l=k+1;else u=k}let w=c[l-1],C=c[l];if(!w||w.start<s||!/[\r\n]/.test(f.slice(e,C?.start??S)))return!1;let A=f.slice(w.start,w.end);if(w.end!==o&&w.kind==="punctuation"&&"+-*/%=<>&|^!~?:,.([{".includes(A))return!1;if(w.kind==="word"&&["as","in","of","new","typeof","keyof","extends","instanceof","satisfies","await","return","yield","void"].includes(A))return!1;if(!C)return!0;let p=f.slice(C.start,C.end);return!(".?:)]},+-*/%<>=&|^`([".includes(p)||C.kind==="literal"&&f.charCodeAt(C.start)===We||["as","satisfies","instanceof","in"].includes(p))}function nn(){let s=f.charCodeAt(e);if(s!==ye&&s!==Oe)return!1;if(xn(e))return!1;let o=e;e++;while(e<S){let l=f.charCodeAt(e);if(l===Fe||l===Ge||l===Oe||l===ye){e++;continue}if(l===te&&e+1<S){let u=f.charCodeAt(e+1);if(u===te){e=ft(e+2);continue}if(u===ke){let w=f.indexOf("*/",e+2);e=w===-1?S:w+2;continue}}break}let r=e<S?f[e]:"",c=r==="|"||r==="&"||r==="["||r==="."||r==="?"||r===":"||r===">"||r===")"||r===","||_("extends");return e=o,!c}function bt(){let s=f.charCodeAt(e);if(s!==ye&&s!==Oe)return!1;let o=e;if(e++,s===Oe&&e<S&&f.charCodeAt(e)===ye)e++;while(e<S){let c=f.charCodeAt(e);if(c===Fe||c===Ge||c===Oe||c===ye){e++;continue}if(c===te&&e+1<S&&f.charCodeAt(e+1)===te){e=ft(e+2);continue}break}if(e>=S)return e=o,!0;let r=f.charCodeAt(e);if(r===124||r===38||r===Ct||r===Ot||r===nt)return e=o,!1;if(_("extends")||_("keyof")||_("typeof")||_("infer")||_("is")||_("as")||_("in"))return e=o,!1;return e=o,!0}let vn=/[{}'"`\/]/g,Sn=/[()'"`\/]/g,_n=/[[\]'"`\/]/g,Dn=/[<>'"`\/]/g;function Be(s,o){let r=1;e++;let c=s===N?vn:s===ae?Sn:s===De?_n:Dn;c.lastIndex=e;let l;while((l=c.exec(f))!==null){let u=l.index,w=f.charCodeAt(u);if(w===be||w===$e){e=u,st(w),c.lastIndex=e;continue}if(w===We){e=u,At(),c.lastIndex=e;continue}if(w===te){if(e=u,qe()){c.lastIndex=e;continue}c.lastIndex=u+1;continue}if(w===s)r++;else if(w===o){if(o===Te&&u>0&&f.charCodeAt(u-1)===Ie){c.lastIndex=u+1;continue}if(r--,r===0)return e=u+1,e}c.lastIndex=u+1}return e=S,e}function et(){return e>0&&f.charCodeAt(e-1)===Ie}function Mt(){return e+1<S&&f.charCodeAt(e+1)===Te}let Je=/[<{};'"`\/\n\r()[\]]/g;function Ne(s=!1){let o=0,r=0,c=0,l=0,u=f.charCodeAt(e)===N;Je.lastIndex=e;let w;while((w=Je.exec(f))!==null){let C=w.index,A=f.charCodeAt(C);if(A===be||A===$e){e=C,st(A),Je.lastIndex=e;continue}if(A===We){e=C,At(),Je.lastIndex=e;continue}if(A===te){if(C>0&&f.charCodeAt(C-1)===Se){Je.lastIndex=C+1;continue}if(e=C,qe()){if(o===0&&r===0&&c===0&&l===0&&tn())return;Je.lastIndex=e;continue}Je.lastIndex=C+1;continue}if(A===Se){let p=Ze(C)?.delta??null;if(p!==null)l=Math.max(0,l+p);Je.lastIndex=C+1;continue}if(A===ae){r++,Je.lastIndex=C+1;continue}if(A===Ae){r--,Je.lastIndex=C+1;continue}if(A===De){c++,Je.lastIndex=C+1;continue}if(A===Me){c--,Je.lastIndex=C+1;continue}if(A===N){o++,Je.lastIndex=C+1;continue}if(A===ne){let p=o>0;if(!p&&s&&r===0&&c===0&&l===0){e=C;return}if(p)o--;if((!p||u)&&o===0&&r===0&&c===0&&l===0){e=C+1;return}if(p&&o===0&&r===0&&c===0&&l===0){e=C+1;let k=e;T();let O=Rt();if(e=k,O)return}Je.lastIndex=C+1;continue}if(A===oe&&o===0&&r===0&&c===0&&l===0){e=C+1;return}if((A===ye||A===Oe)&&o===0&&r===0&&c===0&&l===0){if(e=C,ht())return}Je.lastIndex=C+1}e=S}function Tn(){e++;while(e<S&&(f.charCodeAt(e)===Fe||f.charCodeAt(e)===Ge))e++;let s=f.indexOf(`
|
|
16
|
-
`,e),o=s===-1?S:s,r=f.indexOf(";",e);if(r!==-1&&r<o){let c=r-1;while(c>=e&&(f.charCodeAt(c)===Fe||f.charCodeAt(c)===Ge))c--;let l=f.charCodeAt(e),u=f.charCodeAt(c);if(l===N&&u===ne||l===De&&u===Me||l===be&&u===be||l===$e&&u===$e||l===We&&u===We){e=r+1;return}}Ne()}function sn(){Be(N,ne);while(e<S&&He(f.charCodeAt(e)))e++;if(_("from")){e+=4;while(e<S&&He(f.charCodeAt(e)))e++;if(e<S){let s=f.charCodeAt(e);if(s===be||s===$e)st(s)}}while(e<S&&(f.charCodeAt(e)===Fe||f.charCodeAt(e)===Ge))e++;if(e<S&&f.charCodeAt(e)===oe)e++}function rn(){e++;while(e<S&&He(f.charCodeAt(e)))e++;if(_("as")){e+=2;while(e<S&&He(f.charCodeAt(e)))e++;Re();while(e<S&&He(f.charCodeAt(e)))e++}if(_("from")){e+=4;while(e<S&&He(f.charCodeAt(e)))e++;if(e<S){let s=f.charCodeAt(e);if(s===be||s===$e)st(s)}}while(e<S&&(f.charCodeAt(e)===Fe||f.charCodeAt(e)===Ge))e++;if(e<S&&f.charCodeAt(e)===oe)e++}function vt(s){let o=s.indexOf("from ");if(o===-1)return;let r=o+5;while(r<s.length&&(s.charCodeAt(r)===32||s.charCodeAt(r)===9))r++;if(r>=s.length)return;let c=s.charCodeAt(r);if(c!==39&&c!==34)return;let l=s.indexOf(s[r],r+1);if(l===-1)return;return s.slice(r+1,l)}function Xe(s){if(!ee)return;let o=s-1;while(o>=0&&He(f.charCodeAt(o)))o--;if(o<0)return;let r=[],c=!1;while(o>=0){if(o>=1&&f.charCodeAt(o)===te&&f.charCodeAt(o-1)===ke){let w=f.lastIndexOf("/*",o-2);if(w>=0){r.push(f.slice(w,o+1)),c=!0,o=w-1;while(o>=0&&He(f.charCodeAt(o)))o--;continue}break}let l=o;while(l>0&&f.charCodeAt(l-1)!==ye)l--;let u=ve(l,o+1);if(u.startsWith("//")){if(c)break;let w=[u];o=l-1;while(o>=0&&(f.charCodeAt(o)===ye||f.charCodeAt(o)===Oe))o--;while(o>=0){let C=o;while(C>0&&f.charCodeAt(C-1)!==ye)C--;let A=ve(C,o+1);if(A.startsWith("//")){w.push(A),o=C-1;while(o>=0&&(f.charCodeAt(o)===ye||f.charCodeAt(o)===Oe))o--}else if(A===""){o=C-1;while(o>=0&&(f.charCodeAt(o)===ye||f.charCodeAt(o)===Oe))o--}else break}w.reverse(),r.push(w.join(`
|
|
17
|
-
`));continue}break}if(r.length===0)return;return r.reverse(),r}function In(s){let o=s,r=!1,c=0,l;while(e<S){let I=f.charCodeAt(e);if(I===te&&(f.charCodeAt(e+1)===te||f.charCodeAt(e+1)===ke)){T();continue}if(I===oe){e++;break}if(I===N)c++;else if(I===ne&&c>0)c--;if(I===be||I===$e){if(st(I),c>0)continue;r=!0;let M=e;if(T(),f.charCodeAt(e)===Ae){let v=e+1;l=ze(f.slice(o,v)),e=l?v:M}else e=M;while(e<S&&(f.charCodeAt(e)===Fe||f.charCodeAt(e)===Ge))e++;if(e<S&&f.charCodeAt(e)===oe)e++;break}if(I===ye&&r)break;e++}let u=ve(o,e),w=b(u).find((I)=>I.category==="static-import"),C=t(u),A=l?.isTypeOnly??w?.isTypeOnly??!1,p=C[1]?.kind==="quoted",k=l?.source??w?.specifier??"",O=Xe(o);return{kind:"import",name:"",text:u,isExported:!1,isTypeOnly:A,isSideEffect:p,source:k,leadingComments:O,start:o,end:e}}function Pt(){let s=e;return Be(N,ne),f.slice(s,e)}function on(s){let o=s.indexOf("(");if(o===-1)return s;let r=s.slice(o);if(r.indexOf("=")===-1)return s;let c=!1;for(let A=0;A<r.length;A++)if(r.charCodeAt(A)===61){let k=A>0?r.charCodeAt(A-1):0,O=A+1<r.length?r.charCodeAt(A+1):0;if(k!==61&&k!==33&&k!==60&&k!==62&&O!==61&&O!==62){c=!0;break}}if(!c)return s;let l=0,u=-1;for(let A=o;A<s.length;A++){let p=s.charCodeAt(A);if(p===40)l++;else if(p===41){if(l--,l===0){u=A;break}}}if(u===-1)return s;let w=s.slice(o,u+1),C=pt(w);return s.slice(0,o)+C+s.slice(u+1)}function cn(s){let o=s.indexOf("//")!==-1||s.indexOf("/*")!==-1,r=s.split(`
|
|
18
|
-
`),c=[],l=[],u=[],w=!1,C=1/0;for(let k=0;k<r.length;k++){let O=r[k];if(o){if(w){if(O.includes("*/"))w=!1;continue}let I=O.trim();if(I.length===0)continue;let M=I.charCodeAt(0);if(M===te){let X=I.charCodeAt(1);if(X===te)continue;if(X===ke){if(!I.includes("*/"))w=!0;continue}}if(M===ke)continue;let v=$n(O);if(v.charCodeAt(v.length-1)===oe)v=v.slice(0,-1);v=on(v);let D=v.trim();if(!D)continue;c.push(v),l.push(D);let G=0;while(G<v.length&&He(v.charCodeAt(G)))G++;if(D!=="{"&&D!=="}"){if(G<C)C=G}u.push(G)}else{let I=O.length;while(I>0&&(O.charCodeAt(I-1)===Fe||O.charCodeAt(I-1)===Ge||O.charCodeAt(I-1)===Oe))I--;if(I===0)continue;let M=I<O.length?O.slice(0,I):O;if(M.charCodeAt(M.length-1)===oe)M=M.slice(0,-1);M=on(M);let v=M.trim();if(!v)continue;c.push(M),l.push(v);let D=0;while(D<M.length&&He(M.charCodeAt(D)))D++;if(v!=="{"&&v!=="}"){if(D<C)C=D}u.push(D)}}if(c.length===0)return"{}";if(C===1/0||C<=2)return c.join(`
|
|
19
|
-
`);let A=C-2,p=Array(c.length);for(let k=0;k<c.length;k++){let O=l[k];if(O==="{"){p[k]=O;continue}let I=u[k];if(I>C)p[k]=c[k];else if(I===C&&(O.charCodeAt(0)===ne||O.charCodeAt(0)===Me||O.charCodeAt(0)===Ae))p[k]=c[k];else{let M=Math.max(0,I-A);p[k]=" ".repeat(M)+O}}return p.join(`
|
|
20
|
-
`)}function rt(){if(e>=S||f.charCodeAt(e)!==Se)return"";let s=e;Be(Se,Te);let o=f.slice(s,e);if(o.includes(`
|
|
21
|
-
`)){let r="",c=!1;for(let l=0;l<o.length;l++){let u=o.charCodeAt(l);if(u===32||u===9||u===10||u===13){if(!c&&r.length>0)r+=" ",c=!0}else r+=o[l],c=!1}if(r.charCodeAt(1)===32)r=`<${r.slice(2)}`;if(r.charCodeAt(r.length-2)===32)r=`${r.slice(0,-2)}>`;return r}return o}function ct(){if(e>=S||f.charCodeAt(e)!==ae)return"()";let s=e;return Be(ae,Ae),f.slice(s,e)}function St(s){if(s.indexOf("/")===-1)return s;let o="",r=!1,c=0;for(let l=0;l<s.length;l++){let u=s.charCodeAt(l);if(r){if(o+=s[l],u===tt&&l+1<s.length){o+=s[++l];continue}if(u===c)r=!1;continue}if(u===be||u===$e||u===We){r=!0,c=u,o+=s[l];continue}if(u===te&&l+1<s.length){let w=s.charCodeAt(l+1);if(w===ke){let C=s.indexOf("*/",l+2);l=C===-1?s.length:C+1,o+=" ";continue}if(w===te){let C=s.indexOf(`
|
|
22
|
-
`,l+2);l=C===-1?s.length:C-1;continue}if(h(s,l)){let C=g(s,l);o+=s.slice(l,C),l=C-1;continue}}o+=s[l]}return o.trim()}function pt(s){let o=s.slice(1,-1).trim();if(!o)return"()";if(s.indexOf(`
|
|
23
|
-
`)===-1&&o.indexOf(":")!==-1&&o.indexOf("{")===-1&&o.indexOf("[")===-1&&o.indexOf("=")===-1&&o.indexOf("@")===-1&&o.indexOf("...")===-1){let A=0,p=0,k=0;for(let O=0;O<o.length;O++){let I=o.charCodeAt(O);if(I===ae||I===Se||I===N)k++;else if(I===Ae||I===Te||I===ne)k--;else if(k===0){if(I===nt)A++;else if(I===it)p++}}if(A>=p+1){let O=!1;for(let I=0;I<Qt.length;I++){let M=Qt[I],v=o.indexOf(M);if(v!==-1){let D=v+M.length;if((v===0||!i(o.charCodeAt(v-1)))&&(D>=o.length||!i(o.charCodeAt(D)))){O=!0;break}}}if(!O)return s}}let r=[],c=0,l=0,u=!1,w=0;for(let A=0;A<=o.length;A++){if(A===o.length){r.push(St(o.slice(c).trim()));break}let p=o.charCodeAt(A);if(u){if(p===tt){A++;continue}if(p===w)u=!1;continue}if(p===te&&A+1<o.length){let k=o.charCodeAt(A+1);if(k===ke){A+=2;while(A+1<o.length&&!(o.charCodeAt(A)===ke&&o.charCodeAt(A+1)===te))A++;A++;continue}if(k===te){while(A<o.length&&o.charCodeAt(A)!==10)A++;continue}if(h(o,A)){A=g(o,A)-1;continue}}if(p===be||p===$e||p===We){u=!0,w=p;continue}if(p===ae||p===N||p===De||p===Se)l++;else if(p===Ae||p===ne||p===Me||p===Te&&!(A>0&&o.charCodeAt(A-1)===Ie))l--;else if(p===it&&l===0)r.push(St(o.slice(c,A).trim())),c=A+1}let C=[];for(let A of r){if(!A)continue;let p=A.trim();if(p.startsWith("//")||p.startsWith("/*"))continue;let k=A;{let O=!1,I=0,M=0,v=0;for(let D=0;D<k.length-1;D++){let G=k.charCodeAt(D);if(G===ye){v=D+1;continue}if(O){if(G===tt){D++;continue}if(G===I)O=!1;continue}if(G===be||G===$e||G===We){O=!0,I=G;continue}if(G===N||G===De||G===ae||G===Se){M++;continue}if(G===ne||G===Me||G===Ae||G===Te){if(M>0)M--;continue}if(G===te&&h(k,D)){D=g(k,D)-1;continue}if(G===te&&k.charCodeAt(D+1)===te){if(M===0){k=k.slice(0,D).trimEnd();break}let X=k.indexOf(`
|
|
24
|
-
`,D);if(X===-1){k=k.slice(0,v).trimEnd();break}let j=k.slice(0,v),L=k.slice(X+1);k=`${j}${L}`,D=v-1}}}if(!k.trim())continue;C.push(an(k))}return _e(`(${C.join(", ")})`)}function On(s){if(!s.startsWith("{")&&!s.startsWith("["))return s;let o="",r=0,c=0,l=!1,u=0;while(r<s.length){let w=s.charCodeAt(r);if(l){if(w===tt&&r+1<s.length){o+=s[r]+s[r+1],r+=2;continue}if(w===u)l=!1;o+=s[r],r++;continue}if(w===te&&r+1<s.length){let C=s.charCodeAt(r+1);if(C===ke){let A=r;r+=2;while(r+1<s.length&&!(s.charCodeAt(r)===ke&&s.charCodeAt(r+1)===te))r++;r=Math.min(r+2,s.length),o+=s.slice(A,r);continue}if(C===te){let A=r;while(r<s.length&&s.charCodeAt(r)!==10)r++;o+=s.slice(A,r);continue}}if(w===be||w===$e||w===We){l=!0,u=w,o+=s[r],r++;continue}if(w===N||w===De||w===ae)c++;else if(w===ne||w===Me||w===Ae)c--;if(c>=1&&w===Ie&&(r+1>=s.length||s.charCodeAt(r+1)!==Ie&&s.charCodeAt(r+1)!==Te)){while(o.length>0&&(o[o.length-1]===" "||o[o.length-1]==="\t"||o[o.length-1]===`
|
|
25
|
-
`))o=o.slice(0,-1);r++;let C=0;while(r<s.length){let A=s.charCodeAt(r);if(A===te){if(s.charCodeAt(r+1)===te){let p=s.indexOf(`
|
|
26
|
-
`,r+2);r=p===-1?s.length:p+1;continue}if(s.charCodeAt(r+1)===ke){let p=s.indexOf("*/",r+2);r=p===-1?s.length:p+2;continue}if(h(s,r)){r=g(s,r);continue}}if(A===be||A===$e||A===We){let p=A;r++;while(r<s.length){if(s.charCodeAt(r)===tt){r+=2;continue}if(s.charCodeAt(r)===p){r++;break}r++}continue}if(A===N||A===De||A===ae)C++;else if(A===ne||A===Me||A===Ae){if(C===0)break;C--}else if(A===it&&C===0)break;r++}continue}o+=s[r],r++}return o}function an(s){let o=s.trim(),r=o.startsWith("...");if(r)o=o.slice(3).trim();while(o.startsWith("@")){let v=1;while(v<o.length&&i(o.charCodeAt(v)))v++;if(v<o.length&&o.charCodeAt(v)===ae){let D=1;v++;while(v<o.length&&D>0){if(o.charCodeAt(v)===ae)D++;else if(o.charCodeAt(v)===Ae)D--;v++}}o=o.slice(v).trim()}let c=!0;while(c){c=!1;for(let v of Qt)if(o.startsWith(v)&&o.length>v.length&&!i(o.charCodeAt(v.length))){let D=o.slice(v.length).trim();if(D.charCodeAt(0)===nt||D.charCodeAt(0)===Ot&&D.length>1&&D.charCodeAt(1)===nt)break;o=D,c=!0;break}}let l=-1,u=-1,w=0,C=!1,A=0;for(let v=0;v<o.length;v++){let D=o.charCodeAt(v);if(C){if(D===tt){v++;continue}if(D===A)C=!1;continue}if(D===te&&v+1<o.length){let G=o.charCodeAt(v+1);if(G===ke){v+=2;while(v+1<o.length&&!(o.charCodeAt(v)===ke&&o.charCodeAt(v+1)===te))v++;v++;continue}if(G===te){while(v<o.length&&o.charCodeAt(v)!==10)v++;continue}if(h(o,v)){v=g(o,v)-1;continue}}if(D===be||D===$e||D===We){C=!0,A=D;continue}if(D===ae||D===N||D===De||D===Se)w++;else if(D===Ae||D===ne||D===Me||D===Te&&!(v>0&&o.charCodeAt(v-1)===Ie))w--;else if(w===0){if(D===nt&&l===-1)l=v;else if(D===Ie&&u===-1&&(v===0||o.charCodeAt(v-1)!==Ie)&&(v+1>=o.length||o.charCodeAt(v+1)!==Ie&&o.charCodeAt(v+1)!==Te))u=v}}let p,k,O=u!==-1;if(l!==-1&&(u===-1||l<u))if(p=o.slice(0,l).trim(),u!==-1)k=o.slice(l+1,u).trim();else k=o.slice(l+1).trim();else if(u!==-1){p=o.slice(0,u).trim();let v=r?null:we(p,o.slice(u+1));if(v)return je(v,kt);k=kt(o.slice(u+1).trim())}else p=o,k="unknown";if(p=On(p),(p.startsWith("{")||p.startsWith("["))&&p.includes(`
|
|
27
|
-
`)){let v=p.replace(/\s*\n\s*/g," ").replace(/\s+/g," ");if(v.length<=40)p=v;else p=p.split(`
|
|
28
|
-
`).map((G)=>{let X=G.trim();if(!X)return"";if(X==="{"||X==="}"||X==="["||X==="]"||X.startsWith("}")||X.startsWith("]"))return X;return` ${X}`}).join(`
|
|
29
|
-
`)}let I=p.endsWith("?")||O;if(p.endsWith("?"))p=p.slice(0,-1).trim();let M=I&&!r?"?":"";if(r)return`...${p}: ${k}`;return`${p}${M}: ${k}`}function kt(s){let o=s.trim(),r=Qe(o);if(r)return r;if(o==="true"||o==="false")return"boolean";if(y(o))return"number";if(o.startsWith("'")&&o.endsWith("'")||o.startsWith('"')&&o.endsWith('"'))return"string";if(o.startsWith("["))return"unknown[]";if(o.startsWith("{"))return"Record<string, unknown>";return z(o)??"unknown"}function Wt(s){let o=s.trim();if(o.endsWith("as const"))o=o.slice(0,-8).trim();if(o==="true"||o==="false")return o;if(y(o))return K(o);let r=En(o);if(r!==null)return r;return z(o)??"unknown"}function En(s){if(s==="")return null;if(s.charCodeAt(0)===be||s.charCodeAt(0)===$e){if($t(s,0,s.charCodeAt(0))===s.length)return s}let o=Rn(s,"+");if(o.length>1){let r=!1,c=!0,l=[];for(let u of o){let w=u.trim(),C=w.charCodeAt(0);if((C===be||C===$e)&&$t(w,0,C)===w.length)r=!0,l.push(Mn(w));else c=!1}if(c)return Pn(l.join(""));if(r)return"string";return null}if(/^[\d\s()+*/%.\-]+$/.test(s)&&/\d/.test(s)&&/[+*/%\-\s]/.test(s))return"number";return null}function Rn(s,o){let r=[],c=0,l="",u=0;while(u<s.length){let w=s.charCodeAt(u);if(w===be||w===$e||w===We){let C=$t(s,u,w);l+=s.slice(u,C),u=C;continue}if(w===te&&(s.charCodeAt(u+1)===te||s.charCodeAt(u+1)===42)){if(s.charCodeAt(u+1)===te){let p=s.indexOf(`
|
|
30
|
-
`,u+2),k=p===-1?s.length:p;l+=s.slice(u,k),u=k;continue}let C=s.indexOf("*/",u+2),A=C===-1?s.length:C+2;l+=s.slice(u,A),u=A;continue}if(w===ae||w===De||w===N)c++;else if(w===Ae||w===Me||w===ne)c--;if(s[u]===o&&c===0){r.push(l),l="",u++;continue}l+=s[u],u++}return r.push(l),r}function Mn(s){return s.slice(1,-1).replace(/\\(.)/g,(r,c)=>{if(c==="n")return`
|
|
31
|
-
`;if(c==="t")return"\t";if(c==="r")return"\r";if(c==="0")return"\x00";return c})}function Pn(s){return`'${s.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}'`}function _t(s){if(s.endsWith("as const"))return null;let o=0,r=-1;for(let l=0;l<s.length;l++){let u=s.charCodeAt(l);if(u===be||u===$e||u===We)l=$t(s,l,u)-1;else if(u===123||u===91||u===40)o++;else if(u===125||u===93||u===41)o--;else if(o===0&&u===32&&l+4<=s.length&&s.substring(l,l+4)===" as ")r=l}if(r===-1)return null;return s.slice(r+4).trim()||null}function wt(){if(T(),e<S&&f.charCodeAt(e)===nt){let c=function(){let l=ve(s,r),u=(w)=>{let C=l.length-w.length;return C>=0&&l.endsWith(w)&&(C===0||!i(l.charCodeAt(C-1)))};return l.length===0||l.endsWith("=>")||l.endsWith("|")||l.endsWith("&")||u("is")||u("extends")};e++,T();let s=e,o=0,r=s;while(e<S){let l=e;if(qe()){if(f.charCodeAt(l)!==te)r=e;continue}let u=f.charCodeAt(e);if(u===ae||u===De||u===Se)o++;else if(u===Ae||u===Me||u===Te&&!et())o--;else if(u===N)if(o>0)o++;else if(c())o++;else break;else if(u===ne){if(o===0)break;o--}else if(o===0&&u===oe)break;if(o===0&&bt()&&!c())break;if(!He(u))r=e+1;e++}return ve(s,e)}return""}function at(s,o,r,c){e+=8,T();let l=e<S&&f.charCodeAt(e)===ke;if(l)e++,T();let u=Re();if(!u&&!c)return null;T();let w=rt();T();let C=ct();T();let A=wt(),p=A.length>0;if(!A)if(r&&l)A="AsyncGenerator<unknown, void, unknown>";else if(l)A="Generator<unknown, void, unknown>";else if(r)A="Promise<void>";else A="void";T();let k=!1;if(e<S&&f.charCodeAt(e)===N){k=!0;let X=e+1;if(Be(N,ne),!p&&!l){let j=f.slice(X,e-1),L=Ii(j,ie??"stdin.ts",()=>{let fe;do fe=`__dtsx_return_${se++}`;while(f.includes(fe));return fe},(fe)=>J(fe.name,{...fe,start:e,end:e}),w);A=L.finish(B(j,r,C,ot,L.resolve))}}else if(e<S&&f.charCodeAt(e)===oe)e++;let O=pt(C),v=`${o?c?"export default function ":"export declare function ":"declare function "}${u||(c?"":"default")}${w}${O}: ${A};`,D=Xe(s),G={kind:"function",name:u||"default",text:v,isExported:o,isDefault:c,isAsync:r,isGenerator:l,returnType:A,generics:w||void 0,leadingComments:D,start:s,end:e};if(k)Ce.add(G);return G}let Bt,Wn=0;function ln(){Bt??=new Set(t(f).filter((s)=>s.kind==="word").map((s)=>f.slice(s.start,s.end)));for(;;){let s=`__dtsx_binding_${Wn++}`;if(Bt.has(s))continue;return Bt.add(s),s}}function dt(s,o,r){e+=o.length,T();let c=[];do{if(T(),e>=S)break;let l=f.charCodeAt(e),u,w=e;if(l===N||l===De)Be(l,l===N?ne:Me),u=f.slice(w,e);let C=u?ln():Re();if(!C)return Ne(),c;T();let A,p,k,O=!1;if(e<S&&f.charCodeAt(e)===nt){e++,T();let X=e,j=0;while(e<S){if(qe()){if(j===0&&tn())break;continue}let L=f.charCodeAt(e);if(L===ae||L===N||L===De||L===Se)j++;else if(L===Ae||L===ne||L===Me||L===Te&&!et())j--;else if(j===0&&(L===oe||L===it))break;else if(j===0&&L===Ie&&!Mt())break;if(j===0&&(ht()||nn()))break;e++}A=ve(X,e)}if(e<S&&f.charCodeAt(e)===Ie)if(ge&&A&&(!ee||!Gn(A)))Tn();else{e++,T();let X=e;k=X;let j=0,L=0,fe;while(e<S){if(j===0&&L===0&&yn(X,fe))break;if(qe())continue;let re=f.charCodeAt(e);if(re===ae||re===N||re===De)j++;else if(re===Ae||re===ne||re===Me)j--;else if(re===Se){Z??=H(f);let Pe=j===0&&L===0?Z(e,X,fe):void 0;if(Pe?.parameters||Pe?.completeOperand||Pe&&ie!==void 0&&!/\.[jt]sx$/.test(ie)){e=Pe.end,fe=Pe.completeOperand?Pe.end:void 0;continue}let ut=L>0||f[e+1]!=="/"&&xe(f,e)?Ze(e):null;if(ut){if(L=Math.max(0,L+ut.delta),e=ut.end+1,L===0)fe=e;continue}else if(L===0){if(Pe){e=Pe.end,fe=Pe.completeOperand?Pe.end:void 0;continue}}}else if(j===0&&L===0&&(re===oe||re===it))break;e++}if(p=wn(ve(X,e)),p.endsWith(" as const")||p==="const"){if(O=!0,!A){let re=p.endsWith(" as const")?p.slice(0,-9).trim():p,Pe=Wt(re);A=Pe!=="unknown"?Pe:void 0}}else if(!A){let re=U(p)??_t(p)??ot(p);if(re)A=re}}let I=c.length===0?Xe(s):void 0,M=u?"const":o,v=u?!1:r,D=`${v?"export ":""}declare ${M} ${C}: ${A||"unknown"};`,G={kind:"variable",name:C,text:D,isExported:v,typeAnnotation:A,value:p,initializerStart:k,modifiers:O?[M,"const assertion"]:[M],leadingComments:u?void 0:I,start:s,end:e};if(u)c.push(...lr({pattern:u,patternOffset:w,root:G,kind:o,exported:r,comments:I,allocateName:ln}));else c.push(G);if(f.charCodeAt(e)===it){e++;continue}if(f.charCodeAt(e)===oe)e++;break}while(e<S);return c}function Lt(s,o){e+=9,T();let r=Re();T();let c=rt();T();let l="";if(_("extends")){e+=7,T();let p=e,k=0;while(e<S){if(qe())continue;let O=f.charCodeAt(e);if(O===Se)k++;else if(O===Te&&!et())k--;else if(O===N&&k===0)break;e++}l=ve(p,e)}T();let u=e<S&&f.charCodeAt(e)===N?Pt():"{}",w=cn(u),C=`${o?"export ":""}declare interface ${r}${c}${l?` extends ${l}`:""} ${w}`,A=Xe(s);return{kind:"interface",name:r,text:C,isExported:o,extends:l||void 0,generics:c||void 0,leadingComments:A,start:s,end:e}}function Nt(s,o){e+=4,T();let r=Re();T();let c=rt();if(T(),e<S&&f.charCodeAt(e)===Ie)e++;T();let l=e,u=0;while(e<S){if(qe())continue;let p=f.charCodeAt(e);if(p===ae||p===N||p===De||p===Se)u++;else if(p===Ae||p===ne||p===Me||p===Te&&!et())u--;else if(u===0&&p===oe)break;if(u===0&&(ht()||nn()))break;e++}let w=ve(l,e);if(e<S&&f.charCodeAt(e)===oe)e++;let C=`${o?"export ":""}type ${r}${c} = ${w}`,A=Xe(s);return{kind:"type",name:r,text:C,isExported:o,generics:c||void 0,leadingComments:A,start:s,end:e}}function gt(s,o,r){e+=4,T();let c=Re();T();let l=e;if(e<S&&f.charCodeAt(e)===N)Be(N,ne);let u=ve(s,e),w=Xe(s);return{kind:"enum",name:c,text:u,isExported:o,modifiers:r?["const"]:void 0,leadingComments:w,start:s,end:e}}function lt(s,o,r,c=!1){e+=5,T();let l=Re()||"AnonymousClass";T();let u=rt();T();let w="";if(_("extends")){e+=7,T();let I=e,M=0;while(e<S){if(qe())continue;let v=f.charCodeAt(e);if(v===Se)M++;else if(v===Te&&!et())M--;else if(M===0&&(v===N||_("implements")))break;e++}w=ve(I,e)}let C;if(_("implements")){e+=10,T();let I=e,M=0;while(e<S){if(qe())continue;let D=f.charCodeAt(e);if(D===Se)M++;else if(D===Te&&!et())M--;else if(M===0&&D===N)break;e++}let v=ve(I,e);if(v)C=v.split(",").map((D)=>D.trim())}T();let A=Ht(l),k=`${o?c?"export default ":"export declare ":"declare "}${r?"abstract ":""}class ${l}${u}${w?` extends ${w}`:""}${C&&C.length>0?` implements ${C.join(", ")}`:""} ${A}`,O=Xe(s);return{kind:"class",name:l,text:k,isExported:o,isDefault:c,extends:w||void 0,implements:C,generics:u||void 0,modifiers:r?["abstract"]:void 0,leadingComments:O,start:s,end:e}}let zt;function Ht(s){if(e>=S||f.charCodeAt(e)!==N)return"{}";e++;let o={name:s,fields:new Map,pending:[],isStatic:!1};P.push(o);let r=[],c=new Set;while(e<S){if(T(),e>=S)break;if(f.charCodeAt(e)===ne){e++;break}if(f.charCodeAt(e)===oe){e++;continue}if(zt=Xe(e),_("static")&&Tt("static")===N){e+=6,T(),Be(N,ne);continue}let l=!1,u=!1,w=!1,C=!1,A=!1,p=!1,k=!1,O=!1,I=!0;while(I){T();let j=e,L=Re();if(e=j,L){let fe=Tt(L);if(fe===ae||fe===Se||fe===Ot||fe===33||fe===nt||fe===Ie||fe===oe||fe===ne)break}if(_("private")){l=!0,e+=7;continue}if(_("protected")){u=!0,e+=9;continue}if(_("public")){e+=6;continue}if(_("static")){w=!0,e+=6;continue}if(_("abstract")){C=!0,e+=8;continue}if(_("readonly")){A=!0,e+=8;continue}if(_("override")){p=!0,e+=8;continue}if(_("accessor")){k=!0,e+=8;continue}if(_("async")){O=!0,e+=5;continue}if(_("declare")){e+=7;continue}break}if(T(),e>=S||f.charCodeAt(e)===ne)break;let M=e;if(o.isStatic=w,(_("get")||_("set"))&&Ft(Tt(f.slice(e,e+3))))e+=3,T();if(f.charCodeAt(e)===ke)e++,T();let v=Dt();e=M;let D=v.startsWith("#");if(D)l=!0;if(l&&v&&v!=="constructor"){let j=D?w?" static #private_static;":" #private;":` private ${w?"static ":""}${v};`,fe=v[0]==="'"||v[0]==='"'?d(v)??v:v,re=D?`${w?"static":"instance"}#`:`${w?"static:":"instance:"}${fe}`;if(!c.has(re))c.add(re),r.push(j)}let G=l?[]:r,X=" ";if(u)X+="protected ";if(w)X+="static ";if(C)X+="abstract ";if(A)X+="readonly ";if(_("constructor")){e+=11,T();let j=ct();if(T(),Ln(j,r),e<S&&f.charCodeAt(e)===N)Be(N,ne);else if(e<S&&f.charCodeAt(e)===oe)e++;let L=pt(j);r.push(l?" private constructor();":` ${u?"protected ":""}constructor${L};`)}else if(_("get"))if(e+=3,T(),e<S&&Ft(f.charCodeAt(e))){let j=Dt();if(j.startsWith("#")){if(T(),e<S&&f.charCodeAt(e)===ae)ct();if(T(),wt(),T(),e<S&&f.charCodeAt(e)===N)Be(N,ne);else if(e<S&&f.charCodeAt(e)===oe)e++;continue}T(),ct(),T();let L=wt(),fe;if(T(),e<S&&f.charCodeAt(e)===N){let Pe=e+1;if(Be(N,ne),!L&&!ge)fe=f.slice(Pe,e-1),L=B(fe,!1,"()",(ut)=>xt(ut,w))}else if(e<S&&f.charCodeAt(e)===oe)e++;let re=G.length;if(G.push(`${X}get ${j}(): ${fe?W(L):L||"unknown"};`),fe)o.pending.push(()=>{let Pe=B(fe,!1,"()",(ut)=>xt(ut,w));G[re]=`${X}get ${j}(): ${W(Pe)};`})}else dn("get",X,w,A,O,G);else if(_("set"))if(e+=3,T(),e<S&&Ft(f.charCodeAt(e))){let j=Dt();if(j.startsWith("#")){if(T(),e<S&&f.charCodeAt(e)===ae)ct();if(T(),e<S&&f.charCodeAt(e)===N)Be(N,ne);else if(e<S&&f.charCodeAt(e)===oe)e++;continue}T();let L=ct();if(T(),e<S&&f.charCodeAt(e)===N)Be(N,ne);else if(e<S&&f.charCodeAt(e)===oe)e++;let fe=pt(L);G.push(`${X}set ${j}${fe};`)}else dn("set",X,w,A,O,G);else{let j=f.charCodeAt(e)===ke;if(j)e++,T();let L=Dt();if(!L){fn();continue}un(L,X,w,A,j,C,O,G)}}for(let l of o.pending)l();return P.pop(),`{
|
|
32
|
-
${r.join(`
|
|
33
|
-
`)}
|
|
34
|
-
}`}function Ft(s){return a(s)||s===De||s===Cn||s===be||s===$e}function Dt(){if(e>=S)return"";let s=f.charCodeAt(e);if(s===De){let o=e;return Be(De,Me),f.slice(o,e)}if(s===Cn)return e++,`#${Re()}`;if(s===be||s===$e){let o=e;return st(s),f.slice(o,e)}return Re()}function Tt(s){let o=e;e+=s.length,T();let r=e<S?f.charCodeAt(e):0;return e=o,r}function fn(){let s=0;while(e<S){if(qe())continue;let o=f.charCodeAt(e);if(o===N||o===ae)s++;else if(o===ne||o===Ae){if(s===0)return;s--}else if(o===oe&&s===0){e++;return}if(s===0&&bt())return;e++}}function dn(s,o,r,c,l,u){un(s,o,r,c,!1,!1,l,u)}function un(s,o,r,c,l,u,w,C){let A=zt;if(zt=void 0,T(),e>=S)return;let p=f.charCodeAt(e),k=!1;if(p===Ot)k=!0,e++,T();if(e<S&&f.charCodeAt(e)===33)e++,T();let O=e<S?f.charCodeAt(e):0;if(O===ae||O===Se){let I=O===Se?rt():"";T();let M=ct();T();let v=wt(),D,G=v.length>0;if(!v)if(w&&l)v="AsyncGenerator<unknown, void, unknown>";else if(l)v="Generator<unknown, void, unknown>";else if(w)v="Promise<void>";else v="void";if(T(),e<S&&f.charCodeAt(e)===N){let fe=e+1;if(Be(N,ne),!G&&!l)D=f.slice(fe,e-1),v=B(D,w,M,(re)=>xt(re,r))}else if(e<S&&f.charCodeAt(e)===oe)e++;let X=pt(M),j=k?"?":"",L=C.length;if(C.push(`${o}${s}${j}${I}${X}: ${D?W(v):v};`),D)P.at(-1)?.pending.push(()=>{let fe=B(D,w,M,(re)=>xt(re,r));C[L]=`${o}${s}${j}${I}${X}: ${W(fe)};`})}else if(O===nt||O===Ie||O===oe||O===ne||O===ye||O===Oe){let I="";if(O===nt){e++,T();let X=e,j=0;while(e<S){if(qe())continue;let L=f.charCodeAt(e);if(L===ae||L===N||L===De||L===Se)j++;else if(L===Ae||L===ne||L===Me||L===Te&&!et()){if(j===0)break;j--}else if(j===0&&(L===oe||L===it))break;else if(j===0&&L===Ie&&!Mt())break;if(j===0&&bt())break;e++}I=ve(X,e)}let M="";if(e<S&&f.charCodeAt(e)===Ie)if(ge&&I){e++;let X=0;while(e<S){if(qe())continue;let j=f.charCodeAt(e);if(j===ae||j===N||j===De)X++;else if(j===Ae||j===ne||j===Me){if(X===0&&j===ne)break;X--}else if(X===0&&j===oe)break;if(X===0&&bt())break;e++}}else{e++,T();let X=e,j=0;while(e<S){if(qe())continue;let L=f.charCodeAt(e);if(L===ae||L===N||L===De)j++;else if(L===Ae||L===ne||L===Me){if(j===0&&L===ne)break;j--}else if(j===0&&L===oe)break;if(j===0&&bt())break;e++}M=ve(X,e)}if(e<S&&f.charCodeAt(e)===oe)e++;let v=I.length>0;if(!I)if(M){let X=_t(M);if(X)I=X;else if(M.startsWith("new "))I=de(M);else if(I=M.endsWith("as const")||r&&c?Wt(M):kt(M),I==="unknown"&&An(M)&&!M.includes("."))I=de(M,!0)}else I="unknown";let D=k?"?":"";P.at(-1)?.fields.set(`${r?"static:":""}${s}`,k?`(${I}) | undefined`:I);let G=ee&&!v&&M?qt(A,M,I):"";C.push(`${G}${o}${s}${D}: ${I};`)}else fn()}function Bn(s){let o=0;for(let r=0;r<s.length;r++){let c=s.charCodeAt(r);if(c===ae||c===N||c===De||c===Se)o++;else if(c===Ae||c===ne||c===Me||c===Te&&s.charCodeAt(r-1)!==Ie)o--;else if(c===Ie&&o===0&&s.charCodeAt(r+1)!==Te&&s.charCodeAt(r+1)!==Ie)return!0}return!1}function Ln(s,o){let r=s.slice(1,-1).trim();if(!r)return;let c=[],l=0,u=0,w=!1,C=0,A=[];for(let p=0;p<=r.length;p++){if(p===r.length){A.push(r.slice(l)),c.push(St(r.slice(l).trim()));break}let k=r.charCodeAt(p);if(w){if(k===tt){p++;continue}if(k===C)w=!1;continue}if(k===te&&p+1<r.length){let O=r.charCodeAt(p+1);if(O===ke){p+=2;while(p+1<r.length&&!(r.charCodeAt(p)===ke&&r.charCodeAt(p+1)===te))p++;p++;continue}if(O===te){while(p<r.length&&r.charCodeAt(p)!==10)p++;continue}}if(k===be||k===$e||k===We){w=!0,C=k;continue}if(k===ae||k===N||k===De||k===Se)u++;else if(k===Ae||k===ne||k===Me||k===Te&&!(p>0&&r.charCodeAt(p-1)===Ie))u--;else if(k===it&&u===0)A.push(r.slice(l,p)),c.push(St(r.slice(l,p).trim())),l=p+1}for(let[p,k]of c.entries()){let O=k.startsWith("public ")||k.startsWith("public\t"),I=k.startsWith("protected ")||k.startsWith("protected\t"),M=k.startsWith("private ")||k.startsWith("private\t"),v=k.includes("readonly ");if(!O&&!I&&!M&&!v)continue;let D=k,G=[];if(M){let re=7;while(re<D.length&&He(D.charCodeAt(re)))re++;D=D.slice(re),G.push("private")}if(O){let re=6;while(re<D.length&&He(D.charCodeAt(re)))re++;D=D.slice(re),G.push("public")}if(I){let re=9;while(re<D.length&&He(D.charCodeAt(re)))re++;D=D.slice(re),G.push("protected")}if(v){let re=D.indexOf("readonly ");if(re!==-1){let Pe=re+8;while(Pe<D.length&&He(D.charCodeAt(Pe)))Pe++;D=D.slice(0,re)+D.slice(Pe)}G.push("readonly")}let X=G.length>0?`${G.join(" ")} `:"",j=an(D),L=D.search(/[?:=]/);if(L!==-1&&D.charCodeAt(L)!==63&&Bn(D))j=j.replace(/^([\w$]+)\?:/,"$1:");let fe="";if(ee&&!M&&L!==-1&&D.charCodeAt(L)===Ie){let re=D.slice(L+1);fe=qt(ir(A[p]),re,kt(re))}o.push(M?` private ${j.split(/[?:]/,1)[0]};`:`${fe} ${X}${j};`)}}function Vt(s=" ",o="",r=!1){if(e>=S||f.charCodeAt(e)!==N)return"{}";e++;let c=Ee.at(-1)?.path,l={path:c?`${c}.${o}`:o,bindings:new Map,exports:new Set,annotatedValues:new Set,ambient:r||Ee.at(-1)?.ambient===!0};ce.push(l),Ee.push(l);let u=[];while(e<S){if(T(),e>=S)break;if(f.charCodeAt(e)===ne){e++;break}if(f.charCodeAt(e)===oe){e++;continue}let w=!1;if(_("export"))w=!0,e+=6,T();let C=!1;if(_("declare"))C=!0,e+=7,T();let A=w?"export ":"";if(_("function")||_("async")&&Nn("async","function")){let p=!1;if(_("async"))p=!0,e+=5,T();if(e+=8,T(),e<S&&f.charCodeAt(e)===ke)e++,T();let O=Re();T();let I=rt();T();let M=ct();T();let v=wt();if(!v)v=p?"Promise<void>":"void";if(T(),e<S&&f.charCodeAt(e)===N)Be(N,ne);else if(e<S&&f.charCodeAt(e)===oe)e++;let D=pt(M);u.push(`${s}${A}function ${O}${I}${D}: ${v};`)}else if(_("const")||_("let")||_("var")){let p=_("const")?"const":_("let")?"let":"var";e+=p.length,T();let k=Re();if(l.bindings.set(k,"value"),w||l.ambient)l.exports.add(k);if(!k){Ne(!0);continue}T();let O="";if(e<S&&f.charCodeAt(e)===nt){e++,T();let M=e,v=0;while(e<S){if(qe())continue;let D=f.charCodeAt(e);if(D===ae||D===N||D===De||D===Se)v++;else if(D===ne&&v===0)break;else if(D===Ae||D===ne||D===Me||D===Te&&!et())v--;else if(v===0&&(D===oe||D===it))break;else if(v===0&&D===Ie&&!Mt())break;if(v===0&&ht())break;e++}O=ve(M,e)}if(O)l.annotatedValues.add(k);let I="";if(e<S&&f.charCodeAt(e)===Ie){e++,T();let M=e,v=0;while(e<S){if(qe())continue;let D=f.charCodeAt(e);if(D===ae||D===N||D===De||D===Se)v++;else if(D===ne&&v===0)break;else if(D===Ae||D===ne||D===Me||D===Te&&!et())v--;else if(v===0&&(D===oe||D===it))break;if(v===0&&ht())break;e++}I=ve(M,e)}if(e<S&&f.charCodeAt(e)===oe)e++;if(!O&&I){let M=_t(I);if(M)O=M;else if(p==="const")O=Wt(I);else O=kt(I)}if(!O)O="unknown";u.push(`${s}${A}${p} ${k}: ${O};`)}else if(_("interface")){e+=9,T();let p=Re();T();let k=rt();T();let O="";if(_("extends")){e+=7,T();let M=e,v=0;while(e<S){if(qe())continue;let D=f.charCodeAt(e);if(D===Se)v++;else if(D===Te&&!et())v--;else if(D===N&&v===0)break;e++}O=ve(M,e)}let I=cn(Pt());u.push(`${s}${A}interface ${p}${k}${O?` extends ${O}`:""} ${I}`)}else if(_("type")){e+=4,T();let p=Re();T();let k=rt();if(T(),e<S&&f.charCodeAt(e)===Ie){e++,T();let O=e,I=0;while(e<S){if(qe())continue;let v=f.charCodeAt(e);if(v===ae||v===N||v===De||v===Se)I++;else if(v===ne&&I===0)break;else if(v===Ae||v===ne||v===Me||v===Te&&!et())I--;else if(I===0&&v===oe)break;if(I===0&&ht())break;e++}let M=ve(O,e);if(e<S&&f.charCodeAt(e)===oe)e++;u.push(`${s}${A}type ${p}${k} = ${M}`)}}else if(_("class")){e+=5,T();let p=Re();T();let k=rt();T();let O=e,I=0;while(e<S){if(qe())continue;let G=f.charCodeAt(e);if(G===Se)I++;else if(G===Te&&!et())I--;else if(G===N&&I===0)break;e++}let M=ve(O,e),v=M?` ${M}`:"";if(l.bindings.set(p,"class"),w||l.ambient)l.exports.add(p);let D=Ht(p);u.push(`${s}${A}class ${p}${k}${v} ${D}`)}else if(_("enum")){e+=4,T();let p=Re();T();let k=Pt();u.push(`${s}${A}enum ${p} ${k}`)}else if(_("namespace")||_("module")){let p=_("namespace")?"namespace":"module";e+=p.length,T();let k=Re();if(!l.bindings.has(k))l.bindings.set(k,"namespace");if(w||l.ambient)l.exports.add(k);T();let O=Vt(s,k,C);u.push(`${s}${A}${p} ${k} ${O}`)}else if(_("abstract"))if(e+=8,T(),_("class")){e+=5,T();let p=Re();T();let k=rt();T();let O=e,I=0;while(e<S){if(qe())continue;let G=f.charCodeAt(e);if(G===Se)I++;else if(G===Te&&!et())I--;else if(G===N&&I===0)break;e++}let M=ve(O,e),v=M?` ${M}`:"";if(l.bindings.set(p,"class"),w||l.ambient)l.exports.add(p);let D=Ht(p);u.push(`${s}${A}abstract class ${p}${k}${v} ${D}`)}else Ne(!0);else if(w&&_("default")){e+=7,T();let p=e;Ne(!0);let k=ve(p,e);if(k.charCodeAt(k.length-1)===oe)k=k.slice(0,-1);if(k)u.push(`${s}export default ${k};`)}else if(!w&&(f.charCodeAt(e)===be||f.charCodeAt(e)===$e||f.charCodeAt(e)===We))Ne(!0);else Ne(!0)}if(Ee.pop(),u.length===0)return"{}";return`{
|
|
35
|
-
${u.join(`
|
|
36
|
-
`)}
|
|
37
|
-
}`}function Nn(s,o){let r=e+s.length;while(r<S&&He(f.charCodeAt(r)))r++;for(let c=0;c<o.length;c++)if(r+c>=S||f.charCodeAt(r+c)!==o.charCodeAt(c))return!1;return r+o.length>=S||!i(f.charCodeAt(r+o.length))}function mt(s,o,r){e+=r.length,T();let c="",l=f.charCodeAt(e);if(l===be||l===$e){let I=e;st(l),c=f.slice(I,e)}else{c=Re();while(e<S&&f.charCodeAt(e)===Ct)e++,c+=`.${Re()}`}T();let u=t(f.slice(s,e)),w=u.findIndex((I)=>I.kind==="word"&&["namespace","module"].includes(f.slice(s+I.start,s+I.end))),C=u.slice(0,w).some((I)=>I.kind==="word"&&f.slice(s+I.start,s+I.end)==="declare"),A=e<S&&f.charCodeAt(e)===N?Vt(" ",c,C):"{}",p=`${o?"export ":""}declare ${r} ${c} ${A}`,k=Xe(s),O=c.startsWith("'")||c.startsWith('"');return{kind:"module",name:c,text:p,isExported:o,moduleForm:O?"quoted":r==="namespace"?"namespace":"identifier",source:O?c.slice(1,-1):void 0,leadingComments:k,start:s,end:e}}function hn(s,o){Ne();let r=ve(o,e);if(r.charCodeAt(r.length-1)===oe)r=r.slice(0,-1).trimEnd();if(!r)return;let c=a(r.charCodeAt(0));for(let k=1;c&&k<r.length;k++)c=i(r.charCodeAt(k));let l=Xe(s);if(c){q.push({kind:"export",name:"default",text:`export default ${r};`,isExported:!0,isTypeOnly:!1,leadingComments:l,start:s,end:e});return}let u="__dtsx_default_export__",w=1;while(f.includes(u))u=`__dtsx_default_export_${w++}__`;let A=_t(r)||ot(r)||n(r,!1),p=A==="unknown"&&An(r)?`typeof ${r}`:A;q.push({kind:"variable",name:u,text:`declare const ${u}: ${p};`,isExported:!1,typeAnnotation:p,modifiers:["const"],start:s,end:e}),q.push({kind:"export",name:"default",text:`export default ${u};`,isExported:!0,isTypeOnly:!1,leadingComments:l,start:s,end:e})}function pn(){if(f.charCodeAt(e)===N)return Be(N,ne),!0;let s=_("if"),o=_("do"),r=_("try"),c=_("for");if(!s&&!o&&!r&&!c&&!_("while")&&!_("switch")&&!_("with"))return!1;if(Re(),T(),c&&_("await"))e+=5,T();if(!o&&!r&&f.charCodeAt(e)===ae)Be(ae,Ae);if(It(),T(),s&&_("else"))e+=4,It();else if(o&&_("while")){if(e+=5,T(),f.charCodeAt(e)===ae)Be(ae,Ae);if(T(),f.charCodeAt(e)===oe)e++}else if(r){if(_("catch")){if(e+=5,T(),f.charCodeAt(e)===ae)Be(ae,Ae);It(),T()}if(_("finally"))e+=7,It()}return!0}function It(){if(T(),!pn())Ne()}while(e<S){if(T(),e>=S)break;if(pn())continue;let s=e,o=f.charCodeAt(e);if(o===105&&_("import"))q.push(In(s));else if(o===101&&_("export")){e+=6,T();let r=f.charCodeAt(e);if(r===100&&_("default")){e+=7,T();let c=e,l=f.charCodeAt(e);if(l===102&&_("function")){let u=at(s,!0,!1,!0);if(u)q.push(u)}else if(l===97&&_("async")&&Tt("async")!==oe)if(e+=5,T(),_("function")){let u=at(s,!0,!0,!0);if(u)q.push(u)}else hn(s,c);else if(l===99&&_("class")){let u=lt(s,!0,!1,!0);q.push(u)}else if(l===97&&_("abstract")){if(e+=8,T(),_("class")){let u=lt(s,!0,!0,!0);q.push(u)}}else hn(s,c)}else if(r===116&&_("type")){let c=e;if(e+=4,T(),e<S&&f.charCodeAt(e)===N){sn();let l=ve(s,e),u=Xe(s);q.push({kind:"export",name:"",text:l,isExported:!0,isTypeOnly:!0,source:vt(l),leadingComments:u,start:s,end:e})}else if(e<S&&f.charCodeAt(e)===ke){rn();let l=ve(s,e);q.push({kind:"export",name:"",text:l,isExported:!0,isTypeOnly:!0,source:vt(l),start:s,end:e})}else{e=c;let l=Nt(s,!0);q.push(l)}}else if(r===105&&_("interface")){let c=Lt(s,!0);q.push(c)}else if(r===102&&_("function")){let c=at(s,!0,!1,!1);if(c)q.push(c)}else if(r===97&&_("async"))if(e+=5,T(),_("function")){let c=at(s,!0,!0,!1);if(c)q.push(c)}else Ne();else if(r===99)if(_("class")){let c=lt(s,!0,!1);q.push(c)}else if(_("const")){let c=e;if(e+=5,T(),_("enum")){e=c+5,T();let l=gt(s,!0,!0);q.push(l)}else{e=c;let l=dt(s,"const",!0);for(let u=0;u<l.length;u++)q.push(l[u])}}else Ne();else if(r===97&&_("abstract")){if(e+=8,T(),_("class")){let c=lt(s,!0,!0);q.push(c)}}else if(r===108&&_("let")){let c=dt(s,"let",!0);for(let l=0;l<c.length;l++)q.push(c[l])}else if(r===118&&_("var")){let c=dt(s,"var",!0);for(let l=0;l<c.length;l++)q.push(c[l])}else if(r===101&&_("enum")){let c=gt(s,!0,!1);q.push(c)}else if(r===100&&_("declare"))e+=7,T(),mn(s,!0);else if(r===110&&_("namespace")&&yt(9)){let c=mt(s,!0,"namespace");q.push(c)}else if(r===109&&_("module")&&yt(6)){let c=mt(s,!0,"module");q.push(c)}else if(r===N){sn();let c=ve(s,e),l=c.includes("export type"),u=Xe(s);q.push({kind:"export",name:"",text:c,isExported:!0,isTypeOnly:l,source:vt(c),leadingComments:u,start:s,end:e})}else if(r===ke){rn();let c=ve(s,e),l=Xe(s);q.push({kind:"export",name:"",text:c,isExported:!0,isTypeOnly:!1,source:vt(c),leadingComments:l,start:s,end:e})}else{Ne();let c=ve(s,e);if(c)q.push({kind:"export",name:"",text:c,isExported:!0,start:s,end:e})}}else if(o===100&&_("declare"))e+=7,T(),mn(s,!1);else if(o===105&&_("interface")){let r=Lt(s,!1);J(r.name,r)}else if(o===116&&_("type")){let r=Nt(s,!1);J(r.name,r),q.push(r)}else if(o===102&&_("function")){let r=at(s,!1,!1,!1);if(r)Zt(r);else Ne()}else if(o===97)if(_("async")){let r=e;if(e+=5,T(),_("function")){let c=at(s,!1,!0,!1);if(c)Zt(c);else e=r,Ne()}else e=r,Ne()}else if(_("abstract"))if(e+=8,T(),_("class")){let r=lt(s,!1,!1);J(r.name,r),q.push(r)}else Ne();else e++,Ne();else if(o===99)if(_("class")){let r=lt(s,!1,!1);J(r.name,r),q.push(r)}else if(_("const")){let r=e;if(e+=5,T(),_("enum")){e=r+5,T();let c=gt(s,!1,!0);J(c.name,c),q.push(c)}else{e=r;let c=dt(s,"const",!1);for(let l=0;l<c.length;l++)J(c[l].name,c[l])}}else e++,Ne();else if(o===101&&_("enum")){let r=gt(s,!1,!1);J(r.name,r),q.push(r)}else if(o===108&&_("let")||o===118&&_("var")){let r=_("let")?"let":"var",c=dt(s,r,!1);for(let l=0;l<c.length;l++)J(c[l].name,c[l])}else if(o===109&&_("module")&&yt(6)){let r=mt(s,!1,"module");q.push(r)}else if(o===110&&_("namespace")&&yt(9)){let r=mt(s,!1,"namespace");q.push(r)}else{let r=f.charCodeAt(e);if(r===oe)e++;else if(r===be||r===$e){if(st(r),e<S&&f.charCodeAt(e)===oe)e++}else if(r===We){if(At(),e<S&&f.charCodeAt(e)===oe)e++}else if(r===jn){if(e++,Re(),T(),e<S&&f.charCodeAt(e)===Ct)e++,Re(),T();if(e<S&&f.charCodeAt(e)===ae)Be(ae,Ae)}else e++,Ne()}}if(pe.length){let s=new Set([...q,...me.values()]),o=new Set([...s].filter((C)=>C.kind==="class").map((C)=>C.name)),r=new Set([...s].filter((C)=>C.kind==="variable"&&!!C.typeAnnotation).map((C)=>C.name)),c=new Set,l=new Map;for(let C of ce)for(let[A,p]of C.bindings){let k=C.path?`${C.path}.${A}`:A;if(C.exports.has(A)&&(p!=="namespace"||!l.has(k)))l.set(k,p);if(C.exports.has(A)&&C.annotatedValues.has(A))c.add(k)}let u=new Map;for(let C of pe){if(C.binding){let A=r.has(C.initializer);for(let p=C.namespaces.length-1;p>=0;p--){let k=C.namespaces[p],O=k.path?`${k.path}.${C.initializer}`:C.initializer;if(k.bindings.has(C.initializer)||l.has(O)){A=k.bindings.has(C.initializer)?k.annotatedValues.has(C.initializer):c.has(O);break}}u.set(C.marker,A?`typeof ${C.initializer}`:"unknown");continue}u.set(C.marker,Kt(C.initializer,(A)=>{if(C.classes.includes(A))return!0;for(let p=C.namespaces.length-1;p>=0;p--){let k=C.namespaces[p],O=k.path?`${k.path}.${A}`:A,I=A.split(".")[0],M=k.bindings.get(I);if(M){if(A===I&&M!=="namespace")return M==="class";return l.get(O)==="class"}let v=k.path?`${k.path}.${I}`:I;if(l.has(v))return l.get(O)==="class"}return l.has(A)?l.get(A)==="class":o.has(A)}))}let w=(C)=>{if(!C.includes("__dtsx_constructor_field_"))return C;let A="",p=0;for(let k of t(C)){if(k.kind!=="word")continue;let O=u.get(C.slice(k.start,k.end));if(!O)continue;A+=C.slice(p,k.start)+O,p=k.end}return A+C.slice(p)};for(let C of s){C.text=w(C.text);for(let A of["typeAnnotation","inferredType","returnType"])if(C[A])C[A]=w(C[A])}}if(Ce.size>0){gn(q);for(let s of he.values())gn(s)}if(Hn(f,q,me,he),Kn(q,me),sr(q,me),ge)Gt([...q,...me.values()]);else Yn(f,q,me,le);if(ue){let s=new Set(q);for(let o of[...me.values(),...[...he.values()].flat(),...[...Le.values()].flat()])if(!s.has(o))q.push(o),s.add(o);return q.sort((o,r)=>(o.start??0)-(r.start??0))}if(me.size>0)Vn(q,me,he,Le,Ye);return q;function gn(s){let o=new Map;for(let c of s)if(c.kind==="function")o.set(c.name,(o.get(c.name)||0)+1);let r=new Set;for(let[c,l]of o)if(l>1)r.add(c);if(r.size>0){let c=new Set;for(let l of r)for(let u=s.length-1;u>=0;u--)if(s[u].kind==="function"&&s[u].name===l&&Ce.has(s[u])){c.add(u);break}if(c.size>0){let l=[...c].sort((u,w)=>w-u);for(let u of l)s.splice(u,1)}}}function mn(s,o){if(_("function")){let r=at(s,o,!1,!1);if(r)q.push(r)}else if(_("async")){if(e+=5,T(),_("function")){let r=at(s,o,!0,!1);if(r)q.push(r)}}else if(_("class")){let r=lt(s,o,!1);q.push(r)}else if(_("abstract")){if(e+=8,T(),_("class")){let r=lt(s,o,!0);q.push(r)}}else if(_("interface")){let r=Lt(s,o);q.push(r)}else if(_("type")){let r=Nt(s,o);q.push(r)}else if(_("enum")){let r=gt(s,o,!1);q.push(r)}else if(_("const")){let r=e;if(e+=5,T(),_("enum")){e=r+5,T();let c=gt(s,o,!0);q.push(c)}else{e=r;let c=dt(s,"const",o);for(let l=0;l<c.length;l++)if(o||!Ye)q.push(c[l]);else J(c[l].name,c[l])}}else if(_("let")||_("var")){let r=_("let")?"let":"var",c=dt(s,r,o);for(let l=0;l<c.length;l++)if(o||!Ye)q.push(c[l]);else J(c[l].name,c[l])}else if(_("module")){let r=mt(s,o,"module");q.push(r)}else if(_("namespace")){let r=mt(s,o,"namespace");q.push(r)}else if(_("global")){e+=6,T();let c=`declare global ${e<S&&f.charCodeAt(e)===N?Vt(" ","",!0):"{}"}`,l=Xe(s);q.push({kind:"module",name:"global",text:c,isExported:!1,moduleForm:"global",leadingComments:l,start:s,end:e})}else Ne()}}class kn{names;lengths=new Uint8Array(65);firstUnits=new Uint8Array(65536);size;constructor(E){this.names=E;for(let ie of E.keys()){if(!ie)continue;this.lengths[Math.min(ie.length,64)]=1,this.firstUnits[ie.charCodeAt(0)]=1}this.size=E.size}scan(E,ie){if(this.size===0)return!1;let Q=!1,Y=0,ue=E.length;while(Y<ue){let le=E.charCodeAt(Y);if(le>=65&&le<=90||le>=97&&le<=122||le===95||le===36||le>127){let f=Y;Y++;while(Y<ue){let ee=E.charCodeAt(Y);if(ee>=65&&ee<=90||ee>=97&&ee<=122||ee>=48&&ee<=57||ee===95||ee===36||ee>127)Y++;else break}if(this.firstUnits[le]===1&&this.lengths[Math.min(Y-f,64)]===1){let ee=E.substring(f,Y),ge=this.names.get(ee);if(ge!==void 0){if(ie.add(ee),ge.kind==="function"||ge.kind==="variable")Q=!0}}}else Y++}return Q}}function bn(E,ie){let Q=0;while(Q<E.length){let Y=E.charCodeAt(Q);if(Y===be||Y===$e||Y===We){let Ze=Y;Q++;while(Q<E.length)if(E.charCodeAt(Q)===tt)Q+=2;else if(E.charCodeAt(Q++)===Ze)break;continue}if(Y===te&&E.charCodeAt(Q+1)===te){Q+=2;while(Q<E.length&&E.charCodeAt(Q)!==ye&&E.charCodeAt(Q)!==Oe)Q++;continue}if(Y===te&&E.charCodeAt(Q+1)===ke){let Ze=E.indexOf("*/",Q+2);Q=Ze===-1?E.length:Ze+2;continue}if(!a(Y)){Q++;continue}let ue=Q++;while(Q<E.length&&i(E.charCodeAt(Q)))Q++;let le=ue-1,f=Q;while(le>=0&&He(E.charCodeAt(le)))le--;while(f<E.length&&He(E.charCodeAt(f)))f++;let ee=le>=0?E.charCodeAt(le):0,ge=f<E.length?E.charCodeAt(f):0,S=ue>=3&&E.slice(ue-3,ue)==="...";if(ge===nt||ee===Ct&&!S)continue;if(ge===ae&&(ee===N||ee===it))continue;ie.add(E.slice(ue,Q))}}function Vn(E,ie,Q,Y,ue){let le=new Map;if(ue){let e=0;for(let Z of E)if(Z.kind==="class"&&!Z.isExported){if(le.set(Z.name,Z),!ie.has(Z.name))ie.set(Z.name,Z)}else if(!Z.isExported&&(Z.kind==="type"||Z.kind==="interface")&&["variable","function"].includes(ie.get(Z.name)?.kind??""));else E[e++]=Z;E.length=e}let f=new Set(E),ee=new Set,ge=new Set,S=new Set;for(let e of E)if(ge.add(e.name),e.kind!=="type"&&e.kind!=="interface")S.add(e.name);let Ze=new kn(ie),Ye=new Map;for(let[e,Z]of Y){let se=ie.get(e);if(se?.kind==="variable"||se?.kind==="function")Ye.set(e,Z[0])}let q=new Set,me=new Set,Le=new Set,J=new Set,he=(e)=>{if(Ze.scan(e.text,Le))rr(e,J,Ye.size?{candidates:Ye,references:q}:void 0)},Ce=new Set;for(let e=0;e<E.length;e++){let Z=E[e];if(Z.kind!=="import"){if(he(Z),typeof Z.value==="string")bn(Z.value,Ce)}}for(;;){let e=[];for(let[P,ce]of ie){if(ee.has(P))continue;if((ce.kind==="function"||ce.kind==="variable"?J:Le).has(P)||ce.kind!=="function"&&Ce.has(P)){let pe=le.get(P);if(pe){for(let Ke of[pe,ce])if(!f.has(Ke))e.push(Ke),f.add(Ke);ge.add(P)}else if(!(ce.kind==="function"||ce.kind==="variable"?S:ge).has(P)){let Ke=ce.kind==="function"?Q.get(P):void 0;if(Ke)for(let de of Ke)e.push(de);else e.push(ce);if(ge.add(P),ce.kind==="function"||ce.kind==="variable")S.add(P)}ee.add(P)}}for(let[P,ce]of Y){if(!Ye.has(P)||me.has(P)||!q.has(P))continue;for(let Ee of ce)if(!f.has(Ee))e.push(Ee),f.add(Ee);me.add(P)}if(e.length===0)break;e.sort((P,ce)=>(P.start??1/0)-(ce.start??1/0));let Z=[],se=0;for(let P=0;P<E.length;P++){let ce=E[P].start??1/0;while(se<e.length&&(e[se].start??1/0)<=ce)Z.push(e[se++]);Z.push(E[P])}while(se<e.length)Z.push(e[se++]);E.length=0;for(let P=0;P<Z.length;P++)E.push(Z[P]);for(let P of e)if(P.kind!=="import"){if(he(P),typeof P.value==="string")bn(P.value,Ce)}}}
|
|
38
|
-
export{Ii,Wa,R,F,jt};
|