ode> 108
+			c0-2.7-1.7-2.7-3.1-2.7c-1.9,0-3.3,0.2-3.3,2.9c0,2.6,1.2,2.7,2.8,2.9l0.7,0.1c0.3,0,0.6,0,0.6,0.1c0,0,0.1,0.2,0.1,0.4
109
+			c0,0.4-0.1,0.4-0.1,0.4c-0.1,0.1-0.5,0.1-0.8,0.1c-0.4,0-0.7,0-0.8-0.1c-0.1,0-0.1-0.2-0.1-0.6c0-0.1-0.1-0.3-0.3-0.3h-1.8
110
+			c-0.1,0-0.3,0.1-0.3,0.3c0,3.2,1.5,3.2,3.3,3.2c1.5,0,2.4-0.3,2.9-1C228,29.8,228,29.1,228,28.3L228,28.3z"/>
111
+	</g>
112
+</g>
113
+</svg>

BIN
img/tmt-mma-afternoon-class.jpg


BIN
img/ufc-266-tmt-fighter-wins.jpg


File diff suppressed because it is too large
+ 295 - 0
index.html


+ 3 - 0
input.css

@@ -0,0 +1,3 @@
1
+@tailwind base;
2
+@tailwind components;
3
+@tailwind utilities;

+ 40 - 0
js/main.js

@@ -0,0 +1,40 @@
1
+// Burger menus
2
+document.addEventListener('DOMContentLoaded', function() {
3
+    // open
4
+    const burger = document.querySelectorAll('.navbar-burger');
5
+    const menu = document.querySelectorAll('.navbar-menu');
6
+
7
+    if (burger.length && menu.length) {
8
+        for (var i = 0; i < burger.length; i++) {
9
+            burger[i].addEventListener('click', function() {
10
+                for (var j = 0; j < menu.length; j++) {
11
+                    menu[j].classList.toggle('hidden');
12
+                }
13
+            });
14
+        }
15
+    }
16
+
17
+    // close
18
+    const close = document.querySelectorAll('.navbar-close');
19
+    const backdrop = document.querySelectorAll('.navbar-backdrop');
20
+
21
+    if (close.length) {
22
+        for (var i = 0; i < close.length; i++) {
23
+            close[i].addEventListener('click', function() {
24
+                for (var j = 0; j < menu.length; j++) {
25
+                    menu[j].classList.toggle('hidden');
26
+                }
27
+            });
28
+        }
29
+    }
30
+
31
+    if (backdrop.length) {
32
+        for (var i = 0; i < backdrop.length; i++) {
33
+            backdrop[i].addEventListener('click', function() {
34
+                for (var j = 0; j < menu.length; j++) {
35
+                    menu[j].classList.toggle('hidden');
36
+                }
37
+            });
38
+        }
39
+    }
40
+});

+ 22 - 0
login.html

@@ -0,0 +1,22 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+
4
+<head>
5
+    <meta charset="UTF-8">
6
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
7
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+    <title>Tiger Muay Thai E Leaning</title>
9
+    <link rel="stylesheet" href="./css/main.css">
10
+    <link rel="preconnect" href="https://fonts.googleapis.com">
11
+    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
12
+    <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&family=Poppins&display=swap"
13
+        rel="stylesheet">
14
+    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css"
15
+        integrity="sha512-xh6O/CkQoPOWDdYTDqeRdPCVd1SpvCA9XXcUnZS2FmJNp1coAFzvtCN9BmamE+4aHK8yyUHUSCcJHgXloTyT2A=="
16
+        crossorigin="anonymous" referrerpolicy="no-referrer" />
17
+</head>
18
+
19
+<body>
20
+</body>
21
+
22
+</html>

BIN
node_modules/.DS_Store


+ 1 - 0
node_modules/.bin/autoprefixer

@@ -0,0 +1 @@
1
+../autoprefixer/bin/autoprefixer

+ 1 - 0
node_modules/.bin/browserslist

@@ -0,0 +1 @@
1
+../browserslist/cli.js

+ 1 - 0
node_modules/.bin/cssesc

@@ -0,0 +1 @@
1
+../cssesc/bin/cssesc

+ 1 - 0
node_modules/.bin/jiti

@@ -0,0 +1 @@
1
+../jiti/bin/jiti.js

+ 1 - 0
node_modules/.bin/nanoid

@@ -0,0 +1 @@
1
+../nanoid/bin/nanoid.cjs

+ 1 - 0
node_modules/.bin/resolve

@@ -0,0 +1 @@
1
+../resolve/bin/resolve

+ 1 - 0
node_modules/.bin/sucrase

@@ -0,0 +1 @@
1
+../sucrase/bin/sucrase

+ 1 - 0
node_modules/.bin/sucrase-node

@@ -0,0 +1 @@
1
+../sucrase/bin/sucrase-node

+ 1 - 0
node_modules/.bin/tailwind

@@ -0,0 +1 @@
1
+../tailwindcss/lib/cli.js

+ 1 - 0
node_modules/.bin/tailwindcss

@@ -0,0 +1 @@
1
+../tailwindcss/lib/cli.js

+ 1 - 0
node_modules/.bin/update-browserslist-db

@@ -0,0 +1 @@
1
+../update-browserslist-db/cli.js

File diff suppressed because it is too large
+ 1136 - 0
node_modules/.package-lock.json


+ 128 - 0
node_modules/@alloc/quick-lru/index.d.ts

@@ -0,0 +1,128 @@
1
+declare namespace QuickLRU {
2
+	interface Options<KeyType, ValueType> {
3
+		/**
4
+		The maximum number of milliseconds an item should remain in the cache.
5
+
6
+		@default Infinity
7
+
8
+		By default, `maxAge` will be `Infinity`, which means that items will never expire.
9
+		Lazy expiration upon the next write or read call.
10
+
11
+		Individual expiration of an item can be specified by the `set(key, value, maxAge)` method.
12
+		*/
13
+		readonly maxAge?: number;
14
+
15
+		/**
16
+		The maximum number of items before evicting the least recently used items.
17
+		*/
18
+		readonly maxSize: number;
19
+
20
+		/**
21
+		Called right before an item is evicted from the cache.
22
+
23
+		Useful for side effects or for items like object URLs that need explicit cleanup (`revokeObjectURL`).
24
+		*/
25
+		onEviction?: (key: KeyType, value: ValueType) => void;
26
+	}
27
+}
28
+
29
+declare class QuickLRU<KeyType, ValueType>
30
+	implements Iterable<[KeyType, ValueType]> {
31
+	/**
32
+	The stored item count.
33
+	*/
34
+	readonly size: number;
35
+
36
+	/**
37
+	Simple ["Least Recently Used" (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29).
38
+
39
+	The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop.
40
+
41
+	@example
42
+	```
43
+	import QuickLRU = require('quick-lru');
44
+
45
+	const lru = new QuickLRU({maxSize: 1000});
46
+
47
+	lru.set('🦄', '🌈');
48
+
49
+	lru.has('🦄');
50
+	//=> true
51
+
52
+	lru.get('🦄');
53
+	//=> '🌈'
54
+	```
55
+	*/
56
+	constructor(options: QuickLRU.Options<KeyType, ValueType>);
57
+
58
+	[Symbol.iterator](): IterableIterator<[KeyType, ValueType]>;
59
+
60
+	/**
61
+	Set an item. Returns the instance.
62
+
63
+	Individual expiration of an item can be specified with the `maxAge` option. If not specified, the global `maxAge` value will be used in case it is specified in the constructor, otherwise the item will never expire.
64
+
65
+	@returns The list instance.
66
+	*/
67
+	set(key: KeyType, value: ValueType, options?: {maxAge?: number}): this;
68
+
69
+	/**
70
+	Get an item.
71
+
72
+	@returns The stored item or `undefined`.
73
+	*/
74
+	get(key: KeyType): ValueType | undefined;
75
+
76
+	/**
77
+	Check if an item exists.
78
+	*/
79
+	has(key: KeyType): boolean;
80
+
81
+	/**
82
+	Get an item without marking it as recently used.
83
+
84
+	@returns The stored item or `undefined`.
85
+	*/
86
+	peek(key: KeyType): ValueType | undefined;
87
+
88
+	/**
89
+	Delete an item.
90
+
91
+	@returns `true` if the item is removed or `false` if the item doesn't exist.
92
+	*/
93
+	delete(key: KeyType): boolean;
94
+
95
+	/**
96
+	Delete all items.
97
+	*/
98
+	clear(): void;
99
+
100
+	/**
101
+	Update the `maxSize` in-place, discarding items as necessary. Insertion order is mostly preserved, though this is not a strong guarantee.
102
+
103
+	Useful for on-the-fly tuning of cache sizes in live systems.
104
+	*/
105
+	resize(maxSize: number): void;
106
+
107
+	/**
108
+	Iterable for all the keys.
109
+	*/
110
+	keys(): IterableIterator<KeyType>;
111
+
112
+	/**
113
+	Iterable for all the values.
114
+	*/
115
+	values(): IterableIterator<ValueType>;
116
+
117
+	/**
118
+	Iterable for all entries, starting with the oldest (ascending in recency).
119
+	*/
120
+	entriesAscending(): IterableIterator<[KeyType, ValueType]>;
121
+
122
+	/**
123
+	Iterable for all entries, starting with the newest (descending in recency).
124
+	*/
125
+	entriesDescending(): IterableIterator<[KeyType, ValueType]>;
126
+}
127
+
128
+export = QuickLRU;

+ 263 - 0
node_modules/@alloc/quick-lru/index.js

@@ -0,0 +1,263 @@
1
+'use strict';
2
+
3
+class QuickLRU {
4
+	constructor(options = {}) {
5
+		if (!(options.maxSize && options.maxSize > 0)) {
6
+			throw new TypeError('`maxSize` must be a number greater than 0');
7
+		}
8
+
9
+		if (typeof options.maxAge === 'number' && options.maxAge === 0) {
10
+			throw new TypeError('`maxAge` must be a number greater than 0');
11
+		}
12
+
13
+		this.maxSize = options.maxSize;
14
+		this.maxAge = options.maxAge || Infinity;
15
+		this.onEviction = options.onEviction;
16
+		this.cache = new Map();
17
+		this.oldCache = new Map();
18
+		this._size = 0;
19
+	}
20
+
21
+	_emitEvictions(cache) {
22
+		if (typeof this.onEviction !== 'function') {
23
+			return;
24
+		}
25
+
26
+		for (const [key, item] of cache) {
27
+			this.onEviction(key, item.value);
28
+		}
29
+	}
30
+
31
+	_deleteIfExpired(key, item) {
32
+		if (typeof item.expiry === 'number' && item.expiry <= Date.now()) {
33
+			if (typeof this.onEviction === 'function') {
34
+				this.onEviction(key, item.value);
35
+			}
36
+
37
+			return this.delete(key);
38
+		}
39
+
40
+		return false;
41
+	}
42
+
43
+	_getOrDeleteIfExpired(key, item) {
44
+		const deleted = this._deleteIfExpired(key, item);
45
+		if (deleted === false) {
46
+			return item.value;
47
+		}
48
+	}
49
+
50
+	_getItemValue(key, item) {
51
+		return item.expiry ? this._getOrDeleteIfExpired(key, item) : item.value;
52
+	}
53
+
54
+	_peek(key, cache) {
55
+		const item = cache.get(key);
56
+
57
+		return this._getItemValue(key, item);
58
+	}
59
+
60
+	_set(key, value) {
61
+		this.cache.set(key, value);
62
+		this._size++;
63
+
64
+		if (this._size >= this.maxSize) {
65
+			this._size = 0;
66
+			this._emitEvictions(this.oldCache);
67
+			this.oldCache = this.cache;
68
+			this.cache = new Map();
69
+		}
70
+	}
71
+
72
+	_moveToRecent(key, item) {
73
+		this.oldCache.delete(key);
74
+		this._set(key, item);
75
+	}
76
+
77
+	* _entriesAscending() {
78
+		for (const item of this.oldCache) {
79
+			const [key, value] = item;
80
+			if (!this.cache.has(key)) {
81
+				const deleted = this._deleteIfExpired(key, value);
82
+				if (deleted === false) {
83
+					yield item;
84
+				}
85
+			}
86
+		}
87
+
88
+		for (const item of this.cache) {
89
+			const [key, value] = item;
90
+			const deleted = this._deleteIfExpired(key, value);
91
+			if (deleted === false) {
92
+				yield item;
93
+			}
94
+		}
95
+	}
96
+
97
+	get(key) {
98
+		if (this.cache.has(key)) {
99
+			const item = this.cache.get(key);
100
+
101
+			return this._getItemValue(key, item);
102
+		}
103
+
104
+		if (this.oldCache.has(key)) {
105
+			const item = this.oldCache.get(key);
106
+			if (this._deleteIfExpired(key, item) === false) {
107
+				this._moveToRecent(key, item);
108
+				return item.value;
109
+			}
110
+		}
111
+	}
112
+
113
+	set(key, value, {maxAge = this.maxAge === Infinity ? undefined : Date.now() + this.maxAge} = {}) {
114
+		if (this.cache.has(key)) {
115
+			this.cache.set(key, {
116
+				value,
117
+				maxAge
118
+			});
119
+		} else {
120
+			this._set(key, {value, expiry: maxAge});
121
+		}
122
+	}
123
+
124
+	has(key) {
125
+		if (this.cache.has(key)) {
126
+			return !this._deleteIfExpired(key, this.cache.get(key));
127
+		}
128
+
129
+		if (this.oldCache.has(key)) {
130
+			return !this._deleteIfExpired(key, this.oldCache.get(key));
131
+		}
132
+
133
+		return false;
134
+	}
135
+
136
+	peek(key) {
137
+		if (this.cache.has(key)) {
138
+			return this._peek(key, this.cache);
139
+		}
140
+
141
+		if (this.oldCache.has(key)) {
142
+			return this._peek(key, this.oldCache);
143
+		}
144
+	}
145
+
146
+	delete(key) {
147
+		const deleted = this.cache.delete(key);
148
+		if (deleted) {
149
+			this._size--;
150
+		}
151
+
152
+		return this.oldCache.delete(key) || deleted;
153
+	}
154
+
155
+	clear() {
156
+		this.cache.clear();
157
+		this.oldCache.clear();
158
+		this._size = 0;
159
+	}
160
+	
161
+	resize(newSize) {
162
+		if (!(newSize && newSize > 0)) {
163
+			throw new TypeError('`maxSize` must be a number greater than 0');
164
+		}
165
+
166
+		const items = [...this._entriesAscending()];
167
+		const removeCount = items.length - newSize;
168
+		if (removeCount < 0) {
169
+			this.cache = new Map(items);
170
+			this.oldCache = new Map();
171
+			this._size = items.length;
172
+		} else {
173
+			if (removeCount > 0) {
174
+				this._emitEvictions(items.slice(0, removeCount));
175
+			}
176
+
177
+			this.oldCache = new Map(items.slice(removeCount));
178
+			this.cache = new Map();
179
+			this._size = 0;
180
+		}
181
+
182
+		this.maxSize = newSize;
183
+	}
184
+
185
+	* keys() {
186
+		for (const [key] of this) {
187
+			yield key;
188
+		}
189
+	}
190
+
191
+	* values() {
192
+		for (const [, value] of this) {
193
+			yield value;
194
+		}
195
+	}
196
+
197
+	* [Symbol.iterator]() {
198
+		for (const item of this.cache) {
199
+			const [key, value] = item;
200
+			const deleted = this._deleteIfExpired(key, value);
201
+			if (deleted === false) {
202
+				yield [key, value.value];
203
+			}
204
+		}
205
+
206
+		for (const item of this.oldCache) {
207
+			const [key, value] = item;
208
+			if (!this.cache.has(key)) {
209
+				const deleted = this._deleteIfExpired(key, value);
210
+				if (deleted === false) {
211
+					yield [key, value.value];
212
+				}
213
+			}
214
+		}
215
+	}
216
+
217
+	* entriesDescending() {
218
+		let items = [...this.cache];
219
+		for (let i = items.length - 1; i >= 0; --i) {
220
+			const item = items[i];
221
+			const [key, value] = item;
222
+			const deleted = this._deleteIfExpired(key, value);
223
+			if (deleted === false) {
224
+				yield [key, value.value];
225
+			}
226
+		}
227
+
228
+		items = [...this.oldCache];
229
+		for (let i = items.length - 1; i >= 0; --i) {
230
+			const item = items[i];
231
+			const [key, value] = item;
232
+			if (!this.cache.has(key)) {
233
+				const deleted = this._deleteIfExpired(key, value);
234
+				if (deleted === false) {
235
+					yield [key, value.value];
236
+				}
237
+			}
238
+		}
239
+	}
240
+
241
+	* entriesAscending() {
242
+		for (const [key, value] of this._entriesAscending()) {
243
+			yield [key, value.value];
244
+		}
245
+	}
246
+
247
+	get size() {
248
+		if (!this._size) {
249
+			return this.oldCache.size;
250
+		}
251
+
252
+		let oldCacheSize = 0;
253
+		for (const key of this.oldCache.keys()) {
254
+			if (!this.cache.has(key)) {
255
+				oldCacheSize++;
256
+			}
257
+		}
258
+
259
+		return Math.min(this._size + oldCacheSize, this.maxSize);
260
+	}
261
+}
262
+
263
+module.exports = QuickLRU;

+ 9 - 0
node_modules/@alloc/quick-lru/license

@@ -0,0 +1,9 @@
1
+MIT License
2
+
3
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 43 - 0
node_modules/@alloc/quick-lru/package.json

@@ -0,0 +1,43 @@
1
+{
2
+	"name": "@alloc/quick-lru",
3
+	"version": "5.2.0",
4
+	"description": "Simple “Least Recently Used” (LRU) cache",
5
+	"license": "MIT",
6
+	"repository": "sindresorhus/quick-lru",
7
+	"funding": "https://github.com/sponsors/sindresorhus",
8
+	"author": {
9
+		"name": "Sindre Sorhus",
10
+		"email": "sindresorhus@gmail.com",
11
+		"url": "https://sindresorhus.com"
12
+	},
13
+	"engines": {
14
+		"node": ">=10"
15
+	},
16
+	"scripts": {
17
+		"test": "xo && nyc ava && tsd"
18
+	},
19
+	"files": [
20
+		"index.js",
21
+		"index.d.ts"
22
+	],
23
+	"keywords": [
24
+		"lru",
25
+		"quick",
26
+		"cache",
27
+		"caching",
28
+		"least",
29
+		"recently",
30
+		"used",
31
+		"fast",
32
+		"map",
33
+		"hash",
34
+		"buffer"
35
+	],
36
+	"devDependencies": {
37
+		"ava": "^2.0.0",
38
+		"coveralls": "^3.0.3",
39
+		"nyc": "^15.0.0",
40
+		"tsd": "^0.11.0",
41
+		"xo": "^0.26.0"
42
+	}
43
+}

+ 139 - 0
node_modules/@alloc/quick-lru/readme.md

