Leon4gr45 commited on
Commit
cd6720a
·
verified ·
1 Parent(s): 3530df7

Include updated package-lock.json (part 9)

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/@jridgewell/sourcemap-codec/types/strings.d.mts +16 -0
  2. node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map +1 -0
  3. node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts +7 -0
  4. node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map +1 -0
  5. node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts +7 -0
  6. node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map +1 -0
  7. node_modules/@jridgewell/trace-mapping/LICENSE +19 -0
  8. node_modules/@jridgewell/trace-mapping/README.md +348 -0
  9. node_modules/@jridgewell/trace-mapping/package.json +67 -0
  10. node_modules/@jridgewell/trace-mapping/src/binary-search.ts +115 -0
  11. node_modules/@jridgewell/trace-mapping/src/by-source.ts +41 -0
  12. node_modules/@jridgewell/trace-mapping/src/flatten-map.ts +192 -0
  13. node_modules/@jridgewell/trace-mapping/src/resolve.ts +16 -0
  14. node_modules/@jridgewell/trace-mapping/src/sort.ts +45 -0
  15. node_modules/@jridgewell/trace-mapping/src/sourcemap-segment.ts +23 -0
  16. node_modules/@jridgewell/trace-mapping/src/strip-filename.ts +8 -0
  17. node_modules/@jridgewell/trace-mapping/src/trace-mapping.ts +502 -0
  18. node_modules/@jridgewell/trace-mapping/src/types.ts +114 -0
  19. node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts +33 -0
  20. node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts.map +1 -0
  21. node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts +33 -0
  22. node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts.map +1 -0
  23. node_modules/@jridgewell/trace-mapping/types/by-source.d.cts +4 -0
  24. node_modules/@jridgewell/trace-mapping/types/by-source.d.cts.map +1 -0
  25. node_modules/@jridgewell/trace-mapping/types/by-source.d.mts +4 -0
  26. node_modules/@jridgewell/trace-mapping/types/by-source.d.mts.map +1 -0
  27. node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts +9 -0
  28. node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts.map +1 -0
  29. node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts +9 -0
  30. node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts.map +1 -0
  31. node_modules/@jridgewell/trace-mapping/types/resolve.d.cts +4 -0
  32. node_modules/@jridgewell/trace-mapping/types/resolve.d.cts.map +1 -0
  33. node_modules/@jridgewell/trace-mapping/types/resolve.d.mts +4 -0
  34. node_modules/@jridgewell/trace-mapping/types/resolve.d.mts.map +1 -0
  35. node_modules/@jridgewell/trace-mapping/types/sort.d.cts +4 -0
  36. node_modules/@jridgewell/trace-mapping/types/sort.d.cts.map +1 -0
  37. node_modules/@jridgewell/trace-mapping/types/sort.d.mts +4 -0
  38. node_modules/@jridgewell/trace-mapping/types/sort.d.mts.map +1 -0
  39. node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts +17 -0
  40. node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts.map +1 -0
  41. node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts +17 -0
  42. node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts.map +1 -0
  43. node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts +5 -0
  44. node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts.map +1 -0
  45. node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts +5 -0
  46. node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts.map +1 -0
  47. node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts +80 -0
  48. node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts.map +1 -0
  49. node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts +80 -0
  50. node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts.map +1 -0
