Leon4gr45 commited on
Commit
a20a96d
·
verified ·
1 Parent(s): 97a1afe

Upload folder using huggingface_hub (part 2)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. node_modules/@babel/generator/lib/source-map.js.map +1 -0
  2. node_modules/@babel/generator/lib/token-map.js +195 -0
  3. node_modules/@babel/generator/lib/token-map.js.map +1 -0
  4. node_modules/@babel/generator/package.json +39 -0
  5. node_modules/@babel/helper-compilation-targets/LICENSE +22 -0
  6. node_modules/@babel/helper-compilation-targets/README.md +19 -0
  7. node_modules/@babel/helper-compilation-targets/lib/debug.js +28 -0
  8. node_modules/@babel/helper-compilation-targets/lib/debug.js.map +1 -0
  9. node_modules/@babel/helper-compilation-targets/lib/filter-items.js +67 -0
  10. node_modules/@babel/helper-compilation-targets/lib/filter-items.js.map +1 -0
  11. node_modules/@babel/helper-compilation-targets/lib/index.js +229 -0
  12. node_modules/@babel/helper-compilation-targets/lib/index.js.map +1 -0
  13. node_modules/@babel/helper-compilation-targets/lib/options.js +24 -0
  14. node_modules/@babel/helper-compilation-targets/lib/options.js.map +1 -0
  15. node_modules/@babel/helper-compilation-targets/lib/pretty.js +40 -0
  16. node_modules/@babel/helper-compilation-targets/lib/pretty.js.map +1 -0
  17. node_modules/@babel/helper-compilation-targets/lib/targets.js +28 -0
  18. node_modules/@babel/helper-compilation-targets/lib/targets.js.map +1 -0
  19. node_modules/@babel/helper-compilation-targets/lib/utils.js +58 -0
  20. node_modules/@babel/helper-compilation-targets/lib/utils.js.map +1 -0
  21. node_modules/@babel/helper-compilation-targets/package.json +43 -0
  22. node_modules/@babel/helper-globals/LICENSE +22 -0
  23. node_modules/@babel/helper-globals/README.md +19 -0
  24. node_modules/@babel/helper-globals/data/browser-upper.json +911 -0
  25. node_modules/@babel/helper-globals/data/builtin-lower.json +15 -0
  26. node_modules/@babel/helper-globals/data/builtin-upper.json +51 -0
  27. node_modules/@babel/helper-globals/package.json +32 -0
  28. node_modules/@babel/helper-module-imports/LICENSE +22 -0
  29. node_modules/@babel/helper-module-imports/README.md +19 -0
  30. node_modules/@babel/helper-module-imports/lib/import-builder.js +122 -0
  31. node_modules/@babel/helper-module-imports/lib/import-builder.js.map +1 -0
  32. node_modules/@babel/helper-module-imports/lib/import-injector.js +304 -0
  33. node_modules/@babel/helper-module-imports/lib/import-injector.js.map +1 -0
  34. node_modules/@babel/helper-module-imports/lib/index.js +37 -0
  35. node_modules/@babel/helper-module-imports/lib/index.js.map +1 -0
  36. node_modules/@babel/helper-module-imports/lib/is-module.js +11 -0
  37. node_modules/@babel/helper-module-imports/lib/is-module.js.map +1 -0
  38. node_modules/@babel/helper-module-imports/package.json +28 -0
  39. node_modules/@babel/helper-module-transforms/LICENSE +22 -0
  40. node_modules/@babel/helper-module-transforms/README.md +19 -0
  41. node_modules/@babel/helper-module-transforms/lib/dynamic-import.js +46 -0
  42. node_modules/@babel/helper-module-transforms/lib/dynamic-import.js.map +1 -0
  43. node_modules/@babel/helper-module-transforms/lib/get-module-name.js +46 -0
  44. node_modules/@babel/helper-module-transforms/lib/get-module-name.js.map +1 -0
  45. node_modules/@babel/helper-module-transforms/lib/index.js +396 -0
  46. node_modules/@babel/helper-module-transforms/lib/index.js.map +1 -0
  47. node_modules/@babel/helper-module-transforms/lib/lazy-modules.js +31 -0
  48. node_modules/@babel/helper-module-transforms/lib/lazy-modules.js.map +1 -0
  49. node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js +362 -0
  50. node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js.map +1 -0