@@ -0,0 +1,139 @@
1
+# quick-lru [![Build Status](https://travis-ci.org/sindresorhus/quick-lru.svg?branch=master)](https://travis-ci.org/sindresorhus/quick-lru) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/quick-lru/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/quick-lru?branch=master)
2
+
3
+> Simple [“Least Recently Used” (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29)
4
+
5
+Useful when you need to cache something and limit memory usage.
6
+
7
+Inspired by the [`hashlru` algorithm](https://github.com/dominictarr/hashlru#algorithm), but instead uses [`Map`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map) to support keys of any type, not just strings, and values can be `undefined`.
8
+
9
+## Install
10
+
11
+```
12
+$ npm install quick-lru
13
+```
14
+
15
+## Usage
16
+
17
+```js
18
+const QuickLRU = require('quick-lru');
19
+
20
+const lru = new QuickLRU({maxSize: 1000});
21
+
22
+lru.set('🦄', '🌈');
23
+
24
+lru.has('🦄');
25
+//=> true
26
+
27
+lru.get('🦄');
28
+//=> '🌈'
29
+```
30
+
31
+## API
32
+
33
+### new QuickLRU(options?)
34
+
35
+Returns a new instance.
36
+
37
+### options
38
+
39
+Type: `object`
40
+
41
+#### maxSize
42
+
43
+*Required*\
44
+Type: `number`
45
+
46
+The maximum number of items before evicting the least recently used items.
47
+
48
+#### maxAge
49
+
50
+Type: `number`\
51
+Default: `Infinity`
52
+
53
+The maximum number of milliseconds an item should remain in cache.
54
+By default maxAge will be Infinity, which means that items will never expire.
55
+
56
+Lazy expiration happens upon the next `write` or `read` call.
57
+
58
+Individual expiration of an item can be specified by the `set(key, value, options)` method.
59
+
60
+#### onEviction
61
+
62
+*Optional*\
63
+Type: `(key, value) => void`
64
+
65
+Called right before an item is evicted from the cache.
66
+
67
+Useful for side effects or for items like object URLs that need explicit cleanup (`revokeObjectURL`).
68
+
69
+### Instance
70
+
71
+The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop.
72
+
73
+Both `key` and `value` can be of any type.
74
+
75
+#### .set(key, value, options?)
76
+
77
+Set an item. Returns the instance.
78
+
79
+Individual expiration of an item can be specified with the `maxAge` option. If not specified, the global `maxAge` value will be used in case it is specified on the constructor, otherwise the item will never expire.
80
+
81
+#### .get(key)
82
+
83
+Get an item.
84
+
85
+#### .has(key)
86
+
87
+Check if an item exists.
88
+
89
+#### .peek(key)
90
+
91
+Get an item without marking it as recently used.
92
+
93
+#### .delete(key)
94
+
95
+Delete an item.
96
+
97
+Returns `true` if the item is removed or `false` if the item doesn't exist.
98
+
99
+#### .clear()
100
+
101
+Delete all items.
102
+
103
+#### .resize(maxSize)
104
+
105
+Update the `maxSize`, discarding items as necessary. Insertion order is mostly preserved, though this is not a strong guarantee.
106
+
107
+Useful for on-the-fly tuning of cache sizes in live systems.
108
+
109
+#### .keys()
110
+
111
+Iterable for all the keys.
112
+
113
+#### .values()
114
+
115
+Iterable for all the values.
116
+
117
+#### .entriesAscending()
118
+
119
+Iterable for all entries, starting with the oldest (ascending in recency).
120
+
121
+#### .entriesDescending()
122
+
123
+Iterable for all entries, starting with the newest (descending in recency).
124
+
125
+#### .size
126
+
127
+The stored item count.
128
+
129
+---
130
+
131
+<div align="center">
132
+	<b>
133
+		<a href="https://tidelift.com/subscription/pkg/npm-quick-lru?utm_source=npm-quick-lru&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
134
+	</b>
135
+	<br>
136
+	<sub>
137
+		Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
138
+	</sub>
139
+</div>

+ 19 - 0
node_modules/@jridgewell/gen-mapping/LICENSE

@@ -0,0 +1,19 @@
1
+Copyright 2022 Justin Ridgewell <jridgewell@google.com>
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.

+ 227 - 0
node_modules/@jridgewell/gen-mapping/README.md

@@ -0,0 +1,227 @@
1
+# @jridgewell/gen-mapping
2
+
3
+> Generate source maps
4
+
5
+`gen-mapping` allows you to generate a source map during transpilation or minification.
6
+With a source map, you're able to trace the original location in the source file, either in Chrome's
7
+DevTools or using a library like [`@jridgewell/trace-mapping`][trace-mapping].
8
+
9
+You may already be familiar with the [`source-map`][source-map] package's `SourceMapGenerator`. This
10
+provides the same `addMapping` and `setSourceContent` API.
11
+
12
+## Installation
13
+
14
+```sh
15
+npm install @jridgewell/gen-mapping
16
+```
17
+
18
+## Usage
19
+
20
+```typescript
21
+import { GenMapping, addMapping, setSourceContent, toEncodedMap, toDecodedMap } from '@jridgewell/gen-mapping';
22
+
23
+const map = new GenMapping({
24
+  file: 'output.js',
25
+  sourceRoot: 'https://example.com/',
26
+});
27
+
28
+setSourceContent(map, 'input.js', `function foo() {}`);
29
+
30
+addMapping(map, {
31
+  // Lines start at line 1, columns at column 0.
32
+  generated: { line: 1, column: 0 },
33
+  source: 'input.js',
34
+  original: { line: 1, column: 0 },
35
+});
36
+
37
+addMapping(map, {
38
+  generated: { line: 1, column: 9 },
39
+  source: 'input.js',
40
+  original: { line: 1, column: 9 },
41
+  name: 'foo',
42
+});
43
+
44
+assert.deepEqual(toDecodedMap(map), {
45
+  version: 3,
46
+  file: 'output.js',
47
+  names: ['foo'],
48
+  sourceRoot: 'https://example.com/',
49
+  sources: ['input.js'],
50
+  sourcesContent: ['function foo() {}'],
51
+  mappings: [
52
+    [ [0, 0, 0, 0], [9, 0, 0, 9, 0] ]
53
+  ],
54
+});
55
+
56
+assert.deepEqual(toEncodedMap(map), {
57
+  version: 3,
58
+  file: 'output.js',
59
+  names: ['foo'],
60
+  sourceRoot: 'https://example.com/',
61
+  sources: ['input.js'],
62
+  sourcesContent: ['function foo() {}'],
63
+  mappings: 'AAAA,SAASA',
64
+});
65
+```
66
+
67
+### Smaller Sourcemaps
68
+
69
+Not everything needs to be added to a sourcemap, and needless markings can cause signficantly
70
+larger file sizes. `gen-mapping` exposes `maybeAddSegment`/`maybeAddMapping` APIs that will
71
+intelligently determine if this marking adds useful information. If not, the marking will be
72
+skipped.
73
+
74
+```typescript
75
+import { maybeAddMapping } from '@jridgewell/gen-mapping';
76
+
77
+const map = new GenMapping();
78
+
79
+// Adding a sourceless marking at the beginning of a line isn't useful.
80
+maybeAddMapping(map, {
81
+  generated: { line: 1, column: 0 },
82
+});
83
+
84
+// Adding a new source marking is useful.
85
+maybeAddMapping(map, {
86
+  generated: { line: 1, column: 0 },
87
+  source: 'input.js',
88
+  original: { line: 1, column: 0 },
89
+});
90
+
91
+// But adding another marking pointing to the exact same original location isn't, even if the
92
+// generated column changed.
93
+maybeAddMapping(map, {
94
+  generated: { line: 1, column: 9 },
95
+  source: 'input.js',
96
+  original: { line: 1, column: 0 },
97
+});
98
+
99
+assert.deepEqual(toEncodedMap(map), {
100
+  version: 3,
101
+  names: [],
102
+  sources: ['input.js'],
103
+  sourcesContent: [null],
104
+  mappings: 'AAAA',
105
+});
106
+```
107
+
108
+## Benchmarks
109
+
110
+```
111
+node v18.0.0
112
+
113
+amp.js.map
114
+Memory Usage:
115
+gen-mapping: addSegment      5852872 bytes
116
+gen-mapping: addMapping      7716042 bytes
117
+source-map-js                6143250 bytes
118
+source-map-0.6.1             6124102 bytes
119
+source-map-0.8.0             6121173 bytes
120
+Smallest memory usage is gen-mapping: addSegment
121
+
122
+Adding speed:
123
+gen-mapping:      addSegment x 441 ops/sec ±2.07% (90 runs sampled)
124
+gen-mapping:      addMapping x 350 ops/sec ±2.40% (86 runs sampled)
125
+source-map-js:    addMapping x 169 ops/sec ±2.42% (80 runs sampled)
126
+source-map-0.6.1: addMapping x 167 ops/sec ±2.56% (80 runs sampled)
127
+source-map-0.8.0: addMapping x 168 ops/sec ±2.52% (80 runs sampled)
128
+Fastest is gen-mapping:      addSegment
129
+
130
+Generate speed:
131
+gen-mapping:      decoded output x 150,824,370 ops/sec ±0.07% (102 runs sampled)
132
+gen-mapping:      encoded output x 663 ops/sec ±0.22% (98 runs sampled)
133
+source-map-js:    encoded output x 197 ops/sec ±0.45% (84 runs sampled)
134
+source-map-0.6.1: encoded output x 198 ops/sec ±0.33% (85 runs sampled)
135
+source-map-0.8.0: encoded output x 197 ops/sec ±0.06% (93 runs sampled)
136
+Fastest is gen-mapping:      decoded output
137
+
138
+
139
+***
140
+
141
+
142
+babel.min.js.map
143
+Memory Usage:
144
+gen-mapping: addSegment     37578063 bytes
145
+gen-mapping: addMapping     37212897 bytes
146
+source-map-js               47638527 bytes
147
+source-map-0.6.1            47690503 bytes
148
+source-map-0.8.0            47470188 bytes
149
+Smallest memory usage is gen-mapping: addMapping
150
+
151
+Adding speed:
152
+gen-mapping:      addSegment x 31.05 ops/sec ±8.31% (43 runs sampled)
153
+gen-mapping:      addMapping x 29.83 ops/sec ±7.36% (51 runs sampled)
154
+source-map-js:    addMapping x 20.73 ops/sec ±6.22% (38 runs sampled)
155
+source-map-0.6.1: addMapping x 20.03 ops/sec ±10.51% (38 runs sampled)
156
+source-map-0.8.0: addMapping x 19.30 ops/sec ±8.27% (37 runs sampled)
157
+Fastest is gen-mapping:      addSegment
158
+
159
+Generate speed:
160
+gen-mapping:      decoded output x 381,379,234 ops/sec ±0.29% (96 runs sampled)
161
+gen-mapping:      encoded output x 95.15 ops/sec ±2.98% (72 runs sampled)
162
+source-map-js:    encoded output x 15.20 ops/sec ±7.41% (33 runs sampled)
163
+source-map-0.6.1: encoded output x 16.36 ops/sec ±10.46% (31 runs sampled)
164
+source-map-0.8.0: encoded output x 16.06 ops/sec ±6.45% (31 runs sampled)
165
+Fastest is gen-mapping:      decoded output
166
+
167
+
168
+***
169
+
170
+
171
+preact.js.map
172
+Memory Usage:
173
+gen-mapping: addSegment       416247 bytes
174
+gen-mapping: addMapping       419824 bytes
175
+source-map-js                1024619 bytes
176
+source-map-0.6.1             1146004 bytes
177
+source-map-0.8.0             1113250 bytes
178
+Smallest memory usage is gen-mapping: addSegment
179
+
180
+Adding speed:
181
+gen-mapping:      addSegment x 13,755 ops/sec ±0.15% (98 runs sampled)
182
+gen-mapping:      addMapping x 13,013 ops/sec ±0.11% (101 runs sampled)
183
+source-map-js:    addMapping x 4,564 ops/sec ±0.21% (98 runs sampled)
184
+source-map-0.6.1: addMapping x 4,562 ops/sec ±0.11% (99 runs sampled)
185
+source-map-0.8.0: addMapping x 4,593 ops/sec ±0.11% (100 runs sampled)
186
+Fastest is gen-mapping:      addSegment
187
+
188
+Generate speed:
189
+gen-mapping:      decoded output x 379,864,020 ops/sec ±0.23% (93 runs sampled)
190
+gen-mapping:      encoded output x 14,368 ops/sec ±4.07% (82 runs sampled)
191
+source-map-js:    encoded output x 5,261 ops/sec ±0.21% (99 runs sampled)
192
+source-map-0.6.1: encoded output x 5,124 ops/sec ±0.58% (99 runs sampled)
193
+source-map-0.8.0: encoded output x 5,434 ops/sec ±0.33% (96 runs sampled)
194
+Fastest is gen-mapping:      decoded output
195
+
196
+
197
+***
198
+
199
+
200
+react.js.map
201
+Memory Usage:
202
+gen-mapping: addSegment       975096 bytes
203
+gen-mapping: addMapping      1102981 bytes
204
+source-map-js                2918836 bytes
205
+source-map-0.6.1             2885435 bytes
206
+source-map-0.8.0             2874336 bytes
207
+Smallest memory usage is gen-mapping: addSegment
208
+
209
+Adding speed:
210
+gen-mapping:      addSegment x 4,772 ops/sec ±0.15% (100 runs sampled)
211
+gen-mapping:      addMapping x 4,456 ops/sec ±0.13% (97 runs sampled)
212
+source-map-js:    addMapping x 1,618 ops/sec ±0.24% (97 runs sampled)
213
+source-map-0.6.1: addMapping x 1,622 ops/sec ±0.12% (99 runs sampled)
214
+source-map-0.8.0: addMapping x 1,631 ops/sec ±0.12% (100 runs sampled)
215
+Fastest is gen-mapping:      addSegment
216
+
217
+Generate speed:
218
+gen-mapping:      decoded output x 379,107,695 ops/sec ±0.07% (99 runs sampled)
219
+gen-mapping:      encoded output x 5,421 ops/sec ±1.60% (89 runs sampled)
220
+source-map-js:    encoded output x 2,113 ops/sec ±1.81% (98 runs sampled)
221
+source-map-0.6.1: encoded output x 2,126 ops/sec ±0.10% (100 runs sampled)
222
+source-map-0.8.0: encoded output x 2,176 ops/sec ±0.39% (98 runs sampled)
223
+Fastest is gen-mapping:      decoded output
224
+```
225
+
226
+[source-map]: https://www.npmjs.com/package/source-map
227
+[trace-mapping]: https://github.com/jridgewell/trace-mapping

+ 230 - 0
node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs

@@ -0,0 +1,230 @@
1
+import { SetArray, put } from '@jridgewell/set-array';
2
+import { encode } from '@jridgewell/sourcemap-codec';
3
+import { TraceMap, decodedMappings } from '@jridgewell/trace-mapping';
4
+
5
+const COLUMN = 0;
6
+const SOURCES_INDEX = 1;
7
+const SOURCE_LINE = 2;
8
+const SOURCE_COLUMN = 3;
9
+const NAMES_INDEX = 4;
10
+
11
+const NO_NAME = -1;
12
+/**
13
+ * A low-level API to associate a generated position with an original source position. Line and
14
+ * column here are 0-based, unlike `addMapping`.
15
+ */
16
+let addSegment;
17
+/**
18
+ * A high-level API to associate a generated position with an original source position. Line is
19
+ * 1-based, but column is 0-based, due to legacy behavior in `source-map` library.
20
+ */
21
+let addMapping;
22
+/**
23
+ * Same as `addSegment`, but will only add the segment if it generates useful information in the
24
+ * resulting map. This only works correctly if segments are added **in order**, meaning you should
25
+ * not add a segment with a lower generated line/column than one that came before.
26
+ */
27
+let maybeAddSegment;
28
+/**
29
+ * Same as `addMapping`, but will only add the mapping if it generates useful information in the
30
+ * resulting map. This only works correctly if mappings are added **in order**, meaning you should
31
+ * not add a mapping with a lower generated line/column than one that came before.
32
+ */
33
+let maybeAddMapping;
34
+/**
35
+ * Adds/removes the content of the source file to the source map.
36
+ */
37
+let setSourceContent;
38
+/**
39
+ * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
40
+ * a sourcemap, or to JSON.stringify.
41
+ */
42
+let toDecodedMap;
43
+/**
44
+ * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
45
+ * a sourcemap, or to JSON.stringify.
46
+ */
47
+let toEncodedMap;
48
+/**
49
+ * Constructs a new GenMapping, using the already present mappings of the input.
50
+ */
51
+let fromMap;
52
+/**
53
+ * Returns an array of high-level mapping objects for every recorded segment, which could then be
54
+ * passed to the `source-map` library.
55
+ */
56
+let allMappings;
57
+// This split declaration is only so that terser can elminiate the static initialization block.
58
+let addSegmentInternal;
59
+/**
60
+ * Provides the state to generate a sourcemap.
61
+ */
62
+class GenMapping {
63
+    constructor({ file, sourceRoot } = {}) {
64
+        this._names = new SetArray();
65
+        this._sources = new SetArray();
66
+        this._sourcesContent = [];
67
+        this._mappings = [];
68
+        this.file = file;
69
+        this.sourceRoot = sourceRoot;
70
+    }
71
+}
72
+(() => {
73
+    addSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {
74
+        return addSegmentInternal(false, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content);
75
+    };
76
+    maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {
77
+        return addSegmentInternal(true, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content);
78
+    };
79
+    addMapping = (map, mapping) => {
80
+        return addMappingInternal(false, map, mapping);
81
+    };
82
+    maybeAddMapping = (map, mapping) => {
83
+        return addMappingInternal(true, map, mapping);
84
+    };
85
+    setSourceContent = (map, source, content) => {
86
+        const { _sources: sources, _sourcesContent: sourcesContent } = map;
87
+        sourcesContent[put(sources, source)] = content;
88
+    };
89
+    toDecodedMap = (map) => {
90
+        const { file, sourceRoot, _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = map;
91
+        removeEmptyFinalLines(mappings);
92
+        return {
93
+            version: 3,
94
+            file: file || undefined,
95
+            names: names.array,
96
+            sourceRoot: sourceRoot || undefined,
97
+            sources: sources.array,
98
+            sourcesContent,
99
+            mappings,
100
+        };
101
+    };
102
+    toEncodedMap = (map) => {
103
+        const decoded = toDecodedMap(map);
104
+        return Object.assign(Object.assign({}, decoded), { mappings: encode(decoded.mappings) });
105
+    };
106
+    allMappings = (map) => {
107
+        const out = [];
108
+        const { _mappings: mappings, _sources: sources, _names: names } = map;
109
+        for (let i = 0; i < mappings.length; i++) {
110
+            const line = mappings[i];
111
+            for (let j = 0; j < line.length; j++) {
112
+                const seg = line[j];
113
+                const generated = { line: i + 1, column: seg[COLUMN] };
114
+                let source = undefined;
115
+                let original = undefined;
116
+                let name = undefined;
117
+                if (seg.length !== 1) {
118
+                    source = sources.array[seg[SOURCES_INDEX]];
119
+                    original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] };
120
+                    if (seg.length === 5)
121
+                        name = names.array[seg[NAMES_INDEX]];
122
+                }
123
+                out.push({ generated, source, original, name });
124
+            }
125
+        }
126
+        return out;
127
+    };
128
+    fromMap = (input) => {
129
+        const map = new TraceMap(input);
130
+        const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });
131
+        putAll(gen._names, map.names);
132
+        putAll(gen._sources, map.sources);
133
+        gen._sourcesContent = map.sourcesContent || map.sources.map(() => null);
134
+        gen._mappings = decodedMappings(map);
135
+        return gen;
136
+    };
137
+    // Internal helpers
138
+    addSegmentInternal = (skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {
139
+        const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = map;
140
+        const line = getLine(mappings, genLine);
141
+        const index = getColumnIndex(line, genColumn);
142
+        if (!source) {
143
+            if (skipable && skipSourceless(line, index))
144
+                return;
145
+            return insert(line, index, [genColumn]);
146
+        }
147
+        const sourcesIndex = put(sources, source);
148
+        const namesIndex = name ? put(names, name) : NO_NAME;
149
+        if (sourcesIndex === sourcesContent.length)
150
+            sourcesContent[sourcesIndex] = content !== null && content !== void 0 ? content : null;
151
+        if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {
152
+            return;
153
+        }
154
+        return insert(line, index, name
155
+            ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]
156
+            : [genColumn, sourcesIndex, sourceLine, sourceColumn]);
157
+    };
158
+})();
159
+function getLine(mappings, index) {
160
+    for (let i = mappings.length; i <= index; i++) {
161
+        mappings[i] = [];
162
+    }
163
+    return mappings[index];
164
+}
165
+function getColumnIndex(line, genColumn) {
166
+    let index = line.length;
167
+    for (let i = index - 1; i >= 0; index = i--) {
168
+        const current = line[i];
169
+        if (genColumn >= current[COLUMN])
170
+            break;
171
+    }
172
+    return index;
173
+}
174
+function insert(array, index, value) {
175
+    for (let i = array.length; i > index; i--) {
176
+        array[i] = array[i - 1];
177
+    }
178
+    array[index] = value;
179
+}
180
+function removeEmptyFinalLines(mappings) {
181
+    const { length } = mappings;
182
+    let len = length;
183
+    for (let i = len - 1; i >= 0; len = i, i--) {
184
+        if (mappings[i].length > 0)
185
+            break;
186
+    }
187
+    if (len < length)
188
+        mappings.length = len;
189
+}
190
+function putAll(strarr, array) {
191
+    for (let i = 0; i < array.length; i++)
192
+        put(strarr, array[i]);
193
+}
194
+function skipSourceless(line, index) {
195
+    // The start of a line is already sourceless, so adding a sourceless segment to the beginning
196
+    // doesn't generate any useful information.
197
+    if (index === 0)
198
+        return true;
199
+    const prev = line[index - 1];
200
+    // If the previous segment is also sourceless, then adding another sourceless segment doesn't
201
+    // genrate any new information. Else, this segment will end the source/named segment and point to
202
+    // a sourceless position, which is useful.
203
+    return prev.length === 1;
204
+}
205
+function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) {
206
+    // A source/named segment at the start of a line gives position at that genColumn
207
+    if (index === 0)
208
+        return false;
209
+    const prev = line[index - 1];
210
+    // If the previous segment is sourceless, then we're transitioning to a source.
211
+    if (prev.length === 1)
212
+        return false;
213
+    // If the previous segment maps to the exact same source position, then this segment doesn't
214
+    // provide any new position information.
215
+    return (sourcesIndex === prev[SOURCES_INDEX] &&
216
+        sourceLine === prev[SOURCE_LINE] &&
217
+        sourceColumn === prev[SOURCE_COLUMN] &&
218
+        namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME));
219
+}
220
+function addMappingInternal(skipable, map, mapping) {
221
+    const { generated, source, original, name, content } = mapping;
222
+    if (!source) {
223
+        return addSegmentInternal(skipable, map, generated.line - 1, generated.column, null, null, null, null, null);
224
+    }
225
+    const s = source;
226
+    return addSegmentInternal(skipable, map, generated.line - 1, generated.column, s, original.line - 1, original.column, name, content);
227
+}
228
+
229
+export { GenMapping, addMapping, addSegment, allMappings, fromMap, maybeAddMapping, maybeAddSegment, setSourceContent, toDecodedMap, toEncodedMap };
230
+//# sourceMappingURL=gen-mapping.mjs.map

File diff suppressed because it is too large
+ 1 - 0
node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map


+ 236 - 0
node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js

@@ -0,0 +1,236 @@
1
+(function (global, factory) {
2
+    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@jridgewell/set-array'), require('@jridgewell/sourcemap-codec'), require('@jridgewell/trace-mapping')) :
3
+    typeof define === 'function' && define.amd ? define(['exports', '@jridgewell/set-array', '@jridgewell/sourcemap-codec', '@jridgewell/trace-mapping'], factory) :
4
+    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.genMapping = {}, global.setArray, global.sourcemapCodec, global.traceMapping));
5
+})(this, (function (exports, setArray, sourcemapCodec, traceMapping) { 'use strict';
6
+
7
+    const COLUMN = 0;
8
+    const SOURCES_INDEX = 1;
9
+    const SOURCE_LINE = 2;
10
+    const SOURCE_COLUMN = 3;
11
+    const NAMES_INDEX = 4;
12
+
13
+    const NO_NAME = -1;
14
+    /**
15
+     * A low-level API to associate a generated position with an original source position. Line and
16
+     * column here are 0-based, unlike `addMapping`.
17
+     */
18
+    exports.addSegment = void 0;
19
+    /**
20
+     * A high-level API to associate a generated position with an original source position. Line is
21
+     * 1-based, but column is 0-based, due to legacy behavior in `source-map` library.
22
+     */
23
+    exports.addMapping = void 0;
24
+    /**
25
+     * Same as `addSegment`, but will only add the segment if it generates useful information in the
26
+     * resulting map. This only works correctly if segments are added **in order**, meaning you should
27
+     * not add a segment with a lower generated line/column than one that came before.
28
+     */
29
+    exports.maybeAddSegment = void 0;
30
+    /**
31
+     * Same as `addMapping`, but will only add the mapping if it generates useful information in the
32
+     * resulting map. This only works correctly if mappings are added **in order**, meaning you should
33
+     * not add a mapping with a lower generated line/column than one that came before.
34
+     */
35
+    exports.maybeAddMapping = void 0;
36
+    /**
37
+     * Adds/removes the content of the source file to the source map.
38
+     */
39
+    exports.setSourceContent = void 0;
40
+    /**
41
+     * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
42
+     * a sourcemap, or to JSON.stringify.
43
+     */
44
+    exports.toDecodedMap = void 0;
45
+    /**
46
+     * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
47
+     * a sourcemap, or to JSON.stringify.
48
+     */
49
+    exports.toEncodedMap = void 0;
50
+    /**
51
+     * Constructs a new GenMapping, using the already present mappings of the input.
52
+     */
53
+    exports.fromMap = void 0;
54
+    /**
55
+     * Returns an array of high-level mapping objects for every recorded segment, which could then be
56
+     * passed to the `source-map` library.
57
+     */
58
+    exports.allMappings = void 0;
59
+    // This split declaration is only so that terser can elminiate the static initialization block.
60
+    let addSegmentInternal;
61
+    /**
62
+     * Provides the state to generate a sourcemap.
63
+     */
64
+    class GenMapping {
65
+        constructor({ file, sourceRoot } = {}) {
66
+            this._names = new setArray.SetArray();
67
+            this._sources = new setArray.SetArray();
68
+            this._sourcesContent = [];
69
+            this._mappings = [];
70
+            this.file = file;
71
+            this.sourceRoot = sourceRoot;
72
+        }
73
+    }
74
+    (() => {
75
+        exports.addSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {
76
+            return addSegmentInternal(false, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content);
77
+        };
78
+        exports.maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {
79
+            return addSegmentInternal(true, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content);
80
+        };
81
+        exports.addMapping = (map, mapping) => {
82
+            return addMappingInternal(false, map, mapping);
83
+        };
84
+        exports.maybeAddMapping = (map, mapping) => {
85
+            return addMappingInternal(true, map, mapping);
86
+        };
87
+        exports.setSourceContent = (map, source, content) => {
88
+            const { _sources: sources, _sourcesContent: sourcesContent } = map;
89
+            sourcesContent[setArray.put(sources, source)] = content;
90
+        };
91
+        exports.toDecodedMap = (map) => {
92
+            const { file, sourceRoot, _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = map;
93
+            removeEmptyFinalLines(mappings);
94
+            return {
95
+                version: 3,
96
+                file: file || undefined,
97
+                names: names.array,
98
+                sourceRoot: sourceRoot || undefined,
99
+                sources: sources.array,
100
+                sourcesContent,
101
+                mappings,
102
+            };
103
+        };
104
+        exports.toEncodedMap = (map) => {
105
+            const decoded = exports.toDecodedMap(map);
106
+            return Object.assign(Object.assign({}, decoded), { mappings: sourcemapCodec.encode(decoded.mappings) });
107
+        };
108
+        exports.allMappings = (map) => {
109
+            const out = [];
110
+            const { _mappings: mappings, _sources: sources, _names: names } = map;
111
+            for (let i = 0; i < mappings.length; i++) {
112
+                const line = mappings[i];
113
+                for (let j = 0; j < line.length; j++) {
114
+                    const seg = line[j];
115
+                    const generated = { line: i + 1, column: seg[COLUMN] };
116
+                    let source = undefined;
117
+                    let original = undefined;
118
+                    let name = undefined;
119
+                    if (seg.length !== 1) {
120
+                        source = sources.array[seg[SOURCES_INDEX]];
121
+                        original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] };
122
+                        if (seg.length === 5)
123
+                            name = names.array[seg[NAMES_INDEX]];
124
+                    }
125
+                    out.push({ generated, source, original, name });
126
+                }
127
+            }
128
+            return out;
129
+        };
130
+        exports.fromMap = (input) => {
131
+            const map = new traceMapping.TraceMap(input);
132
+            const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });
133
+            putAll(gen._names, map.names);
134
+            putAll(gen._sources, map.sources);
135
+            gen._sourcesContent = map.sourcesContent || map.sources.map(() => null);
136
+            gen._mappings = traceMapping.decodedMappings(map);
137
+            return gen;
138
+        };
139
+        // Internal helpers
140
+        addSegmentInternal = (skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {
141
+            const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = map;
142
+            const line = getLine(mappings, genLine);
143
+            const index = getColumnIndex(line, genColumn);
144
+            if (!source) {
145
+                if (skipable && skipSourceless(line, index))
146
+                    return;
147
+                return insert(line, index, [genColumn]);
148
+            }
149
+            const sourcesIndex = setArray.put(sources, source);
150
+            const namesIndex = name ? setArray.put(names, name) : NO_NAME;
151
+            if (sourcesIndex === sourcesContent.length)
152
+                sourcesContent[sourcesIndex] = content !== null && content !== void 0 ? content : null;
153
+            if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {
154
+                return;
155
+            }
156
+            return insert(line, index, name
157
+                ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]
158
+                : [genColumn, sourcesIndex, sourceLine, sourceColumn]);
159
+        };
160
+    })();
161
+    function getLine(mappings, index) {
162
+        for (let i = mappings.length; i <= index; i++) {
163
+            mappings[i] = [];
164
+        }
165
+        return mappings[index];
166
+    }
167
+    function getColumnIndex(line, genColumn) {
168
+        let index = line.length;
169
+        for (let i = index - 1; i >= 0; index = i--) {
170
+            const current = line[i];
171
+            if (genColumn >= current[COLUMN])
172
+                break;
173
+        }
174
+        return index;
175
+    }
176
+    function insert(array, index, value) {
177
+        for (let i = array.length; i > index; i--) {
178
+            array[i] = array[i - 1];
179
+        }
180
+        array[index] = value;
181
+    }
182
+    function removeEmptyFinalLines(mappings) {
183
+        const { length } = mappings;
184
+        let len = length;
185
+        for (let i = len - 1; i >= 0; len = i, i--) {
186
+            if (mappings[i].length > 0)
187
+                break;
188
+        }
189
+        if (len < length)
190
+            mappings.length = len;
191
+    }
192
+    function putAll(strarr, array) {
193
+        for (let i = 0; i < array.length; i++)
194
+            setArray.put(strarr, array[i]);
195
+    }
196
+    function skipSourceless(line, index) {
197
+        // The start of a line is already sourceless, so adding a sourceless segment to the beginning
198
+        // doesn't generate any useful information.
199
+        if (index === 0)
200
+            return true;
201
+        const prev = line[index - 1];
202
+        // If the previous segment is also sourceless, then adding another sourceless segment doesn't
203
+        // genrate any new information. Else, this segment will end the source/named segment and point to
204
+        // a sourceless position, which is useful.
205
+        return prev.length === 1;
206
+    }
207
+    function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) {
208
+        // A source/named segment at the start of a line gives position at that genColumn
209
+        if (index === 0)
210
+            return false;
211
+        const prev = line[index - 1];
212
+        // If the previous segment is sourceless, then we're transitioning to a source.
213
+        if (prev.length === 1)
214
+            return false;
215
+        // If the previous segment maps to the exact same source position, then this segment doesn't
216
+        // provide any new position information.
217
+        return (sourcesIndex === prev[SOURCES_INDEX] &&
218
+            sourceLine === prev[SOURCE_LINE] &&
219
+            sourceColumn === prev[SOURCE_COLUMN] &&
220
+            namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME));
221
+    }
222
+    function addMappingInternal(skipable, map, mapping) {
223
+        const { generated, source, original, name, content } = mapping;
224
+        if (!source) {
225
+            return addSegmentInternal(skipable, map, generated.line - 1, generated.column, null, null, null, null, null);
226
+        }
227
+        const s = source;
228
+        return addSegmentInternal(skipable, map, generated.line - 1, generated.column, s, original.line - 1, original.column, name, content);
229
+    }
230
+
231
+    exports.GenMapping = GenMapping;
232
+
233
+    Object.defineProperty(exports, '__esModule', { value: true });
234
+
235
+}));
236
+//# sourceMappingURL=gen-mapping.umd.js.map

File diff suppressed because it is too large
+ 1 - 0
node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map


+ 90 - 0
node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts

@@ -0,0 +1,90 @@
1
+import type { SourceMapInput } from '@jridgewell/trace-mapping';
2
+import type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types';
3
+export type { DecodedSourceMap, EncodedSourceMap, Mapping };
4
+export declare type Options = {
5
+    file?: string | null;
6
+    sourceRoot?: string | null;
7
+};
8
+/**
9
+ * A low-level API to associate a generated position with an original source position. Line and
10
+ * column here are 0-based, unlike `addMapping`.
11
+ */
12
+export declare let addSegment: {
13
+    (map: GenMapping, genLine: number, genColumn: number, source?: null, sourceLine?: null, sourceColumn?: null, name?: null, content?: null): void;
14
+    (map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name?: null, content?: string | null): void;
15
+    (map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name: string, content?: string | null): void;
16
+};
17
+/**
18
+ * A high-level API to associate a generated position with an original source position. Line is
19
+ * 1-based, but column is 0-based, due to legacy behavior in `source-map` library.
20
+ */
21
+export declare let addMapping: {
22
+    (map: GenMapping, mapping: {
23
+        generated: Pos;
24
+        source?: null;
25
+        original?: null;
26
+        name?: null;
27
+        content?: null;
28
+    }): void;
29
+    (map: GenMapping, mapping: {
30
+        generated: Pos;
31
+        source: string;
32
+        original: Pos;
33
+        name?: null;
34
+        content?: string | null;
35
+    }): void;
36
+    (map: GenMapping, mapping: {
37
+        generated: Pos;
38
+        source: string;
39
+        original: Pos;
40
+        name: string;
41
+        content?: string | null;
42
+    }): void;
43
+};
44
+/**
45
+ * Same as `addSegment`, but will only add the segment if it generates useful information in the
46
+ * resulting map. This only works correctly if segments are added **in order**, meaning you should
47
+ * not add a segment with a lower generated line/column than one that came before.
48
+ */
49
+export declare let maybeAddSegment: typeof addSegment;
50
+/**
51
+ * Same as `addMapping`, but will only add the mapping if it generates useful information in the
52
+ * resulting map. This only works correctly if mappings are added **in order**, meaning you should
53
+ * not add a mapping with a lower generated line/column than one that came before.
54
+ */
55
+export declare let maybeAddMapping: typeof addMapping;
56
+/**
57
+ * Adds/removes the content of the source file to the source map.
58
+ */
59
+export declare let setSourceContent: (map: GenMapping, source: string, content: string | null) => void;
60
+/**
61
+ * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
62
+ * a sourcemap, or to JSON.stringify.
63
+ */
64
+export declare let toDecodedMap: (map: GenMapping) => DecodedSourceMap;
65
+/**
66
+ * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
67
+ * a sourcemap, or to JSON.stringify.
68
+ */
69
+export declare let toEncodedMap: (map: GenMapping) => EncodedSourceMap;
70
+/**
71
+ * Constructs a new GenMapping, using the already present mappings of the input.
72
+ */
73
+export declare let fromMap: (input: SourceMapInput) => GenMapping;
74
+/**
75
+ * Returns an array of high-level mapping objects for every recorded segment, which could then be
76
+ * passed to the `source-map` library.
77
+ */
78
+export declare let allMappings: (map: GenMapping) => Mapping[];
79
+/**
80
+ * Provides the state to generate a sourcemap.
81
+ */
82
+export declare class GenMapping {
83
+    private _names;
84
+    private _sources;
85
+    private _sourcesContent;
86
+    private _mappings;
87
+    file: string | null | undefined;
88
+    sourceRoot: string | null | undefined;
89
+    constructor({ file, sourceRoot }?: Options);
90
+}

+ 12 - 0
node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts

@@ -0,0 +1,12 @@
1
+declare type GeneratedColumn = number;
2
+declare type SourcesIndex = number;
3
+declare type SourceLine = number;
4
+declare type SourceColumn = number;
5
+declare type NamesIndex = number;
6
+export declare type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];
7
+export declare const COLUMN = 0;
8
+export declare const SOURCES_INDEX = 1;
9
+export declare const SOURCE_LINE = 2;
10
+export declare const SOURCE_COLUMN = 3;
11
+export declare const NAMES_INDEX = 4;
12
+export {};

+ 35 - 0
node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts

@@ -0,0 +1,35 @@
1
+import type { SourceMapSegment } from './sourcemap-segment';
2
+export interface SourceMapV3 {
3
+    file?: string | null;
4
+    names: readonly string[];
5
+    sourceRoot?: string;
6
+    sources: readonly (string | null)[];
7
+    sourcesContent?: readonly (string | null)[];
8
+    version: 3;
9
+}
10
+export interface EncodedSourceMap extends SourceMapV3 {
11
+    mappings: string;
12
+}
13
+export interface DecodedSourceMap extends SourceMapV3 {
14
+    mappings: readonly SourceMapSegment[][];
15
+}
16
+export interface Pos {
17
+    line: number;
18
+    column: number;
19
+}
20
+export declare type Mapping = {
21
+    generated: Pos;
22
+    source: undefined;
23
+    original: undefined;
24
+    name: undefined;
25
+} | {
26
+    generated: Pos;
27
+    source: string;
28
+    original: Pos;
29
+    name: string;
30
+} | {
31
+    generated: Pos;
32
+    source: string;
33
+    original: Pos;
34
+    name: undefined;
35
+};