node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export declare class StringWriter {
2
+ pos: number;
3
+ private out;
4
+ private buffer;
5
+ write(v: number): void;
6
+ flush(): string;
7
+ }
8
+ export declare class StringReader {
9
+ pos: number;
10
+ private buffer;
11
+ constructor(buffer: string);
12
+ next(): number;
13
+ peek(): number;
14
+ indexOf(char: string): number;
15
+ }
16
+ //# sourceMappingURL=strings.d.ts.map
node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../src/strings.ts"],"names":[],"mappings":"AAuBA,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,MAAM,CAA6B;IAE3C,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAStB,KAAK,IAAI,MAAM;CAIhB;AAED,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,QAAgB,MAAM,CAAS;gBAEnB,MAAM,EAAE,MAAM;IAI1B,IAAI,IAAI,MAAM;IAId,IAAI,IAAI,MAAM;IAId,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAK9B"}
node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ import type { StringReader, StringWriter } from './strings.cts';
2
+ export declare const comma: number;
3
+ export declare const semicolon: number;
4
+ export declare function decodeInteger(reader: StringReader, relative: number): number;
5
+ export declare function encodeInteger(builder: StringWriter, num: number, relative: number): number;
6
+ export declare function hasMoreVlq(reader: StringReader, max: number): boolean;
7
+ //# sourceMappingURL=vlq.d.ts.map
node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"vlq.d.ts","sourceRoot":"","sources":["../src/vlq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5D,eAAO,MAAM,KAAK,QAAoB,CAAC;AACvC,eAAO,MAAM,SAAS,QAAoB,CAAC;AAY3C,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAoB5E;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAY1F;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,WAG3D"}
node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ import type { StringReader, StringWriter } from './strings.mts';
2
+ export declare const comma: number;
3
+ export declare const semicolon: number;
4
+ export declare function decodeInteger(reader: StringReader, relative: number): number;
5
+ export declare function encodeInteger(builder: StringWriter, num: number, relative: number): number;
6
+ export declare function hasMoreVlq(reader: StringReader, max: number): boolean;
7
+ //# sourceMappingURL=vlq.d.ts.map
node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"vlq.d.ts","sourceRoot":"","sources":["../src/vlq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5D,eAAO,MAAM,KAAK,QAAoB,CAAC;AACvC,eAAO,MAAM,SAAS,QAAoB,CAAC;AAY3C,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAoB5E;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAY1F;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,WAG3D"}
node_modules/@jridgewell/trace-mapping/LICENSE ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright 2024 Justin Ridgewell <justin@ridgewell.name>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
node_modules/@jridgewell/trace-mapping/README.md ADDED
@@ -0,0 +1,348 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # @jridgewell/trace-mapping
2
+
3
+ > Trace the original position through a source map
4
+
5
+ `trace-mapping` allows you to take the line and column of an output file and trace it to the
6
+ original location in the source file through a source map.
7
+
8
+ You may already be familiar with the [`source-map`][source-map] package's `SourceMapConsumer`. This
9
+ provides the same `originalPositionFor` and `generatedPositionFor` API, without requiring WASM.
10
+
11
+ ## Installation
12
+
13
+ ```sh
14
+ npm install @jridgewell/trace-mapping
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ ```typescript
20
+ import {
21
+ TraceMap,
22
+ originalPositionFor,
23
+ generatedPositionFor,
24
+ sourceContentFor,
25
+ isIgnored,
26
+ } from '@jridgewell/trace-mapping';
27
+
28
+ const tracer = new TraceMap({
29
+ version: 3,
30
+ sources: ['input.js'],
31
+ sourcesContent: ['content of input.js'],
32
+ names: ['foo'],
33
+ mappings: 'KAyCIA',
34
+ ignoreList: [],
35
+ });
36
+
37
+ // Lines start at line 1, columns at column 0.
38
+ const traced = originalPositionFor(tracer, { line: 1, column: 5 });
39
+ assert.deepEqual(traced, {
40
+ source: 'input.js',
41
+ line: 42,
42
+ column: 4,
43
+ name: 'foo',
44
+ });
45
+
46
+ const content = sourceContentFor(tracer, traced.source);
47
+ assert.strictEqual(content, 'content for input.js');
48
+
49
+ const generated = generatedPositionFor(tracer, {
50
+ source: 'input.js',
51
+ line: 42,
52
+ column: 4,
53
+ });
54
+ assert.deepEqual(generated, {
55
+ line: 1,
56
+ column: 5,
57
+ });
58
+
59
+ const ignored = isIgnored(tracer, 'input.js');
60
+ assert.equal(ignored, false);
61
+ ```
62
+
63
+ We also provide a lower level API to get the actual segment that matches our line and column. Unlike
64
+ `originalPositionFor`, `traceSegment` uses a 0-base for `line`:
65
+
66
+ ```typescript
67
+ import { traceSegment } from '@jridgewell/trace-mapping';
68
+
69
+ // line is 0-base.
70
+ const traced = traceSegment(tracer, /* line */ 0, /* column */ 5);
71
+
72
+ // Segments are [outputColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]
73
+ // Again, line is 0-base and so is sourceLine
74
+ assert.deepEqual(traced, [5, 0, 41, 4, 0]);
75
+ ```
76
+
77
+ ### SectionedSourceMaps
78
+
79
+ The sourcemap spec defines a special `sections` field that's designed to handle concatenation of
80
+ output code with associated sourcemaps. This type of sourcemap is rarely used (no major build tool
81
+ produces it), but if you are hand coding a concatenation you may need it. We provide an `AnyMap`
82
+ helper that can receive either a regular sourcemap or a `SectionedSourceMap` and returns a
83
+ `TraceMap` instance:
84
+
85
+ ```typescript
86
+ import { AnyMap } from '@jridgewell/trace-mapping';
87
+ const fooOutput = 'foo';
88
+ const barOutput = 'bar';
89
+ const output = [fooOutput, barOutput].join('\n');
90
+
91
+ const sectioned = new AnyMap({
92
+ version: 3,
93
+ sections: [
94
+ {
95
+ // 0-base line and column
96
+ offset: { line: 0, column: 0 },
97
+ // fooOutput's sourcemap
98
+ map: {
99
+ version: 3,
100
+ sources: ['foo.js'],
101
+ names: ['foo'],
102
+ mappings: 'AAAAA',
103
+ },
104
+ },
105
+ {
106
+ // barOutput's sourcemap will not affect the first line, only the second
107
+ offset: { line: 1, column: 0 },
108
+ map: {
109
+ version: 3,
110
+ sources: ['bar.js'],
111
+ names: ['bar'],
112
+ mappings: 'AAAAA',
113
+ },
114
+ },
115
+ ],
116
+ });
117
+
118
+ const traced = originalPositionFor(sectioned, {
119
+ line: 2,
120
+ column: 0,
121
+ });
122
+
123
+ assert.deepEqual(traced, {
124
+ source: 'bar.js',
125
+ line: 1,
126
+ column: 0,
127
+ name: 'bar',
128
+ });
129
+ ```
130
+
131
+ ## Benchmarks
132
+
133
+ ```
134
+ node v20.10.0
135
+
136
+ amp.js.map - 45120 segments
137
+
138
+ Memory Usage:
139
+ trace-mapping decoded 414164 bytes
140
+ trace-mapping encoded 6274352 bytes
141
+ source-map-js 10968904 bytes
142
+ source-map-0.6.1 17587160 bytes
143
+ source-map-0.8.0 8812155 bytes
144
+ Chrome dev tools 8672912 bytes
145
+ Smallest memory usage is trace-mapping decoded
146
+
147
+ Init speed:
148
+ trace-mapping: decoded JSON input x 205 ops/sec ±0.19% (88 runs sampled)
149
+ trace-mapping: encoded JSON input x 405 ops/sec ±1.47% (88 runs sampled)
150
+ trace-mapping: decoded Object input x 4,645 ops/sec ±0.15% (98 runs sampled)
151
+ trace-mapping: encoded Object input x 458 ops/sec ±1.63% (91 runs sampled)
152
+ source-map-js: encoded Object input x 75.48 ops/sec ±1.64% (67 runs sampled)
153
+ source-map-0.6.1: encoded Object input x 39.37 ops/sec ±1.44% (53 runs sampled)
154
+ Chrome dev tools: encoded Object input x 150 ops/sec ±1.76% (79 runs sampled)
155
+ Fastest is trace-mapping: decoded Object input
156
+
157
+ Trace speed (random):
158
+ trace-mapping: decoded originalPositionFor x 44,946 ops/sec ±0.16% (99 runs sampled)
159
+ trace-mapping: encoded originalPositionFor x 37,995 ops/sec ±1.81% (89 runs sampled)
160
+ source-map-js: encoded originalPositionFor x 9,230 ops/sec ±1.36% (93 runs sampled)
161
+ source-map-0.6.1: encoded originalPositionFor x 8,057 ops/sec ±0.84% (96 runs sampled)
162
+ source-map-0.8.0: encoded originalPositionFor x 28,198 ops/sec ±1.12% (91 runs sampled)
163
+ Chrome dev tools: encoded originalPositionFor x 46,276 ops/sec ±1.35% (95 runs sampled)
164
+ Fastest is Chrome dev tools: encoded originalPositionFor
165
+
166
+ Trace speed (ascending):
167
+ trace-mapping: decoded originalPositionFor x 204,406 ops/sec ±0.19% (97 runs sampled)
168
+ trace-mapping: encoded originalPositionFor x 196,695 ops/sec ±0.24% (99 runs sampled)
169
+ source-map-js: encoded originalPositionFor x 11,948 ops/sec ±0.94% (99 runs sampled)
170
+ source-map-0.6.1: encoded originalPositionFor x 10,730 ops/sec ±0.36% (100 runs sampled)
171
+ source-map-0.8.0: encoded originalPositionFor x 51,427 ops/sec ±0.21% (98 runs sampled)
172
+ Chrome dev tools: encoded originalPositionFor x 162,615 ops/sec ±0.18% (98 runs sampled)
173
+ Fastest is trace-mapping: decoded originalPositionFor
174
+
175
+
176
+ ***
177
+
178
+
179
+ babel.min.js.map - 347793 segments
180
+
181
+ Memory Usage:
182
+ trace-mapping decoded 18504 bytes
183
+ trace-mapping encoded 35428008 bytes
184
+ source-map-js 51676808 bytes
185
+ source-map-0.6.1 63367136 bytes
186
+ source-map-0.8.0 43158400 bytes
187
+ Chrome dev tools 50721552 bytes
188
+ Smallest memory usage is trace-mapping decoded
189
+
190
+ Init speed:
191
+ trace-mapping: decoded JSON input x 17.82 ops/sec ±6.35% (35 runs sampled)
192
+ trace-mapping: encoded JSON input x 31.57 ops/sec ±7.50% (43 runs sampled)
193
+ trace-mapping: decoded Object input x 867 ops/sec ±0.74% (94 runs sampled)
194
+ trace-mapping: encoded Object input x 33.83 ops/sec ±7.66% (46 runs sampled)
195
+ source-map-js: encoded Object input x 6.58 ops/sec ±3.31% (20 runs sampled)
196
+ source-map-0.6.1: encoded Object input x 4.23 ops/sec ±3.43% (15 runs sampled)
197
+ Chrome dev tools: encoded Object input x 22.14 ops/sec ±3.79% (41 runs sampled)
198
+ Fastest is trace-mapping: decoded Object input
199
+
200
+ Trace speed (random):
201
+ trace-mapping: decoded originalPositionFor x 78,234 ops/sec ±1.48% (29 runs sampled)
202
+ trace-mapping: encoded originalPositionFor x 60,761 ops/sec ±1.35% (21 runs sampled)
203
+ source-map-js: encoded originalPositionFor x 51,448 ops/sec ±2.17% (89 runs sampled)
204
+ source-map-0.6.1: encoded originalPositionFor x 47,221 ops/sec ±1.99% (15 runs sampled)
205
+ source-map-0.8.0: encoded originalPositionFor x 84,002 ops/sec ±1.45% (27 runs sampled)
206
+ Chrome dev tools: encoded originalPositionFor x 106,457 ops/sec ±1.38% (37 runs sampled)
207
+ Fastest is Chrome dev tools: encoded originalPositionFor
208
+
209
+ Trace speed (ascending):
210
+ trace-mapping: decoded originalPositionFor x 930,943 ops/sec ±0.25% (99 runs sampled)
211
+ trace-mapping: encoded originalPositionFor x 843,545 ops/sec ±0.34% (97 runs sampled)
212
+ source-map-js: encoded originalPositionFor x 114,510 ops/sec ±1.37% (36 runs sampled)
213
+ source-map-0.6.1: encoded originalPositionFor x 87,412 ops/sec ±0.72% (92 runs sampled)
214
+ source-map-0.8.0: encoded originalPositionFor x 197,709 ops/sec ±0.89% (59 runs sampled)
215
+ Chrome dev tools: encoded originalPositionFor x 688,983 ops/sec ±0.33% (98 runs sampled)
216
+ Fastest is trace-mapping: decoded originalPositionFor
217
+
218
+
219
+ ***
220
+
221
+
222
+ preact.js.map - 1992 segments
223
+
224
+ Memory Usage:
225
+ trace-mapping decoded 33136 bytes
226
+ trace-mapping encoded 254240 bytes
227
+ source-map-js 837488 bytes
228
+ source-map-0.6.1 961928 bytes
229
+ source-map-0.8.0 54384 bytes
230
+ Chrome dev tools 709680 bytes
231
+ Smallest memory usage is trace-mapping decoded
232
+
233
+ Init speed:
234
+ trace-mapping: decoded JSON input x 3,709 ops/sec ±0.13% (99 runs sampled)
235
+ trace-mapping: encoded JSON input x 6,447 ops/sec ±0.22% (101 runs sampled)
236
+ trace-mapping: decoded Object input x 83,062 ops/sec ±0.23% (100 runs sampled)
237
+ trace-mapping: encoded Object input x 14,980 ops/sec ±0.28% (100 runs sampled)
238
+ source-map-js: encoded Object input x 2,544 ops/sec ±0.16% (99 runs sampled)
239
+ source-map-0.6.1: encoded Object input x 1,221 ops/sec ±0.37% (97 runs sampled)
240
+ Chrome dev tools: encoded Object input x 4,241 ops/sec ±0.39% (93 runs sampled)
241
+ Fastest is trace-mapping: decoded Object input
242
+
243
+ Trace speed (random):
244
+ trace-mapping: decoded originalPositionFor x 91,028 ops/sec ±0.14% (94 runs sampled)
245
+ trace-mapping: encoded originalPositionFor x 84,348 ops/sec ±0.26% (98 runs sampled)
246
+ source-map-js: encoded originalPositionFor x 26,998 ops/sec ±0.23% (98 runs sampled)
247
+ source-map-0.6.1: encoded originalPositionFor x 18,049 ops/sec ±0.26% (100 runs sampled)
248
+ source-map-0.8.0: encoded originalPositionFor x 41,916 ops/sec ±0.28% (98 runs sampled)
249
+ Chrome dev tools: encoded originalPositionFor x 88,616 ops/sec ±0.14% (98 runs sampled)
250
+ Fastest is trace-mapping: decoded originalPositionFor
251
+
252
+ Trace speed (ascending):
253
+ trace-mapping: decoded originalPositionFor x 319,960 ops/sec ±0.16% (100 runs sampled)
254
+ trace-mapping: encoded originalPositionFor x 302,153 ops/sec ±0.18% (100 runs sampled)
255
+ source-map-js: encoded originalPositionFor x 35,574 ops/sec ±0.19% (100 runs sampled)
256
+ source-map-0.6.1: encoded originalPositionFor x 19,943 ops/sec ±0.12% (101 runs sampled)
257
+ source-map-0.8.0: encoded originalPositionFor x 54,648 ops/sec ±0.20% (99 runs sampled)
258
+ Chrome dev tools: encoded originalPositionFor x 278,319 ops/sec ±0.17% (102 runs sampled)
259
+ Fastest is trace-mapping: decoded originalPositionFor
260
+
261
+
262
+ ***
263
+
264
+
265
+ react.js.map - 5726 segments
266
+
267
+ Memory Usage:
268
+ trace-mapping decoded 10872 bytes
269
+ trace-mapping encoded 681512 bytes
270
+ source-map-js 2563944 bytes
271
+ source-map-0.6.1 2150864 bytes
272
+ source-map-0.8.0 88680 bytes
273
+ Chrome dev tools 1149576 bytes
274
+ Smallest memory usage is trace-mapping decoded
275
+
276
+ Init speed:
277
+ trace-mapping: decoded JSON input x 1,887 ops/sec ±0.28% (99 runs sampled)
278
+ trace-mapping: encoded JSON input x 4,749 ops/sec ±0.48% (97 runs sampled)
279
+ trace-mapping: decoded Object input x 74,236 ops/sec ±0.11% (99 runs sampled)
280
+ trace-mapping: encoded Object input x 5,752 ops/sec ±0.38% (100 runs sampled)
281
+ source-map-js: encoded Object input x 806 ops/sec ±0.19% (97 runs sampled)
282
+ source-map-0.6.1: encoded Object input x 418 ops/sec ±0.33% (94 runs sampled)
283
+ Chrome dev tools: encoded Object input x 1,524 ops/sec ±0.57% (92 runs sampled)
284
+ Fastest is trace-mapping: decoded Object input
285
+
286
+ Trace speed (random):
287
+ trace-mapping: decoded originalPositionFor x 620,201 ops/sec ±0.33% (96 runs sampled)
288
+ trace-mapping: encoded originalPositionFor x 579,548 ops/sec ±0.35% (97 runs sampled)
289
+ source-map-js: encoded originalPositionFor x 230,983 ops/sec ±0.62% (54 runs sampled)
290
+ source-map-0.6.1: encoded originalPositionFor x 158,145 ops/sec ±0.80% (46 runs sampled)
291
+ source-map-0.8.0: encoded originalPositionFor x 343,801 ops/sec ±0.55% (96 runs sampled)
292
+ Chrome dev tools: encoded originalPositionFor x 659,649 ops/sec ±0.49% (98 runs sampled)
293
+ Fastest is Chrome dev tools: encoded originalPositionFor
294
+
295
+ Trace speed (ascending):
296
+ trace-mapping: decoded originalPositionFor x 2,368,079 ops/sec ±0.32% (98 runs sampled)
297
+ trace-mapping: encoded originalPositionFor x 2,134,039 ops/sec ±2.72% (87 runs sampled)
298
+ source-map-js: encoded originalPositionFor x 290,120 ops/sec ±2.49% (82 runs sampled)
299
+ source-map-0.6.1: encoded originalPositionFor x 187,613 ops/sec ±0.86% (49 runs sampled)
300
+ source-map-0.8.0: encoded originalPositionFor x 479,569 ops/sec ±0.65% (96 runs sampled)
301
+ Chrome dev tools: encoded originalPositionFor x 2,048,414 ops/sec ±0.24% (98 runs sampled)
302
+ Fastest is trace-mapping: decoded originalPositionFor
303
+
304
+
305
+ ***
306
+
307
+
308
+ vscode.map - 2141001 segments
309
+
310
+ Memory Usage:
311
+ trace-mapping decoded 5206584 bytes
312
+ trace-mapping encoded 208370336 bytes
313
+ source-map-js 278493008 bytes
314
+ source-map-0.6.1 391564048 bytes
315
+ source-map-0.8.0 257508787 bytes
316
+ Chrome dev tools 291053000 bytes
317
+ Smallest memory usage is trace-mapping decoded
318
+
319
+ Init speed:
320
+ trace-mapping: decoded JSON input x 1.63 ops/sec ±33.88% (9 runs sampled)
321
+ trace-mapping: encoded JSON input x 3.29 ops/sec ±36.13% (13 runs sampled)
322
+ trace-mapping: decoded Object input x 103 ops/sec ±0.93% (77 runs sampled)
323
+ trace-mapping: encoded Object input x 5.42 ops/sec ±28.54% (19 runs sampled)
324
+ source-map-js: encoded Object input x 1.07 ops/sec ±13.84% (7 runs sampled)
325
+ source-map-0.6.1: encoded Object input x 0.60 ops/sec ±2.43% (6 runs sampled)
326
+ Chrome dev tools: encoded Object input x 2.61 ops/sec ±22.00% (11 runs sampled)
327
+ Fastest is trace-mapping: decoded Object input
328
+
329
+ Trace speed (random):
330
+ trace-mapping: decoded originalPositionFor x 257,019 ops/sec ±0.97% (93 runs sampled)
331
+ trace-mapping: encoded originalPositionFor x 179,163 ops/sec ±0.83% (92 runs sampled)
332
+ source-map-js: encoded originalPositionFor x 73,337 ops/sec ±1.35% (87 runs sampled)
333
+ source-map-0.6.1: encoded originalPositionFor x 38,797 ops/sec ±1.66% (88 runs sampled)
334
+ source-map-0.8.0: encoded originalPositionFor x 107,758 ops/sec ±1.94% (45 runs sampled)
335
+ Chrome dev tools: encoded originalPositionFor x 188,550 ops/sec ±1.85% (79 runs sampled)
336
+ Fastest is trace-mapping: decoded originalPositionFor
337
+
338
+ Trace speed (ascending):
339
+ trace-mapping: decoded originalPositionFor x 447,621 ops/sec ±3.64% (94 runs sampled)
340
+ trace-mapping: encoded originalPositionFor x 323,698 ops/sec ±5.20% (88 runs sampled)
341
+ source-map-js: encoded originalPositionFor x 78,387 ops/sec ±1.69% (89 runs sampled)
342
+ source-map-0.6.1: encoded originalPositionFor x 41,016 ops/sec ±3.01% (25 runs sampled)
343
+ source-map-0.8.0: encoded originalPositionFor x 124,204 ops/sec ±0.90% (92 runs sampled)
344
+ Chrome dev tools: encoded originalPositionFor x 230,087 ops/sec ±2.61% (93 runs sampled)
345
+ Fastest is trace-mapping: decoded originalPositionFor
346
+ ```
347
+
348
+ [source-map]: https://www.npmjs.com/package/source-map
node_modules/@jridgewell/trace-mapping/package.json ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@jridgewell/trace-mapping",
3
+ "version": "0.3.31",
4
+ "description": "Trace the original position through a source map",
5
+ "keywords": [
6
+ "source",
7
+ "map"
8
+ ],
9
+ "main": "dist/trace-mapping.umd.js",
10
+ "module": "dist/trace-mapping.mjs",
11
+ "types": "types/trace-mapping.d.cts",
12
+ "files": [
13
+ "dist",
14
+ "src",
15
+ "types"
16
+ ],
17
+ "exports": {
18
+ ".": [
19
+ {
20
+ "import": {
21
+ "types": "./types/trace-mapping.d.mts",
22
+ "default": "./dist/trace-mapping.mjs"
23
+ },
24
+ "default": {
25
+ "types": "./types/trace-mapping.d.cts",
26
+ "default": "./dist/trace-mapping.umd.js"
27
+ }
28
+ },
29
+ "./dist/trace-mapping.umd.js"
30
+ ],
31
+ "./package.json": "./package.json"
32
+ },
33
+ "scripts": {
34
+ "benchmark": "run-s build:code benchmark:*",
35
+ "benchmark:install": "cd benchmark && npm install",
36
+ "benchmark:only": "node --expose-gc benchmark/index.mjs",
37
+ "build": "run-s -n build:code build:types",
38
+ "build:code": "node ../../esbuild.mjs trace-mapping.ts",
39
+ "build:types": "run-s build:types:force build:types:emit build:types:mts",
40
+ "build:types:force": "rimraf tsconfig.build.tsbuildinfo",
41
+ "build:types:emit": "tsc --project tsconfig.build.json",
42
+ "build:types:mts": "node ../../mts-types.mjs",
43
+ "clean": "run-s -n clean:code clean:types",
44
+ "clean:code": "tsc --build --clean tsconfig.build.json",
45
+ "clean:types": "rimraf dist types",
46
+ "test": "run-s -n test:types test:only test:format",
47
+ "test:format": "prettier --check '{src,test}/**/*.ts'",
48
+ "test:only": "mocha",
49
+ "test:types": "eslint '{src,test}/**/*.ts'",
50
+ "lint": "run-s -n lint:types lint:format",
51
+ "lint:format": "npm run test:format -- --write",
52
+ "lint:types": "npm run test:types -- --fix",
53
+ "prepublishOnly": "npm run-s -n build test"
54
+ },
55
+ "homepage": "https://github.com/jridgewell/sourcemaps/tree/main/packages/trace-mapping",
56
+ "repository": {
57
+ "type": "git",
58
+ "url": "git+https://github.com/jridgewell/sourcemaps.git",
59
+ "directory": "packages/trace-mapping"
60
+ },
61
+ "author": "Justin Ridgewell <justin@ridgewell.name>",
62
+ "license": "MIT",
63
+ "dependencies": {
64
+ "@jridgewell/resolve-uri": "^3.1.0",
65
+ "@jridgewell/sourcemap-codec": "^1.4.14"
66
+ }
67
+ }
node_modules/@jridgewell/trace-mapping/src/binary-search.ts ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment';
2
+ import { COLUMN } from './sourcemap-segment';
3
+
4
+ export type MemoState = {
5
+ lastKey: number;
6
+ lastNeedle: number;
7
+ lastIndex: number;
8
+ };
9
+
10
+ export let found = false;
11
+
12
+ /**
13
+ * A binary search implementation that returns the index if a match is found.
14
+ * If no match is found, then the left-index (the index associated with the item that comes just
15
+ * before the desired index) is returned. To maintain proper sort order, a splice would happen at
16
+ * the next index:
17
+ *
18
+ * ```js
19
+ * const array = [1, 3];
20
+ * const needle = 2;
21
+ * const index = binarySearch(array, needle, (item, needle) => item - needle);
22
+ *
23
+ * assert.equal(index, 0);
24
+ * array.splice(index + 1, 0, needle);
25
+ * assert.deepEqual(array, [1, 2, 3]);
26
+ * ```
27
+ */
28
+ export function binarySearch(
29
+ haystack: SourceMapSegment[] | ReverseSegment[],
30
+ needle: number,
31
+ low: number,
32
+ high: number,
33
+ ): number {
34
+ while (low <= high) {
35
+ const mid = low + ((high - low) >> 1);
36
+ const cmp = haystack[mid][COLUMN] - needle;
37
+
38
+ if (cmp === 0) {
39
+ found = true;
40
+ return mid;
41
+ }
42
+
43
+ if (cmp < 0) {
44
+ low = mid + 1;
45
+ } else {
46
+ high = mid - 1;
47
+ }
48
+ }
49
+
50
+ found = false;
51
+ return low - 1;
52
+ }
53
+
54
+ export function upperBound(
55
+ haystack: SourceMapSegment[] | ReverseSegment[],
56
+ needle: number,
57
+ index: number,
58
+ ): number {
59
+ for (let i = index + 1; i < haystack.length; index = i++) {
60
+ if (haystack[i][COLUMN] !== needle) break;
61
+ }
62
+ return index;
63
+ }
64
+
65
+ export function lowerBound(
66
+ haystack: SourceMapSegment[] | ReverseSegment[],
67
+ needle: number,
68
+ index: number,
69
+ ): number {
70
+ for (let i = index - 1; i >= 0; index = i--) {
71
+ if (haystack[i][COLUMN] !== needle) break;
72
+ }
73
+ return index;
74
+ }
75
+
76
+ export function memoizedState(): MemoState {
77
+ return {
78
+ lastKey: -1,
79
+ lastNeedle: -1,
80
+ lastIndex: -1,
81
+ };
82
+ }
83
+
84
+ /**
85
+ * This overly complicated beast is just to record the last tested line/column and the resulting
86
+ * index, allowing us to skip a few tests if mappings are monotonically increasing.
87
+ */
88
+ export function memoizedBinarySearch(
89
+ haystack: SourceMapSegment[] | ReverseSegment[],
90
+ needle: number,
91
+ state: MemoState,
92
+ key: number,
93
+ ): number {
94
+ const { lastKey, lastNeedle, lastIndex } = state;
95
+
96
+ let low = 0;
97
+ let high = haystack.length - 1;
98
+ if (key === lastKey) {
99
+ if (needle === lastNeedle) {
100
+ found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;
101
+ return lastIndex;
102
+ }
103
+
104
+ if (needle >= lastNeedle) {
105
+ // lastIndex may be -1 if the previous needle was not found.
106
+ low = lastIndex === -1 ? 0 : lastIndex;
107
+ } else {
108
+ high = lastIndex;
109
+ }
110
+ }
111
+ state.lastKey = key;
112
+ state.lastNeedle = needle;
113
+
114
+ return (state.lastIndex = binarySearch(haystack, needle, low, high));
115
+ }
node_modules/@jridgewell/trace-mapping/src/by-source.ts ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { COLUMN, SOURCES_INDEX, SOURCE_LINE, SOURCE_COLUMN } from './sourcemap-segment';
2
+ import { sortComparator } from './sort';
3
+
4
+ import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment';
5
+
6
+ export type Source = ReverseSegment[][];
7
+
8
+ // Rebuilds the original source files, with mappings that are ordered by source line/column instead
9
+ // of generated line/column.
10
+ export default function buildBySources(
11
+ decoded: readonly SourceMapSegment[][],
12
+ memos: unknown[],
13
+ ): Source[] {
14
+ const sources: Source[] = memos.map(() => []);
15
+
16
+ for (let i = 0; i < decoded.length; i++) {
17
+ const line = decoded[i];
18
+ for (let j = 0; j < line.length; j++) {
19
+ const seg = line[j];
20
+ if (seg.length === 1) continue;
21
+
22
+ const sourceIndex = seg[SOURCES_INDEX];
23
+ const sourceLine = seg[SOURCE_LINE];
24
+ const sourceColumn = seg[SOURCE_COLUMN];
25
+
26
+ const source = sources[sourceIndex];
27
+ const segs = (source[sourceLine] ||= []);
28
+ segs.push([sourceColumn, i, seg[COLUMN]]);
29
+ }
30
+ }
31
+
32
+ for (let i = 0; i < sources.length; i++) {
33
+ const source = sources[i];
34
+ for (let j = 0; j < source.length; j++) {
35
+ const line = source[j];
36
+ if (line) line.sort(sortComparator);
37
+ }
38
+ }
39
+
40
+ return sources;
41
+ }
node_modules/@jridgewell/trace-mapping/src/flatten-map.ts ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { TraceMap, presortedDecodedMap, decodedMappings } from './trace-mapping';
2
+ import {
3
+ COLUMN,
4
+ SOURCES_INDEX,
5
+ SOURCE_LINE,
6
+ SOURCE_COLUMN,
7
+ NAMES_INDEX,
8
+ } from './sourcemap-segment';
9
+ import { parse } from './types';
10
+
11
+ import type {
12
+ DecodedSourceMap,
13
+ DecodedSourceMapXInput,
14
+ EncodedSourceMapXInput,
15
+ SectionedSourceMapXInput,
16
+ SectionedSourceMapInput,
17
+ SectionXInput,
18
+ Ro,
19
+ } from './types';
20
+ import type { SourceMapSegment } from './sourcemap-segment';
21
+
22
+ type FlattenMap = {
23
+ new (map: Ro<SectionedSourceMapInput>, mapUrl?: string | null): TraceMap;
24
+ (map: Ro<SectionedSourceMapInput>, mapUrl?: string | null): TraceMap;
25
+ };
26
+
27
+ export const FlattenMap: FlattenMap = function (map, mapUrl) {
28
+ const parsed = parse(map as SectionedSourceMapInput);
29
+
30
+ if (!('sections' in parsed)) {
31
+ return new TraceMap(parsed as DecodedSourceMapXInput | EncodedSourceMapXInput, mapUrl);
32
+ }
33
+
34
+ const mappings: SourceMapSegment[][] = [];
35
+ const sources: string[] = [];
36
+ const sourcesContent: (string | null)[] = [];
37
+ const names: string[] = [];
38
+ const ignoreList: number[] = [];
39
+
40
+ recurse(
41
+ parsed,
42
+ mapUrl,
43
+ mappings,
44
+ sources,
45
+ sourcesContent,
46
+ names,
47
+ ignoreList,
48
+ 0,
49
+ 0,
50
+ Infinity,
51
+ Infinity,
52
+ );
53
+
54
+ const joined: DecodedSourceMap = {
55
+ version: 3,
56
+ file: parsed.file,
57
+ names,
58
+ sources,
59
+ sourcesContent,
60
+ mappings,
61
+ ignoreList,
62
+ };
63
+
64
+ return presortedDecodedMap(joined);
65
+ } as FlattenMap;
66
+
67
+ function recurse(
68
+ input: SectionedSourceMapXInput,
69
+ mapUrl: string | null | undefined,
70
+ mappings: SourceMapSegment[][],
71
+ sources: string[],
72
+ sourcesContent: (string | null)[],
73
+ names: string[],
74
+ ignoreList: number[],
75
+ lineOffset: number,
76
+ columnOffset: number,
77
+ stopLine: number,
78
+ stopColumn: number,
79
+ ) {
80
+ const { sections } = input;
81
+ for (let i = 0; i < sections.length; i++) {
82
+ const { map, offset } = sections[i];
83
+
84
+ let sl = stopLine;
85
+ let sc = stopColumn;
86
+ if (i + 1 < sections.length) {
87
+ const nextOffset = sections[i + 1].offset;
88
+ sl = Math.min(stopLine, lineOffset + nextOffset.line);
89
+
90
+ if (sl === stopLine) {
91
+ sc = Math.min(stopColumn, columnOffset + nextOffset.column);
92
+ } else if (sl < stopLine) {
93
+ sc = columnOffset + nextOffset.column;
94
+ }
95
+ }
96
+
97
+ addSection(
98
+ map,
99
+ mapUrl,
100
+ mappings,
101
+ sources,
102
+ sourcesContent,
103
+ names,
104
+ ignoreList,
105
+ lineOffset + offset.line,
106
+ columnOffset + offset.column,
107
+ sl,
108
+ sc,
109
+ );
110
+ }
111
+ }
112
+
113
+ function addSection(
114
+ input: SectionXInput['map'],
115
+ mapUrl: string | null | undefined,
116
+ mappings: SourceMapSegment[][],
117
+ sources: string[],
118
+ sourcesContent: (string | null)[],
119
+ names: string[],
120
+ ignoreList: number[],
121
+ lineOffset: number,
122
+ columnOffset: number,
123
+ stopLine: number,
124
+ stopColumn: number,
125
+ ) {
126
+ const parsed = parse(input);
127
+ if ('sections' in parsed) return recurse(...(arguments as unknown as Parameters<typeof recurse>));
128
+
129
+ const map = new TraceMap(parsed, mapUrl);
130
+ const sourcesOffset = sources.length;
131
+ const namesOffset = names.length;
132
+ const decoded = decodedMappings(map);
133
+ const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map;
134
+
135
+ append(sources, resolvedSources);
136
+ append(names, map.names);
137
+
138
+ if (contents) append(sourcesContent, contents);
139
+ else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null);
140
+
141
+ if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset);
142
+
143
+ for (let i = 0; i < decoded.length; i++) {
144
+ const lineI = lineOffset + i;
145
+
146
+ // We can only add so many lines before we step into the range that the next section's map
147
+ // controls. When we get to the last line, then we'll start checking the segments to see if
148
+ // they've crossed into the column range. But it may not have any columns that overstep, so we
149
+ // still need to check that we don't overstep lines, too.
150
+ if (lineI > stopLine) return;
151
+
152
+ // The out line may already exist in mappings (if we're continuing the line started by a
153
+ // previous section). Or, we may have jumped ahead several lines to start this section.
154
+ const out = getLine(mappings, lineI);
155
+ // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the
156
+ // map can be multiple lines), it doesn't.
157
+ const cOffset = i === 0 ? columnOffset : 0;
158
+
159
+ const line = decoded[i];
160
+ for (let j = 0; j < line.length; j++) {
161
+ const seg = line[j];
162
+ const column = cOffset + seg[COLUMN];
163
+
164
+ // If this segment steps into the column range that the next section's map controls, we need
165
+ // to stop early.
166
+ if (lineI === stopLine && column >= stopColumn) return;
167
+
168
+ if (seg.length === 1) {
169
+ out.push([column]);
170
+ continue;
171
+ }
172
+
173
+ const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];
174
+ const sourceLine = seg[SOURCE_LINE];
175
+ const sourceColumn = seg[SOURCE_COLUMN];
176
+ out.push(
177
+ seg.length === 4
178
+ ? [column, sourcesIndex, sourceLine, sourceColumn]
179
+ : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]],
180
+ );
181
+ }
182
+ }
183
+ }
184
+
185
+ function append<T>(arr: T[], other: T[]) {
186
+ for (let i = 0; i < other.length; i++) arr.push(other[i]);
187
+ }
188
+
189
+ function getLine<T>(arr: T[][], index: number): T[] {
190
+ for (let i = arr.length; i <= index; i++) arr[i] = [];
191
+ return arr[index];
192
+ }
node_modules/@jridgewell/trace-mapping/src/resolve.ts ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import resolveUri from '@jridgewell/resolve-uri';
2
+ import stripFilename from './strip-filename';
3
+
4
+ type Resolve = (source: string | null) => string;
5
+ export default function resolver(
6
+ mapUrl: string | null | undefined,
7
+ sourceRoot: string | undefined,
8
+ ): Resolve {
9
+ const from = stripFilename(mapUrl);
10
+ // The sourceRoot is always treated as a directory, if it's not empty.
11
+ // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327
12
+ // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401
13
+ const prefix = sourceRoot ? sourceRoot + '/' : '';
14
+
15
+ return (source) => resolveUri(prefix + (source || ''), from);
16
+ }
node_modules/@jridgewell/trace-mapping/src/sort.ts ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { COLUMN } from './sourcemap-segment';
2
+
3
+ import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment';
4
+
5
+ export default function maybeSort(
6
+ mappings: SourceMapSegment[][],
7
+ owned: boolean,
8
+ ): SourceMapSegment[][] {
9
+ const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
10
+ if (unsortedIndex === mappings.length) return mappings;
11
+
12
+ // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If
13
+ // not, we do not want to modify the consumer's input array.
14
+ if (!owned) mappings = mappings.slice();
15
+
16
+ for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {
17
+ mappings[i] = sortSegments(mappings[i], owned);
18
+ }
19
+ return mappings;
20
+ }
21
+
22
+ function nextUnsortedSegmentLine(mappings: SourceMapSegment[][], start: number): number {
23
+ for (let i = start; i < mappings.length; i++) {
24
+ if (!isSorted(mappings[i])) return i;
25
+ }
26
+ return mappings.length;
27
+ }
28
+
29
+ function isSorted(line: SourceMapSegment[]): boolean {
30
+ for (let j = 1; j < line.length; j++) {
31
+ if (line[j][COLUMN] < line[j - 1][COLUMN]) {
32
+ return false;
33
+ }
34
+ }
35
+ return true;
36
+ }
37
+
38
+ function sortSegments(line: SourceMapSegment[], owned: boolean): SourceMapSegment[] {
39
+ if (!owned) line = line.slice();
40
+ return line.sort(sortComparator);
41
+ }
42
+
43
+ export function sortComparator<T extends SourceMapSegment | ReverseSegment>(a: T, b: T): number {
44
+ return a[COLUMN] - b[COLUMN];
45
+ }
node_modules/@jridgewell/trace-mapping/src/sourcemap-segment.ts ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ type GeneratedColumn = number;
2
+ type SourcesIndex = number;
3
+ type SourceLine = number;
4
+ type SourceColumn = number;
5
+ type NamesIndex = number;
6
+
7
+ type GeneratedLine = number;
8
+
9
+ export type SourceMapSegment =
10
+ | [GeneratedColumn]
11
+ | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn]
12
+ | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];
13
+
14
+ export type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn];
15
+
16
+ export const COLUMN = 0;
17
+ export const SOURCES_INDEX = 1;
18
+ export const SOURCE_LINE = 2;
19
+ export const SOURCE_COLUMN = 3;
20
+ export const NAMES_INDEX = 4;
21
+
22
+ export const REV_GENERATED_LINE = 1;
23
+ export const REV_GENERATED_COLUMN = 2;
node_modules/@jridgewell/trace-mapping/src/strip-filename.ts ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Removes everything after the last "/", but leaves the slash.
3
+ */
4
+ export default function stripFilename(path: string | undefined | null): string {
5
+ if (!path) return '';
6
+ const index = path.lastIndexOf('/');
7
+ return path.slice(0, index + 1);
8
+ }
node_modules/@jridgewell/trace-mapping/src/trace-mapping.ts ADDED
@@ -0,0 +1,502 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { encode, decode } from '@jridgewell/sourcemap-codec';
2
+
3
+ import resolver from './resolve';
4
+ import maybeSort from './sort';
5
+ import buildBySources from './by-source';
6
+ import {
7
+ memoizedState,
8
+ memoizedBinarySearch,
9
+ upperBound,
10
+ lowerBound,
11
+ found as bsFound,
12
+ } from './binary-search';
13
+ import {
14
+ COLUMN,
15
+ SOURCES_INDEX,
16
+ SOURCE_LINE,
17
+ SOURCE_COLUMN,
18
+ NAMES_INDEX,
19
+ REV_GENERATED_LINE,
20
+ REV_GENERATED_COLUMN,
21
+ } from './sourcemap-segment';
22
+ import { parse } from './types';
23
+
24
+ import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment';
25
+ import type {
26
+ SourceMapV3,
27
+ DecodedSourceMap,
28
+ EncodedSourceMap,
29
+ InvalidOriginalMapping,
30
+ OriginalMapping,
31
+ InvalidGeneratedMapping,
32
+ GeneratedMapping,
33
+ SourceMapInput,
34
+ Needle,
35
+ SourceNeedle,
36
+ SourceMap,
37
+ EachMapping,
38
+ Bias,
39
+ XInput,
40
+ SectionedSourceMap,
41
+ Ro,
42
+ } from './types';
43
+ import type { Source } from './by-source';
44
+ import type { MemoState } from './binary-search';
45
+
46
+ export type { SourceMapSegment } from './sourcemap-segment';
47
+ export type {
48
+ SourceMap,
49
+ DecodedSourceMap,
50
+ EncodedSourceMap,
51
+ Section,
52
+ SectionedSourceMap,
53
+ SourceMapV3,
54
+ Bias,
55
+ EachMapping,
56
+ GeneratedMapping,
57
+ InvalidGeneratedMapping,
58
+ InvalidOriginalMapping,
59
+ Needle,
60
+ OriginalMapping,
61
+ OriginalMapping as Mapping,
62
+ SectionedSourceMapInput,
63
+ SourceMapInput,
64
+ SourceNeedle,
65
+ XInput,
66
+ EncodedSourceMapXInput,
67
+ DecodedSourceMapXInput,
68
+ SectionedSourceMapXInput,
69
+ SectionXInput,
70
+ } from './types';
71
+
72
+ interface PublicMap {
73
+ _encoded: TraceMap['_encoded'];
74
+ _decoded: TraceMap['_decoded'];
75
+ _decodedMemo: TraceMap['_decodedMemo'];
76
+ _bySources: TraceMap['_bySources'];
77
+ _bySourceMemos: TraceMap['_bySourceMemos'];
78
+ }
79
+
80
+ const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)';
81
+ const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)';
82
+
83
+ export const LEAST_UPPER_BOUND = -1;
84
+ export const GREATEST_LOWER_BOUND = 1;
85
+
86
+ export { FlattenMap, FlattenMap as AnyMap } from './flatten-map';
87
+
88
+ export class TraceMap implements SourceMap {
89
+ declare version: SourceMapV3['version'];
90
+ declare file: SourceMapV3['file'];
91
+ declare names: SourceMapV3['names'];
92
+ declare sourceRoot: SourceMapV3['sourceRoot'];
93
+ declare sources: SourceMapV3['sources'];
94
+ declare sourcesContent: SourceMapV3['sourcesContent'];
95
+ declare ignoreList: SourceMapV3['ignoreList'];
96
+
97
+ declare resolvedSources: string[];
98
+ declare private _encoded: string | undefined;
99
+
100
+ declare private _decoded: SourceMapSegment[][] | undefined;
101
+ declare private _decodedMemo: MemoState;
102
+
103
+ declare private _bySources: Source[] | undefined;
104
+ declare private _bySourceMemos: MemoState[] | undefined;
105
+
106
+ constructor(map: Ro<SourceMapInput>, mapUrl?: string | null) {
107
+ const isString = typeof map === 'string';
108
+ if (!isString && (map as unknown as { _decodedMemo: any })._decodedMemo) return map as TraceMap;
109
+
110
+ const parsed = parse(map as Exclude<SourceMapInput, TraceMap>);
111
+
112
+ const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
113
+ this.version = version;
114
+ this.file = file;
115
+ this.names = names || [];
116
+ this.sourceRoot = sourceRoot;
117
+ this.sources = sources;
118
+ this.sourcesContent = sourcesContent;
119
+ this.ignoreList = parsed.ignoreList || (parsed as XInput).x_google_ignoreList || undefined;
120
+
121
+ const resolve = resolver(mapUrl, sourceRoot);
122
+ this.resolvedSources = sources.map(resolve);
123
+
124
+ const { mappings } = parsed;
125
+ if (typeof mappings === 'string') {
126
+ this._encoded = mappings;
127
+ this._decoded = undefined;
128
+ } else if (Array.isArray(mappings)) {
129
+ this._encoded = undefined;
130
+ this._decoded = maybeSort(mappings, isString);
131
+ } else if ((parsed as unknown as SectionedSourceMap).sections) {
132
+ throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`);
133
+ } else {
134
+ throw new Error(`invalid source map: ${JSON.stringify(parsed)}`);
135
+ }
136
+
137
+ this._decodedMemo = memoizedState();
138
+ this._bySources = undefined;
139
+ this._bySourceMemos = undefined;
140
+ }
141
+ }
142
+
143
+ /**
144
+ * Typescript doesn't allow friend access to private fields, so this just casts the map into a type
145
+ * with public access modifiers.
146
+ */
147
+ function cast(map: unknown): PublicMap {
148
+ return map as any;
149
+ }
150
+
151
+ /**
152
+ * Returns the encoded (VLQ string) form of the SourceMap's mappings field.
153
+ */
154
+ export function encodedMappings(map: TraceMap): EncodedSourceMap['mappings'] {
155
+ return (cast(map)._encoded ??= encode(cast(map)._decoded!));
156
+ }
157
+
158
+ /**
159
+ * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
160
+ */
161
+ export function decodedMappings(map: TraceMap): Readonly<DecodedSourceMap['mappings']> {
162
+ return (cast(map)._decoded ||= decode(cast(map)._encoded!));
163
+ }
164
+
165
+ /**
166
+ * A low-level API to find the segment associated with a generated line/column (think, from a
167
+ * stack trace). Line and column here are 0-based, unlike `originalPositionFor`.
168
+ */
169
+ export function traceSegment(
170
+ map: TraceMap,
171
+ line: number,
172
+ column: number,
173
+ ): Readonly<SourceMapSegment> | null {
174
+ const decoded = decodedMappings(map);
175
+
176
+ // It's common for parent source maps to have pointers to lines that have no
177
+ // mapping (like a "//# sourceMappingURL=") at the end of the child file.
178
+ if (line >= decoded.length) return null;
179
+
180
+ const segments = decoded[line];
181
+ const index = traceSegmentInternal(
182
+ segments,
183
+ cast(map)._decodedMemo,
184
+ line,
185
+ column,
186
+ GREATEST_LOWER_BOUND,
187
+ );
188
+
189
+ return index === -1 ? null : segments[index];
190
+ }
191
+
192
+ /**
193
+ * A higher-level API to find the source/line/column associated with a generated line/column
194
+ * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
195
+ * `source-map` library.
196
+ */
197
+ export function originalPositionFor(
198
+ map: TraceMap,
199
+ needle: Needle,
200
+ ): OriginalMapping | InvalidOriginalMapping {
201
+ let { line, column, bias } = needle;
202
+ line--;
203
+ if (line < 0) throw new Error(LINE_GTR_ZERO);
204
+ if (column < 0) throw new Error(COL_GTR_EQ_ZERO);
205
+
206
+ const decoded = decodedMappings(map);
207
+
208
+ // It's common for parent source maps to have pointers to lines that have no
209
+ // mapping (like a "//# sourceMappingURL=") at the end of the child file.
210
+ if (line >= decoded.length) return OMapping(null, null, null, null);
211
+
212
+ const segments = decoded[line];
213
+ const index = traceSegmentInternal(
214
+ segments,
215
+ cast(map)._decodedMemo,
216
+ line,
217
+ column,
218
+ bias || GREATEST_LOWER_BOUND,
219
+ );
220
+
221
+ if (index === -1) return OMapping(null, null, null, null);
222
+
223
+ const segment = segments[index];
224
+ if (segment.length === 1) return OMapping(null, null, null, null);
225
+
226
+ const { names, resolvedSources } = map;
227
+ return OMapping(
228
+ resolvedSources[segment[SOURCES_INDEX]],
229
+ segment[SOURCE_LINE] + 1,
230
+ segment[SOURCE_COLUMN],
231
+ segment.length === 5 ? names[segment[NAMES_INDEX]] : null,
232
+ );
233
+ }
234
+
235
+ /**
236
+ * Finds the generated line/column position of the provided source/line/column source position.
237
+ */
238
+ export function generatedPositionFor(
239
+ map: TraceMap,
240
+ needle: SourceNeedle,
241
+ ): GeneratedMapping | InvalidGeneratedMapping {
242
+ const { source, line, column, bias } = needle;
243
+ return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);
244
+ }
245
+
246
+ /**
247
+ * Finds all generated line/column positions of the provided source/line/column source position.
248
+ */
249
+ export function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[] {
250
+ const { source, line, column, bias } = needle;
251
+ // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit.
252
+ return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);
253
+ }
254
+
255
+ /**
256
+ * Iterates each mapping in generated position order.
257
+ */
258
+ export function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void {
259
+ const decoded = decodedMappings(map);
260
+ const { names, resolvedSources } = map;
261
+
262
+ for (let i = 0; i < decoded.length; i++) {
263
+ const line = decoded[i];
264
+ for (let j = 0; j < line.length; j++) {
265
+ const seg = line[j];
266
+
267
+ const generatedLine = i + 1;
268
+ const generatedColumn = seg[0];
269
+ let source = null;
270
+ let originalLine = null;
271
+ let originalColumn = null;
272
+ let name = null;
273
+ if (seg.length !== 1) {
274
+ source = resolvedSources[seg[1]];
275
+ originalLine = seg[2] + 1;
276
+ originalColumn = seg[3];
277
+ }
278
+ if (seg.length === 5) name = names[seg[4]];
279
+
280
+ cb({
281
+ generatedLine,
282
+ generatedColumn,
283
+ source,
284
+ originalLine,
285
+ originalColumn,
286
+ name,
287
+ } as EachMapping);
288
+ }
289
+ }
290
+ }
291
+
292
+ function sourceIndex(map: TraceMap, source: string): number {
293
+ const { sources, resolvedSources } = map;
294
+ let index = sources.indexOf(source);
295
+ if (index === -1) index = resolvedSources.indexOf(source);
296
+ return index;
297
+ }
298
+
299
+ /**
300
+ * Retrieves the source content for a particular source, if its found. Returns null if not.
301
+ */
302
+ export function sourceContentFor(map: TraceMap, source: string): string | null {
303
+ const { sourcesContent } = map;
304
+ if (sourcesContent == null) return null;
305
+ const index = sourceIndex(map, source);
306
+ return index === -1 ? null : sourcesContent[index];
307
+ }
308
+
309
+ /**
310
+ * Determines if the source is marked to ignore by the source map.
311
+ */
312
+ export function isIgnored(map: TraceMap, source: string): boolean {
313
+ const { ignoreList } = map;
314
+ if (ignoreList == null) return false;
315
+ const index = sourceIndex(map, source);
316
+ return index === -1 ? false : ignoreList.includes(index);
317
+ }
318
+
319
+ /**
320
+ * A helper that skips sorting of the input map's mappings array, which can be expensive for larger
321
+ * maps.
322
+ */
323
+ export function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap {
324
+ const tracer = new TraceMap(clone(map, []), mapUrl);
325
+ cast(tracer)._decoded = map.mappings;
326
+ return tracer;
327
+ }
328
+
329
+ /**
330
+ * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
331
+ * a sourcemap, or to JSON.stringify.
332
+ */
333
+ export function decodedMap(
334
+ map: TraceMap,
335
+ ): Omit<DecodedSourceMap, 'mappings'> & { mappings: readonly SourceMapSegment[][] } {
336
+ return clone(map, decodedMappings(map));
337
+ }
338
+
339
+ /**
340
+ * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
341
+ * a sourcemap, or to JSON.stringify.
342
+ */
343
+ export function encodedMap(map: TraceMap): EncodedSourceMap {
344
+ return clone(map, encodedMappings(map));
345
+ }
346
+
347
+ function clone<T extends string | readonly SourceMapSegment[][]>(
348
+ map: TraceMap | DecodedSourceMap,
349
+ mappings: T,
350
+ ): T extends string ? EncodedSourceMap : DecodedSourceMap {
351
+ return {
352
+ version: map.version,
353
+ file: map.file,
354
+ names: map.names,
355
+ sourceRoot: map.sourceRoot,
356
+ sources: map.sources,
357
+ sourcesContent: map.sourcesContent,
358
+ mappings,
359
+ ignoreList: map.ignoreList || (map as XInput).x_google_ignoreList,
360
+ } as any;
361
+ }
362
+
363
+ function OMapping(source: null, line: null, column: null, name: null): InvalidOriginalMapping;
364
+ function OMapping(
365
+ source: string,
366
+ line: number,
367
+ column: number,
368
+ name: string | null,
369
+ ): OriginalMapping;
370
+ function OMapping(
371
+ source: string | null,
372
+ line: number | null,
373
+ column: number | null,
374
+ name: string | null,
375
+ ): OriginalMapping | InvalidOriginalMapping {
376
+ return { source, line, column, name } as any;
377
+ }
378
+
379
+ function GMapping(line: null, column: null): InvalidGeneratedMapping;
380
+ function GMapping(line: number, column: number): GeneratedMapping;
381
+ function GMapping(
382
+ line: number | null,
383
+ column: number | null,
384
+ ): GeneratedMapping | InvalidGeneratedMapping {
385
+ return { line, column } as any;
386
+ }
387
+
388
+ function traceSegmentInternal(
389
+ segments: SourceMapSegment[],
390
+ memo: MemoState,
391
+ line: number,
392
+ column: number,
393
+ bias: Bias,
394
+ ): number;
395
+ function traceSegmentInternal(
396
+ segments: ReverseSegment[],
397
+ memo: MemoState,
398
+ line: number,
399
+ column: number,
400
+ bias: Bias,
401
+ ): number;
402
+ function traceSegmentInternal(
403
+ segments: SourceMapSegment[] | ReverseSegment[],
404
+ memo: MemoState,
405
+ line: number,
406
+ column: number,
407
+ bias: Bias,
408
+ ): number {
409
+ let index = memoizedBinarySearch(segments, column, memo, line);
410
+ if (bsFound) {
411
+ index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);
412
+ } else if (bias === LEAST_UPPER_BOUND) index++;
413
+
414
+ if (index === -1 || index === segments.length) return -1;
415
+ return index;
416
+ }
417
+
418
+ function sliceGeneratedPositions(
419
+ segments: ReverseSegment[],
420
+ memo: MemoState,
421
+ line: number,
422
+ column: number,
423
+ bias: Bias,
424
+ ): GeneratedMapping[] {
425
+ let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);
426
+
427
+ // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in
428
+ // insertion order) segment that matched. Even if we did respect the bias when tracing, we would
429
+ // still need to call `lowerBound()` to find the first segment, which is slower than just looking
430
+ // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the
431
+ // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to
432
+ // match LEAST_UPPER_BOUND.
433
+ if (!bsFound && bias === LEAST_UPPER_BOUND) min++;
434
+
435
+ if (min === -1 || min === segments.length) return [];
436
+
437
+ // We may have found the segment that started at an earlier column. If this is the case, then we
438
+ // need to slice all generated segments that match _that_ column, because all such segments span
439
+ // to our desired column.
440
+ const matchedColumn = bsFound ? column : segments[min][COLUMN];
441
+
442
+ // The binary search is not guaranteed to find the lower bound when a match wasn't found.
443
+ if (!bsFound) min = lowerBound(segments, matchedColumn, min);
444
+ const max = upperBound(segments, matchedColumn, min);
445
+
446
+ const result = [];
447
+ for (; min <= max; min++) {
448
+ const segment = segments[min];
449
+ result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
450
+ }
451
+ return result;
452
+ }
453
+
454
+ function generatedPosition(
455
+ map: TraceMap,
456
+ source: string,
457
+ line: number,
458
+ column: number,
459
+ bias: Bias,
460
+ all: false,
461
+ ): GeneratedMapping | InvalidGeneratedMapping;
462
+ function generatedPosition(
463
+ map: TraceMap,
464
+ source: string,
465
+ line: number,
466
+ column: number,
467
+ bias: Bias,
468
+ all: true,
469
+ ): GeneratedMapping[];
470
+ function generatedPosition(
471
+ map: TraceMap,
472
+ source: string,
473
+ line: number,
474
+ column: number,
475
+ bias: Bias,
476
+ all: boolean,
477
+ ): GeneratedMapping | InvalidGeneratedMapping | GeneratedMapping[] {
478
+ line--;
479
+ if (line < 0) throw new Error(LINE_GTR_ZERO);
480
+ if (column < 0) throw new Error(COL_GTR_EQ_ZERO);
481
+
482
+ const { sources, resolvedSources } = map;
483
+ let sourceIndex = sources.indexOf(source);
484
+ if (sourceIndex === -1) sourceIndex = resolvedSources.indexOf(source);
485
+ if (sourceIndex === -1) return all ? [] : GMapping(null, null);
486
+
487
+ const bySourceMemos = (cast(map)._bySourceMemos ||= sources.map(memoizedState));
488
+ const generated = (cast(map)._bySources ||= buildBySources(decodedMappings(map), bySourceMemos));
489
+
490
+ const segments = generated[sourceIndex][line];
491
+ if (segments == null) return all ? [] : GMapping(null, null);
492
+
493
+ const memo = bySourceMemos[sourceIndex];
494
+
495
+ if (all) return sliceGeneratedPositions(segments, memo, line, column, bias);
496
+
497
+ const index = traceSegmentInternal(segments, memo, line, column, bias);
498
+ if (index === -1) return GMapping(null, null);
499
+
500
+ const segment = segments[index];
501
+ return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
502
+ }
node_modules/@jridgewell/trace-mapping/src/types.ts ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { SourceMapSegment } from './sourcemap-segment';
2
+ import type { GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap } from './trace-mapping';
3
+
4
+ export interface SourceMapV3 {
5
+ file?: string | null;
6
+ names: string[];
7
+ sourceRoot?: string;
8
+ sources: (string | null)[];
9
+ sourcesContent?: (string | null)[];
10
+ version: 3;
11
+ ignoreList?: number[];
12
+ }
13
+
14
+ export interface EncodedSourceMap extends SourceMapV3 {
15
+ mappings: string;
16
+ }
17
+
18
+ export interface DecodedSourceMap extends SourceMapV3 {
19
+ mappings: SourceMapSegment[][];
20
+ }
21
+
22
+ export interface Section {
23
+ offset: { line: number; column: number };
24
+ map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap;
25
+ }
26
+
27
+ export interface SectionedSourceMap {
28
+ file?: string | null;
29
+ sections: Section[];
30
+ version: 3;
31
+ }
32
+
33
+ export type OriginalMapping = {
34
+ source: string | null;
35
+ line: number;
36
+ column: number;
37
+ name: string | null;
38
+ };
39
+
40
+ export type InvalidOriginalMapping = {
41
+ source: null;
42
+ line: null;
43
+ column: null;
44
+ name: null;
45
+ };
46
+
47
+ export type GeneratedMapping = {
48
+ line: number;
49
+ column: number;
50
+ };
51
+ export type InvalidGeneratedMapping = {
52
+ line: null;
53
+ column: null;
54
+ };
55
+
56
+ export type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND;
57
+
58
+ export type XInput = { x_google_ignoreList?: SourceMapV3['ignoreList'] };
59
+ export type EncodedSourceMapXInput = EncodedSourceMap & XInput;
60
+ export type DecodedSourceMapXInput = DecodedSourceMap & XInput;
61
+ export type SectionedSourceMapXInput = Omit<SectionedSourceMap, 'sections'> & {
62
+ sections: SectionXInput[];
63
+ };
64
+ export type SectionXInput = Omit<Section, 'map'> & {
65
+ map: SectionedSourceMapInput;
66
+ };
67
+
68
+ export type SourceMapInput = string | EncodedSourceMapXInput | DecodedSourceMapXInput | TraceMap;
69
+ export type SectionedSourceMapInput = SourceMapInput | SectionedSourceMapXInput;
70
+
71
+ export type Needle = { line: number; column: number; bias?: Bias };
72
+ export type SourceNeedle = { source: string; line: number; column: number; bias?: Bias };
73
+
74
+ export type EachMapping =
75
+ | {
76
+ generatedLine: number;
77
+ generatedColumn: number;
78
+ source: null;
79
+ originalLine: null;
80
+ originalColumn: null;
81
+ name: null;
82
+ }
83
+ | {
84
+ generatedLine: number;
85
+ generatedColumn: number;
86
+ source: string | null;
87
+ originalLine: number;
88
+ originalColumn: number;
89
+ name: string | null;
90
+ };
91
+
92
+ export abstract class SourceMap {
93
+ declare version: SourceMapV3['version'];
94
+ declare file: SourceMapV3['file'];
95
+ declare names: SourceMapV3['names'];
96
+ declare sourceRoot: SourceMapV3['sourceRoot'];
97
+ declare sources: SourceMapV3['sources'];
98
+ declare sourcesContent: SourceMapV3['sourcesContent'];
99
+ declare resolvedSources: SourceMapV3['sources'];
100
+ declare ignoreList: SourceMapV3['ignoreList'];
101
+ }
102
+
103
+ export type Ro<T> =
104
+ T extends Array<infer V>
105
+ ? V[] | Readonly<V[]> | RoArray<V> | Readonly<RoArray<V>>
106
+ : T extends object
107
+ ? T | Readonly<T> | RoObject<T> | Readonly<RoObject<T>>
108
+ : T;
109
+ type RoArray<T> = Ro<T>[];
110
+ type RoObject<T> = { [K in keyof T]: T[K] | Ro<T[K]> };
111
+
112
+ export function parse<T>(map: T): Exclude<T, string> {
113
+ return typeof map === 'string' ? JSON.parse(map) : (map as Exclude<T, string>);
114
+ }
node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment.cts';
2
+ export type MemoState = {
3
+ lastKey: number;
4
+ lastNeedle: number;
5
+ lastIndex: number;
6
+ };
7
+ export declare let found: boolean;
8
+ /**
9
+ * A binary search implementation that returns the index if a match is found.
10
+ * If no match is found, then the left-index (the index associated with the item that comes just
11
+ * before the desired index) is returned. To maintain proper sort order, a splice would happen at
12
+ * the next index:
13
+ *
14
+ * ```js
15
+ * const array = [1, 3];
16
+ * const needle = 2;
17
+ * const index = binarySearch(array, needle, (item, needle) => item - needle);
18
+ *
19
+ * assert.equal(index, 0);
20
+ * array.splice(index + 1, 0, needle);
21
+ * assert.deepEqual(array, [1, 2, 3]);
22
+ * ```
23
+ */
24
+ export declare function binarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, low: number, high: number): number;
25
+ export declare function upperBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number;
26
+ export declare function lowerBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number;
27
+ export declare function memoizedState(): MemoState;
28
+ /**
29
+ * This overly complicated beast is just to record the last tested line/column and the resulting
30
+ * index, allowing us to skip a few tests if mappings are monotonically increasing.
31
+ */
32
+ export declare function memoizedBinarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, state: MemoState, key: number): number;
33
+ //# sourceMappingURL=binary-search.d.ts.map
node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"binary-search.d.ts","sourceRoot":"","sources":["../src/binary-search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG5E,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,IAAI,KAAK,SAAQ,CAAC;AAEzB;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GACX,MAAM,CAmBR;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AAED,wBAAgB,aAAa,IAAI,SAAS,CAMzC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,MAAM,GACV,MAAM,CAsBR"}
node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment.mts';
2
+ export type MemoState = {
3
+ lastKey: number;
4
+ lastNeedle: number;
5
+ lastIndex: number;
6
+ };
7
+ export declare let found: boolean;
8
+ /**
9
+ * A binary search implementation that returns the index if a match is found.
10
+ * If no match is found, then the left-index (the index associated with the item that comes just
11
+ * before the desired index) is returned. To maintain proper sort order, a splice would happen at
12
+ * the next index:
13
+ *
14
+ * ```js
15
+ * const array = [1, 3];
16
+ * const needle = 2;
17
+ * const index = binarySearch(array, needle, (item, needle) => item - needle);
18
+ *
19
+ * assert.equal(index, 0);
20
+ * array.splice(index + 1, 0, needle);
21
+ * assert.deepEqual(array, [1, 2, 3]);
22
+ * ```
23
+ */
24
+ export declare function binarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, low: number, high: number): number;
25
+ export declare function upperBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number;
26
+ export declare function lowerBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number;
27
+ export declare function memoizedState(): MemoState;
28
+ /**
29
+ * This overly complicated beast is just to record the last tested line/column and the resulting
30
+ * index, allowing us to skip a few tests if mappings are monotonically increasing.
31
+ */
32
+ export declare function memoizedBinarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, state: MemoState, key: number): number;
33
+ //# sourceMappingURL=binary-search.d.ts.map
node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"binary-search.d.ts","sourceRoot":"","sources":["../src/binary-search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG5E,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,IAAI,KAAK,SAAQ,CAAC;AAEzB;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GACX,MAAM,CAmBR;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AAED,wBAAgB,aAAa,IAAI,SAAS,CAMzC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,MAAM,GACV,MAAM,CAsBR"}
node_modules/@jridgewell/trace-mapping/types/by-source.d.cts ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment.cts';
2
+ export type Source = ReverseSegment[][];
3
+ export = function buildBySources(decoded: readonly SourceMapSegment[][], memos: unknown[]): Source[];
4
+ //# sourceMappingURL=by-source.d.ts.map
node_modules/@jridgewell/trace-mapping/types/by-source.d.cts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"by-source.d.ts","sourceRoot":"","sources":["../src/by-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,MAAM,MAAM,MAAM,GAAG,cAAc,EAAE,EAAE,CAAC;AAIxC,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,OAAO,EAAE,SAAS,gBAAgB,EAAE,EAAE,EACtC,KAAK,EAAE,OAAO,EAAE,GACf,MAAM,EAAE,CA4BV"}
node_modules/@jridgewell/trace-mapping/types/by-source.d.mts ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment.mts';
2
+ export type Source = ReverseSegment[][];
3
+ export default function buildBySources(decoded: readonly SourceMapSegment[][], memos: unknown[]): Source[];
4
+ //# sourceMappingURL=by-source.d.ts.map
node_modules/@jridgewell/trace-mapping/types/by-source.d.mts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"by-source.d.ts","sourceRoot":"","sources":["../src/by-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,MAAM,MAAM,MAAM,GAAG,cAAc,EAAE,EAAE,CAAC;AAIxC,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,OAAO,EAAE,SAAS,gBAAgB,EAAE,EAAE,EACtC,KAAK,EAAE,OAAO,EAAE,GACf,MAAM,EAAE,CA4BV"}
node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import { TraceMap } from './trace-mapping.cts';
2
+ import type { SectionedSourceMapInput, Ro } from './types.cts';
3
+ type FlattenMap = {
4
+ new (map: Ro<SectionedSourceMapInput>, mapUrl?: string | null): TraceMap;
5
+ (map: Ro<SectionedSourceMapInput>, mapUrl?: string | null): TraceMap;
6
+ };
7
+ export declare const FlattenMap: FlattenMap;
8
+ export {};
9
+ //# sourceMappingURL=flatten-map.d.ts.map
node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"flatten-map.d.ts","sourceRoot":"","sources":["../src/flatten-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAwC,MAAM,iBAAiB,CAAC;AAUjF,OAAO,KAAK,EAKV,uBAAuB,EAEvB,EAAE,EACH,MAAM,SAAS,CAAC;AAGjB,KAAK,UAAU,GAAG;IAChB,KAAK,GAAG,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC;IACzE,CAAC,GAAG,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC;CACtE,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAsCV,CAAC"}
node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import { TraceMap } from './trace-mapping.mts';
2
+ import type { SectionedSourceMapInput, Ro } from './types.mts';
3
+ type FlattenMap = {
4
+ new (map: Ro<SectionedSourceMapInput>, mapUrl?: string | null): TraceMap;
5
+ (map: Ro<SectionedSourceMapInput>, mapUrl?: string | null): TraceMap;
6
+ };
7
+ export declare const FlattenMap: FlattenMap;
8
+ export {};
9
+ //# sourceMappingURL=flatten-map.d.ts.map
node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"flatten-map.d.ts","sourceRoot":"","sources":["../src/flatten-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAwC,MAAM,iBAAiB,CAAC;AAUjF,OAAO,KAAK,EAKV,uBAAuB,EAEvB,EAAE,EACH,MAAM,SAAS,CAAC;AAGjB,KAAK,UAAU,GAAG;IAChB,KAAK,GAAG,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC;IACzE,CAAC,GAAG,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC;CACtE,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAsCV,CAAC"}
node_modules/@jridgewell/trace-mapping/types/resolve.d.cts ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ type Resolve = (source: string | null) => string;
2
+ export = function resolver(mapUrl: string | null | undefined, sourceRoot: string | undefined): Resolve;
3
+ export {};
4
+ //# sourceMappingURL=resolve.d.ts.map
node_modules/@jridgewell/trace-mapping/types/resolve.d.cts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAGA,KAAK,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC;AACjD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC9B,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,OAAO,CAQT"}
node_modules/@jridgewell/trace-mapping/types/resolve.d.mts ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ type Resolve = (source: string | null) => string;
2
+ export default function resolver(mapUrl: string | null | undefined, sourceRoot: string | undefined): Resolve;
3
+ export {};
4
+ //# sourceMappingURL=resolve.d.ts.map
node_modules/@jridgewell/trace-mapping/types/resolve.d.mts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAGA,KAAK,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC;AACjD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC9B,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,OAAO,CAQT"}
node_modules/@jridgewell/trace-mapping/types/sort.d.cts ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment.cts';
2
+ export = function maybeSort(mappings: SourceMapSegment[][], owned: boolean): SourceMapSegment[][];
3
+ export declare function sortComparator<T extends SourceMapSegment | ReverseSegment>(a: T, b: T): number;
4
+ //# sourceMappingURL=sort.d.ts.map
node_modules/@jridgewell/trace-mapping/types/sort.d.cts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../src/sort.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,QAAQ,EAAE,gBAAgB,EAAE,EAAE,EAC9B,KAAK,EAAE,OAAO,GACb,gBAAgB,EAAE,EAAE,CAYtB;AAuBD,wBAAgB,cAAc,CAAC,CAAC,SAAS,gBAAgB,GAAG,cAAc,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,MAAM,CAE9F"}
node_modules/@jridgewell/trace-mapping/types/sort.d.mts ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment.mts';
2
+ export default function maybeSort(mappings: SourceMapSegment[][], owned: boolean): SourceMapSegment[][];
3
+ export declare function sortComparator<T extends SourceMapSegment | ReverseSegment>(a: T, b: T): number;
4
+ //# sourceMappingURL=sort.d.ts.map
node_modules/@jridgewell/trace-mapping/types/sort.d.mts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../src/sort.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,QAAQ,EAAE,gBAAgB,EAAE,EAAE,EAC9B,KAAK,EAAE,OAAO,GACb,gBAAgB,EAAE,EAAE,CAYtB;AAuBD,wBAAgB,cAAc,CAAC,CAAC,SAAS,gBAAgB,GAAG,cAAc,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,MAAM,CAE9F"}
node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ type GeneratedColumn = number;
2
+ type SourcesIndex = number;
3
+ type SourceLine = number;
4
+ type SourceColumn = number;
5
+ type NamesIndex = number;
6
+ type GeneratedLine = number;
7
+ export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];
8
+ export type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn];
9
+ export declare const COLUMN = 0;
10
+ export declare const SOURCES_INDEX = 1;
11
+ export declare const SOURCE_LINE = 2;
12
+ export declare const SOURCE_COLUMN = 3;
13
+ export declare const NAMES_INDEX = 4;
14
+ export declare const REV_GENERATED_LINE = 1;
15
+ export declare const REV_GENERATED_COLUMN = 2;
16
+ export {};
17
+ //# sourceMappingURL=sourcemap-segment.d.ts.map
node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"sourcemap-segment.d.ts","sourceRoot":"","sources":["../src/sourcemap-segment.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,MAAM,CAAC;AAC9B,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AACzB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,KAAK,aAAa,GAAG,MAAM,CAAC;AAE5B,MAAM,MAAM,gBAAgB,GACxB,CAAC,eAAe,CAAC,GACjB,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,GACzD,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAE1E,MAAM,MAAM,cAAc,GAAG,CAAC,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC;AAE5E,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,oBAAoB,IAAI,CAAC"}
node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ type GeneratedColumn = number;
2
+ type SourcesIndex = number;
3
+ type SourceLine = number;
4
+ type SourceColumn = number;
5
+ type NamesIndex = number;
6
+ type GeneratedLine = number;
7
+ export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];
8
+ export type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn];
9
+ export declare const COLUMN = 0;
10
+ export declare const SOURCES_INDEX = 1;
11
+ export declare const SOURCE_LINE = 2;
12
+ export declare const SOURCE_COLUMN = 3;
13
+ export declare const NAMES_INDEX = 4;
14
+ export declare const REV_GENERATED_LINE = 1;
15
+ export declare const REV_GENERATED_COLUMN = 2;
16
+ export {};
17
+ //# sourceMappingURL=sourcemap-segment.d.ts.map
node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"sourcemap-segment.d.ts","sourceRoot":"","sources":["../src/sourcemap-segment.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,MAAM,CAAC;AAC9B,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AACzB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,KAAK,aAAa,GAAG,MAAM,CAAC;AAE5B,MAAM,MAAM,gBAAgB,GACxB,CAAC,eAAe,CAAC,GACjB,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,GACzD,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAE1E,MAAM,MAAM,cAAc,GAAG,CAAC,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC;AAE5E,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,oBAAoB,IAAI,CAAC"}
node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ /**
2
+ * Removes everything after the last "/", but leaves the slash.
3
+ */
4
+ export = function stripFilename(path: string | undefined | null): string;
5
+ //# sourceMappingURL=strip-filename.d.ts.map
node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"strip-filename.d.ts","sourceRoot":"","sources":["../src/strip-filename.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAI7E"}
node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ /**
2
+ * Removes everything after the last "/", but leaves the slash.
3
+ */
4
+ export default function stripFilename(path: string | undefined | null): string;
5
+ //# sourceMappingURL=strip-filename.d.ts.map
node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"strip-filename.d.ts","sourceRoot":"","sources":["../src/strip-filename.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAI7E"}
node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { SourceMapSegment } from './sourcemap-segment.cts';
2
+ import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping, Ro } from './types.cts';
3
+ export type { SourceMapSegment } from './sourcemap-segment.cts';
4
+ export type { SourceMap, DecodedSourceMap, EncodedSourceMap, Section, SectionedSourceMap, SourceMapV3, Bias, EachMapping, GeneratedMapping, InvalidGeneratedMapping, InvalidOriginalMapping, Needle, OriginalMapping, OriginalMapping as Mapping, SectionedSourceMapInput, SourceMapInput, SourceNeedle, XInput, EncodedSourceMapXInput, DecodedSourceMapXInput, SectionedSourceMapXInput, SectionXInput, } from './types.cts';
5
+ export declare const LEAST_UPPER_BOUND = -1;
6
+ export declare const GREATEST_LOWER_BOUND = 1;
7
+ export { FlattenMap, FlattenMap as AnyMap } from './flatten-map.cts';
8
+ export declare class TraceMap implements SourceMap {
9
+ version: SourceMapV3['version'];
10
+ file: SourceMapV3['file'];
11
+ names: SourceMapV3['names'];
12
+ sourceRoot: SourceMapV3['sourceRoot'];
13
+ sources: SourceMapV3['sources'];
14
+ sourcesContent: SourceMapV3['sourcesContent'];
15
+ ignoreList: SourceMapV3['ignoreList'];
16
+ resolvedSources: string[];
17
+ private _encoded;
18
+ private _decoded;
19
+ private _decodedMemo;
20
+ private _bySources;
21
+ private _bySourceMemos;
22
+ constructor(map: Ro<SourceMapInput>, mapUrl?: string | null);
23
+ }
24
+ /**
25
+ * Returns the encoded (VLQ string) form of the SourceMap's mappings field.
26
+ */
27
+ export declare function encodedMappings(map: TraceMap): EncodedSourceMap['mappings'];
28
+ /**
29
+ * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
30
+ */
31
+ export declare function decodedMappings(map: TraceMap): Readonly<DecodedSourceMap['mappings']>;
32
+ /**
33
+ * A low-level API to find the segment associated with a generated line/column (think, from a
34
+ * stack trace). Line and column here are 0-based, unlike `originalPositionFor`.
35
+ */
36
+ export declare function traceSegment(map: TraceMap, line: number, column: number): Readonly<SourceMapSegment> | null;
37
+ /**
38
+ * A higher-level API to find the source/line/column associated with a generated line/column
39
+ * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
40
+ * `source-map` library.
41
+ */
42
+ export declare function originalPositionFor(map: TraceMap, needle: Needle): OriginalMapping | InvalidOriginalMapping;
43
+ /**
44
+ * Finds the generated line/column position of the provided source/line/column source position.
45
+ */
46
+ export declare function generatedPositionFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping | InvalidGeneratedMapping;
47
+ /**
48
+ * Finds all generated line/column positions of the provided source/line/column source position.
49
+ */
50
+ export declare function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[];
51
+ /**
52
+ * Iterates each mapping in generated position order.
53
+ */
54
+ export declare function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void;
55
+ /**
56
+ * Retrieves the source content for a particular source, if its found. Returns null if not.
57
+ */
58
+ export declare function sourceContentFor(map: TraceMap, source: string): string | null;
59
+ /**
60
+ * Determines if the source is marked to ignore by the source map.
61
+ */
62
+ export declare function isIgnored(map: TraceMap, source: string): boolean;
63
+ /**
64
+ * A helper that skips sorting of the input map's mappings array, which can be expensive for larger
65
+ * maps.
66
+ */
67
+ export declare function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap;
68
+ /**
69
+ * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
70
+ * a sourcemap, or to JSON.stringify.
71
+ */
72
+ export declare function decodedMap(map: TraceMap): Omit<DecodedSourceMap, 'mappings'> & {
73
+ mappings: readonly SourceMapSegment[][];
74
+ };
75
+ /**
76
+ * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
77
+ * a sourcemap, or to JSON.stringify.
78
+ */
79
+ export declare function encodedMap(map: TraceMap): EncodedSourceMap;
80
+ //# sourceMappingURL=trace-mapping.d.ts.map
node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"trace-mapping.d.ts","sourceRoot":"","sources":["../src/trace-mapping.ts"],"names":[],"mappings":"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"}
node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { SourceMapSegment } from './sourcemap-segment.mts';
2
+ import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping, Ro } from './types.mts';
3
+ export type { SourceMapSegment } from './sourcemap-segment.mts';
4
+ export type { SourceMap, DecodedSourceMap, EncodedSourceMap, Section, SectionedSourceMap, SourceMapV3, Bias, EachMapping, GeneratedMapping, InvalidGeneratedMapping, InvalidOriginalMapping, Needle, OriginalMapping, OriginalMapping as Mapping, SectionedSourceMapInput, SourceMapInput, SourceNeedle, XInput, EncodedSourceMapXInput, DecodedSourceMapXInput, SectionedSourceMapXInput, SectionXInput, } from './types.mts';
5
+ export declare const LEAST_UPPER_BOUND = -1;
6
+ export declare const GREATEST_LOWER_BOUND = 1;
7
+ export { FlattenMap, FlattenMap as AnyMap } from './flatten-map.mts';
8
+ export declare class TraceMap implements SourceMap {
9
+ version: SourceMapV3['version'];
10
+ file: SourceMapV3['file'];
11
+ names: SourceMapV3['names'];
12
+ sourceRoot: SourceMapV3['sourceRoot'];
13
+ sources: SourceMapV3['sources'];
14
+ sourcesContent: SourceMapV3['sourcesContent'];
15
+ ignoreList: SourceMapV3['ignoreList'];
16
+ resolvedSources: string[];
17
+ private _encoded;
18
+ private _decoded;
19
+ private _decodedMemo;
20
+ private _bySources;
21
+ private _bySourceMemos;
22
+ constructor(map: Ro<SourceMapInput>, mapUrl?: string | null);
23
+ }
24
+ /**
25
+ * Returns the encoded (VLQ string) form of the SourceMap's mappings field.
26
+ */
27
+ export declare function encodedMappings(map: TraceMap): EncodedSourceMap['mappings'];
28
+ /**
29
+ * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
30
+ */
31
+ export declare function decodedMappings(map: TraceMap): Readonly<DecodedSourceMap['mappings']>;
32
+ /**
33
+ * A low-level API to find the segment associated with a generated line/column (think, from a
34
+ * stack trace). Line and column here are 0-based, unlike `originalPositionFor`.
35
+ */
36
+ export declare function traceSegment(map: TraceMap, line: number, column: number): Readonly<SourceMapSegment> | null;
37
+ /**
38
+ * A higher-level API to find the source/line/column associated with a generated line/column
39
+ * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
40
+ * `source-map` library.
41
+ */
42
+ export declare function originalPositionFor(map: TraceMap, needle: Needle): OriginalMapping | InvalidOriginalMapping;
43
+ /**
44
+ * Finds the generated line/column position of the provided source/line/column source position.
45
+ */
46
+ export declare function generatedPositionFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping | InvalidGeneratedMapping;
47
+ /**
48
+ * Finds all generated line/column positions of the provided source/line/column source position.
49
+ */
50
+ export declare function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[];
51
+ /**
52
+ * Iterates each mapping in generated position order.
53
+ */
54
+ export declare function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void;
55
+ /**
56
+ * Retrieves the source content for a particular source, if its found. Returns null if not.
57
+ */
58
+ export declare function sourceContentFor(map: TraceMap, source: string): string | null;
59
+ /**
60
+ * Determines if the source is marked to ignore by the source map.
61
+ */
62
+ export declare function isIgnored(map: TraceMap, source: string): boolean;
63
+ /**
64
+ * A helper that skips sorting of the input map's mappings array, which can be expensive for larger
65
+ * maps.
66
+ */
67
+ export declare function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap;
68
+ /**
69
+ * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
70
+ * a sourcemap, or to JSON.stringify.
71
+ */
72
+ export declare function decodedMap(map: TraceMap): Omit<DecodedSourceMap, 'mappings'> & {
73
+ mappings: readonly SourceMapSegment[][];
74
+ };
75
+ /**
76
+ * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
77
+ * a sourcemap, or to JSON.stringify.
78
+ */
79
+ export declare function encodedMap(map: TraceMap): EncodedSourceMap;
80
+ //# sourceMappingURL=trace-mapping.d.ts.map
node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"trace-mapping.d.ts","sourceRoot":"","sources":["../src/trace-mapping.ts"],"names":[],"mappings":"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"}