node_modules/@babel/generator/lib/source-map.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"names":["_genMapping","require","_traceMapping","SourceMap","constructor","opts","code","_opts$sourceFileName","_map","_rawMappings","_sourceFileName","_lastGenLine","_lastSourceLine","_lastSourceColumn","_inputMap","map","GenMapping","sourceRoot","sourceFileName","replace","undefined","inputSourceMap","TraceMap","resolvedSources","length","i","_this$_inputMap$sourc","setSourceContent","sourcesContent","Object","keys","get","toEncodedMap","getDecoded","toDecodedMap","getRawMappings","allMappings","mark","generated","line","column","identifierName","identifierNamePos","filename","_originalMapping","originalMapping","originalPositionFor","name","originalIdentifierMapping","source","maybeAddMapping","original","exports","default"],"sources":["../src/source-map.ts"],"sourcesContent":["import {\n GenMapping,\n maybeAddMapping,\n setSourceContent,\n allMappings,\n toEncodedMap,\n toDecodedMap,\n} from \"@jridgewell/gen-mapping\";\n\nimport type {\n EncodedSourceMap,\n DecodedSourceMap,\n Mapping,\n} from \"@jridgewell/gen-mapping\";\n\nimport type {\n InvalidOriginalMapping,\n OriginalMapping,\n SourceMapInput,\n} from \"@jridgewell/trace-mapping\";\nimport { originalPositionFor, TraceMap } from \"@jridgewell/trace-mapping\";\n\n/**\n * Build a sourcemap.\n */\n\nexport default class SourceMap {\n private _map: GenMapping;\n private _rawMappings: Mapping[] | undefined;\n private _sourceFileName: string | undefined;\n\n // Any real line is > 0, so init to 0 is fine.\n private _lastGenLine = 0;\n private _lastSourceLine = 0;\n\n // Source columns can be 0, but we only check in unison with sourceLine, which\n // inits to an impossible value. So init to 0 is fine.\n private _lastSourceColumn = 0;\n\n public _inputMap: TraceMap | null = null;\n\n constructor(\n opts: {\n sourceFileName?: string;\n sourceRoot?: string;\n inputSourceMap?: SourceMapInput;\n },\n code: string | Record<string, string> | null | undefined,\n ) {\n const map = (this._map = new GenMapping({ sourceRoot: opts.sourceRoot }));\n this._sourceFileName = opts.sourceFileName?.replace(/\\\\/g, \"/\");\n this._rawMappings = undefined;\n\n if (opts.inputSourceMap) {\n this._inputMap = new TraceMap(opts.inputSourceMap);\n const resolvedSources = this._inputMap.resolvedSources;\n if (resolvedSources.length) {\n for (let i = 0; i < resolvedSources.length; i++) {\n setSourceContent(\n map,\n resolvedSources[i],\n // @ts-expect-error FIXME: this._inputMap.sourcesContent?.[i] may be undefined, which is not acceptable by setSourceContent\n this._inputMap.sourcesContent?.[i],\n );\n }\n }\n }\n\n if (typeof code === \"string\" && !opts.inputSourceMap) {\n setSourceContent(map, this._sourceFileName!, code);\n } else if (typeof code === \"object\") {\n for (const sourceFileName of Object.keys(code!)) {\n setSourceContent(\n map,\n sourceFileName.replace(/\\\\/g, \"/\"),\n code![sourceFileName],\n );\n }\n }\n }\n\n /**\n * Get the sourcemap.\n */\n get(): EncodedSourceMap {\n return toEncodedMap(this._map);\n }\n\n getDecoded(): DecodedSourceMap {\n return toDecodedMap(this._map);\n }\n\n getRawMappings(): Mapping[] {\n return (this._rawMappings ||= allMappings(this._map));\n }\n\n /**\n * Mark the current generated position with a source position. May also be passed null line/column\n * values to insert a mapping to nothing.\n */\n\n mark(\n generated: { line: number; column: number },\n line?: number,\n column?: number,\n identifierName?: string | null,\n identifierNamePos?: { line: number; column: number },\n filename?: string | null,\n ) {\n this._rawMappings = undefined;\n\n let originalMapping: OriginalMapping | InvalidOriginalMapping | undefined;\n\n if (line != null) {\n if (this._inputMap) {\n // This is the lookup for this mark\n originalMapping = originalPositionFor(this._inputMap, {\n line,\n column: column!,\n });\n\n // If the we found a name, nothing else needs to be done\n // Maybe we're marking a `(` and the input map already had a name attached there,\n // or we're marking a `(` and the sourcemap spanned a `foo(`,\n // or we're marking an identifier, etc.\n if (!originalMapping.name && identifierNamePos) {\n // We're trying to mark a `(` (as that's the only thing that provides\n // an identifierNamePos currently), and we the AST had an identifier attached.\n // Lookup it's original name.\n const originalIdentifierMapping = originalPositionFor(\n this._inputMap,\n identifierNamePos,\n );\n if (originalIdentifierMapping.name) {\n identifierName = originalIdentifierMapping.name;\n }\n }\n } else {\n originalMapping = {\n name: null,\n source: filename?.replace(/\\\\/g, \"/\") || this._sourceFileName!,\n line: line,\n column: column!,\n };\n }\n }\n\n // @ts-expect-error FIXME: original cannot be InvalidOriginalMapping\n maybeAddMapping(this._map, {\n name: identifierName,\n generated,\n source: originalMapping?.source,\n original: originalMapping,\n });\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAoBA,IAA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,IAAI;UACjD;QACF;MACF,CAAC,MAAM;QACLF,eAAe,GAAG;UAChBE,IAAI,EAAE,IAAI;UACVE,MAAM,EAAE,CAAAN,QAAQ,oBAARA,QAAQ,CAAExB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,KAAI,IAAI,CAACT,eAAgB;UAC9D6B,IAAI,EAAEA,IAAI;UACVC,MAAM,EAAEA;QACV,CAAC;MACH;IACF;IAGA,IAAAU,2BAAe,EAAC,IAAI,CAAC1C,IAAI,EAAE;MACzBuC,IAAI,EAAEN,cAAc;MACpBH,SAAS;MACTW,MAAM,GAAAL,gBAAA,GAAEC,eAAe,qBAAfD,gBAAA,CAAiBK,MAAM;MAC/BE,QAAQ,EAAEN;IACZ,CAAC,CAAC;EACJ;AACF;AAACO,OAAA,CAAAC,OAAA,GAAAlD,SAAA","ignoreList":[]}
node_modules/@babel/generator/lib/token-map.js ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TokenMap = void 0;
7
+ var _t = require("@babel/types");
8
+ const {
9
+ traverseFast,
10
+ VISITOR_KEYS
11
+ } = _t;
12
+ class TokenMap {
13
+ constructor(ast, tokens, source) {
14
+ this._tokens = void 0;
15
+ this._source = void 0;
16
+ this._nodesToTokenIndexes = new Map();
17
+ this._nodesOccurrencesCountCache = new Map();
18
+ this._tokensCache = new Map();
19
+ this._tokens = tokens;
20
+ this._source = source;
21
+ traverseFast(ast, node => {
22
+ const indexes = this._getTokensIndexesOfNode(node);
23
+ if (indexes.length > 0) this._nodesToTokenIndexes.set(node, indexes);
24
+ });
25
+ this._tokensCache.clear();
26
+ }
27
+ has(node) {
28
+ return this._nodesToTokenIndexes.has(node);
29
+ }
30
+ getIndexes(node) {
31
+ return this._nodesToTokenIndexes.get(node);
32
+ }
33
+ find(node, condition) {
34
+ const indexes = this._nodesToTokenIndexes.get(node);
35
+ if (indexes) {
36
+ for (let k = 0; k < indexes.length; k++) {
37
+ const index = indexes[k];
38
+ const tok = this._tokens[index];
39
+ if (condition(tok, index)) return tok;
40
+ }
41
+ }
42
+ return null;
43
+ }
44
+ findLastIndex(node, condition) {
45
+ const indexes = this._nodesToTokenIndexes.get(node);
46
+ if (indexes) {
47
+ for (let k = indexes.length - 1; k >= 0; k--) {
48
+ const index = indexes[k];
49
+ const tok = this._tokens[index];
50
+ if (condition(tok, index)) return index;
51
+ }
52
+ }
53
+ return -1;
54
+ }
55
+ findMatching(node, test, occurrenceCount = 0) {
56
+ const indexes = this._nodesToTokenIndexes.get(node);
57
+ if (indexes) {
58
+ if (typeof test === "number") {
59
+ test = String.fromCharCode(test);
60
+ }
61
+ let i = 0;
62
+ const count = occurrenceCount;
63
+ if (count > 1) {
64
+ const cache = this._nodesOccurrencesCountCache.get(node);
65
+ if ((cache == null ? void 0 : cache.test) === test && cache.count < count) {
66
+ i = cache.i + 1;
67
+ occurrenceCount -= cache.count + 1;
68
+ }
69
+ }
70
+ for (; i < indexes.length; i++) {
71
+ const tok = this._tokens[indexes[i]];
72
+ if (this.matchesOriginal(tok, test)) {
73
+ if (occurrenceCount === 0) {
74
+ if (count > 0) {
75
+ this._nodesOccurrencesCountCache.set(node, {
76
+ test,
77
+ count,
78
+ i
79
+ });
80
+ }
81
+ return tok;
82
+ }
83
+ occurrenceCount--;
84
+ }
85
+ }
86
+ }
87
+ return null;
88
+ }
89
+ matchesOriginal(token, test) {
90
+ if (token.end - token.start !== test.length) return false;
91
+ if (token.value != null) return token.value === test;
92
+ return this._source.startsWith(test, token.start);
93
+ }
94
+ startMatches(node, test) {
95
+ const indexes = this._nodesToTokenIndexes.get(node);
96
+ if (!indexes) return false;
97
+ const tok = this._tokens[indexes[0]];
98
+ if (tok.start !== node.start) return false;
99
+ return this.matchesOriginal(tok, test);
100
+ }
101
+ endMatches(node, test) {
102
+ const indexes = this._nodesToTokenIndexes.get(node);
103
+ if (!indexes) return false;
104
+ const tok = this._tokens[indexes[indexes.length - 1]];
105
+ if (tok.end !== node.end) return false;
106
+ return this.matchesOriginal(tok, test);
107
+ }
108
+ _getTokensIndexesOfNode(node) {
109
+ var _node$declaration;
110
+ if (node.start == null || node.end == null) return [];
111
+ const {
112
+ first,
113
+ last
114
+ } = this._findTokensOfNode(node, 0, this._tokens.length - 1);
115
+ let low = first;
116
+ const children = childrenIterator(node);
117
+ if ((node.type === "ExportNamedDeclaration" || node.type === "ExportDefaultDeclaration") && ((_node$declaration = node.declaration) == null ? void 0 : _node$declaration.type) === "ClassDeclaration") {
118
+ children.next();
119
+ }
120
+ const indexes = [];
121
+ for (const child of children) {
122
+ if (child == null) continue;
123
+ if (child.start == null || child.end == null) continue;
124
+ const childTok = this._findTokensOfNode(child, low, last);
125
+ const high = childTok.first;
126
+ for (let k = low; k < high; k++) indexes.push(k);
127
+ low = childTok.last + 1;
128
+ }
129
+ for (let k = low; k <= last; k++) indexes.push(k);
130
+ return indexes;
131
+ }
132
+ _findTokensOfNode(node, low, high) {
133
+ const cached = this._tokensCache.get(node);
134
+ if (cached) return cached;
135
+ const first = this._findFirstTokenOfNode(node.start, low, high);
136
+ const last = this._findLastTokenOfNode(node.end, first, high);
137
+ this._tokensCache.set(node, {
138
+ first,
139
+ last
140
+ });
141
+ return {
142
+ first,
143
+ last
144
+ };
145
+ }
146
+ _findFirstTokenOfNode(start, low, high) {
147
+ while (low <= high) {
148
+ const mid = high + low >> 1;
149
+ if (start < this._tokens[mid].start) {
150
+ high = mid - 1;
151
+ } else if (start > this._tokens[mid].start) {
152
+ low = mid + 1;
153
+ } else {
154
+ return mid;
155
+ }
156
+ }
157
+ return low;
158
+ }
159
+ _findLastTokenOfNode(end, low, high) {
160
+ while (low <= high) {
161
+ const mid = high + low >> 1;
162
+ if (end < this._tokens[mid].end) {
163
+ high = mid - 1;
164
+ } else if (end > this._tokens[mid].end) {
165
+ low = mid + 1;
166
+ } else {
167
+ return mid;
168
+ }
169
+ }
170
+ return high;
171
+ }
172
+ }
173
+ exports.TokenMap = TokenMap;
174
+ function* childrenIterator(node) {
175
+ if (node.type === "TemplateLiteral") {
176
+ yield node.quasis[0];
177
+ for (let i = 1; i < node.quasis.length; i++) {
178
+ yield node.expressions[i - 1];
179
+ yield node.quasis[i];
180
+ }
181
+ return;
182
+ }
183
+ const keys = VISITOR_KEYS[node.type];
184
+ for (const key of keys) {
185
+ const child = node[key];
186
+ if (!child) continue;
187
+ if (Array.isArray(child)) {
188
+ yield* child;
189
+ } else {
190
+ yield child;
191
+ }
192
+ }
193
+ }
194
+
195
+ //# sourceMappingURL=token-map.js.map
node_modules/@babel/generator/lib/token-map.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"names":["_t","require","traverseFast","VISITOR_KEYS","TokenMap","constructor","ast","tokens","source","_tokens","_source","_nodesToTokenIndexes","Map","_nodesOccurrencesCountCache","_tokensCache","node","indexes","_getTokensIndexesOfNode","length","set","clear","has","getIndexes","get","find","condition","k","index","tok","findLastIndex","findMatching","test","occurrenceCount","String","fromCharCode","i","count","cache","matchesOriginal","token","end","start","value","startsWith","startMatches","endMatches","_node$declaration","first","last","_findTokensOfNode","low","children","childrenIterator","type","declaration","next","child","childTok","high","push","cached","_findFirstTokenOfNode","_findLastTokenOfNode","mid","exports","quasis","expressions","keys","key","Array","isArray"],"sources":["../src/token-map.ts"],"sourcesContent":["import type * as t from \"@babel/types\";\nimport type { Token } from \"@babel/parser\";\n\nimport { traverseFast, VISITOR_KEYS } from \"@babel/types\";\n\nexport class TokenMap {\n _tokens: Token[];\n _source: string;\n\n _nodesToTokenIndexes = new Map<t.Node, number[]>();\n _nodesOccurrencesCountCache = new Map<\n t.Node,\n { test: string; count: number; i: number }\n >();\n\n _tokensCache = new Map<t.Node, { first: number; last: number }>();\n\n constructor(ast: t.Node, tokens: Token[], source: string) {\n this._tokens = tokens;\n this._source = source;\n\n traverseFast(ast, node => {\n const indexes = this._getTokensIndexesOfNode(node);\n if (indexes.length > 0) this._nodesToTokenIndexes.set(node, indexes);\n });\n\n this._tokensCache.clear();\n }\n\n has(node: t.Node): boolean {\n return this._nodesToTokenIndexes.has(node);\n }\n\n getIndexes(node: t.Node): readonly number[] | undefined {\n return this._nodesToTokenIndexes.get(node);\n }\n\n find(\n node: t.Node,\n condition: (token: Token, index: number) => boolean,\n ): Token | null {\n const indexes = this._nodesToTokenIndexes.get(node);\n if (indexes) {\n for (let k = 0; k < indexes.length; k++) {\n const index = indexes[k];\n const tok = this._tokens[index];\n if (condition(tok, index)) return tok;\n }\n }\n return null;\n }\n\n findLastIndex(\n node: t.Node,\n condition: (token: Token, index: number) => boolean,\n ): number {\n const indexes = this._nodesToTokenIndexes.get(node);\n if (indexes) {\n for (let k = indexes.length - 1; k >= 0; k--) {\n const index = indexes[k];\n const tok = this._tokens[index];\n if (condition(tok, index)) return index;\n }\n }\n return -1;\n }\n\n findMatching(\n node: t.Node,\n test: string | number,\n occurrenceCount: number = 0,\n ): Token | null {\n const indexes = this._nodesToTokenIndexes.get(node);\n if (indexes) {\n if (typeof test === \"number\") {\n test = String.fromCharCode(test);\n }\n let i = 0;\n const count = occurrenceCount;\n\n // To avoid O(n^2) search when printing lists (such as arrays), we\n // cache the last index of a given token for a given occurrence count.\n // If then we are asked to find the next occurrence of the same token,\n // we start from the index of the previously found token.\n // This cache only kicks in after 2 tokens of the same type, to avoid\n // overhead in the simple case of having unique tokens per node.\n if (count > 1) {\n const cache = this._nodesOccurrencesCountCache.get(node);\n if (cache?.test === test && cache.count < count) {\n i = cache.i + 1;\n occurrenceCount -= cache.count + 1;\n }\n }\n\n for (; i < indexes.length; i++) {\n const tok = this._tokens[indexes[i]];\n if (this.matchesOriginal(tok, test)) {\n if (occurrenceCount === 0) {\n if (count > 0) {\n this._nodesOccurrencesCountCache.set(node, { test, count, i });\n }\n return tok;\n }\n occurrenceCount--;\n }\n }\n }\n return null;\n }\n\n matchesOriginal(token: Token, test: string) {\n if (token.end - token.start !== test.length) return false;\n if (token.value != null) return token.value === test;\n return this._source.startsWith(test, token.start);\n }\n\n startMatches(node: t.Node, test: string): boolean {\n const indexes = this._nodesToTokenIndexes.get(node);\n if (!indexes) return false;\n const tok = this._tokens[indexes[0]];\n if (tok.start !== node.start) return false;\n return this.matchesOriginal(tok, test);\n }\n\n endMatches(node: t.Node, test: string): boolean {\n const indexes = this._nodesToTokenIndexes.get(node);\n if (!indexes) return false;\n const tok = this._tokens[indexes[indexes.length - 1]];\n if (tok.end !== node.end) return false;\n return this.matchesOriginal(tok, test);\n }\n\n _getTokensIndexesOfNode(node: t.Node): number[] {\n if (node.start == null || node.end == null) return [];\n\n const { first, last } = this._findTokensOfNode(\n node,\n 0,\n this._tokens.length - 1,\n );\n\n let low = first;\n\n const children = childrenIterator(node);\n\n if (\n (node.type === \"ExportNamedDeclaration\" ||\n node.type === \"ExportDefaultDeclaration\") &&\n node.declaration?.type === \"ClassDeclaration\"\n ) {\n // Exported class declarations can be not properly nested inside\n // the export declaration that contains them. For example, in\n // `@dec export class Foo {}` the `export` is covered by the\n // ClassDeclaration range. Skip the class declaration from the list\n // of children to skip, so that when looking for `export` we also\n // traverse its tokens.\n children.next();\n }\n\n const indexes = [];\n\n for (const child of children) {\n if (child == null) continue;\n if (child.start == null || child.end == null) continue;\n\n const childTok = this._findTokensOfNode(child, low, last);\n\n const high = childTok.first;\n for (let k = low; k < high; k++) indexes.push(k);\n\n low = childTok.last + 1;\n }\n\n for (let k = low; k <= last; k++) indexes.push(k);\n\n return indexes;\n }\n\n _findTokensOfNode(node: t.Node, low: number, high: number) {\n const cached = this._tokensCache.get(node);\n if (cached) return cached;\n\n const first = this._findFirstTokenOfNode(node.start!, low, high);\n const last = this._findLastTokenOfNode(node.end!, first, high);\n\n this._tokensCache.set(node, { first, last });\n return { first, last };\n }\n\n _findFirstTokenOfNode(start: number, low: number, high: number): number {\n while (low <= high) {\n const mid = (high + low) >> 1;\n if (start < this._tokens[mid].start) {\n high = mid - 1;\n } else if (start > this._tokens[mid].start) {\n low = mid + 1;\n } else {\n return mid;\n }\n }\n return low;\n }\n\n _findLastTokenOfNode(end: number, low: number, high: number): number {\n while (low <= high) {\n const mid = (high + low) >> 1;\n if (end < this._tokens[mid].end) {\n high = mid - 1;\n } else if (end > this._tokens[mid].end) {\n low = mid + 1;\n } else {\n return mid;\n }\n }\n return high;\n }\n}\n\nfunction* childrenIterator(node: t.Node) {\n // We need special handling to iterate TemplateLiteral\n // children in order, since the two lists are interleaved.\n if (node.type === \"TemplateLiteral\") {\n yield node.quasis[0];\n for (let i = 1; i < node.quasis.length; i++) {\n yield node.expressions[i - 1];\n yield node.quasis[i];\n }\n return;\n }\n\n const keys = VISITOR_KEYS[node.type];\n for (const key of keys) {\n const child = (node as any)[key];\n if (!child) continue;\n if (Array.isArray(child)) {\n yield* child;\n } else {\n yield child;\n }\n }\n}\n"],"mappings":";;;;;;AAGA,IAAAA,EAAA,GAAAC,OAAA;AAA0D;EAAjDC,YAAY;EAAEC;AAAY,IAAAH,EAAA;AAE5B,MAAMI,QAAQ,CAAC;EAYpBC,WAAWA,CAACC,GAAW,EAAEC,MAAe,EAAEC,MAAc,EAAE;IAAA,KAX1DC,OAAO;IAAA,KACPC,OAAO;IAAA,KAEPC,oBAAoB,GAAG,IAAIC,GAAG,C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AE;IACtB,MAAMX,KAAK,GAAIzC,IAAI,CAASqD,GAAG,CAAC;IAChC,IAAI,CAACZ,KAAK,EAAE;IACZ,IAAIa,KAAK,CAACC,OAAO,CAACd,KAAK,CAAC,EAAE;MACxB,OAAOA,KAAK;IACd,CAAC,MAAM;MACL,MAAMA,KAAK;IACb;EACF;AACF","ignoreList":[]}
node_modules/@babel/generator/package.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@babel/generator",
3
+ "version": "7.29.1",
4
+ "description": "Turns an AST into code.",
5
+ "author": "The Babel Team (https://babel.dev/team)",
6
+ "license": "MIT",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/babel/babel.git",
13
+ "directory": "packages/babel-generator"
14
+ },
15
+ "homepage": "https://babel.dev/docs/en/next/babel-generator",
16
+ "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20generator%22+is%3Aopen",
17
+ "main": "./lib/index.js",
18
+ "files": [
19
+ "lib"
20
+ ],
21
+ "dependencies": {
22
+ "@babel/parser": "^7.29.0",
23
+ "@babel/types": "^7.29.0",
24
+ "@jridgewell/gen-mapping": "^0.3.12",
25
+ "@jridgewell/trace-mapping": "^0.3.28",
26
+ "jsesc": "^3.0.2"
27
+ },
28
+ "devDependencies": {
29
+ "@babel/core": "^7.29.0",
30
+ "@babel/helper-fixtures": "^7.28.6",
31
+ "@babel/plugin-transform-typescript": "^7.28.6",
32
+ "@jridgewell/sourcemap-codec": "^1.5.3",
33
+ "charcodes": "^0.2.0"
34
+ },
35
+ "engines": {
36
+ "node": ">=6.9.0"
37
+ },
38
+ "type": "commonjs"
39
+ }
node_modules/@babel/helper-compilation-targets/LICENSE ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2014-present Sebastian McKenzie and other contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
node_modules/@babel/helper-compilation-targets/README.md ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # @babel/helper-compilation-targets
2
+
3
+ > Helper functions on Babel compilation targets
4
+
5
+ See our website [@babel/helper-compilation-targets](https://babeljs.io/docs/babel-helper-compilation-targets) for more information.
6
+
7
+ ## Install
8
+
9
+ Using npm:
10
+
11
+ ```sh
12
+ npm install --save @babel/helper-compilation-targets
13
+ ```
14
+
15
+ or using yarn:
16
+
17
+ ```sh
18
+ yarn add @babel/helper-compilation-targets
19
+ ```
node_modules/@babel/helper-compilation-targets/lib/debug.js ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getInclusionReasons = getInclusionReasons;
7
+ var _semver = require("semver");
8
+ var _pretty = require("./pretty.js");
9
+ var _utils = require("./utils.js");
10
+ function getInclusionReasons(item, targetVersions, list) {
11
+ const minVersions = list[item] || {};
12
+ return Object.keys(targetVersions).reduce((result, env) => {
13
+ const minVersion = (0, _utils.getLowestImplementedVersion)(minVersions, env);
14
+ const targetVersion = targetVersions[env];
15
+ if (!minVersion) {
16
+ result[env] = (0, _pretty.prettifyVersion)(targetVersion);
17
+ } else {
18
+ const minIsUnreleased = (0, _utils.isUnreleasedVersion)(minVersion, env);
19
+ const targetIsUnreleased = (0, _utils.isUnreleasedVersion)(targetVersion, env);
20
+ if (!targetIsUnreleased && (minIsUnreleased || _semver.lt(targetVersion.toString(), (0, _utils.semverify)(minVersion)))) {
21
+ result[env] = (0, _pretty.prettifyVersion)(targetVersion);
22
+ }
23
+ }
24
+ return result;
25
+ }, {});
26
+ }
27
+
28
+ //# sourceMappingURL=debug.js.map
node_modules/@babel/helper-compilation-targets/lib/debug.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"names":["_semver","require","_pretty","_utils","getInclusionReasons","item","targetVersions","list","minVersions","Object","keys","reduce","result","env","minVersion","getLowestImplementedVersion","targetVersion","prettifyVersion","minIsUnreleased","isUnreleasedVersion","targetIsUnreleased","semver","lt","toString","semverify"],"sources":["../src/debug.ts"],"sourcesContent":["import semver from \"semver\";\nimport { prettifyVersion } from \"./pretty.ts\";\nimport {\n semverify,\n isUnreleasedVersion,\n getLowestImplementedVersion,\n} from \"./utils.ts\";\nimport type { Target, Targets } from \"./types.ts\";\n\nexport function getInclusionReasons(\n item: string,\n targetVersions: Targets,\n list: Record<string, Targets>,\n) {\n const minVersions = list[item] || {};\n\n return (Object.keys(targetVersions) as Target[]).reduce(\n (result, env) => {\n const minVersion = getLowestImplementedVersion(minVersions, env);\n const targetVersion = targetVersions[env];\n\n if (!minVersion) {\n result[env] = prettifyVersion(targetVersion);\n } else {\n const minIsUnreleased = isUnreleasedVersion(minVersion, env);\n const targetIsUnreleased = isUnreleasedVersion(targetVersion, env);\n\n if (\n !targetIsUnreleased &&\n (minIsUnreleased ||\n semver.lt(targetVersion.toString(), semverify(minVersion)))\n ) {\n result[env] = prettifyVersion(targetVersion);\n }\n }\n\n return result;\n },\n {} as Partial<Record<Target, string>>,\n );\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAOO,SAASG,mBAAmBA,CACjCC,IAAY,EACZC,cAAuB,EACvBC,IAA6B,EAC7B;EACA,MAAMC,WAAW,GAAGD,IAAI,CAACF,IAAI,CAAC,IAAI,CAAC,CAAC;EAEpC,OAAQI,MAAM,CAACC,IAAI,CAACJ,cAAc,CAAC,CAAcK,MAAM,CACrD,CAACC,MAAM,EAAEC,GAAG,KAAK;IACf,MAAMC,UAAU,GAAG,IAAAC,kCAA2B,EAACP,WAAW,EAAEK,GAAG,CAAC;IAChE,MAAMG,aAAa,GAAGV,cAAc,CAACO,GAAG,CAAC;IAEzC,IAAI,CAACC,UAAU,EAAE;MACfF,MAAM,CAACC,GAAG,CAAC,GAAG,IAAAI,uBAAe,EAACD,aAAa,CAAC;IAC9C,CAAC,MAAM;MACL,MAAME,eAAe,GAAG,IAAAC,0BAAmB,EAACL,UAAU,EAAED,GAAG,CAAC;MAC5D,MAAMO,kBAAkB,GAAG,IAAAD,0BAAmB,EAACH,aAAa,EAAEH,GAAG,CAAC;MAElE,IACE,CAACO,kBAAkB,KAClBF,eAAe,IACdG,OAAM,CAACC,EAAE,CAACN,aAAa,CAACO,QAAQ,CAAC,CAAC,EAAE,IAAAC,gBAAS,EAACV,UAAU,CAAC,CAAC,CAAC,EAC7D;QACAF,MAAM,CAACC,GAAG,CAAC,GAAG,IAAAI,uBAAe,EAACD,aAAa,CAAC;MAC9C;IACF;IAEA,OAAOJ,MAAM;EACf,CAAC,EACD,CAAC,CACH,CAAC;AACH","ignoreList":[]}
node_modules/@babel/helper-compilation-targets/lib/filter-items.js ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = filterItems;
7
+ exports.isRequired = isRequired;
8
+ exports.targetsSupported = targetsSupported;
9
+ var _semver = require("semver");
10
+ var _utils = require("./utils.js");
11
+ const pluginsCompatData = require("@babel/compat-data/plugins");
12
+ function targetsSupported(target, support) {
13
+ const targetEnvironments = Object.keys(target);
14
+ if (targetEnvironments.length === 0) {
15
+ return false;
16
+ }
17
+ const unsupportedEnvironments = targetEnvironments.filter(environment => {
18
+ const lowestImplementedVersion = (0, _utils.getLowestImplementedVersion)(support, environment);
19
+ if (!lowestImplementedVersion) {
20
+ return true;
21
+ }
22
+ const lowestTargetedVersion = target[environment];
23
+ if ((0, _utils.isUnreleasedVersion)(lowestTargetedVersion, environment)) {
24
+ return false;
25
+ }
26
+ if ((0, _utils.isUnreleasedVersion)(lowestImplementedVersion, environment)) {
27
+ return true;
28
+ }
29
+ if (!_semver.valid(lowestTargetedVersion.toString())) {
30
+ throw new Error(`Invalid version passed for target "${environment}": "${lowestTargetedVersion}". ` + "Versions must be in semver format (major.minor.patch)");
31
+ }
32
+ return _semver.gt((0, _utils.semverify)(lowestImplementedVersion), lowestTargetedVersion.toString());
33
+ });
34
+ return unsupportedEnvironments.length === 0;
35
+ }
36
+ function isRequired(name, targets, {
37
+ compatData = pluginsCompatData,
38
+ includes,
39
+ excludes
40
+ } = {}) {
41
+ if (excludes != null && excludes.has(name)) return false;
42
+ if (includes != null && includes.has(name)) return true;
43
+ return !targetsSupported(targets, compatData[name]);
44
+ }
45
+ function filterItems(list, includes, excludes, targets, defaultIncludes, defaultExcludes, pluginSyntaxMap) {
46
+ const result = new Set();
47
+ const options = {
48
+ compatData: list,
49
+ includes,
50
+ excludes
51
+ };
52
+ for (const item in list) {
53
+ if (isRequired(item, targets, options)) {
54
+ result.add(item);
55
+ } else if (pluginSyntaxMap) {
56
+ const shippedProposalsSyntax = pluginSyntaxMap.get(item);
57
+ if (shippedProposalsSyntax) {
58
+ result.add(shippedProposalsSyntax);
59
+ }
60
+ }
61
+ }
62
+ defaultIncludes == null || defaultIncludes.forEach(item => !excludes.has(item) && result.add(item));
63
+ defaultExcludes == null || defaultExcludes.forEach(item => !includes.has(item) && result.delete(item));
64
+ return result;
65
+ }
66
+
67
+ //# sourceMappingURL=filter-items.js.map
node_modules/@babel/helper-compilation-targets/lib/filter-items.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"names":["_semver","require","_utils","pluginsCompatData","targetsSupported","target","support","targetEnvironments","Object","keys","length","unsupportedEnvironments","filter","environment","lowestImplementedVersion","getLowestImplementedVersion","lowestTargetedVersion","isUnreleasedVersion","semver","valid","toString","Error","gt","semverify","isRequired","name","targets","compatData","includes","excludes","has","filterItems","list","defaultIncludes","defaultExcludes","pluginSyntaxMap","result","Set","options","item","add","shippedProposalsSyntax","get","forEach","delete"],"sources":["../src/filter-items.ts"],"sourcesContent":["import semver from \"semver\";\n\nimport pluginsCompatData from \"@babel/compat-data/plugins\" with { type: \"json\" };\n\nimport type { Targets } from \"./types.ts\";\nimport {\n getLowestImplementedVersion,\n isUnreleasedVersion,\n semverify,\n} from \"./utils.ts\";\n\nexport function targetsSupported(target: Targets, support: Targets) {\n const targetEnvironments = Object.keys(target) as (keyof Targets)[];\n\n if (targetEnvironments.length === 0) {\n return false;\n }\n\n const unsupportedEnvironments = targetEnvironments.filter(environment => {\n const lowestImplementedVersion = getLowestImplementedVersion(\n support,\n environment,\n );\n\n // Feature is not implemented in that environment\n if (!lowestImplementedVersion) {\n return true;\n }\n\n const lowestTargetedVersion = target[environment];\n\n // If targets has unreleased value as a lowest version, then don't require a plugin.\n if (isUnreleasedVersion(lowestTargetedVersion, environment)) {\n return false;\n }\n\n // Include plugin if it is supported in the unreleased environment, which wasn't specified in targets\n if (isUnreleasedVersion(lowestImplementedVersion, environment)) {\n return true;\n }\n\n if (!semver.valid(lowestTargetedVersion.toString())) {\n throw new Error(\n `Invalid version passed for target \"${environment}\": \"${lowestTargetedVersion}\". ` +\n \"Versions must be in semver format (major.minor.patch)\",\n );\n }\n\n return semver.gt(\n semverify(lowestImplementedVersion),\n lowestTargetedVersion.toString(),\n );\n });\n\n return unsupportedEnvironments.length === 0;\n}\n\nexport function isRequired(\n name: string,\n targets: Targets,\n {\n compatData = pluginsCompatData,\n includes,\n excludes,\n }: {\n compatData?: Record<string, Targets>;\n includes?: Set<string>;\n excludes?: Set<string>;\n } = {},\n) {\n if (excludes?.has(name)) return false;\n if (includes?.has(name)) return true;\n return !targetsSupported(targets, compatData[name]);\n}\n\nexport default function filterItems(\n list: Record<string, Targets>,\n includes: Set<string>,\n excludes: Set<string>,\n targets: Targets,\n defaultIncludes: string[] | null,\n defaultExcludes?: string[] | null,\n pluginSyntaxMap?: Map<string, string | null>,\n) {\n const result = new Set<string>();\n const options = { compatData: list, includes, excludes };\n\n for (const item in list) {\n if (isRequired(item, targets, options)) {\n result.add(item);\n } else if (pluginSyntaxMap) {\n const shippedProposalsSyntax = pluginSyntaxMap.get(item);\n\n if (shippedProposalsSyntax) {\n result.add(shippedProposalsSyntax);\n }\n }\n }\n\n defaultIncludes?.forEach(item => !excludes.has(item) && result.add(item));\n defaultExcludes?.forEach(item => !includes.has(item) && result.delete(item));\n\n return result;\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAKA,IA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0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "TargetNames", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _options.TargetNames;
10
+ }
11
+ });
12
+ exports.default = getTargets;
13
+ Object.defineProperty(exports, "filterItems", {
14
+ enumerable: true,
15
+ get: function () {
16
+ return _filterItems.default;
17
+ }
18
+ });
19
+ Object.defineProperty(exports, "getInclusionReasons", {
20
+ enumerable: true,
21
+ get: function () {
22
+ return _debug.getInclusionReasons;
23
+ }
24
+ });
25
+ exports.isBrowsersQueryValid = isBrowsersQueryValid;
26
+ Object.defineProperty(exports, "isRequired", {
27
+ enumerable: true,
28
+ get: function () {
29
+ return _filterItems.isRequired;
30
+ }
31
+ });
32
+ Object.defineProperty(exports, "prettifyTargets", {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _pretty.prettifyTargets;
36
+ }
37
+ });
38
+ Object.defineProperty(exports, "unreleasedLabels", {
39
+ enumerable: true,
40
+ get: function () {
41
+ return _targets.unreleasedLabels;
42
+ }
43
+ });
44
+ var _browserslist = require("browserslist");
45
+ var _helperValidatorOption = require("@babel/helper-validator-option");
46
+ var _lruCache = require("lru-cache");
47
+ var _utils = require("./utils.js");
48
+ var _targets = require("./targets.js");
49
+ var _options = require("./options.js");
50
+ var _pretty = require("./pretty.js");
51
+ var _debug = require("./debug.js");
52
+ var _filterItems = require("./filter-items.js");
53
+ const browserModulesData = require("@babel/compat-data/native-modules");
54
+ const ESM_SUPPORT = browserModulesData["es6.module"];
55
+ const v = new _helperValidatorOption.OptionValidator("@babel/helper-compilation-targets");
56
+ function validateTargetNames(targets) {
57
+ const validTargets = Object.keys(_options.TargetNames);
58
+ for (const target of Object.keys(targets)) {
59
+ if (!(target in _options.TargetNames)) {
60
+ throw new Error(v.formatMessage(`'${target}' is not a valid target
61
+ - Did you mean '${(0, _helperValidatorOption.findSuggestion)(target, validTargets)}'?`));
62
+ }
63
+ }
64
+ return targets;
65
+ }
66
+ function isBrowsersQueryValid(browsers) {
67
+ return typeof browsers === "string" || Array.isArray(browsers) && browsers.every(b => typeof b === "string");
68
+ }
69
+ function validateBrowsers(browsers) {
70
+ v.invariant(browsers === undefined || isBrowsersQueryValid(browsers), `'${String(browsers)}' is not a valid browserslist query`);
71
+ return browsers;
72
+ }
73
+ function getLowestVersions(browsers) {
74
+ return browsers.reduce((all, browser) => {
75
+ const [browserName, browserVersion] = browser.split(" ");
76
+ const target = _targets.browserNameMap[browserName];
77
+ if (!target) {
78
+ return all;
79
+ }
80
+ try {
81
+ const splitVersion = browserVersion.split("-")[0].toLowerCase();
82
+ const isSplitUnreleased = (0, _utils.isUnreleasedVersion)(splitVersion, target);
83
+ if (!all[target]) {
84
+ all[target] = isSplitUnreleased ? splitVersion : (0, _utils.semverify)(splitVersion);
85
+ return all;
86
+ }
87
+ const version = all[target];
88
+ const isUnreleased = (0, _utils.isUnreleasedVersion)(version, target);
89
+ if (isUnreleased && isSplitUnreleased) {
90
+ all[target] = (0, _utils.getLowestUnreleased)(version, splitVersion, target);
91
+ } else if (isUnreleased) {
92
+ all[target] = (0, _utils.semverify)(splitVersion);
93
+ } else if (!isUnreleased && !isSplitUnreleased) {
94
+ const parsedBrowserVersion = (0, _utils.semverify)(splitVersion);
95
+ all[target] = (0, _utils.semverMin)(version, parsedBrowserVersion);
96
+ }
97
+ } catch (_) {}
98
+ return all;
99
+ }, {});
100
+ }
101
+ function outputDecimalWarning(decimalTargets) {
102
+ if (!decimalTargets.length) {
103
+ return;
104
+ }
105
+ console.warn("Warning, the following targets are using a decimal version:\n");
106
+ decimalTargets.forEach(({
107
+ target,
108
+ value
109
+ }) => console.warn(` ${target}: ${value}`));
110
+ console.warn(`
111
+ We recommend using a string for minor/patch versions to avoid numbers like 6.10
112
+ getting parsed as 6.1, which can lead to unexpected behavior.
113
+ `);
114
+ }
115
+ function semverifyTarget(target, value) {
116
+ try {
117
+ return (0, _utils.semverify)(value);
118
+ } catch (_) {
119
+ throw new Error(v.formatMessage(`'${value}' is not a valid value for 'targets.${target}'.`));
120
+ }
121
+ }
122
+ function nodeTargetParser(value) {
123
+ const parsed = value === true || value === "current" ? process.versions.node.split("-")[0] : semverifyTarget("node", value);
124
+ return ["node", parsed];
125
+ }
126
+ function defaultTargetParser(target, value) {
127
+ const version = (0, _utils.isUnreleasedVersion)(value, target) ? value.toLowerCase() : semverifyTarget(target, value);
128
+ return [target, version];
129
+ }
130
+ function generateTargets(inputTargets) {
131
+ const input = Object.assign({}, inputTargets);
132
+ delete input.esmodules;
133
+ delete input.browsers;
134
+ return input;
135
+ }
136
+ function resolveTargets(queries, env) {
137
+ const resolved = _browserslist(queries, {
138
+ mobileToDesktop: true,
139
+ env
140
+ });
141
+ return getLowestVersions(resolved);
142
+ }
143
+ const targetsCache = new _lruCache({
144
+ max: 64
145
+ });
146
+ function resolveTargetsCached(queries, env) {
147
+ const cacheKey = typeof queries === "string" ? queries : queries.join() + env;
148
+ let cached = targetsCache.get(cacheKey);
149
+ if (!cached) {
150
+ cached = resolveTargets(queries, env);
151
+ targetsCache.set(cacheKey, cached);
152
+ }
153
+ return Object.assign({}, cached);
154
+ }
155
+ function getTargets(inputTargets = {}, options = {}) {
156
+ var _browsers, _browsers2;
157
+ let {
158
+ browsers,
159
+ esmodules
160
+ } = inputTargets;
161
+ const {
162
+ configPath = ".",
163
+ onBrowserslistConfigFound
164
+ } = options;
165
+ validateBrowsers(browsers);
166
+ const input = generateTargets(inputTargets);
167
+ let targets = validateTargetNames(input);
168
+ const shouldParseBrowsers = !!browsers;
169
+ const hasTargets = shouldParseBrowsers || Object.keys(targets).length > 0;
170
+ const shouldSearchForConfig = !options.ignoreBrowserslistConfig && !hasTargets;
171
+ if (!browsers && shouldSearchForConfig) {
172
+ browsers = process.env.BROWSERSLIST;
173
+ if (!browsers) {
174
+ const configFile = options.configFile || process.env.BROWSERSLIST_CONFIG || _browserslist.findConfigFile(configPath);
175
+ if (configFile != null) {
176
+ onBrowserslistConfigFound == null || onBrowserslistConfigFound(configFile);
177
+ browsers = _browserslist.loadConfig({
178
+ config: configFile,
179
+ env: options.browserslistEnv
180
+ });
181
+ }
182
+ }
183
+ if (browsers == null) {
184
+ browsers = [];
185
+ }
186
+ }
187
+ if (esmodules && (esmodules !== "intersect" || !((_browsers = browsers) != null && _browsers.length))) {
188
+ browsers = Object.keys(ESM_SUPPORT).map(browser => `${browser} >= ${ESM_SUPPORT[browser]}`).join(", ");
189
+ esmodules = false;
190
+ }
191
+ if ((_browsers2 = browsers) != null && _browsers2.length) {
192
+ const queryBrowsers = resolveTargetsCached(browsers, options.browserslistEnv);
193
+ if (esmodules === "intersect") {
194
+ for (const browser of Object.keys(queryBrowsers)) {
195
+ if (browser !== "deno" && browser !== "ie") {
196
+ const esmSupportVersion = ESM_SUPPORT[browser === "opera_mobile" ? "op_mob" : browser];
197
+ if (esmSupportVersion) {
198
+ const version = queryBrowsers[browser];
199
+ queryBrowsers[browser] = (0, _utils.getHighestUnreleased)(version, (0, _utils.semverify)(esmSupportVersion), browser);
200
+ } else {
201
+ delete queryBrowsers[browser];
202
+ }
203
+ } else {
204
+ delete queryBrowsers[browser];
205
+ }
206
+ }
207
+ }
208
+ targets = Object.assign(queryBrowsers, targets);
209
+ }
210
+ const result = {};
211
+ const decimalWarnings = [];
212
+ for (const target of Object.keys(targets).sort()) {
213
+ const value = targets[target];
214
+ if (typeof value === "number" && value % 1 !== 0) {
215
+ decimalWarnings.push({
216
+ target,
217
+ value
218
+ });
219
+ }
220
+ const [parsedTarget, parsedValue] = target === "node" ? nodeTargetParser(value) : defaultTargetParser(target, value);
221
+ if (parsedValue) {
222
+ result[parsedTarget] = parsedValue;
223
+ }
224
+ }
225
+ outputDecimalWarning(decimalWarnings);
226
+ return result;
227
+ }
228
+
229
+ //# sourceMappingURL=index.js.map
node_modules/@babel/helper-compilation-targets/lib/index.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"names":["_browserslist","require","_helperValidatorOption","_lruCache","_utils","_targets","_options","_pretty","_debug","_filterItems","browserModulesData","ESM_SUPPORT","v","OptionValidator","validateTargetNames","targets","validTargets","Object","keys","TargetNames","target","Error","formatMessage","findSuggestion","isBrowsersQueryValid","browsers","Array","isArray","every","b","validateBrowsers","invariant","undefined","String","getLowestVersions","reduce","all","browser","browserName","browserVersion","split","browserNameMap","splitVersion","toLowerCase","isSplitUnreleased","isUnreleasedVersion","semverify","version","isUnreleased","getLowestUnreleased","parsedBrowserVersion","semverMin","_","outputDecimalWarning","decimalTargets","length","console","warn","forEach","value","semverifyTarget","nodeTargetParser","parsed","process","versions","node","defaultTargetParser","generateTargets","inputTargets","input","assign","esmodules","resolveTargets","queries","env","resolved","browserslist","mobileToDesktop","targetsCache","LruCache","max","resolveTargetsCached","cacheKey","join","cached","get","set","getTargets","options","_browsers","_browsers2","configPath","onBrowserslistConfigFound","shouldParseBrowsers","hasTargets","shouldSearchForConfig","ignoreBrowserslistConfig","BROWSERSLIST","configFile","BROWSERSLIST_CONFIG","findConfigFile","loadConfig","config","browserslistEnv","map","queryBrowsers","esmSupportVersion","getHighestUnreleased","result","decimalWarnings","sort","push","parsedTarget","parsedValue"],"sources":["../src/index.ts"],"sourcesContent":["import browserslist from \"browserslist\";\nimport { findSuggestion } from \"@babel/helper-validator-option\";\nimport browserModulesData from \"@babel/compat-data/native-modules\" with { type: \"json\" };\nimport LruCache from \"lru-cache\";\n\nimport {\n semverify,\n semverMin,\n isUnreleasedVersion,\n getLowestUnreleased,\n getHighestUnreleased,\n} from \"./utils.ts\";\nimport { OptionValidator } from \"@babel/helper-validator-option\";\nimport { browserNameMap } from \"./targets.ts\";\nimport { TargetNames } from \"./options.ts\";\nimport type {\n Target,\n Targets,\n InputTargets,\n Browsers,\n BrowserslistBrowserName,\n TargetsTuple,\n} from \"./types.d.ts\";\n\nexport type { Target, Targets, InputTargets };\n\nexport { prettifyTargets } from \"./pretty.ts\";\nexport { getInclusionReasons } from \"./debug.ts\";\nexport { default as filterItems, isRequired } from \"./filter-items.ts\";\nexport { unreleasedLabels } from \"./targets.ts\";\nexport { TargetNames };\n\nconst ESM_SUPPORT = browserModulesData[\"es6.module\"];\n\nconst v = new OptionValidator(PACKAGE_JSON.name);\n\nfunction validateTargetNames(targets: Targets): TargetsTuple {\n const validTargets = Object.keys(TargetNames);\n for (const target of Object.keys(targets)) {\n if (!(target in TargetNames)) {\n throw new Error(\n v.formatMessage(`'${target}' is not a valid target\n- Did you mean '${findSuggestion(target, validTargets)}'?`),\n );\n }\n }\n\n return targets;\n}\n\nexport function isBrowsersQueryValid(browsers: unknown): boolean {\n return (\n typeof browsers === \"string\" ||\n (Array.isArray(browsers) && browsers.every(b => typeof b === \"string\"))\n );\n}\n\nfunction validateBrowsers(browsers: Browsers | undefined) {\n v.invariant(\n browsers === undefined || isBrowsersQueryValid(browsers),\n `'${String(browsers)}' is not a valid browserslist query`,\n );\n\n return browsers;\n}\n\nfunction getLowestVersions(browsers: string[]): Targets {\n return browsers.reduce(\n (all, browser) => {\n const [browserName, browserVersion] = browser.split(\" \") as [\n BrowserslistBrowserName,\n string,\n ];\n const target = browserNameMap[browserName];\n\n if (!target) {\n return all;\n }\n\n try {\n // Browser version can return as \"10.0-10.2\"\n const splitVersion = browserVersion.split(\"-\")[0].toLowerCase();\n const isSplitUnreleased = isUnreleasedVersion(splitVersion, target);\n\n if (!all[target]) {\n all[target] = isSplitUnreleased\n ? splitVersion\n : semverify(splitVersion);\n return all;\n }\n\n const version = all[target];\n const isUnreleased = isUnreleasedVersion(version, target);\n\n if (isUnreleased && isSplitUnreleased) {\n all[target] = getLowestUnreleased(version, splitVersion, target);\n } else if (isUnreleased) {\n all[target] = semverify(splitVersion);\n } else if (!isUnreleased && !isSplitUnreleased) {\n const parsedBrowserVersion = semverify(splitVersion);\n\n all[target] = semverMin(version, parsedBrowserVersion);\n }\n } catch (_) {}\n\n return all;\n },\n {} as Record<Target, string>,\n );\n}\n\nfunction outputDecimalWarning(\n decimalTargets: { target: string; value: number }[],\n) {\n if (!decimalTargets.length) {\n return;\n }\n\n console.warn(\"Warning, the following targets are using a decimal version:\\n\");\n decimalTargets.forEach(({ target, value }) =>\n console.warn(` ${target}: ${value}`),\n );\n console.warn(`\nWe recommend using a string for minor/patch versions to avoid numbers like 6.10\ngetting parsed as 6.1, which can lead to unexpected behavior.\n`);\n}\n\nfunction semverifyTarget(target: Target, value: string) {\n try {\n return semverify(value);\n } catch (_) {\n throw new Error(\n v.formatMessage(\n `'${value}' is not a valid value for 'targets.${target}'.`,\n ),\n );\n }\n}\n\n// Parse `node: true` and `node: \"current\"` to version\nfunction nodeTargetParser(value: true | string) {\n const parsed =\n value === true || value === \"current\"\n ? // Align with `browserslist` and strip prerelease tag.\n process.versions.node.split(\"-\")[0]\n : semverifyTarget(\"node\", value);\n return [\"node\", parsed] as const;\n}\n\nfunction defaultTargetParser(\n target: Exclude<Target, \"node\">,\n value: string,\n): readonly [Exclude<Target, \"node\">, string] {\n const version = isUnreleasedVersion(value, target)\n ? value.toLowerCase()\n : semverifyTarget(target, value);\n return [target, version] as const;\n}\n\nfunction generateTargets(inputTargets: InputTargets): Targets {\n const input = { ...inputTargets };\n delete input.esmodules;\n delete input.browsers;\n return input;\n}\n\nfunction resolveTargets(queries: Browsers, env?: string): Targets {\n const resolved = browserslist(queries, {\n mobileToDesktop: true,\n env,\n });\n return getLowestVersions(resolved);\n}\n\nconst targetsCache = new LruCache({ max: 64 });\n\nfunction resolveTargetsCached(queries: Browsers, env?: string): Targets {\n const cacheKey = typeof queries === \"string\" ? queries : queries.join() + env;\n let cached = targetsCache.get(cacheKey) as Targets | undefined;\n if (!cached) {\n cached = resolveTargets(queries, env);\n targetsCache.set(cacheKey, cached);\n }\n return { ...cached };\n}\n\ntype GetTargetsOption = {\n // This is not the path of the config file, but the path where start searching it from\n configPath?: string;\n // The path of the config file\n configFile?: string;\n // The env to pass to browserslist\n browserslistEnv?: string;\n // true to disable config loading\n ignoreBrowserslistConfig?: boolean;\n // custom hook when browserslist config is found\n onBrowserslistConfigFound?: (configFile: string) => void;\n};\n\nexport default function getTargets(\n inputTargets: InputTargets = {},\n options: GetTargetsOption = {},\n): Targets {\n let { browsers, esmodules } = inputTargets;\n const { configPath = \".\", onBrowserslistConfigFound } = options;\n\n validateBrowsers(browsers);\n\n const input = generateTargets(inputTargets);\n let targets = validateTargetNames(input);\n\n const shouldParseBrowsers = !!browsers;\n const hasTargets = shouldParseBrowsers || Object.keys(targets).length > 0;\n const shouldSearchForConfig =\n !options.ignoreBrowserslistConfig && !hasTargets;\n\n if (!browsers && shouldSearchForConfig) {\n // https://github.com/browserslist/browserslist/blob/8ae85caa905d130f4ca86f7a998a5b63abbbe582/node.js#L243\n browsers = process.env.BROWSERSLIST;\n if (!browsers) {\n const configFile =\n options.configFile ||\n process.env.BROWSERSLIST_CONFIG ||\n browserslist.findConfigFile(configPath);\n if (configFile != null) {\n onBrowserslistConfigFound?.(configFile);\n browsers = browserslist.loadConfig({\n config: configFile,\n env: options.browserslistEnv,\n });\n }\n }\n\n if (browsers == null) {\n if (process.env.BABEL_8_BREAKING) {\n // In Babel 8, if no targets are passed, we use browserslist's defaults.\n browsers = [\"defaults\"];\n } else {\n // If no targets are passed, we need to overwrite browserslist's defaults\n // so that we enable all transforms (acting like the now deprecated\n // preset-latest).\n browsers = [];\n }\n }\n }\n\n if (process.env.BABEL_8_BREAKING && esmodules) {\n esmodules = \"intersect\";\n }\n\n // `esmodules` as a target indicates the specific set of browsers supporting ES Modules.\n // These values OVERRIDE the `browsers` field.\n if (esmodules && (esmodules !== \"intersect\" || !browsers?.length)) {\n browsers = Object.keys(ESM_SUPPORT)\n .map(\n (browser: keyof typeof ESM_SUPPORT) =>\n `${browser} >= ${ESM_SUPPORT[browser]}`,\n )\n .join(\", \");\n esmodules = false;\n }\n\n // If current value of `browsers` is undefined (`ignoreBrowserslistConfig` should be `false`)\n // or an empty array (without any user config, use default config),\n // we don't need to call `resolveTargets` to execute the related methods of `browserslist` library.\n if (browsers?.length) {\n const queryBrowsers = resolveTargetsCached(\n browsers,\n options.browserslistEnv,\n );\n\n if (esmodules === \"intersect\") {\n for (const browser of Object.keys(queryBrowsers) as Target[]) {\n if (browser !== \"deno\" && browser !== \"ie\") {\n const esmSupportVersion =\n ESM_SUPPORT[browser === \"opera_mobile\" ? \"op_mob\" : browser];\n\n if (esmSupportVersion) {\n const version = queryBrowsers[browser];\n queryBrowsers[browser] = getHighestUnreleased(\n version,\n semverify(esmSupportVersion),\n browser,\n );\n } else {\n delete queryBrowsers[browser];\n }\n } else {\n delete queryBrowsers[browser];\n }\n }\n }\n\n targets = Object.assign(queryBrowsers, targets);\n }\n\n // Parse remaining targets\n const result: Targets = {};\n const decimalWarnings = [];\n for (const target of Object.keys(targets).sort() as Target[]) {\n const value = targets[target];\n\n // Warn when specifying minor/patch as a decimal\n if (typeof value === \"number\" && value % 1 !== 0) {\n decimalWarnings.push({ target, value });\n }\n\n const [parsedTarget, parsedValue] =\n target === \"node\"\n ? nodeTargetParser(value)\n : defaultTargetParser(target, value as string);\n\n if (parsedValue) {\n //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,CAAC;EAC1B,MAAMC,eAAe,GAAG,EAAE;EAC1B,KAAK,MAAMzF,MAAM,IAAIH,MAAM,CAACC,IAAI,CAACH,OAAO,CAAC,CAAC+F,IAAI,CAAC,CAAC,EAAc;IAC5D,MAAMnD,KAAK,GAAG5C,OAAO,CAACK,MAAM,CAAC;IAG7B,IAAI,OAAOuC,KAAK,KAAK,QAAQ,IAAIA,KAAK,GAAG,CAAC,KAAK,CAAC,EAAE;MAChDkD,eAAe,CAACE,IAAI,CAAC;QAAE3F,MAAM;QAAEuC;MAAM,CAAC,CAAC;IACzC;IAEA,MAAM,CAACqD,YAAY,EAAEC,WAAW,CAAC,GAC/B7F,MAAM,KAAK,MAAM,GACbyC,gBAAgB,CAACF,KAAK,CAAC,GACvBO,mBAAmB,CAAC9C,MAAM,EAAEuC,KAAe,CAAC;IAElD,IAAIsD,WAAW,EAAE;MAEfL,MAAM,CAACI,YAAY,CAAC,GAAGC,WAAW;IACpC;EACF;EAEA5D,oBAAoB,CAACwD,eAAe,CAAC;EAErC,OAAOD,MAAM;AACf","ignoreList":[]}
node_modules/@babel/helper-compilation-targets/lib/options.js ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TargetNames = void 0;
7
+ const TargetNames = exports.TargetNames = {
8
+ node: "node",
9
+ deno: "deno",
10
+ chrome: "chrome",
11
+ opera: "opera",
12
+ edge: "edge",
13
+ firefox: "firefox",
14
+ safari: "safari",
15
+ ie: "ie",
16
+ ios: "ios",
17
+ android: "android",
18
+ electron: "electron",
19
+ samsung: "samsung",
20
+ rhino: "rhino",
21
+ opera_mobile: "opera_mobile"
22
+ };
23
+
24
+ //# sourceMappingURL=options.js.map
node_modules/@babel/helper-compilation-targets/lib/options.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"names":["TargetNames","exports","node","deno","chrome","opera","edge","firefox","safari","ie","ios","android","electron","samsung","rhino","opera_mobile"],"sources":["../src/options.ts"],"sourcesContent":["export const TargetNames = {\n node: \"node\",\n deno: \"deno\",\n chrome: \"chrome\",\n opera: \"opera\",\n edge: \"edge\",\n firefox: \"firefox\",\n safari: \"safari\",\n ie: \"ie\",\n ios: \"ios\",\n android: \"android\",\n electron: \"electron\",\n samsung: \"samsung\",\n rhino: \"rhino\",\n opera_mobile: \"opera_mobile\",\n};\n"],"mappings":";;;;;;AAAO,MAAMA,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG;EACzBE,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,QAAQ;EAChBC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE,MAAM;EACZC,OAAO,EAAE,SAAS;EAClBC,MAAM,EAAE,QAAQ;EAChBC,EAAE,EAAE,IAAI;EACRC,GAAG,EAAE,KAAK;EACVC,OAAO,EAAE,SAAS;EAClBC,QAAQ,EAAE,UAAU;EACpBC,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE,OAAO;EACdC,YAAY,EAAE;AAChB,CAAC","ignoreList":[]}
node_modules/@babel/helper-compilation-targets/lib/pretty.js ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.prettifyTargets = prettifyTargets;
7
+ exports.prettifyVersion = prettifyVersion;
8
+ var _semver = require("semver");
9
+ var _targets = require("./targets.js");
10
+ function prettifyVersion(version) {
11
+ if (typeof version !== "string") {
12
+ return version;
13
+ }
14
+ const {
15
+ major,
16
+ minor,
17
+ patch
18
+ } = _semver.parse(version);
19
+ const parts = [major];
20
+ if (minor || patch) {
21
+ parts.push(minor);
22
+ }
23
+ if (patch) {
24
+ parts.push(patch);
25
+ }
26
+ return parts.join(".");
27
+ }
28
+ function prettifyTargets(targets) {
29
+ return Object.keys(targets).reduce((results, target) => {
30
+ let value = targets[target];
31
+ const unreleasedLabel = _targets.unreleasedLabels[target];
32
+ if (typeof value === "string" && unreleasedLabel !== value) {
33
+ value = prettifyVersion(value);
34
+ }
35
+ results[target] = value;
36
+ return results;
37
+ }, {});
38
+ }
39
+
40
+ //# sourceMappingURL=pretty.js.map
node_modules/@babel/helper-compilation-targets/lib/pretty.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"names":["_semver","require","_targets","prettifyVersion","version","major","minor","patch","semver","parse","parts","push","join","prettifyTargets","targets","Object","keys","reduce","results","target","value","unreleasedLabel","unreleasedLabels"],"sources":["../src/pretty.ts"],"sourcesContent":["import semver from \"semver\";\nimport { unreleasedLabels } from \"./targets.ts\";\nimport type { Targets, Target } from \"./types.ts\";\n\nexport function prettifyVersion(version: string) {\n if (typeof version !== \"string\") {\n return version;\n }\n\n const { major, minor, patch } = semver.parse(version);\n\n const parts = [major];\n\n if (minor || patch) {\n parts.push(minor);\n }\n\n if (patch) {\n parts.push(patch);\n }\n\n return parts.join(\".\");\n}\n\nexport function prettifyTargets(targets: Targets): Targets {\n return Object.keys(targets).reduce((results, target: Target) => {\n let value = targets[target];\n\n const unreleasedLabel =\n // @ts-expect-error undefined is strictly compared with string later\n unreleasedLabels[target];\n if (typeof value === \"string\" && unreleasedLabel !== value) {\n value = prettifyVersion(value);\n }\n\n results[target] = value;\n return results;\n }, {} as Targets);\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAGO,SAASE,eAAeA,CAACC,OAAe,EAAE;EAC/C,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE;IAC/B,OAAOA,OAAO;EAChB;EAEA,MAAM;IAAEC,KAAK;IAAEC,KAAK;IAAEC;EAAM,CAAC,GAAGC,OAAM,CAACC,KAAK,CAACL,OAAO,CAAC;EAErD,MAAMM,KAAK,GAAG,CAACL,KAAK,CAAC;EAErB,IAAIC,KAAK,IAAIC,KAAK,EAAE;IAClBG,KAAK,CAACC,IAAI,CAACL,KAAK,CAAC;EACnB;EAEA,IAAIC,KAAK,EAAE;IACTG,KAAK,CAACC,IAAI,CAACJ,KAAK,CAAC;EACnB;EAEA,OAAOG,KAAK,CAACE,IAAI,CAAC,GAAG,CAAC;AACxB;AAEO,SAASC,eAAeA,CAACC,OAAgB,EAAW;EACzD,OAAOC,MAAM,CAACC,IAAI,CAACF,OAAO,CAAC,CAACG,MAAM,CAAC,CAACC,OAAO,EAAEC,MAAc,KAAK;IAC9D,IAAIC,KAAK,GAAGN,OAAO,CAACK,MAAM,CAAC;IAE3B,MAAME,eAAe,GAEnBC,yBAAgB,CAACH,MAAM,CAAC;IAC1B,IAAI,OAAOC,KAAK,KAAK,QAAQ,IAAIC,eAAe,KAAKD,KAAK,EAAE;MAC1DA,KAAK,GAAGjB,eAAe,CAACiB,KAAK,CAAC;IAChC;IAEAF,OAAO,CAACC,MAAM,CAAC,GAAGC,KAAK;IACvB,OAAOF,OAAO;EAChB,CAAC,EAAE,CAAC,CAAY,CAAC;AACnB","ignoreList":[]}
node_modules/@babel/helper-compilation-targets/lib/targets.js ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.unreleasedLabels = exports.browserNameMap = void 0;
7
+ const unreleasedLabels = exports.unreleasedLabels = {
8
+ safari: "tp"
9
+ };
10
+ const browserNameMap = exports.browserNameMap = {
11
+ and_chr: "chrome",
12
+ and_ff: "firefox",
13
+ android: "android",
14
+ chrome: "chrome",
15
+ edge: "edge",
16
+ firefox: "firefox",
17
+ ie: "ie",
18
+ ie_mob: "ie",
19
+ ios_saf: "ios",
20
+ node: "node",
21
+ deno: "deno",
22
+ op_mob: "opera_mobile",
23
+ opera: "opera",
24
+ safari: "safari",
25
+ samsung: "samsung"
26
+ };
27
+
28
+ //# sourceMappingURL=targets.js.map
node_modules/@babel/helper-compilation-targets/lib/targets.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"names":["unreleasedLabels","exports","safari","browserNameMap","and_chr","and_ff","android","chrome","edge","firefox","ie","ie_mob","ios_saf","node","deno","op_mob","opera","samsung"],"sources":["../src/targets.ts"],"sourcesContent":["export const unreleasedLabels = {\n safari: \"tp\",\n} as const;\n\n// Map from browserslist|@mdn/browser-compat-data browser names to @kangax/compat-table browser names\nexport const browserNameMap = {\n and_chr: \"chrome\",\n and_ff: \"firefox\",\n android: \"android\",\n chrome: \"chrome\",\n edge: \"edge\",\n firefox: \"firefox\",\n ie: \"ie\",\n ie_mob: \"ie\",\n ios_saf: \"ios\",\n node: \"node\",\n deno: \"deno\",\n op_mob: \"opera_mobile\",\n opera: \"opera\",\n safari: \"safari\",\n samsung: \"samsung\",\n} as const;\n\nexport type BrowserslistBrowserName = keyof typeof browserNameMap;\n"],"mappings":";;;;;;AAAO,MAAMA,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG;EAC9BE,MAAM,EAAE;AACV,CAAU;AAGH,MAAMC,cAAc,GAAAF,OAAA,CAAAE,cAAA,GAAG;EAC5BC,OAAO,EAAE,QAAQ;EACjBC,MAAM,EAAE,SAAS;EACjBC,OAAO,EAAE,SAAS;EAClBC,MAAM,EAAE,QAAQ;EAChBC,IAAI,EAAE,MAAM;EACZC,OAAO,EAAE,SAAS;EAClBC,EAAE,EAAE,IAAI;EACRC,MAAM,EAAE,IAAI;EACZC,OAAO,EAAE,KAAK;EACdC,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,cAAc;EACtBC,KAAK,EAAE,OAAO;EACdd,MAAM,EAAE,QAAQ;EAChBe,OAAO,EAAE;AACX,CAAU","ignoreList":[]}
node_modules/@babel/helper-compilation-targets/lib/utils.js ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getHighestUnreleased = getHighestUnreleased;
7
+ exports.getLowestImplementedVersion = getLowestImplementedVersion;
8
+ exports.getLowestUnreleased = getLowestUnreleased;
9
+ exports.isUnreleasedVersion = isUnreleasedVersion;
10
+ exports.semverMin = semverMin;
11
+ exports.semverify = semverify;
12
+ var _semver = require("semver");
13
+ var _helperValidatorOption = require("@babel/helper-validator-option");
14
+ var _targets = require("./targets.js");
15
+ const versionRegExp = /^(?:\d+|\d(?:\d?[^\d\n\r\u2028\u2029]\d+|\d{2,}(?:[^\d\n\r\u2028\u2029]\d+)?))$/;
16
+ const v = new _helperValidatorOption.OptionValidator("@babel/helper-compilation-targets");
17
+ function semverMin(first, second) {
18
+ return first && _semver.lt(first, second) ? first : second;
19
+ }
20
+ function semverify(version) {
21
+ if (typeof version === "string" && _semver.valid(version)) {
22
+ return version;
23
+ }
24
+ v.invariant(typeof version === "number" || typeof version === "string" && versionRegExp.test(version), `'${version}' is not a valid version`);
25
+ version = version.toString();
26
+ let pos = 0;
27
+ let num = 0;
28
+ while ((pos = version.indexOf(".", pos + 1)) > 0) {
29
+ num++;
30
+ }
31
+ return version + ".0".repeat(2 - num);
32
+ }
33
+ function isUnreleasedVersion(version, env) {
34
+ const unreleasedLabel = _targets.unreleasedLabels[env];
35
+ return !!unreleasedLabel && unreleasedLabel === version.toString().toLowerCase();
36
+ }
37
+ function getLowestUnreleased(a, b, env) {
38
+ const unreleasedLabel = _targets.unreleasedLabels[env];
39
+ if (a === unreleasedLabel) {
40
+ return b;
41
+ }
42
+ if (b === unreleasedLabel) {
43
+ return a;
44
+ }
45
+ return semverMin(a, b);
46
+ }
47
+ function getHighestUnreleased(a, b, env) {
48
+ return getLowestUnreleased(a, b, env) === a ? b : a;
49
+ }
50
+ function getLowestImplementedVersion(plugin, environment) {
51
+ const result = plugin[environment];
52
+ if (!result && environment === "android") {
53
+ return plugin.chrome;
54
+ }
55
+ return result;
56
+ }
57
+
58
+ //# sourceMappingURL=utils.js.map
node_modules/@babel/helper-compilation-targets/lib/utils.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"names":["_semver","require","_helperValidatorOption","_targets","versionRegExp","v","OptionValidator","semverMin","first","second","semver","lt","semverify","version","valid","invariant","test","toString","pos","num","indexOf","repeat","isUnreleasedVersion","env","unreleasedLabel","unreleasedLabels","toLowerCase","getLowestUnreleased","a","b","getHighestUnreleased","getLowestImplementedVersion","plugin","environment","result","chrome"],"sources":["../src/utils.ts"],"sourcesContent":["import semver from \"semver\";\nimport { OptionValidator } from \"@babel/helper-validator-option\";\nimport { unreleasedLabels } from \"./targets.ts\";\nimport type { Target, Targets } from \"./types.ts\";\n\nconst versionRegExp =\n /^(?:\\d+|\\d(?:\\d?[^\\d\\n\\r\\u2028\\u2029]\\d+|\\d{2,}(?:[^\\d\\n\\r\\u2028\\u2029]\\d+)?))$/;\n\nconst v = new OptionValidator(PACKAGE_JSON.name);\n\nexport function semverMin(\n first: string | undefined | null,\n second: string,\n): string {\n return first && semver.lt(first, second) ? first : second;\n}\n\n// Convert version to a semver value.\n// 2.5 -> 2.5.0; 1 -> 1.0.0;\nexport function semverify(version: number | string): string {\n if (typeof version === \"string\" && semver.valid(version)) {\n return version;\n }\n\n v.invariant(\n typeof version === \"number\" ||\n (typeof version === \"string\" && versionRegExp.test(version)),\n `'${version}' is not a valid version`,\n );\n\n version = version.toString();\n\n let pos = 0;\n let num = 0;\n while ((pos = version.indexOf(\".\", pos + 1)) > 0) {\n num++;\n }\n return version + \".0\".repeat(2 - num);\n}\n\nexport function isUnreleasedVersion(\n version: string | number,\n env: Target,\n): boolean {\n const unreleasedLabel =\n // @ts-expect-error unreleasedLabel will be guarded later\n unreleasedLabels[env];\n return (\n !!unreleasedLabel && unreleasedLabel === version.toString().toLowerCase()\n );\n}\n\nexport function getLowestUnreleased(a: string, b: string, env: Target): string {\n const unreleasedLabel:\n | (typeof unreleasedLabels)[keyof typeof unreleasedLabels]\n | undefined =\n // @ts-expect-error unreleasedLabel is undefined when env is not safari\n unreleasedLabels[env];\n if (a === unreleasedLabel) {\n return b;\n }\n if (b === unreleasedLabel) {\n return a;\n }\n return semverMin(a, b);\n}\n\nexport function getHighestUnreleased(\n a: string,\n b: string,\n env: Target,\n): string {\n return getLowestUnreleased(a, b, env) === a ? b : a;\n}\n\nexport function getLowestImplementedVersion(\n plugin: Targets,\n environment: Target,\n): string {\n const result = plugin[environment];\n // When Android support data is absent, use Chrome data as fallback\n if (!result && environment === \"android\") {\n return plugin.chrome;\n }\n return result;\n}\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAGA,MAAMG,aAAa,GACjB,iFAAiF;AAEnF,MAAMC,CAAC,GAAG,IAAIC,sCAAe,oCAAkB,CAAC;AAEzC,SAASC,SAASA,CACvBC,KAAgC,EAChCC,MAAc,EACN;EACR,OAAOD,KAAK,IAAIE,OAAM,CAACC,EAAE,CAACH,KAAK,EAAEC,MAAM,CAAC,GAAGD,KAAK,GAAGC,MAAM;AAC3D;AAIO,SAASG,SAASA,CAACC,OAAwB,EAAU;EAC1D,IAAI,OAAOA,OAAO,KAAK,QAAQ,IAAIH,OAAM,CAACI,KAAK,CAACD,OAAO,CAAC,EAAE;IACxD,OAAOA,OAAO;EAChB;EAEAR,CAAC,CAACU,SAAS,CACT,OAAOF,OAAO,KAAK,QAAQ,IACxB,OAAOA,OAAO,KAAK,QAAQ,IAAIT,aA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K,SAAS,EAAE;IACxC,OAAOD,MAAM,CAACG,MAAM;EACtB;EACA,OAAOD,MAAM;AACf","ignoreList":[]}
node_modules/@babel/helper-compilation-targets/package.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@babel/helper-compilation-targets",
3
+ "version": "7.28.6",
4
+ "author": "The Babel Team (https://babel.dev/team)",
5
+ "license": "MIT",
6
+ "description": "Helper functions on Babel compilation targets",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/babel/babel.git",
10
+ "directory": "packages/babel-helper-compilation-targets"
11
+ },
12
+ "main": "./lib/index.js",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./lib/index.d.ts",
16
+ "default": "./lib/index.js"
17
+ },
18
+ "./package.json": "./package.json"
19
+ },
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "keywords": [
24
+ "babel",
25
+ "babel-plugin"
26
+ ],
27
+ "dependencies": {
28
+ "@babel/compat-data": "^7.28.6",
29
+ "@babel/helper-validator-option": "^7.27.1",
30
+ "browserslist": "^4.24.0",
31
+ "lru-cache": "^5.1.1",
32
+ "semver": "^6.3.1"
33
+ },
34
+ "devDependencies": {
35
+ "@babel/helper-plugin-test-runner": "^7.27.1",
36
+ "@types/lru-cache": "^5.1.1",
37
+ "@types/semver": "^5.5.0"
38
+ },
39
+ "engines": {
40
+ "node": ">=6.9.0"
41
+ },
42
+ "type": "commonjs"
43
+ }
node_modules/@babel/helper-globals/LICENSE ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2014-present Sebastian McKenzie and other contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
node_modules/@babel/helper-globals/README.md ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # @babel/helper-globals
2
+
3
+ > A collection of JavaScript globals for Babel internal usage
4
+
5
+ See our website [@babel/helper-globals](https://babeljs.io/docs/babel-helper-globals) for more information.
6
+
7
+ ## Install
8
+
9
+ Using npm:
10
+
11
+ ```sh
12
+ npm install --save @babel/helper-globals
13
+ ```
14
+
15
+ or using yarn:
16
+
17
+ ```sh
18
+ yarn add @babel/helper-globals
19
+ ```
node_modules/@babel/helper-globals/data/browser-upper.json ADDED
@@ -0,0 +1,911 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ "AbortController",
3
+ "AbortSignal",
4
+ "AbsoluteOrientationSensor",
5
+ "AbstractRange",
6
+ "Accelerometer",
7
+ "AI",
8
+ "AICreateMonitor",
9
+ "AITextSession",
10
+ "AnalyserNode",
11
+ "Animation",
12
+ "AnimationEffect",
13
+ "AnimationEvent",
14
+ "AnimationPlaybackEvent",
15
+ "AnimationTimeline",
16
+ "AsyncDisposableStack",
17
+ "Attr",
18
+ "Audio",
19
+ "AudioBuffer",
20
+ "AudioBufferSourceNode",
21
+ "AudioContext",
22
+ "AudioData",
23
+ "AudioDecoder",
24
+ "AudioDestinationNode",
25
+ "AudioEncoder",
26
+ "AudioListener",
27
+ "AudioNode",
28
+ "AudioParam",
29
+ "AudioParamMap",
30
+ "AudioProcessingEvent",
31
+ "AudioScheduledSourceNode",
32
+ "AudioSinkInfo",
33
+ "AudioWorklet",
34
+ "AudioWorkletGlobalScope",
35
+ "AudioWorkletNode",
36
+ "AudioWorkletProcessor",
37
+ "AuthenticatorAssertionResponse",
38
+ "AuthenticatorAttestationResponse",
39
+ "AuthenticatorResponse",
40
+ "BackgroundFetchManager",
41
+ "BackgroundFetchRecord",
42
+ "BackgroundFetchRegistration",
43
+ "BarcodeDetector",
44
+ "BarProp",
45
+ "BaseAudioContext",
46
+ "BatteryManager",
47
+ "BeforeUnloadEvent",
48
+ "BiquadFilterNode",
49
+ "Blob",
50
+ "BlobEvent",
51
+ "Bluetooth",
52
+ "BluetoothCharacteristicProperties",
53
+ "BluetoothDevice",
54
+ "BluetoothRemoteGATTCharacteristic",
55
+ "BluetoothRemoteGATTDescriptor",
56
+ "BluetoothRemoteGATTServer",
57
+ "BluetoothRemoteGATTService",
58
+ "BluetoothUUID",
59
+ "BroadcastChannel",
60
+ "BrowserCaptureMediaStreamTrack",
61
+ "ByteLengthQueuingStrategy",
62
+ "Cache",
63
+ "CacheStorage",
64
+ "CanvasCaptureMediaStream",
65
+ "CanvasCaptureMediaStreamTrack",
66
+ "CanvasGradient",
67
+ "CanvasPattern",
68
+ "CanvasRenderingContext2D",
69
+ "CaptureController",
70
+ "CaretPosition",
71
+ "CDATASection",
72
+ "ChannelMergerNode",
73
+ "ChannelSplitterNode",
74
+ "ChapterInformation",
75
+ "CharacterBoundsUpdateEvent",
76
+ "CharacterData",
77
+ "Clipboard",
78
+ "ClipboardEvent",
79
+ "ClipboardItem",
80
+ "CloseEvent",
81
+ "CloseWatcher",
82
+ "CommandEvent",
83
+ "Comment",
84
+ "CompositionEvent",
85
+ "CompressionStream",
86
+ "ConstantSourceNode",
87
+ "ContentVisibilityAutoStateChangeEvent",
88
+ "ConvolverNode",
89
+ "CookieChangeEvent",
90
+ "CookieDeprecationLabel",
91
+ "CookieStore",
92
+ "CookieStoreManager",
93
+ "CountQueuingStrategy",
94
+ "Credential",
95
+ "CredentialsContainer",
96
+ "CropTarget",
97
+ "Crypto",
98
+ "CryptoKey",
99
+ "CSPViolationReportBody",
100
+ "CSS",
101
+ "CSSAnimation",
102
+ "CSSConditionRule",
103
+ "CSSContainerRule",
104
+ "CSSCounterStyleRule",
105
+ "CSSFontFaceRule",
106
+ "CSSFontFeatureValuesRule",
107
+ "CSSFontPaletteValuesRule",
108
+ "CSSGroupingRule",
109
+ "CSSImageValue",
110
+ "CSSImportRule",
111
+ "CSSKeyframeRule",
112
+ "CSSKeyframesRule",
113
+ "CSSKeywordValue",
114
+ "CSSLayerBlockRule",
115
+ "CSSLayerStatementRule",
116
+ "CSSMarginRule",
117
+ "CSSMathClamp",
118
+ "CSSMathInvert",
119
+ "CSSMathMax",
120
+ "CSSMathMin",
121
+ "CSSMathNegate",
122
+ "CSSMathProduct",
123
+ "CSSMathSum",
124
+ "CSSMathValue",
125
+ "CSSMatrixComponent",
126
+ "CSSMediaRule",
127
+ "CSSNamespaceRule",
128
+ "CSSNestedDeclarations",
129
+ "CSSNumericArray",
130
+ "CSSNumericValue",
131
+ "CSSPageDescriptors",
132
+ "CSSPageRule",
133
+ "CSSPerspective",
134
+ "CSSPositionTryDescriptors",
135
+ "CSSPositionTryRule",
136
+ "CSSPositionValue",
137
+ "CSSPropertyRule",
138
+ "CSSRotate",
139
+ "CSSRule",
140
+ "CSSRuleList",
141
+ "CSSScale",
142
+ "CSSScopeRule",
143
+ "CSSSkew",
144
+ "CSSSkewX",
145
+ "CSSSkewY",
146
+ "CSSStartingStyleRule",
147
+ "CSSStyleDeclaration",
148
+ "CSSStyleRule",
149
+ "CSSStyleSheet",
150
+ "CSSStyleValue",
151
+ "CSSSupportsRule",
152
+ "CSSTransformComponent",
153
+ "CSSTransformValue",
154
+ "CSSTransition",
155
+ "CSSTranslate",
156
+ "CSSUnitValue",
157
+ "CSSUnparsedValue",
158
+ "CSSVariableReferenceValue",
159
+ "CSSViewTransitionRule",
160
+ "CustomElementRegistry",
161
+ "CustomEvent",
162
+ "CustomStateSet",
163
+ "DataTransfer",
164
+ "DataTransferItem",
165
+ "DataTransferItemList",
166
+ "DecompressionStream",
167
+ "DelayNode",
168
+ "DelegatedInkTrailPresenter",
169
+ "DeviceMotionEvent",
170
+ "DeviceMotionEventAcceleration",
171
+ "DeviceMotionEventRotationRate",
172
+ "DeviceOrientationEvent",
173
+ "DevicePosture",
174
+ "DisposableStack",
175
+ "Document",
176
+ "DocumentFragment",
177
+ "DocumentPictureInPicture",
178
+ "DocumentPictureInPictureEvent",
179
+ "DocumentTimeline",
180
+ "DocumentType",
181
+ "DOMError",
182
+ "DOMException",
183
+ "DOMImplementation",
184
+ "DOMMatrix",
185
+ "DOMMatrixReadOnly",
186
+ "DOMParser",
187
+ "DOMPoint",
188
+ "DOMPointReadOnly",
189
+ "DOMQuad",
190
+ "DOMRect",
191
+ "DOMRectList",
192
+ "DOMRectReadOnly",
193
+ "DOMStringList",
194
+ "DOMStringMap",
195
+ "DOMTokenList",
196
+ "DragEvent",
197
+ "DynamicsCompressorNode",
198
+ "EditContext",
199
+ "Element",
200
+ "ElementInternals",
201
+ "EncodedAudioChunk",
202
+ "EncodedVideoChunk",
203
+ "ErrorEvent",
204
+ "Event",
205
+ "EventCounts",
206
+ "EventSource",
207
+ "EventTarget",
208
+ "External",
209
+ "EyeDropper",
210
+ "FeaturePolicy",
211
+ "FederatedCredential",
212
+ "Fence",
213
+ "FencedFrameConfig",
214
+ "FetchLaterResult",
215
+ "File",
216
+ "FileList",
217
+ "FileReader",
218
+ "FileSystem",
219
+ "FileSystemDirectoryEntry",
220
+ "FileSystemDirectoryHandle",
221
+ "FileSystemDirectoryReader",
222
+ "FileSystemEntry",
223
+ "FileSystemFileEntry",
224
+ "FileSystemFileHandle",
225
+ "FileSystemHandle",
226
+ "FileSystemObserver",
227
+ "FileSystemWritableFileStream",
228
+ "FocusEvent",
229
+ "FontData",
230
+ "FontFace",
231
+ "FontFaceSet",
232
+ "FontFaceSetLoadEvent",
233
+ "FormData",
234
+ "FormDataEvent",
235
+ "FragmentDirective",
236
+ "GainNode",
237
+ "Gamepad",
238
+ "GamepadAxisMoveEvent",
239
+ "GamepadButton",
240
+ "GamepadButtonEvent",
241
+ "GamepadEvent",
242
+ "GamepadHapticActuator",
243
+ "GamepadPose",
244
+ "Geolocation",
245
+ "GeolocationCoordinates",
246
+ "GeolocationPosition",
247
+ "GeolocationPositionError",
248
+ "GPU",
249
+ "GPUAdapter",
250
+ "GPUAdapterInfo",
251
+ "GPUBindGroup",
252
+ "GPUBindGroupLayout",
253
+ "GPUBuffer",
254
+ "GPUBufferUsage",
255
+ "GPUCanvasContext",
256
+ "GPUColorWrite",
257
+ "GPUCommandBuffer",
258
+ "GPUCommandEncoder",
259
+ "GPUCompilationInfo",
260
+ "GPUCompilationMessage",
261
+ "GPUComputePassEncoder",
262
+ "GPUComputePipeline",
263
+ "GPUDevice",
264
+ "GPUDeviceLostInfo",
265
+ "GPUError",
266
+ "GPUExternalTexture",
267
+ "GPUInternalError",
268
+ "GPUMapMode",
269
+ "GPUOutOfMemoryError",
270
+ "GPUPipelineError",
271
+ "GPUPipelineLayout",
272
+ "GPUQuerySet",
273
+ "GPUQueue",
274
+ "GPURenderBundle",
275
+ "GPURenderBundleEncoder",
276
+ "GPURenderPassEncoder",
277
+ "GPURenderPipeline",
278
+ "GPUSampler",
279
+ "GPUShaderModule",
280
+ "GPUShaderStage",
281
+ "GPUSupportedFeatures",
282
+ "GPUSupportedLimits",
283
+ "GPUTexture",
284
+ "GPUTextureUsage",
285
+ "GPUTextureView",
286
+ "GPUUncapturedErrorEvent",
287
+ "GPUValidationError",
288
+ "GravitySensor",
289
+ "Gyroscope",
290
+ "HashChangeEvent",
291
+ "Headers",
292
+ "HID",
293
+ "HIDConnectionEvent",
294
+ "HIDDevice",
295
+ "HIDInputReportEvent",
296
+ "Highlight",
297
+ "HighlightRegistry",
298
+ "History",
299
+ "HTMLAllCollection",
300
+ "HTMLAnchorElement",
301
+ "HTMLAreaElement",
302
+ "HTMLAudioElement",
303
+ "HTMLBaseElement",
304
+ "HTMLBodyElement",
305
+ "HTMLBRElement",
306
+ "HTMLButtonElement",
307
+ "HTMLCanvasElement",
308
+ "HTMLCollection",
309
+ "HTMLDataElement",
310
+ "HTMLDataListElement",
311
+ "HTMLDetailsElement",
312
+ "HTMLDialogElement",
313
+ "HTMLDirectoryElement",
314
+ "HTMLDivElement",
315
+ "HTMLDListElement",
316
+ "HTMLDocument",
317
+ "HTMLElement",
318
+ "HTMLEmbedElement",
319
+ "HTMLFencedFrameElement",
320
+ "HTMLFieldSetElement",
321
+ "HTMLFontElement",
322
+ "HTMLFormControlsCollection",
323
+ "HTMLFormElement",
324
+ "HTMLFrameElement",
325
+ "HTMLFrameSetElement",
326
+ "HTMLHeadElement",
327
+ "HTMLHeadingElement",
328
+ "HTMLHRElement",
329
+ "HTMLHtmlElement",
330
+ "HTMLIFrameElement",
331
+ "HTMLImageElement",
332
+ "HTMLInputElement",
333
+ "HTMLLabelElement",
334
+ "HTMLLegendElement",
335
+ "HTMLLIElement",
336
+ "HTMLLinkElement",
337
+ "HTMLMapElement",
338
+ "HTMLMarqueeElement",
339
+ "HTMLMediaElement",
340
+ "HTMLMenuElement",
341
+ "HTMLMetaElement",
342
+ "HTMLMeterElement",
343
+ "HTMLModElement",
344
+ "HTMLObjectElement",
345
+ "HTMLOListElement",
346
+ "HTMLOptGroupElement",
347
+ "HTMLOptionElement",
348
+ "HTMLOptionsCollection",
349
+ "HTMLOutputElement",
350
+ "HTMLParagraphElement",
351
+ "HTMLParamElement",
352
+ "HTMLPictureElement",
353
+ "HTMLPreElement",
354
+ "HTMLProgressElement",
355
+ "HTMLQuoteElement",
356
+ "HTMLScriptElement",
357
+ "HTMLSelectedContentElement",
358
+ "HTMLSelectElement",
359
+ "HTMLSlotElement",
360
+ "HTMLSourceElement",
361
+ "HTMLSpanElement",
362
+ "HTMLStyleElement",
363
+ "HTMLTableCaptionElement",
364
+ "HTMLTableCellElement",
365
+ "HTMLTableColElement",
366
+ "HTMLTableElement",
367
+ "HTMLTableRowElement",
368
+ "HTMLTableSectionElement",
369
+ "HTMLTemplateElement",
370
+ "HTMLTextAreaElement",
371
+ "HTMLTimeElement",
372
+ "HTMLTitleElement",
373
+ "HTMLTrackElement",
374
+ "HTMLUListElement",
375
+ "HTMLUnknownElement",
376
+ "HTMLVideoElement",
377
+ "IDBCursor",
378
+ "IDBCursorWithValue",
379
+ "IDBDatabase",
380
+ "IDBFactory",
381
+ "IDBIndex",
382
+ "IDBKeyRange",
383
+ "IDBObjectStore",
384
+ "IDBOpenDBRequest",
385
+ "IDBRequest",
386
+ "IDBTransaction",
387
+ "IDBVersionChangeEvent",
388
+ "IdentityCredential",
389
+ "IdentityCredentialError",
390
+ "IdentityProvider",
391
+ "IdleDeadline",
392
+ "IdleDetector",
393
+ "IIRFilterNode",
394
+ "Image",
395
+ "ImageBitmap",
396
+ "ImageBitmapRenderingContext",
397
+ "ImageCapture",
398
+ "ImageData",
399
+ "ImageDecoder",
400
+ "ImageTrack",
401
+ "ImageTrackList",
402
+ "Ink",
403
+ "InputDeviceCapabilities",
404
+ "InputDeviceInfo",
405
+ "InputEvent",
406
+ "IntersectionObserver",
407
+ "IntersectionObserverEntry",
408
+ "Keyboard",
409
+ "KeyboardEvent",
410
+ "KeyboardLayoutMap",
411
+ "KeyframeEffect",
412
+ "LanguageDetector",
413
+ "LargestContentfulPaint",
414
+ "LaunchParams",
415
+ "LaunchQueue",
416
+ "LayoutShift",
417
+ "LayoutShiftAttribution",
418
+ "LinearAccelerationSensor",
419
+ "Location",
420
+ "Lock",
421
+ "LockManager",
422
+ "MathMLElement",
423
+ "MediaCapabilities",
424
+ "MediaCapabilitiesInfo",
425
+ "MediaDeviceInfo",
426
+ "MediaDevices",
427
+ "MediaElementAudioSourceNode",
428
+ "MediaEncryptedEvent",
429
+ "MediaError",
430
+ "MediaKeyError",
431
+ "MediaKeyMessageEvent",
432
+ "MediaKeys",
433
+ "MediaKeySession",
434
+ "MediaKeyStatusMap",
435
+ "MediaKeySystemAccess",
436
+ "MediaList",
437
+ "MediaMetadata",
438
+ "MediaQueryList",
439
+ "MediaQueryListEvent",
440
+ "MediaRecorder",
441
+ "MediaRecorderErrorEvent",
442
+ "MediaSession",
443
+ "MediaSource",
444
+ "MediaSourceHandle",
445
+ "MediaStream",
446
+ "MediaStreamAudioDestinationNode",
447
+ "MediaStreamAudioSourceNode",
448
+ "MediaStreamEvent",
449
+ "MediaStreamTrack",
450
+ "MediaStreamTrackAudioSourceNode",
451
+ "MediaStreamTrackAudioStats",
452
+ "MediaStreamTrackEvent",
453
+ "MediaStreamTrackGenerator",
454
+ "MediaStreamTrackProcessor",
455
+ "MediaStreamTrackVideoStats",
456
+ "MessageChannel",
457
+ "MessageEvent",
458
+ "MessagePort",
459
+ "MIDIAccess",
460
+ "MIDIConnectionEvent",
461
+ "MIDIInput",
462
+ "MIDIInputMap",
463
+ "MIDIMessageEvent",
464
+ "MIDIOutput",
465
+ "MIDIOutputMap",
466
+ "MIDIPort",
467
+ "MimeType",
468
+ "MimeTypeArray",
469
+ "ModelGenericSession",
470
+ "ModelManager",
471
+ "MouseEvent",
472
+ "MutationEvent",
473
+ "MutationObserver",
474
+ "MutationRecord",
475
+ "NamedNodeMap",
476
+ "NavigateEvent",
477
+ "Navigation",
478
+ "NavigationActivation",
479
+ "NavigationCurrentEntryChangeEvent",
480
+ "NavigationDestination",
481
+ "NavigationHistoryEntry",
482
+ "NavigationPreloadManager",
483
+ "NavigationTransition",
484
+ "Navigator",
485
+ "NavigatorLogin",
486
+ "NavigatorManagedData",
487
+ "NavigatorUAData",
488
+ "NetworkInformation",
489
+ "Node",
490
+ "NodeFilter",
491
+ "NodeIterator",
492
+ "NodeList",
493
+ "Notification",
494
+ "NotifyPaintEvent",
495
+ "NotRestoredReasonDetails",
496
+ "NotRestoredReasons",
497
+ "Observable",
498
+ "OfflineAudioCompletionEvent",
499
+ "OfflineAudioContext",
500
+ "OffscreenCanvas",
501
+ "OffscreenCanvasRenderingContext2D",
502
+ "Option",
503
+ "OrientationSensor",
504
+ "OscillatorNode",
505
+ "OTPCredential",
506
+ "OverconstrainedError",
507
+ "PageRevealEvent",
508
+ "PageSwapEvent",
509
+ "PageTransitionEvent",
510
+ "PannerNode",
511
+ "PasswordCredential",
512
+ "Path2D",
513
+ "PaymentAddress",
514
+ "PaymentManager",
515
+ "PaymentMethodChangeEvent",
516
+ "PaymentRequest",
517
+ "PaymentRequestUpdateEvent",
518
+ "PaymentResponse",
519
+ "Performance",
520
+ "PerformanceElementTiming",
521
+ "PerformanceEntry",
522
+ "PerformanceEventTiming",
523
+ "PerformanceLongAnimationFrameTiming",
524
+ "PerformanceLongTaskTiming",
525
+ "PerformanceMark",
526
+ "PerformanceMeasure",
527
+ "PerformanceNavigation",
528
+ "PerformanceNavigationTiming",
529
+ "PerformanceObserver",
530
+ "PerformanceObserverEntryList",
531
+ "PerformancePaintTiming",
532
+ "PerformanceResourceTiming",
533
+ "PerformanceScriptTiming",
534
+ "PerformanceServerTiming",
535
+ "PerformanceTiming",
536
+ "PeriodicSyncManager",
537
+ "PeriodicWave",
538
+ "Permissions",
539
+ "PermissionStatus",
540
+ "PERSISTENT",
541
+ "PictureInPictureEvent",
542
+ "PictureInPictureWindow",
543
+ "Plugin",
544
+ "PluginArray",
545
+ "PointerEvent",
546
+ "PopStateEvent",
547
+ "Presentation",
548
+ "PresentationAvailability",
549
+ "PresentationConnection",
550
+ "PresentationConnectionAvailableEvent",
551
+ "PresentationConnectionCloseEvent",
552
+ "PresentationConnectionList",
553
+ "PresentationReceiver",
554
+ "PresentationRequest",
555
+ "PressureObserver",
556
+ "PressureRecord",
557
+ "ProcessingInstruction",
558
+ "Profiler",
559
+ "ProgressEvent",
560
+ "PromiseRejectionEvent",
561
+ "ProtectedAudience",
562
+ "PublicKeyCredential",
563
+ "PushManager",
564
+ "PushSubscription",
565
+ "PushSubscriptionOptions",
566
+ "RadioNodeList",
567
+ "Range",
568
+ "ReadableByteStreamController",
569
+ "ReadableStream",
570
+ "ReadableStreamBYOBReader",
571
+ "ReadableStreamBYOBRequest",
572
+ "ReadableStreamDefaultController",
573
+ "ReadableStreamDefaultReader",
574
+ "RelativeOrientationSensor",
575
+ "RemotePlayback",
576
+ "ReportBody",
577
+ "ReportingObserver",
578
+ "Request",
579
+ "ResizeObserver",
580
+ "ResizeObserverEntry",
581
+ "ResizeObserverSize",
582
+ "Response",
583
+ "RestrictionTarget",
584
+ "RTCCertificate",
585
+ "RTCDataChannel",
586
+ "RTCDataChannelEvent",
587
+ "RTCDtlsTransport",
588
+ "RTCDTMFSender",
589
+ "RTCDTMFToneChangeEvent",
590
+ "RTCEncodedAudioFrame",
591
+ "RTCEncodedVideoFrame",
592
+ "RTCError",
593
+ "RTCErrorEvent",
594
+ "RTCIceCandidate",
595
+ "RTCIceTransport",
596
+ "RTCPeerConnection",
597
+ "RTCPeerConnectionIceErrorEvent",
598
+ "RTCPeerConnectionIceEvent",
599
+ "RTCRtpReceiver",
600
+ "RTCRtpScriptTransform",
601
+ "RTCRtpSender",
602
+ "RTCRtpTransceiver",
603
+ "RTCSctpTransport",
604
+ "RTCSessionDescription",
605
+ "RTCStatsReport",
606
+ "RTCTrackEvent",
607
+ "Scheduler",
608
+ "Scheduling",
609
+ "Screen",
610
+ "ScreenDetailed",
611
+ "ScreenDetails",
612
+ "ScreenOrientation",
613
+ "ScriptProcessorNode",
614
+ "ScrollTimeline",
615
+ "SecurityPolicyViolationEvent",
616
+ "Selection",
617
+ "Sensor",
618
+ "SensorErrorEvent",
619
+ "Serial",
620
+ "SerialPort",
621
+ "ServiceWorker",
622
+ "ServiceWorkerContainer",
623
+ "ServiceWorkerRegistration",
624
+ "ShadowRoot",
625
+ "SharedStorage",
626
+ "SharedStorageAppendMethod",
627
+ "SharedStorageClearMethod",
628
+ "SharedStorageDeleteMethod",
629
+ "SharedStorageModifierMethod",
630
+ "SharedStorageSetMethod",
631
+ "SharedStorageWorklet",
632
+ "SharedWorker",
633
+ "SnapEvent",
634
+ "SourceBuffer",
635
+ "SourceBufferList",
636
+ "SpeechSynthesis",
637
+ "SpeechSynthesisErrorEvent",
638
+ "SpeechSynthesisEvent",
639
+ "SpeechSynthesisUtterance",
640
+ "SpeechSynthesisVoice",
641
+ "StaticRange",
642
+ "StereoPannerNode",
643
+ "Storage",
644
+ "StorageBucket",
645
+ "StorageBucketManager",
646
+ "StorageEvent",
647
+ "StorageManager",
648
+ "StylePropertyMap",
649
+ "StylePropertyMapReadOnly",
650
+ "StyleSheet",
651
+ "StyleSheetList",
652
+ "SubmitEvent",
653
+ "Subscriber",
654
+ "SubtleCrypto",
655
+ "SuppressedError",
656
+ "SVGAElement",
657
+ "SVGAngle",
658
+ "SVGAnimatedAngle",
659
+ "SVGAnimatedBoolean",
660
+ "SVGAnimatedEnumeration",
661
+ "SVGAnimatedInteger",
662
+ "SVGAnimatedLength",
663
+ "SVGAnimatedLengthList",
664
+ "SVGAnimatedNumber",
665
+ "SVGAnimatedNumberList",
666
+ "SVGAnimatedPreserveAspectRatio",
667
+ "SVGAnimatedRect",
668
+ "SVGAnimatedString",
669
+ "SVGAnimatedTransformList",
670
+ "SVGAnimateElement",
671
+ "SVGAnimateMotionElement",
672
+ "SVGAnimateTransformElement",
673
+ "SVGAnimationElement",
674
+ "SVGCircleElement",
675
+ "SVGClipPathElement",
676
+ "SVGComponentTransferFunctionElement",
677
+ "SVGDefsElement",
678
+ "SVGDescElement",
679
+ "SVGElement",
680
+ "SVGEllipseElement",
681
+ "SVGFEBlendElement",
682
+ "SVGFEColorMatrixElement",
683
+ "SVGFEComponentTransferElement",
684
+ "SVGFECompositeElement",
685
+ "SVGFEConvolveMatrixElement",
686
+ "SVGFEDiffuseLightingElement",
687
+ "SVGFEDisplacementMapElement",
688
+ "SVGFEDistantLightElement",
689
+ "SVGFEDropShadowElement",
690
+ "SVGFEFloodElement",
691
+ "SVGFEFuncAElement",
692
+ "SVGFEFuncBElement",
693
+ "SVGFEFuncGElement",
694
+ "SVGFEFuncRElement",
695
+ "SVGFEGaussianBlurElement",
696
+ "SVGFEImageElement",
697
+ "SVGFEMergeElement",
698
+ "SVGFEMergeNodeElement",
699
+ "SVGFEMorphologyElement",
700
+ "SVGFEOffsetElement",
701
+ "SVGFEPointLightElement",
702
+ "SVGFESpecularLightingElement",
703
+ "SVGFESpotLightElement",
704
+ "SVGFETileElement",
705
+ "SVGFETurbulenceElement",
706
+ "SVGFilterElement",
707
+ "SVGForeignObjectElement",
708
+ "SVGGElement",
709
+ "SVGGeometryElement",
710
+ "SVGGradientElement",
711
+ "SVGGraphicsElement",
712
+ "SVGImageElement",
713
+ "SVGLength",
714
+ "SVGLengthList",
715
+ "SVGLinearGradientElement",
716
+ "SVGLineElement",
717
+ "SVGMarkerElement",
718
+ "SVGMaskElement",
719
+ "SVGMatrix",
720
+ "SVGMetadataElement",
721
+ "SVGMPathElement",
722
+ "SVGNumber",
723
+ "SVGNumberList",
724
+ "SVGPathElement",
725
+ "SVGPatternElement",
726
+ "SVGPoint",
727
+ "SVGPointList",
728
+ "SVGPolygonElement",
729
+ "SVGPolylineElement",
730
+ "SVGPreserveAspectRatio",
731
+ "SVGRadialGradientElement",
732
+ "SVGRect",
733
+ "SVGRectElement",
734
+ "SVGScriptElement",
735
+ "SVGSetElement",
736
+ "SVGStopElement",
737
+ "SVGStringList",
738
+ "SVGStyleElement",
739
+ "SVGSVGElement",
740
+ "SVGSwitchElement",
741
+ "SVGSymbolElement",
742
+ "SVGTextContentElement",
743
+ "SVGTextElement",
744
+ "SVGTextPathElement",
745
+ "SVGTextPositioningElement",
746
+ "SVGTitleElement",
747
+ "SVGTransform",
748
+ "SVGTransformList",
749
+ "SVGTSpanElement",
750
+ "SVGUnitTypes",
751
+ "SVGUseElement",
752
+ "SVGViewElement",
753
+ "SyncManager",
754
+ "TaskAttributionTiming",
755
+ "TaskController",
756
+ "TaskPriorityChangeEvent",
757
+ "TaskSignal",
758
+ "TEMPORARY",
759
+ "Text",
760
+ "TextDecoder",
761
+ "TextDecoderStream",
762
+ "TextEncoder",
763
+ "TextEncoderStream",
764
+ "TextEvent",
765
+ "TextFormat",
766
+ "TextFormatUpdateEvent",
767
+ "TextMetrics",
768
+ "TextTrack",
769
+ "TextTrackCue",
770
+ "TextTrackCueList",
771
+ "TextTrackList",
772
+ "TextUpdateEvent",
773
+ "TimeEvent",
774
+ "TimeRanges",
775
+ "ToggleEvent",
776
+ "Touch",
777
+ "TouchEvent",
778
+ "TouchList",
779
+ "TrackEvent",
780
+ "TransformStream",
781
+ "TransformStreamDefaultController",
782
+ "TransitionEvent",
783
+ "TreeWalker",
784
+ "TrustedHTML",
785
+ "TrustedScript",
786
+ "TrustedScriptURL",
787
+ "TrustedTypePolicy",
788
+ "TrustedTypePolicyFactory",
789
+ "UIEvent",
790
+ "URL",
791
+ "URLPattern",
792
+ "URLSearchParams",
793
+ "USB",
794
+ "USBAlternateInterface",
795
+ "USBConfiguration",
796
+ "USBConnectionEvent",
797
+ "USBDevice",
798
+ "USBEndpoint",
799
+ "USBInterface",
800
+ "USBInTransferResult",
801
+ "USBIsochronousInTransferPacket",
802
+ "USBIsochronousInTransferResult",
803
+ "USBIsochronousOutTransferPacket",
804
+ "USBIsochronousOutTransferResult",
805
+ "USBOutTransferResult",
806
+ "UserActivation",
807
+ "ValidityState",
808
+ "VideoColorSpace",
809
+ "VideoDecoder",
810
+ "VideoEncoder",
811
+ "VideoFrame",
812
+ "VideoPlaybackQuality",
813
+ "ViewTimeline",
814
+ "ViewTransition",
815
+ "ViewTransitionTypeSet",
816
+ "VirtualKeyboard",
817
+ "VirtualKeyboardGeometryChangeEvent",
818
+ "VisibilityStateEntry",
819
+ "VisualViewport",
820
+ "VTTCue",
821
+ "VTTRegion",
822
+ "WakeLock",
823
+ "WakeLockSentinel",
824
+ "WaveShaperNode",
825
+ "WebAssembly",
826
+ "WebGL2RenderingContext",
827
+ "WebGLActiveInfo",
828
+ "WebGLBuffer",
829
+ "WebGLContextEvent",
830
+ "WebGLFramebuffer",
831
+ "WebGLObject",
832
+ "WebGLProgram",
833
+ "WebGLQuery",
834
+ "WebGLRenderbuffer",
835
+ "WebGLRenderingContext",
836
+ "WebGLSampler",
837
+ "WebGLShader",
838
+ "WebGLShaderPrecisionFormat",
839
+ "WebGLSync",
840
+ "WebGLTexture",
841
+ "WebGLTransformFeedback",
842
+ "WebGLUniformLocation",
843
+ "WebGLVertexArrayObject",
844
+ "WebSocket",
845
+ "WebSocketError",
846
+ "WebSocketStream",
847
+ "WebTransport",
848
+ "WebTransportBidirectionalStream",
849
+ "WebTransportDatagramDuplexStream",
850
+ "WebTransportError",
851
+ "WebTransportReceiveStream",
852
+ "WebTransportSendStream",
853
+ "WGSLLanguageFeatures",
854
+ "WheelEvent",
855
+ "Window",
856
+ "WindowControlsOverlay",
857
+ "WindowControlsOverlayGeometryChangeEvent",
858
+ "Worker",
859
+ "Worklet",
860
+ "WorkletGlobalScope",
861
+ "WritableStream",
862
+ "WritableStreamDefaultController",
863
+ "WritableStreamDefaultWriter",
864
+ "XMLDocument",
865
+ "XMLHttpRequest",
866
+ "XMLHttpRequestEventTarget",
867
+ "XMLHttpRequestUpload",
868
+ "XMLSerializer",
869
+ "XPathEvaluator",
870
+ "XPathExpression",
871
+ "XPathResult",
872
+ "XRAnchor",
873
+ "XRAnchorSet",
874
+ "XRBoundedReferenceSpace",
875
+ "XRCamera",
876
+ "XRCPUDepthInformation",
877
+ "XRDepthInformation",
878
+ "XRDOMOverlayState",
879
+ "XRFrame",
880
+ "XRHand",
881
+ "XRHitTestResult",
882
+ "XRHitTestSource",
883
+ "XRInputSource",
884
+ "XRInputSourceArray",
885
+ "XRInputSourceEvent",
886
+ "XRInputSourcesChangeEvent",
887
+ "XRJointPose",
888
+ "XRJointSpace",
889
+ "XRLayer",
890
+ "XRLightEstimate",
891
+ "XRLightProbe",
892
+ "XRPose",
893
+ "XRRay",
894
+ "XRReferenceSpace",
895
+ "XRReferenceSpaceEvent",
896
+ "XRRenderState",
897
+ "XRRigidTransform",
898
+ "XRSession",
899
+ "XRSessionEvent",
900
+ "XRSpace",
901
+ "XRSystem",
902
+ "XRTransientInputHitTestResult",
903
+ "XRTransientInputHitTestSource",
904
+ "XRView",
905
+ "XRViewerPose",
906
+ "XRViewport",
907
+ "XRWebGLBinding",
908
+ "XRWebGLDepthInformation",
909
+ "XRWebGLLayer",
910
+ "XSLTProcessor"
911
+ ]
node_modules/@babel/helper-globals/data/builtin-lower.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ "decodeURI",
3
+ "decodeURIComponent",
4
+ "encodeURI",
5
+ "encodeURIComponent",
6
+ "escape",
7
+ "eval",
8
+ "globalThis",
9
+ "isFinite",
10
+ "isNaN",
11
+ "parseFloat",
12
+ "parseInt",
13
+ "undefined",
14
+ "unescape"
15
+ ]
node_modules/@babel/helper-globals/data/builtin-upper.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ "AggregateError",
3
+ "Array",
4
+ "ArrayBuffer",
5
+ "Atomics",
6
+ "BigInt",
7
+ "BigInt64Array",
8
+ "BigUint64Array",
9
+ "Boolean",
10
+ "DataView",
11
+ "Date",
12
+ "Error",
13
+ "EvalError",
14
+ "FinalizationRegistry",
15
+ "Float16Array",
16
+ "Float32Array",
17
+ "Float64Array",
18
+ "Function",
19
+ "Infinity",
20
+ "Int16Array",
21
+ "Int32Array",
22
+ "Int8Array",
23
+ "Intl",
24
+ "Iterator",
25
+ "JSON",
26
+ "Map",
27
+ "Math",
28
+ "NaN",
29
+ "Number",
30
+ "Object",
31
+ "Promise",
32
+ "Proxy",
33
+ "RangeError",
34
+ "ReferenceError",
35
+ "Reflect",
36
+ "RegExp",
37
+ "Set",
38
+ "SharedArrayBuffer",
39
+ "String",
40
+ "Symbol",
41
+ "SyntaxError",
42
+ "TypeError",
43
+ "Uint16Array",
44
+ "Uint32Array",
45
+ "Uint8Array",
46
+ "Uint8ClampedArray",
47
+ "URIError",
48
+ "WeakMap",
49
+ "WeakRef",
50
+ "WeakSet"
51
+ ]
node_modules/@babel/helper-globals/package.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@babel/helper-globals",
3
+ "version": "7.28.0",
4
+ "author": "The Babel Team (https://babel.dev/team)",
5
+ "license": "MIT",
6
+ "description": "A collection of JavaScript globals for Babel internal usage",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/babel/babel.git",
10
+ "directory": "packages/babel-helper-globals"
11
+ },
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "exports": {
16
+ "./data/browser-upper.json": "./data/browser-upper.json",
17
+ "./data/builtin-lower.json": "./data/builtin-lower.json",
18
+ "./data/builtin-upper.json": "./data/builtin-upper.json",
19
+ "./package.json": "./package.json"
20
+ },
21
+ "keywords": [
22
+ "babel",
23
+ "globals"
24
+ ],
25
+ "devDependencies": {
26
+ "globals": "^16.1.0"
27
+ },
28
+ "engines": {
29
+ "node": ">=6.9.0"
30
+ },
31
+ "type": "commonjs"
32
+ }
node_modules/@babel/helper-module-imports/LICENSE ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2014-present Sebastian McKenzie and other contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
node_modules/@babel/helper-module-imports/README.md ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # @babel/helper-module-imports
2
+
3
+ > Babel helper functions for inserting module loads
4
+
5
+ See our website [@babel/helper-module-imports](https://babeljs.io/docs/babel-helper-module-imports) for more information.
6
+
7
+ ## Install
8
+
9
+ Using npm:
10
+
11
+ ```sh
12
+ npm install --save @babel/helper-module-imports
13
+ ```
14
+
15
+ or using yarn:
16
+
17
+ ```sh
18
+ yarn add @babel/helper-module-imports
19
+ ```
node_modules/@babel/helper-module-imports/lib/import-builder.js ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _assert = require("assert");
8
+ var _t = require("@babel/types");
9
+ const {
10
+ callExpression,
11
+ cloneNode,
12
+ expressionStatement,
13
+ identifier,
14
+ importDeclaration,
15
+ importDefaultSpecifier,
16
+ importNamespaceSpecifier,
17
+ importSpecifier,
18
+ memberExpression,
19
+ stringLiteral,
20
+ variableDeclaration,
21
+ variableDeclarator
22
+ } = _t;
23
+ class ImportBuilder {
24
+ constructor(importedSource, scope, hub) {
25
+ this._statements = [];
26
+ this._resultName = null;
27
+ this._importedSource = void 0;
28
+ this._scope = scope;
29
+ this._hub = hub;
30
+ this._importedSource = importedSource;
31
+ }
32
+ done() {
33
+ return {
34
+ statements: this._statements,
35
+ resultName: this._resultName
36
+ };
37
+ }
38
+ import() {
39
+ this._statements.push(importDeclaration([], stringLiteral(this._importedSource)));
40
+ return this;
41
+ }
42
+ require() {
43
+ this._statements.push(expressionStatement(callExpression(identifier("require"), [stringLiteral(this._importedSource)])));
44
+ return this;
45
+ }
46
+ namespace(name = "namespace") {
47
+ const local = this._scope.generateUidIdentifier(name);
48
+ const statement = this._statements[this._statements.length - 1];
49
+ _assert(statement.type === "ImportDeclaration");
50
+ _assert(statement.specifiers.length === 0);
51
+ statement.specifiers = [importNamespaceSpecifier(local)];
52
+ this._resultName = cloneNode(local);
53
+ return this;
54
+ }
55
+ default(name) {
56
+ const id = this._scope.generateUidIdentifier(name);
57
+ const statement = this._statements[this._statements.length - 1];
58
+ _assert(statement.type === "ImportDeclaration");
59
+ _assert(statement.specifiers.length === 0);
60
+ statement.specifiers = [importDefaultSpecifier(id)];
61
+ this._resultName = cloneNode(id);
62
+ return this;
63
+ }
64
+ named(name, importName) {
65
+ if (importName === "default") return this.default(name);
66
+ const id = this._scope.generateUidIdentifier(name);
67
+ const statement = this._statements[this._statements.length - 1];
68
+ _assert(statement.type === "ImportDeclaration");
69
+ _assert(statement.specifiers.length === 0);
70
+ statement.specifiers = [importSpecifier(id, identifier(importName))];
71
+ this._resultName = cloneNode(id);
72
+ return this;
73
+ }
74
+ var(name) {
75
+ const id = this._scope.generateUidIdentifier(name);
76
+ let statement = this._statements[this._statements.length - 1];
77
+ if (statement.type !== "ExpressionStatement") {
78
+ _assert(this._resultName);
79
+ statement = expressionStatement(this._resultName);
80
+ this._statements.push(statement);
81
+ }
82
+ this._statements[this._statements.length - 1] = variableDeclaration("var", [variableDeclarator(id, statement.expression)]);
83
+ this._resultName = cloneNode(id);
84
+ return this;
85
+ }
86
+ defaultInterop() {
87
+ return this._interop(this._hub.addHelper("interopRequireDefault"));
88
+ }
89
+ wildcardInterop() {
90
+ return this._interop(this._hub.addHelper("interopRequireWildcard"));
91
+ }
92
+ _interop(callee) {
93
+ const statement = this._statements[this._statements.length - 1];
94
+ if (statement.type === "ExpressionStatement") {
95
+ statement.expression = callExpression(callee, [statement.expression]);
96
+ } else if (statement.type === "VariableDeclaration") {
97
+ _assert(statement.declarations.length === 1);
98
+ statement.declarations[0].init = callExpression(callee, [statement.declarations[0].init]);
99
+ } else {
100
+ _assert.fail("Unexpected type.");
101
+ }
102
+ return this;
103
+ }
104
+ prop(name) {
105
+ const statement = this._statements[this._statements.length - 1];
106
+ if (statement.type === "ExpressionStatement") {
107
+ statement.expression = memberExpression(statement.expression, identifier(name));
108
+ } else if (statement.type === "VariableDeclaration") {
109
+ _assert(statement.declarations.length === 1);
110
+ statement.declarations[0].init = memberExpression(statement.declarations[0].init, identifier(name));
111
+ } else {
112
+ _assert.fail("Unexpected type:" + statement.type);
113
+ }
114
+ return this;
115
+ }
116
+ read(name) {
117
+ this._resultName = memberExpression(this._resultName, identifier(name));
118
+ }
119
+ }
120
+ exports.default = ImportBuilder;
121
+
122
+ //# sourceMappingURL=import-builder.js.map
node_modules/@babel/helper-module-imports/lib/import-builder.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"names":["_assert","require","_t","callExpression","cloneNode","expressionStatement","identifier","importDeclaration","importDefaultSpecifier","importNamespaceSpecifier","importSpecifier","memberExpression","stringLiteral","variableDeclaration","variableDeclarator","ImportBuilder","constructor","importedSource","scope","hub","_statements","_resultName","_importedSource","_scope","_hub","done","statements","resultName","import","push","namespace","name","local","generateUidIdentifier","statement","length","assert","type","specifiers","default","id","named","importName","var","expression","defaultInterop","_interop","addHelper","wildcardInterop","callee","declarations","init","fail","prop","read","exports"],"sources":["../src/import-builder.ts"],"sourcesContent":["import assert from \"node:assert\";\nimport {\n callExpression,\n cloneNode,\n expressionStatement,\n identifier,\n importDeclaration,\n importDefaultSpecifier,\n importNamespaceSpecifier,\n importSpecifier,\n memberExpression,\n stringLiteral,\n variableDeclaration,\n variableDeclarator,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { Scope, HubInterface } from \"@babel/traverse\";\n\n/**\n * A class to track and accumulate mutations to the AST that will eventually\n * output a new require/import statement list.\n */\nexport default class ImportBuilder {\n private _statements: t.Statement[] = [];\n private _resultName: t.Identifier | t.MemberExpression = null;\n\n declare _scope: Scope;\n declare _hub: HubInterface;\n private _importedSource: string;\n\n constructor(importedSource: string, scope: Scope, hub: HubInterface) {\n this._scope = scope;\n this._hub = hub;\n this._importedSource = importedSource;\n }\n\n done() {\n return {\n statements: this._statements,\n resultName: this._resultName,\n };\n }\n\n import() {\n this._statements.push(\n importDeclaration([], stringLiteral(this._importedSource)),\n );\n return this;\n }\n\n require() {\n this._statements.push(\n expressionStatement(\n callExpression(identifier(\"require\"), [\n stringLiteral(this._importedSource),\n ]),\n ),\n );\n return this;\n }\n\n namespace(name = \"namespace\") {\n const local = this._scope.generateUidIdentifier(name);\n\n const statement = this._statements[this._statements.length - 1];\n assert(statement.type === \"ImportDeclaration\");\n assert(statement.specifiers.length === 0);\n statement.specifiers = [importNamespaceSpecifier(local)];\n this._resultName = cloneNode(local);\n return this;\n }\n default(name: string) {\n const id = this._scope.generateUidIdentifier(name);\n const statement = this._statements[this._statements.length - 1];\n assert(statement.type === \"ImportDeclaration\");\n assert(statement.specifiers.length === 0);\n statement.specifiers = [importDefaultSpecifier(id)];\n this._resultName = cloneNode(id);\n return this;\n }\n named(name: string, importName: string) {\n if (importName === \"default\") return this.default(name);\n\n const id = this._scope.generateUidIdentifier(name);\n const statement = this._statements[this._statements.length - 1];\n assert(statement.type === \"ImportDeclaration\");\n assert(statement.specifiers.length === 0);\n statement.specifiers = [importSpecifier(id, identifier(importName))];\n this._resultName = cloneNode(id);\n return this;\n }\n\n var(name: string) {\n const id = this._scope.generateUidIdentifier(name);\n let statement = this._statements[this._statements.length - 1];\n if (statement.type !== \"ExpressionStatement\") {\n assert(this._resultName);\n statement = expressionStatement(this._resultName);\n this._statements.push(statement);\n }\n this._statements[this._statements.length - 1] = variableDeclaration(\"var\", [\n variableDeclarator(id, statement.expression),\n ]);\n this._resultName = cloneNode(id);\n return this;\n }\n\n defaultInterop() {\n return this._interop(this._hub.addHelper(\"interopRequireDefault\"));\n }\n wildcardInterop() {\n return this._interop(this._hub.addHelper(\"interopRequireWildcard\"));\n }\n\n _interop(callee: t.Expression) {\n const statement = this._statements[this._statements.length - 1];\n if (statement.type === \"ExpressionStatement\") {\n statement.expression = callExpression(callee, [statement.expression]);\n } else if (statement.type === \"VariableDeclaration\") {\n assert(statement.declarations.length === 1);\n statement.declarations[0].init = callExpression(callee, [\n statement.declarations[0].init,\n ]);\n } else {\n assert.fail(\"Unexpected type.\");\n }\n return this;\n }\n\n prop(name: string) {\n const statement = this._statements[this._statements.length - 1];\n if (statement.type === \"ExpressionStatement\") {\n statement.expression = memberExpression(\n statement.expression,\n identifier(name),\n );\n } else if (statement.type === \"VariableDeclaration\") {\n assert(statement.declarations.length === 1);\n statement.declarations[0].init = memberExpression(\n statement.declarations[0].init,\n identifier(name),\n );\n } else {\n assert.fail(\"Unexpected type:\" + statement.type);\n }\n return this;\n }\n\n read(name: string) {\n this._resultName = memberExpression(this._resultName, identifier(name));\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,EAAA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,IAAI;EACb;EAEAiB,IAAIA,CAACvB,IAAY,EAAE;IACjB,IAAI,CAACV,WAAW,GAAGV,gBAAgB,CAAC,IAAI,CAACU,WAAW,EAAEf,UAAU,CAACyB,IAAI,CAAC,CAAC;EACzE;AACF;AAACwB,OAAA,CAAAhB,OAAA,GAAAxB,aAAA","ignoreList":[]}
node_modules/@babel/helper-module-imports/lib/import-injector.js ADDED
@@ -0,0 +1,304 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _assert = require("assert");
8
+ var _t = require("@babel/types");
9
+ var _importBuilder = require("./import-builder.js");
10
+ var _isModule = require("./is-module.js");
11
+ const {
12
+ identifier,
13
+ importSpecifier,
14
+ numericLiteral,
15
+ sequenceExpression,
16
+ isImportDeclaration
17
+ } = _t;
18
+ class ImportInjector {
19
+ constructor(path, importedSource, opts) {
20
+ this._defaultOpts = {
21
+ importedSource: null,
22
+ importedType: "commonjs",
23
+ importedInterop: "babel",
24
+ importingInterop: "babel",
25
+ ensureLiveReference: false,
26
+ ensureNoContext: false,
27
+ importPosition: "before"
28
+ };
29
+ const programPath = path.find(p => p.isProgram());
30
+ this._programPath = programPath;
31
+ this._programScope = programPath.scope;
32
+ this._hub = programPath.hub;
33
+ this._defaultOpts = this._applyDefaults(importedSource, opts, true);
34
+ }
35
+ addDefault(importedSourceIn, opts) {
36
+ return this.addNamed("default", importedSourceIn, opts);
37
+ }
38
+ addNamed(importName, importedSourceIn, opts) {
39
+ _assert(typeof importName === "string");
40
+ return this._generateImport(this._applyDefaults(importedSourceIn, opts), importName);
41
+ }
42
+ addNamespace(importedSourceIn, opts) {
43
+ return this._generateImport(this._applyDefaults(importedSourceIn, opts), null);
44
+ }
45
+ addSideEffect(importedSourceIn, opts) {
46
+ return this._generateImport(this._applyDefaults(importedSourceIn, opts), void 0);
47
+ }
48
+ _applyDefaults(importedSource, opts, isInit = false) {
49
+ let newOpts;
50
+ if (typeof importedSource === "string") {
51
+ newOpts = Object.assign({}, this._defaultOpts, {
52
+ importedSource
53
+ }, opts);
54
+ } else {
55
+ _assert(!opts, "Unexpected secondary arguments.");
56
+ newOpts = Object.assign({}, this._defaultOpts, importedSource);
57
+ }
58
+ if (!isInit && opts) {
59
+ if (opts.nameHint !== undefined) newOpts.nameHint = opts.nameHint;
60
+ if (opts.blockHoist !== undefined) newOpts.blockHoist = opts.blockHoist;
61
+ }
62
+ return newOpts;
63
+ }
64
+ _generateImport(opts, importName) {
65
+ const isDefault = importName === "default";
66
+ const isNamed = !!importName && !isDefault;
67
+ const isNamespace = importName === null;
68
+ const {
69
+ importedSource,
70
+ importedType,
71
+ importedInterop,
72
+ importingInterop,
73
+ ensureLiveReference,
74
+ ensureNoContext,
75
+ nameHint,
76
+ importPosition,
77
+ blockHoist
78
+ } = opts;
79
+ let name = nameHint || importName;
80
+ const isMod = (0, _isModule.default)(this._programPath);
81
+ const isModuleForNode = isMod && importingInterop === "node";
82
+ const isModuleForBabel = isMod && importingInterop === "babel";
83
+ if (importPosition === "after" && !isMod) {
84
+ throw new Error(`"importPosition": "after" is only supported in modules`);
85
+ }
86
+ const builder = new _importBuilder.default(importedSource, this._programScope, this._hub);
87
+ if (importedType === "es6") {
88
+ if (!isModuleForNode && !isModuleForBabel) {
89
+ throw new Error("Cannot import an ES6 module from CommonJS");
90
+ }
91
+ builder.import();
92
+ if (isNamespace) {
93
+ builder.namespace(nameHint || importedSource);
94
+ } else if (isDefault || isNamed) {
95
+ builder.named(name, importName);
96
+ }
97
+ } else if (importedType !== "commonjs") {
98
+ throw new Error(`Unexpected interopType "${importedType}"`);
99
+ } else if (importedInterop === "babel") {
100
+ if (isModuleForNode) {
101
+ name = name !== "default" ? name : importedSource;
102
+ const es6Default = `${importedSource}$es6Default`;
103
+ builder.import();
104
+ if (isNamespace) {
105
+ builder.default(es6Default).var(name || importedSource).wildcardInterop();
106
+ } else if (isDefault) {
107
+ if (ensureLiveReference) {
108
+ builder.default(es6Default).var(name || importedSource).defaultInterop().read("default");
109
+ } else {
110
+ builder.default(es6Default).var(name).defaultInterop().prop(importName);
111
+ }
112
+ } else if (isNamed) {
113
+ builder.default(es6Default).read(importName);
114
+ }
115
+ } else if (isModuleForBabel) {
116
+ builder.import();
117
+ if (isNamespace) {
118
+ builder.namespace(name || importedSource);
119
+ } else if (isDefault || isNamed) {
120
+ builder.named(name, importName);
121
+ }
122
+ } else {
123
+ builder.require();
124
+ if (isNamespace) {
125
+ builder.var(name || importedSource).wildcardInterop();
126
+ } else if ((isDefault || isNamed) && ensureLiveReference) {
127
+ if (isDefault) {
128
+ name = name !== "default" ? name : importedSource;
129
+ builder.var(name).read(importName);
130
+ builder.defaultInterop();
131
+ } else {
132
+ builder.var(importedSource).read(importName);
133
+ }
134
+ } else if (isDefault) {
135
+ builder.var(name).defaultInterop().prop(importName);
136
+ } else if (isNamed) {
137
+ builder.var(name).prop(importName);
138
+ }
139
+ }
140
+ } else if (importedInterop === "compiled") {
141
+ if (isModuleForNode) {
142
+ builder.import();
143
+ if (isNamespace) {
144
+ builder.default(name || importedSource);
145
+ } else if (isDefault || isNamed) {
146
+ builder.default(importedSource).read(name);
147
+ }
148
+ } else if (isModuleForBabel) {
149
+ builder.import();
150
+ if (isNamespace) {
151
+ builder.namespace(name || importedSource);
152
+ } else if (isDefault || isNamed) {
153
+ builder.named(name, importName);
154
+ }
155
+ } else {
156
+ builder.require();
157
+ if (isNamespace) {
158
+ builder.var(name || importedSource);
159
+ } else if (isDefault || isNamed) {
160
+ if (ensureLiveReference) {
161
+ builder.var(importedSource).read(name);
162
+ } else {
163
+ builder.prop(importName).var(name);
164
+ }
165
+ }
166
+ }
167
+ } else if (importedInterop === "uncompiled") {
168
+ if (isDefault && ensureLiveReference) {
169
+ throw new Error("No live reference for commonjs default");
170
+ }
171
+ if (isModuleForNode) {
172
+ builder.import();
173
+ if (isNamespace) {
174
+ builder.default(name || importedSource);
175
+ } else if (isDefault) {
176
+ builder.default(name);
177
+ } else if (isNamed) {
178
+ builder.default(importedSource).read(name);
179
+ }
180
+ } else if (isModuleForBabel) {
181
+ builder.import();
182
+ if (isNamespace) {
183
+ builder.default(name || importedSource);
184
+ } else if (isDefault) {
185
+ builder.default(name);
186
+ } else if (isNamed) {
187
+ builder.named(name, importName);
188
+ }
189
+ } else {
190
+ builder.require();
191
+ if (isNamespace) {
192
+ builder.var(name || importedSource);
193
+ } else if (isDefault) {
194
+ builder.var(name);
195
+ } else if (isNamed) {
196
+ if (ensureLiveReference) {
197
+ builder.var(importedSource).read(name);
198
+ } else {
199
+ builder.var(name).prop(importName);
200
+ }
201
+ }
202
+ }
203
+ } else {
204
+ throw new Error(`Unknown importedInterop "${importedInterop}".`);
205
+ }
206
+ const {
207
+ statements,
208
+ resultName
209
+ } = builder.done();
210
+ this._insertStatements(statements, importPosition, blockHoist);
211
+ if ((isDefault || isNamed) && ensureNoContext && resultName.type !== "Identifier") {
212
+ return sequenceExpression([numericLiteral(0), resultName]);
213
+ }
214
+ return resultName;
215
+ }
216
+ _insertStatements(statements, importPosition = "before", blockHoist = 3) {
217
+ if (importPosition === "after") {
218
+ if (this._insertStatementsAfter(statements)) return;
219
+ } else {
220
+ if (this._insertStatementsBefore(statements, blockHoist)) return;
221
+ }
222
+ this._programPath.unshiftContainer("body", statements);
223
+ }
224
+ _insertStatementsBefore(statements, blockHoist) {
225
+ if (statements.length === 1 && isImportDeclaration(statements[0]) && isValueImport(statements[0])) {
226
+ const firstImportDecl = this._programPath.get("body").find(p => {
227
+ return p.isImportDeclaration() && isValueImport(p.node);
228
+ });
229
+ if ((firstImportDecl == null ? void 0 : firstImportDecl.node.source.value) === statements[0].source.value && maybeAppendImportSpecifiers(firstImportDecl.node, statements[0])) {
230
+ return true;
231
+ }
232
+ }
233
+ statements.forEach(node => {
234
+ node._blockHoist = blockHoist;
235
+ });
236
+ const targetPath = this._programPath.get("body").find(p => {
237
+ const val = p.node._blockHoist;
238
+ return Number.isFinite(val) && val < 4;
239
+ });
240
+ if (targetPath) {
241
+ targetPath.insertBefore(statements);
242
+ return true;
243
+ }
244
+ return false;
245
+ }
246
+ _insertStatementsAfter(statements) {
247
+ const statementsSet = new Set(statements);
248
+ const importDeclarations = new Map();
249
+ for (const statement of statements) {
250
+ if (isImportDeclaration(statement) && isValueImport(statement)) {
251
+ const source = statement.source.value;
252
+ if (!importDeclarations.has(source)) importDeclarations.set(source, []);
253
+ importDeclarations.get(source).push(statement);
254
+ }
255
+ }
256
+ let lastImportPath = null;
257
+ for (const bodyStmt of this._programPath.get("body")) {
258
+ if (bodyStmt.isImportDeclaration() && isValueImport(bodyStmt.node)) {
259
+ lastImportPath = bodyStmt;
260
+ const source = bodyStmt.node.source.value;
261
+ const newImports = importDeclarations.get(source);
262
+ if (!newImports) continue;
263
+ for (const decl of newImports) {
264
+ if (!statementsSet.has(decl)) continue;
265
+ if (maybeAppendImportSpecifiers(bodyStmt.node, decl)) {
266
+ statementsSet.delete(decl);
267
+ }
268
+ }
269
+ }
270
+ }
271
+ if (statementsSet.size === 0) return true;
272
+ if (lastImportPath) lastImportPath.insertAfter(Array.from(statementsSet));
273
+ return !!lastImportPath;
274
+ }
275
+ }
276
+ exports.default = ImportInjector;
277
+ function isValueImport(node) {
278
+ return node.importKind !== "type" && node.importKind !== "typeof";
279
+ }
280
+ function hasNamespaceImport(node) {
281
+ return node.specifiers.length === 1 && node.specifiers[0].type === "ImportNamespaceSpecifier" || node.specifiers.length === 2 && node.specifiers[1].type === "ImportNamespaceSpecifier";
282
+ }
283
+ function hasDefaultImport(node) {
284
+ return node.specifiers.length > 0 && node.specifiers[0].type === "ImportDefaultSpecifier";
285
+ }
286
+ function maybeAppendImportSpecifiers(target, source) {
287
+ if (!target.specifiers.length) {
288
+ target.specifiers = source.specifiers;
289
+ return true;
290
+ }
291
+ if (!source.specifiers.length) return true;
292
+ if (hasNamespaceImport(target) || hasNamespaceImport(source)) return false;
293
+ if (hasDefaultImport(source)) {
294
+ if (hasDefaultImport(target)) {
295
+ source.specifiers[0] = importSpecifier(source.specifiers[0].local, identifier("default"));
296
+ } else {
297
+ target.specifiers.unshift(source.specifiers.shift());
298
+ }
299
+ }
300
+ target.specifiers.push(...source.specifiers);
301
+ return true;
302
+ }
303
+
304
+ //# sourceMappingURL=import-injector.js.map
node_modules/@babel/helper-module-imports/lib/import-injector.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"names":["_assert","require","_t","_importBuilder","_isModule","identifier","importSpecifier","numericLiteral","sequenceExpression","isImportDeclaration","ImportInjector","constructor","path","importedSource","opts","_defaultOpts","importedType","importedInterop","importingInterop","ensureLiveReference","ensureNoContext","importPosition","programPath","find","p","isProgram","_programPath","_programScope","scope","_hub","hub","_applyDefaults","addDefault","importedSourceIn","addNamed","importName","assert","_generateImport","addNamespace","addSideEffect","isInit","newOpts","Object","assign","nameHint","undefined","blockHoist","isDefault","isNamed","isNamespace","name","isMod","isModule","isModuleForNode","isModuleForBabel","Error","builder","ImportBuilder","import","namespace","named","es6Default","default","var","wildcardInterop","defaultInterop","read","prop","statements","resultName","done","_insertStatements","type","_insertStatementsAfter","_insertStatementsBefore","unshiftContainer","length","isValueImport","firstImportDecl","get","node","source","value","maybeAppendImportSpecifiers","forEach","_blockHoist","targetPath","val","Number","isFinite","insertBefore","statementsSet","Set","importDeclarations","Map","statement","has","set","push","lastImportPath","bodyStmt","newImports","decl","delete","size","insertAfter","Array","from","exports","importKind","hasNamespaceImport","specifiers","hasDefaultImport","target","local","unshift","shift"],"sources":["../src/import-injector.ts"],"sourcesContent":["import assert from \"node:assert\";\nimport {\n identifier,\n importSpecifier,\n numericLiteral,\n sequenceExpression,\n isImportDeclaration,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { NodePath, Scope, HubInterface } from \"@babel/traverse\";\n\nimport ImportBuilder from \"./import-builder.ts\";\nimport isModule from \"./is-module.ts\";\n\nexport type ImportOptions = {\n /**\n * The module being referenced.\n */\n importedSource: string | null;\n /**\n * The type of module being imported:\n *\n * * 'es6' - An ES6 module.\n * * 'commonjs' - A CommonJS module. (Default)\n */\n importedType: \"es6\" | \"commonjs\";\n /**\n * The type of interop behavior for namespace/default/named when loading\n * CommonJS modules.\n *\n * ## 'babel' (Default)\n *\n * Load using Babel's interop.\n *\n * If '.__esModule' is true, treat as 'compiled', else:\n *\n * * Namespace: A copy of the module.exports with .default\n * populated by the module.exports object.\n * * Default: The module.exports value.\n * * Named: The .named property of module.exports.\n *\n * The 'ensureLiveReference' has no effect on the liveness of these.\n *\n * ## 'compiled'\n *\n * Assume the module is ES6 compiled to CommonJS. Useful to avoid injecting\n * interop logic if you are confident that the module is a certain format.\n *\n * * Namespace: The root module.exports object.\n * * Default: The .default property of the namespace.\n * * Named: The .named property of the namespace.\n *\n * Will return erroneous results if the imported module is _not_ compiled\n * from ES6 with Babel.\n *\n * ## 'uncompiled'\n *\n * Assume the module is _not_ ES6 compiled to CommonJS. Used a simplified\n * access pattern that doesn't require additional function calls.\n *\n * Will return erroneous results if the imported module _is_ compiled\n * from ES6 with Babel.\n *\n * * Namespace: The module.exports object.\n * * Default: The module.exports object.\n * * Named: The .named property of module.exports.\n */\n importedInterop: \"babel\" | \"node\" | \"compiled\" | \"uncompiled\";\n /**\n * The type of CommonJS interop included in the environment that will be\n * loading the output code.\n *\n * * 'babel' - CommonJS modules load with Babel's interop. (Default)\n * * 'node' - CommonJS modules load with Node's interop.\n *\n * See descriptions in 'importedInterop' for more details.\n */\n importingInterop: \"babel\" | \"node\";\n /**\n * Define whether we explicitly care that the import be a live reference.\n * Only applies when importing default and named imports, not the namespace.\n *\n * * true - Force imported values to be live references.\n * * false - No particular requirements. Keeps the code simplest. (Default)\n */\n ensureLiveReference: boolean;\n /**\n * Define if we explicitly care that the result not be a property reference.\n *\n * * true - Force calls to exclude context. Useful if the value is going to\n * be used as function callee.\n * * false - No particular requirements for context of the access. (Default)\n */\n ensureNoContext: boolean;\n /**\n * Define whether the import should be loaded before or after the existing imports.\n * \"after\" is only allowed inside ECMAScript modules, since it's not possible to\n * reliably pick the location _after_ require() calls but _before_ other code in CJS.\n */\n importPosition: \"before\" | \"after\";\n\n nameHint?: string;\n blockHoist?: number;\n};\n\n/**\n * A general helper classes add imports via transforms. See README for usage.\n */\nexport default class ImportInjector {\n /**\n * The path used for manipulation.\n */\n declare _programPath: NodePath<t.Program>;\n\n /**\n * The scope used to generate unique variable names.\n */\n declare _programScope: Scope;\n\n /**\n * The file used to inject helpers and resolve paths.\n */\n declare _hub: HubInterface;\n\n /**\n * The default options to use with this instance when imports are added.\n */\n _defaultOpts: ImportOptions = {\n importedSource: null,\n importedType: \"commonjs\",\n importedInterop: \"babel\",\n importingInterop: \"babel\",\n ensureLiveReference: false,\n ensureNoContext: false,\n importPosition: \"before\",\n };\n\n constructor(\n path: NodePath,\n importedSource?: string,\n opts?: Partial<ImportOptions>,\n ) {\n const programPath = path.find(p => p.isProgram()) as NodePath<t.Program>;\n\n this._programPath = programPath;\n this._programScope = programPath.scope;\n this._hub = programPath.hub;\n\n this._defaultOpts = this._applyDefaults(importedSource, opts, true);\n }\n\n addDefault(importedSourceIn: string, opts: Partial<ImportOptions>) {\n return this.addNamed(\"default\", importedSourceIn, opts);\n }\n\n addNamed(\n importName: string,\n importedSourceIn: string,\n opts: Partial<ImportOptions>,\n ) {\n assert(typeof importName === \"string\");\n\n return this._generateImport(\n this._applyDefaults(importedSourceIn, opts),\n importName,\n );\n }\n\n addNamespace(importedSourceIn: string, opts: Partial<ImportOptions>) {\n return this._generateImport(\n this._applyDefaults(importedSourceIn, opts),\n null,\n );\n }\n\n addSideEffect(importedSourceIn: string, opts: Partial<ImportOptions>) {\n return this._generateImport(\n this._applyDefaults(importedSourceIn, opts),\n void 0,\n );\n }\n\n _applyDefaults(\n importedSource: string | Partial<ImportOptions>,\n opts: Partial<ImportOptions> | undefined,\n isInit = false,\n ) {\n let newOpts: ImportOptions;\n if (typeof importedSource === \"string\") {\n newOpts = { ...this._defaultOpts, importedSource, ...opts };\n } else {\n assert(!opts, \"Unexpected secondary arguments.\");\n newOpts = { ...this._defaultOpts, ...importedSource };\n }\n\n if (!isInit && opts) {\n if (opts.nameHint !== undefined) newOpts.nameHint = opts.nameHint;\n if (opts.blockHoist !== undefined) newOpts.blockHoist = opts.blockHoist;\n }\n return newOpts;\n }\n\n _generateImport(\n opts: Partial<ImportOptions>,\n importName: string | null | undefined,\n ) {\n const isDefault = importName === \"default\";\n const isNamed = !!importName && !isDefault;\n const isNamespace = importName === null;\n\n const {\n importedSource,\n importedType,\n importedInterop,\n importingInterop,\n ensureLiveReference,\n ensureNoContext,\n nameHint,\n importPosition,\n\n // Not meant for public usage. Allows code that absolutely must control\n // ordering to set a specific hoist value on the import nodes.\n // This is ignored when \"importPosition\" is \"after\".\n blockHoist,\n } = opts;\n\n // Provide a hint for generateUidIdentifier for the local variable name\n // to use for the import, if the code will generate a simple assignment\n // to a variable.\n let name = nameHint || importName;\n\n const isMod = isModule(this._programPath);\n const isModuleForNode = isMod && importingInterop === \"node\";\n const isModuleForBabel = isMod && importingInterop === \"babel\";\n\n if (importPosition === \"after\" && !isMod) {\n throw new Error(`\"importPosition\": \"after\" is only supported in modules`);\n }\n\n const builder = new ImportBuilder(\n importedSource,\n this._programScope,\n this._hub,\n );\n\n if (importedType === \"es6\") {\n if (!isModuleForNode && !isModuleForBabel) {\n throw new Error(\"Cannot import an ES6 module from CommonJS\");\n }\n\n // import * as namespace from ''; namespace\n // import def from ''; def\n // import { named } from ''; named\n builder.import();\n if (isNamespace) {\n builder.namespace(nameHint || importedSource);\n } else if (isDefault || isNamed) {\n builder.named(name, importName);\n }\n } else if (importedType !== \"commonjs\") {\n throw new Error(`Unexpected interopType \"${importedType}\"`);\n } else if (importedInterop === \"babel\") {\n if (isModuleForNode) {\n // import _tmp from ''; var namespace = interopRequireWildcard(_tmp); namespace\n // import _tmp from ''; var def = interopRequireDefault(_tmp).default; def\n // import _tmp from ''; _tmp.named\n name = name !== \"default\" ? name : importedSource;\n const es6Default = `${importedSource}$es6Default`;\n\n builder.import();\n if (isNamespace) {\n builder\n .default(es6Default)\n .var(name || importedSource)\n .wildcardInterop();\n } else if (isDefault) {\n if (ensureLiveReference) {\n builder\n .default(es6Default)\n .var(name || importedSource)\n .defaultInterop()\n .read(\"default\");\n } else {\n builder\n .default(es6Default)\n .var(name)\n .defaultInterop()\n .prop(importName);\n }\n } else if (isNamed) {\n builder.default(es6Default).read(importName);\n }\n } else if (isModuleForBabel) {\n // import * as namespace from ''; namespace\n // import def from ''; def\n // import { named } from ''; named\n builder.import();\n if (isNamespace) {\n builder.namespace(name || importedSource);\n } else if (isDefault || isNamed) {\n builder.named(name, importName);\n }\n } else {\n // var namespace = interopRequireWildcard(require(''));\n // var def = interopRequireDefault(require('')).default; def\n // var named = require('').named; named\n builder.require();\n if (isNamespace) {\n builder.var(name || importedSource).wildcardInterop();\n } else if ((isDefault || isNamed) && ensureLiveReference) {\n if (isDefault) {\n name = name !== \"default\" ? name : importedSource;\n builder.var(name).read(importName);\n builder.defaultInterop();\n } else {\n builder.var(importedSource).read(importName);\n }\n } else if (isDefault) {\n builder.var(name).defaultInterop().prop(importName);\n } else if (isNamed) {\n builder.var(name).prop(importName);\n }\n }\n } else if (importedInterop === \"compiled\") {\n if (isModuleForNode) {\n // import namespace from ''; namespace\n // import namespace from ''; namespace.default\n // import namespace from ''; namespace.named\n\n builder.import();\n if (isNamespace) {\n builder.default(name || importedSource);\n } else if (isDefault || isNamed) {\n builder.default(importedSource).read(name);\n }\n } else if (isModuleForBabel) {\n // import * as namespace from ''; namespace\n // import def from ''; def\n // import { named } from ''; named\n // Note: These lookups will break if the module has no __esModule set,\n // hence the warning that 'compiled' will not work on standard CommonJS.\n\n builder.import();\n if (isNamespace) {\n builder.namespace(name || importedSource);\n } else if (isDefault || isNamed) {\n builder.named(name, importName);\n }\n } else {\n // var namespace = require(''); namespace\n // var namespace = require(''); namespace.default\n // var namespace = require(''); namespace.named\n // var named = require('').named;\n builder.require();\n if (isNamespace) {\n builder.var(name || importedSource);\n } else if (isDefault || isNamed) {\n if (ensureLiveReference) {\n builder.var(importedSource).read(name);\n } else {\n builder.prop(importName).var(name);\n }\n }\n }\n } else if (importedInterop === \"uncompiled\") {\n if (isDefault && ensureLiveReference) {\n throw new Error(\"No live reference for commonjs default\");\n }\n\n if (isModuleForNode) {\n // import namespace from ''; namespace\n // import def from ''; def;\n // import namespace from ''; namespace.named\n builder.import();\n if (isNamespace) {\n builder.default(name || importedSource);\n } else if (isDefault) {\n builder.default(name);\n } else if (isNamed) {\n builder.default(importedSource).read(name);\n }\n } else if (isModuleForBabel) {\n // import namespace from '';\n // import def from '';\n // import { named } from ''; named;\n // Note: These lookups will break if the module has __esModule set,\n // hence the warning that 'uncompiled' will not work on ES6 transpiled\n // to CommonJS.\n\n builder.import();\n if (isNamespace) {\n builder.default(name || importedSource);\n } else if (isDefault) {\n builder.default(name);\n } else if (isNamed) {\n builder.named(name, importName);\n }\n } else {\n // var namespace = require(''); namespace\n // var def = require(''); def\n // var namespace = require(''); namespace.named\n // var named = require('').named;\n builder.require();\n if (isNamespace) {\n builder.var(name || importedSource);\n } else if (isDefault) {\n builder.var(name);\n } else if (isNamed) {\n if (ensureLiveReference) {\n builder.var(importedSource).read(name);\n } else {\n builder.var(name).prop(importName);\n }\n }\n }\n } else {\n throw new Error(`Unknown importedInterop \"${importedInterop}\".`);\n }\n\n const { statements, resultName } = builder.done();\n\n this._insertStatements(statements, importPosition, blockHoist);\n\n if (\n (isDefault || isNamed) &&\n ensureNoContext &&\n resultName.type !== \"Identifier\"\n ) {\n return sequenceExpression([numericLiteral(0), resultName]);\n }\n return resultName;\n }\n\n _insertStatements(\n statements: t.Statement[],\n importPosition = \"before\",\n blockHoist = 3,\n ) {\n if (importPosition === \"after\") {\n if (this._insertStatementsAfter(statements)) return;\n } else {\n if (this._insertStatementsBefore(statements, blockHoist)) return;\n }\n\n this._programPath.unshiftContainer(\"body\", statements);\n }\n\n _insertStatementsBefore(statements: t.Statement[], blockHoist: number) {\n if (\n statements.length === 1 &&\n isImportDeclaration(statements[0]) &&\n isValueImport(statements[0])\n ) {\n const firstImportDecl = this._programPath\n .get(\"body\")\n .find((p): p is NodePath<t.ImportDeclaration> => {\n return p.isImportDeclaration() && isValueImport(p.node);\n });\n\n if (\n firstImportDecl?.node.source.value === statements[0].source.value &&\n maybeAppendImportSpecifiers(firstImportDecl.node, statements[0])\n ) {\n return true;\n }\n }\n\n statements.forEach(node => {\n // @ts-expect-error handle _blockHoist\n node._blockHoist = blockHoist;\n });\n\n const targetPath = this._programPath.get(\"body\").find(p => {\n // @ts-expect-error todo(flow->ts): avoid mutations\n const val = p.node._blockHoist;\n return Number.isFinite(val) && val < 4;\n });\n\n if (targetPath) {\n targetPath.insertBefore(statements);\n return true;\n }\n\n return false;\n }\n\n _insertStatementsAfter(statements: t.Statement[]): boolean {\n const statementsSet = new Set(statements);\n const importDeclarations = new Map<string, t.ImportDeclaration[]>();\n\n for (const statement of statements) {\n if (isImportDeclaration(statement) && isValueImport(statement)) {\n const source = statement.source.value;\n if (!importDeclarations.has(source)) importDeclarations.set(source, []);\n importDeclarations.get(source).push(statement);\n }\n }\n\n let lastImportPath = null;\n for (const bodyStmt of this._programPath.get(\"body\")) {\n if (bodyStmt.isImportDeclaration() && isValueImport(bodyStmt.node)) {\n lastImportPath = bodyStmt;\n\n const source = bodyStmt.node.source.value;\n const newImports = importDeclarations.get(source);\n if (!newImports) continue;\n\n for (const decl of newImports) {\n if (!statementsSet.has(decl)) continue;\n if (maybeAppendImportSpecifiers(bodyStmt.node, decl)) {\n statementsSet.delete(decl);\n }\n }\n }\n }\n\n if (statementsSet.size === 0) return true;\n\n if (lastImportPath) lastImportPath.insertAfter(Array.from(statementsSet));\n\n return !!lastImportPath;\n }\n}\n\nfunction isValueImport(node: t.ImportDeclaration) {\n return node.importKind !== \"type\" && node.importKind !== \"typeof\";\n}\n\nfunction hasNamespaceImport(node: t.ImportDeclaration) {\n return (\n (node.specifiers.length === 1 &&\n node.specifiers[0].type === \"ImportNamespaceSpecifier\") ||\n (node.specifiers.length === 2 &&\n node.specifiers[1].type === \"ImportNamespaceSpecifier\")\n );\n}\n\nfunction hasDefaultImport(node: t.ImportDeclaration) {\n return (\n node.specifiers.length > 0 &&\n node.specifiers[0].type === \"ImportDefaultSpecifier\"\n );\n}\n\nfunction maybeAppendImportSpecifiers(\n target: t.ImportDeclaration,\n source: t.ImportDeclaration,\n): boolean {\n if (!target.specifiers.length) {\n target.specifiers = source.specifiers;\n return true;\n }\n if (!source.specifiers.length) return true;\n\n if (hasNamespaceImport(target) || hasNamespaceImport(source)) return false;\n\n if (hasDefaultImport(source)) {\n if (hasDefaultImport(target)) {\n source.specifiers[0] = importSpecifier(\n source.specifiers[0].local,\n identifier(\"default\"),\n );\n } else {\n target.specifiers.unshift(source.specifiers.shift());\n }\n }\n\n target.specifiers.push(...source.specifiers);\n\n return true;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,EAAA,GAAAD,OAAA;AAUA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAAsC;EAVpCI,UAAU;EACVC,eAAe;EACfC,cAAc;EACdC,kBAAkB;EAClBC;AAAmB,IAAAP,EAAA;AAsGN,MAAMQ,cAAc,CAAC;EA6BlCC,WAAWA,CACTC,IAAc,EACdC,cAAuB,EACvBC,IAA6B,EAC7B;IAAA,KAdFC,YAAY,GAAkB;MAC5BF,cAAc,EAAE,IAAI;MACpBG,YAAY,EAAE,UAAU;MACxBC,eAAe,EAAE,OAAO;MACxBC,gBAAgB,EAAE,OAAO;MACzBC,mBAAmB,EAAE,KAAK;MAC1BC,eAAe,EAAE,KAAK;MACtBC,cAAc,EAAE;IAClB,CAAC;IAOC,MAAMC,WAAW,GAAGV,IAAI,CAACW,IAAI,CAACC,CAAC,IAAIA,CAAC,CAACC,SAAS,CAAC,CAAC,CAAwB;IAExE,IAAI,CAACC,YAAY,GAAGJ,WAAW;IAC/B,IAAI,CAACK,aAAa,GAAGL,WAAW,CAACM,KAAK;IACtC,IAAI,CAACC,IAAI,GAAGP,WAAW,CAACQ,GAAG;IAE3B,IAAI,CAACf,YAAY,GAAG,IAAI,CAACgB,cAAc,CAAClB,cAAc,EAAEC,IAAI,EAAE,IAAI,CAAC;EACrE;EAEAkB,UAAUA,CAACC,gBAAwB,EAAEnB,IAA4B,EAAE;IACjE,OAAO,IAAI,CAACoB,QAAQ,CAAC,SAAS,EAAED,gBAAgB,EAAEnB,IAAI,CAAC;EACzD;EAEAoB,QAAQA,CACNC,UAAkB,EAClBF,gBAAwB,EACxBnB,IAA4B,EAC5B;IACAsB,OAAM,CAAC,OAAOD,UAAU,KAAK,QAAQ,CAAC;IAEtC,OAAO,IAAI,CA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kBAAkB,CAAC7B,MAAM,CAAC,EAAE,OAAO,KAAK;EAE1E,IAAI+B,gBAAgB,CAAC/B,MAAM,CAAC,EAAE;IAC5B,IAAI+B,gBAAgB,CAACC,MAAM,CAAC,EAAE;MAC5BhC,MAAM,CAAC8B,UAAU,CAAC,CAAC,CAAC,GAAGzG,eAAe,CACpC2E,MAAM,CAAC8B,UAAU,CAAC,CAAC,CAAC,CAACG,KAAK,EAC1B7G,UAAU,CAAC,SAAS,CACtB,CAAC;IACH,CAAC,MAAM;MACL4G,MAAM,CAACF,UAAU,CAACI,OAAO,CAAClC,MAAM,CAAC8B,UAAU,CAACK,KAAK,CAAC,CAAC,CAAC;IACtD;EACF;EAEAH,MAAM,CAACF,UAAU,CAACb,IAAI,CAAC,GAAGjB,MAAM,CAAC8B,UAAU,CAAC;EAE5C,OAAO,IAAI;AACb","ignoreList":[]}
node_modules/@babel/helper-module-imports/lib/index.js ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "ImportInjector", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _importInjector.default;
10
+ }
11
+ });
12
+ exports.addDefault = addDefault;
13
+ exports.addNamed = addNamed;
14
+ exports.addNamespace = addNamespace;
15
+ exports.addSideEffect = addSideEffect;
16
+ Object.defineProperty(exports, "isModule", {
17
+ enumerable: true,
18
+ get: function () {
19
+ return _isModule.default;
20
+ }
21
+ });
22
+ var _importInjector = require("./import-injector.js");
23
+ var _isModule = require("./is-module.js");
24
+ function addDefault(path, importedSource, opts) {
25
+ return new _importInjector.default(path).addDefault(importedSource, opts);
26
+ }
27
+ function addNamed(path, name, importedSource, opts) {
28
+ return new _importInjector.default(path).addNamed(name, importedSource, opts);
29
+ }
30
+ function addNamespace(path, importedSource, opts) {
31
+ return new _importInjector.default(path).addNamespace(importedSource, opts);
32
+ }
33
+ function addSideEffect(path, importedSource, opts) {
34
+ return new _importInjector.default(path).addSideEffect(importedSource, opts);
35
+ }
36
+
37
+ //# sourceMappingURL=index.js.map
node_modules/@babel/helper-module-imports/lib/index.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"names":["_importInjector","require","_isModule","addDefault","path","importedSource","opts","ImportInjector","addNamed","name","addNamespace","addSideEffect"],"sources":["../src/index.ts"],"sourcesContent":["import ImportInjector, { type ImportOptions } from \"./import-injector.ts\";\nimport type { NodePath } from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\n\nexport { ImportInjector };\n\nexport { default as isModule } from \"./is-module.ts\";\n\nexport function addDefault(\n path: NodePath,\n importedSource: string,\n opts?: Partial<ImportOptions>,\n) {\n return new ImportInjector(path).addDefault(importedSource, opts);\n}\n\nfunction addNamed(\n path: NodePath,\n name: string,\n importedSource: string,\n opts?: Omit<\n Partial<ImportOptions>,\n \"ensureLiveReference\" | \"ensureNoContext\"\n >,\n): t.Identifier;\nfunction addNamed(\n path: NodePath,\n name: string,\n importedSource: string,\n opts?: Omit<Partial<ImportOptions>, \"ensureLiveReference\"> & {\n ensureLiveReference: true;\n },\n): t.MemberExpression;\nfunction addNamed(\n path: NodePath,\n name: string,\n importedSource: string,\n opts?: Omit<Partial<ImportOptions>, \"ensureNoContext\"> & {\n ensureNoContext: true;\n },\n): t.SequenceExpression;\n/**\n * add a named import to the program path of given path\n *\n * @export\n * @param {NodePath} path The starting path to find a program path\n * @param {string} name The name of the generated binding. Babel will prefix it with `_`\n * @param {string} importedSource The source of the import\n * @param {Partial<ImportOptions>} [opts]\n * @returns {t.Identifier | t.MemberExpression | t.SequenceExpression} If opts.ensureNoContext is true, returns a SequenceExpression,\n * else if opts.ensureLiveReference is true, returns a MemberExpression, else returns an Identifier\n */\nfunction addNamed(\n path: NodePath,\n name: string,\n importedSource: string,\n opts?: Partial<ImportOptions>,\n) {\n return new ImportInjector(path).addNamed(name, importedSource, opts);\n}\nexport { addNamed };\n\nexport function addNamespace(\n path: NodePath,\n importedSource: string,\n opts?: Partial<ImportOptions>,\n) {\n return new ImportInjector(path).addNamespace(importedSource, opts);\n}\n\nexport function addSideEffect(\n path: NodePath,\n importedSource: string,\n opts?: Partial<ImportOptions>,\n) {\n return new ImportInjector(path).addSideEffect(importedSource, opts);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAMA,IAAAC,SAAA,GAAAD,OAAA;AAEO,SAASE,UAAUA,CACxBC,IAAc,EACdC,cAAsB,EACtBC,IAA6B,EAC7B;EACA,OAAO,IAAIC,uBAAc,CAACH,IAAI,CAAC,CAACD,UAAU,CAACE,cAAc,EAAEC,IAAI,CAAC;AAClE;AAsCA,SAASE,QAAQA,CACfJ,IAAc,EACdK,IAAY,EACZJ,cAAsB,EACtBC,IAA6B,EAC7B;EACA,OAAO,IAAIC,uBAAc,CAACH,IAAI,CAAC,CAACI,QAAQ,CAACC,IAAI,EAAEJ,cAAc,EAAEC,IAAI,CAAC;AACtE;AAGO,SAASI,YAAYA,CAC1BN,IAAc,EACdC,cAAsB,EACtBC,IAA6B,EAC7B;EACA,OAAO,IAAIC,uBAAc,CAACH,IAAI,CAAC,CAACM,YAAY,CAACL,cAAc,EAAEC,IAAI,CAAC;AACpE;AAEO,SAASK,aAAaA,CAC3BP,IAAc,EACdC,cAAsB,EACtBC,IAA6B,EAC7B;EACA,OAAO,IAAIC,uBAAc,CAACH,IAAI,CAAC,CAACO,aAAa,CAACN,cAAc,EAAEC,IAAI,CAAC;AACrE","ignoreList":[]}
node_modules/@babel/helper-module-imports/lib/is-module.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = isModule;
7
+ function isModule(path) {
8
+ return path.node.sourceType === "module";
9
+ }
10
+
11
+ //# sourceMappingURL=is-module.js.map
node_modules/@babel/helper-module-imports/lib/is-module.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"names":["isModule","path","node","sourceType"],"sources":["../src/is-module.ts"],"sourcesContent":["import type { NodePath } from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\n\n/**\n * A small utility to check if a file qualifies as a module.\n */\nexport default function isModule(path: NodePath<t.Program>) {\n return path.node.sourceType === \"module\";\n}\n"],"mappings":";;;;;;AAMe,SAASA,QAAQA,CAACC,IAAyB,EAAE;EAC1D,OAAOA,IAAI,CAACC,IAAI,CAACC,UAAU,KAAK,QAAQ;AAC1C","ignoreList":[]}
node_modules/@babel/helper-module-imports/package.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@babel/helper-module-imports",
3
+ "version": "7.28.6",
4
+ "description": "Babel helper functions for inserting module loads",
5
+ "author": "The Babel Team (https://babel.dev/team)",
6
+ "homepage": "https://babel.dev/docs/en/next/babel-helper-module-imports",
7
+ "license": "MIT",
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/babel/babel.git",
14
+ "directory": "packages/babel-helper-module-imports"
15
+ },
16
+ "main": "./lib/index.js",
17
+ "dependencies": {
18
+ "@babel/traverse": "^7.28.6",
19
+ "@babel/types": "^7.28.6"
20
+ },
21
+ "devDependencies": {
22
+ "@babel/core": "^7.28.6"
23
+ },
24
+ "engines": {
25
+ "node": ">=6.9.0"
26
+ },
27
+ "type": "commonjs"
28
+ }
node_modules/@babel/helper-module-transforms/LICENSE ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2014-present Sebastian McKenzie and other contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
node_modules/@babel/helper-module-transforms/README.md ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # @babel/helper-module-transforms
2
+
3
+ > Babel helper functions for implementing ES6 module transformations
4
+
5
+ See our website [@babel/helper-module-transforms](https://babeljs.io/docs/babel-helper-module-transforms) for more information.
6
+
7
+ ## Install
8
+
9
+ Using npm:
10
+
11
+ ```sh
12
+ npm install --save @babel/helper-module-transforms
13
+ ```
14
+
15
+ or using yarn:
16
+
17
+ ```sh
18
+ yarn add @babel/helper-module-transforms
19
+ ```
node_modules/@babel/helper-module-transforms/lib/dynamic-import.js ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.buildDynamicImport = buildDynamicImport;
7
+ var _core = require("@babel/core");
8
+ exports.getDynamicImportSource = function getDynamicImportSource(node) {
9
+ const [source] = node.arguments;
10
+ return _core.types.isStringLiteral(source) || _core.types.isTemplateLiteral(source) ? source : _core.template.expression.ast`\`\${${source}}\``;
11
+ };
12
+ function buildDynamicImport(node, deferToThen, wrapWithPromise, builder) {
13
+ const specifier = _core.types.isCallExpression(node) ? node.arguments[0] : node.source;
14
+ if (_core.types.isStringLiteral(specifier) || _core.types.isTemplateLiteral(specifier) && specifier.quasis.length === 0) {
15
+ if (deferToThen) {
16
+ return _core.template.expression.ast`
17
+ Promise.resolve().then(() => ${builder(specifier)})
18
+ `;
19
+ } else return builder(specifier);
20
+ }
21
+ const specifierToString = _core.types.isTemplateLiteral(specifier) ? _core.types.identifier("specifier") : _core.types.templateLiteral([_core.types.templateElement({
22
+ raw: ""
23
+ }), _core.types.templateElement({
24
+ raw: ""
25
+ })], [_core.types.identifier("specifier")]);
26
+ if (deferToThen) {
27
+ return _core.template.expression.ast`
28
+ (specifier =>
29
+ new Promise(r => r(${specifierToString}))
30
+ .then(s => ${builder(_core.types.identifier("s"))})
31
+ )(${specifier})
32
+ `;
33
+ } else if (wrapWithPromise) {
34
+ return _core.template.expression.ast`
35
+ (specifier =>
36
+ new Promise(r => r(${builder(specifierToString)}))
37
+ )(${specifier})
38
+ `;
39
+ } else {
40
+ return _core.template.expression.ast`
41
+ (specifier => ${builder(specifierToString)})(${specifier})
42
+ `;
43
+ }
44
+ }
45
+
46
+ //# sourceMappingURL=dynamic-import.js.map
node_modules/@babel/helper-module-transforms/lib/dynamic-import.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"names":["_core","require","exports","getDynamicImportSource","node","source","arguments","t","isStringLiteral","isTemplateLiteral","template","expression","ast","buildDynamicImport","deferToThen","wrapWithPromise","builder","specifier","isCallExpression","quasis","length","specifierToString","identifier","templateLiteral","templateElement","raw"],"sources":["../src/dynamic-import.ts"],"sourcesContent":["// Heavily inspired by\n// https://github.com/airbnb/babel-plugin-dynamic-import-node/blob/master/src/utils.js\n\nimport { types as t, template } from \"@babel/core\";\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // eslint-disable-next-line no-restricted-globals\n exports.getDynamicImportSource = function getDynamicImportSource(\n node: t.CallExpression,\n ): t.StringLiteral | t.TemplateLiteral {\n const [source] = node.arguments;\n\n return t.isStringLiteral(source) || t.isTemplateLiteral(source)\n ? source\n : (template.expression.ast`\\`\\${${source}}\\`` as t.TemplateLiteral);\n };\n}\n\nexport function buildDynamicImport(\n node: t.CallExpression | t.ImportExpression,\n deferToThen: boolean,\n wrapWithPromise: boolean,\n builder: (specifier: t.Expression) => t.Expression,\n): t.Expression {\n const specifier = t.isCallExpression(node) ? node.arguments[0] : node.source;\n\n if (\n t.isStringLiteral(specifier) ||\n (t.isTemplateLiteral(specifier) && specifier.quasis.length === 0)\n ) {\n if (deferToThen) {\n return template.expression.ast`\n Promise.resolve().then(() => ${builder(specifier)})\n `;\n } else return builder(specifier);\n }\n\n const specifierToString = t.isTemplateLiteral(specifier)\n ? t.identifier(\"specifier\")\n : t.templateLiteral(\n [t.templateElement({ raw: \"\" }), t.templateElement({ raw: \"\" })],\n [t.identifier(\"specifier\")],\n );\n\n if (deferToThen) {\n return template.expression.ast`\n (specifier =>\n new Promise(r => r(${specifierToString}))\n .then(s => ${builder(t.identifier(\"s\"))})\n )(${specifier})\n `;\n } else if (wrapWithPromise) {\n return template.expression.ast`\n (specifier =>\n new Promise(r => r(${builder(specifierToString)}))\n )(${specifier})\n `;\n } else {\n return template.expression.ast`\n (specifier => ${builder(specifierToString)})(${specifier})\n `;\n }\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAIEC,OAAO,CAACC,sBAAsB,GAAG,SAASA,sBAAsBA,CAC9DC,IAAsB,EACe;EAC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AAC9C,uBAAuBL,OAAO,CAACT,WAAC,CAACe,UAAU,CAAC,GAAG,CAAC,CAAC;AACjD,UAAUL,SAAS;AACnB,KAAK;EACH,CAAC,MAAM,IAAIF,eAAe,EAAE;IAC1B,OAAOL,cAAQ,CAACC,UAAU,CAACC,GAAG;AAClC;AACA,6BAA6BI,OAAO,CAACK,iBAAiB,CAAC;AACvD,UAAUJ,SAAS;AACnB,KAAK;EACH,CAAC,MAAM;IACL,OAAOP,cAAQ,CAACC,UAAU,CAACC,GAAG;AAClC,sBAAsBI,OAAO,CAACK,iBAAiB,CAAC,KAAKJ,SAAS;AAC9D,KAAK;EACH;AACF","ignoreList":[]}
node_modules/@babel/helper-module-transforms/lib/get-module-name.js ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = getModuleName;
7
+ const originalGetModuleName = getModuleName;
8
+ exports.default = getModuleName = function getModuleName(rootOpts, pluginOpts) {
9
+ var _pluginOpts$moduleId, _pluginOpts$moduleIds, _pluginOpts$getModule, _pluginOpts$moduleRoo;
10
+ return originalGetModuleName(rootOpts, {
11
+ moduleId: (_pluginOpts$moduleId = pluginOpts.moduleId) != null ? _pluginOpts$moduleId : rootOpts.moduleId,
12
+ moduleIds: (_pluginOpts$moduleIds = pluginOpts.moduleIds) != null ? _pluginOpts$moduleIds : rootOpts.moduleIds,
13
+ getModuleId: (_pluginOpts$getModule = pluginOpts.getModuleId) != null ? _pluginOpts$getModule : rootOpts.getModuleId,
14
+ moduleRoot: (_pluginOpts$moduleRoo = pluginOpts.moduleRoot) != null ? _pluginOpts$moduleRoo : rootOpts.moduleRoot
15
+ });
16
+ };
17
+ function getModuleName(rootOpts, pluginOpts) {
18
+ const {
19
+ filename,
20
+ filenameRelative = filename,
21
+ sourceRoot = pluginOpts.moduleRoot
22
+ } = rootOpts;
23
+ const {
24
+ moduleId,
25
+ moduleIds = !!moduleId,
26
+ getModuleId,
27
+ moduleRoot = sourceRoot
28
+ } = pluginOpts;
29
+ if (!moduleIds) return null;
30
+ if (moduleId != null && !getModuleId) {
31
+ return moduleId;
32
+ }
33
+ let moduleName = moduleRoot != null ? moduleRoot + "/" : "";
34
+ if (filenameRelative) {
35
+ const sourceRootReplacer = sourceRoot != null ? new RegExp("^" + sourceRoot + "/?") : "";
36
+ moduleName += filenameRelative.replace(sourceRootReplacer, "").replace(/\.\w*$/, "");
37
+ }
38
+ moduleName = moduleName.replace(/\\/g, "/");
39
+ if (getModuleId) {
40
+ return getModuleId(moduleName) || moduleName;
41
+ } else {
42
+ return moduleName;
43
+ }
44
+ }
45
+
46
+ //# sourceMappingURL=get-module-name.js.map
node_modules/@babel/helper-module-transforms/lib/get-module-name.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"names":["originalGetModuleName","getModuleName","exports","default","rootOpts","pluginOpts","_pluginOpts$moduleId","_pluginOpts$moduleIds","_pluginOpts$getModule","_pluginOpts$moduleRoo","moduleId","moduleIds","getModuleId","moduleRoot","filename","filenameRelative","sourceRoot","moduleName","sourceRootReplacer","RegExp","replace"],"sources":["../src/get-module-name.ts"],"sourcesContent":["type RootOptions = {\n filename?: string;\n filenameRelative?: string;\n sourceRoot?: string;\n};\n\nexport type PluginOptions = {\n moduleId?: string;\n moduleIds?: boolean;\n getModuleId?: (moduleName: string) => string | null | undefined;\n moduleRoot?: string;\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n const originalGetModuleName = getModuleName;\n\n // @ts-expect-error TS doesn't like reassigning a function.\n getModuleName = function getModuleName(\n rootOpts: RootOptions & PluginOptions,\n pluginOpts: PluginOptions,\n ): string | null {\n return originalGetModuleName(rootOpts, {\n moduleId: pluginOpts.moduleId ?? rootOpts.moduleId,\n moduleIds: pluginOpts.moduleIds ?? rootOpts.moduleIds,\n getModuleId: pluginOpts.getModuleId ?? rootOpts.getModuleId,\n moduleRoot: pluginOpts.moduleRoot ?? rootOpts.moduleRoot,\n });\n };\n}\n\nexport default function getModuleName(\n rootOpts: RootOptions,\n pluginOpts: PluginOptions,\n): string | null {\n const {\n filename,\n filenameRelative = filename,\n sourceRoot = pluginOpts.moduleRoot,\n } = rootOpts;\n\n const {\n moduleId,\n moduleIds = !!moduleId,\n\n getModuleId,\n\n moduleRoot = sourceRoot,\n } = pluginOpts;\n\n if (!moduleIds) return null;\n\n // moduleId is n/a if a `getModuleId()` is provided\n if (moduleId != null && !getModuleId) {\n return moduleId;\n }\n\n let moduleName = moduleRoot != null ? moduleRoot + \"/\" : \"\";\n\n if (filenameRelative) {\n const sourceRootReplacer =\n sourceRoot != null ? new RegExp(\"^\" + sourceRoot + \"/?\") : \"\";\n\n moduleName += filenameRelative\n // remove sourceRoot from filename\n .replace(sourceRootReplacer, \"\")\n // remove extension\n .replace(/\\.\\w*$/, \"\");\n }\n\n // normalize path separators\n moduleName = moduleName.replace(/\\\\/g, \"/\");\n\n if (getModuleId) {\n // If return is falsy, assume they want us to use our generated default name\n return getModuleId(moduleName) || moduleName;\n } else {\n return moduleName;\n }\n}\n"],"mappings":";;;;;;AAcE,MAAMA,qBAAqB,GAAGC,aAAa;AAG3CC,OAAA,CAAAC,OAAA,GAAAF,aAAa,GAAG,SAASA,aAAaA,CACpCG,QAAqC,EACrCC,UAAyB,EACV;EAAA,IAAAC,oBAAA,EAAAC,qBAAA,EAAAC,qBAAA,EAAAC,qBAAA;EACf,OAAOT,qBAAqB,CAACI,QAAQ,EAAE;IACrCM,QAAQ,GAAAJ,oBAAA,GAAED,UAAU,CAACK,QAAQ,YAAAJ,oBAAA,GAAIF,QAAQ,CAACM,QAAQ;IAClDC,SAAS,GAAAJ,qBAAA,GAAEF,UAAU,CAACM,SAAS,YAAAJ,qBAAA,GAAIH,QAAQ,CAACO,SAAS;IACrDC,WAAW,G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 -0,0 +1,396 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "buildDynamicImport", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _dynamicImport.buildDynamicImport;
10
+ }
11
+ });
12
+ exports.buildNamespaceInitStatements = buildNamespaceInitStatements;
13
+ exports.ensureStatementsHoisted = ensureStatementsHoisted;
14
+ Object.defineProperty(exports, "getModuleName", {
15
+ enumerable: true,
16
+ get: function () {
17
+ return _getModuleName.default;
18
+ }
19
+ });
20
+ Object.defineProperty(exports, "hasExports", {
21
+ enumerable: true,
22
+ get: function () {
23
+ return _normalizeAndLoadMetadata.hasExports;
24
+ }
25
+ });
26
+ Object.defineProperty(exports, "isModule", {
27
+ enumerable: true,
28
+ get: function () {
29
+ return _helperModuleImports.isModule;
30
+ }
31
+ });
32
+ Object.defineProperty(exports, "isSideEffectImport", {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _normalizeAndLoadMetadata.isSideEffectImport;
36
+ }
37
+ });
38
+ exports.rewriteModuleStatementsAndPrepareHeader = rewriteModuleStatementsAndPrepareHeader;
39
+ Object.defineProperty(exports, "rewriteThis", {
40
+ enumerable: true,
41
+ get: function () {
42
+ return _rewriteThis.default;
43
+ }
44
+ });
45
+ exports.wrapInterop = wrapInterop;
46
+ var _assert = require("assert");
47
+ var _core = require("@babel/core");
48
+ var _helperModuleImports = require("@babel/helper-module-imports");
49
+ var _rewriteThis = require("./rewrite-this.js");
50
+ var _rewriteLiveReferences = require("./rewrite-live-references.js");
51
+ var _normalizeAndLoadMetadata = require("./normalize-and-load-metadata.js");
52
+ var Lazy = require("./lazy-modules.js");
53
+ var _dynamicImport = require("./dynamic-import.js");
54
+ var _getModuleName = require("./get-module-name.js");
55
+ exports.getDynamicImportSource = require("./dynamic-import").getDynamicImportSource;
56
+ function rewriteModuleStatementsAndPrepareHeader(path, {
57
+ exportName,
58
+ strict,
59
+ allowTopLevelThis,
60
+ strictMode,
61
+ noInterop,
62
+ importInterop = noInterop ? "none" : "babel",
63
+ lazy,
64
+ getWrapperPayload = Lazy.toGetWrapperPayload(lazy != null ? lazy : false),
65
+ wrapReference = Lazy.wrapReference,
66
+ esNamespaceOnly,
67
+ filename,
68
+ constantReexports = arguments[1].loose,
69
+ enumerableModuleMeta = arguments[1].loose,
70
+ noIncompleteNsImportDetection
71
+ }) {
72
+ (0, _normalizeAndLoadMetadata.validateImportInteropOption)(importInterop);
73
+ _assert((0, _helperModuleImports.isModule)(path), "Cannot process module statements in a script");
74
+ path.node.sourceType = "script";
75
+ const meta = (0, _normalizeAndLoadMetadata.default)(path, exportName, {
76
+ importInterop,
77
+ initializeReexports: constantReexports,
78
+ getWrapperPayload,
79
+ esNamespaceOnly,
80
+ filename
81
+ });
82
+ if (!allowTopLevelThis) {
83
+ (0, _rewriteThis.default)(path);
84
+ }
85
+ (0, _rewriteLiveReferences.default)(path, meta, wrapReference);
86
+ if (strictMode !== false) {
87
+ const hasStrict = path.node.directives.some(directive => {
88
+ return directive.value.value === "use strict";
89
+ });
90
+ if (!hasStrict) {
91
+ path.unshiftContainer("directives", _core.types.directive(_core.types.directiveLiteral("use strict")));
92
+ }
93
+ }
94
+ const headers = [];
95
+ if ((0, _normalizeAndLoadMetadata.hasExports)(meta) && !strict) {
96
+ headers.push(buildESModuleHeader(meta, enumerableModuleMeta));
97
+ }
98
+ const nameList = buildExportNameListDeclaration(path, meta);
99
+ if (nameList) {
100
+ meta.exportNameListName = nameList.name;
101
+ headers.push(nameList.statement);
102
+ }
103
+ headers.push(...buildExportInitializationStatements(path, meta, wrapReference, constantReexports, noIncompleteNsImportDetection));
104
+ return {
105
+ meta,
106
+ headers
107
+ };
108
+ }
109
+ function ensureStatementsHoisted(statements) {
110
+ statements.forEach(header => {
111
+ header._blockHoist = 3;
112
+ });
113
+ }
114
+ function wrapInterop(programPath, expr, type) {
115
+ if (type === "none") {
116
+ return null;
117
+ }
118
+ if (type === "node-namespace") {
119
+ return _core.types.callExpression(programPath.hub.addHelper("interopRequireWildcard"), [expr, _core.types.booleanLiteral(true)]);
120
+ } else if (type === "node-default") {
121
+ return null;
122
+ }
123
+ let helper;
124
+ if (type === "default") {
125
+ helper = "interopRequireDefault";
126
+ } else if (type === "namespace") {
127
+ helper = "interopRequireWildcard";
128
+ } else {
129
+ throw new Error(`Unknown interop: ${type}`);
130
+ }
131
+ return _core.types.callExpression(programPath.hub.addHelper(helper), [expr]);
132
+ }
133
+ function buildNamespaceInitStatements(metadata, sourceMetadata, constantReexports = false, wrapReference = Lazy.wrapReference) {
134
+ var _wrapReference;
135
+ const statements = [];
136
+ const srcNamespaceId = _core.types.identifier(sourceMetadata.name);
137
+ for (const localName of sourceMetadata.importsNamespace) {
138
+ if (localName === sourceMetadata.name) continue;
139
+ statements.push(_core.template.statement`var NAME = SOURCE;`({
140
+ NAME: localName,
141
+ SOURCE: _core.types.cloneNode(srcNamespaceId)
142
+ }));
143
+ }
144
+ const srcNamespace = (_wrapReference = wrapReference(srcNamespaceId, sourceMetadata.wrap)) != null ? _wrapReference : srcNamespaceId;
145
+ if (constantReexports) {
146
+ statements.push(...buildReexportsFromMeta(metadata, sourceMetadata, true, wrapReference));
147
+ }
148
+ for (const exportName of sourceMetadata.reexportNamespace) {
149
+ statements.push((!_core.types.isIdentifier(srcNamespace) ? _core.template.statement`
150
+ Object.defineProperty(EXPORTS, "NAME", {
151
+ enumerable: true,
152
+ get: function() {
153
+ return NAMESPACE;
154
+ }
155
+ });
156
+ ` : _core.template.statement`EXPORTS.NAME = NAMESPACE;`)({
157
+ EXPORTS: metadata.exportName,
158
+ NAME: exportName,
159
+ NAMESPACE: _core.types.cloneNode(srcNamespace)
160
+ }));
161
+ }
162
+ if (sourceMetadata.reexportAll) {
163
+ const statement = buildNamespaceReexport(metadata, _core.types.cloneNode(srcNamespace), constantReexports);
164
+ statement.loc = sourceMetadata.reexportAll.loc;
165
+ statements.push(statement);
166
+ }
167
+ return statements;
168
+ }
169
+ const ReexportTemplate = {
170
+ constant: ({
171
+ exports,
172
+ exportName,
173
+ namespaceImport
174
+ }) => _core.template.statement.ast`
175
+ ${exports}.${exportName} = ${namespaceImport};
176
+ `,
177
+ constantComputed: ({
178
+ exports,
179
+ exportName,
180
+ namespaceImport
181
+ }) => _core.template.statement.ast`
182
+ ${exports}["${exportName}"] = ${namespaceImport};
183
+ `,
184
+ spec: ({
185
+ exports,
186
+ exportName,
187
+ namespaceImport
188
+ }) => _core.template.statement.ast`
189
+ Object.defineProperty(${exports}, "${exportName}", {
190
+ enumerable: true,
191
+ get: function() {
192
+ return ${namespaceImport};
193
+ },
194
+ });
195
+ `
196
+ };
197
+ function buildReexportsFromMeta(meta, metadata, constantReexports, wrapReference) {
198
+ var _wrapReference2;
199
+ let namespace = _core.types.identifier(metadata.name);
200
+ namespace = (_wrapReference2 = wrapReference(namespace, metadata.wrap)) != null ? _wrapReference2 : namespace;
201
+ const {
202
+ stringSpecifiers
203
+ } = meta;
204
+ return Array.from(metadata.reexports, ([exportName, importName]) => {
205
+ let namespaceImport = _core.types.cloneNode(namespace);
206
+ if (importName === "default" && metadata.interop === "node-default") {} else if (stringSpecifiers.has(importName)) {
207
+ namespaceImport = _core.types.memberExpression(namespaceImport, _core.types.stringLiteral(importName), true);
208
+ } else {
209
+ namespaceImport = _core.types.memberExpression(namespaceImport, _core.types.identifier(importName));
210
+ }
211
+ const astNodes = {
212
+ exports: meta.exportName,
213
+ exportName,
214
+ namespaceImport
215
+ };
216
+ if (constantReexports || _core.types.isIdentifier(namespaceImport)) {
217
+ if (stringSpecifiers.has(exportName)) {
218
+ return ReexportTemplate.constantComputed(astNodes);
219
+ } else {
220
+ return ReexportTemplate.constant(astNodes);
221
+ }
222
+ } else {
223
+ return ReexportTemplate.spec(astNodes);
224
+ }
225
+ });
226
+ }
227
+ function buildESModuleHeader(metadata, enumerableModuleMeta = false) {
228
+ return (enumerableModuleMeta ? _core.template.statement`
229
+ EXPORTS.__esModule = true;
230
+ ` : _core.template.statement`
231
+ Object.defineProperty(EXPORTS, "__esModule", {
232
+ value: true,
233
+ });
234
+ `)({
235
+ EXPORTS: metadata.exportName
236
+ });
237
+ }
238
+ function buildNamespaceReexport(metadata, namespace, constantReexports) {
239
+ return (constantReexports ? _core.template.statement`
240
+ Object.keys(NAMESPACE).forEach(function(key) {
241
+ if (key === "default" || key === "__esModule") return;
242
+ VERIFY_NAME_LIST;
243
+ if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;
244
+
245
+ EXPORTS[key] = NAMESPACE[key];
246
+ });
247
+ ` : _core.template.statement`
248
+ Object.keys(NAMESPACE).forEach(function(key) {
249
+ if (key === "default" || key === "__esModule") return;
250
+ VERIFY_NAME_LIST;
251
+ if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;
252
+
253
+ Object.defineProperty(EXPORTS, key, {
254
+ enumerable: true,
255
+ get: function() {
256
+ return NAMESPACE[key];
257
+ },
258
+ });
259
+ });
260
+ `)({
261
+ NAMESPACE: namespace,
262
+ EXPORTS: metadata.exportName,
263
+ VERIFY_NAME_LIST: metadata.exportNameListName ? (0, _core.template)`
264
+ if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return;
265
+ `({
266
+ EXPORTS_LIST: metadata.exportNameListName
267
+ }) : null
268
+ });
269
+ }
270
+ function buildExportNameListDeclaration(programPath, metadata) {
271
+ const exportedVars = Object.create(null);
272
+ for (const data of metadata.local.values()) {
273
+ for (const name of data.names) {
274
+ exportedVars[name] = true;
275
+ }
276
+ }
277
+ let hasReexport = false;
278
+ for (const data of metadata.source.values()) {
279
+ for (const exportName of data.reexports.keys()) {
280
+ exportedVars[exportName] = true;
281
+ }
282
+ for (const exportName of data.reexportNamespace) {
283
+ exportedVars[exportName] = true;
284
+ }
285
+ hasReexport = hasReexport || !!data.reexportAll;
286
+ }
287
+ if (!hasReexport || Object.keys(exportedVars).length === 0) return null;
288
+ const name = programPath.scope.generateUidIdentifier("exportNames");
289
+ delete exportedVars.default;
290
+ return {
291
+ name: name.name,
292
+ statement: _core.types.variableDeclaration("var", [_core.types.variableDeclarator(name, _core.types.valueToNode(exportedVars))])
293
+ };
294
+ }
295
+ function buildExportInitializationStatements(programPath, metadata, wrapReference, constantReexports = false, noIncompleteNsImportDetection = false) {
296
+ const initStatements = [];
297
+ for (const [localName, data] of metadata.local) {
298
+ if (data.kind === "import") {} else if (data.kind === "hoisted") {
299
+ initStatements.push([data.names[0], buildInitStatement(metadata, data.names, _core.types.identifier(localName))]);
300
+ } else if (!noIncompleteNsImportDetection) {
301
+ for (const exportName of data.names) {
302
+ initStatements.push([exportName, null]);
303
+ }
304
+ }
305
+ }
306
+ for (const data of metadata.source.values()) {
307
+ if (!constantReexports) {
308
+ const reexportsStatements = buildReexportsFromMeta(metadata, data, false, wrapReference);
309
+ const reexports = [...data.reexports.keys()];
310
+ for (let i = 0; i < reexportsStatements.length; i++) {
311
+ initStatements.push([reexports[i], reexportsStatements[i]]);
312
+ }
313
+ }
314
+ if (!noIncompleteNsImportDetection) {
315
+ for (const exportName of data.reexportNamespace) {
316
+ initStatements.push([exportName, null]);
317
+ }
318
+ }
319
+ }
320
+ initStatements.sort(([a], [b]) => {
321
+ if (a < b) return -1;
322
+ if (b < a) return 1;
323
+ return 0;
324
+ });
325
+ const results = [];
326
+ if (noIncompleteNsImportDetection) {
327
+ for (const [, initStatement] of initStatements) {
328
+ results.push(initStatement);
329
+ }
330
+ } else {
331
+ const chunkSize = 100;
332
+ for (let i = 0; i < initStatements.length; i += chunkSize) {
333
+ let uninitializedExportNames = [];
334
+ for (let j = 0; j < chunkSize && i + j < initStatements.length; j++) {
335
+ const [exportName, initStatement] = initStatements[i + j];
336
+ if (initStatement !== null) {
337
+ if (uninitializedExportNames.length > 0) {
338
+ results.push(buildInitStatement(metadata, uninitializedExportNames, programPath.scope.buildUndefinedNode()));
339
+ uninitializedExportNames = [];
340
+ }
341
+ results.push(initStatement);
342
+ } else {
343
+ uninitializedExportNames.push(exportName);
344
+ }
345
+ }
346
+ if (uninitializedExportNames.length > 0) {
347
+ results.push(buildInitStatement(metadata, uninitializedExportNames, programPath.scope.buildUndefinedNode()));
348
+ }
349
+ }
350
+ }
351
+ return results;
352
+ }
353
+ const InitTemplate = {
354
+ computed: ({
355
+ exports,
356
+ name,
357
+ value
358
+ }) => _core.template.expression.ast`${exports}["${name}"] = ${value}`,
359
+ default: ({
360
+ exports,
361
+ name,
362
+ value
363
+ }) => _core.template.expression.ast`${exports}.${name} = ${value}`,
364
+ define: ({
365
+ exports,
366
+ name,
367
+ value
368
+ }) => _core.template.expression.ast`
369
+ Object.defineProperty(${exports}, "${name}", {
370
+ enumerable: true,
371
+ value: void 0,
372
+ writable: true
373
+ })["${name}"] = ${value}`
374
+ };
375
+ function buildInitStatement(metadata, exportNames, initExpr) {
376
+ const {
377
+ stringSpecifiers,
378
+ exportName: exports
379
+ } = metadata;
380
+ return _core.types.expressionStatement(exportNames.reduce((value, name) => {
381
+ const params = {
382
+ exports,
383
+ name,
384
+ value
385
+ };
386
+ if (name === "__proto__") {
387
+ return InitTemplate.define(params);
388
+ }
389
+ if (stringSpecifiers.has(name)) {
390
+ return InitTemplate.computed(params);
391
+ }
392
+ return InitTemplate.default(params);
393
+ }, initExpr));
394
+ }
395
+
396
+ //# sourceMappingURL=index.js.map
node_modules/@babel/helper-module-transforms/lib/index.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"names":["_assert","require","_core","_helperModuleImports","_rewriteThis","_rewriteLiveReferences","_normalizeAndLoadMetadata","Lazy","_dynamicImport","_getModuleName","exports","getDynamicImportSource","rewriteModuleStatementsAndPrepareHeader","path","exportName","strict","allowTopLevelThis","strictMode","noInterop","importInterop","lazy","getWrapperPayload","toGetWrapperPayload","wrapReference","esNamespaceOnly","filename","constantReexports","arguments","loose","enumerableModuleMeta","noIncompleteNsImportDetection","validateImportInteropOption","assert","isModule","node","sourceType","meta","normalizeModuleAndLoadMetadata","initializeReexports","rewriteThis","rewriteLiveReferences","hasStrict","directives","some","directive","value","unshiftContainer","t","directiveLiteral","headers","hasExports","push","buildESModuleHeader","nameList","buildExportNameListDeclaration","exportNameListName","name","statement","buildExportInitializationStatements","ensureStatementsHoisted","statements","forEach","header","_blockHoist","wrapInterop","programPath","expr","type","callExpression","hub","addHelper","booleanLiteral","helper","Error","buildNamespaceInitStatements","metadata","sourceMetadata","_wrapReference","srcNamespaceId","identifier","localName","importsNamespace","template","NAME","SOURCE","cloneNode","srcNamespace","wrap","buildReexportsFromMeta","reexportNamespace","isIdentifier","EXPORTS","NAMESPACE","reexportAll","buildNamespaceReexport","loc","ReexportTemplate","constant","namespaceImport","ast","constantComputed","spec","_wrapReference2","namespace","stringSpecifiers","Array","from","reexports","importName","interop","has","memberExpression","stringLiteral","astNodes","VERIFY_NAME_LIST","EXPORTS_LIST","exportedVars","Object","create","data","local","values","names","hasReexport","source","keys","length","scope","generateUidIdentifier","default","variableDeclaration","variableDeclarator","valueToNode","initStatements","kind","buildInitStatement","reexportsStatements","i","sort","a","b","results","initStatement","chunkSize","uninitializedExportNames","j","buildUndefinedNode","InitTemplate","computed","expression","define","exportNames","initExpr","expressionStatement","reduce","params"],"sources":["../src/index.ts"],"sourcesContent":["import assert from \"node:assert\";\nimport { template, types as t } from \"@babel/core\";\n\nimport { isModule } from \"@babel/helper-module-imports\";\n\nimport rewriteThis from \"./rewrite-this.ts\";\nimport rewriteLiveReferences from \"./rewrite-live-references.ts\";\nimport normalizeModuleAndLoadMetadata, {\n hasExports,\n isSideEffectImport,\n validateImportInteropOption,\n} from \"./normalize-and-load-metadata.ts\";\nimport type {\n ImportInterop,\n InteropType,\n ModuleMetadata,\n SourceModuleMetadata,\n} from \"./normalize-and-load-metadata.ts\";\nimport * as Lazy from \"./lazy-modules.ts\";\nimport type { NodePath } from \"@babel/core\";\n\nexport { buildDynamicImport } from \"./dynamic-import.ts\";\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // eslint-disable-next-line no-restricted-globals\n exports.getDynamicImportSource =\n // eslint-disable-next-line no-restricted-globals, import/extensions\n require(\"./dynamic-import\").getDynamicImportSource;\n}\n\nexport { default as getModuleName } from \"./get-module-name.ts\";\nexport type { PluginOptions } from \"./get-module-name.ts\";\n\nexport { hasExports, isSideEffectImport, isModule, rewriteThis };\n\nexport interface RewriteModuleStatementsAndPrepareHeaderOptions {\n exportName?: string;\n strict: boolean;\n allowTopLevelThis?: boolean;\n strictMode: boolean;\n loose?: boolean;\n importInterop?: ImportInterop;\n noInterop?: boolean;\n lazy?: Lazy.Lazy;\n getWrapperPayload?: (\n source: string,\n metadata: SourceModuleMetadata,\n importNodes: t.Node[],\n ) => unknown;\n wrapReference?: (ref: t.Expression, payload: unknown) => t.Expression | null;\n esNamespaceOnly?: boolean;\n filename: string | undefined;\n constantReexports?: boolean | void;\n enumerableModuleMeta?: boolean | void;\n noIncompleteNsImportDetection?: boolean | void;\n}\n\n/**\n * Perform all of the generic ES6 module rewriting needed to handle initial\n * module processing. This function will rewrite the majority of the given\n * program to reference the modules described by the returned metadata,\n * and returns a list of statements for use when initializing the module.\n */\nexport function rewriteModuleStatementsAndPrepareHeader(\n path: NodePath<t.Program>,\n {\n exportName,\n strict,\n allowTopLevelThis,\n strictMode,\n noInterop,\n importInterop = noInterop ? \"none\" : \"babel\",\n // TODO(Babel 8): After that `lazy` implementation is moved to the CJS\n // transform, remove this parameter.\n lazy,\n getWrapperPayload = Lazy.toGetWrapperPayload(lazy ?? false),\n wrapReference = Lazy.wrapReference,\n esNamespaceOnly,\n filename,\n\n constantReexports = process.env.BABEL_8_BREAKING\n ? undefined\n : arguments[1].loose,\n enumerableModuleMeta = process.env.BABEL_8_BREAKING\n ? undefined\n : arguments[1].loose,\n noIncompleteNsImportDetection,\n }: RewriteModuleStatementsAndPrepareHeaderOptions,\n) {\n validateImportInteropOption(importInterop);\n assert(isModule(path), \"Cannot process module statements in a script\");\n path.node.sourceType = \"script\";\n\n const meta = normalizeModuleAndLoadMetadata(path, exportName, {\n importInterop,\n initializeReexports: constantReexports,\n getWrapperPayload,\n esNamespaceOnly,\n filename,\n });\n\n if (!allowTopLevelThis) {\n rewriteThis(path);\n }\n\n rewriteLiveReferences(path, meta, wrapReference);\n\n if (strictMode !== false) {\n const hasStrict = path.node.directives.some(directive => {\n return directive.value.value === \"use strict\";\n });\n if (!hasStrict) {\n path.unshiftContainer(\n \"directives\",\n t.directive(t.directiveLiteral(\"use strict\")),\n );\n }\n }\n\n const headers = [];\n if (hasExports(meta) && !strict) {\n headers.push(buildESModuleHeader(meta, enumerableModuleMeta));\n }\n\n const nameList = buildExportNameListDeclaration(path, meta);\n\n if (nameList) {\n meta.exportNameListName = nameList.name;\n headers.push(nameList.statement);\n }\n\n // Create all of the statically known named exports.\n headers.push(\n ...buildExportInitializationStatements(\n path,\n meta,\n wrapReference,\n constantReexports,\n noIncompleteNsImportDetection,\n ),\n );\n\n return { meta, headers };\n}\n\n/**\n * Flag a set of statements as hoisted above all else so that module init\n * statements all run before user code.\n */\nexport function ensureStatementsHoisted(statements: t.Statement[]) {\n // Force all of the header fields to be at the top of the file.\n statements.forEach(header => {\n // @ts-expect-error Fixme: handle _blockHoist property\n header._blockHoist = 3;\n });\n}\n\n/**\n * Given an expression for a standard import object, like \"require('foo')\",\n * wrap it in a call to the interop helpers based on the type.\n */\nexport function wrapInterop(\n programPath: NodePath<t.Program>,\n expr: t.Expression,\n type: InteropType,\n): t.CallExpression {\n if (type === \"none\") {\n return null;\n }\n\n if (type === \"node-namespace\") {\n return t.callExpression(\n programPath.hub.addHelper(\"interopRequireWildcard\"),\n [expr, t.booleanLiteral(true)],\n );\n } else if (type === \"node-default\") {\n return null;\n }\n\n let helper;\n if (type === \"default\") {\n helper = \"interopRequireDefault\";\n } else if (type === \"namespace\") {\n helper = \"interopRequireWildcard\";\n } else {\n throw new Error(`Unknown interop: ${type}`);\n }\n\n return t.callExpression(programPath.hub.addHelper(helper), [expr]);\n}\n\n/**\n * Create the runtime initialization statements for a given requested source.\n * These will initialize all of the runtime import/export logic that\n * can't be handled statically by the statements created by\n * buildExportInitializationStatements().\n */\nexport function buildNamespaceInitStatements(\n metadata: ModuleMetadata,\n sourceMetadata: SourceModuleMetadata,\n constantReexports: boolean | void = false,\n wrapReference: (\n ref: t.Identifier,\n payload: unknown,\n ) => t.Expression | null = Lazy.wrapReference,\n) {\n const statements = [];\n\n const srcNamespaceId = t.identifier(sourceMetadata.name);\n\n for (const localName of sourceMetadata.importsNamespace) {\n if (localName === sourceMetadata.name) continue;\n\n // Create and assign binding to namespace object\n statements.push(\n template.statement`var NAME = SOURCE;`({\n NAME: localName,\n SOURCE: t.cloneNode(srcNamespaceId),\n }),\n );\n }\n\n const srcNamespace =\n wrapReference(srcNamespaceId, sourceMetadata.wrap) ?? srcNamespaceId;\n\n if (constantReexports) {\n statements.push(\n ...buildReexportsFromMeta(metadata, sourceMetadata, true, wrapReference),\n );\n }\n for (const exportName of sourceMetadata.reexportNamespace) {\n // Assign export to namespace object.\n statements.push(\n (!t.isIdentifier(srcNamespace)\n ? template.statement`\n Object.defineProperty(EXPORTS, \"NAME\", {\n enumerable: true,\n get: function() {\n return NAMESPACE;\n }\n });\n `\n : template.statement`EXPORTS.NAME = NAMESPACE;`)({\n EXPORTS: metadata.exportName,\n NAME: exportName,\n NAMESPACE: t.cloneNode(srcNamespace),\n }),\n );\n }\n if (sourceMetadata.reexportAll) {\n const statement = buildNamespaceReexport(\n metadata,\n t.cloneNode(srcNamespace),\n constantReexports,\n );\n statement.loc = sourceMetadata.reexportAll.loc;\n\n // Iterate props creating getter for each prop.\n statements.push(statement);\n }\n return statements;\n}\n\ninterface ReexportParts {\n exports: string;\n exportName: string;\n namespaceImport: t.Expression;\n}\n\nconst ReexportTemplate = {\n constant: ({ exports, exportName, namespaceImport }: ReexportParts) =>\n template.statement.ast`\n ${exports}.${exportName} = ${namespaceImport};\n `,\n constantComputed: ({ exports, exportName, namespaceImport }: ReexportParts) =>\n template.statement.ast`\n ${exports}[\"${exportName}\"] = ${namespaceImport};\n `,\n spec: ({ exports, exportName, namespaceImport }: ReexportParts) =>\n template.statement.ast`\n Object.defineProperty(${exports}, \"${exportName}\", {\n enumerable: true,\n get: function() {\n return ${namespaceImport};\n },\n });\n `,\n};\n\nfunction buildReexportsFromMeta(\n meta: ModuleMetadata,\n metadata: SourceModuleMetadata,\n constantReexports: boolean,\n wrapReference: (ref: t.Expression, payload: unknown) => t.Expression | null,\n): t.Statement[] {\n let namespace: t.Expression = t.identifier(metadata.name);\n namespace = wrapReference(namespace, metadata.wrap) ?? namespace;\n\n const { stringSpecifiers } = meta;\n return Array.from(metadata.reexports, ([exportName, importName]) => {\n let namespaceImport: t.Expression = t.cloneNode(namespace);\n if (importName === \"default\" && metadata.interop === \"node-default\") {\n // Nothing, it's ok as-is\n } else if (stringSpecifiers.has(importName)) {\n namespaceImport = t.memberExpression(\n namespaceImport,\n t.stringLiteral(importName),\n true,\n );\n } else {\n namespaceImport = t.memberExpression(\n namespaceImport,\n t.identifier(importName),\n );\n }\n const astNodes: ReexportParts = {\n exports: meta.exportName,\n exportName,\n namespaceImport,\n };\n if (constantReexports || t.isIdentifier(namespaceImport)) {\n if (stringSpecifiers.has(exportName)) {\n return ReexportTemplate.constantComputed(astNodes);\n } else {\n return ReexportTemplate.constant(astNodes);\n }\n } else {\n return ReexportTemplate.spec(astNodes);\n }\n });\n}\n\n/**\n * Build an \"__esModule\" header statement setting the property on a given object.\n */\nfunction buildESModuleHeader(\n metadata: ModuleMetadata,\n enumerableModuleMeta: boolean | void = false,\n) {\n return (\n enumerableModuleMeta\n ? template.statement`\n EXPORTS.__esModule = true;\n `\n : template.statement`\n Object.defineProperty(EXPORTS, \"__esModule\", {\n value: true,\n });\n `\n )({ EXPORTS: metadata.exportName });\n}\n\n/**\n * Create a re-export initialization loop for a specific imported namespace.\n */\nfunction buildNamespaceReexport(\n metadata: ModuleMetadata,\n namespace: t.Expression,\n constantReexports: boolean | void,\n) {\n return (\n constantReexports\n ? template.statement`\n Object.keys(NAMESPACE).forEach(function(key) {\n if (key === \"default\" || key === \"__esModule\") return;\n VERIFY_NAME_LIST;\n if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;\n\n EXPORTS[key] = NAMESPACE[key];\n });\n `\n : // Also skip already assigned bindings if they are strictly equal\n // to be somewhat more spec-compliant when a file has multiple\n // namespace re-exports that would cause a binding to be exported\n // multiple times. However, multiple bindings of the same name that\n // export the same primitive value are silently skipped\n // (the spec requires an \"ambiguous bindings\" early error here).\n template.statement`\n Object.keys(NAMESPACE).forEach(function(key) {\n if (key === \"default\" || key === \"__esModule\") return;\n VERIFY_NAME_LIST;\n if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;\n\n Object.defineProperty(EXPORTS, key, {\n enumerable: true,\n get: function() {\n return NAMESPACE[key];\n },\n });\n });\n `\n )({\n NAMESPACE: namespace,\n EXPORTS: metadata.exportName,\n VERIFY_NAME_LIST: metadata.exportNameListName\n ? template`\n if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return;\n `({ EXPORTS_LIST: metadata.exportNameListName })\n : null,\n });\n}\n\n/**\n * Build a statement declaring a variable that contains all of the exported\n * variable names in an object so they can easily be referenced from an\n * export * from statement to check for conflicts.\n */\nfunction buildExportNameListDeclaration(\n programPath: NodePath,\n metadata: ModuleMetadata,\n) {\n const exportedVars = Object.create(null);\n for (const data of metadata.local.values()) {\n for (const name of data.names) {\n exportedVars[name] = true;\n }\n }\n\n let hasReexport = false;\n for (const data of metadata.source.values()) {\n for (const exportName of data.reexports.keys()) {\n exportedVars[exportName] = true;\n }\n for (const exportName of data.reexportNamespace) {\n exportedVars[exportName] = true;\n }\n\n hasReexport = hasReexport || !!data.reexportAll;\n }\n\n if (!hasReexport || Object.keys(exportedVars).length === 0) return null;\n\n const name = programPath.scope.generateUidIdentifier(\"exportNames\");\n\n delete exportedVars.default;\n\n return {\n name: name.name,\n statement: t.variableDeclaration(\"var\", [\n t.variableDeclarator(name, t.valueToNode(exportedVars)),\n ]),\n };\n}\n\n/**\n * Create a set of statements that will initialize all of the statically-known\n * export names with their expected values.\n */\nfunction buildExportInitializationStatements(\n programPath: NodePath,\n metadata: ModuleMetadata,\n wrapReference: (ref: t.Expression, payload: unknown) => t.Expression | null,\n constantReexports: boolean | void = false,\n noIncompleteNsImportDetection: boolean | void = false,\n) {\n const initStatements: [string, t.Statement | null][] = [];\n\n for (const [localName, data] of metadata.local) {\n if (data.kind === \"import\") {\n // No-open since these are explicitly set with the \"reexports\" block.\n } else if (data.kind === \"hoisted\") {\n initStatements.push([\n // data.names is always of length 1 because a hoisted export\n // name must be id of a function declaration\n data.names[0],\n buildInitStatement(metadata, data.names, t.identifier(localName)),\n ]);\n } else if (!noIncompleteNsImportDetection) {\n for (const exportName of data.names) {\n initStatements.push([exportName, null]);\n }\n }\n }\n\n for (const data of metadata.source.values()) {\n if (!constantReexports) {\n const reexportsStatements = buildReexportsFromMeta(\n metadata,\n data,\n false,\n wrapReference,\n );\n const reexports = [...data.reexports.keys()];\n for (let i = 0; i < reexportsStatements.length; i++) {\n initStatements.push([reexports[i], reexportsStatements[i]]);\n }\n }\n if (!noIncompleteNsImportDetection) {\n for (const exportName of data.reexportNamespace) {\n initStatements.push([exportName, null]);\n }\n }\n }\n\n // https://tc39.es/ecma262/#sec-module-namespace-exotic-objects\n // The [Exports] list is ordered as if an Array of those String values\n // had been sorted using %Array.prototype.sort% using undefined as comparefn\n initStatements.sort(([a], [b]) => {\n if (a < b) return -1;\n if (b < a) return 1;\n return 0;\n });\n\n const results = [];\n if (noIncompleteNsImportDetection) {\n for (const [, initStatement] of initStatements) {\n results.push(initStatement);\n }\n } else {\n // We generate init statements (`exports.a = exports.b = ... = void 0`)\n // for every 100 exported names to avoid deeply-nested AST structures.\n const chunkSize = 100;\n for (let i = 0; i < initStatements.length; i += chunkSize) {\n let uninitializedExportNames = [];\n for (let j = 0; j < chunkSize && i + j < initStatements.length; j++) {\n const [exportName, initStatement] = initStatements[i + j];\n if (initStatement !== null) {\n if (uninitializedExportNames.length > 0) {\n results.push(\n buildInitStatement(\n metadata,\n uninitializedExportNames,\n programPath.scope.buildUndefinedNode(),\n ),\n );\n // reset after uninitializedExportNames has been transformed\n // to init statements\n uninitializedExportNames = [];\n }\n results.push(initStatement);\n } else {\n uninitializedExportNames.push(exportName);\n }\n }\n if (uninitializedExportNames.length > 0) {\n results.push(\n buildInitStatement(\n metadata,\n uninitializedExportNames,\n programPath.scope.buildUndefinedNode(),\n ),\n );\n }\n }\n }\n\n return results;\n}\n\ninterface InitParts {\n exports: string;\n name: string;\n value: t.Expression;\n}\n\n/**\n * Given a set of export names, create a set of nested assignments to\n * initialize them all to a given expression.\n */\nconst InitTemplate = {\n computed: ({ exports, name, value }: InitParts) =>\n template.expression.ast`${exports}[\"${name}\"] = ${value}`,\n default: ({ exports, name, value }: InitParts) =>\n template.expression.ast`${exports}.${name} = ${value}`,\n define: ({ exports, name, value }: InitParts) =>\n template.expression.ast`\n Object.defineProperty(${exports}, \"${name}\", {\n enumerable: true,\n value: void 0,\n writable: true\n })[\"${name}\"] = ${value}`,\n};\n\nfunction buildInitStatement(\n metadata: ModuleMetadata,\n exportNames: string[],\n initExpr: t.Expression,\n) {\n const { stringSpecifiers, exportName: exports } = metadata;\n return t.expressionStatement(\n exportNames.reduce((value, name) => {\n const params = {\n exports,\n name,\n value,\n };\n\n if (name === \"__proto__\") {\n return InitTemplate.define(params);\n }\n\n if (stringSpecifiers.has(name)) {\n return InitTemplate.computed(params);\n }\n\n return InitTemplate.default(params);\n }, initExpr),\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,oBAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAJ,OAAA;AACA,IAAAK,yBAAA,GAAAL,OAAA;AAWA,IAAAM,IAAA,GAAAN,OAAA;AAGA,IAAAO,cAAA,GAAAP,OAAA;AASA,IAAAQ,cAAA,GAAAR,OAAA;AALES,OAAO,CAACC,sBAAsB,GAE5BV,OAAO,CAAC,kBAAkB,CAAC,CAACU,sBAAsB;AAoC/C,SAASC,uCAAuCA,CACrDC,IAAyB,EACzB;EACEC,UAAU;EACVC,MAAM;EACNC,iBAAiB;EACjBC,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E;MAC9B,OAAO2F,YAAY,CAACC,QAAQ,CAACO,MAAM,CAAC;IACtC;IAEA,OAAOR,YAAY,CAAClB,OAAO,CAAC0B,MAAM,CAAC;EACrC,CAAC,EAAEH,QAAQ,CACb,CAAC;AACH","ignoreList":[]}
node_modules/@babel/helper-module-transforms/lib/lazy-modules.js ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.toGetWrapperPayload = toGetWrapperPayload;
7
+ exports.wrapReference = wrapReference;
8
+ var _core = require("@babel/core");
9
+ var _normalizeAndLoadMetadata = require("./normalize-and-load-metadata.js");
10
+ function toGetWrapperPayload(lazy) {
11
+ return (source, metadata) => {
12
+ if (lazy === false) return null;
13
+ if ((0, _normalizeAndLoadMetadata.isSideEffectImport)(metadata) || metadata.reexportAll) return null;
14
+ if (lazy === true) {
15
+ return source.includes(".") ? null : "lazy";
16
+ }
17
+ if (Array.isArray(lazy)) {
18
+ return !lazy.includes(source) ? null : "lazy";
19
+ }
20
+ if (typeof lazy === "function") {
21
+ return lazy(source) ? "lazy" : null;
22
+ }
23
+ throw new Error(`.lazy must be a boolean, string array, or function`);
24
+ };
25
+ }
26
+ function wrapReference(ref, payload) {
27
+ if (payload === "lazy") return _core.types.callExpression(ref, []);
28
+ return null;
29
+ }
30
+
31
+ //# sourceMappingURL=lazy-modules.js.map
node_modules/@babel/helper-module-transforms/lib/lazy-modules.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"names":["_core","require","_normalizeAndLoadMetadata","toGetWrapperPayload","lazy","source","metadata","isSideEffectImport","reexportAll","includes","Array","isArray","Error","wrapReference","ref","payload","t","callExpression"],"sources":["../src/lazy-modules.ts"],"sourcesContent":["// TODO: Move `lazy` implementation logic into the CommonJS plugin, since other\n// modules systems do not support `lazy`.\n\nimport { types as t } from \"@babel/core\";\nimport {\n type SourceModuleMetadata,\n isSideEffectImport,\n} from \"./normalize-and-load-metadata.ts\";\n\nexport type Lazy = boolean | string[] | ((source: string) => boolean);\n\nexport function toGetWrapperPayload(lazy: Lazy) {\n return (source: string, metadata: SourceModuleMetadata): null | \"lazy\" => {\n if (lazy === false) return null;\n if (isSideEffectImport(metadata) || metadata.reexportAll) return null;\n if (lazy === true) {\n // 'true' means that local relative files are eagerly loaded and\n // dependency modules are loaded lazily.\n return source.includes(\".\") ? null : \"lazy\";\n }\n if (Array.isArray(lazy)) {\n return !lazy.includes(source) ? null : \"lazy\";\n }\n if (typeof lazy === \"function\") {\n return lazy(source) ? \"lazy\" : null;\n }\n throw new Error(`.lazy must be a boolean, string array, or function`);\n };\n}\n\nexport function wrapReference(\n ref: t.Identifier,\n payload: unknown,\n): t.Expression | null {\n if (payload === \"lazy\") return t.callExpression(ref, []);\n return null;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,yBAAA,GAAAD,OAAA;AAOO,SAASE,mBAAmBA,CAACC,IAAU,EAAE;EAC9C,OAAO,CAACC,MAAc,EAAEC,QAA8B,KAAoB;IACxE,IAAIF,IAAI,KAAK,KAAK,EAAE,OAAO,IAAI;IAC/B,IAAI,IAAAG,4CAAkB,EAACD,QAAQ,CAAC,IAAIA,QAAQ,CAACE,WAAW,EAAE,OAAO,IAAI;IACrE,IAAIJ,IAAI,KAAK,IAAI,EAAE;MAGjB,OAAOC,MAAM,CAACI,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,MAAM;IAC7C;IACA,IAAIC,KAAK,CAACC,OAAO,CAACP,IAAI,CAAC,EAAE;MACvB,OAAO,CAACA,IAAI,CAACK,QAAQ,CAACJ,MAAM,CAAC,GAAG,IAAI,GAAG,MAAM;IAC/C;IACA,IAAI,OAAOD,IAAI,KAAK,UAAU,EAAE;MAC9B,OAAOA,IAAI,CAACC,MAAM,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
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = normalizeModuleAndLoadMetadata;
7
+ exports.hasExports = hasExports;
8
+ exports.isSideEffectImport = isSideEffectImport;
9
+ exports.validateImportInteropOption = validateImportInteropOption;
10
+ var _path = require("path");
11
+ var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
12
+ function hasExports(metadata) {
13
+ return metadata.hasExports;
14
+ }
15
+ function isSideEffectImport(source) {
16
+ return source.imports.size === 0 && source.importsNamespace.size === 0 && source.reexports.size === 0 && source.reexportNamespace.size === 0 && !source.reexportAll;
17
+ }
18
+ function validateImportInteropOption(importInterop) {
19
+ if (typeof importInterop !== "function" && importInterop !== "none" && importInterop !== "babel" && importInterop !== "node") {
20
+ throw new Error(`.importInterop must be one of "none", "babel", "node", or a function returning one of those values (received ${importInterop}).`);
21
+ }
22
+ return importInterop;
23
+ }
24
+ function resolveImportInterop(importInterop, source, filename) {
25
+ if (typeof importInterop === "function") {
26
+ return validateImportInteropOption(importInterop(source, filename));
27
+ }
28
+ return importInterop;
29
+ }
30
+ function normalizeModuleAndLoadMetadata(programPath, exportName, {
31
+ importInterop,
32
+ initializeReexports = false,
33
+ getWrapperPayload,
34
+ esNamespaceOnly = false,
35
+ filename
36
+ }) {
37
+ if (!exportName) {
38
+ exportName = programPath.scope.generateUidIdentifier("exports").name;
39
+ }
40
+ const stringSpecifiers = new Set();
41
+ nameAnonymousExports(programPath);
42
+ const {
43
+ local,
44
+ sources,
45
+ hasExports
46
+ } = getModuleMetadata(programPath, {
47
+ initializeReexports,
48
+ getWrapperPayload
49
+ }, stringSpecifiers);
50
+ removeImportExportDeclarations(programPath);
51
+ for (const [source, metadata] of sources) {
52
+ const {
53
+ importsNamespace,
54
+ imports
55
+ } = metadata;
56
+ if (importsNamespace.size > 0 && imports.size === 0) {
57
+ const [nameOfnamespace] = importsNamespace;
58
+ metadata.name = nameOfnamespace;
59
+ }
60
+ const resolvedInterop = resolveImportInterop(importInterop, source, filename);
61
+ if (resolvedInterop === "none") {
62
+ metadata.interop = "none";
63
+ } else if (resolvedInterop === "node" && metadata.interop === "namespace") {
64
+ metadata.interop = "node-namespace";
65
+ } else if (resolvedInterop === "node" && metadata.interop === "default") {
66
+ metadata.interop = "node-default";
67
+ } else if (esNamespaceOnly && metadata.interop === "namespace") {
68
+ metadata.interop = "default";
69
+ }
70
+ }
71
+ return {
72
+ exportName,
73
+ exportNameListName: null,
74
+ hasExports,
75
+ local,
76
+ source: sources,
77
+ stringSpecifiers
78
+ };
79
+ }
80
+ function getExportSpecifierName(path, stringSpecifiers) {
81
+ if (path.isIdentifier()) {
82
+ return path.node.name;
83
+ } else if (path.isStringLiteral()) {
84
+ const stringValue = path.node.value;
85
+ if (!(0, _helperValidatorIdentifier.isIdentifierName)(stringValue)) {
86
+ stringSpecifiers.add(stringValue);
87
+ }
88
+ return stringValue;
89
+ } else {
90
+ throw new Error(`Expected export specifier to be either Identifier or StringLiteral, got ${path.node.type}`);
91
+ }
92
+ }
93
+ function assertExportSpecifier(path) {
94
+ if (path.isExportSpecifier()) {
95
+ return;
96
+ } else if (path.isExportNamespaceSpecifier()) {
97
+ throw path.buildCodeFrameError("Export namespace should be first transformed by `@babel/plugin-transform-export-namespace-from`.");
98
+ } else {
99
+ throw path.buildCodeFrameError("Unexpected export specifier type");
100
+ }
101
+ }
102
+ function getModuleMetadata(programPath, {
103
+ getWrapperPayload,
104
+ initializeReexports
105
+ }, stringSpecifiers) {
106
+ const localData = getLocalExportMetadata(programPath, initializeReexports, stringSpecifiers);
107
+ const importNodes = new Map();
108
+ const sourceData = new Map();
109
+ const getData = (sourceNode, node) => {
110
+ const source = sourceNode.value;
111
+ let data = sourceData.get(source);
112
+ if (!data) {
113
+ data = {
114
+ name: programPath.scope.generateUidIdentifier((0, _path.basename)(source, (0, _path.extname)(source))).name,
115
+ interop: "none",
116
+ loc: null,
117
+ imports: new Map(),
118
+ importsNamespace: new Set(),
119
+ reexports: new Map(),
120
+ reexportNamespace: new Set(),
121
+ reexportAll: null,
122
+ wrap: null,
123
+ get lazy() {
124
+ return this.wrap === "lazy";
125
+ },
126
+ referenced: false
127
+ };
128
+ sourceData.set(source, data);
129
+ importNodes.set(source, [node]);
130
+ } else {
131
+ importNodes.get(source).push(node);
132
+ }
133
+ return data;
134
+ };
135
+ let hasExports = false;
136
+ programPath.get("body").forEach(child => {
137
+ if (child.isImportDeclaration()) {
138
+ const data = getData(child.node.source, child.node);
139
+ if (!data.loc) data.loc = child.node.loc;
140
+ child.get("specifiers").forEach(spec => {
141
+ if (spec.isImportDefaultSpecifier()) {
142
+ const localName = spec.get("local").node.name;
143
+ data.imports.set(localName, "default");
144
+ const reexport = localData.get(localName);
145
+ if (reexport) {
146
+ localData.delete(localName);
147
+ reexport.names.forEach(name => {
148
+ data.reexports.set(name, "default");
149
+ });
150
+ data.referenced = true;
151
+ }
152
+ } else if (spec.isImportNamespaceSpecifier()) {
153
+ const localName = spec.get("local").node.name;
154
+ data.importsNamespace.add(localName);
155
+ const reexport = localData.get(localName);
156
+ if (reexport) {
157
+ localData.delete(localName);
158
+ reexport.names.forEach(name => {
159
+ data.reexportNamespace.add(name);
160
+ });
161
+ data.referenced = true;
162
+ }
163
+ } else if (spec.isImportSpecifier()) {
164
+ const importName = getExportSpecifierName(spec.get("imported"), stringSpecifiers);
165
+ const localName = spec.get("local").node.name;
166
+ data.imports.set(localName, importName);
167
+ const reexport = localData.get(localName);
168
+ if (reexport) {
169
+ localData.delete(localName);
170
+ reexport.names.forEach(name => {
171
+ data.reexports.set(name, importName);
172
+ });
173
+ data.referenced = true;
174
+ }
175
+ }
176
+ });
177
+ } else if (child.isExportAllDeclaration()) {
178
+ hasExports = true;
179
+ const data = getData(child.node.source, child.node);
180
+ if (!data.loc) data.loc = child.node.loc;
181
+ data.reexportAll = {
182
+ loc: child.node.loc
183
+ };
184
+ data.referenced = true;
185
+ } else if (child.isExportNamedDeclaration() && child.node.source) {
186
+ hasExports = true;
187
+ const data = getData(child.node.source, child.node);
188
+ if (!data.loc) data.loc = child.node.loc;
189
+ child.get("specifiers").forEach(spec => {
190
+ assertExportSpecifier(spec);
191
+ const importName = getExportSpecifierName(spec.get("local"), stringSpecifiers);
192
+ const exportName = getExportSpecifierName(spec.get("exported"), stringSpecifiers);
193
+ data.reexports.set(exportName, importName);
194
+ data.referenced = true;
195
+ if (exportName === "__esModule") {
196
+ throw spec.get("exported").buildCodeFrameError('Illegal export "__esModule".');
197
+ }
198
+ });
199
+ } else if (child.isExportNamedDeclaration() || child.isExportDefaultDeclaration()) {
200
+ hasExports = true;
201
+ }
202
+ });
203
+ for (const metadata of sourceData.values()) {
204
+ let needsDefault = false;
205
+ let needsNamed = false;
206
+ if (metadata.importsNamespace.size > 0) {
207
+ needsDefault = true;
208
+ needsNamed = true;
209
+ }
210
+ if (metadata.reexportAll) {
211
+ needsNamed = true;
212
+ }
213
+ for (const importName of metadata.imports.values()) {
214
+ if (importName === "default") needsDefault = true;else needsNamed = true;
215
+ }
216
+ for (const importName of metadata.reexports.values()) {
217
+ if (importName === "default") needsDefault = true;else needsNamed = true;
218
+ }
219
+ if (needsDefault && needsNamed) {
220
+ metadata.interop = "namespace";
221
+ } else if (needsDefault) {
222
+ metadata.interop = "default";
223
+ }
224
+ }
225
+ if (getWrapperPayload) {
226
+ for (const [source, metadata] of sourceData) {
227
+ metadata.wrap = getWrapperPayload(source, metadata, importNodes.get(source));
228
+ }
229
+ }
230
+ return {
231
+ hasExports,
232
+ local: localData,
233
+ sources: sourceData
234
+ };
235
+ }
236
+ function getLocalExportMetadata(programPath, initializeReexports, stringSpecifiers) {
237
+ const bindingKindLookup = new Map();
238
+ const programScope = programPath.scope;
239
+ const programChildren = programPath.get("body");
240
+ programChildren.forEach(child => {
241
+ let kind;
242
+ if (child.isImportDeclaration()) {
243
+ kind = "import";
244
+ } else {
245
+ if (child.isExportDefaultDeclaration()) {
246
+ child = child.get("declaration");
247
+ }
248
+ if (child.isExportNamedDeclaration()) {
249
+ if (child.node.declaration) {
250
+ child = child.get("declaration");
251
+ } else if (initializeReexports && child.node.source && child.get("source").isStringLiteral()) {
252
+ child.get("specifiers").forEach(spec => {
253
+ assertExportSpecifier(spec);
254
+ bindingKindLookup.set(spec.get("local").node.name, "block");
255
+ });
256
+ return;
257
+ }
258
+ }
259
+ if (child.isFunctionDeclaration()) {
260
+ kind = "hoisted";
261
+ } else if (child.isClassDeclaration()) {
262
+ kind = "block";
263
+ } else if (child.isVariableDeclaration({
264
+ kind: "var"
265
+ })) {
266
+ kind = "var";
267
+ } else if (child.isVariableDeclaration()) {
268
+ kind = "block";
269
+ } else {
270
+ return;
271
+ }
272
+ }
273
+ Object.keys(child.getOuterBindingIdentifiers()).forEach(name => {
274
+ bindingKindLookup.set(name, kind);
275
+ });
276
+ });
277
+ const localMetadata = new Map();
278
+ const getLocalMetadata = idPath => {
279
+ const localName = idPath.node.name;
280
+ let metadata = localMetadata.get(localName);
281
+ if (!metadata) {
282
+ var _bindingKindLookup$ge, _programScope$getBind;
283
+ const kind = (_bindingKindLookup$ge = bindingKindLookup.get(localName)) != null ? _bindingKindLookup$ge : (_programScope$getBind = programScope.getBinding(localName)) == null ? void 0 : _programScope$getBind.kind;
284
+ if (kind === undefined) {
285
+ throw idPath.buildCodeFrameError(`Exporting local "${localName}", which is not declared.`);
286
+ }
287
+ metadata = {
288
+ names: [],
289
+ kind
290
+ };
291
+ localMetadata.set(localName, metadata);
292
+ }
293
+ return metadata;
294
+ };
295
+ programChildren.forEach(child => {
296
+ if (child.isExportNamedDeclaration() && (initializeReexports || !child.node.source)) {
297
+ if (child.node.declaration) {
298
+ const declaration = child.get("declaration");
299
+ const ids = declaration.getOuterBindingIdentifierPaths();
300
+ Object.keys(ids).forEach(name => {
301
+ if (name === "__esModule") {
302
+ throw declaration.buildCodeFrameError('Illegal export "__esModule".');
303
+ }
304
+ getLocalMetadata(ids[name]).names.push(name);
305
+ });
306
+ } else {
307
+ child.get("specifiers").forEach(spec => {
308
+ const local = spec.get("local");
309
+ const exported = spec.get("exported");
310
+ const localMetadata = getLocalMetadata(local);
311
+ const exportName = getExportSpecifierName(exported, stringSpecifiers);
312
+ if (exportName === "__esModule") {
313
+ throw exported.buildCodeFrameError('Illegal export "__esModule".');
314
+ }
315
+ localMetadata.names.push(exportName);
316
+ });
317
+ }
318
+ } else if (child.isExportDefaultDeclaration()) {
319
+ const declaration = child.get("declaration");
320
+ if (declaration.isFunctionDeclaration() || declaration.isClassDeclaration()) {
321
+ getLocalMetadata(declaration.get("id")).names.push("default");
322
+ } else {
323
+ throw declaration.buildCodeFrameError("Unexpected default expression export.");
324
+ }
325
+ }
326
+ });
327
+ return localMetadata;
328
+ }
329
+ function nameAnonymousExports(programPath) {
330
+ programPath.get("body").forEach(child => {
331
+ var _child$splitExportDec;
332
+ if (!child.isExportDefaultDeclaration()) return;
333
+ (_child$splitExportDec = child.splitExportDeclaration) != null ? _child$splitExportDec : child.splitExportDeclaration = require("@babel/traverse").NodePath.prototype.splitExportDeclaration;
334
+ child.splitExportDeclaration();
335
+ });
336
+ }
337
+ function removeImportExportDeclarations(programPath) {
338
+ programPath.get("body").forEach(child => {
339
+ if (child.isImportDeclaration()) {
340
+ child.remove();
341
+ } else if (child.isExportNamedDeclaration()) {
342
+ if (child.node.declaration) {
343
+ child.node.declaration._blockHoist = child.node._blockHoist;
344
+ child.replaceWith(child.node.declaration);
345
+ } else {
346
+ child.remove();
347
+ }
348
+ } else if (child.isExportDefaultDeclaration()) {
349
+ const declaration = child.get("declaration");
350
+ if (declaration.isFunctionDeclaration() || declaration.isClassDeclaration()) {
351
+ declaration._blockHoist = child.node._blockHoist;
352
+ child.replaceWith(declaration);
353
+ } else {
354
+ throw declaration.buildCodeFrameError("Unexpected default expression export.");
355
+ }
356
+ } else if (child.isExportAllDeclaration()) {
357
+ child.remove();
358
+ }
359
+ });
360
+ }
361
+
362
+ //# sourceMappingURL=normalize-and-load-metadata.js.map
node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"names":["_path","require","_helperValidatorIdentifier","hasExports","metadata","isSideEffectImport","source","imports","size","importsNamespace","reexports","reexportNamespace","reexportAll","validateImportInteropOption","importInterop","Error","resolveImportInterop","filename","normalizeModuleAndLoadMetadata","programPath","exportName","initializeReexports","getWrapperPayload","esNamespaceOnly","scope","generateUidIdentifier","name","stringSpecifiers","Set","nameAnonymousExports","local","sources","getModuleMetadata","removeImportExportDeclarations","nameOfnamespace","resolvedInterop","interop","exportNameListName","getExportSpecifierName","path","isIdentifier","node","isStringLiteral","stringValue","value","isIdentifierName","add","type","assertExportSpecifier","isExportSpecifier","isExportNamespaceSpecifier","buildCodeFrameError","localData","getLocalExportMetadata","importNodes","Map","sourceData","getData","sourceNode","data","get","basename","extname","loc","wrap","lazy","referenced","set","push","forEach","child","isImportDeclaration","spec","isImportDefaultSpecifier","localName","reexport","delete","names","isImportNamespaceSpecifier","isImportSpecifier","importName","isExportAllDeclaration","isExportNamedDeclaration","isExportDefaultDeclaration","values","needsDefault","needsNamed","bindingKindLookup","programScope","programChildren","kind","declaration","isFunctionDeclaration","isClassDeclaration","isVariableDeclaration","Object","keys","getOuterBindingIdentifiers","localMetadata","getLocalMetadata","idPath","_bindingKindLookup$ge","_programScope$getBind","getBinding","undefined","ids","getOuterBindingIdentifierPaths","exported","_child$splitExportDec","splitExportDeclaration","NodePath","prototype","remove","_blockHoist","replaceWith"],"sources":["../src/normalize-and-load-metadata.ts"],"sourcesContent":["import { basename, extname } from \"node:path\";\nimport type { types as t, NodePath } from \"@babel/core\";\n\nimport { isIdentifierName } from \"@babel/helper-validator-identifier\";\n\nexport interface ModuleMetadata {\n exportName: string;\n // The name of the variable that will reference an object containing export names.\n exportNameListName: null | string;\n hasExports: boolean;\n // Lookup from local binding to export information.\n local: Map<string, LocalExportMetadata>;\n // Lookup of source file to source file metadata.\n source: Map<string, SourceModuleMetadata>;\n // List of names that should only be printed as string literals.\n // i.e. `import { \"any unicode\" as foo } from \"some-module\"`\n // `stringSpecifiers` is Set(1) [\"any unicode\"]\n // In most cases `stringSpecifiers` is an empty Set\n stringSpecifiers: Set<string>;\n}\n\nexport type InteropType =\n | \"default\" // Babel interop for default-only imports\n | \"namespace\" // Babel interop for namespace or default+named imports\n | \"node-default\" // Node.js interop for default-only imports\n | \"node-namespace\" // Node.js interop for namespace or default+named imports\n | \"none\"; // No interop, or named-only imports\n\nexport type ImportInterop =\n | \"none\"\n | \"babel\"\n | \"node\"\n | ((source: string, filename?: string) => \"none\" | \"babel\" | \"node\");\n\nexport interface SourceModuleMetadata {\n // A unique variable name to use for this namespace object. Centralized for simplicity.\n name: string;\n loc: t.SourceLocation | undefined | null;\n interop: InteropType;\n // Local binding to reference from this source namespace. Key: Local name, value: Import name\n imports: Map<string, string>;\n // Local names that reference namespace object.\n importsNamespace: Set<string>;\n // Reexports to create for namespace. Key: Export name, value: Import name\n reexports: Map<string, string>;\n // List of names to re-export namespace as.\n reexportNamespace: Set<string>;\n // Tracks if the source should be re-exported.\n reexportAll: null | {\n loc: t.SourceLocation | undefined | null;\n };\n wrap?: unknown;\n referenced: boolean;\n}\n\nexport interface LocalExportMetadata {\n names: string[]; // names of exports,\n kind: \"import\" | \"hoisted\" | \"block\" | \"var\";\n}\n\n/**\n * Check if the module has any exports that need handling.\n */\nexport function hasExports(metadata: ModuleMetadata) {\n return metadata.hasExports;\n}\n\n/**\n * Check if a given source is an anonymous import, e.g. \"import 'foo';\"\n */\nexport function isSideEffectImport(source: SourceModuleMetadata) {\n return (\n source.imports.size === 0 &&\n source.importsNamespace.size === 0 &&\n source.reexports.size === 0 &&\n source.reexportNamespace.size === 0 &&\n !source.reexportAll\n );\n}\n\nexport function validateImportInteropOption(\n importInterop: any,\n): importInterop is ImportInterop {\n if (\n typeof importInterop !== \"function\" &&\n importInterop !== \"none\" &&\n importInterop !== \"babel\" &&\n importInterop !== \"node\"\n ) {\n throw new Error(\n `.importInterop must be one of \"none\", \"babel\", \"node\", or a function returning one of those values (received ${importInterop}).`,\n );\n }\n return importInterop;\n}\n\nfunction resolveImportInterop(\n importInterop: ImportInterop,\n source: string,\n filename: string | undefined,\n) {\n if (typeof importInterop === \"function\") {\n return validateImportInteropOption(importInterop(source, filename));\n }\n return importInterop;\n}\n\n/**\n * Remove all imports and exports from the file, and return all metadata\n * needed to reconstruct the module's behavior.\n */\nexport default function normalizeModuleAndLoadMetadata(\n programPath: NodePath<t.Program>,\n exportName: string,\n {\n importInterop,\n initializeReexports = false,\n getWrapperPayload,\n esNamespaceOnly = false,\n filename,\n }: {\n importInterop: ImportInterop;\n initializeReexports: boolean | void;\n getWrapperPayload?: (\n source: string,\n metadata: SourceModuleMetadata,\n importNodes: t.Node[],\n ) => unknown;\n esNamespaceOnly: boolean;\n filename: string;\n },\n): ModuleMetadata {\n if (!exportName) {\n exportName = programPath.scope.generateUidIdentifier(\"exports\").name;\n }\n const stringSpecifiers = new Set<string>();\n\n nameAnonymousExports(programPath);\n\n const { local, sources, hasExports } = getModuleMetadata(\n programPath,\n { initializeReexports, getWrapperPayload },\n stringSpecifiers,\n );\n\n removeImportExportDeclarations(programPath);\n\n // Reuse the imported namespace name if there is one.\n for (const [source, metadata] of sources) {\n const { importsNamespace, imports } = metadata;\n // If there is at least one namespace import and other imports, it may collipse with local ident, can be seen in issue 15879.\n if (importsNamespace.size > 0 && imports.size === 0) {\n const [nameOfnamespace] = importsNamespace;\n metadata.name = nameOfnamespace;\n }\n\n const resolvedInterop = resolveImportInterop(\n importInterop,\n source,\n filename,\n );\n\n if (resolvedInterop === \"none\") {\n metadata.interop = \"none\";\n } else if (resolvedInterop === \"node\" && metadata.interop === \"namespace\") {\n metadata.interop = \"node-namespace\";\n } else if (resolvedInterop === \"node\" && metadata.interop === \"default\") {\n metadata.interop = \"node-default\";\n } else if (esNamespaceOnly && metadata.interop === \"namespace\") {\n // Both the default and namespace interops pass through __esModule\n // objects, but the namespace interop is used to enable Babel's\n // destructuring-like interop behavior for normal CommonJS.\n // Since some tooling has started to remove that behavior, we expose\n // it as the `esNamespace` option.\n metadata.interop = \"default\";\n }\n }\n\n return {\n exportName,\n exportNameListName: null,\n hasExports,\n local,\n source: sources,\n stringSpecifiers,\n };\n}\n\nfunction getExportSpecifierName(\n path: NodePath,\n stringSpecifiers: Set<string>,\n): string {\n if (path.isIdentifier()) {\n return path.node.name;\n } else if (path.isStringLiteral()) {\n const stringValue = path.node.value;\n // add specifier value to `stringSpecifiers` only when it can not be converted to an identifier name\n // i.e In `import { \"foo\" as bar }`\n // we do not consider `\"foo\"` to be a `stringSpecifier` because we can treat it as\n // `import { foo as bar }`\n // This helps minimize the size of `stringSpecifiers` and reduce overhead of checking valid identifier names\n // when building transpiled code from metadata\n if (!isIdentifierName(stringValue)) {\n stringSpecifiers.add(stringValue);\n }\n return stringValue;\n } else {\n throw new Error(\n `Expected export specifier to be either Identifier or StringLiteral, got ${path.node.type}`,\n );\n }\n}\n\nfunction assertExportSpecifier(\n path: NodePath,\n): asserts path is NodePath<t.ExportSpecifier> {\n if (path.isExportSpecifier()) {\n return;\n } else if (path.isExportNamespaceSpecifier()) {\n throw path.buildCodeFrameError(\n \"Export namespace should be first transformed by `@babel/plugin-transform-export-namespace-from`.\",\n );\n } else {\n throw path.buildCodeFrameError(\"Unexpected export specifier type\");\n }\n}\n\n/**\n * Get metadata about the imports and exports present in this module.\n */\nfunction getModuleMetadata(\n programPath: NodePath<t.Program>,\n {\n getWrapperPayload,\n initializeReexports,\n }: {\n getWrapperPayload?: (\n source: string,\n metadata: SourceModuleMetadata,\n importNodes: t.Node[],\n ) => unknown;\n initializeReexports: boolean | void;\n },\n stringSpecifiers: Set<string>,\n) {\n const localData = getLocalExportMetadata(\n programPath,\n initializeReexports,\n stringSpecifiers,\n );\n\n const importNodes = new Map<string, t.Node[]>();\n const sourceData = new Map<string, SourceModuleMetadata>();\n const getData = (sourceNode: t.StringLiteral, node: t.Node) => {\n const source = sourceNode.value;\n\n let data = sourceData.get(source);\n if (!data) {\n data = {\n name: programPath.scope.generateUidIdentifier(\n basename(source, extname(source)),\n ).name,\n\n interop: \"none\",\n\n loc: null,\n\n // Data about the requested sources and names.\n imports: new Map(),\n importsNamespace: new Set(),\n\n // Metadata about data that is passed directly from source to export.\n reexports: new Map(),\n reexportNamespace: new Set(),\n reexportAll: null,\n\n wrap: null,\n\n // @ts-expect-error lazy is not listed in the type.\n // This is needed for compatibility with older version of the commonjs\n // plugins.\n // TODO(Babel 8): Remove this\n get lazy() {\n return this.wrap === \"lazy\";\n },\n\n referenced: false,\n };\n sourceData.set(source, data);\n importNodes.set(source, [node]);\n } else {\n importNodes.get(source).push(node);\n }\n return data;\n };\n let hasExports = false;\n programPath.get(\"body\").forEach(child => {\n if (child.isImportDeclaration()) {\n const data = getData(child.node.source, child.node);\n if (!data.loc) data.loc = child.node.loc;\n\n child.get(\"specifiers\").forEach(spec => {\n if (spec.isImportDefaultSpecifier()) {\n const localName = spec.get(\"local\").node.name;\n\n data.imports.set(localName, \"default\");\n\n const reexport = localData.get(localName);\n if (reexport) {\n localData.delete(localName);\n\n reexport.names.forEach(name => {\n data.reexports.set(name, \"default\");\n });\n data.referenced = true;\n }\n } else if (spec.isImportNamespaceSpecifier()) {\n const localName = spec.get(\"local\").node.name;\n\n data.importsNamespace.add(localName);\n const reexport = localData.get(localName);\n if (reexport) {\n localData.delete(localName);\n\n reexport.names.forEach(name => {\n data.reexportNamespace.add(name);\n });\n data.referenced = true;\n }\n } else if (spec.isImportSpecifier()) {\n const importName = getExportSpecifierName(\n spec.get(\"imported\"),\n stringSpecifiers,\n );\n const localName = spec.get(\"local\").node.name;\n\n data.imports.set(localName, importName);\n\n const reexport = localData.get(localName);\n if (reexport) {\n localData.delete(localName);\n\n reexport.names.forEach(name => {\n data.reexports.set(name, importName);\n });\n data.referenced = true;\n }\n }\n });\n } else if (child.isExportAllDeclaration()) {\n hasExports = true;\n const data = getData(child.node.source, child.node);\n if (!data.loc) data.loc = child.node.loc;\n\n data.reexportAll = {\n loc: child.node.loc,\n };\n data.referenced = true;\n } else if (child.isExportNamedDeclaration() && child.node.source) {\n hasExports = true;\n const data = getData(child.node.source, child.node);\n if (!data.loc) data.loc = child.node.loc;\n\n child.get(\"specifiers\").forEach(spec => {\n assertExportSpecifier(spec);\n const importName = getExportSpecifierName(\n spec.get(\"local\"),\n stringSpecifiers,\n );\n const exportName = getExportSpecifierName(\n spec.get(\"exported\"),\n stringSpecifiers,\n );\n\n data.reexports.set(exportName, importName);\n data.referenced = true;\n\n if (exportName === \"__esModule\") {\n throw spec\n .get(\"exported\")\n .buildCodeFrameError('Illegal export \"__esModule\".');\n }\n });\n } else if (\n child.isExportNamedDeclaration() ||\n child.isExportDefaultDeclaration()\n ) {\n hasExports = true;\n }\n });\n\n for (const metadata of sourceData.values()) {\n let needsDefault = false;\n let needsNamed = false;\n\n if (metadata.importsNamespace.size > 0) {\n needsDefault = true;\n needsNamed = true;\n }\n\n if (metadata.reexportAll) {\n needsNamed = true;\n }\n\n for (const importName of metadata.imports.values()) {\n if (importName === \"default\") needsDefault = true;\n else needsNamed = true;\n }\n for (const importName of metadata.reexports.values()) {\n if (importName === \"default\") needsDefault = true;\n else needsNamed = true;\n }\n\n if (needsDefault && needsNamed) {\n // TODO(logan): Using the namespace interop here is unfortunate. Revisit.\n metadata.interop = \"namespace\";\n } else if (needsDefault) {\n metadata.interop = \"default\";\n }\n }\n\n if (getWrapperPayload) {\n for (const [source, metadata] of sourceData) {\n metadata.wrap = getWrapperPayload(\n source,\n metadata,\n importNodes.get(source),\n );\n }\n }\n\n return {\n hasExports,\n local: localData,\n sources: sourceData,\n };\n}\n\ntype ModuleBindingKind = \"import\" | \"hoisted\" | \"block\" | \"var\";\n/**\n * Get metadata about local variables that are exported.\n */\nfunction getLocalExportMetadata(\n programPath: NodePath<t.Program>,\n initializeReexports: boolean | void,\n stringSpecifiers: Set<string>,\n): Map<string, LocalExportMetadata> {\n const bindingKindLookup = new Map();\n\n const programScope = programPath.scope;\n const programChildren = programPath.get(\"body\");\n\n programChildren.forEach((child: NodePath) => {\n let kind: ModuleBindingKind;\n if (child.isImportDeclaration()) {\n kind = \"import\";\n } else {\n if (child.isExportDefaultDeclaration()) {\n child = child.get(\"declaration\");\n }\n if (child.isExportNamedDeclaration()) {\n if (child.node.declaration) {\n child = child.get(\"declaration\");\n } else if (\n initializeReexports &&\n child.node.source &&\n child.get(\"source\").isStringLiteral()\n ) {\n child.get(\"specifiers\").forEach(spec => {\n assertExportSpecifier(spec);\n bindingKindLookup.set(spec.get(\"local\").node.name, \"block\");\n });\n return;\n }\n }\n\n if (child.isFunctionDeclaration()) {\n kind = \"hoisted\";\n } else if (child.isClassDeclaration()) {\n kind = \"block\";\n } else if (child.isVariableDeclaration({ kind: \"var\" })) {\n kind = \"var\";\n } else if (child.isVariableDeclaration()) {\n kind = \"block\";\n } else {\n return;\n }\n }\n\n Object.keys(child.getOuterBindingIdentifiers()).forEach(name => {\n bindingKindLookup.set(name, kind);\n });\n });\n\n const localMetadata = new Map();\n const getLocalMetadata = (idPath: NodePath<t.Identifier>) => {\n const localName = idPath.node.name;\n let metadata = localMetadata.get(localName);\n\n if (!metadata) {\n // If localName is not found in the bindingKindLookup generated\n // from top level declarations, it could be a reference to a var\n // declaration defined within block statement or switch case\n const kind: ModuleBindingKind =\n bindingKindLookup.get(localName) ??\n (programScope.getBinding(localName)?.kind as \"var\" | undefined);\n\n if (kind === undefined) {\n throw idPath.buildCodeFrameError(\n `Exporting local \"${localName}\", which is not declared.`,\n );\n }\n\n metadata = {\n names: [],\n kind,\n };\n localMetadata.set(localName, metadata);\n }\n return metadata;\n };\n\n programChildren.forEach(child => {\n if (\n child.isExportNamedDeclaration() &&\n (initializeReexports || !child.node.source)\n ) {\n if (child.node.declaration) {\n const declaration = child.get(\"declaration\");\n const ids = declaration.getOuterBindingIdentifierPaths();\n Object.keys(ids).forEach(name => {\n if (name === \"__esModule\") {\n throw declaration.buildCodeFrameError(\n 'Illegal export \"__esModule\".',\n );\n }\n getLocalMetadata(ids[name]).names.push(name);\n });\n } else {\n child.get(\"specifiers\").forEach(spec => {\n const local = spec.get(\"local\");\n const exported = spec.get(\"exported\");\n const localMetadata = getLocalMetadata(local);\n const exportName = getExportSpecifierName(exported, stringSpecifiers);\n\n if (exportName === \"__esModule\") {\n throw exported.buildCodeFrameError('Illegal export \"__esModule\".');\n }\n localMetadata.names.push(exportName);\n });\n }\n } else if (child.isExportDefaultDeclaration()) {\n const declaration = child.get(\"declaration\");\n if (\n declaration.isFunctionDeclaration() ||\n declaration.isClassDeclaration()\n ) {\n getLocalMetadata(declaration.get(\"id\")).names.push(\"default\");\n } else {\n // These should have been removed by the nameAnonymousExports() call.\n throw declaration.buildCodeFrameError(\n \"Unexpected default expression export.\",\n );\n }\n }\n });\n return localMetadata;\n}\n\n/**\n * Ensure that all exported values have local binding names.\n */\nfunction nameAnonymousExports(programPath: NodePath<t.Program>) {\n // Name anonymous exported locals.\n programPath.get(\"body\").forEach(child => {\n if (!child.isExportDefaultDeclaration()) return;\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n child.splitExportDeclaration ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.splitExportDeclaration;\n }\n child.splitExportDeclaration();\n });\n}\n\nfunction removeImportExportDeclarations(programPath: NodePath<t.Program>) {\n programPath.get(\"body\").forEach(child => {\n if (child.isImportDeclaration()) {\n child.remove();\n } else if (child.isExportNamedDeclaration()) {\n if (child.node.declaration) {\n // @ts-expect-error todo(flow->ts): avoid mutations\n child.node.declaration._blockHoist = child.node._blockHoist;\n child.replaceWith(child.node.declaration);\n } else {\n child.remove();\n }\n } else if (child.isExportDefaultDeclaration()) {\n // export default foo;\n const declaration = child.get(\"declaration\");\n if (\n declaration.isFunctionDeclaration() ||\n declaration.isClassDeclaration()\n ) {\n // @ts-expect-error todo(flow->ts): avoid mutations\n declaration._blockHoist = child.node._blockHoist;\n child.replaceWith(declaration);\n } else {\n // These should have been removed by the nameAnonymousExports() call.\n throw declaration.buildCodeFrameError(\n \"Unexpected default expression export.\",\n );\n }\n } else if (child.isExportAllDeclaration()) {\n child.remove();\n }\n });\n}\n"],"mappings":";;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAGA,IAAAC,0BAAA,GAAAD,OAAA;AA4DO,SAASE,UAAUA,CAACC,QAAwB,EAAE;EACnD,OAAOA,QAAQ,CAACD,UAAU;AAC5B;AAKO,SAASE,kBAAkBA,CAACC,MAA4B,EAAE;EAC/D,OACEA,MAAM,CAACC,OAAO,CAACC,IAAI,KAAK,CAAC,IACzBF,MAAM,CAACG,gBAAgB,CAACD,IAAI,KAAK,CAAC,IAClCF,MAAM,CAACI,SAAS,CAACF,IAAI,KAAK,CAAC,IAC3BF,MAAM,CAACK,iBAAiB,CAACH,IAAI,KAAK,CAAC,IACnC,CAACF,MAAM,CAACM,WAAW;AAEvB;AAEO,SAASC,2BAA2BA,CACzCC,aAAkB,EACc;EAChC,IACE,OAAOA,aAAa,KAAK,UAAU,IACnCA,aAAa,KAAK,MAAM,IACxBA,aAAa,KAAK,OAAO,IACzBA,aAAa,KAAK,MAAM,EACxB;IACA,MAAM,IAAIC,KAAK,CACb,gHAAgHD,aAAa,IAC/H,CAAC;EACH;EACA,OAAOA,aAAa;AACtB;AAEA,SAASE,oBAAoBA,CAC3BF,aAA4B,EAC5BR,MAAc,EACdW,QAA4B,EAC5B;EACA,IAAI,OAAOH,aAAa,KAAK,UAAU,EAAE;IACvC,OAAOD,2BAA2B,CAACC,aAAa,CAACR,MAAM,EAAEW,QAAQ,CAAC,CAAC;EACrE;EACA,OAAOH,aAAa;AACtB;AAMe,SAASI,8BAA8BA,CACpDC,WAAgC,EAChCC,UAAkB,EAClB;EACEN,aAAa;EACbO,mBAAmB,GAAG,KAAK;EAC3BC,iBAAiB;EACjBC,eAAe,GAAG,KAAK;EACvBN;AAWF,CAAC,EACe;EAChB,IAAI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