+ 77 - 0
node_modules/@jridgewell/gen-mapping/package.json

@@ -0,0 +1,77 @@
1
+{
2
+  "name": "@jridgewell/gen-mapping",
3
+  "version": "0.3.3",
4
+  "description": "Generate source maps",
5
+  "keywords": [
6
+    "source",
7
+    "map"
8
+  ],
9
+  "author": "Justin Ridgewell <justin@ridgewell.name>",
10
+  "license": "MIT",
11
+  "repository": "https://github.com/jridgewell/gen-mapping",
12
+  "main": "dist/gen-mapping.umd.js",
13
+  "module": "dist/gen-mapping.mjs",
14
+  "types": "dist/types/gen-mapping.d.ts",
15
+  "exports": {
16
+    ".": [
17
+      {
18
+        "types": "./dist/types/gen-mapping.d.ts",
19
+        "browser": "./dist/gen-mapping.umd.js",
20
+        "require": "./dist/gen-mapping.umd.js",
21
+        "import": "./dist/gen-mapping.mjs"
22
+      },
23
+      "./dist/gen-mapping.umd.js"
24
+    ],
25
+    "./package.json": "./package.json"
26
+  },
27
+  "files": [
28
+    "dist"
29
+  ],
30
+  "engines": {
31
+    "node": ">=6.0.0"
32
+  },
33
+  "scripts": {
34
+    "benchmark": "run-s build:rollup benchmark:*",
35
+    "benchmark:install": "cd benchmark && npm install",
36
+    "benchmark:only": "node benchmark/index.mjs",
37
+    "prebuild": "rm -rf dist",
38
+    "build": "run-s -n build:*",
39
+    "build:rollup": "rollup -c rollup.config.js",
40
+    "build:ts": "tsc --project tsconfig.build.json",
41
+    "lint": "run-s -n lint:*",
42
+    "lint:prettier": "npm run test:lint:prettier -- --write",
43
+    "lint:ts": "npm run test:lint:ts -- --fix",
44
+    "pretest": "run-s build:rollup",
45
+    "test": "run-s -n test:lint test:coverage",
46
+    "test:debug": "mocha --inspect-brk",
47
+    "test:lint": "run-s -n test:lint:*",
48
+    "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
49
+    "test:lint:ts": "eslint '{src,test}/**/*.ts'",
50
+    "test:only": "mocha",
51
+    "test:coverage": "c8 mocha",
52
+    "test:watch": "run-p 'build:rollup -- --watch' 'test:only -- --watch'",
53
+    "prepublishOnly": "npm run preversion",
54
+    "preversion": "run-s test build"
55
+  },
56
+  "devDependencies": {
57
+    "@rollup/plugin-typescript": "8.3.2",
58
+    "@types/mocha": "9.1.1",
59
+    "@types/node": "17.0.29",
60
+    "@typescript-eslint/eslint-plugin": "5.21.0",
61
+    "@typescript-eslint/parser": "5.21.0",
62
+    "benchmark": "2.1.4",
63
+    "c8": "7.11.2",
64
+    "eslint": "8.14.0",
65
+    "eslint-config-prettier": "8.5.0",
66
+    "mocha": "9.2.2",
67
+    "npm-run-all": "4.1.5",
68
+    "prettier": "2.6.2",
69
+    "rollup": "2.70.2",
70
+    "typescript": "4.6.3"
71
+  },
72
+  "dependencies": {
73
+    "@jridgewell/set-array": "^1.0.1",
74
+    "@jridgewell/sourcemap-codec": "^1.4.10",
75
+    "@jridgewell/trace-mapping": "^0.3.9"
76
+  }
77
+}

+ 19 - 0
node_modules/@jridgewell/resolve-uri/LICENSE

@@ -0,0 +1,19 @@
1
+Copyright 2019 Justin Ridgewell <jridgewell@google.com>
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.

+ 40 - 0
node_modules/@jridgewell/resolve-uri/README.md

@@ -0,0 +1,40 @@
1
+# @jridgewell/resolve-uri
2
+
3
+> Resolve a URI relative to an optional base URI
4
+
5
+Resolve any combination of absolute URIs, protocol-realtive URIs, absolute paths, or relative paths.
6
+
7
+## Installation
8
+
9
+```sh
10
+npm install @jridgewell/resolve-uri
11
+```
12
+
13
+## Usage
14
+
15
+```typescript
16
+function resolve(input: string, base?: string): string;
17
+```
18
+
19
+```js
20
+import resolve from '@jridgewell/resolve-uri';
21
+
22
+resolve('foo', 'https://example.com'); // => 'https://example.com/foo'
23
+```
24
+
25
+| Input                 | Base                    | Resolution                     | Explanation                                                  |
26
+|-----------------------|-------------------------|--------------------------------|--------------------------------------------------------------|
27
+| `https://example.com` | _any_                   | `https://example.com/`         | Input is normalized only                                     |
28
+| `//example.com`       | `https://base.com/`     | `https://example.com/`         | Input inherits the base's protocol                           |
29
+| `//example.com`       | _rest_                  | `//example.com/`               | Input is normalized only                                     |
30
+| `/example`            | `https://base.com/`     | `https://base.com/example`     | Input inherits the base's origin                             |
31
+| `/example`            | `//base.com/`           | `//base.com/example`           | Input inherits the base's host and remains protocol relative |
32
+| `/example`            | _rest_                  | `/example`                     | Input is normalized only                                     |
33
+| `example`             | `https://base.com/dir/` | `https://base.com/dir/example` | Input is joined with the base                                |
34
+| `example`             | `https://base.com/file` | `https://base.com/example`     | Input is joined with the base without its file               |
35
+| `example`             | `//base.com/dir/`       | `//base.com/dir/example`       | Input is joined with the base's last directory               |
36
+| `example`             | `//base.com/file`       | `//base.com/example`           | Input is joined with the base without its file               |
37
+| `example`             | `/base/dir/`            | `/base/dir/example`            | Input is joined with the base's last directory               |
38
+| `example`             | `/base/file`            | `/base/example`                | Input is joined with the base without its file               |
39
+| `example`             | `base/dir/`             | `base/dir/example`             | Input is joined with the base's last directory               |
40
+| `example`             | `base/file`             | `base/example`                 | Input is joined with the base without its file               |

+ 242 - 0
node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs

@@ -0,0 +1,242 @@
1
+// Matches the scheme of a URL, eg "http://"
2
+const schemeRegex = /^[\w+.-]+:\/\//;
3
+/**
4
+ * Matches the parts of a URL:
5
+ * 1. Scheme, including ":", guaranteed.
6
+ * 2. User/password, including "@", optional.
7
+ * 3. Host, guaranteed.
8
+ * 4. Port, including ":", optional.
9
+ * 5. Path, including "/", optional.
10
+ * 6. Query, including "?", optional.
11
+ * 7. Hash, including "#", optional.
12
+ */
13
+const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
14
+/**
15
+ * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start
16
+ * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).
17
+ *
18
+ * 1. Host, optional.
19
+ * 2. Path, which may include "/", guaranteed.
20
+ * 3. Query, including "?", optional.
21
+ * 4. Hash, including "#", optional.
22
+ */
23
+const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
24
+var UrlType;
25
+(function (UrlType) {
26
+    UrlType[UrlType["Empty"] = 1] = "Empty";
27
+    UrlType[UrlType["Hash"] = 2] = "Hash";
28
+    UrlType[UrlType["Query"] = 3] = "Query";
29
+    UrlType[UrlType["RelativePath"] = 4] = "RelativePath";
30
+    UrlType[UrlType["AbsolutePath"] = 5] = "AbsolutePath";
31
+    UrlType[UrlType["SchemeRelative"] = 6] = "SchemeRelative";
32
+    UrlType[UrlType["Absolute"] = 7] = "Absolute";
33
+})(UrlType || (UrlType = {}));
34
+function isAbsoluteUrl(input) {
35
+    return schemeRegex.test(input);
36
+}
37
+function isSchemeRelativeUrl(input) {
38
+    return input.startsWith('//');
39
+}
40
+function isAbsolutePath(input) {
41
+    return input.startsWith('/');
42
+}
43
+function isFileUrl(input) {
44
+    return input.startsWith('file:');
45
+}
46
+function isRelative(input) {
47
+    return /^[.?#]/.test(input);
48
+}
49
+function parseAbsoluteUrl(input) {
50
+    const match = urlRegex.exec(input);
51
+    return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || '');
52
+}
53
+function parseFileUrl(input) {
54
+    const match = fileRegex.exec(input);
55
+    const path = match[2];
56
+    return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || '');
57
+}
58
+function makeUrl(scheme, user, host, port, path, query, hash) {
59
+    return {
60
+        scheme,
61
+        user,
62
+        host,
63
+        port,
64
+        path,
65
+        query,
66
+        hash,
67
+        type: UrlType.Absolute,
68
+    };
69
+}
70
+function parseUrl(input) {
71
+    if (isSchemeRelativeUrl(input)) {
72
+        const url = parseAbsoluteUrl('http:' + input);
73
+        url.scheme = '';
74
+        url.type = UrlType.SchemeRelative;
75
+        return url;
76
+    }
77
+    if (isAbsolutePath(input)) {
78
+        const url = parseAbsoluteUrl('http://foo.com' + input);
79
+        url.scheme = '';
80
+        url.host = '';
81
+        url.type = UrlType.AbsolutePath;
82
+        return url;
83
+    }
84
+    if (isFileUrl(input))
85
+        return parseFileUrl(input);
86
+    if (isAbsoluteUrl(input))
87
+        return parseAbsoluteUrl(input);
88
+    const url = parseAbsoluteUrl('http://foo.com/' + input);
89
+    url.scheme = '';
90
+    url.host = '';
91
+    url.type = input
92
+        ? input.startsWith('?')
93
+            ? UrlType.Query
94
+            : input.startsWith('#')
95
+                ? UrlType.Hash
96
+                : UrlType.RelativePath
97
+        : UrlType.Empty;
98
+    return url;
99
+}
100
+function stripPathFilename(path) {
101
+    // If a path ends with a parent directory "..", then it's a relative path with excess parent
102
+    // paths. It's not a file, so we can't strip it.
103
+    if (path.endsWith('/..'))
104
+        return path;
105
+    const index = path.lastIndexOf('/');
106
+    return path.slice(0, index + 1);
107
+}
108
+function mergePaths(url, base) {
109
+    normalizePath(base, base.type);
110
+    // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative
111
+    // path).
112
+    if (url.path === '/') {
113
+        url.path = base.path;
114
+    }
115
+    else {
116
+        // Resolution happens relative to the base path's directory, not the file.
117
+        url.path = stripPathFilename(base.path) + url.path;
118
+    }
119
+}
120
+/**
121
+ * The path can have empty directories "//", unneeded parents "foo/..", or current directory
122
+ * "foo/.". We need to normalize to a standard representation.
123
+ */
124
+function normalizePath(url, type) {
125
+    const rel = type <= UrlType.RelativePath;
126
+    const pieces = url.path.split('/');
127
+    // We need to preserve the first piece always, so that we output a leading slash. The item at
128
+    // pieces[0] is an empty string.
129
+    let pointer = 1;
130
+    // Positive is the number of real directories we've output, used for popping a parent directory.
131
+    // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo".
132
+    let positive = 0;
133
+    // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will
134
+    // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a
135
+    // real directory, we won't need to append, unless the other conditions happen again.
136
+    let addTrailingSlash = false;
137
+    for (let i = 1; i < pieces.length; i++) {
138
+        const piece = pieces[i];
139
+        // An empty directory, could be a trailing slash, or just a double "//" in the path.
140
+        if (!piece) {
141
+            addTrailingSlash = true;
142
+            continue;
143
+        }
144
+        // If we encounter a real directory, then we don't need to append anymore.
145
+        addTrailingSlash = false;
146
+        // A current directory, which we can always drop.
147
+        if (piece === '.')
148
+            continue;
149
+        // A parent directory, we need to see if there are any real directories we can pop. Else, we
150
+        // have an excess of parents, and we'll need to keep the "..".
151
+        if (piece === '..') {
152
+            if (positive) {
153
+                addTrailingSlash = true;
154
+                positive--;
155
+                pointer--;
156
+            }
157
+            else if (rel) {
158
+                // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute
159
+                // URL, protocol relative URL, or an absolute path, we don't need to keep excess.
160
+                pieces[pointer++] = piece;
161
+            }
162
+            continue;
163
+        }
164
+        // We've encountered a real directory. Move it to the next insertion pointer, which accounts for
165
+        // any popped or dropped directories.
166
+        pieces[pointer++] = piece;
167
+        positive++;
168
+    }
169
+    let path = '';
170
+    for (let i = 1; i < pointer; i++) {
171
+        path += '/' + pieces[i];
172
+    }
173
+    if (!path || (addTrailingSlash && !path.endsWith('/..'))) {
174
+        path += '/';
175
+    }
176
+    url.path = path;
177
+}
178
+/**
179
+ * Attempts to resolve `input` URL/path relative to `base`.
180
+ */
181
+function resolve(input, base) {
182
+    if (!input && !base)
183
+        return '';
184
+    const url = parseUrl(input);
185
+    let inputType = url.type;
186
+    if (base && inputType !== UrlType.Absolute) {
187
+        const baseUrl = parseUrl(base);
188
+        const baseType = baseUrl.type;
189
+        switch (inputType) {
190
+            case UrlType.Empty:
191
+                url.hash = baseUrl.hash;
192
+            // fall through
193
+            case UrlType.Hash:
194
+                url.query = baseUrl.query;
195
+            // fall through
196
+            case UrlType.Query:
197
+            case UrlType.RelativePath:
198
+                mergePaths(url, baseUrl);
199
+            // fall through
200
+            case UrlType.AbsolutePath:
201
+                // The host, user, and port are joined, you can't copy one without the others.
202
+                url.user = baseUrl.user;
203
+                url.host = baseUrl.host;
204
+                url.port = baseUrl.port;
205
+            // fall through
206
+            case UrlType.SchemeRelative:
207
+                // The input doesn't have a schema at least, so we need to copy at least that over.
208
+                url.scheme = baseUrl.scheme;
209
+        }
210
+        if (baseType > inputType)
211
+            inputType = baseType;
212
+    }
213
+    normalizePath(url, inputType);
214
+    const queryHash = url.query + url.hash;
215
+    switch (inputType) {
216
+        // This is impossible, because of the empty checks at the start of the function.
217
+        // case UrlType.Empty:
218
+        case UrlType.Hash:
219
+        case UrlType.Query:
220
+            return queryHash;
221
+        case UrlType.RelativePath: {
222
+            // The first char is always a "/", and we need it to be relative.
223
+            const path = url.path.slice(1);
224
+            if (!path)
225
+                return queryHash || '.';
226
+            if (isRelative(base || input) && !isRelative(path)) {
227
+                // If base started with a leading ".", or there is no base and input started with a ".",
228
+                // then we need to ensure that the relative path starts with a ".". We don't know if
229
+                // relative starts with a "..", though, so check before prepending.
230
+                return './' + path + queryHash;
231
+            }
232
+            return path + queryHash;
233
+        }
234
+        case UrlType.AbsolutePath:
235
+            return url.path + queryHash;
236
+        default:
237
+            return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;
238
+    }
239
+}
240
+
241
+export { resolve as default };
242
+//# sourceMappingURL=resolve-uri.mjs.map

File diff suppressed because it is too large
+ 1 - 0
node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map


+ 250 - 0
node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js

@@ -0,0 +1,250 @@
1
+(function (global, factory) {
2
+    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
+    typeof define === 'function' && define.amd ? define(factory) :
4
+    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.resolveURI = factory());
5
+})(this, (function () { 'use strict';
6
+
7
+    // Matches the scheme of a URL, eg "http://"
8
+    const schemeRegex = /^[\w+.-]+:\/\//;
9
+    /**
10
+     * Matches the parts of a URL:
11
+     * 1. Scheme, including ":", guaranteed.
12
+     * 2. User/password, including "@", optional.
13
+     * 3. Host, guaranteed.
14
+     * 4. Port, including ":", optional.
15
+     * 5. Path, including "/", optional.
16
+     * 6. Query, including "?", optional.
17
+     * 7. Hash, including "#", optional.
18
+     */
19
+    const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
20
+    /**
21
+     * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start
22
+     * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).
23
+     *
24
+     * 1. Host, optional.
25
+     * 2. Path, which may include "/", guaranteed.
26
+     * 3. Query, including "?", optional.
27
+     * 4. Hash, including "#", optional.
28
+     */
29
+    const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
30
+    var UrlType;
31
+    (function (UrlType) {
32
+        UrlType[UrlType["Empty"] = 1] = "Empty";
33
+        UrlType[UrlType["Hash"] = 2] = "Hash";
34
+        UrlType[UrlType["Query"] = 3] = "Query";
35
+        UrlType[UrlType["RelativePath"] = 4] = "RelativePath";
36
+        UrlType[UrlType["AbsolutePath"] = 5] = "AbsolutePath";
37
+        UrlType[UrlType["SchemeRelative"] = 6] = "SchemeRelative";
38
+        UrlType[UrlType["Absolute"] = 7] = "Absolute";
39
+    })(UrlType || (UrlType = {}));
40
+    function isAbsoluteUrl(input) {
41
+        return schemeRegex.test(input);
42
+    }
43
+    function isSchemeRelativeUrl(input) {
44
+        return input.startsWith('//');
45
+    }
46
+    function isAbsolutePath(input) {
47
+        return input.startsWith('/');
48
+    }
49
+    function isFileUrl(input) {
50
+        return input.startsWith('file:');
51
+    }
52
+    function isRelative(input) {
53
+        return /^[.?#]/.test(input);
54
+    }
55
+    function parseAbsoluteUrl(input) {
56
+        const match = urlRegex.exec(input);
57
+        return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || '');
58
+    }
59
+    function parseFileUrl(input) {
60
+        const match = fileRegex.exec(input);
61
+        const path = match[2];
62
+        return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || '');
63
+    }
64
+    function makeUrl(scheme, user, host, port, path, query, hash) {
65
+        return {
66
+            scheme,
67
+            user,
68
+            host,
69
+            port,
70
+            path,
71
+            query,
72
+            hash,
73
+            type: UrlType.Absolute,
74
+        };
75
+    }
76
+    function parseUrl(input) {
77
+        if (isSchemeRelativeUrl(input)) {
78
+            const url = parseAbsoluteUrl('http:' + input);
79
+            url.scheme = '';
80
+            url.type = UrlType.SchemeRelative;
81
+            return url;
82
+        }
83
+        if (isAbsolutePath(input)) {
84
+            const url = parseAbsoluteUrl('http://foo.com' + input);
85
+            url.scheme = '';
86
+            url.host = '';
87
+            url.type = UrlType.AbsolutePath;
88
+            return url;
89
+        }
90
+        if (isFileUrl(input))
91
+            return parseFileUrl(input);
92
+        if (isAbsoluteUrl(input))
93
+            return parseAbsoluteUrl(input);
94
+        const url = parseAbsoluteUrl('http://foo.com/' + input);
95
+        url.scheme = '';
96
+        url.host = '';
97
+        url.type = input
98
+            ? input.startsWith('?')
99
+                ? UrlType.Query
100
+                : input.startsWith('#')
101
+                    ? UrlType.Hash
102
+                    : UrlType.RelativePath
103
+            : UrlType.Empty;
104
+        return url;
105
+    }
106
+    function stripPathFilename(path) {
107
+        // If a path ends with a parent directory "..", then it's a relative path with excess parent
108
+        // paths. It's not a file, so we can't strip it.
109
+        if (path.endsWith('/..'))
110
+            return path;
111
+        const index = path.lastIndexOf('/');
112
+        return path.slice(0, index + 1);
113
+    }
114
+    function mergePaths(url, base) {
115
+        normalizePath(base, base.type);
116
+        // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative
117
+        // path).
118
+        if (url.path === '/') {
119
+            url.path = base.path;
120
+        }
121
+        else {
122
+            // Resolution happens relative to the base path's directory, not the file.
123
+            url.path = stripPathFilename(base.path) + url.path;
124
+        }
125
+    }
126
+    /**
127
+     * The path can have empty directories "//", unneeded parents "foo/..", or current directory
128
+     * "foo/.". We need to normalize to a standard representation.
129
+     */
130
+    function normalizePath(url, type) {
131
+        const rel = type <= UrlType.RelativePath;
132
+        const pieces = url.path.split('/');
133
+        // We need to preserve the first piece always, so that we output a leading slash. The item at
134
+        // pieces[0] is an empty string.
135
+        let pointer = 1;
136
+        // Positive is the number of real directories we've output, used for popping a parent directory.
137
+        // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo".
138
+        let positive = 0;
139
+        // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will
140
+        // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a
141
+        // real directory, we won't need to append, unless the other conditions happen again.
142
+        let addTrailingSlash = false;
143
+        for (let i = 1; i < pieces.length; i++) {
144
+            const piece = pieces[i];
145
+            // An empty directory, could be a trailing slash, or just a double "//" in the path.
146
+            if (!piece) {
147
+                addTrailingSlash = true;
148
+                continue;
149
+            }
150
+            // If we encounter a real directory, then we don't need to append anymore.
151
+            addTrailingSlash = false;
152
+            // A current directory, which we can always drop.
153
+            if (piece === '.')
154
+                continue;
155
+            // A parent directory, we need to see if there are any real directories we can pop. Else, we
156
+            // have an excess of parents, and we'll need to keep the "..".
157
+            if (piece === '..') {
158
+                if (positive) {
159
+                    addTrailingSlash = true;
160
+                    positive--;
161
+                    pointer--;
162
+                }
163
+                else if (rel) {
164
+                    // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute
165
+                    // URL, protocol relative URL, or an absolute path, we don't need to keep excess.
166
+                    pieces[pointer++] = piece;
167
+                }
168
+                continue;
169
+            }
170
+            // We've encountered a real directory. Move it to the next insertion pointer, which accounts for
171
+            // any popped or dropped directories.
172
+            pieces[pointer++] = piece;
173
+            positive++;
174
+        }
175
+        let path = '';
176
+        for (let i = 1; i < pointer; i++) {
177
+            path += '/' + pieces[i];
178
+        }
179
+        if (!path || (addTrailingSlash && !path.endsWith('/..'))) {
180
+            path += '/';
181
+        }
182
+        url.path = path;
183
+    }
184
+    /**
185
+     * Attempts to resolve `input` URL/path relative to `base`.
186
+     */
187
+    function resolve(input, base) {
188
+        if (!input && !base)
189
+            return '';
190
+        const url = parseUrl(input);
191
+        let inputType = url.type;
192
+        if (base && inputType !== UrlType.Absolute) {
193
+            const baseUrl = parseUrl(base);
194
+            const baseType = baseUrl.type;
195
+            switch (inputType) {
196
+                case UrlType.Empty:
197
+                    url.hash = baseUrl.hash;
198
+                // fall through
199
+                case UrlType.Hash:
200
+                    url.query = baseUrl.query;
201
+                // fall through
202
+                case UrlType.Query:
203
+                case UrlType.RelativePath:
204
+                    mergePaths(url, baseUrl);
205
+                // fall through
206
+                case UrlType.AbsolutePath:
207
+                    // The host, user, and port are joined, you can't copy one without the others.
208
+                    url.user = baseUrl.user;
209
+                    url.host = baseUrl.host;
210
+                    url.port = baseUrl.port;
211
+                // fall through
212
+                case UrlType.SchemeRelative:
213
+                    // The input doesn't have a schema at least, so we need to copy at least that over.
214
+                    url.scheme = baseUrl.scheme;
215
+            }
216
+            if (baseType > inputType)
217
+                inputType = baseType;
218
+        }
219
+        normalizePath(url, inputType);
220
+        const queryHash = url.query + url.hash;
221
+        switch (inputType) {
222
+            // This is impossible, because of the empty checks at the start of the function.
223
+            // case UrlType.Empty:
224
+            case UrlType.Hash:
225
+            case UrlType.Query:
226
+                return queryHash;
227
+            case UrlType.RelativePath: {
228
+                // The first char is always a "/", and we need it to be relative.
229
+                const path = url.path.slice(1);
230
+                if (!path)
231
+                    return queryHash || '.';
232
+                if (isRelative(base || input) && !isRelative(path)) {
233
+                    // If base started with a leading ".", or there is no base and input started with a ".",
234
+                    // then we need to ensure that the relative path starts with a ".". We don't know if
235
+                    // relative starts with a "..", though, so check before prepending.
236
+                    return './' + path + queryHash;
237
+                }
238
+                return path + queryHash;
239
+            }
240
+            case UrlType.AbsolutePath:
241
+                return url.path + queryHash;
242
+            default:
243
+                return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;
244
+        }
245
+    }
246
+
247
+    return resolve;
248
+
249
+}));
250
+//# sourceMappingURL=resolve-uri.umd.js.map

File diff suppressed because it is too large
+ 1 - 0
node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map


+ 4 - 0
node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts

@@ -0,0 +1,4 @@
1
+/**
2
+ * Attempts to resolve `input` URL/path relative to `base`.
3
+ */
4
+export default function resolve(input: string, base: string | undefined): string;

+ 69 - 0
node_modules/@jridgewell/resolve-uri/package.json

@@ -0,0 +1,69 @@
1
+{
2
+  "name": "@jridgewell/resolve-uri",
3
+  "version": "3.1.0",
4
+  "description": "Resolve a URI relative to an optional base URI",
5
+  "keywords": [
6
+    "resolve",
7
+    "uri",
8
+    "url",
9
+    "path"
10
+  ],
11
+  "author": "Justin Ridgewell <justin@ridgewell.name>",
12
+  "license": "MIT",
13
+  "repository": "https://github.com/jridgewell/resolve-uri",
14
+  "main": "dist/resolve-uri.umd.js",
15
+  "module": "dist/resolve-uri.mjs",
16
+  "typings": "dist/types/resolve-uri.d.ts",
17
+  "exports": {
18
+    ".": [
19
+      {
20
+        "types": "./dist/types/resolve-uri.d.ts",
21
+        "browser": "./dist/resolve-uri.umd.js",
22
+        "require": "./dist/resolve-uri.umd.js",
23
+        "import": "./dist/resolve-uri.mjs"
24
+      },
25
+      "./dist/resolve-uri.umd.js"
26
+    ],
27
+    "./package.json": "./package.json"
28
+  },
29
+  "files": [
30
+    "dist"
31
+  ],
32
+  "engines": {
33
+    "node": ">=6.0.0"
34
+  },
35
+  "scripts": {
36
+    "prebuild": "rm -rf dist",
37
+    "build": "run-s -n build:*",
38
+    "build:rollup": "rollup -c rollup.config.js",
39
+    "build:ts": "tsc --project tsconfig.build.json",
40
+    "lint": "run-s -n lint:*",
41
+    "lint:prettier": "npm run test:lint:prettier -- --write",
42
+    "lint:ts": "npm run test:lint:ts -- --fix",
43
+    "pretest": "run-s build:rollup",
44
+    "test": "run-s -n test:lint test:only",
45
+    "test:debug": "mocha --inspect-brk",
46
+    "test:lint": "run-s -n test:lint:*",
47
+    "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
48
+    "test:lint:ts": "eslint '{src,test}/**/*.ts'",
49
+    "test:only": "mocha",
50
+    "test:coverage": "c8 mocha",
51
+    "test:watch": "mocha --watch",
52
+    "prepublishOnly": "npm run preversion",
53
+    "preversion": "run-s test build"
54
+  },
55
+  "devDependencies": {
56
+    "@jridgewell/resolve-uri-latest": "npm:@jridgewell/resolve-uri@*",
57
+    "@rollup/plugin-typescript": "8.3.0",
58
+    "@typescript-eslint/eslint-plugin": "5.10.0",
59
+    "@typescript-eslint/parser": "5.10.0",
60
+    "c8": "7.11.0",
61
+    "eslint": "8.7.0",
62
+    "eslint-config-prettier": "8.3.0",
63
+    "mocha": "9.2.0",
64
+    "npm-run-all": "4.1.5",
65
+    "prettier": "2.5.1",
66
+    "rollup": "2.66.0",
67
+    "typescript": "4.5.5"
68
+  }
69
+}

+ 19 - 0
node_modules/@jridgewell/set-array/LICENSE

@@ -0,0 +1,19 @@
1
+Copyright 2022 Justin Ridgewell <jridgewell@google.com>
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.

+ 37 - 0
node_modules/@jridgewell/set-array/README.md

@@ -0,0 +1,37 @@
1
+# @jridgewell/set-array
2
+
3
+> Like a Set, but provides the index of the `key` in the backing array
4
+
5
+This is designed to allow synchronizing a second array with the contents of the backing array, like
6
+how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, and there
7
+are never duplicates.
8
+
9
+## Installation
10
+
11
+```sh
12
+npm install @jridgewell/set-array
13
+```
14
+
15
+## Usage
16
+
17
+```js
18
+import { SetArray, get, put, pop } from '@jridgewell/set-array';
19
+
20
+const sa = new SetArray();
21
+
22
+let index = put(sa, 'first');
23
+assert.strictEqual(index, 0);
24
+
25
+index = put(sa, 'second');
26
+assert.strictEqual(index, 1);
27
+
28
+assert.deepEqual(sa.array, [ 'first', 'second' ]);
29
+
30
+index = get(sa, 'first');
31
+assert.strictEqual(index, 0);
32
+
33
+pop(sa);
34
+index = get(sa, 'second');
35
+assert.strictEqual(index, undefined);
36
+assert.deepEqual(sa.array, [ 'first' ]);
37
+```

+ 48 - 0
node_modules/@jridgewell/set-array/dist/set-array.mjs

@@ -0,0 +1,48 @@
1
+/**
2
+ * Gets the index associated with `key` in the backing array, if it is already present.
3
+ */
4
+let get;
5
+/**
6
+ * Puts `key` into the backing array, if it is not already present. Returns
7
+ * the index of the `key` in the backing array.
8
+ */
9
+let put;
10
+/**
11
+ * Pops the last added item out of the SetArray.
12
+ */
13
+let pop;
14
+/**
15
+ * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the
16
+ * index of the `key` in the backing array.
17
+ *
18
+ * This is designed to allow synchronizing a second array with the contents of the backing array,
19
+ * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,
20
+ * and there are never duplicates.
21
+ */
22
+class SetArray {
23
+    constructor() {
24
+        this._indexes = { __proto__: null };
25
+        this.array = [];
26
+    }
27
+}
28
+(() => {
29
+    get = (strarr, key) => strarr._indexes[key];
30
+    put = (strarr, key) => {
31
+        // The key may or may not be present. If it is present, it's a number.
32
+        const index = get(strarr, key);
33
+        if (index !== undefined)
34
+            return index;
35
+        const { array, _indexes: indexes } = strarr;
36
+        return (indexes[key] = array.push(key) - 1);
37
+    };
38
+    pop = (strarr) => {
39
+        const { array, _indexes: indexes } = strarr;
40
+        if (array.length === 0)
41
+            return;
42
+        const last = array.pop();
43
+        indexes[last] = undefined;
44
+    };
45
+})();
46
+
47
+export { SetArray, get, pop, put };
48
+//# sourceMappingURL=set-array.mjs.map

File diff suppressed because it is too large
+ 1 - 0
node_modules/@jridgewell/set-array/dist/set-array.mjs.map


+ 58 - 0
node_modules/@jridgewell/set-array/dist/set-array.umd.js

@@ -0,0 +1,58 @@
1
+(function (global, factory) {
2
+    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
+    typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
+    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.setArray = {}));
5
+})(this, (function (exports) { 'use strict';
6
+
7
+    /**
8
+     * Gets the index associated with `key` in the backing array, if it is already present.
9
+     */
10
+    exports.get = void 0;
11
+    /**
12
+     * Puts `key` into the backing array, if it is not already present. Returns
13
+     * the index of the `key` in the backing array.
14
+     */
15
+    exports.put = void 0;
16
+    /**
17
+     * Pops the last added item out of the SetArray.
18
+     */
19
+    exports.pop = void 0;
20
+    /**
21
+     * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the
22
+     * index of the `key` in the backing array.
23
+     *
24
+     * This is designed to allow synchronizing a second array with the contents of the backing array,
25
+     * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,
26
+     * and there are never duplicates.
27
+     */
28
+    class SetArray {
29
+        constructor() {
30
+            this._indexes = { __proto__: null };
31
+            this.array = [];
32
+        }
33
+    }
34
+    (() => {
35
+        exports.get = (strarr, key) => strarr._indexes[key];
36
+        exports.put = (strarr, key) => {
37
+            // The key may or may not be present. If it is present, it's a number.
38
+            const index = exports.get(strarr, key);
39
+            if (index !== undefined)
40
+                return index;
41
+            const { array, _indexes: indexes } = strarr;
42
+            return (indexes[key] = array.push(key) - 1);
43
+        };
44
+        exports.pop = (strarr) => {
45
+            const { array, _indexes: indexes } = strarr;
46
+            if (array.length === 0)
47
+                return;
48
+            const last = array.pop();
49
+            indexes[last] = undefined;
50
+        };
51
+    })();
52
+
53
+    exports.SetArray = SetArray;
54
+
55
+    Object.defineProperty(exports, '__esModule', { value: true });
56
+
57
+}));
58
+//# sourceMappingURL=set-array.umd.js.map

File diff suppressed because it is too large
+ 1 - 0
node_modules/@jridgewell/set-array/dist/set-array.umd.js.map


+ 26 - 0
node_modules/@jridgewell/set-array/dist/types/set-array.d.ts

@@ -0,0 +1,26 @@
1
+/**
2
+ * Gets the index associated with `key` in the backing array, if it is already present.
3
+ */
4
+export declare let get: (strarr: SetArray, key: string) => number | undefined;
5
+/**
6
+ * Puts `key` into the backing array, if it is not already present. Returns
7
+ * the index of the `key` in the backing array.
8
+ */
9
+export declare let put: (strarr: SetArray, key: string) => number;
10
+/**
11
+ * Pops the last added item out of the SetArray.
12
+ */
13
+export declare let pop: (strarr: SetArray) => void;
14
+/**
15
+ * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the
16
+ * index of the `key` in the backing array.
17
+ *
18
+ * This is designed to allow synchronizing a second array with the contents of the backing array,
19
+ * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,
20
+ * and there are never duplicates.
21
+ */
22
+export declare class SetArray {
23
+    private _indexes;
24
+    array: readonly string[];
25
+    constructor();
26
+}

+ 66 - 0
node_modules/@jridgewell/set-array/package.json

@@ -0,0 +1,66 @@
1
+{
2
+  "name": "@jridgewell/set-array",
3
+  "version": "1.1.2",
4
+  "description": "Like a Set, but provides the index of the `key` in the backing array",
5
+  "keywords": [],
6
+  "author": "Justin Ridgewell <justin@ridgewell.name>",
7
+  "license": "MIT",
8
+  "repository": "https://github.com/jridgewell/set-array",
9
+  "main": "dist/set-array.umd.js",
10
+  "module": "dist/set-array.mjs",
11
+  "typings": "dist/types/set-array.d.ts",
12
+  "exports": {
13
+    ".": [
14
+      {
15
+        "types": "./dist/types/set-array.d.ts",
16
+        "browser": "./dist/set-array.umd.js",
17
+        "require": "./dist/set-array.umd.js",
18
+        "import": "./dist/set-array.mjs"
19
+      },
20
+      "./dist/set-array.umd.js"
21
+    ],
22
+    "./package.json": "./package.json"
23
+  },
24
+  "files": [
25
+    "dist",
26
+    "src"
27
+  ],
28
+  "engines": {
29
+    "node": ">=6.0.0"
30
+  },
31
+  "scripts": {
32
+    "prebuild": "rm -rf dist",
33
+    "build": "run-s -n build:*",
34
+    "build:rollup": "rollup -c rollup.config.js",
35
+    "build:ts": "tsc --project tsconfig.build.json",
36
+    "lint": "run-s -n lint:*",
37
+    "lint:prettier": "npm run test:lint:prettier -- --write",
38
+    "lint:ts": "npm run test:lint:ts -- --fix",
39
+    "pretest": "run-s build:rollup",
40
+    "test": "run-s -n test:lint test:only",
41
+    "test:debug": "mocha --inspect-brk",
42
+    "test:lint": "run-s -n test:lint:*",
43
+    "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
44
+    "test:lint:ts": "eslint '{src,test}/**/*.ts'",
45
+    "test:only": "mocha",
46
+    "test:coverage": "c8 mocha",
47
+    "test:watch": "mocha --watch",
48
+    "prepublishOnly": "npm run preversion",
49
+    "preversion": "run-s test build"
50
+  },
51
+  "devDependencies": {
52
+    "@rollup/plugin-typescript": "8.3.0",
53
+    "@types/mocha": "9.1.1",
54
+    "@types/node": "17.0.29",
55
+    "@typescript-eslint/eslint-plugin": "5.10.0",
56
+    "@typescript-eslint/parser": "5.10.0",
57
+    "c8": "7.11.0",
58
+    "eslint": "8.7.0",
59
+    "eslint-config-prettier": "8.3.0",
60
+    "mocha": "9.2.0",
61
+    "npm-run-all": "4.1.5",
62
+    "prettier": "2.5.1",
63
+    "rollup": "2.66.0",
64
+    "typescript": "4.5.5"
65
+  }
66
+}

+ 55 - 0
node_modules/@jridgewell/set-array/src/set-array.ts

@@ -0,0 +1,55 @@
1
+/**
2
+ * Gets the index associated with `key` in the backing array, if it is already present.
3
+ */
4
+export let get: (strarr: SetArray, key: string) => number | undefined;
5
+
6
+/**
7
+ * Puts `key` into the backing array, if it is not already present. Returns
8
+ * the index of the `key` in the backing array.
9
+ */
10
+export let put: (strarr: SetArray, key: string) => number;
11
+
12
+/**
13
+ * Pops the last added item out of the SetArray.
14
+ */
15
+export let pop: (strarr: SetArray) => void;
16
+
17
+/**
18
+ * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the
19
+ * index of the `key` in the backing array.
20
+ *
21
+ * This is designed to allow synchronizing a second array with the contents of the backing array,
22
+ * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,
23
+ * and there are never duplicates.
24
+ */
25
+export class SetArray {
26
+  private declare _indexes: { [key: string]: number | undefined };
27
+  declare array: readonly string[];
28
+
29
+  constructor() {
30
+    this._indexes = { __proto__: null } as any;
31
+    this.array = [];
32
+  }
33
+
34
+  static {
35
+    get = (strarr, key) => strarr._indexes[key];
36
+
37
+    put = (strarr, key) => {
38
+      // The key may or may not be present. If it is present, it's a number.
39
+      const index = get(strarr, key);
40
+      if (index !== undefined) return index;
41
+
42
+      const { array, _indexes: indexes } = strarr;
43
+
44
+      return (indexes[key] = (array as string[]).push(key) - 1);
45
+    };
46
+
47
+    pop = (strarr) => {
48
+      const { array, _indexes: indexes } = strarr;
49
+      if (array.length === 0) return;
50
+
51
+      const last = (array as string[]).pop()!;
52
+      indexes[last] = undefined;
53
+    };
54
+  }
55
+}

+ 21 - 0
node_modules/@jridgewell/sourcemap-codec/LICENSE

@@ -0,0 +1,21 @@
1
+The MIT License
2
+
3
+Copyright (c) 2015 Rich Harris
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy
6
+of this software and associated documentation files (the "Software"), to deal
7
+in the Software without restriction, including without limitation the rights
8
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+copies of the Software, and to permit persons to whom the Software is
10
+furnished to do so, subject to the following conditions:
11
+
12
+The above copyright notice and this permission notice shall be included in
13
+all copies or substantial portions of the Software.
14
+
15
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+THE SOFTWARE.

+ 200 - 0
node_modules/@jridgewell/sourcemap-codec/README.md

@@ -0,0 +1,200 @@
1
+# @jridgewell/sourcemap-codec
2
+
3
+Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit).
4
+
5
+
6
+## Why?
7
+
8
+Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap.
9
+
10
+This package makes the process slightly easier.
11
+
12
+
13
+## Installation
14
+
15
+```bash
16
+npm install @jridgewell/sourcemap-codec
17
+```
18
+
19
+
20
+## Usage
21
+
22
+```js
23
+import { encode, decode } from '@jridgewell/sourcemap-codec';
24
+
25
+var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
26
+
27
+assert.deepEqual( decoded, [
28
+	// the first line (of the generated code) has no mappings,
29
+	// as shown by the starting semi-colon (which separates lines)
30
+	[],
31
+
32
+	// the second line contains four (comma-separated) segments
33
+	[
34
+		// segments are encoded as you'd expect:
35
+		// [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ]
36
+
37
+		// i.e. the first segment begins at column 2, and maps back to the second column
38
+		// of the second line (both zero-based) of the 0th source, and uses the 0th
39
+		// name in the `map.names` array
40
+		[ 2, 0, 2, 2, 0 ],
41
+
42
+		// the remaining segments are 4-length rather than 5-length,
43
+		// because they don't map a name
44
+		[ 4, 0, 2, 4 ],
45
+		[ 6, 0, 2, 5 ],
46
+		[ 7, 0, 2, 7 ]
47
+	],
48
+
49
+	// the final line contains two segments
50
+	[
51
+		[ 2, 1, 10, 19 ],
52
+		[ 12, 1, 11, 20 ]
53
+	]
54
+]);
55
+
56
+var encoded = encode( decoded );
57
+assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
58
+```
59
+
60
+## Benchmarks
61
+
62
+```
63
+node v18.0.0
64
+
65
+amp.js.map - 45120 segments
66
+
67
+Decode Memory Usage:
68
+@jridgewell/sourcemap-codec       5479160 bytes
69
+sourcemap-codec                   5659336 bytes
70
+source-map-0.6.1                 17144440 bytes
71
+source-map-0.8.0                  6867424 bytes
72
+Smallest memory usage is @jridgewell/sourcemap-codec
73
+
74
+Decode speed:
75
+decode: @jridgewell/sourcemap-codec x 502 ops/sec ±1.03% (90 runs sampled)
76
+decode: sourcemap-codec x 445 ops/sec ±0.97% (92 runs sampled)
77
+decode: source-map-0.6.1 x 36.01 ops/sec ±1.64% (49 runs sampled)
78
+decode: source-map-0.8.0 x 367 ops/sec ±0.04% (95 runs sampled)
79
+Fastest is decode: @jridgewell/sourcemap-codec
80
+
81
+Encode Memory Usage:
82
+@jridgewell/sourcemap-codec       1261620 bytes
83
+sourcemap-codec                   9119248 bytes
84
+source-map-0.6.1                  8968560 bytes
85
+source-map-0.8.0                  8952952 bytes
86
+Smallest memory usage is @jridgewell/sourcemap-codec
87
+
88
+Encode speed:
89
+encode: @jridgewell/sourcemap-codec x 738 ops/sec ±0.42% (98 runs sampled)
90
+encode: sourcemap-codec x 238 ops/sec ±0.73% (88 runs sampled)
91
+encode: source-map-0.6.1 x 162 ops/sec ±0.43% (84 runs sampled)
92
+encode: source-map-0.8.0 x 191 ops/sec ±0.34% (90 runs sampled)
93
+Fastest is encode: @jridgewell/sourcemap-codec
94
+
95
+
96
+***
97
+
98
+
99
+babel.min.js.map - 347793 segments
100
+
101
+Decode Memory Usage:
102
+@jridgewell/sourcemap-codec      35338184 bytes
103
+sourcemap-codec                  35922736 bytes
104
+source-map-0.6.1                 62366360 bytes
105
+source-map-0.8.0                 44337416 bytes
106
+Smallest memory usage is @jridgewell/sourcemap-codec
107
+
108
+Decode speed:
109
+decode: @jridgewell/sourcemap-codec x 40.35 ops/sec ±4.47% (54 runs sampled)
110
+decode: sourcemap-codec x 36.76 ops/sec ±3.67% (51 runs sampled)
111
+decode: source-map-0.6.1 x 4.44 ops/sec ±2.15% (16 runs sampled)
112
+decode: source-map-0.8.0 x 59.35 ops/sec ±0.05% (78 runs sampled)
113
+Fastest is decode: source-map-0.8.0
114
+
115
+Encode Memory Usage:
116
+@jridgewell/sourcemap-codec       7212604 bytes
117
+sourcemap-codec                  21421456 bytes
118
+source-map-0.6.1                 25286888 bytes
119
+source-map-0.8.0                 25498744 bytes
120
+Smallest memory usage is @jridgewell/sourcemap-codec
121
+
122
+Encode speed:
123
+encode: @jridgewell/sourcemap-codec x 112 ops/sec ±0.13% (84 runs sampled)
124
+encode: sourcemap-codec x 30.23 ops/sec ±2.76% (53 runs sampled)
125
+encode: source-map-0.6.1 x 19.43 ops/sec ±3.70% (37 runs sampled)
126
+encode: source-map-0.8.0 x 19.40 ops/sec ±3.26% (37 runs sampled)
127
+Fastest is encode: @jridgewell/sourcemap-codec
128
+
129
+
130
+***
131
+
132
+
133
+preact.js.map - 1992 segments
134
+
135
+Decode Memory Usage:
136
+@jridgewell/sourcemap-codec        500272 bytes
137
+sourcemap-codec                    516864 bytes
138
+source-map-0.6.1                  1596672 bytes
139
+source-map-0.8.0                   517272 bytes
140
+Smallest memory usage is @jridgewell/sourcemap-codec
141
+
142
+Decode speed:
143
+decode: @jridgewell/sourcemap-codec x 16,137 ops/sec ±0.17% (99 runs sampled)
144
+decode: sourcemap-codec x 12,139 ops/sec ±0.13% (99 runs sampled)
145
+decode: source-map-0.6.1 x 1,264 ops/sec ±0.12% (100 runs sampled)
146
+decode: source-map-0.8.0 x 9,894 ops/sec ±0.08% (101 runs sampled)
147
+Fastest is decode: @jridgewell/sourcemap-codec
148
+
149
+Encode Memory Usage:
150
+@jridgewell/sourcemap-codec        321026 bytes
151
+sourcemap-codec                    830832 bytes
152
+source-map-0.6.1                   586608 bytes
153
+source-map-0.8.0                   586680 bytes
154
+Smallest memory usage is @jridgewell/sourcemap-codec
155
+
156
+Encode speed:
157
+encode: @jridgewell/sourcemap-codec x 19,876 ops/sec ±0.78% (95 runs sampled)
158
+encode: sourcemap-codec x 6,983 ops/sec ±0.15% (100 runs sampled)
159
+encode: source-map-0.6.1 x 5,070 ops/sec ±0.12% (102 runs sampled)
160
+encode: source-map-0.8.0 x 5,641 ops/sec ±0.17% (100 runs sampled)
161
+Fastest is encode: @jridgewell/sourcemap-codec
162
+
163
+
164
+***
165
+
166
+
167
+react.js.map - 5726 segments
168
+
169
+Decode Memory Usage:
170
+@jridgewell/sourcemap-codec        734848 bytes
171
+sourcemap-codec                    954200 bytes
172
+source-map-0.6.1                  2276432 bytes
173
+source-map-0.8.0                   955488 bytes
174
+Smallest memory usage is @jridgewell/sourcemap-codec
175
+
176
+Decode speed:
177
+decode: @jridgewell/sourcemap-codec x 5,723 ops/sec ±0.12% (98 runs sampled)
178
+decode: sourcemap-codec x 4,555 ops/sec ±0.09% (101 runs sampled)
179
+decode: source-map-0.6.1 x 437 ops/sec ±0.11% (93 runs sampled)
180
+decode: source-map-0.8.0 x 3,441 ops/sec ±0.15% (100 runs sampled)
181
+Fastest is decode: @jridgewell/sourcemap-codec
182
+
183
+Encode Memory Usage:
184
+@jridgewell/sourcemap-codec        638672 bytes
185
+sourcemap-codec                   1109840 bytes
186
+source-map-0.6.1                  1321224 bytes
187
+source-map-0.8.0                  1324448 bytes
188
+Smallest memory usage is @jridgewell/sourcemap-codec
189
+
190
+Encode speed:
191
+encode: @jridgewell/sourcemap-codec x 6,801 ops/sec ±0.48% (98 runs sampled)
192
+encode: sourcemap-codec x 2,533 ops/sec ±0.13% (101 runs sampled)
193
+encode: source-map-0.6.1 x 2,248 ops/sec ±0.08% (100 runs sampled)
194
+encode: source-map-0.8.0 x 2,303 ops/sec ±0.15% (100 runs sampled)
195
+Fastest is encode: @jridgewell/sourcemap-codec
196
+```
197
+
198
+# License
199
+
200
+MIT

+ 164 - 0
node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs

@@ -0,0 +1,164 @@
1
+const comma = ','.charCodeAt(0);
2
+const semicolon = ';'.charCodeAt(0);
3
+const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
4
+const intToChar = new Uint8Array(64); // 64 possible chars.
5
+const charToInt = new Uint8Array(128); // z is 122 in ASCII
6
+for (let i = 0; i < chars.length; i++) {
7
+    const c = chars.charCodeAt(i);
8
+    intToChar[i] = c;
9
+    charToInt[c] = i;
10
+}
11
+// Provide a fallback for older environments.
12
+const td = typeof TextDecoder !== 'undefined'
13
+    ? /* #__PURE__ */ new TextDecoder()
14
+    : typeof Buffer !== 'undefined'
15
+        ? {
16
+            decode(buf) {
17
+                const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
18
+                return out.toString();
19
+            },
20
+        }
21
+        : {
22
+            decode(buf) {
23
+                let out = '';
24
+                for (let i = 0; i < buf.length; i++) {
25
+                    out += String.fromCharCode(buf[i]);
26
+                }
27
+                return out;
28
+            },
29
+        };
30
+function decode(mappings) {
31
+    const state = new Int32Array(5);
32
+    const decoded = [];
33
+    let index = 0;
34
+    do {
35
+        const semi = indexOf(mappings, index);
36
+        const line = [];
37
+        let sorted = true;
38
+        let lastCol = 0;
39
+        state[0] = 0;
40
+        for (let i = index; i < semi; i++) {
41
+            let seg;
42
+            i = decodeInteger(mappings, i, state, 0); // genColumn
43
+            const col = state[0];
44
+            if (col < lastCol)
45
+                sorted = false;
46
+            lastCol = col;
47
+            if (hasMoreVlq(mappings, i, semi)) {
48
+                i = decodeInteger(mappings, i, state, 1); // sourcesIndex
49
+                i = decodeInteger(mappings, i, state, 2); // sourceLine
50
+                i = decodeInteger(mappings, i, state, 3); // sourceColumn
51
+                if (hasMoreVlq(mappings, i, semi)) {
52
+                    i = decodeInteger(mappings, i, state, 4); // namesIndex
53
+                    seg = [col, state[1], state[2], state[3], state[4]];
54
+                }
55
+                else {
56
+                    seg = [col, state[1], state[2], state[3]];
57
+                }
58
+            }
59
+            else {
60
+                seg = [col];
61
+            }
62
+            line.push(seg);
63
+        }
64
+        if (!sorted)
65
+            sort(line);
66
+        decoded.push(line);
67
+        index = semi + 1;
68
+    } while (index <= mappings.length);
69
+    return decoded;
70
+}
71
+function indexOf(mappings, index) {
72
+    const idx = mappings.indexOf(';', index);
73
+    return idx === -1 ? mappings.length : idx;
74
+}
75
+function decodeInteger(mappings, pos, state, j) {
76
+    let value = 0;
77
+    let shift = 0;
78
+    let integer = 0;
79
+    do {
80
+        const c = mappings.charCodeAt(pos++);
81
+        integer = charToInt[c];
82
+        value |= (integer & 31) << shift;
83
+        shift += 5;
84
+    } while (integer & 32);
85
+    const shouldNegate = value & 1;
86
+    value >>>= 1;
87
+    if (shouldNegate) {
88
+        value = -0x80000000 | -value;
89
+    }
90
+    state[j] += value;
91
+    return pos;
92
+}
93
+function hasMoreVlq(mappings, i, length) {
94
+    if (i >= length)
95
+        return false;
96
+    return mappings.charCodeAt(i) !== comma;
97
+}
98
+function sort(line) {
99
+    line.sort(sortComparator);
100
+}
101
+function sortComparator(a, b) {
102
+    return a[0] - b[0];
103
+}
104
+function encode(decoded) {
105
+    const state = new Int32Array(5);
106
+    const bufLength = 1024 * 16;
107
+    const subLength = bufLength - 36;
108
+    const buf = new Uint8Array(bufLength);
109
+    const sub = buf.subarray(0, subLength);
110
+    let pos = 0;
111
+    let out = '';
112
+    for (let i = 0; i < decoded.length; i++) {
113
+        const line = decoded[i];
114
+        if (i > 0) {
115
+            if (pos === bufLength) {
116
+                out += td.decode(buf);
117
+                pos = 0;
118
+            }
119
+            buf[pos++] = semicolon;
120
+        }
121
+        if (line.length === 0)
122
+            continue;
123
+        state[0] = 0;
124
+        for (let j = 0; j < line.length; j++) {
125
+            const segment = line[j];
126
+            // We can push up to 5 ints, each int can take at most 7 chars, and we
127
+            // may push a comma.
128
+            if (pos > subLength) {
129
+                out += td.decode(sub);
130
+                buf.copyWithin(0, subLength, pos);
131
+                pos -= subLength;
132
+            }
133
+            if (j > 0)
134
+                buf[pos++] = comma;
135
+            pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
136
+            if (segment.length === 1)
137
+                continue;
138
+            pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
139
+            pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
140
+            pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
141
+            if (segment.length === 4)
142
+                continue;
143
+            pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
144
+        }
145
+    }
146
+    return out + td.decode(buf.subarray(0, pos));
147
+}
148
+function encodeInteger(buf, pos, state, segment, j) {
149
+    const next = segment[j];
150
+    let num = next - state[j];
151
+    state[j] = next;
152
+    num = num < 0 ? (-num << 1) | 1 : num << 1;
153
+    do {
154
+        let clamped = num & 0b011111;
155
+        num >>>= 5;
156
+        if (num > 0)
157
+            clamped |= 0b100000;
158
+        buf[pos++] = intToChar[clamped];
159
+    } while (num > 0);
160
+    return pos;
161
+}
162
+
163
+export { decode, encode };
164
+//# sourceMappingURL=sourcemap-codec.mjs.map

File diff suppressed because it is too large
+ 1 - 0
node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map


+ 175 - 0
node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js

@@ -0,0 +1,175 @@
1
+(function (global, factory) {
2
+    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
+    typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
+    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sourcemapCodec = {}));
5
+})(this, (function (exports) { 'use strict';
6
+
7
+    const comma = ','.charCodeAt(0);
8
+    const semicolon = ';'.charCodeAt(0);
9
+    const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
10
+    const intToChar = new Uint8Array(64); // 64 possible chars.
11
+    const charToInt = new Uint8Array(128); // z is 122 in ASCII
12
+    for (let i = 0; i < chars.length; i++) {
13
+        const c = chars.charCodeAt(i);
14
+        intToChar[i] = c;
15
+        charToInt[c] = i;
16
+    }
17
+    // Provide a fallback for older environments.
18
+    const td = typeof TextDecoder !== 'undefined'
19
+        ? /* #__PURE__ */ new TextDecoder()
20
+        : typeof Buffer !== 'undefined'
21
+            ? {
22
+                decode(buf) {
23
+                    const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
24
+                    return out.toString();
25
+                },
26
+            }
27
+            : {
28
+                decode(buf) {
29
+                    let out = '';
30
+                    for (let i = 0; i < buf.length; i++) {
31
+                        out += String.fromCharCode(buf[i]);
32
+                    }
33
+                    return out;
34
+                },
35
+            };
36
+    function decode(mappings) {
37
+        const state = new Int32Array(5);
38
+        const decoded = [];
39
+        let index = 0;
40
+        do {
41
+            const semi = indexOf(mappings, index);
42
+            const line = [];
43
+            let sorted = true;
44
+            let lastCol = 0;
45
+            state[0] = 0;
46
+            for (let i = index; i < semi; i++) {
47
+                let seg;
48
+                i = decodeInteger(mappings, i, state, 0); // genColumn
49
+                const col = state[0];
50
+                if (col < lastCol)
51
+                    sorted = false;
52
+                lastCol = col;
53
+                if (hasMoreVlq(mappings, i, semi)) {
54
+                    i = decodeInteger(mappings, i, state, 1); // sourcesIndex
55
+                    i = decodeInteger(mappings, i, state, 2); // sourceLine
56
+                    i = decodeInteger(mappings, i, state, 3); // sourceColumn
57
+                    if (hasMoreVlq(mappings, i, semi)) {
58
+                        i = decodeInteger(mappings, i, state, 4); // namesIndex
59
+                        seg = [col, state[1], state[2], state[3], state[4]];
60
+                    }
61
+                    else {
62
+                        seg = [col, state[1], state[2], state[3]];
63
+                    }
64
+                }
65
+                else {
66
+                    seg = [col];
67
+                }
68
+                line.push(seg);
69
+            }
70
+            if (!sorted)
71
+                sort(line);
72
+            decoded.push(line);
73
+            index = semi + 1;
74
+        } while (index <= mappings.length);
75
+        return decoded;
76
+    }
77
+    function indexOf(mappings, index) {
78
+        const idx = mappings.indexOf(';', index);
79
+        return idx === -1 ? mappings.length : idx;
80
+    }
81
+    function decodeInteger(mappings, pos, state, j) {
82
+        let value = 0;
83
+        let shift = 0;
84
+        let integer = 0;
85
+        do {
86
+            const c = mappings.charCodeAt(pos++);
87
+            integer = charToInt[c];
88
+            value |= (integer & 31) << shift;
89
+            shift += 5;
90
+        } while (integer & 32);
91
+        const shouldNegate = value & 1;
92
+        value >>>= 1;
93
+        if (shouldNegate) {
94
+            value = -0x80000000 | -value;
95
+        }
96
+        state[j] += value;
97
+        return pos;
98
+    }
99
+    function hasMoreVlq(mappings, i, length) {
100
+        if (i >= length)
101
+            return false;
102
+        return mappings.charCodeAt(i) !== comma;
103
+    }
104
+    function sort(line) {
105
+        line.sort(sortComparator);
106
+    }
107
+    function sortComparator(a, b) {
108
+        return a[0] - b[0];
109
+    }
110
+    function encode(decoded) {
111
+        const state = new Int32Array(5);
112
+        const bufLength = 1024 * 16;
113
+        const subLength = bufLength - 36;
114
+        const buf = new Uint8Array(bufLength);
115
+        const sub = buf.subarray(0, subLength);
116
+        let pos = 0;
117
+        let out = '';
118
+        for (let i = 0; i < decoded.length; i++) {
119
+            const line = decoded[i];
120
+            if (i > 0) {
121
+                if (pos === bufLength) {
122
+                    out += td.decode(buf);
123
+                    pos = 0;
124
+                }
125
+                buf[pos++] = semicolon;
126
+            }
127
+            if (line.length === 0)
128
+                continue;
129
+            state[0] = 0;
130
+            for (let j = 0; j < line.length; j++) {
131
+                const segment = line[j];
132
+                // We can push up to 5 ints, each int can take at most 7 chars, and we
133
+                // may push a comma.
134
+                if (pos > subLength) {
135
+                    out += td.decode(sub);
136
+                    buf.copyWithin(0, subLength, pos);
137
+                    pos -= subLength;
138
+                }
139
+                if (j > 0)
140
+                    buf[pos++] = comma;
141
+                pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
142
+                if (segment.length === 1)
143
+                    continue;
144
+                pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
145
+                pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
146
+                pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
147
+                if (segment.length === 4)
148
+                    continue;
149
+                pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
150
+            }
151
+        }
152
+        return out + td.decode(buf.subarray(0, pos));
153
+    }
154
+    function encodeInteger(buf, pos, state, segment, j) {
155
+        const next = segment[j];
156
+        let num = next - state[j];
157
+        state[j] = next;
158
+        num = num < 0 ? (-num << 1) | 1 : num << 1;
159
+        do {
160
+            let clamped = num & 0b011111;
161
+            num >>>= 5;
162
+            if (num > 0)
163
+                clamped |= 0b100000;
164
+            buf[pos++] = intToChar[clamped];
165
+        } while (num > 0);
166
+        return pos;
167
+    }
168
+
169
+    exports.decode = decode;
170
+    exports.encode = encode;
171
+
172
+    Object.defineProperty(exports, '__esModule', { value: true });
173
+
174
+}));
175
+//# sourceMappingURL=sourcemap-codec.umd.js.map

File diff suppressed because it is too large
+ 1 - 0
node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map


+ 6 - 0
node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts

@@ -0,0 +1,6 @@
1
+export declare type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number];
2
+export declare type SourceMapLine = SourceMapSegment[];
3
+export declare type SourceMapMappings = SourceMapLine[];
4
+export declare function decode(mappings: string): SourceMapMappings;
5
+export declare function encode(decoded: SourceMapMappings): string;
6
+export declare function encode(decoded: Readonly<SourceMapMappings>): string;

+ 74 - 0
node_modules/@jridgewell/sourcemap-codec/package.json

@@ -0,0 +1,74 @@
1
+{
2
+  "name": "@jridgewell/sourcemap-codec",
3
+  "version": "1.4.15",
4
+  "description": "Encode/decode sourcemap mappings",
5
+  "keywords": [
6
+    "sourcemap",
7
+    "vlq"
8
+  ],
9
+  "main": "dist/sourcemap-codec.umd.js",
10
+  "module": "dist/sourcemap-codec.mjs",
11
+  "types": "dist/types/sourcemap-codec.d.ts",
12
+  "files": [
13
+    "dist"
14
+  ],
15
+  "exports": {
16
+    ".": [
17
+      {
18
+        "types": "./dist/types/sourcemap-codec.d.ts",
19
+        "browser": "./dist/sourcemap-codec.umd.js",
20
+        "require": "./dist/sourcemap-codec.umd.js",
21
+        "import": "./dist/sourcemap-codec.mjs"
22
+      },
23
+      "./dist/sourcemap-codec.umd.js"
24
+    ],
25
+    "./package.json": "./package.json"
26
+  },
27
+  "scripts": {
28
+    "benchmark": "run-s build:rollup benchmark:*",
29
+    "benchmark:install": "cd benchmark && npm install",
30
+    "benchmark:only": "node --expose-gc benchmark/index.js",
31
+    "build": "run-s -n build:*",
32
+    "build:rollup": "rollup -c rollup.config.js",
33
+    "build:ts": "tsc --project tsconfig.build.json",
34
+    "lint": "run-s -n lint:*",
35
+    "lint:prettier": "npm run test:lint:prettier -- --write",
36
+    "lint:ts": "npm run test:lint:ts -- --fix",
37
+    "prebuild": "rm -rf dist",
38
+    "prepublishOnly": "npm run preversion",
39
+    "preversion": "run-s test build",
40
+    "pretest": "run-s build:rollup",
41
+    "test": "run-s -n test:lint test:only",
42
+    "test:debug": "mocha --inspect-brk",
43
+    "test:lint": "run-s -n test:lint:*",
44
+    "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
45
+    "test:lint:ts": "eslint '{src,test}/**/*.ts'",
46
+    "test:only": "mocha",
47
+    "test:coverage": "c8 mocha",
48
+    "test:watch": "mocha --watch"
49
+  },
50
+  "repository": {
51
+    "type": "git",
52
+    "url": "git+https://github.com/jridgewell/sourcemap-codec.git"
53
+  },
54
+  "author": "Rich Harris",
55
+  "license": "MIT",
56
+  "devDependencies": {
57
+    "@rollup/plugin-typescript": "8.3.0",
58
+    "@types/node": "17.0.15",
59
+    "@typescript-eslint/eslint-plugin": "5.10.0",
60
+    "@typescript-eslint/parser": "5.10.0",
61
+    "benchmark": "2.1.4",
62
+    "c8": "7.11.2",
63
+    "eslint": "8.7.0",
64
+    "eslint-config-prettier": "8.3.0",
65
+    "mocha": "9.2.0",
66
+    "npm-run-all": "4.1.5",
67
+    "prettier": "2.5.1",
68
+    "rollup": "2.64.0",
69
+    "source-map": "0.6.1",
70
+    "source-map-js": "1.0.2",
71
+    "sourcemap-codec": "1.4.8",
72
+    "typescript": "4.5.4"
73
+  }
74
+}

+ 19 - 0
node_modules/@jridgewell/trace-mapping/LICENSE

@@ -0,0 +1,19 @@
1
+Copyright 2022 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.

+ 252 - 0
node_modules/@jridgewell/trace-mapping/README.md

@@ -0,0 +1,252 @@
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
+} from '@jridgewell/trace-mapping';
26
+
27
+const tracer = new TraceMap({
28
+  version: 3,
29
+  sources: ['input.js'],
30
+  sourcesContent: ['content of input.js'],
31
+  names: ['foo'],
32
+  mappings: 'KAyCIA',
33
+});
34
+
35
+// Lines start at line 1, columns at column 0.
36
+const traced = originalPositionFor(tracer, { line: 1, column: 5 });
37
+assert.deepEqual(traced, {
38
+  source: 'input.js',
39
+  line: 42,
40
+  column: 4,
41
+  name: 'foo',
42
+});
43
+
44
+const content = sourceContentFor(tracer, traced.source);
45
+assert.strictEqual(content, 'content for input.js');
46
+
47
+const generated = generatedPositionFor(tracer, {
48
+  source: 'input.js',
49
+  line: 42,
50
+  column: 4,
51
+});
52
+assert.deepEqual(generated, {
53
+  line: 1,
54
+  column: 5,
55
+});
56
+```
57
+
58
+We also provide a lower level API to get the actual segment that matches our line and column. Unlike
59
+`originalPositionFor`, `traceSegment` uses a 0-base for `line`:
60
+
61
+```typescript
62
+import { traceSegment } from '@jridgewell/trace-mapping';
63
+
64
+// line is 0-base.
65
+const traced = traceSegment(tracer, /* line */ 0, /* column */ 5);
66
+
67
+// Segments are [outputColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]
68
+// Again, line is 0-base and so is sourceLine
69
+assert.deepEqual(traced, [5, 0, 41, 4, 0]);
70
+```
71
+
72
+### SectionedSourceMaps
73
+
74
+The sourcemap spec defines a special `sections` field that's designed to handle concatenation of
75
+output code with associated sourcemaps. This type of sourcemap is rarely used (no major build tool
76
+produces it), but if you are hand coding a concatenation you may need it. We provide an `AnyMap`
77
+helper that can receive either a regular sourcemap or a `SectionedSourceMap` and returns a
78
+`TraceMap` instance:
79
+
80
+```typescript
81
+import { AnyMap } from '@jridgewell/trace-mapping';
82
+const fooOutput = 'foo';
83
+const barOutput = 'bar';
84
+const output = [fooOutput, barOutput].join('\n');
85
+
86
+const sectioned = new AnyMap({
87
+  version: 3,
88
+  sections: [
89
+    {
90
+      // 0-base line and column
91
+      offset: { line: 0, column: 0 },
92
+      // fooOutput's sourcemap
93
+      map: {
94
+        version: 3,
95
+        sources: ['foo.js'],
96
+        names: ['foo'],
97
+        mappings: 'AAAAA',
98
+      },
99
+    },
100
+    {
101
+      // barOutput's sourcemap will not affect the first line, only the second
102
+      offset: { line: 1, column: 0 },
103
+      map: {
104
+        version: 3,
105
+        sources: ['bar.js'],
106
+        names: ['bar'],
107
+        mappings: 'AAAAA',
108
+      },
109
+    },
110
+  ],
111
+});
112
+
113
+const traced = originalPositionFor(sectioned, {
114
+  line: 2,
115
+  column: 0,
116
+});
117
+
118
+assert.deepEqual(traced, {
119
+  source: 'bar.js',
120
+  line: 1,
121
+  column: 0,
122
+  name: 'bar',
123
+});
124
+```
125
+
126
+## Benchmarks
127
+
128
+```
129
+node v18.0.0
130
+
131
+amp.js.map - 45120 segments
132
+
133
+Memory Usage:
134
+trace-mapping decoded         562400 bytes
135
+trace-mapping encoded        5706544 bytes
136
+source-map-js               10717664 bytes
137
+source-map-0.6.1            17446384 bytes
138
+source-map-0.8.0             9701757 bytes
139
+Smallest memory usage is trace-mapping decoded
140
+
141
+Init speed:
142
+trace-mapping:    decoded JSON input x 180 ops/sec ±0.34% (85 runs sampled)
143
+trace-mapping:    encoded JSON input x 364 ops/sec ±1.77% (89 runs sampled)
144
+trace-mapping:    decoded Object input x 3,116 ops/sec ±0.50% (96 runs sampled)
145
+trace-mapping:    encoded Object input x 410 ops/sec ±2.62% (85 runs sampled)
146
+source-map-js:    encoded Object input x 84.23 ops/sec ±0.91% (73 runs sampled)
147
+source-map-0.6.1: encoded Object input x 37.21 ops/sec ±2.08% (51 runs sampled)
148
+Fastest is trace-mapping:    decoded Object input
149
+
150
+Trace speed:
151
+trace-mapping:    decoded originalPositionFor x 3,952,212 ops/sec ±0.17% (98 runs sampled)
152
+trace-mapping:    encoded originalPositionFor x 3,487,468 ops/sec ±1.58% (90 runs sampled)
153
+source-map-js:    encoded originalPositionFor x 827,730 ops/sec ±0.78% (97 runs sampled)
154
+source-map-0.6.1: encoded originalPositionFor x 748,991 ops/sec ±0.53% (94 runs sampled)
155
+source-map-0.8.0: encoded originalPositionFor x 2,532,894 ops/sec ±0.57% (95 runs sampled)
156
+Fastest is trace-mapping:    decoded originalPositionFor
157
+
158
+
159
+***
160
+
161
+
162
+babel.min.js.map - 347793 segments
163
+
164
+Memory Usage:
165
+trace-mapping decoded          89832 bytes
166
+trace-mapping encoded       35474640 bytes
167
+source-map-js               51257176 bytes
168
+source-map-0.6.1            63515664 bytes
169
+source-map-0.8.0            42933752 bytes
170
+Smallest memory usage is trace-mapping decoded
171
+
172
+Init speed:
173
+trace-mapping:    decoded JSON input x 15.41 ops/sec ±8.65% (34 runs sampled)
174
+trace-mapping:    encoded JSON input x 28.20 ops/sec ±12.87% (42 runs sampled)
175
+trace-mapping:    decoded Object input x 964 ops/sec ±0.36% (99 runs sampled)
176
+trace-mapping:    encoded Object input x 31.77 ops/sec ±13.79% (45 runs sampled)
177
+source-map-js:    encoded Object input x 6.45 ops/sec ±5.16% (21 runs sampled)
178
+source-map-0.6.1: encoded Object input x 4.07 ops/sec ±5.24% (15 runs sampled)
179
+Fastest is trace-mapping:    decoded Object input
180
+
181
+Trace speed:
182
+trace-mapping:    decoded originalPositionFor x 7,183,038 ops/sec ±0.58% (95 runs sampled)
183
+trace-mapping:    encoded originalPositionFor x 5,192,185 ops/sec ±0.41% (100 runs sampled)
184
+source-map-js:    encoded originalPositionFor x 4,259,489 ops/sec ±0.79% (94 runs sampled)
185
+source-map-0.6.1: encoded originalPositionFor x 3,742,629 ops/sec ±0.71% (95 runs sampled)
186
+source-map-0.8.0: encoded originalPositionFor x 6,270,211 ops/sec ±0.64% (94 runs sampled)
187
+Fastest is trace-mapping:    decoded originalPositionFor
188
+
189
+
190
+***
191
+
192
+
193
+preact.js.map - 1992 segments
194
+
195
+Memory Usage:
196
+trace-mapping decoded          37128 bytes
197
+trace-mapping encoded         247280 bytes
198
+source-map-js                1143536 bytes
199
+source-map-0.6.1             1290992 bytes
200
+source-map-0.8.0               96544 bytes
201
+Smallest memory usage is trace-mapping decoded
202
+
203
+Init speed:
204
+trace-mapping:    decoded JSON input x 3,483 ops/sec ±0.30% (98 runs sampled)
205
+trace-mapping:    encoded JSON input x 6,092 ops/sec ±0.18% (97 runs sampled)
206
+trace-mapping:    decoded Object input x 249,076 ops/sec ±0.24% (98 runs sampled)
207
+trace-mapping:    encoded Object input x 14,555 ops/sec ±0.48% (100 runs sampled)
208
+source-map-js:    encoded Object input x 2,447 ops/sec ±0.36% (99 runs sampled)
209
+source-map-0.6.1: encoded Object input x 1,201 ops/sec ±0.57% (96 runs sampled)
210
+Fastest is trace-mapping:    decoded Object input
211
+
212
+Trace speed:
213
+trace-mapping:    decoded originalPositionFor x 7,620,192 ops/sec ±0.09% (99 runs sampled)
214
+trace-mapping:    encoded originalPositionFor x 6,872,554 ops/sec ±0.30% (97 runs sampled)
215
+source-map-js:    encoded originalPositionFor x 2,489,570 ops/sec ±0.35% (94 runs sampled)
216
+source-map-0.6.1: encoded originalPositionFor x 1,698,633 ops/sec ±0.28% (98 runs sampled)
217
+source-map-0.8.0: encoded originalPositionFor x 4,015,644 ops/sec ±0.22% (98 runs sampled)
218
+Fastest is trace-mapping:    decoded originalPositionFor
219
+
220
+
221
+***
222
+
223
+
224
+react.js.map - 5726 segments
225
+
226
+Memory Usage:
227
+trace-mapping decoded          16176 bytes
228
+trace-mapping encoded         681552 bytes
229
+source-map-js                2418352 bytes
230
+source-map-0.6.1             2443672 bytes
231
+source-map-0.8.0              111768 bytes
232
+Smallest memory usage is trace-mapping decoded
233
+
234
+Init speed:
235
+trace-mapping:    decoded JSON input x 1,720 ops/sec ±0.34% (98 runs sampled)
236
+trace-mapping:    encoded JSON input x 4,406 ops/sec ±0.35% (100 runs sampled)
237
+trace-mapping:    decoded Object input x 92,122 ops/sec ±0.10% (99 runs sampled)
238
+trace-mapping:    encoded Object input x 5,385 ops/sec ±0.37% (99 runs sampled)
239
+source-map-js:    encoded Object input x 794 ops/sec ±0.40% (98 runs sampled)
240
+source-map-0.6.1: encoded Object input x 416 ops/sec ±0.54% (91 runs sampled)
241
+Fastest is trace-mapping:    decoded Object input
242
+
243
+Trace speed:
244
+trace-mapping:    decoded originalPositionFor x 32,759,519 ops/sec ±0.33% (100 runs sampled)
245
+trace-mapping:    encoded originalPositionFor x 31,116,306 ops/sec ±0.33% (97 runs sampled)
246
+source-map-js:    encoded originalPositionFor x 17,458,435 ops/sec ±0.44% (97 runs sampled)
247
+source-map-0.6.1: encoded originalPositionFor x 12,687,097 ops/sec ±0.43% (95 runs sampled)
248
+source-map-0.8.0: encoded originalPositionFor x 23,538,275 ops/sec ±0.38% (95 runs sampled)
249
+Fastest is trace-mapping:    decoded originalPositionFor
250
+```
251
+
252
+[source-map]: https://www.npmjs.com/package/source-map

+ 552 - 0
node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs

@@ -0,0 +1,552 @@
1
+import { encode, decode } from '@jridgewell/sourcemap-codec';
2
+import resolveUri from '@jridgewell/resolve-uri';
3
+
4
+function resolve(input, base) {
5
+    // The base is always treated as a directory, if it's not empty.
6
+    // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327
7
+    // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401
8
+    if (base && !base.endsWith('/'))
9
+        base += '/';
10
+    return resolveUri(input, base);
11
+}
12
+
13
+/**
14
+ * Removes everything after the last "/", but leaves the slash.
15
+ */
16
+function stripFilename(path) {
17
+    if (!path)
18
+        return '';
19
+    const index = path.lastIndexOf('/');
20
+    return path.slice(0, index + 1);
21
+}
22
+
23
+const COLUMN = 0;
24
+const SOURCES_INDEX = 1;
25
+const SOURCE_LINE = 2;
26
+const SOURCE_COLUMN = 3;
27
+const NAMES_INDEX = 4;
28
+const REV_GENERATED_LINE = 1;
29
+const REV_GENERATED_COLUMN = 2;
30
+
31
+function maybeSort(mappings, owned) {
32
+    const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
33
+    if (unsortedIndex === mappings.length)
34
+        return mappings;
35
+    // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If
36
+    // not, we do not want to modify the consumer's input array.
37
+    if (!owned)
38
+        mappings = mappings.slice();
39
+    for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {
40
+        mappings[i] = sortSegments(mappings[i], owned);
41
+    }
42
+    return mappings;
43
+}
44
+function nextUnsortedSegmentLine(mappings, start) {
45
+    for (let i = start; i < mappings.length; i++) {
46
+        if (!isSorted(mappings[i]))
47
+            return i;
48
+    }
49
+    return mappings.length;
50
+}
51
+function isSorted(line) {
52
+    for (let j = 1; j < line.length; j++) {
53
+        if (line[j][COLUMN] < line[j - 1][COLUMN]) {
54
+            return false;
55
+        }
56
+    }
57
+    return true;
58
+}
59
+function sortSegments(line, owned) {
60
+    if (!owned)
61
+        line = line.slice();
62
+    return line.sort(sortComparator);
63
+}
64
+function sortComparator(a, b) {
65
+    return a[COLUMN] - b[COLUMN];
66
+}
67
+
68
+let found = false;
69
+/**
70
+ * A binary search implementation that returns the index if a match is found.
71
+ * If no match is found, then the left-index (the index associated with the item that comes just
72
+ * before the desired index) is returned. To maintain proper sort order, a splice would happen at
73
+ * the next index:
74
+ *
75
+ * ```js
76
+ * const array = [1, 3];
77
+ * const needle = 2;
78
+ * const index = binarySearch(array, needle, (item, needle) => item - needle);
79
+ *
80
+ * assert.equal(index, 0);
81
+ * array.splice(index + 1, 0, needle);
82
+ * assert.deepEqual(array, [1, 2, 3]);
83
+ * ```
84
+ */
85
+function binarySearch(haystack, needle, low, high) {
86
+    while (low <= high) {
87
+        const mid = low + ((high - low) >> 1);
88
+        const cmp = haystack[mid][COLUMN] - needle;
89
+        if (cmp === 0) {
90
+            found = true;
91
+            return mid;
92
+        }
93
+        if (cmp < 0) {
94
+            low = mid + 1;
95
+        }
96
+        else {
97
+            high = mid - 1;
98
+        }
99
+    }
100
+    found = false;
101
+    return low - 1;
102
+}
103
+function upperBound(haystack, needle, index) {
104
+    for (let i = index + 1; i < haystack.length; index = i++) {
105
+        if (haystack[i][COLUMN] !== needle)
106
+            break;
107
+    }
108
+    return index;
109
+}
110
+function lowerBound(haystack, needle, index) {
111
+    for (let i = index - 1; i >= 0; index = i--) {
112
+        if (haystack[i][COLUMN] !== needle)
113
+            break;
114
+    }
115
+    return index;
116
+}
117
+function memoizedState() {
118
+    return {
119
+        lastKey: -1,
120
+        lastNeedle: -1,
121
+        lastIndex: -1,
122
+    };
123
+}
124
+/**
125
+ * This overly complicated beast is just to record the last tested line/column and the resulting
126
+ * index, allowing us to skip a few tests if mappings are monotonically increasing.
127
+ */
128
+function memoizedBinarySearch(haystack, needle, state, key) {
129
+    const { lastKey, lastNeedle, lastIndex } = state;
130
+    let low = 0;
131
+    let high = haystack.length - 1;
132
+    if (key === lastKey) {
133
+        if (needle === lastNeedle) {
134
+            found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;
135
+            return lastIndex;
136
+        }
137
+        if (needle >= lastNeedle) {
138
+            // lastIndex may be -1 if the previous needle was not found.
139
+            low = lastIndex === -1 ? 0 : lastIndex;
140
+        }
141
+        else {
142
+            high = lastIndex;
143
+        }
144
+    }
145
+    state.lastKey = key;
146
+    state.lastNeedle = needle;
147
+    return (state.lastIndex = binarySearch(haystack, needle, low, high));
148
+}
149
+
150
+// Rebuilds the original source files, with mappings that are ordered by source line/column instead
151
+// of generated line/column.
152
+function buildBySources(decoded, memos) {
153
+    const sources = memos.map(buildNullArray);
154
+    for (let i = 0; i < decoded.length; i++) {
155
+        const line = decoded[i];
156
+        for (let j = 0; j < line.length; j++) {
157
+            const seg = line[j];
158
+            if (seg.length === 1)
159
+                continue;
160
+            const sourceIndex = seg[SOURCES_INDEX];
161
+            const sourceLine = seg[SOURCE_LINE];
162
+            const sourceColumn = seg[SOURCE_COLUMN];
163
+            const originalSource = sources[sourceIndex];
164
+            const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = []));
165
+            const memo = memos[sourceIndex];
166
+            // The binary search either found a match, or it found the left-index just before where the
167
+            // segment should go. Either way, we want to insert after that. And there may be multiple
168
+            // generated segments associated with an original location, so there may need to move several
169
+            // indexes before we find where we need to insert.
170
+            const index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine));
171
+            insert(originalLine, (memo.lastIndex = index + 1), [sourceColumn, i, seg[COLUMN]]);
172
+        }
173
+    }
174
+    return sources;
175
+}
176
+function insert(array, index, value) {
177
+    for (let i = array.length; i > index; i--) {
178
+        array[i] = array[i - 1];
179
+    }
180
+    array[index] = value;
181
+}
182
+// Null arrays allow us to use ordered index keys without actually allocating contiguous memory like
183
+// a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations.
184
+// Numeric properties on objects are magically sorted in ascending order by the engine regardless of
185
+// the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending
186
+// order when iterating with for-in.
187
+function buildNullArray() {
188
+    return { __proto__: null };
189
+}
190
+
191
+const AnyMap = function (map, mapUrl) {
192
+    const parsed = typeof map === 'string' ? JSON.parse(map) : map;
193
+    if (!('sections' in parsed))
194
+        return new TraceMap(parsed, mapUrl);
195
+    const mappings = [];
196
+    const sources = [];
197
+    const sourcesContent = [];
198
+    const names = [];
199
+    recurse(parsed, mapUrl, mappings, sources, sourcesContent, names, 0, 0, Infinity, Infinity);
200
+    const joined = {
201
+        version: 3,
202
+        file: parsed.file,
203
+        names,
204
+        sources,
205
+        sourcesContent,
206
+        mappings,
207
+    };
208
+    return presortedDecodedMap(joined);
209
+};
210
+function recurse(input, mapUrl, mappings, sources, sourcesContent, names, lineOffset, columnOffset, stopLine, stopColumn) {
211
+    const { sections } = input;
212
+    for (let i = 0; i < sections.length; i++) {
213
+        const { map, offset } = sections[i];
214
+        let sl = stopLine;
215
+        let sc = stopColumn;
216
+        if (i + 1 < sections.length) {
217
+            const nextOffset = sections[i + 1].offset;
218
+            sl = Math.min(stopLine, lineOffset + nextOffset.line);
219
+            if (sl === stopLine) {
220
+                sc = Math.min(stopColumn, columnOffset + nextOffset.column);
221
+            }
222
+            else if (sl < stopLine) {
223
+                sc = columnOffset + nextOffset.column;
224
+            }
225
+        }
226
+        addSection(map, mapUrl, mappings, sources, sourcesContent, names, lineOffset + offset.line, columnOffset + offset.column, sl, sc);
227
+    }
228
+}
229
+function addSection(input, mapUrl, mappings, sources, sourcesContent, names, lineOffset, columnOffset, stopLine, stopColumn) {
230
+    if ('sections' in input)
231
+        return recurse(...arguments);
232
+    const map = new TraceMap(input, mapUrl);
233
+    const sourcesOffset = sources.length;
234
+    const namesOffset = names.length;
235
+    const decoded = decodedMappings(map);
236
+    const { resolvedSources, sourcesContent: contents } = map;
237
+    append(sources, resolvedSources);
238
+    append(names, map.names);
239
+    if (contents)
240
+        append(sourcesContent, contents);
241
+    else
242
+        for (let i = 0; i < resolvedSources.length; i++)
243
+            sourcesContent.push(null);
244
+    for (let i = 0; i < decoded.length; i++) {
245
+        const lineI = lineOffset + i;
246
+        // We can only add so many lines before we step into the range that the next section's map
247
+        // controls. When we get to the last line, then we'll start checking the segments to see if
248
+        // they've crossed into the column range. But it may not have any columns that overstep, so we
249
+        // still need to check that we don't overstep lines, too.
250
+        if (lineI > stopLine)
251
+            return;
252
+        // The out line may already exist in mappings (if we're continuing the line started by a
253
+        // previous section). Or, we may have jumped ahead several lines to start this section.
254
+        const out = getLine(mappings, lineI);
255
+        // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the
256
+        // map can be multiple lines), it doesn't.
257
+        const cOffset = i === 0 ? columnOffset : 0;
258
+        const line = decoded[i];
259
+        for (let j = 0; j < line.length; j++) {
260
+            const seg = line[j];
261
+            const column = cOffset + seg[COLUMN];
262
+            // If this segment steps into the column range that the next section's map controls, we need
263
+            // to stop early.
264
+            if (lineI === stopLine && column >= stopColumn)
265
+                return;
266
+            if (seg.length === 1) {
267
+                out.push([column]);
268
+                continue;
269
+            }
270
+            const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];
271
+            const sourceLine = seg[SOURCE_LINE];
272
+            const sourceColumn = seg[SOURCE_COLUMN];
273
+            out.push(seg.length === 4
274
+                ? [column, sourcesIndex, sourceLine, sourceColumn]
275
+                : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]);
276
+        }
277
+    }
278
+}
279
+function append(arr, other) {
280
+    for (let i = 0; i < other.length; i++)
281
+        arr.push(other[i]);
282
+}
283
+function getLine(arr, index) {
284
+    for (let i = arr.length; i <= index; i++)
285
+        arr[i] = [];
286
+    return arr[index];
287
+}
288
+
289
+const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)';
290
+const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)';
291
+const LEAST_UPPER_BOUND = -1;
292
+const GREATEST_LOWER_BOUND = 1;
293
+/**
294
+ * Returns the encoded (VLQ string) form of the SourceMap's mappings field.
295
+ */
296
+let encodedMappings;
297
+/**
298
+ * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
299
+ */
300
+let decodedMappings;
301
+/**
302
+ * A low-level API to find the segment associated with a generated line/column (think, from a
303
+ * stack trace). Line and column here are 0-based, unlike `originalPositionFor`.
304
+ */
305
+let traceSegment;
306
+/**
307
+ * A higher-level API to find the source/line/column associated with a generated line/column
308
+ * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
309
+ * `source-map` library.
310
+ */
311
+let originalPositionFor;
312
+/**
313
+ * Finds the generated line/column position of the provided source/line/column source position.
314
+ */
315
+let generatedPositionFor;
316
+/**
317
+ * Finds all generated line/column positions of the provided source/line/column source position.
318
+ */
319
+let allGeneratedPositionsFor;
320
+/**
321
+ * Iterates each mapping in generated position order.
322
+ */
323
+let eachMapping;
324
+/**
325
+ * Retrieves the source content for a particular source, if its found. Returns null if not.
326
+ */
327
+let sourceContentFor;
328
+/**
329
+ * A helper that skips sorting of the input map's mappings array, which can be expensive for larger
330
+ * maps.
331
+ */
332
+let presortedDecodedMap;
333
+/**
334
+ * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
335
+ * a sourcemap, or to JSON.stringify.
336
+ */
337
+let decodedMap;
338
+/**
339
+ * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
340
+ * a sourcemap, or to JSON.stringify.
341
+ */
342
+let encodedMap;
343
+class TraceMap {
344
+    constructor(map, mapUrl) {
345
+        const isString = typeof map === 'string';
346
+        if (!isString && map._decodedMemo)
347
+            return map;
348
+        const parsed = (isString ? JSON.parse(map) : map);
349
+        const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
350
+        this.version = version;
351
+        this.file = file;
352
+        this.names = names;
353
+        this.sourceRoot = sourceRoot;
354
+        this.sources = sources;
355
+        this.sourcesContent = sourcesContent;
356
+        const from = resolve(sourceRoot || '', stripFilename(mapUrl));
357
+        this.resolvedSources = sources.map((s) => resolve(s || '', from));
358
+        const { mappings } = parsed;
359
+        if (typeof mappings === 'string') {
360
+            this._encoded = mappings;
361
+            this._decoded = undefined;
362
+        }
363
+        else {
364
+            this._encoded = undefined;
365
+            this._decoded = maybeSort(mappings, isString);
366
+        }
367
+        this._decodedMemo = memoizedState();
368
+        this._bySources = undefined;
369
+        this._bySourceMemos = undefined;
370
+    }
371
+}
372
+(() => {
373
+    encodedMappings = (map) => {
374
+        var _a;
375
+        return ((_a = map._encoded) !== null && _a !== void 0 ? _a : (map._encoded = encode(map._decoded)));
376
+    };
377
+    decodedMappings = (map) => {
378
+        return (map._decoded || (map._decoded = decode(map._encoded)));
379
+    };
380
+    traceSegment = (map, line, column) => {
381
+        const decoded = decodedMappings(map);
382
+        // It's common for parent source maps to have pointers to lines that have no
383
+        // mapping (like a "//# sourceMappingURL=") at the end of the child file.
384
+        if (line >= decoded.length)
385
+            return null;
386
+        const segments = decoded[line];
387
+        const index = traceSegmentInternal(segments, map._decodedMemo, line, column, GREATEST_LOWER_BOUND);
388
+        return index === -1 ? null : segments[index];
389
+    };
390
+    originalPositionFor = (map, { line, column, bias }) => {
391
+        line--;
392
+        if (line < 0)
393
+            throw new Error(LINE_GTR_ZERO);
394
+        if (column < 0)
395
+            throw new Error(COL_GTR_EQ_ZERO);
396
+        const decoded = decodedMappings(map);
397
+        // It's common for parent source maps to have pointers to lines that have no
398
+        // mapping (like a "//# sourceMappingURL=") at the end of the child file.
399
+        if (line >= decoded.length)
400
+            return OMapping(null, null, null, null);
401
+        const segments = decoded[line];
402
+        const index = traceSegmentInternal(segments, map._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
403
+        if (index === -1)
404
+            return OMapping(null, null, null, null);
405
+        const segment = segments[index];
406
+        if (segment.length === 1)
407
+            return OMapping(null, null, null, null);
408
+        const { names, resolvedSources } = map;
409
+        return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);
410
+    };
411
+    allGeneratedPositionsFor = (map, { source, line, column, bias }) => {
412
+        // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit.
413
+        return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);
414
+    };
415
+    generatedPositionFor = (map, { source, line, column, bias }) => {
416
+        return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);
417
+    };
418
+    eachMapping = (map, cb) => {
419
+        const decoded = decodedMappings(map);
420
+        const { names, resolvedSources } = map;
421
+        for (let i = 0; i < decoded.length; i++) {
422
+            const line = decoded[i];
423
+            for (let j = 0; j < line.length; j++) {
424
+                const seg = line[j];
425
+                const generatedLine = i + 1;
426
+                const generatedColumn = seg[0];
427
+                let source = null;
428
+                let originalLine = null;
429
+                let originalColumn = null;
430
+                let name = null;
431
+                if (seg.length !== 1) {
432
+                    source = resolvedSources[seg[1]];
433
+                    originalLine = seg[2] + 1;
434
+                    originalColumn = seg[3];
435
+                }
436
+                if (seg.length === 5)
437
+                    name = names[seg[4]];
438
+                cb({
439
+                    generatedLine,
440
+                    generatedColumn,
441
+                    source,
442
+                    originalLine,
443
+                    originalColumn,
444
+                    name,
445
+                });
446
+            }
447
+        }
448
+    };
449
+    sourceContentFor = (map, source) => {
450
+        const { sources, resolvedSources, sourcesContent } = map;
451
+        if (sourcesContent == null)
452
+            return null;
453
+        let index = sources.indexOf(source);
454
+        if (index === -1)
455
+            index = resolvedSources.indexOf(source);
456
+        return index === -1 ? null : sourcesContent[index];
457
+    };
458
+    presortedDecodedMap = (map, mapUrl) => {
459
+        const tracer = new TraceMap(clone(map, []), mapUrl);
460
+        tracer._decoded = map.mappings;
461
+        return tracer;
462
+    };
463
+    decodedMap = (map) => {
464
+        return clone(map, decodedMappings(map));
465
+    };
466
+    encodedMap = (map) => {
467
+        return clone(map, encodedMappings(map));
468
+    };
469
+    function generatedPosition(map, source, line, column, bias, all) {
470
+        line--;
471
+        if (line < 0)
472
+            throw new Error(LINE_GTR_ZERO);
473
+        if (column < 0)
474
+            throw new Error(COL_GTR_EQ_ZERO);
475
+        const { sources, resolvedSources } = map;
476
+        let sourceIndex = sources.indexOf(source);
477
+        if (sourceIndex === -1)
478
+            sourceIndex = resolvedSources.indexOf(source);
479
+        if (sourceIndex === -1)
480
+            return all ? [] : GMapping(null, null);
481
+        const generated = (map._bySources || (map._bySources = buildBySources(decodedMappings(map), (map._bySourceMemos = sources.map(memoizedState)))));
482
+        const segments = generated[sourceIndex][line];
483
+        if (segments == null)
484
+            return all ? [] : GMapping(null, null);
485
+        const memo = map._bySourceMemos[sourceIndex];
486
+        if (all)
487
+            return sliceGeneratedPositions(segments, memo, line, column, bias);
488
+        const index = traceSegmentInternal(segments, memo, line, column, bias);
489
+        if (index === -1)
490
+            return GMapping(null, null);
491
+        const segment = segments[index];
492
+        return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
493
+    }
494
+})();
495
+function clone(map, mappings) {
496
+    return {
497
+        version: map.version,
498
+        file: map.file,
499
+        names: map.names,
500
+        sourceRoot: map.sourceRoot,
501
+        sources: map.sources,
502
+        sourcesContent: map.sourcesContent,
503
+        mappings,
504
+    };
505
+}
506
+function OMapping(source, line, column, name) {
507
+    return { source, line, column, name };
508
+}
509
+function GMapping(line, column) {
510
+    return { line, column };
511
+}
512
+function traceSegmentInternal(segments, memo, line, column, bias) {
513
+    let index = memoizedBinarySearch(segments, column, memo, line);
514
+    if (found) {
515
+        index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);
516
+    }
517
+    else if (bias === LEAST_UPPER_BOUND)
518
+        index++;
519
+    if (index === -1 || index === segments.length)
520
+        return -1;
521
+    return index;
522
+}
523
+function sliceGeneratedPositions(segments, memo, line, column, bias) {
524
+    let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);
525
+    // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in
526
+    // insertion order) segment that matched. Even if we did respect the bias when tracing, we would
527
+    // still need to call `lowerBound()` to find the first segment, which is slower than just looking
528
+    // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the
529
+    // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to
530
+    // match LEAST_UPPER_BOUND.
531
+    if (!found && bias === LEAST_UPPER_BOUND)
532
+        min++;
533
+    if (min === -1 || min === segments.length)
534
+        return [];
535
+    // We may have found the segment that started at an earlier column. If this is the case, then we
536
+    // need to slice all generated segments that match _that_ column, because all such segments span
537
+    // to our desired column.
538
+    const matchedColumn = found ? column : segments[min][COLUMN];
539
+    // The binary search is not guaranteed to find the lower bound when a match wasn't found.
540
+    if (!found)
541
+        min = lowerBound(segments, matchedColumn, min);
542
+    const max = upperBound(segments, matchedColumn, min);
543
+    const result = [];
544
+    for (; min <= max; min++) {
545
+        const segment = segments[min];
546
+        result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
547
+    }
548
+    return result;
549
+}
550
+
551
+export { AnyMap, GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap, allGeneratedPositionsFor, decodedMap, decodedMappings, eachMapping, encodedMap, encodedMappings, generatedPositionFor, originalPositionFor, presortedDecodedMap, sourceContentFor, traceSegment };
552
+//# sourceMappingURL=trace-mapping.mjs.map

File diff suppressed because it is too large
+ 1 - 0
node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map


+ 566 - 0
node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js

@@ -0,0 +1,566 @@
1
+(function (global, factory) {
2
+    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@jridgewell/sourcemap-codec'), require('@jridgewell/resolve-uri')) :
3
+    typeof define === 'function' && define.amd ? define(['exports', '@jridgewell/sourcemap-codec', '@jridgewell/resolve-uri'], factory) :
4
+    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.traceMapping = {}, global.sourcemapCodec, global.resolveURI));
5
+})(this, (function (exports, sourcemapCodec, resolveUri) { 'use strict';
6
+
7
+    function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+    var resolveUri__default = /*#__PURE__*/_interopDefaultLegacy(resolveUri);
10
+
11
+    function resolve(input, base) {
12
+        // The base is always treated as a directory, if it's not empty.
13
+        // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327
14
+        // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401
15
+        if (base && !base.endsWith('/'))
16
+            base += '/';
17
+        return resolveUri__default["default"](input, base);
18
+    }
19
+
20
+    /**
21
+     * Removes everything after the last "/", but leaves the slash.
22
+     */
23
+    function stripFilename(path) {
24
+        if (!path)
25
+            return '';
26
+        const index = path.lastIndexOf('/');
27
+        return path.slice(0, index + 1);
28
+    }
29
+
30
+    const COLUMN = 0;
31
+    const SOURCES_INDEX = 1;
32
+    const SOURCE_LINE = 2;
33
+    const SOURCE_COLUMN = 3;
34
+    const NAMES_INDEX = 4;
35
+    const REV_GENERATED_LINE = 1;
36
+    const REV_GENERATED_COLUMN = 2;
37
+
38
+    function maybeSort(mappings, owned) {
39
+        const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
40
+        if (unsortedIndex === mappings.length)
41
+            return mappings;
42
+        // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If
43
+        // not, we do not want to modify the consumer's input array.
44
+        if (!owned)
45
+            mappings = mappings.slice();
46
+        for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {
47
+            mappings[i] = sortSegments(mappings[i], owned);
48
+        }
49
+        return mappings;
50
+    }
51
+    function nextUnsortedSegmentLine(mappings, start) {
52
+        for (let i = start; i < mappings.length; i++) {
53
+            if (!isSorted(mappings[i]))
54
+                return i;
55
+        }
56
+        return mappings.length;
57
+    }
58
+    function isSorted(line) {
59
+        for (let j = 1; j < line.length; j++) {
60
+            if (line[j][COLUMN] < line[j - 1][COLUMN]) {
61
+                return false;
62
+            }
63
+        }
64
+        return true;
65
+    }
66
+    function sortSegments(line, owned) {
67
+        if (!owned)
68
+            line = line.slice();
69
+        return line.sort(sortComparator);
70
+    }
71
+    function sortComparator(a, b) {
72
+        return a[COLUMN] - b[COLUMN];
73
+    }
74
+
75
+    let found = false;
76
+    /**
77
+     * A binary search implementation that returns the index if a match is found.
78
+     * If no match is found, then the left-index (the index associated with the item that comes just
79
+     * before the desired index) is returned. To maintain proper sort order, a splice would happen at
80
+     * the next index:
81
+     *
82
+     * ```js
83
+     * const array = [1, 3];
84
+     * const needle = 2;
85
+     * const index = binarySearch(array, needle, (item, needle) => item - needle);
86
+     *
87
+     * assert.equal(index, 0);
88
+     * array.splice(index + 1, 0, needle);
89
+     * assert.deepEqual(array, [1, 2, 3]);
90
+     * ```
91
+     */
92
+    function binarySearch(haystack, needle, low, high) {
93
+        while (low <= high) {
94
+            const mid = low + ((high - low) >> 1);
95
+            const cmp = haystack[mid][COLUMN] - needle;
96
+            if (cmp === 0) {
97
+                found = true;
98
+                return mid;
99
+            }
100
+            if (cmp < 0) {
101
+                low = mid + 1;
102
+            }
103
+            else {
104
+                high = mid - 1;
105
+            }
106
+        }
107
+        found = false;
108
+        return low - 1;
109
+    }
110
+    function upperBound(haystack, needle, index) {
111
+        for (let i = index + 1; i < haystack.length; index = i++) {
112
+            if (haystack[i][COLUMN] !== needle)
113
+                break;
114
+        }
115
+        return index;
116
+    }
117
+    function lowerBound(haystack, needle, index) {
118
+        for (let i = index - 1; i >= 0; index = i--) {
119
+            if (haystack[i][COLUMN] !== needle)
120
+                break;
121
+        }
122
+        return index;
123
+    }
124
+    function memoizedState() {
125
+        return {
126
+            lastKey: -1,
127
+            lastNeedle: -1,
128
+            lastIndex: -1,
129
+        };
130
+    }
131
+    /**
132
+     * This overly complicated beast is just to record the last tested line/column and the resulting
133
+     * index, allowing us to skip a few tests if mappings are monotonically increasing.
134
+     */
135
+    function memoizedBinarySearch(haystack, needle, state, key) {
136
+        const { lastKey, lastNeedle, lastIndex } = state;
137
+        let low = 0;
138
+        let high = haystack.length - 1;
139
+        if (key === lastKey) {
140
+            if (needle === lastNeedle) {
141
+                found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;
142
+                return lastIndex;
143
+            }
144
+            if (needle >= lastNeedle) {
145
+                // lastIndex may be -1 if the previous needle was not found.
146
+                low = lastIndex === -1 ? 0 : lastIndex;
147
+            }
148
+            else {
149
+                high = lastIndex;
150
+            }
151
+        }
152
+        state.lastKey = key;
153
+        state.lastNeedle = needle;
154
+        return (state.lastIndex = binarySearch(haystack, needle, low, high));
155
+    }
156
+
157
+    // Rebuilds the original source files, with mappings that are ordered by source line/column instead
158
+    // of generated line/column.
159
+    function buildBySources(decoded, memos) {
160
+        const sources = memos.map(buildNullArray);
161
+        for (let i = 0; i < decoded.length; i++) {
162
+            const line = decoded[i];
163
+            for (let j = 0; j < line.length; j++) {
164
+                const seg = line[j];
165
+                if (seg.length === 1)
166
+                    continue;
167
+                const sourceIndex = seg[SOURCES_INDEX];
168
+                const sourceLine = seg[SOURCE_LINE];
169
+                const sourceColumn = seg[SOURCE_COLUMN];
170
+                const originalSource = sources[sourceIndex];
171
+                const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = []));
172
+                const memo = memos[sourceIndex];
173
+                // The binary search either found a match, or it found the left-index just before where the
174
+                // segment should go. Either way, we want to insert after that. And there may be multiple
175
+                // generated segments associated with an original location, so there may need to move several
176
+                // indexes before we find where we need to insert.
177
+                const index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine));
178
+                insert(originalLine, (memo.lastIndex = index + 1), [sourceColumn, i, seg[COLUMN]]);
179
+            }
180
+        }
181
+        return sources;
182
+    }
183
+    function insert(array, index, value) {
184
+        for (let i = array.length; i > index; i--) {
185
+            array[i] = array[i - 1];
186
+        }
187
+        array[index] = value;
188
+    }
189
+    // Null arrays allow us to use ordered index keys without actually allocating contiguous memory like
190
+    // a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations.
191
+    // Numeric properties on objects are magically sorted in ascending order by the engine regardless of
192
+    // the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending
193
+    // order when iterating with for-in.
194
+    function buildNullArray() {
195
+        return { __proto__: null };
196
+    }
197
+
198
+    const AnyMap = function (map, mapUrl) {
199
+        const parsed = typeof map === 'string' ? JSON.parse(map) : map;
200
+        if (!('sections' in parsed))
201
+            return new TraceMap(parsed, mapUrl);
202
+        const mappings = [];
203
+        const sources = [];
204
+        const sourcesContent = [];
205
+        const names = [];
206
+        recurse(parsed, mapUrl, mappings, sources, sourcesContent, names, 0, 0, Infinity, Infinity);
207
+        const joined = {
208
+            version: 3,
209
+            file: parsed.file,
210
+            names,
211
+            sources,
212
+            sourcesContent,
213
+            mappings,
214
+        };
215
+        return exports.presortedDecodedMap(joined);
216
+    };
217
+    function recurse(input, mapUrl, mappings, sources, sourcesContent, names, lineOffset, columnOffset, stopLine, stopColumn) {
218
+        const { sections } = input;
219
+        for (let i = 0; i < sections.length; i++) {
220
+            const { map, offset } = sections[i];
221
+            let sl = stopLine;
222
+            let sc = stopColumn;
223
+            if (i + 1 < sections.length) {
224
+                const nextOffset = sections[i + 1].offset;
225
+                sl = Math.min(stopLine, lineOffset + nextOffset.line);
226
+                if (sl === stopLine) {
227
+                    sc = Math.min(stopColumn, columnOffset + nextOffset.column);
228
+                }
229
+                else if (sl < stopLine) {
230
+                    sc = columnOffset + nextOffset.column;
231
+                }
232
+            }
233
+            addSection(map, mapUrl, mappings, sources, sourcesContent, names, lineOffset + offset.line, columnOffset + offset.column, sl, sc);
234
+        }
235
+    }
236
+    function addSection(input, mapUrl, mappings, sources, sourcesContent, names, lineOffset, columnOffset, stopLine, stopColumn) {
237
+        if ('sections' in input)
238
+            return recurse(...arguments);
239
+        const map = new TraceMap(input, mapUrl);
240
+        const sourcesOffset = sources.length;
241
+        const namesOffset = names.length;
242
+        const decoded = exports.decodedMappings(map);
243
+        const { resolvedSources, sourcesContent: contents } = map;
244
+        append(sources, resolvedSources);
245
+        append(names, map.names);
246
+        if (contents)
247
+            append(sourcesContent, contents);
248
+        else
249
+            for (let i = 0; i < resolvedSources.length; i++)
250
+                sourcesContent.push(null);
251
+        for (let i = 0; i < decoded.length; i++) {
252
+            const lineI = lineOffset + i;
253
+            // We can only add so many lines before we step into the range that the next section's map
254
+            // controls. When we get to the last line, then we'll start checking the segments to see if
255
+            // they've crossed into the column range. But it may not have any columns that overstep, so we
256
+            // still need to check that we don't overstep lines, too.
257
+            if (lineI > stopLine)
258
+                return;
259
+            // The out line may already exist in mappings (if we're continuing the line started by a
260
+            // previous section). Or, we may have jumped ahead several lines to start this section.
261
+            const out = getLine(mappings, lineI);
262
+            // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the
263
+            // map can be multiple lines), it doesn't.
264
+            const cOffset = i === 0 ? columnOffset : 0;
265
+            const line = decoded[i];
266
+            for (let j = 0; j < line.length; j++) {
267
+                const seg = line[j];
268
+                const column = cOffset + seg[COLUMN];
269
+                // If this segment steps into the column range that the next section's map controls, we need
270
+                // to stop early.
271
+                if (lineI === stopLine && column >= stopColumn)
272
+                    return;
273
+                if (seg.length === 1) {
274
+                    out.push([column]);
275
+                    continue;
276
+                }
277
+                const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];
278
+                const sourceLine = seg[SOURCE_LINE];
279
+                const sourceColumn = seg[SOURCE_COLUMN];
280
+                out.push(seg.length === 4
281
+                    ? [column, sourcesIndex, sourceLine, sourceColumn]
282
+                    : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]);
283
+            }
284
+        }
285
+    }
286
+    function append(arr, other) {
287
+        for (let i = 0; i < other.length; i++)
288
+            arr.push(other[i]);
289
+    }
290
+    function getLine(arr, index) {
291
+        for (let i = arr.length; i <= index; i++)
292
+            arr[i] = [];
293
+        return arr[index];
294
+    }
295
+
296
+    const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)';
297
+    const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)';
298
+    const LEAST_UPPER_BOUND = -1;
299
+    const GREATEST_LOWER_BOUND = 1;
300
+    /**
301
+     * Returns the encoded (VLQ string) form of the SourceMap's mappings field.
302
+     */
303
+    exports.encodedMappings = void 0;
304
+    /**
305
+     * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
306
+     */
307
+    exports.decodedMappings = void 0;
308
+    /**
309
+     * A low-level API to find the segment associated with a generated line/column (think, from a
310
+     * stack trace). Line and column here are 0-based, unlike `originalPositionFor`.
311
+     */
312
+    exports.traceSegment = void 0;
313
+    /**
314
+     * A higher-level API to find the source/line/column associated with a generated line/column
315
+     * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
316
+     * `source-map` library.
317
+     */
318
+    exports.originalPositionFor = void 0;
319
+    /**
320
+     * Finds the generated line/column position of the provided source/line/column source position.
321
+     */
322
+    exports.generatedPositionFor = void 0;
323
+    /**
324
+     * Finds all generated line/column positions of the provided source/line/column source position.
325
+     */
326
+    exports.allGeneratedPositionsFor = void 0;
327
+    /**
328
+     * Iterates each mapping in generated position order.
329
+     */
330
+    exports.eachMapping = void 0;
331
+    /**
332
+     * Retrieves the source content for a particular source, if its found. Returns null if not.
333
+     */
334
+    exports.sourceContentFor = void 0;
335
+    /**
336
+     * A helper that skips sorting of the input map's mappings array, which can be expensive for larger
337
+     * maps.
338
+     */
339
+    exports.presortedDecodedMap = void 0;
340
+    /**
341
+     * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
342
+     * a sourcemap, or to JSON.stringify.
343
+     */
344
+    exports.decodedMap = void 0;
345
+    /**
346
+     * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
347
+     * a sourcemap, or to JSON.stringify.
348
+     */
349
+    exports.encodedMap = void 0;
350
+    class TraceMap {
351
+        constructor(map, mapUrl) {
352
+            const isString = typeof map === 'string';
353
+            if (!isString && map._decodedMemo)
354
+                return map;
355
+            const parsed = (isString ? JSON.parse(map) : map);
356
+            const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
357
+            this.version = version;
358
+            this.file = file;
359
+            this.names = names;
360
+            this.sourceRoot = sourceRoot;
361
+            this.sources = sources;
362
+            this.sourcesContent = sourcesContent;
363
+            const from = resolve(sourceRoot || '', stripFilename(mapUrl));
364
+            this.resolvedSources = sources.map((s) => resolve(s || '', from));
365
+            const { mappings } = parsed;
366
+            if (typeof mappings === 'string') {
367
+                this._encoded = mappings;
368
+                this._decoded = undefined;
369
+            }
370
+            else {
371
+                this._encoded = undefined;
372
+                this._decoded = maybeSort(mappings, isString);
373
+            }
374
+            this._decodedMemo = memoizedState();
375
+            this._bySources = undefined;
376
+            this._bySourceMemos = undefined;
377
+        }
378
+    }
379
+    (() => {
380
+        exports.encodedMappings = (map) => {
381
+            var _a;
382
+            return ((_a = map._encoded) !== null && _a !== void 0 ? _a : (map._encoded = sourcemapCodec.encode(map._decoded)));
383
+        };
384
+        exports.decodedMappings = (map) => {
385
+            return (map._decoded || (map._decoded = sourcemapCodec.decode(map._encoded)));
386
+        };
387
+        exports.traceSegment = (map, line, column) => {
388
+            const decoded = exports.decodedMappings(map);
389
+            // It's common for parent source maps to have pointers to lines that have no
390
+            // mapping (like a "//# sourceMappingURL=") at the end of the child file.
391
+            if (line >= decoded.length)
392
+                return null;
393
+            const segments = decoded[line];
394
+            const index = traceSegmentInternal(segments, map._decodedMemo, line, column, GREATEST_LOWER_BOUND);
395
+            return index === -1 ? null : segments[index];
396
+        };
397
+        exports.originalPositionFor = (map, { line, column, bias }) => {
398
+            line--;
399
+            if (line < 0)
400
+                throw new Error(LINE_GTR_ZERO);
401
+            if (column < 0)
402
+                throw new Error(COL_GTR_EQ_ZERO);
403
+            const decoded = exports.decodedMappings(map);
404
+            // It's common for parent source maps to have pointers to lines that have no
405
+            // mapping (like a "//# sourceMappingURL=") at the end of the child file.
406
+            if (line >= decoded.length)
407
+                return OMapping(null, null, null, null);
408
+            const segments = decoded[line];
409
+            const index = traceSegmentInternal(segments, map._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
410
+            if (index === -1)
411
+                return OMapping(null, null, null, null);
412
+            const segment = segments[index];
413
+            if (segment.length === 1)
414
+                return OMapping(null, null, null, null);
415
+            const { names, resolvedSources } = map;
416
+            return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);
417
+        };
418
+        exports.allGeneratedPositionsFor = (map, { source, line, column, bias }) => {
419
+            // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit.
420
+            return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);
421
+        };
422
+        exports.generatedPositionFor = (map, { source, line, column, bias }) => {
423
+            return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);
424
+        };
425
+        exports.eachMapping = (map, cb) => {
426
+            const decoded = exports.decodedMappings(map);
427
+            const { names, resolvedSources } = map;
428
+            for (let i = 0; i < decoded.length; i++) {
429
+                const line = decoded[i];
430
+                for (let j = 0; j < line.length; j++) {
431
+                    const seg = line[j];
432
+                    const generatedLine = i + 1;
433
+                    const generatedColumn = seg[0];
434
+                    let source = null;
435
+                    let originalLine = null;
436
+                    let originalColumn = null;
437
+                    let name = null;
438
+                    if (seg.length !== 1) {
439
+                        source = resolvedSources[seg[1]];
440
+                        originalLine = seg[2] + 1;
441
+                        originalColumn = seg[3];
442
+                    }
443
+                    if (seg.length === 5)
444
+                        name = names[seg[4]];
445
+                    cb({
446
+                        generatedLine,
447
+                        generatedColumn,
448
+                        source,
449
+                        originalLine,
450
+                        originalColumn,
451
+                        name,
452
+                    });
453
+                }
454
+            }
455
+        };
456
+        exports.sourceContentFor = (map, source) => {
457
+            const { sources, resolvedSources, sourcesContent } = map;
458
+            if (sourcesContent == null)
459
+                return null;
460
+            let index = sources.indexOf(source);
461
+            if (index === -1)
462
+                index = resolvedSources.indexOf(source);
463
+            return index === -1 ? null : sourcesContent[index];
464
+        };
465
+        exports.presortedDecodedMap = (map, mapUrl) => {
466
+            const tracer = new TraceMap(clone(map, []), mapUrl);
467
+            tracer._decoded = map.mappings;
468
+            return tracer;
469
+        };
470
+        exports.decodedMap = (map) => {
471
+            return clone(map, exports.decodedMappings(map));
472
+        };
473
+        exports.encodedMap = (map) => {
474
+            return clone(map, exports.encodedMappings(map));
475
+        };
476
+        function generatedPosition(map, source, line, column, bias, all) {
477
+            line--;
478
+            if (line < 0)
479
+                throw new Error(LINE_GTR_ZERO);
480
+            if (column < 0)
481
+                throw new Error(COL_GTR_EQ_ZERO);
482
+            const { sources, resolvedSources } = map;
483
+            let sourceIndex = sources.indexOf(source);
484
+            if (sourceIndex === -1)
485
+                sourceIndex = resolvedSources.indexOf(source);
486
+            if (sourceIndex === -1)
487
+                return all ? [] : GMapping(null, null);
488
+            const generated = (map._bySources || (map._bySources = buildBySources(exports.decodedMappings(map), (map._bySourceMemos = sources.map(memoizedState)))));
489
+            const segments = generated[sourceIndex][line];
490
+            if (segments == null)
491
+                return all ? [] : GMapping(null, null);
492
+            const memo = map._bySourceMemos[sourceIndex];
493
+            if (all)
494
+                return sliceGeneratedPositions(segments, memo, line, column, bias);
495
+            const index = traceSegmentInternal(segments, memo, line, column, bias);
496
+            if (index === -1)
497
+                return GMapping(null, null);
498
+            const segment = segments[index];
499
+            return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
500
+        }
501
+    })();
502
+    function clone(map, mappings) {
503
+        return {
504
+            version: map.version,
505
+            file: map.file,
506
+            names: map.names,
507
+            sourceRoot: map.sourceRoot,
508
+            sources: map.sources,
509
+            sourcesContent: map.sourcesContent,
510
+            mappings,
511
+        };
512
+    }
513
+    function OMapping(source, line, column, name) {
514
+        return { source, line, column, name };
515
+    }
516
+    function GMapping(line, column) {
517
+        return { line, column };
518
+    }
519
+    function traceSegmentInternal(segments, memo, line, column, bias) {
520
+        let index = memoizedBinarySearch(segments, column, memo, line);
521
+        if (found) {
522
+            index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);
523
+        }
524
+        else if (bias === LEAST_UPPER_BOUND)
525
+            index++;
526
+        if (index === -1 || index === segments.length)
527
+            return -1;
528
+        return index;
529
+    }
530
+    function sliceGeneratedPositions(segments, memo, line, column, bias) {
531
+        let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);
532
+        // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in
533
+        // insertion order) segment that matched. Even if we did respect the bias when tracing, we would
534
+        // still need to call `lowerBound()` to find the first segment, which is slower than just looking
535
+        // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the
536
+        // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to
537
+        // match LEAST_UPPER_BOUND.
538
+        if (!found && bias === LEAST_UPPER_BOUND)
539
+            min++;
540
+        if (min === -1 || min === segments.length)
541
+            return [];
542
+        // We may have found the segment that started at an earlier column. If this is the case, then we
543
+        // need to slice all generated segments that match _that_ column, because all such segments span
544
+        // to our desired column.
545
+        const matchedColumn = found ? column : segments[min][COLUMN];
546
+        // The binary search is not guaranteed to find the lower bound when a match wasn't found.
547
+        if (!found)
548
+            min = lowerBound(segments, matchedColumn, min);
549
+        const max = upperBound(segments, matchedColumn, min);
550
+        const result = [];
551
+        for (; min <= max; min++) {
552
+            const segment = segments[min];
553
+            result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
554
+        }
555
+        return result;
556
+    }
557
+
558
+    exports.AnyMap = AnyMap;
559
+    exports.GREATEST_LOWER_BOUND = GREATEST_LOWER_BOUND;
560
+    exports.LEAST_UPPER_BOUND = LEAST_UPPER_BOUND;
561
+    exports.TraceMap = TraceMap;
562
+
563
+    Object.defineProperty(exports, '__esModule', { value: true });
564
+
565
+}));
566
+//# sourceMappingURL=trace-mapping.umd.js.map

File diff suppressed because it is too large
+ 1 - 0
node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map


+ 8 - 0
node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts

@@ -0,0 +1,8 @@
1
+import { TraceMap } from './trace-mapping';
2
+import type { SectionedSourceMapInput } from './types';
3
+declare type AnyMap = {
4
+    new (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap;
5
+    (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap;
6
+};
7
+export declare const AnyMap: AnyMap;
8
+export {};

+ 32 - 0
node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts

@@ -0,0 +1,32 @@
1
+import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment';
2
+export declare 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;

+ 7 - 0
node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts

@@ -0,0 +1,7 @@
1
+import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment';
2
+import type { MemoState } from './binary-search';
3
+export declare type Source = {
4
+    __proto__: null;
5
+    [line: number]: Exclude<ReverseSegment, [number]>[];
6
+};
7
+export default function buildBySources(decoded: readonly SourceMapSegment[][], memos: MemoState[]): Source[];

+ 1 - 0
node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts

@@ -0,0 +1 @@
1
+export default function resolve(input: string, base: string | undefined): string;

+ 2 - 0
node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts

@@ -0,0 +1,2 @@
1
+import type { SourceMapSegment } from './sourcemap-segment';
2
+export default function maybeSort(mappings: SourceMapSegment[][], owned: boolean): SourceMapSegment[][];

+ 16 - 0
node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts

@@ -0,0 +1,16 @@
1
+declare type GeneratedColumn = number;
2
+declare type SourcesIndex = number;
3
+declare type SourceLine = number;
4
+declare type SourceColumn = number;
5
+declare type NamesIndex = number;
6
+declare type GeneratedLine = number;
7
+export declare type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];
8
+export declare 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 {};

+ 4 - 0
node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts

@@ -0,0 +1,4 @@
1
+/**
2
+ * Removes everything after the last "/", but leaves the slash.
3
+ */
4
+export default function stripFilename(path: string | undefined | null): string;

+ 74 - 0
node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts

@@ -0,0 +1,74 @@
1
+import type { SourceMapSegment } from './sourcemap-segment';
2
+import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping } from './types';
3
+export type { SourceMapSegment } from './sourcemap-segment';
4
+export type { SourceMapInput, SectionedSourceMapInput, DecodedSourceMap, EncodedSourceMap, SectionedSourceMap, InvalidOriginalMapping, OriginalMapping as Mapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, EachMapping, } from './types';
5
+export declare const LEAST_UPPER_BOUND = -1;
6
+export declare const GREATEST_LOWER_BOUND = 1;
7
+/**
8
+ * Returns the encoded (VLQ string) form of the SourceMap's mappings field.
9
+ */
10
+export declare let encodedMappings: (map: TraceMap) => EncodedSourceMap['mappings'];
11
+/**
12
+ * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
13
+ */
14
+export declare let decodedMappings: (map: TraceMap) => Readonly<DecodedSourceMap['mappings']>;
15
+/**
16
+ * A low-level API to find the segment associated with a generated line/column (think, from a
17
+ * stack trace). Line and column here are 0-based, unlike `originalPositionFor`.
18
+ */
19
+export declare let traceSegment: (map: TraceMap, line: number, column: number) => Readonly<SourceMapSegment> | null;
20
+/**
21
+ * A higher-level API to find the source/line/column associated with a generated line/column
22
+ * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
23
+ * `source-map` library.
24
+ */
25
+export declare let originalPositionFor: (map: TraceMap, needle: Needle) => OriginalMapping | InvalidOriginalMapping;
26
+/**
27
+ * Finds the generated line/column position of the provided source/line/column source position.
28
+ */
29
+export declare let generatedPositionFor: (map: TraceMap, needle: SourceNeedle) => GeneratedMapping | InvalidGeneratedMapping;
30
+/**
31
+ * Finds all generated line/column positions of the provided source/line/column source position.
32
+ */
33
+export declare let allGeneratedPositionsFor: (map: TraceMap, needle: SourceNeedle) => GeneratedMapping[];
34
+/**
35
+ * Iterates each mapping in generated position order.
36
+ */
37
+export declare let eachMapping: (map: TraceMap, cb: (mapping: EachMapping) => void) => void;
38
+/**
39
+ * Retrieves the source content for a particular source, if its found. Returns null if not.
40
+ */
41
+export declare let sourceContentFor: (map: TraceMap, source: string) => string | null;
42
+/**
43
+ * A helper that skips sorting of the input map's mappings array, which can be expensive for larger
44
+ * maps.
45
+ */
46
+export declare let presortedDecodedMap: (map: DecodedSourceMap, mapUrl?: string) => TraceMap;
47
+/**
48
+ * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
49
+ * a sourcemap, or to JSON.stringify.
50
+ */
51
+export declare let decodedMap: (map: TraceMap) => Omit<DecodedSourceMap, 'mappings'> & {
52
+    mappings: readonly SourceMapSegment[][];
53
+};
54
+/**
55
+ * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
56
+ * a sourcemap, or to JSON.stringify.
57
+ */
58
+export declare let encodedMap: (map: TraceMap) => EncodedSourceMap;
59
+export { AnyMap } from './any-map';
60
+export declare class TraceMap implements SourceMap {
61
+    version: SourceMapV3['version'];
62
+    file: SourceMapV3['file'];
63
+    names: SourceMapV3['names'];
64
+    sourceRoot: SourceMapV3['sourceRoot'];
65
+    sources: SourceMapV3['sources'];
66
+    sourcesContent: SourceMapV3['sourcesContent'];
67
+    resolvedSources: string[];
68
+    private _encoded;
69
+    private _decoded;
70
+    private _decodedMemo;
71
+    private _bySources;
72
+    private _bySourceMemos;
73
+    constructor(map: SourceMapInput, mapUrl?: string | null);
74
+}

+ 92 - 0
node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts

@@ -0,0 +1,92 @@
1
+import type { SourceMapSegment } from './sourcemap-segment';
2
+import type { GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap } from './trace-mapping';
3
+export interface SourceMapV3 {
4
+    file?: string | null;
5
+    names: string[];
6
+    sourceRoot?: string;
7
+    sources: (string | null)[];
8
+    sourcesContent?: (string | null)[];
9
+    version: 3;
10
+}
11
+export interface EncodedSourceMap extends SourceMapV3 {
12
+    mappings: string;
13
+}
14
+export interface DecodedSourceMap extends SourceMapV3 {
15
+    mappings: SourceMapSegment[][];
16
+}
17
+export interface Section {
18
+    offset: {
19
+        line: number;
20
+        column: number;
21
+    };
22
+    map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap;
23
+}
24
+export interface SectionedSourceMap {
25
+    file?: string | null;
26
+    sections: Section[];
27
+    version: 3;
28
+}
29
+export declare type OriginalMapping = {
30
+    source: string | null;
31
+    line: number;
32
+    column: number;
33
+    name: string | null;
34
+};
35
+export declare type InvalidOriginalMapping = {
36
+    source: null;
37
+    line: null;
38
+    column: null;
39
+    name: null;
40
+};
41
+export declare type GeneratedMapping = {
42
+    line: number;
43
+    column: number;
44
+};
45
+export declare type InvalidGeneratedMapping = {
46
+    line: null;
47
+    column: null;
48
+};
49
+export declare type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND;
50
+export declare type SourceMapInput = string | Ro<EncodedSourceMap> | Ro<DecodedSourceMap> | TraceMap;
51
+export declare type SectionedSourceMapInput = SourceMapInput | Ro<SectionedSourceMap>;
52
+export declare type Needle = {
53
+    line: number;
54
+    column: number;
55
+    bias?: Bias;
56
+};
57
+export declare type SourceNeedle = {
58
+    source: string;
59
+    line: number;
60
+    column: number;
61
+    bias?: Bias;
62
+};
63
+export declare type EachMapping = {
64
+    generatedLine: number;
65
+    generatedColumn: number;
66
+    source: null;
67
+    originalLine: null;
68
+    originalColumn: null;
69
+    name: null;
70
+} | {
71
+    generatedLine: number;
72
+    generatedColumn: number;
73
+    source: string | null;
74
+    originalLine: number;
75
+    originalColumn: number;
76
+    name: string | null;
77
+};
78
+export declare abstract class SourceMap {
79
+    version: SourceMapV3['version'];
80
+    file: SourceMapV3['file'];
81
+    names: SourceMapV3['names'];
82
+    sourceRoot: SourceMapV3['sourceRoot'];
83
+    sources: SourceMapV3['sources'];
84
+    sourcesContent: SourceMapV3['sourcesContent'];
85
+    resolvedSources: SourceMapV3['sources'];
86
+}
87
+export declare type Ro<T> = T extends Array<infer V> ? V[] | Readonly<V[]> | RoArray<V> | Readonly<RoArray<V>> : T extends object ? T | Readonly<T> | RoObject<T> | Readonly<RoObject<T>> : T;
88
+declare type RoArray<T> = Ro<T>[];
89
+declare type RoObject<T> = {
90
+    [K in keyof T]: T[K] | Ro<T[K]>;
91
+};
92
+export {};

+ 21 - 0
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/LICENSE

@@ -0,0 +1,21 @@
1
+The MIT License
2
+
3
+Copyright (c) 2015 Rich Harris
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy
6
+of this software and associated documentation files (the "Software"), to deal
7
+in the Software without restriction, including without limitation the rights
8
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+copies of the Software, and to permit persons to whom the Software is
10
+furnished to do so, subject to the following conditions:
11
+
12
+The above copyright notice and this permission notice shall be included in
13
+all copies or substantial portions of the Software.
14
+
15
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+THE SOFTWARE.

+ 200 - 0
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/README.md

@@ -0,0 +1,200 @@
1
+# sourcemap-codec
2
+
3
+Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit).
4
+
5
+
6
+## Why?
7
+
8
+Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap.
9
+
10
+This package makes the process slightly easier.
11
+
12
+
13
+## Installation
14
+
15
+```bash
16
+npm install sourcemap-codec
17
+```
18
+
19
+
20
+## Usage
21
+
22
+```js
23
+import { encode, decode } from 'sourcemap-codec';
24
+
25
+var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
26
+
27
+assert.deepEqual( decoded, [
28
+	// the first line (of the generated code) has no mappings,
29
+	// as shown by the starting semi-colon (which separates lines)
30
+	[],
31
+
32
+	// the second line contains four (comma-separated) segments
33
+	[
34
+		// segments are encoded as you'd expect:
35
+		// [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ]
36
+
37
+		// i.e. the first segment begins at column 2, and maps back to the second column
38
+		// of the second line (both zero-based) of the 0th source, and uses the 0th
39
+		// name in the `map.names` array
40
+		[ 2, 0, 2, 2, 0 ],
41
+
42
+		// the remaining segments are 4-length rather than 5-length,
43
+		// because they don't map a name
44
+		[ 4, 0, 2, 4 ],
45
+		[ 6, 0, 2, 5 ],
46
+		[ 7, 0, 2, 7 ]
47
+	],
48
+
49
+	// the final line contains two segments
50
+	[
51
+		[ 2, 1, 10, 19 ],
52
+		[ 12, 1, 11, 20 ]
53
+	]
54
+]);
55
+
56
+var encoded = encode( decoded );
57
+assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
58
+```
59
+
60
+## Benchmarks
61
+
62
+```
63
+node v18.0.0
64
+
65
+amp.js.map - 45120 segments
66
+
67
+Decode Memory Usage:
68
+@jridgewell/sourcemap-codec       5479160 bytes
69
+sourcemap-codec                   5659336 bytes
70
+source-map-0.6.1                 17144440 bytes
71
+source-map-0.8.0                  6867424 bytes
72
+Smallest memory usage is @jridgewell/sourcemap-codec
73
+
74
+Decode speed:
75
+decode: @jridgewell/sourcemap-codec x 502 ops/sec ±1.03% (90 runs sampled)
76
+decode: sourcemap-codec x 445 ops/sec ±0.97% (92 runs sampled)
77
+decode: source-map-0.6.1 x 36.01 ops/sec ±1.64% (49 runs sampled)
78
+decode: source-map-0.8.0 x 367 ops/sec ±0.04% (95 runs sampled)
79
+Fastest is decode: @jridgewell/sourcemap-codec
80
+
81
+Encode Memory Usage:
82
+@jridgewell/sourcemap-codec       1261620 bytes
83
+sourcemap-codec                   9119248 bytes
84
+source-map-0.6.1                  8968560 bytes
85
+source-map-0.8.0                  8952952 bytes
86
+Smallest memory usage is @jridgewell/sourcemap-codec
87
+
88
+Encode speed:
89
+encode: @jridgewell/sourcemap-codec x 738 ops/sec ±0.42% (98 runs sampled)
90
+encode: sourcemap-codec x 238 ops/sec ±0.73% (88 runs sampled)
91
+encode: source-map-0.6.1 x 162 ops/sec ±0.43% (84 runs sampled)
92
+encode: source-map-0.8.0 x 191 ops/sec ±0.34% (90 runs sampled)
93
+Fastest is encode: @jridgewell/sourcemap-codec
94
+
95
+
96
+***
97
+
98
+
99
+babel.min.js.map - 347793 segments
100
+
101
+Decode Memory Usage:
102
+@jridgewell/sourcemap-codec      35338184 bytes
103
+sourcemap-codec                  35922736 bytes
104
+source-map-0.6.1                 62366360 bytes
105
+source-map-0.8.0                 44337416 bytes
106
+Smallest memory usage is @jridgewell/sourcemap-codec
107
+
108
+Decode speed:
109
+decode: @jridgewell/sourcemap-codec x 40.35 ops/sec ±4.47% (54 runs sampled)
110
+decode: sourcemap-codec x 36.76 ops/sec ±3.67% (51 runs sampled)
111
+decode: source-map-0.6.1 x 4.44 ops/sec ±2.15% (16 runs sampled)
112
+decode: source-map-0.8.0 x 59.35 ops/sec ±0.05% (78 runs sampled)
113
+Fastest is decode: source-map-0.8.0
114
+
115
+Encode Memory Usage:
116
+@jridgewell/sourcemap-codec       7212604 bytes
117
+sourcemap-codec                  21421456 bytes
118
+source-map-0.6.1                 25286888 bytes
119
+source-map-0.8.0                 25498744 bytes
120
+Smallest memory usage is @jridgewell/sourcemap-codec
121
+
122
+Encode speed:
123
+encode: @jridgewell/sourcemap-codec x 112 ops/sec ±0.13% (84 runs sampled)
124
+encode: sourcemap-codec x 30.23 ops/sec ±2.76% (53 runs sampled)
125
+encode: source-map-0.6.1 x 19.43 ops/sec ±3.70% (37 runs sampled)
126
+encode: source-map-0.8.0 x 19.40 ops/sec ±3.26% (37 runs sampled)
127
+Fastest is encode: @jridgewell/sourcemap-codec
128
+
129
+
130
+***
131
+
132
+
133
+preact.js.map - 1992 segments
134
+
135
+Decode Memory Usage:
136
+@jridgewell/sourcemap-codec        500272 bytes
137
+sourcemap-codec                    516864 bytes
138
+source-map-0.6.1                  1596672 bytes
139
+source-map-0.8.0                   517272 bytes
140
+Smallest memory usage is @jridgewell/sourcemap-codec
141
+
142
+Decode speed:
143
+decode: @jridgewell/sourcemap-codec x 16,137 ops/sec ±0.17% (99 runs sampled)
144
+decode: sourcemap-codec x 12,139 ops/sec ±0.13% (99 runs sampled)
145
+decode: source-map-0.6.1 x 1,264 ops/sec ±0.12% (100 runs sampled)
146
+decode: source-map-0.8.0 x 9,894 ops/sec ±0.08% (101 runs sampled)
147
+Fastest is decode: @jridgewell/sourcemap-codec
148
+
149
+Encode Memory Usage:
150
+@jridgewell/sourcemap-codec        321026 bytes
151
+sourcemap-codec                    830832 bytes
152
+source-map-0.6.1                   586608 bytes
153
+source-map-0.8.0                   586680 bytes
154
+Smallest memory usage is @jridgewell/sourcemap-codec
155
+
156
+Encode speed:
157
+encode: @jridgewell/sourcemap-codec x 19,876 ops/sec ±0.78% (95 runs sampled)
158
+encode: sourcemap-codec x 6,983 ops/sec ±0.15% (100 runs sampled)
159
+encode: source-map-0.6.1 x 5,070 ops/sec ±0.12% (102 runs sampled)
160
+encode: source-map-0.8.0 x 5,641 ops/sec ±0.17% (100 runs sampled)
161
+Fastest is encode: @jridgewell/sourcemap-codec
162
+
163
+
164
+***
165
+
166
+
167
+react.js.map - 5726 segments
168
+
169
+Decode Memory Usage:
170
+@jridgewell/sourcemap-codec        734848 bytes
171
+sourcemap-codec                    954200 bytes
172
+source-map-0.6.1                  2276432 bytes
173
+source-map-0.8.0                   955488 bytes
174
+Smallest memory usage is @jridgewell/sourcemap-codec
175
+
176
+Decode speed:
177
+decode: @jridgewell/sourcemap-codec x 5,723 ops/sec ±0.12% (98 runs sampled)
178
+decode: sourcemap-codec x 4,555 ops/sec ±0.09% (101 runs sampled)
179
+decode: source-map-0.6.1 x 437 ops/sec ±0.11% (93 runs sampled)
180
+decode: source-map-0.8.0 x 3,441 ops/sec ±0.15% (100 runs sampled)
181
+Fastest is decode: @jridgewell/sourcemap-codec
182
+
183
+Encode Memory Usage:
184
+@jridgewell/sourcemap-codec        638672 bytes
185
+sourcemap-codec                   1109840 bytes
186
+source-map-0.6.1                  1321224 bytes
187
+source-map-0.8.0                  1324448 bytes
188
+Smallest memory usage is @jridgewell/sourcemap-codec
189
+
190
+Encode speed:
191
+encode: @jridgewell/sourcemap-codec x 6,801 ops/sec ±0.48% (98 runs sampled)
192
+encode: sourcemap-codec x 2,533 ops/sec ±0.13% (101 runs sampled)
193
+encode: source-map-0.6.1 x 2,248 ops/sec ±0.08% (100 runs sampled)
194
+encode: source-map-0.8.0 x 2,303 ops/sec ±0.15% (100 runs sampled)
195
+Fastest is encode: @jridgewell/sourcemap-codec
196
+```
197
+
198
+# License
199
+
200
+MIT

+ 164 - 0
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs

@@ -0,0 +1,164 @@
1
+const comma = ','.charCodeAt(0);
2
+const semicolon = ';'.charCodeAt(0);
3
+const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
4
+const intToChar = new Uint8Array(64); // 64 possible chars.
5
+const charToInt = new Uint8Array(128); // z is 122 in ASCII
6
+for (let i = 0; i < chars.length; i++) {
7
+    const c = chars.charCodeAt(i);
8
+    intToChar[i] = c;
9
+    charToInt[c] = i;
10
+}
11
+// Provide a fallback for older environments.
12
+const td = typeof TextDecoder !== 'undefined'
13
+    ? /* #__PURE__ */ new TextDecoder()
14
+    : typeof Buffer !== 'undefined'
15
+        ? {
16
+            decode(buf) {
17
+                const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
18
+                return out.toString();
19
+            },
20
+        }
21
+        : {
22
+            decode(buf) {
23
+                let out = '';
24
+                for (let i = 0; i < buf.length; i++) {
25
+                    out += String.fromCharCode(buf[i]);
26
+                }
27
+                return out;
28
+            },
29
+        };
30
+function decode(mappings) {
31
+    const state = new Int32Array(5);
32
+    const decoded = [];
33
+    let index = 0;
34
+    do {
35
+        const semi = indexOf(mappings, index);
36
+        const line = [];
37
+        let sorted = true;
38
+        let lastCol = 0;
39
+        state[0] = 0;
40
+        for (let i = index; i < semi; i++) {
41
+            let seg;
42
+            i = decodeInteger(mappings, i, state, 0); // genColumn
43
+            const col = state[0];
44
+            if (col < lastCol)
45
+                sorted = false;
46
+            lastCol = col;
47
+            if (hasMoreVlq(mappings, i, semi)) {
48
+                i = decodeInteger(mappings, i, state, 1); // sourcesIndex
49
+                i = decodeInteger(mappings, i, state, 2); // sourceLine
50
+                i = decodeInteger(mappings, i, state, 3); // sourceColumn
51
+                if (hasMoreVlq(mappings, i, semi)) {
52
+                    i = decodeInteger(mappings, i, state, 4); // namesIndex
53
+                    seg = [col, state[1], state[2], state[3], state[4]];
54
+                }
55
+                else {
56
+                    seg = [col, state[1], state[2], state[3]];
57
+                }
58
+            }
59
+            else {
60
+                seg = [col];
61
+            }
62
+            line.push(seg);
63
+        }
64
+        if (!sorted)
65
+            sort(line);
66
+        decoded.push(line);
67
+        index = semi + 1;
68
+    } while (index <= mappings.length);
69
+    return decoded;
70
+}
71
+function indexOf(mappings, index) {
72
+    const idx = mappings.indexOf(';', index);
73
+    return idx === -1 ? mappings.length : idx;
74
+}
75
+function decodeInteger(mappings, pos, state, j) {
76
+    let value = 0;
77
+    let shift = 0;
78
+    let integer = 0;
79
+    do {
80
+        const c = mappings.charCodeAt(pos++);
81
+        integer = charToInt[c];
82
+        value |= (integer & 31) << shift;
83
+        shift += 5;
84
+    } while (integer & 32);
85
+    const shouldNegate = value & 1;
86
+    value >>>= 1;
87
+    if (shouldNegate) {
88
+        value = -0x80000000 | -value;
89
+    }
90
+    state[j] += value;
91
+    return pos;
92
+}
93
+function hasMoreVlq(mappings, i, length) {
94
+    if (i >= length)
95
+        return false;
96
+    return mappings.charCodeAt(i) !== comma;
97
+}
98
+function sort(line) {
99
+    line.sort(sortComparator);
100
+}
101
+function sortComparator(a, b) {
102
+    return a[0] - b[0];
103
+}
104
+function encode(decoded) {
105
+    const state = new Int32Array(5);
106
+    const bufLength = 1024 * 16;
107
+    const subLength = bufLength - 36;
108
+    const buf = new Uint8Array(bufLength);
109
+    const sub = buf.subarray(0, subLength);
110
+    let pos = 0;
111
+    let out = '';
112
+    for (let i = 0; i < decoded.length; i++) {
113
+        const line = decoded[i];
114
+        if (i > 0) {
115
+            if (pos === bufLength) {
116
+                out += td.decode(buf);
117
+                pos = 0;
118
+            }
119
+            buf[pos++] = semicolon;
120
+        }
121
+        if (line.length === 0)
122
+            continue;
123
+        state[0] = 0;
124
+        for (let j = 0; j < line.length; j++) {
125
+            const segment = line[j];
126
+            // We can push up to 5 ints, each int can take at most 7 chars, and we
127
+            // may push a comma.
128
+            if (pos > subLength) {
129
+                out += td.decode(sub);
130
+                buf.copyWithin(0, subLength, pos);
131
+                pos -= subLength;
132
+            }
133
+            if (j > 0)
134
+                buf[pos++] = comma;
135
+            pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
136
+            if (segment.length === 1)
137
+                continue;
138
+            pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
139
+            pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
140
+            pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
141
+            if (segment.length === 4)
142
+                continue;
143
+            pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
144
+        }
145
+    }
146
+    return out + td.decode(buf.subarray(0, pos));
147
+}
148
+function encodeInteger(buf, pos, state, segment, j) {
149
+    const next = segment[j];
150
+    let num = next - state[j];
151
+    state[j] = next;
152
+    num = num < 0 ? (-num << 1) | 1 : num << 1;
153
+    do {
154
+        let clamped = num & 0b011111;
155
+        num >>>= 5;
156
+        if (num > 0)
157
+            clamped |= 0b100000;
158
+        buf[pos++] = intToChar[clamped];
159
+    } while (num > 0);
160
+    return pos;
161
+}
162
+
163
+export { decode, encode };
164
+//# sourceMappingURL=sourcemap-codec.mjs.map

File diff suppressed because it is too large
+ 1 - 0
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map


+ 175 - 0
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js

@@ -0,0 +1,175 @@
1
+(function (global, factory) {
2
+    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
+    typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
+    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sourcemapCodec = {}));
5
+})(this, (function (exports) { 'use strict';
6
+
7
+    const comma = ','.charCodeAt(0);
8
+    const semicolon = ';'.charCodeAt(0);
9
+    const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
10
+    const intToChar = new Uint8Array(64); // 64 possible chars.
11
+    const charToInt = new Uint8Array(128); // z is 122 in ASCII
12
+    for (let i = 0; i < chars.length; i++) {
13
+        const c = chars.charCodeAt(i);
14
+        intToChar[i] = c;
15
+        charToInt[c] = i;
16
+    }
17
+    // Provide a fallback for older environments.
18
+    const td = typeof TextDecoder !== 'undefined'
19
+        ? /* #__PURE__ */ new TextDecoder()
20
+        : typeof Buffer !== 'undefined'
21
+            ? {
22
+                decode(buf) {
23
+                    const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
24
+                    return out.toString();
25
+                },
26
+            }
27
+            : {
28
+                decode(buf) {
29
+                    let out = '';
30
+                    for (let i = 0; i < buf.length; i++) {
31
+                        out += String.fromCharCode(buf[i]);
32
+                    }
33
+                    return out;
34
+                },
35
+            };
36
+    function decode(mappings) {
37
+        const state = new Int32Array(5);
38
+        const decoded = [];
39
+        let index = 0;
40
+        do {
41
+            const semi = indexOf(mappings, index);
42
+            const line = [];
43
+            let sorted = true;
44
+            let lastCol = 0;
45
+            state[0] = 0;
46
+            for (let i = index; i < semi; i++) {
47
+                let seg;
48
+                i = decodeInteger(mappings, i, state, 0); // genColumn
49
+                const col = state[0];
50
+                if (col < lastCol)
51
+                    sorted = false;
52
+                lastCol = col;
53
+                if (hasMoreVlq(mappings, i, semi)) {
54
+                    i = decodeInteger(mappings, i, state, 1); // sourcesIndex
55
+                    i = decodeInteger(mappings, i, state, 2); // sourceLine
56
+                    i = decodeInteger(mappings, i, state, 3); // sourceColumn
57
+                    if (hasMoreVlq(mappings, i, semi)) {
58
+                        i = decodeInteger(mappings, i, state, 4); // namesIndex
59
+                        seg = [col, state[1], state[2], state[3], state[4]];
60
+                    }
61
+                    else {
62
+                        seg = [col, state[1], state[2], state[3]];
63
+                    }
64
+                }
65
+                else {
66
+                    seg = [col];
67
+                }
68
+                line.push(seg);
69
+            }
70
+            if (!sorted)
71
+                sort(line);
72
+            decoded.push(line);
73
+            index = semi + 1;
74
+        } while (index <= mappings.length);
75
+        return decoded;
76
+    }
77
+    function indexOf(mappings, index) {
78
+        const idx = mappings.indexOf(';', index);
79
+        return idx === -1 ? mappings.length : idx;
80
+    }
81
+    function decodeInteger(mappings, pos, state, j) {
82
+        let value = 0;
83
+        let shift = 0;
84
+        let integer = 0;
85
+        do {
86
+            const c = mappings.charCodeAt(pos++);
87
+            integer = charToInt[c];
88
+            value |= (integer & 31) << shift;
89
+            shift += 5;
90
+        } while (integer & 32);
91
+        const shouldNegate = value & 1;
92
+        value >>>= 1;
93
+        if (shouldNegate) {
94
+            value = -0x80000000 | -value;
95
+        }
96
+        state[j] += value;
97
+        return pos;
98
+    }
99
+    function hasMoreVlq(mappings, i, length) {
100
+        if (i >= length)
101
+            return false;
102
+        return mappings.charCodeAt(i) !== comma;
103
+    }
104
+    function sort(line) {
105
+        line.sort(sortComparator);
106
+    }
107
+    function sortComparator(a, b) {
108
+        return a[0] - b[0];
109
+    }
110
+    function encode(decoded) {
111
+        const state = new Int32Array(5);
112
+        const bufLength = 1024 * 16;
113
+        const subLength = bufLength - 36;
114
+        const buf = new Uint8Array(bufLength);
115
+        const sub = buf.subarray(0, subLength);
116
+        let pos = 0;
117
+        let out = '';
118
+        for (let i = 0; i < decoded.length; i++) {
119
+            const line = decoded[i];
120
+            if (i > 0) {
121
+                if (pos === bufLength) {
122
+                    out += td.decode(buf);
123
+                    pos = 0;
124
+                }
125
+                buf[pos++] = semicolon;
126
+            }
127
+            if (line.length === 0)
128
+                continue;
129
+            state[0] = 0;
130
+            for (let j = 0; j < line.length; j++) {
131
+                const segment = line[j];
132
+                // We can push up to 5 ints, each int can take at most 7 chars, and we
133
+                // may push a comma.
134
+                if (pos > subLength) {
135
+                    out += td.decode(sub);
136
+                    buf.copyWithin(0, subLength, pos);
137
+                    pos -= subLength;
138
+                }
139
+                if (j > 0)
140
+                    buf[pos++] = comma;
141
+                pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
142
+                if (segment.length === 1)
143
+                    continue;
144
+                pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
145
+                pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
146
+                pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
147
+                if (segment.length === 4)
148
+                    continue;
149
+                pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
150
+            }
151
+        }
152
+        return out + td.decode(buf.subarray(0, pos));
153
+    }
154
+    function encodeInteger(buf, pos, state, segment, j) {
155
+        const next = segment[j];
156
+        let num = next - state[j];
157
+        state[j] = next;
158
+        num = num < 0 ? (-num << 1) | 1 : num << 1;
159
+        do {
160
+            let clamped = num & 0b011111;
161
+            num >>>= 5;
162
+            if (num > 0)
163
+                clamped |= 0b100000;
164
+            buf[pos++] = intToChar[clamped];
165
+        } while (num > 0);
166
+        return pos;
167
+    }
168
+
169
+    exports.decode = decode;
170
+    exports.encode = encode;
171
+
172
+    Object.defineProperty(exports, '__esModule', { value: true });
173
+
174
+}));
175
+//# sourceMappingURL=sourcemap-codec.umd.js.map

File diff suppressed because it is too large
+ 1 - 0
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map


+ 6 - 0
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts

@@ -0,0 +1,6 @@
1
+export declare type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number];
2
+export declare type SourceMapLine = SourceMapSegment[];
3
+export declare type SourceMapMappings = SourceMapLine[];
4
+export declare function decode(mappings: string): SourceMapMappings;
5
+export declare function encode(decoded: SourceMapMappings): string;
6
+export declare function encode(decoded: Readonly<SourceMapMappings>): string;

+ 75 - 0
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/package.json

@@ -0,0 +1,75 @@
1
+{
2
+  "name": "@jridgewell/sourcemap-codec",
3
+  "version": "1.4.14",
4
+  "description": "Encode/decode sourcemap mappings",
5
+  "keywords": [
6
+    "sourcemap",
7
+    "vlq"
8
+  ],
9
+  "main": "dist/sourcemap-codec.umd.js",
10
+  "module": "dist/sourcemap-codec.mjs",
11
+  "typings": "dist/types/sourcemap-codec.d.ts",
12
+  "files": [
13
+    "dist",
14
+    "src"
15
+  ],
16
+  "exports": {
17
+    ".": [
18
+      {
19
+        "types": "./dist/types/sourcemap-codec.d.ts",
20
+        "browser": "./dist/sourcemap-codec.umd.js",
21
+        "import": "./dist/sourcemap-codec.mjs",
22
+        "require": "./dist/sourcemap-codec.umd.js"
23
+      },
24
+      "./dist/sourcemap-codec.umd.js"
25
+    ],
26
+    "./package.json": "./package.json"
27
+  },
28
+  "scripts": {
29
+    "benchmark": "run-s build:rollup benchmark:*",
30
+    "benchmark:install": "cd benchmark && npm install",
31
+    "benchmark:only": "node --expose-gc benchmark/index.js",
32
+    "build": "run-s -n build:*",
33
+    "build:rollup": "rollup -c rollup.config.js",
34
+    "build:ts": "tsc --project tsconfig.build.json",
35
+    "lint": "run-s -n lint:*",
36
+    "lint:prettier": "npm run test:lint:prettier -- --write",
37
+    "lint:ts": "npm run test:lint:ts -- --fix",
38
+    "prebuild": "rm -rf dist",
39
+    "prepublishOnly": "npm run preversion",
40
+    "preversion": "run-s test build",
41
+    "pretest": "run-s build:rollup",
42
+    "test": "run-s -n test:lint test:only",
43
+    "test:debug": "mocha --inspect-brk",
44
+    "test:lint": "run-s -n test:lint:*",
45
+    "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
46
+    "test:lint:ts": "eslint '{src,test}/**/*.ts'",
47
+    "test:only": "mocha",
48
+    "test:coverage": "c8 mocha",
49
+    "test:watch": "mocha --watch"
50
+  },
51
+  "repository": {
52
+    "type": "git",
53
+    "url": "git+https://github.com/jridgewell/sourcemap-codec.git"
54
+  },
55
+  "author": "Rich Harris",
56
+  "license": "MIT",
57
+  "devDependencies": {
58
+    "@rollup/plugin-typescript": "8.3.0",
59
+    "@types/node": "17.0.15",
60
+    "@typescript-eslint/eslint-plugin": "5.10.0",
61
+    "@typescript-eslint/parser": "5.10.0",
62
+    "benchmark": "2.1.4",
63
+    "c8": "7.11.2",
64
+    "eslint": "8.7.0",
65
+    "eslint-config-prettier": "8.3.0",
66
+    "mocha": "9.2.0",
67
+    "npm-run-all": "4.1.5",
68
+    "prettier": "2.5.1",
69
+    "rollup": "2.64.0",
70
+    "source-map": "0.6.1",
71
+    "source-map-js": "1.0.2",
72
+    "sourcemap-codec": "1.4.8",
73
+    "typescript": "4.5.4"
74
+  }
75
+}

+ 198 - 0
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts

@@ -0,0 +1,198 @@
1
+export type SourceMapSegment =
2
+  | [number]
3
+  | [number, number, number, number]
4
+  | [number, number, number, number, number];
5
+export type SourceMapLine = SourceMapSegment[];
6
+export type SourceMapMappings = SourceMapLine[];
7
+
8
+const comma = ','.charCodeAt(0);
9
+const semicolon = ';'.charCodeAt(0);
10
+const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
11
+const intToChar = new Uint8Array(64); // 64 possible chars.
12
+const charToInt = new Uint8Array(128); // z is 122 in ASCII
13
+
14
+for (let i = 0; i < chars.length; i++) {
15
+  const c = chars.charCodeAt(i);
16
+  intToChar[i] = c;
17
+  charToInt[c] = i;
18
+}
19
+
20
+// Provide a fallback for older environments.
21
+const td =
22
+  typeof TextDecoder !== 'undefined'
23
+    ? /* #__PURE__ */ new TextDecoder()
24
+    : typeof Buffer !== 'undefined'
25
+    ? {
26
+        decode(buf: Uint8Array) {
27
+          const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
28
+          return out.toString();
29
+        },
30
+      }
31
+    : {
32
+        decode(buf: Uint8Array) {
33
+          let out = '';
34
+          for (let i = 0; i < buf.length; i++) {
35
+            out += String.fromCharCode(buf[i]);
36
+          }
37
+          return out;
38
+        },
39
+      };
40
+
41
+export function decode(mappings: string): SourceMapMappings {
42
+  const state: [number, number, number, number, number] = new Int32Array(5) as any;
43
+  const decoded: SourceMapMappings = [];
44
+
45
+  let index = 0;
46
+  do {
47
+    const semi = indexOf(mappings, index);
48
+    const line: SourceMapLine = [];
49
+    let sorted = true;
50
+    let lastCol = 0;
51
+    state[0] = 0;
52
+
53
+    for (let i = index; i < semi; i++) {
54
+      let seg: SourceMapSegment;
55
+
56
+      i = decodeInteger(mappings, i, state, 0); // genColumn
57
+      const col = state[0];
58
+      if (col < lastCol) sorted = false;
59
+      lastCol = col;
60
+
61
+      if (hasMoreVlq(mappings, i, semi)) {
62
+        i = decodeInteger(mappings, i, state, 1); // sourcesIndex
63
+        i = decodeInteger(mappings, i, state, 2); // sourceLine
64
+        i = decodeInteger(mappings, i, state, 3); // sourceColumn
65
+
66
+        if (hasMoreVlq(mappings, i, semi)) {
67
+          i = decodeInteger(mappings, i, state, 4); // namesIndex
68
+          seg = [col, state[1], state[2], state[3], state[4]];
69
+        } else {
70
+          seg = [col, state[1], state[2], state[3]];
71
+        }
72
+      } else {
73
+        seg = [col];
74
+      }
75
+
76
+      line.push(seg);
77
+    }
78
+
79
+    if (!sorted) sort(line);
80
+    decoded.push(line);
81
+    index = semi + 1;
82
+  } while (index <= mappings.length);
83
+
84
+  return decoded;
85
+}
86
+
87
+function indexOf(mappings: string, index: number): number {
88
+  const idx = mappings.indexOf(';', index);
89
+  return idx === -1 ? mappings.length : idx;
90
+}
91
+
92
+function decodeInteger(mappings: string, pos: number, state: SourceMapSegment, j: number): number {
93
+  let value = 0;
94
+  let shift = 0;
95
+  let integer = 0;
96
+
97
+  do {
98
+    const c = mappings.charCodeAt(pos++);
99
+    integer = charToInt[c];
100
+    value |= (integer & 31) << shift;
101
+    shift += 5;
102
+  } while (integer & 32);
103
+
104
+  const shouldNegate = value & 1;
105
+  value >>>= 1;
106
+
107
+  if (shouldNegate) {
108
+    value = -0x80000000 | -value;
109
+  }
110
+
111
+  state[j] += value;
112
+  return pos;
113
+}
114
+
115
+function hasMoreVlq(mappings: string, i: number, length: number): boolean {
116
+  if (i >= length) return false;
117
+  return mappings.charCodeAt(i) !== comma;
118
+}
119
+
120
+function sort(line: SourceMapSegment[]) {
121
+  line.sort(sortComparator);
122
+}
123
+
124
+function sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {
125
+  return a[0] - b[0];
126
+}
127
+
128
+export function encode(decoded: SourceMapMappings): string;
129
+export function encode(decoded: Readonly<SourceMapMappings>): string;
130
+export function encode(decoded: Readonly<SourceMapMappings>): string {
131
+  const state: [number, number, number, number, number] = new Int32Array(5) as any;
132
+  const bufLength = 1024 * 16;
133
+  const subLength = bufLength - 36;
134
+  const buf = new Uint8Array(bufLength);
135
+  const sub = buf.subarray(0, subLength);
136
+  let pos = 0;
137
+  let out = '';
138
+
139
+  for (let i = 0; i < decoded.length; i++) {
140
+    const line = decoded[i];
141
+    if (i > 0) {
142
+      if (pos === bufLength) {
143
+        out += td.decode(buf);
144
+        pos = 0;
145
+      }
146
+      buf[pos++] = semicolon;
147
+    }
148
+    if (line.length === 0) continue;
149
+
150
+    state[0] = 0;
151
+
152
+    for (let j = 0; j < line.length; j++) {
153
+      const segment = line[j];
154
+      // We can push up to 5 ints, each int can take at most 7 chars, and we
155
+      // may push a comma.
156
+      if (pos > subLength) {
157
+        out += td.decode(sub);
158
+        buf.copyWithin(0, subLength, pos);
159
+        pos -= subLength;
160
+      }
161
+      if (j > 0) buf[pos++] = comma;
162
+
163
+      pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
164
+
165
+      if (segment.length === 1) continue;
166
+      pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
167
+      pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
168
+      pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
169
+
170
+      if (segment.length === 4) continue;
171
+      pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
172
+    }
173
+  }
174
+
175
+  return out + td.decode(buf.subarray(0, pos));
176
+}
177
+
178
+function encodeInteger(
179
+  buf: Uint8Array,
180
+  pos: number,
181
+  state: SourceMapSegment,
182
+  segment: SourceMapSegment,
183
+  j: number,
184
+): number {
185
+  const next = segment[j];
186
+  let num = next - state[j];
187
+  state[j] = next;
188
+
189
+  num = num < 0 ? (-num << 1) | 1 : num << 1;
190
+  do {
191
+    let clamped = num & 0b011111;
192
+    num >>>= 5;
193
+    if (num > 0) clamped |= 0b100000;
194
+    buf[pos++] = intToChar[clamped];
195
+  } while (num > 0);
196
+
197
+  return pos;
198
+}

+ 75 - 0
node_modules/@jridgewell/trace-mapping/package.json

@@ -0,0 +1,75 @@
1
+{
2
+  "name": "@jridgewell/trace-mapping",
3
+  "version": "0.3.18",
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": "dist/types/trace-mapping.d.ts",
12
+  "files": [
13
+    "dist"
14
+  ],
15
+  "exports": {
16
+    ".": [
17
+      {
18
+        "types": "./dist/types/trace-mapping.d.ts",
19
+        "browser": "./dist/trace-mapping.umd.js",
20
+        "require": "./dist/trace-mapping.umd.js",
21
+        "import": "./dist/trace-mapping.mjs"
22
+      },
23
+      "./dist/trace-mapping.umd.js"
24
+    ],
25
+    "./package.json": "./package.json"
26
+  },
27
+  "author": "Justin Ridgewell <justin@ridgewell.name>",
28
+  "repository": {
29
+    "type": "git",
30
+    "url": "git+https://github.com/jridgewell/trace-mapping.git"
31
+  },
32
+  "license": "MIT",
33
+  "scripts": {
34
+    "benchmark": "run-s build:rollup benchmark:*",
35
+    "benchmark:install": "cd benchmark && npm install",
36
+    "benchmark:only": "node --expose-gc benchmark/index.mjs",
37
+    "build": "run-s -n build:*",
38
+    "build:rollup": "rollup -c rollup.config.js",
39
+    "build:ts": "tsc --project tsconfig.build.json",
40
+    "lint": "run-s -n lint:*",
41
+    "lint:prettier": "npm run test:lint:prettier -- --write",
42
+    "lint:ts": "npm run test:lint:ts -- --fix",
43
+    "prebuild": "rm -rf dist",
44
+    "prepublishOnly": "npm run preversion",
45
+    "preversion": "run-s test build",
46
+    "test": "run-s -n test:lint test:only",
47
+    "test:debug": "ava debug",
48
+    "test:lint": "run-s -n test:lint:*",
49
+    "test:lint:prettier": "prettier --check '{src,test}/**/*.ts' '**/*.md'",
50
+    "test:lint:ts": "eslint '{src,test}/**/*.ts'",
51
+    "test:only": "c8 ava",
52
+    "test:watch": "ava --watch"
53
+  },
54
+  "devDependencies": {
55
+    "@rollup/plugin-typescript": "8.5.0",
56
+    "@typescript-eslint/eslint-plugin": "5.39.0",
57
+    "@typescript-eslint/parser": "5.39.0",
58
+    "ava": "4.3.3",
59
+    "benchmark": "2.1.4",
60
+    "c8": "7.12.0",
61
+    "esbuild": "0.15.10",
62
+    "eslint": "8.25.0",
63
+    "eslint-config-prettier": "8.5.0",
64
+    "eslint-plugin-no-only-tests": "3.0.0",
65
+    "npm-run-all": "4.1.5",
66
+    "prettier": "2.7.1",
67
+    "rollup": "2.79.1",
68
+    "tsx": "3.10.1",
69
+    "typescript": "4.8.4"
70
+  },
71
+  "dependencies": {
72
+    "@jridgewell/resolve-uri": "3.1.0",
73
+    "@jridgewell/sourcemap-codec": "1.4.14"
74
+  }
75
+}

+ 21 - 0
node_modules/@nodelib/fs.scandir/LICENSE

@@ -0,0 +1,21 @@
1
+The MIT License (MIT)
2
+
3
+Copyright (c) Denis Malinochkin
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy
6
+of this software and associated documentation files (the "Software"), to deal
7
+in the Software without restriction, including without limitation the rights
8
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+copies of the Software, and to permit persons to whom the Software is
10
+furnished to do so, subject to the following conditions:
11
+
12
+The above copyright notice and this permission notice shall be included in all
13
+copies or substantial portions of the Software.
14
+
15
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+SOFTWARE.

+ 171 - 0
node_modules/@nodelib/fs.scandir/README.md

@@ -0,0 +1,171 @@
1
+# @nodelib/fs.scandir
2
+
3
+> List files and directories inside the specified directory.
4
+
5
+## :bulb: Highlights
6
+
7
+The package is aimed at obtaining information about entries in the directory.
8
+
9
+* :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional).
10
+* :gear: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type. See [`old` and `modern` mode](#old-and-modern-mode).
11
+* :link: Can safely work with broken symbolic links.
12
+
13
+## Install
14
+
15
+```console
16
+npm install @nodelib/fs.scandir
17
+```
18
+
19
+## Usage
20
+
21
+```ts
22
+import * as fsScandir from '@nodelib/fs.scandir';
23
+
24
+fsScandir.scandir('path', (error, stats) => { /* … */ });
25
+```
26
+
27
+## API
28
+
29
+### .scandir(path, [optionsOrSettings], callback)
30
+
31
+Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path with standard callback-style.
32
+
33
+```ts
34
+fsScandir.scandir('path', (error, entries) => { /* … */ });
35
+fsScandir.scandir('path', {}, (error, entries) => { /* … */ });
36
+fsScandir.scandir('path', new fsScandir.Settings(), (error, entries) => { /* … */ });
37
+```
38
+
39
+### .scandirSync(path, [optionsOrSettings])
40
+
41
+Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path.
42
+
43
+```ts
44
+const entries = fsScandir.scandirSync('path');
45
+const entries = fsScandir.scandirSync('path', {});
46
+const entries = fsScandir.scandirSync(('path', new fsScandir.Settings());
47
+```
48
+
49
+#### path
50
+
51
+* Required: `true`
52
+* Type: `string | Buffer | URL`
53
+
54
+A path to a file. If a URL is provided, it must use the `file:` protocol.
55
+
56
+#### optionsOrSettings
57
+
58
+* Required: `false`
59
+* Type: `Options | Settings`
60
+* Default: An instance of `Settings` class
61
+
62
+An [`Options`](#options) object or an instance of [`Settings`](#settingsoptions) class.
63
+
64
+> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class.
65
+
66
+### Settings([options])
67
+
68
+A class of full settings of the package.
69
+
70
+```ts
71
+const settings = new fsScandir.Settings({ followSymbolicLinks: false });
72
+
73
+const entries = fsScandir.scandirSync('path', settings);
74
+```
75
+
76
+## Entry
77
+
78
+* `name` — The name of the entry (`unknown.txt`).
79
+* `path` — The path of the entry relative to call directory (`root/unknown.txt`).
80
+* `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class. On Node.js below 10.10 will be emulated by [`DirentFromStats`](./src/utils/fs.ts) class.
81
+* `stats` (optional) — An instance of `fs.Stats` class.
82
+
83
+For example, the `scandir` call for `tools` directory with one directory inside:
84
+
85
+```ts
86
+{
87
+	dirent: Dirent { name: 'typedoc', /* … */ },
88
+	name: 'typedoc',
89
+	path: 'tools/typedoc'
90
+}
91
+```
92
+
93
+## Options
94
+
95
+### stats
96
+
97
+* Type: `boolean`
98
+* Default: `false`
99
+
100
+Adds an instance of `fs.Stats` class to the [`Entry`](#entry).
101
+
102
+> :book: Always use `fs.readdir` without the `withFileTypes` option. ??TODO??
103
+
104
+### followSymbolicLinks
105
+
106
+* Type: `boolean`
107
+* Default: `false`
108
+
109
+Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`.
110
+
111
+### `throwErrorOnBrokenSymbolicLink`
112
+
113
+* Type: `boolean`
114
+* Default: `true`
115
+
116
+Throw an error when symbolic link is broken if `true` or safely use `lstat` call if `false`.
117
+
118
+### `pathSegmentSeparator`
119
+
120
+* Type: `string`
121
+* Default: `path.sep`
122
+
123
+By default, this package uses the correct path separator for your OS (`\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead.
124
+
125
+### `fs`
126
+
127
+* Type: [`FileSystemAdapter`](./src/adapters/fs.ts)
128
+* Default: A default FS methods
129
+
130
+By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own.
131
+
132
+```ts
133
+interface FileSystemAdapter {
134
+	lstat?: typeof fs.lstat;
135
+	stat?: typeof fs.stat;
136
+	lstatSync?: typeof fs.lstatSync;
137
+	statSync?: typeof fs.statSync;
138
+	readdir?: typeof fs.readdir;
139
+	readdirSync?: typeof fs.readdirSync;
140
+}
141
+
142
+const settings = new fsScandir.Settings({
143
+	fs: { lstat: fakeLstat }
144
+});
145
+```
146
+
147
+## `old` and `modern` mode
148
+
149
+This package has two modes that are used depending on the environment and parameters of use.
150
+
151
+### old
152
+
153
+* Node.js below `10.10` or when the `stats` option is enabled
154
+
155
+When working in the old mode, the directory is read first (`fs.readdir`), then the type of entries is determined (`fs.lstat` and/or `fs.stat` for symbolic links).
156
+
157
+### modern
158
+
159
+* Node.js 10.10+ and the `stats` option is disabled
160
+
161
+In the modern mode, reading the directory (`fs.readdir` with the `withFileTypes` option) is combined with obtaining information about its entries. An additional call for symbolic links (`fs.stat`) is still present.
162
+
163
+This mode makes fewer calls to the file system. It's faster.
164
+
165
+## Changelog
166
+
167
+See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version.
168
+
169
+## License
170
+
171
+This software is released under the terms of the MIT license.

+ 20 - 0
node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts

@@ -0,0 +1,20 @@
1
+import type * as fsStat from '@nodelib/fs.stat';
2
+import type { Dirent, ErrnoException } from '../types';
3
+export interface ReaddirAsynchronousMethod {
4
+    (filepath: string, options: {
5
+        withFileTypes: true;
6
+    }, callback: (error: ErrnoException | null, files: Dirent[]) => void): void;
7
+    (filepath: string, callback: (error: ErrnoException | null, files: string[]) => void): void;
8
+}
9
+export interface ReaddirSynchronousMethod {
10
+    (filepath: string, options: {
11
+        withFileTypes: true;
12
+    }): Dirent[];
13
+    (filepath: string): string[];
14
+}
15
+export declare type FileSystemAdapter = fsStat.FileSystemAdapter & {
16
+    readdir: ReaddirAsynchronousMethod;
17
+    readdirSync: ReaddirSynchronousMethod;
18
+};
19
+export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter;
20
+export declare function createFileSystemAdapter(fsMethods?: Partial<FileSystemAdapter>): FileSystemAdapter;

+ 19 - 0
node_modules/@nodelib/fs.scandir/out/adapters/fs.js

@@ -0,0 +1,19 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
4
+const fs = require("fs");
5
+exports.FILE_SYSTEM_ADAPTER = {
6
+    lstat: fs.lstat,
7
+    stat: fs.stat,
8
+    lstatSync: fs.lstatSync,
9
+    statSync: fs.statSync,
10
+    readdir: fs.readdir,
11
+    readdirSync: fs.readdirSync
12
+};
13
+function createFileSystemAdapter(fsMethods) {
14
+    if (fsMethods === undefined) {
15
+        return exports.FILE_SYSTEM_ADAPTER;
16
+    }
17
+    return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
18
+}
19
+exports.createFileSystemAdapter = createFileSystemAdapter;

+ 4 - 0
node_modules/@nodelib/fs.scandir/out/constants.d.ts

@@ -0,0 +1,4 @@
1
+/**
2
+ * IS `true` for Node.js 10.10 and greater.
3
+ */
4
+export declare const IS_SUPPORT_READDIR_WITH_FILE_TYPES: boolean;

+ 0 - 0
node_modules/@nodelib/fs.scandir/out/constants.js


Some files were not shown because too many files changed in this diff

Inloggen - Gogs: Simplico Git Service

Inloggen