@likec4/core 1.48.0 → 1.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/dist/THIRD-PARTY-LICENSES.md +1012 -0
  2. package/dist/_chunks/Builder.view-element.mjs +2 -3284
  3. package/dist/_chunks/LikeC4Model.d.mts +21 -25
  4. package/dist/_chunks/RichText.mjs +1 -148
  5. package/dist/_chunks/_types.d.mts +1 -5
  6. package/dist/_chunks/_types2.d.mts +2 -4
  7. package/dist/_chunks/assignTagColors.mjs +1 -24
  8. package/dist/_chunks/calcDriftsFromSnapshot.mjs +1 -379
  9. package/dist/_chunks/guards.d.mts +2026 -0
  10. package/dist/_chunks/guards.mjs +4 -0
  11. package/dist/_chunks/index.d.mts +255 -136
  12. package/dist/_chunks/libs/@mantine/colors-generator.mjs +2 -3403
  13. package/dist/_chunks/libs/@radix-ui/colors.mjs +1 -0
  14. package/dist/_chunks/libs/@ungap/structured-clone.mjs +1 -213
  15. package/dist/_chunks/libs/bail.mjs +1 -14
  16. package/dist/_chunks/libs/ccount.mjs +1 -25
  17. package/dist/_chunks/libs/character-entities-html4.mjs +1 -263
  18. package/dist/_chunks/libs/character-entities-legacy.mjs +1 -117
  19. package/dist/_chunks/libs/character-entities.mjs +2 -2136
  20. package/dist/_chunks/libs/comma-separated-tokens.mjs +1 -18
  21. package/dist/_chunks/libs/decode-named-character-reference.mjs +1 -21
  22. package/dist/_chunks/libs/defu.mjs +1 -42
  23. package/dist/_chunks/libs/devlop.mjs +1 -5
  24. package/dist/_chunks/libs/escape-string-regexp.mjs +1 -8
  25. package/dist/_chunks/libs/extend.mjs +1 -77
  26. package/dist/_chunks/libs/graphology-dag.mjs +1 -703
  27. package/dist/_chunks/libs/graphology.mjs +1 -4565
  28. package/dist/_chunks/libs/hast-util-sanitize.mjs +1 -863
  29. package/dist/_chunks/libs/hast-util-to-html.mjs +9 -2696
  30. package/dist/_chunks/libs/is-plain-obj.mjs +1 -9
  31. package/dist/_chunks/libs/longest-streak.mjs +1 -30
  32. package/dist/_chunks/libs/markdown-table.mjs +2 -290
  33. package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +1 -653
  34. package/dist/_chunks/libs/mdast-util-from-markdown.mjs +3 -8522
  35. package/dist/_chunks/libs/mdast-util-gfm.mjs +15 -2393
  36. package/dist/_chunks/libs/mdast-util-to-hast.mjs +11 -1803
  37. package/dist/_chunks/libs/micromark-extension-gfm.mjs +1 -2243
  38. package/dist/_chunks/libs/mnemonist.d.mts +1 -91
  39. package/dist/_chunks/libs/mnemonist.mjs +1 -1978
  40. package/dist/_chunks/libs/natural-compare-lite.mjs +9 -42
  41. package/dist/_chunks/libs/ohash.mjs +1 -0
  42. package/dist/_chunks/libs/rehype-sanitize.mjs +1 -29
  43. package/dist/_chunks/libs/rehype-stringify.mjs +1 -34
  44. package/dist/_chunks/libs/remark-gfm.mjs +1 -36
  45. package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +3 -100
  46. package/dist/_chunks/libs/remark-parse.mjs +1 -39
  47. package/dist/_chunks/libs/remark-rehype.mjs +1 -171
  48. package/dist/_chunks/libs/remeda.mjs +1 -702
  49. package/dist/_chunks/libs/trough.mjs +1 -158
  50. package/dist/_chunks/libs/unified.mjs +1 -2212
  51. package/dist/_chunks/rolldown-runtime.mjs +1 -42
  52. package/dist/_chunks/{index3.d.mts → theme.d.mts} +15 -13
  53. package/dist/_chunks/{index7.d.mts → to-text.d.mts} +165 -29
  54. package/dist/_chunks/to-text.mjs +1 -0
  55. package/dist/_chunks/vector.d.mts +198 -0
  56. package/dist/_chunks/vector.mjs +1 -0
  57. package/dist/builder/index.d.mts +2 -8
  58. package/dist/builder/index.mjs +1 -662
  59. package/dist/compute-view/index.d.mts +86 -15
  60. package/dist/compute-view/index.mjs +2 -262
  61. package/dist/geometry/index.d.mts +2 -2
  62. package/dist/geometry/index.mjs +1 -3
  63. package/dist/index.d.mts +9 -13
  64. package/dist/index.mjs +1 -27
  65. package/dist/model/index.d.mts +4 -14
  66. package/dist/model/index.mjs +1 -11
  67. package/dist/styles/index.d.mts +2 -8
  68. package/dist/styles/index.mjs +1 -30
  69. package/dist/types/index.d.mts +3 -9
  70. package/dist/types/index.mjs +1 -15
  71. package/dist/utils/graphology/index.d.mts +1 -1
  72. package/dist/utils/graphology/index.mjs +1 -3
  73. package/dist/utils/index.d.mts +4 -11
  74. package/dist/utils/index.mjs +1 -17
  75. package/package.json +13 -12
  76. package/dist/_chunks/LikeC4Styles.mjs +0 -691
  77. package/dist/_chunks/RichText.d.mts +0 -84
  78. package/dist/_chunks/_aux.d.mts +0 -289
  79. package/dist/_chunks/_aux.mjs +0 -18
  80. package/dist/_chunks/connection.mjs +0 -0
  81. package/dist/_chunks/const.d.mts +0 -43
  82. package/dist/_chunks/const.mjs +0 -33
  83. package/dist/_chunks/expression-model.d.mts +0 -192
  84. package/dist/_chunks/expression-model.mjs +0 -103
  85. package/dist/_chunks/expression.d.mts +0 -347
  86. package/dist/_chunks/expression.mjs +0 -107
  87. package/dist/_chunks/find.d.mts +0 -82
  88. package/dist/_chunks/find.mjs +0 -646
  89. package/dist/_chunks/find2.d.mts +0 -78
  90. package/dist/_chunks/find2.mjs +0 -287
  91. package/dist/_chunks/fqnRef.d.mts +0 -58
  92. package/dist/_chunks/fqnRef.mjs +0 -41
  93. package/dist/_chunks/geometry.mjs +0 -335
  94. package/dist/_chunks/index2.d.mts +0 -937
  95. package/dist/_chunks/index4.d.mts +0 -62
  96. package/dist/_chunks/index5.d.mts +0 -42
  97. package/dist/_chunks/index6.d.mts +0 -43
  98. package/dist/_chunks/index8.d.mts +0 -144
  99. package/dist/_chunks/invariant.mjs +0 -18
  100. package/dist/_chunks/iterable.mjs +0 -146
  101. package/dist/_chunks/libs/graphology-types.d.mts +0 -601
  102. package/dist/_chunks/libs/graphology.d.mts +0 -6
  103. package/dist/_chunks/mnemonist.d.mts +0 -1
  104. package/dist/_chunks/mnemonist.mjs +0 -0
  105. package/dist/_chunks/model.mjs +0 -1898
  106. package/dist/_chunks/model2.mjs +0 -0
  107. package/dist/_chunks/relationships-view.mjs +0 -132
  108. package/dist/_chunks/scalar.d.mts +0 -109
  109. package/dist/_chunks/scalar.mjs +0 -84
  110. package/dist/_chunks/utils.mjs +0 -483
  111. package/dist/compute-view/relationships-view/index.d.mts +0 -16
  112. package/dist/compute-view/relationships-view/index.mjs +0 -7
  113. package/dist/model/connection/deployment/index.d.mts +0 -12
  114. package/dist/model/connection/deployment/index.mjs +0 -9
  115. package/dist/model/connection/index.d.mts +0 -14
  116. package/dist/model/connection/index.mjs +0 -10
  117. package/dist/model/connection/model/index.d.mts +0 -12
  118. package/dist/model/connection/model/index.mjs +0 -8
  119. package/dist/types/RichText.d.mts +0 -3
  120. package/dist/types/RichText.mjs +0 -7
  121. package/dist/types/_aux.d.mts +0 -3
  122. package/dist/types/_aux.mjs +0 -3
  123. package/dist/types/expression-model.d.mts +0 -6
  124. package/dist/types/expression-model.mjs +0 -7
  125. package/dist/types/expression.d.mts +0 -5
  126. package/dist/types/expression.mjs +0 -7
  127. package/dist/types/fqnRef.d.mts +0 -4
  128. package/dist/types/fqnRef.mjs +0 -7
  129. package/dist/types/scalar.d.mts +0 -2
  130. package/dist/types/scalar.mjs +0 -7
  131. package/dist/utils/iterable/index.d.mts +0 -9
  132. package/dist/utils/iterable/index.mjs +0 -3
  133. package/dist/utils/mnemonist.d.mts +0 -2
  134. package/dist/utils/mnemonist.mjs +0 -12
@@ -1,1978 +1 @@
1
- import { r as __toESM, t as __commonJSMin } from "../rolldown-runtime.mjs";
2
- import { a as require_iterator, i as require_typed_arrays, o as require_foreach, r as require_iterables } from "./graphology-dag.mjs";
3
-
4
- //#region ../../node_modules/.pnpm/mnemonist@0.40.3_patch_hash=70301b9c235e13bc146bb9528b7979c278952196d5dac8048ab3850adac8f4cf/node_modules/mnemonist/bi-map.js
5
- var require_bi_map = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6
- /**
7
- * Mnemonist BiMap
8
- * ================
9
- *
10
- * JavaScript implementation of a BiMap.
11
- */
12
- var forEach = require_foreach();
13
- /**
14
- * Inverse Map.
15
- *
16
- * @constructor
17
- */
18
- function InverseMap(original) {
19
- this.size = 0;
20
- this.items = /* @__PURE__ */ new Map();
21
- this.inverse = original;
22
- }
23
- /**
24
- * BiMap.
25
- *
26
- * @constructor
27
- */
28
- function BiMap() {
29
- this.size = 0;
30
- this.items = /* @__PURE__ */ new Map();
31
- this.inverse = new InverseMap(this);
32
- }
33
- /**
34
- * Method used to clear the map.
35
- *
36
- * @return {undefined}
37
- */
38
- function clear() {
39
- this.size = 0;
40
- this.items.clear();
41
- this.inverse.items.clear();
42
- }
43
- BiMap.prototype.clear = clear;
44
- InverseMap.prototype.clear = clear;
45
- /**
46
- * Method used to set a relation.
47
- *
48
- * @param {any} key - Key.
49
- * @param {any} value - Value.
50
- * @return {BiMap|InverseMap}
51
- */
52
- function set(key, value) {
53
- if (this.items.has(key)) {
54
- var currentValue = this.items.get(key);
55
- if (currentValue === value) return this;
56
- else this.inverse.items.delete(currentValue);
57
- }
58
- if (this.inverse.items.has(value)) {
59
- var currentKey = this.inverse.items.get(value);
60
- if (currentKey === key) return this;
61
- else this.items.delete(currentKey);
62
- }
63
- this.items.set(key, value);
64
- this.inverse.items.set(value, key);
65
- this.size = this.items.size;
66
- this.inverse.size = this.inverse.items.size;
67
- return this;
68
- }
69
- BiMap.prototype.set = set;
70
- InverseMap.prototype.set = set;
71
- /**
72
- * Method used to delete a relation.
73
- *
74
- * @param {any} key - Key.
75
- * @return {boolean}
76
- */
77
- function del(key) {
78
- if (this.items.has(key)) {
79
- var currentValue = this.items.get(key);
80
- this.items.delete(key);
81
- this.inverse.items.delete(currentValue);
82
- this.size = this.items.size;
83
- this.inverse.size = this.inverse.items.size;
84
- return true;
85
- }
86
- return false;
87
- }
88
- BiMap.prototype.delete = del;
89
- InverseMap.prototype.delete = del;
90
- [
91
- "has",
92
- "get",
93
- "forEach",
94
- "keys",
95
- "values",
96
- "entries"
97
- ].forEach(function(name) {
98
- BiMap.prototype[name] = InverseMap.prototype[name] = function() {
99
- return Map.prototype[name].apply(this.items, arguments);
100
- };
101
- });
102
- /**
103
- * Attaching the #.values method to Symbol.iterator if possible.
104
- */
105
- if (typeof Symbol !== "undefined") {
106
- BiMap.prototype[Symbol.iterator] = BiMap.prototype.entries;
107
- InverseMap.prototype[Symbol.iterator] = InverseMap.prototype.entries;
108
- }
109
- /**
110
- * Convenience known methods.
111
- */
112
- BiMap.prototype.inspect = function() {
113
- var dummy = {
114
- left: this.items,
115
- right: this.inverse.items
116
- };
117
- Object.defineProperty(dummy, "constructor", {
118
- value: BiMap,
119
- enumerable: false
120
- });
121
- return dummy;
122
- };
123
- if (typeof Symbol !== "undefined") BiMap.prototype[Symbol.for("nodejs.util.inspect.custom")] = BiMap.prototype.inspect;
124
- InverseMap.prototype.inspect = function() {
125
- var dummy = {
126
- left: this.inverse.items,
127
- right: this.items
128
- };
129
- Object.defineProperty(dummy, "constructor", {
130
- value: InverseMap,
131
- enumerable: false
132
- });
133
- return dummy;
134
- };
135
- if (typeof Symbol !== "undefined") InverseMap.prototype[Symbol.for("nodejs.util.inspect.custom")] = InverseMap.prototype.inspect;
136
- /**
137
- * Static @.from function taking an arbitrary iterable & converting it into
138
- * a bimap.
139
- *
140
- * @param {Iterable} iterable - Target iterable.
141
- * @return {BiMap}
142
- */
143
- BiMap.from = function(iterable) {
144
- var bimap = new BiMap();
145
- forEach(iterable, function(value, key) {
146
- bimap.set(key, value);
147
- });
148
- return bimap;
149
- };
150
- /**
151
- * Exporting.
152
- */
153
- module.exports = BiMap;
154
- }));
155
-
156
- //#endregion
157
- //#region ../../node_modules/.pnpm/mnemonist@0.40.3_patch_hash=70301b9c235e13bc146bb9528b7979c278952196d5dac8048ab3850adac8f4cf/node_modules/mnemonist/default-map.js
158
- var require_default_map = /* @__PURE__ */ __commonJSMin(((exports, module) => {
159
- /**
160
- * Mnemonist DefaultMap
161
- * =====================
162
- *
163
- * JavaScript implementation of a default map that will return a constructed
164
- * value any time one tries to access an inexisting key. It's quite similar
165
- * to python's defaultdict.
166
- */
167
- /**
168
- * DefaultMap.
169
- *
170
- * @constructor
171
- */
172
- function DefaultMap(factory) {
173
- if (typeof factory !== "function") throw new Error("mnemonist/DefaultMap.constructor: expecting a function.");
174
- this.items = /* @__PURE__ */ new Map();
175
- this.factory = factory;
176
- this.size = 0;
177
- }
178
- /**
179
- * Method used to clear the structure.
180
- *
181
- * @return {undefined}
182
- */
183
- DefaultMap.prototype.clear = function() {
184
- this.items.clear();
185
- this.size = 0;
186
- };
187
- /**
188
- * Method used to get the value set for given key. If the key does not exist,
189
- * the value will be created using the provided factory.
190
- *
191
- * @param {any} key - Target key.
192
- * @return {any}
193
- */
194
- DefaultMap.prototype.get = function(key) {
195
- var value = this.items.get(key);
196
- if (typeof value === "undefined") {
197
- value = this.factory(key, this.size);
198
- this.items.set(key, value);
199
- this.size++;
200
- }
201
- return value;
202
- };
203
- /**
204
- * Method used to get the value set for given key. If the key does not exist,
205
- * a value won't be created.
206
- *
207
- * @param {any} key - Target key.
208
- * @return {any}
209
- */
210
- DefaultMap.prototype.peek = function(key) {
211
- return this.items.get(key);
212
- };
213
- /**
214
- * Method used to set a value for given key.
215
- *
216
- * @param {any} key - Target key.
217
- * @param {any} value - Value.
218
- * @return {DefaultMap}
219
- */
220
- DefaultMap.prototype.set = function(key, value) {
221
- this.items.set(key, value);
222
- this.size = this.items.size;
223
- return this;
224
- };
225
- /**
226
- * Method used to test the existence of a key in the map.
227
- *
228
- * @param {any} key - Target key.
229
- * @return {boolean}
230
- */
231
- DefaultMap.prototype.has = function(key) {
232
- return this.items.has(key);
233
- };
234
- /**
235
- * Method used to delete target key.
236
- *
237
- * @param {any} key - Target key.
238
- * @return {boolean}
239
- */
240
- DefaultMap.prototype.delete = function(key) {
241
- var deleted = this.items.delete(key);
242
- this.size = this.items.size;
243
- return deleted;
244
- };
245
- /**
246
- * Method used to iterate over each of the key/value pairs.
247
- *
248
- * @param {function} callback - Function to call for each item.
249
- * @param {object} scope - Optional scope.
250
- * @return {undefined}
251
- */
252
- DefaultMap.prototype.forEach = function(callback, scope) {
253
- scope = arguments.length > 1 ? scope : this;
254
- this.items.forEach(callback, scope);
255
- };
256
- /**
257
- * Iterators.
258
- */
259
- DefaultMap.prototype.entries = function() {
260
- return this.items.entries();
261
- };
262
- DefaultMap.prototype.keys = function() {
263
- return this.items.keys();
264
- };
265
- DefaultMap.prototype.values = function() {
266
- return this.items.values();
267
- };
268
- /**
269
- * Attaching the #.entries method to Symbol.iterator if possible.
270
- */
271
- if (typeof Symbol !== "undefined") DefaultMap.prototype[Symbol.iterator] = DefaultMap.prototype.entries;
272
- /**
273
- * Convenience known methods.
274
- */
275
- DefaultMap.prototype.inspect = function() {
276
- return this.items;
277
- };
278
- if (typeof Symbol !== "undefined") DefaultMap.prototype[Symbol.for("nodejs.util.inspect.custom")] = DefaultMap.prototype.inspect;
279
- /**
280
- * Typical factories.
281
- */
282
- DefaultMap.autoIncrement = function() {
283
- var i = 0;
284
- return function() {
285
- return i++;
286
- };
287
- };
288
- /**
289
- * Exporting.
290
- */
291
- module.exports = DefaultMap;
292
- }));
293
-
294
- //#endregion
295
- //#region ../../node_modules/.pnpm/mnemonist@0.40.3_patch_hash=70301b9c235e13bc146bb9528b7979c278952196d5dac8048ab3850adac8f4cf/node_modules/mnemonist/default-weak-map.js
296
- var require_default_weak_map = /* @__PURE__ */ __commonJSMin(((exports, module) => {
297
- /**
298
- * Mnemonist DefaultWeakMap
299
- * =========================
300
- *
301
- * JavaScript implementation of a default weak map that will return a constructed
302
- * value any time one tries to access an non-existing key. It is similar to
303
- * DefaultMap but uses ES6 WeakMap that only holds weak reference to keys.
304
- */
305
- /**
306
- * DefaultWeakMap.
307
- *
308
- * @constructor
309
- */
310
- function DefaultWeakMap(factory) {
311
- if (typeof factory !== "function") throw new Error("mnemonist/DefaultWeakMap.constructor: expecting a function.");
312
- this.items = /* @__PURE__ */ new WeakMap();
313
- this.factory = factory;
314
- }
315
- /**
316
- * Method used to clear the structure.
317
- *
318
- * @return {undefined}
319
- */
320
- DefaultWeakMap.prototype.clear = function() {
321
- this.items = /* @__PURE__ */ new WeakMap();
322
- };
323
- /**
324
- * Method used to get the value set for given key. If the key does not exist,
325
- * the value will be created using the provided factory.
326
- *
327
- * @param {any} key - Target key.
328
- * @return {any}
329
- */
330
- DefaultWeakMap.prototype.get = function(key) {
331
- var value = this.items.get(key);
332
- if (typeof value === "undefined") {
333
- value = this.factory(key);
334
- this.items.set(key, value);
335
- }
336
- return value;
337
- };
338
- /**
339
- * Method used to get the value set for given key. If the key does not exist,
340
- * a value won't be created.
341
- *
342
- * @param {any} key - Target key.
343
- * @return {any}
344
- */
345
- DefaultWeakMap.prototype.peek = function(key) {
346
- return this.items.get(key);
347
- };
348
- /**
349
- * Method used to set a value for given key.
350
- *
351
- * @param {any} key - Target key.
352
- * @param {any} value - Value.
353
- * @return {DefaultMap}
354
- */
355
- DefaultWeakMap.prototype.set = function(key, value) {
356
- this.items.set(key, value);
357
- return this;
358
- };
359
- /**
360
- * Method used to test the existence of a key in the map.
361
- *
362
- * @param {any} key - Target key.
363
- * @return {boolean}
364
- */
365
- DefaultWeakMap.prototype.has = function(key) {
366
- return this.items.has(key);
367
- };
368
- /**
369
- * Method used to delete target key.
370
- *
371
- * @param {any} key - Target key.
372
- * @return {boolean}
373
- */
374
- DefaultWeakMap.prototype.delete = function(key) {
375
- return this.items.delete(key);
376
- };
377
- /**
378
- * Convenience known methods.
379
- */
380
- DefaultWeakMap.prototype.inspect = function() {
381
- return this.items;
382
- };
383
- if (typeof Symbol !== "undefined") DefaultWeakMap.prototype[Symbol.for("nodejs.util.inspect.custom")] = DefaultWeakMap.prototype.inspect;
384
- /**
385
- * Exporting.
386
- */
387
- module.exports = DefaultWeakMap;
388
- }));
389
-
390
- //#endregion
391
- //#region ../../node_modules/.pnpm/mnemonist@0.40.3_patch_hash=70301b9c235e13bc146bb9528b7979c278952196d5dac8048ab3850adac8f4cf/node_modules/mnemonist/linked-list.js
392
- var require_linked_list = /* @__PURE__ */ __commonJSMin(((exports, module) => {
393
- /**
394
- * Mnemonist Linked List
395
- * ======================
396
- *
397
- * Singly linked list implementation. Uses raw JavaScript objects as nodes
398
- * as benchmarks proved it was the fastest thing to do.
399
- */
400
- var Iterator = require_iterator(), forEach = require_foreach();
401
- /**
402
- * Linked List.
403
- *
404
- * @constructor
405
- */
406
- function LinkedList() {
407
- this.clear();
408
- }
409
- /**
410
- * Method used to clear the list.
411
- *
412
- * @return {undefined}
413
- */
414
- LinkedList.prototype.clear = function() {
415
- this.head = null;
416
- this.tail = null;
417
- this.size = 0;
418
- };
419
- /**
420
- * Method used to get the first item of the list.
421
- *
422
- * @return {any}
423
- */
424
- LinkedList.prototype.first = function() {
425
- return this.head ? this.head.item : void 0;
426
- };
427
- LinkedList.prototype.peek = LinkedList.prototype.first;
428
- /**
429
- * Method used to get the last item of the list.
430
- *
431
- * @return {any}
432
- */
433
- LinkedList.prototype.last = function() {
434
- return this.tail ? this.tail.item : void 0;
435
- };
436
- /**
437
- * Method used to add an item at the end of the list.
438
- *
439
- * @param {any} item - The item to add.
440
- * @return {number}
441
- */
442
- LinkedList.prototype.push = function(item) {
443
- var node = {
444
- item,
445
- next: null
446
- };
447
- if (!this.head) {
448
- this.head = node;
449
- this.tail = node;
450
- } else {
451
- this.tail.next = node;
452
- this.tail = node;
453
- }
454
- this.size++;
455
- return this.size;
456
- };
457
- /**
458
- * Method used to add an item at the beginning of the list.
459
- *
460
- * @param {any} item - The item to add.
461
- * @return {number}
462
- */
463
- LinkedList.prototype.unshift = function(item) {
464
- var node = {
465
- item,
466
- next: null
467
- };
468
- if (!this.head) {
469
- this.head = node;
470
- this.tail = node;
471
- } else {
472
- if (!this.head.next) this.tail = this.head;
473
- node.next = this.head;
474
- this.head = node;
475
- }
476
- this.size++;
477
- return this.size;
478
- };
479
- /**
480
- * Method used to retrieve & remove the first item of the list.
481
- *
482
- * @return {any}
483
- */
484
- LinkedList.prototype.shift = function() {
485
- if (!this.size) return void 0;
486
- var node = this.head;
487
- this.head = node.next;
488
- this.size--;
489
- return node.item;
490
- };
491
- /**
492
- * Method used to iterate over the list.
493
- *
494
- * @param {function} callback - Function to call for each item.
495
- * @param {object} scope - Optional scope.
496
- * @return {undefined}
497
- */
498
- LinkedList.prototype.forEach = function(callback, scope) {
499
- if (!this.size) return;
500
- scope = arguments.length > 1 ? scope : this;
501
- var n = this.head, i = 0;
502
- while (n) {
503
- callback.call(scope, n.item, i, this);
504
- n = n.next;
505
- i++;
506
- }
507
- };
508
- /**
509
- * Method used to convert the list into an array.
510
- *
511
- * @return {array}
512
- */
513
- LinkedList.prototype.toArray = function() {
514
- if (!this.size) return [];
515
- var array = new Array(this.size);
516
- for (var i = 0, l = this.size, n = this.head; i < l; i++) {
517
- array[i] = n.item;
518
- n = n.next;
519
- }
520
- return array;
521
- };
522
- /**
523
- * Method used to create an iterator over a list's values.
524
- *
525
- * @return {Iterator}
526
- */
527
- LinkedList.prototype.values = function() {
528
- var n = this.head;
529
- return new Iterator(function() {
530
- if (!n) return { done: true };
531
- var value = n.item;
532
- n = n.next;
533
- return {
534
- value,
535
- done: false
536
- };
537
- });
538
- };
539
- /**
540
- * Method used to create an iterator over a list's entries.
541
- *
542
- * @return {Iterator}
543
- */
544
- LinkedList.prototype.entries = function() {
545
- var n = this.head, i = 0;
546
- return new Iterator(function() {
547
- if (!n) return { done: true };
548
- var value = n.item;
549
- n = n.next;
550
- i++;
551
- return {
552
- value: [i - 1, value],
553
- done: false
554
- };
555
- });
556
- };
557
- /**
558
- * Attaching the #.values method to Symbol.iterator if possible.
559
- */
560
- if (typeof Symbol !== "undefined") LinkedList.prototype[Symbol.iterator] = LinkedList.prototype.values;
561
- /**
562
- * Convenience known methods.
563
- */
564
- LinkedList.prototype.toString = function() {
565
- return this.toArray().join(",");
566
- };
567
- LinkedList.prototype.toJSON = function() {
568
- return this.toArray();
569
- };
570
- LinkedList.prototype.inspect = function() {
571
- var array = this.toArray();
572
- Object.defineProperty(array, "constructor", {
573
- value: LinkedList,
574
- enumerable: false
575
- });
576
- return array;
577
- };
578
- if (typeof Symbol !== "undefined") LinkedList.prototype[Symbol.for("nodejs.util.inspect.custom")] = LinkedList.prototype.inspect;
579
- /**
580
- * Static @.from function taking an arbitrary iterable & converting it into
581
- * a list.
582
- *
583
- * @param {Iterable} iterable - Target iterable.
584
- * @return {LinkedList}
585
- */
586
- LinkedList.from = function(iterable) {
587
- var list = new LinkedList();
588
- forEach(iterable, function(value) {
589
- list.push(value);
590
- });
591
- return list;
592
- };
593
- /**
594
- * Exporting.
595
- */
596
- module.exports = LinkedList;
597
- }));
598
-
599
- //#endregion
600
- //#region ../../node_modules/.pnpm/mnemonist@0.40.3_patch_hash=70301b9c235e13bc146bb9528b7979c278952196d5dac8048ab3850adac8f4cf/node_modules/mnemonist/multi-map.js
601
- var require_multi_map = /* @__PURE__ */ __commonJSMin(((exports, module) => {
602
- /**
603
- * Mnemonist MultiMap
604
- * ===================
605
- *
606
- * Implementation of a MultiMap with custom container.
607
- */
608
- var Iterator = require_iterator(), forEach = require_foreach();
609
- /**
610
- * MultiMap.
611
- *
612
- * @constructor
613
- */
614
- function MultiMap(Container) {
615
- this.Container = Container || Array;
616
- this.items = /* @__PURE__ */ new Map();
617
- this.clear();
618
- Object.defineProperty(this.items, "constructor", {
619
- value: MultiMap,
620
- enumerable: false
621
- });
622
- }
623
- /**
624
- * Method used to clear the structure.
625
- *
626
- * @return {undefined}
627
- */
628
- MultiMap.prototype.clear = function() {
629
- this.size = 0;
630
- this.dimension = 0;
631
- this.items.clear();
632
- };
633
- /**
634
- * Method used to set a value.
635
- *
636
- * @param {any} key - Key.
637
- * @param {any} value - Value to add.
638
- * @return {MultiMap}
639
- */
640
- MultiMap.prototype.set = function(key, value) {
641
- var container = this.items.get(key), sizeBefore;
642
- if (!container) {
643
- this.dimension++;
644
- container = new this.Container();
645
- this.items.set(key, container);
646
- }
647
- if (this.Container === Set) {
648
- sizeBefore = container.size;
649
- container.add(value);
650
- if (sizeBefore < container.size) this.size++;
651
- } else {
652
- container.push(value);
653
- this.size++;
654
- }
655
- return this;
656
- };
657
- /**
658
- * Method used to delete the given key.
659
- *
660
- * @param {any} key - Key to delete.
661
- * @return {boolean}
662
- */
663
- MultiMap.prototype.delete = function(key) {
664
- var container = this.items.get(key);
665
- if (!container) return false;
666
- this.size -= this.Container === Set ? container.size : container.length;
667
- this.dimension--;
668
- this.items.delete(key);
669
- return true;
670
- };
671
- /**
672
- * Method used to delete the remove an item in the container stored at the
673
- * given key.
674
- *
675
- * @param {any} key - Key to delete.
676
- * @return {boolean}
677
- */
678
- MultiMap.prototype.remove = function(key, value) {
679
- var container = this.items.get(key), wasDeleted, index;
680
- if (!container) return false;
681
- if (this.Container === Set) {
682
- wasDeleted = container.delete(value);
683
- if (wasDeleted) this.size--;
684
- if (container.size === 0) {
685
- this.items.delete(key);
686
- this.dimension--;
687
- }
688
- return wasDeleted;
689
- } else {
690
- index = container.indexOf(value);
691
- if (index === -1) return false;
692
- this.size--;
693
- if (container.length === 1) {
694
- this.items.delete(key);
695
- this.dimension--;
696
- return true;
697
- }
698
- container.splice(index, 1);
699
- return true;
700
- }
701
- };
702
- /**
703
- * Method used to return whether the given keys exists in the map.
704
- *
705
- * @param {any} key - Key to check.
706
- * @return {boolean}
707
- */
708
- MultiMap.prototype.has = function(key) {
709
- return this.items.has(key);
710
- };
711
- /**
712
- * Method used to return the container stored at the given key or `undefined`.
713
- *
714
- * @param {any} key - Key to get.
715
- * @return {boolean}
716
- */
717
- MultiMap.prototype.get = function(key) {
718
- return this.items.get(key);
719
- };
720
- /**
721
- * Method used to return the multiplicity of the given key, meaning the number
722
- * of times it is set, or, more trivially, the size of the attached container.
723
- *
724
- * @param {any} key - Key to check.
725
- * @return {number}
726
- */
727
- MultiMap.prototype.multiplicity = function(key) {
728
- var container = this.items.get(key);
729
- if (typeof container === "undefined") return 0;
730
- return this.Container === Set ? container.size : container.length;
731
- };
732
- MultiMap.prototype.count = MultiMap.prototype.multiplicity;
733
- /**
734
- * Method used to iterate over each of the key/value pairs.
735
- *
736
- * @param {function} callback - Function to call for each item.
737
- * @param {object} scope - Optional scope.
738
- * @return {undefined}
739
- */
740
- MultiMap.prototype.forEach = function(callback, scope) {
741
- scope = arguments.length > 1 ? scope : this;
742
- var key;
743
- function inner(value) {
744
- callback.call(scope, value, key);
745
- }
746
- this.items.forEach(function(container, k) {
747
- key = k;
748
- container.forEach(inner);
749
- });
750
- };
751
- /**
752
- * Method used to iterate over each of the associations.
753
- *
754
- * @param {function} callback - Function to call for each item.
755
- * @param {object} scope - Optional scope.
756
- * @return {undefined}
757
- */
758
- MultiMap.prototype.forEachAssociation = function(callback, scope) {
759
- scope = arguments.length > 1 ? scope : this;
760
- this.items.forEach(callback, scope);
761
- };
762
- /**
763
- * Method returning an iterator over the map's keys.
764
- *
765
- * @return {Iterator}
766
- */
767
- MultiMap.prototype.keys = function() {
768
- return this.items.keys();
769
- };
770
- /**
771
- * Method returning an iterator over the map's keys.
772
- *
773
- * @return {Iterator}
774
- */
775
- MultiMap.prototype.values = function() {
776
- var iterator = this.items.values(), inContainer = false, countainer, step, i, l;
777
- if (this.Container === Set) return new Iterator(function next() {
778
- if (!inContainer) {
779
- step = iterator.next();
780
- if (step.done) return { done: true };
781
- inContainer = true;
782
- countainer = step.value.values();
783
- }
784
- step = countainer.next();
785
- if (step.done) {
786
- inContainer = false;
787
- return next();
788
- }
789
- return {
790
- done: false,
791
- value: step.value
792
- };
793
- });
794
- return new Iterator(function next() {
795
- if (!inContainer) {
796
- step = iterator.next();
797
- if (step.done) return { done: true };
798
- inContainer = true;
799
- countainer = step.value;
800
- i = 0;
801
- l = countainer.length;
802
- }
803
- if (i >= l) {
804
- inContainer = false;
805
- return next();
806
- }
807
- return {
808
- done: false,
809
- value: countainer[i++]
810
- };
811
- });
812
- };
813
- /**
814
- * Method returning an iterator over the map's entries.
815
- *
816
- * @return {Iterator}
817
- */
818
- MultiMap.prototype.entries = function() {
819
- var iterator = this.items.entries(), inContainer = false, countainer, step, key, i, l;
820
- if (this.Container === Set) return new Iterator(function next() {
821
- if (!inContainer) {
822
- step = iterator.next();
823
- if (step.done) return { done: true };
824
- inContainer = true;
825
- key = step.value[0];
826
- countainer = step.value[1].values();
827
- }
828
- step = countainer.next();
829
- if (step.done) {
830
- inContainer = false;
831
- return next();
832
- }
833
- return {
834
- done: false,
835
- value: [key, step.value]
836
- };
837
- });
838
- return new Iterator(function next() {
839
- if (!inContainer) {
840
- step = iterator.next();
841
- if (step.done) return { done: true };
842
- inContainer = true;
843
- key = step.value[0];
844
- countainer = step.value[1];
845
- i = 0;
846
- l = countainer.length;
847
- }
848
- if (i >= l) {
849
- inContainer = false;
850
- return next();
851
- }
852
- return {
853
- done: false,
854
- value: [key, countainer[i++]]
855
- };
856
- });
857
- };
858
- /**
859
- * Method returning an iterator over the map's containers.
860
- *
861
- * @return {Iterator}
862
- */
863
- MultiMap.prototype.containers = function() {
864
- return this.items.values();
865
- };
866
- /**
867
- * Method returning an iterator over the map's associations.
868
- *
869
- * @return {Iterator}
870
- */
871
- MultiMap.prototype.associations = function() {
872
- return this.items.entries();
873
- };
874
- /**
875
- * Attaching the #.entries method to Symbol.iterator if possible.
876
- */
877
- if (typeof Symbol !== "undefined") MultiMap.prototype[Symbol.iterator] = MultiMap.prototype.entries;
878
- /**
879
- * Convenience known methods.
880
- */
881
- MultiMap.prototype.inspect = function() {
882
- return this.items;
883
- };
884
- if (typeof Symbol !== "undefined") MultiMap.prototype[Symbol.for("nodejs.util.inspect.custom")] = MultiMap.prototype.inspect;
885
- MultiMap.prototype.toJSON = function() {
886
- return this.items;
887
- };
888
- /**
889
- * Static @.from function taking an arbitrary iterable & converting it into
890
- * a structure.
891
- *
892
- * @param {Iterable} iterable - Target iterable.
893
- * @param {Class} Container - Container.
894
- * @return {MultiMap}
895
- */
896
- MultiMap.from = function(iterable, Container) {
897
- var map = new MultiMap(Container);
898
- forEach(iterable, function(value, key) {
899
- map.set(key, value);
900
- });
901
- return map;
902
- };
903
- /**
904
- * Exporting.
905
- */
906
- module.exports = MultiMap;
907
- }));
908
-
909
- //#endregion
910
- //#region ../../node_modules/.pnpm/mnemonist@0.40.3_patch_hash=70301b9c235e13bc146bb9528b7979c278952196d5dac8048ab3850adac8f4cf/node_modules/mnemonist/queue.js
911
- var require_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => {
912
- /**
913
- * Mnemonist Queue
914
- * ================
915
- *
916
- * Queue implementation based on the ideas of Queue.js that seems to beat
917
- * a LinkedList one in performance.
918
- */
919
- var Iterator = require_iterator(), forEach = require_foreach();
920
- /**
921
- * Queue
922
- *
923
- * @constructor
924
- */
925
- function Queue() {
926
- this.clear();
927
- }
928
- /**
929
- * Method used to clear the queue.
930
- *
931
- * @return {undefined}
932
- */
933
- Queue.prototype.clear = function() {
934
- this.items = [];
935
- this.offset = 0;
936
- this.size = 0;
937
- };
938
- /**
939
- * Method used to add an item to the queue.
940
- *
941
- * @param {any} item - Item to enqueue.
942
- * @return {number}
943
- */
944
- Queue.prototype.enqueue = function(item) {
945
- this.items.push(item);
946
- return ++this.size;
947
- };
948
- /**
949
- * Method used to retrieve & remove the first item of the queue.
950
- *
951
- * @return {any}
952
- */
953
- Queue.prototype.dequeue = function() {
954
- if (!this.size) return;
955
- var item = this.items[this.offset];
956
- if (++this.offset * 2 >= this.items.length) {
957
- this.items = this.items.slice(this.offset);
958
- this.offset = 0;
959
- }
960
- this.size--;
961
- return item;
962
- };
963
- /**
964
- * Method used to retrieve the first item of the queue.
965
- *
966
- * @return {any}
967
- */
968
- Queue.prototype.peek = function() {
969
- if (!this.size) return;
970
- return this.items[this.offset];
971
- };
972
- /**
973
- * Method used to iterate over the queue.
974
- *
975
- * @param {function} callback - Function to call for each item.
976
- * @param {object} scope - Optional scope.
977
- * @return {undefined}
978
- */
979
- Queue.prototype.forEach = function(callback, scope) {
980
- scope = arguments.length > 1 ? scope : this;
981
- for (var i = this.offset, j = 0, l = this.items.length; i < l; i++, j++) callback.call(scope, this.items[i], j, this);
982
- };
983
- Queue.prototype.toArray = function() {
984
- return this.items.slice(this.offset);
985
- };
986
- /**
987
- * Method used to create an iterator over a queue's values.
988
- *
989
- * @return {Iterator}
990
- */
991
- Queue.prototype.values = function() {
992
- var items = this.items, i = this.offset;
993
- return new Iterator(function() {
994
- if (i >= items.length) return { done: true };
995
- var value = items[i];
996
- i++;
997
- return {
998
- value,
999
- done: false
1000
- };
1001
- });
1002
- };
1003
- /**
1004
- * Method used to create an iterator over a queue's entries.
1005
- *
1006
- * @return {Iterator}
1007
- */
1008
- Queue.prototype.entries = function() {
1009
- var items = this.items, i = this.offset, j = 0;
1010
- return new Iterator(function() {
1011
- if (i >= items.length) return { done: true };
1012
- var value = items[i];
1013
- i++;
1014
- return {
1015
- value: [j++, value],
1016
- done: false
1017
- };
1018
- });
1019
- };
1020
- /**
1021
- * Attaching the #.values method to Symbol.iterator if possible.
1022
- */
1023
- if (typeof Symbol !== "undefined") Queue.prototype[Symbol.iterator] = Queue.prototype.values;
1024
- /**
1025
- * Convenience known methods.
1026
- */
1027
- Queue.prototype.toString = function() {
1028
- return this.toArray().join(",");
1029
- };
1030
- Queue.prototype.toJSON = function() {
1031
- return this.toArray();
1032
- };
1033
- Queue.prototype.inspect = function() {
1034
- var array = this.toArray();
1035
- Object.defineProperty(array, "constructor", {
1036
- value: Queue,
1037
- enumerable: false
1038
- });
1039
- return array;
1040
- };
1041
- if (typeof Symbol !== "undefined") Queue.prototype[Symbol.for("nodejs.util.inspect.custom")] = Queue.prototype.inspect;
1042
- /**
1043
- * Static @.from function taking an arbitrary iterable & converting it into
1044
- * a queue.
1045
- *
1046
- * @param {Iterable} iterable - Target iterable.
1047
- * @return {Queue}
1048
- */
1049
- Queue.from = function(iterable) {
1050
- var queue = new Queue();
1051
- forEach(iterable, function(value) {
1052
- queue.enqueue(value);
1053
- });
1054
- return queue;
1055
- };
1056
- /**
1057
- * Static @.of function taking an arbitrary number of arguments & converting it
1058
- * into a queue.
1059
- *
1060
- * @param {...any} args
1061
- * @return {Queue}
1062
- */
1063
- Queue.of = function() {
1064
- return Queue.from(arguments);
1065
- };
1066
- /**
1067
- * Exporting.
1068
- */
1069
- module.exports = Queue;
1070
- }));
1071
-
1072
- //#endregion
1073
- //#region ../../node_modules/.pnpm/mnemonist@0.40.3_patch_hash=70301b9c235e13bc146bb9528b7979c278952196d5dac8048ab3850adac8f4cf/node_modules/mnemonist/lru-cache.js
1074
- var require_lru_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1075
- /**
1076
- * Mnemonist LRUCache
1077
- * ===================
1078
- *
1079
- * JavaScript implementation of the LRU Cache data structure. To save up
1080
- * memory and allocations this implementation represents its underlying
1081
- * doubly-linked list as static arrays and pointers. Thus, memory is allocated
1082
- * only once at instantiation and JS objects are never created to serve as
1083
- * pointers. This also means this implementation does not trigger too many
1084
- * garbage collections.
1085
- *
1086
- * Note that to save up memory, a LRU Cache can be implemented using a singly
1087
- * linked list by storing predecessors' pointers as hashmap values.
1088
- * However, this means more hashmap lookups and would probably slow the whole
1089
- * thing down. What's more, pointers are not the things taking most space in
1090
- * memory.
1091
- */
1092
- var Iterator = require_iterator(), forEach = require_foreach(), typed = require_typed_arrays(), iterables = require_iterables();
1093
- /**
1094
- * LRUCache.
1095
- *
1096
- * @constructor
1097
- * @param {function} Keys - Array class for storing keys.
1098
- * @param {function} Values - Array class for storing values.
1099
- * @param {number} capacity - Desired capacity.
1100
- */
1101
- function LRUCache(Keys, Values, capacity) {
1102
- if (arguments.length < 2) {
1103
- capacity = Keys;
1104
- Keys = null;
1105
- Values = null;
1106
- }
1107
- this.capacity = capacity;
1108
- if (typeof this.capacity !== "number" || this.capacity <= 0) throw new Error("mnemonist/lru-cache: capacity should be positive number.");
1109
- else if (!isFinite(this.capacity) || Math.floor(this.capacity) !== this.capacity) throw new Error("mnemonist/lru-cache: capacity should be a finite positive integer.");
1110
- var PointerArray = typed.getPointerArray(capacity);
1111
- this.forward = new PointerArray(capacity);
1112
- this.backward = new PointerArray(capacity);
1113
- this.K = typeof Keys === "function" ? new Keys(capacity) : new Array(capacity);
1114
- this.V = typeof Values === "function" ? new Values(capacity) : new Array(capacity);
1115
- this.size = 0;
1116
- this.head = 0;
1117
- this.tail = 0;
1118
- this.items = {};
1119
- }
1120
- /**
1121
- * Method used to clear the structure.
1122
- *
1123
- * @return {undefined}
1124
- */
1125
- LRUCache.prototype.clear = function() {
1126
- this.size = 0;
1127
- this.head = 0;
1128
- this.tail = 0;
1129
- this.items = {};
1130
- };
1131
- /**
1132
- * Method used to splay a value on top.
1133
- *
1134
- * @param {number} pointer - Pointer of the value to splay on top.
1135
- * @return {LRUCache}
1136
- */
1137
- LRUCache.prototype.splayOnTop = function(pointer) {
1138
- var oldHead = this.head;
1139
- if (this.head === pointer) return this;
1140
- var previous = this.backward[pointer], next = this.forward[pointer];
1141
- if (this.tail === pointer) this.tail = previous;
1142
- else this.backward[next] = previous;
1143
- this.forward[previous] = next;
1144
- this.backward[oldHead] = pointer;
1145
- this.head = pointer;
1146
- this.forward[pointer] = oldHead;
1147
- return this;
1148
- };
1149
- /**
1150
- * Method used to set the value for the given key in the cache.
1151
- *
1152
- * @param {any} key - Key.
1153
- * @param {any} value - Value.
1154
- * @return {undefined}
1155
- */
1156
- LRUCache.prototype.set = function(key, value) {
1157
- var pointer = this.items[key];
1158
- if (typeof pointer !== "undefined") {
1159
- this.splayOnTop(pointer);
1160
- this.V[pointer] = value;
1161
- return;
1162
- }
1163
- if (this.size < this.capacity) pointer = this.size++;
1164
- else {
1165
- pointer = this.tail;
1166
- this.tail = this.backward[pointer];
1167
- delete this.items[this.K[pointer]];
1168
- }
1169
- this.items[key] = pointer;
1170
- this.K[pointer] = key;
1171
- this.V[pointer] = value;
1172
- this.forward[pointer] = this.head;
1173
- this.backward[this.head] = pointer;
1174
- this.head = pointer;
1175
- };
1176
- /**
1177
- * Method used to set the value for the given key in the cache
1178
- *
1179
- * @param {any} key - Key.
1180
- * @param {any} value - Value.
1181
- * @return {{evicted: boolean, key: any, value: any}} An object containing the
1182
- * key and value of an item that was overwritten or evicted in the set
1183
- * operation, as well as a boolean indicating whether it was evicted due to
1184
- * limited capacity. Return value is null if nothing was evicted or overwritten
1185
- * during the set operation.
1186
- */
1187
- LRUCache.prototype.setpop = function(key, value) {
1188
- var oldValue = null;
1189
- var oldKey = null;
1190
- var pointer = this.items[key];
1191
- if (typeof pointer !== "undefined") {
1192
- this.splayOnTop(pointer);
1193
- oldValue = this.V[pointer];
1194
- this.V[pointer] = value;
1195
- return {
1196
- evicted: false,
1197
- key,
1198
- value: oldValue
1199
- };
1200
- }
1201
- if (this.size < this.capacity) pointer = this.size++;
1202
- else {
1203
- pointer = this.tail;
1204
- this.tail = this.backward[pointer];
1205
- oldValue = this.V[pointer];
1206
- oldKey = this.K[pointer];
1207
- delete this.items[oldKey];
1208
- }
1209
- this.items[key] = pointer;
1210
- this.K[pointer] = key;
1211
- this.V[pointer] = value;
1212
- this.forward[pointer] = this.head;
1213
- this.backward[this.head] = pointer;
1214
- this.head = pointer;
1215
- if (oldKey) return {
1216
- evicted: true,
1217
- key: oldKey,
1218
- value: oldValue
1219
- };
1220
- else return null;
1221
- };
1222
- /**
1223
- * Method used to check whether the key exists in the cache.
1224
- *
1225
- * @param {any} key - Key.
1226
- * @return {boolean}
1227
- */
1228
- LRUCache.prototype.has = function(key) {
1229
- return key in this.items;
1230
- };
1231
- /**
1232
- * Method used to get the value attached to the given key. Will move the
1233
- * related key to the front of the underlying linked list.
1234
- *
1235
- * @param {any} key - Key.
1236
- * @return {any}
1237
- */
1238
- LRUCache.prototype.get = function(key) {
1239
- var pointer = this.items[key];
1240
- if (typeof pointer === "undefined") return;
1241
- this.splayOnTop(pointer);
1242
- return this.V[pointer];
1243
- };
1244
- /**
1245
- * Method used to get the value attached to the given key. Does not modify
1246
- * the ordering of the underlying linked list.
1247
- *
1248
- * @param {any} key - Key.
1249
- * @return {any}
1250
- */
1251
- LRUCache.prototype.peek = function(key) {
1252
- var pointer = this.items[key];
1253
- if (typeof pointer === "undefined") return;
1254
- return this.V[pointer];
1255
- };
1256
- /**
1257
- * Method used to iterate over the cache's entries using a callback.
1258
- *
1259
- * @param {function} callback - Function to call for each item.
1260
- * @param {object} scope - Optional scope.
1261
- * @return {undefined}
1262
- */
1263
- LRUCache.prototype.forEach = function(callback, scope) {
1264
- scope = arguments.length > 1 ? scope : this;
1265
- var i = 0, l = this.size;
1266
- var pointer = this.head, keys = this.K, values = this.V, forward = this.forward;
1267
- while (i < l) {
1268
- callback.call(scope, values[pointer], keys[pointer], this);
1269
- pointer = forward[pointer];
1270
- i++;
1271
- }
1272
- };
1273
- /**
1274
- * Method used to create an iterator over the cache's keys from most
1275
- * recently used to least recently used.
1276
- *
1277
- * @return {Iterator}
1278
- */
1279
- LRUCache.prototype.keys = function() {
1280
- var i = 0, l = this.size;
1281
- var pointer = this.head, keys = this.K, forward = this.forward;
1282
- return new Iterator(function() {
1283
- if (i >= l) return { done: true };
1284
- var key = keys[pointer];
1285
- i++;
1286
- if (i < l) pointer = forward[pointer];
1287
- return {
1288
- done: false,
1289
- value: key
1290
- };
1291
- });
1292
- };
1293
- /**
1294
- * Method used to create an iterator over the cache's values from most
1295
- * recently used to least recently used.
1296
- *
1297
- * @return {Iterator}
1298
- */
1299
- LRUCache.prototype.values = function() {
1300
- var i = 0, l = this.size;
1301
- var pointer = this.head, values = this.V, forward = this.forward;
1302
- return new Iterator(function() {
1303
- if (i >= l) return { done: true };
1304
- var value = values[pointer];
1305
- i++;
1306
- if (i < l) pointer = forward[pointer];
1307
- return {
1308
- done: false,
1309
- value
1310
- };
1311
- });
1312
- };
1313
- /**
1314
- * Method used to create an iterator over the cache's entries from most
1315
- * recently used to least recently used.
1316
- *
1317
- * @return {Iterator}
1318
- */
1319
- LRUCache.prototype.entries = function() {
1320
- var i = 0, l = this.size;
1321
- var pointer = this.head, keys = this.K, values = this.V, forward = this.forward;
1322
- return new Iterator(function() {
1323
- if (i >= l) return { done: true };
1324
- var key = keys[pointer], value = values[pointer];
1325
- i++;
1326
- if (i < l) pointer = forward[pointer];
1327
- return {
1328
- done: false,
1329
- value: [key, value]
1330
- };
1331
- });
1332
- };
1333
- /**
1334
- * Attaching the #.entries method to Symbol.iterator if possible.
1335
- */
1336
- if (typeof Symbol !== "undefined") LRUCache.prototype[Symbol.iterator] = LRUCache.prototype.entries;
1337
- /**
1338
- * Convenience known methods.
1339
- */
1340
- LRUCache.prototype.inspect = function() {
1341
- var proxy = /* @__PURE__ */ new Map();
1342
- var iterator = this.entries(), step;
1343
- while (step = iterator.next(), !step.done) proxy.set(step.value[0], step.value[1]);
1344
- Object.defineProperty(proxy, "constructor", {
1345
- value: LRUCache,
1346
- enumerable: false
1347
- });
1348
- return proxy;
1349
- };
1350
- if (typeof Symbol !== "undefined") LRUCache.prototype[Symbol.for("nodejs.util.inspect.custom")] = LRUCache.prototype.inspect;
1351
- /**
1352
- * Static @.from function taking an arbitrary iterable & converting it into
1353
- * a structure.
1354
- *
1355
- * @param {Iterable} iterable - Target iterable.
1356
- * @param {function} Keys - Array class for storing keys.
1357
- * @param {function} Values - Array class for storing values.
1358
- * @param {number} capacity - Cache's capacity.
1359
- * @return {LRUCache}
1360
- */
1361
- LRUCache.from = function(iterable, Keys, Values, capacity) {
1362
- if (arguments.length < 2) {
1363
- capacity = iterables.guessLength(iterable);
1364
- if (typeof capacity !== "number") throw new Error("mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.");
1365
- } else if (arguments.length === 2) {
1366
- capacity = Keys;
1367
- Keys = null;
1368
- Values = null;
1369
- }
1370
- var cache = new LRUCache(Keys, Values, capacity);
1371
- forEach(iterable, function(value, key) {
1372
- cache.set(key, value);
1373
- });
1374
- return cache;
1375
- };
1376
- /**
1377
- * Exporting.
1378
- */
1379
- module.exports = LRUCache;
1380
- }));
1381
-
1382
- //#endregion
1383
- //#region ../../node_modules/.pnpm/mnemonist@0.40.3_patch_hash=70301b9c235e13bc146bb9528b7979c278952196d5dac8048ab3850adac8f4cf/node_modules/mnemonist/lru-map.js
1384
- var require_lru_map = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1385
- /**
1386
- * Mnemonist LRUMap
1387
- * =================
1388
- *
1389
- * Variant of the LRUCache class that leverages an ES6 Map instead of an object.
1390
- * It might be faster for some use case but it is still hard to understand
1391
- * when a Map can outperform an object in v8.
1392
- */
1393
- var LRUCache = require_lru_cache(), forEach = require_foreach(), typed = require_typed_arrays(), iterables = require_iterables();
1394
- /**
1395
- * LRUMap.
1396
- *
1397
- * @constructor
1398
- * @param {function} Keys - Array class for storing keys.
1399
- * @param {function} Values - Array class for storing values.
1400
- * @param {number} capacity - Desired capacity.
1401
- */
1402
- function LRUMap(Keys, Values, capacity) {
1403
- if (arguments.length < 2) {
1404
- capacity = Keys;
1405
- Keys = null;
1406
- Values = null;
1407
- }
1408
- this.capacity = capacity;
1409
- if (typeof this.capacity !== "number" || this.capacity <= 0) throw new Error("mnemonist/lru-map: capacity should be positive number.");
1410
- else if (!isFinite(this.capacity) || Math.floor(this.capacity) !== this.capacity) throw new Error("mnemonist/lru-map: capacity should be a finite positive integer.");
1411
- var PointerArray = typed.getPointerArray(capacity);
1412
- this.forward = new PointerArray(capacity);
1413
- this.backward = new PointerArray(capacity);
1414
- this.K = typeof Keys === "function" ? new Keys(capacity) : new Array(capacity);
1415
- this.V = typeof Values === "function" ? new Values(capacity) : new Array(capacity);
1416
- this.size = 0;
1417
- this.head = 0;
1418
- this.tail = 0;
1419
- this.items = /* @__PURE__ */ new Map();
1420
- }
1421
- /**
1422
- * Method used to clear the structure.
1423
- *
1424
- * @return {undefined}
1425
- */
1426
- LRUMap.prototype.clear = function() {
1427
- this.size = 0;
1428
- this.head = 0;
1429
- this.tail = 0;
1430
- this.items.clear();
1431
- };
1432
- /**
1433
- * Method used to set the value for the given key in the cache.
1434
- *
1435
- * @param {any} key - Key.
1436
- * @param {any} value - Value.
1437
- * @return {undefined}
1438
- */
1439
- LRUMap.prototype.set = function(key, value) {
1440
- var pointer = this.items.get(key);
1441
- if (typeof pointer !== "undefined") {
1442
- this.splayOnTop(pointer);
1443
- this.V[pointer] = value;
1444
- return;
1445
- }
1446
- if (this.size < this.capacity) pointer = this.size++;
1447
- else {
1448
- pointer = this.tail;
1449
- this.tail = this.backward[pointer];
1450
- this.items.delete(this.K[pointer]);
1451
- }
1452
- this.items.set(key, pointer);
1453
- this.K[pointer] = key;
1454
- this.V[pointer] = value;
1455
- this.forward[pointer] = this.head;
1456
- this.backward[this.head] = pointer;
1457
- this.head = pointer;
1458
- };
1459
- /**
1460
- * Method used to set the value for the given key in the cache.
1461
- *
1462
- * @param {any} key - Key.
1463
- * @param {any} value - Value.
1464
- * @return {{evicted: boolean, key: any, value: any}} An object containing the
1465
- * key and value of an item that was overwritten or evicted in the set
1466
- * operation, as well as a boolean indicating whether it was evicted due to
1467
- * limited capacity. Return value is null if nothing was evicted or overwritten
1468
- * during the set operation.
1469
- */
1470
- LRUMap.prototype.setpop = function(key, value) {
1471
- var oldValue = null;
1472
- var oldKey = null;
1473
- var pointer = this.items.get(key);
1474
- if (typeof pointer !== "undefined") {
1475
- this.splayOnTop(pointer);
1476
- oldValue = this.V[pointer];
1477
- this.V[pointer] = value;
1478
- return {
1479
- evicted: false,
1480
- key,
1481
- value: oldValue
1482
- };
1483
- }
1484
- if (this.size < this.capacity) pointer = this.size++;
1485
- else {
1486
- pointer = this.tail;
1487
- this.tail = this.backward[pointer];
1488
- oldValue = this.V[pointer];
1489
- oldKey = this.K[pointer];
1490
- this.items.delete(oldKey);
1491
- }
1492
- this.items.set(key, pointer);
1493
- this.K[pointer] = key;
1494
- this.V[pointer] = value;
1495
- this.forward[pointer] = this.head;
1496
- this.backward[this.head] = pointer;
1497
- this.head = pointer;
1498
- if (oldKey) return {
1499
- evicted: true,
1500
- key: oldKey,
1501
- value: oldValue
1502
- };
1503
- else return null;
1504
- };
1505
- /**
1506
- * Method used to check whether the key exists in the cache.
1507
- *
1508
- * @param {any} key - Key.
1509
- * @return {boolean}
1510
- */
1511
- LRUMap.prototype.has = function(key) {
1512
- return this.items.has(key);
1513
- };
1514
- /**
1515
- * Method used to get the value attached to the given key. Will move the
1516
- * related key to the front of the underlying linked list.
1517
- *
1518
- * @param {any} key - Key.
1519
- * @return {any}
1520
- */
1521
- LRUMap.prototype.get = function(key) {
1522
- var pointer = this.items.get(key);
1523
- if (typeof pointer === "undefined") return;
1524
- this.splayOnTop(pointer);
1525
- return this.V[pointer];
1526
- };
1527
- /**
1528
- * Method used to get the value attached to the given key. Does not modify
1529
- * the ordering of the underlying linked list.
1530
- *
1531
- * @param {any} key - Key.
1532
- * @return {any}
1533
- */
1534
- LRUMap.prototype.peek = function(key) {
1535
- var pointer = this.items.get(key);
1536
- if (typeof pointer === "undefined") return;
1537
- return this.V[pointer];
1538
- };
1539
- /**
1540
- * Methods that can be reused as-is from LRUCache.
1541
- */
1542
- LRUMap.prototype.splayOnTop = LRUCache.prototype.splayOnTop;
1543
- LRUMap.prototype.forEach = LRUCache.prototype.forEach;
1544
- LRUMap.prototype.keys = LRUCache.prototype.keys;
1545
- LRUMap.prototype.values = LRUCache.prototype.values;
1546
- LRUMap.prototype.entries = LRUCache.prototype.entries;
1547
- /**
1548
- * Attaching the #.entries method to Symbol.iterator if possible.
1549
- */
1550
- if (typeof Symbol !== "undefined") LRUMap.prototype[Symbol.iterator] = LRUMap.prototype.entries;
1551
- /**
1552
- * Convenience known methods.
1553
- */
1554
- LRUMap.prototype.inspect = LRUCache.prototype.inspect;
1555
- /**
1556
- * Static @.from function taking an arbitrary iterable & converting it into
1557
- * a structure.
1558
- *
1559
- * @param {Iterable} iterable - Target iterable.
1560
- * @param {function} Keys - Array class for storing keys.
1561
- * @param {function} Values - Array class for storing values.
1562
- * @param {number} capacity - Cache's capacity.
1563
- * @return {LRUMap}
1564
- */
1565
- LRUMap.from = function(iterable, Keys, Values, capacity) {
1566
- if (arguments.length < 2) {
1567
- capacity = iterables.guessLength(iterable);
1568
- if (typeof capacity !== "number") throw new Error("mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.");
1569
- } else if (arguments.length === 2) {
1570
- capacity = Keys;
1571
- Keys = null;
1572
- Values = null;
1573
- }
1574
- var cache = new LRUMap(Keys, Values, capacity);
1575
- forEach(iterable, function(value, key) {
1576
- cache.set(key, value);
1577
- });
1578
- return cache;
1579
- };
1580
- /**
1581
- * Exporting.
1582
- */
1583
- module.exports = LRUMap;
1584
- }));
1585
-
1586
- //#endregion
1587
- //#region ../../node_modules/.pnpm/mnemonist@0.40.3_patch_hash=70301b9c235e13bc146bb9528b7979c278952196d5dac8048ab3850adac8f4cf/node_modules/mnemonist/set.js
1588
- var require_set = /* @__PURE__ */ __commonJSMin(((exports) => {
1589
- /**
1590
- * Mnemonist Set
1591
- * ==============
1592
- *
1593
- * Useful function related to sets such as union, intersection and so on...
1594
- */
1595
- /**
1596
- * Variadic function computing the intersection of multiple sets.
1597
- *
1598
- * @param {...Set} sets - Sets to intersect.
1599
- * @return {Set} - The intesection.
1600
- */
1601
- exports.intersection = function() {
1602
- if (arguments.length < 2) throw new Error("mnemonist/Set.intersection: needs at least two arguments.");
1603
- var I = /* @__PURE__ */ new Set();
1604
- var smallestSize = Infinity, smallestSet = null;
1605
- var s, i, l = arguments.length;
1606
- for (i = 0; i < l; i++) {
1607
- s = arguments[i];
1608
- if (s.size === 0) return I;
1609
- if (s.size < smallestSize) {
1610
- smallestSize = s.size;
1611
- smallestSet = s;
1612
- }
1613
- }
1614
- var iterator = smallestSet.values(), step, item, add, set;
1615
- while (step = iterator.next(), !step.done) {
1616
- item = step.value;
1617
- add = true;
1618
- for (i = 0; i < l; i++) {
1619
- set = arguments[i];
1620
- if (set === smallestSet) continue;
1621
- if (!set.has(item)) {
1622
- add = false;
1623
- break;
1624
- }
1625
- }
1626
- if (add) I.add(item);
1627
- }
1628
- return I;
1629
- };
1630
- /**
1631
- * Variadic function computing the union of multiple sets.
1632
- *
1633
- * @param {...Set} sets - Sets to unite.
1634
- * @return {Set} - The union.
1635
- */
1636
- exports.union = function() {
1637
- if (arguments.length < 2) throw new Error("mnemonist/Set.union: needs at least two arguments.");
1638
- var U = /* @__PURE__ */ new Set();
1639
- var i, l = arguments.length;
1640
- var iterator, step;
1641
- for (i = 0; i < l; i++) {
1642
- iterator = arguments[i].values();
1643
- while (step = iterator.next(), !step.done) U.add(step.value);
1644
- }
1645
- return U;
1646
- };
1647
- /**
1648
- * Function computing the difference between two sets.
1649
- *
1650
- * @param {Set} A - First set.
1651
- * @param {Set} B - Second set.
1652
- * @return {Set} - The difference.
1653
- */
1654
- exports.difference = function(A, B) {
1655
- if (!A.size) return /* @__PURE__ */ new Set();
1656
- if (!B.size) return new Set(A);
1657
- var D = /* @__PURE__ */ new Set();
1658
- var iterator = A.values(), step;
1659
- while (step = iterator.next(), !step.done) if (!B.has(step.value)) D.add(step.value);
1660
- return D;
1661
- };
1662
- /**
1663
- * Function computing the symmetric difference between two sets.
1664
- *
1665
- * @param {Set} A - First set.
1666
- * @param {Set} B - Second set.
1667
- * @return {Set} - The symmetric difference.
1668
- */
1669
- exports.symmetricDifference = function(A, B) {
1670
- var S = /* @__PURE__ */ new Set();
1671
- var iterator = A.values(), step;
1672
- while (step = iterator.next(), !step.done) if (!B.has(step.value)) S.add(step.value);
1673
- iterator = B.values();
1674
- while (step = iterator.next(), !step.done) if (!A.has(step.value)) S.add(step.value);
1675
- return S;
1676
- };
1677
- /**
1678
- * Function returning whether A is a subset of B.
1679
- *
1680
- * @param {Set} A - First set.
1681
- * @param {Set} B - Second set.
1682
- * @return {boolean}
1683
- */
1684
- exports.isSubset = function(A, B) {
1685
- var iterator = A.values(), step;
1686
- if (A === B) return true;
1687
- if (A.size > B.size) return false;
1688
- while (step = iterator.next(), !step.done) if (!B.has(step.value)) return false;
1689
- return true;
1690
- };
1691
- /**
1692
- * Function returning whether A is a superset of B.
1693
- *
1694
- * @param {Set} A - First set.
1695
- * @param {Set} B - Second set.
1696
- * @return {boolean}
1697
- */
1698
- exports.isSuperset = function(A, B) {
1699
- return exports.isSubset(B, A);
1700
- };
1701
- /**
1702
- * Function adding the items of set B to the set A.
1703
- *
1704
- * @param {Set} A - First set.
1705
- * @param {Set} B - Second set.
1706
- */
1707
- exports.add = function(A, B) {
1708
- var iterator = B.values(), step;
1709
- while (step = iterator.next(), !step.done) A.add(step.value);
1710
- };
1711
- /**
1712
- * Function subtracting the items of set B from the set A.
1713
- *
1714
- * @param {Set} A - First set.
1715
- * @param {Set} B - Second set.
1716
- */
1717
- exports.subtract = function(A, B) {
1718
- var iterator = B.values(), step;
1719
- while (step = iterator.next(), !step.done) A.delete(step.value);
1720
- };
1721
- /**
1722
- * Function intersecting the items of A & B.
1723
- *
1724
- * @param {Set} A - First set.
1725
- * @param {Set} B - Second set.
1726
- */
1727
- exports.intersect = function(A, B) {
1728
- var iterator = A.values(), step;
1729
- while (step = iterator.next(), !step.done) if (!B.has(step.value)) A.delete(step.value);
1730
- };
1731
- /**
1732
- * Function disjuncting the items of A & B.
1733
- *
1734
- * @param {Set} A - First set.
1735
- * @param {Set} B - Second set.
1736
- */
1737
- exports.disjunct = function(A, B) {
1738
- var iterator = A.values(), step;
1739
- var toRemove = [];
1740
- while (step = iterator.next(), !step.done) if (B.has(step.value)) toRemove.push(step.value);
1741
- iterator = B.values();
1742
- while (step = iterator.next(), !step.done) if (!A.has(step.value)) A.add(step.value);
1743
- for (var i = 0, l = toRemove.length; i < l; i++) A.delete(toRemove[i]);
1744
- };
1745
- /**
1746
- * Function returning the size of the intersection of A & B.
1747
- *
1748
- * @param {Set} A - First set.
1749
- * @param {Set} B - Second set.
1750
- * @return {number}
1751
- */
1752
- exports.intersectionSize = function(A, B) {
1753
- var tmp;
1754
- if (A.size > B.size) {
1755
- tmp = A;
1756
- A = B;
1757
- B = tmp;
1758
- }
1759
- if (A.size === 0) return 0;
1760
- if (A === B) return A.size;
1761
- var iterator = A.values(), step;
1762
- var I = 0;
1763
- while (step = iterator.next(), !step.done) if (B.has(step.value)) I++;
1764
- return I;
1765
- };
1766
- /**
1767
- * Function returning the size of the union of A & B.
1768
- *
1769
- * @param {Set} A - First set.
1770
- * @param {Set} B - Second set.
1771
- * @return {number}
1772
- */
1773
- exports.unionSize = function(A, B) {
1774
- var I = exports.intersectionSize(A, B);
1775
- return A.size + B.size - I;
1776
- };
1777
- /**
1778
- * Function returning the Jaccard similarity between A & B.
1779
- *
1780
- * @param {Set} A - First set.
1781
- * @param {Set} B - Second set.
1782
- * @return {number}
1783
- */
1784
- exports.jaccard = function(A, B) {
1785
- var I = exports.intersectionSize(A, B);
1786
- if (I === 0) return 0;
1787
- return I / (A.size + B.size - I);
1788
- };
1789
- /**
1790
- * Function returning the overlap coefficient between A & B.
1791
- *
1792
- * @param {Set} A - First set.
1793
- * @param {Set} B - Second set.
1794
- * @return {number}
1795
- */
1796
- exports.overlap = function(A, B) {
1797
- var I = exports.intersectionSize(A, B);
1798
- if (I === 0) return 0;
1799
- return I / Math.min(A.size, B.size);
1800
- };
1801
- }));
1802
-
1803
- //#endregion
1804
- //#region ../../node_modules/.pnpm/mnemonist@0.40.3_patch_hash=70301b9c235e13bc146bb9528b7979c278952196d5dac8048ab3850adac8f4cf/node_modules/mnemonist/stack.js
1805
- var require_stack = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1806
- /**
1807
- * Mnemonist Stack
1808
- * ================
1809
- *
1810
- * Stack implementation relying on JavaScript arrays, which are fast enough &
1811
- * correctly optimized for this kind of work.
1812
- */
1813
- var Iterator = require_iterator(), forEach = require_foreach();
1814
- /**
1815
- * Stack
1816
- *
1817
- * @constructor
1818
- */
1819
- function Stack() {
1820
- this.clear();
1821
- }
1822
- /**
1823
- * Method used to clear the stack.
1824
- *
1825
- * @return {undefined}
1826
- */
1827
- Stack.prototype.clear = function() {
1828
- this.items = [];
1829
- this.size = 0;
1830
- };
1831
- /**
1832
- * Method used to add an item to the stack.
1833
- *
1834
- * @param {any} item - Item to add.
1835
- * @return {number}
1836
- */
1837
- Stack.prototype.push = function(item) {
1838
- this.items.push(item);
1839
- return ++this.size;
1840
- };
1841
- /**
1842
- * Method used to retrieve & remove the last item of the stack.
1843
- *
1844
- * @return {any}
1845
- */
1846
- Stack.prototype.pop = function() {
1847
- if (this.size === 0) return;
1848
- this.size--;
1849
- return this.items.pop();
1850
- };
1851
- /**
1852
- * Method used to get the last item of the stack.
1853
- *
1854
- * @return {any}
1855
- */
1856
- Stack.prototype.peek = function() {
1857
- return this.items[this.size - 1];
1858
- };
1859
- /**
1860
- * Method used to iterate over the stack.
1861
- *
1862
- * @param {function} callback - Function to call for each item.
1863
- * @param {object} scope - Optional scope.
1864
- * @return {undefined}
1865
- */
1866
- Stack.prototype.forEach = function(callback, scope) {
1867
- scope = arguments.length > 1 ? scope : this;
1868
- for (var i = 0, l = this.items.length; i < l; i++) callback.call(scope, this.items[l - i - 1], i, this);
1869
- };
1870
- /**
1871
- * Method used to convert the stack to a JavaScript array.
1872
- *
1873
- * @return {array}
1874
- */
1875
- Stack.prototype.toArray = function() {
1876
- var array = new Array(this.size), l = this.size - 1, i = this.size;
1877
- while (i--) array[i] = this.items[l - i];
1878
- return array;
1879
- };
1880
- /**
1881
- * Method used to create an iterator over a stack's values.
1882
- *
1883
- * @return {Iterator}
1884
- */
1885
- Stack.prototype.values = function() {
1886
- var items = this.items, l = items.length, i = 0;
1887
- return new Iterator(function() {
1888
- if (i >= l) return { done: true };
1889
- var value = items[l - i - 1];
1890
- i++;
1891
- return {
1892
- value,
1893
- done: false
1894
- };
1895
- });
1896
- };
1897
- /**
1898
- * Method used to create an iterator over a stack's entries.
1899
- *
1900
- * @return {Iterator}
1901
- */
1902
- Stack.prototype.entries = function() {
1903
- var items = this.items, l = items.length, i = 0;
1904
- return new Iterator(function() {
1905
- if (i >= l) return { done: true };
1906
- var value = items[l - i - 1];
1907
- return {
1908
- value: [i++, value],
1909
- done: false
1910
- };
1911
- });
1912
- };
1913
- /**
1914
- * Attaching the #.values method to Symbol.iterator if possible.
1915
- */
1916
- if (typeof Symbol !== "undefined") Stack.prototype[Symbol.iterator] = Stack.prototype.values;
1917
- /**
1918
- * Convenience known methods.
1919
- */
1920
- Stack.prototype.toString = function() {
1921
- return this.toArray().join(",");
1922
- };
1923
- Stack.prototype.toJSON = function() {
1924
- return this.toArray();
1925
- };
1926
- Stack.prototype.inspect = function() {
1927
- var array = this.toArray();
1928
- Object.defineProperty(array, "constructor", {
1929
- value: Stack,
1930
- enumerable: false
1931
- });
1932
- return array;
1933
- };
1934
- if (typeof Symbol !== "undefined") Stack.prototype[Symbol.for("nodejs.util.inspect.custom")] = Stack.prototype.inspect;
1935
- /**
1936
- * Static @.from function taking an arbitrary iterable & converting it into
1937
- * a stack.
1938
- *
1939
- * @param {Iterable} iterable - Target iterable.
1940
- * @return {Stack}
1941
- */
1942
- Stack.from = function(iterable) {
1943
- var stack = new Stack();
1944
- forEach(iterable, function(value) {
1945
- stack.push(value);
1946
- });
1947
- return stack;
1948
- };
1949
- /**
1950
- * Static @.of function taking an arbitrary number of arguments & converting it
1951
- * into a stack.
1952
- *
1953
- * @param {...any} args
1954
- * @return {Stack}
1955
- */
1956
- Stack.of = function() {
1957
- return Stack.from(arguments);
1958
- };
1959
- /**
1960
- * Exporting.
1961
- */
1962
- module.exports = Stack;
1963
- }));
1964
-
1965
- //#endregion
1966
- //#region ../../node_modules/.pnpm/mnemonist@0.40.3_patch_hash=70301b9c235e13bc146bb9528b7979c278952196d5dac8048ab3850adac8f4cf/node_modules/mnemonist/patch.mjs
1967
- var import_bi_map = /* @__PURE__ */ __toESM(require_bi_map(), 1);
1968
- var import_default_map = /* @__PURE__ */ __toESM(require_default_map(), 1);
1969
- var import_default_weak_map = /* @__PURE__ */ __toESM(require_default_weak_map(), 1);
1970
- var import_linked_list = /* @__PURE__ */ __toESM(require_linked_list(), 1);
1971
- var import_multi_map = /* @__PURE__ */ __toESM(require_multi_map(), 1);
1972
- var import_queue = /* @__PURE__ */ __toESM(require_queue(), 1);
1973
- var import_lru_map = /* @__PURE__ */ __toESM(require_lru_map(), 1);
1974
- var import_set = require_set();
1975
- var import_stack = /* @__PURE__ */ __toESM(require_stack(), 1);
1976
-
1977
- //#endregion
1978
- export { import_lru_map as a, import_set as c, import_linked_list as i, import_stack as l, import_default_map as n, import_multi_map as o, import_default_weak_map as r, import_queue as s, import_bi_map as t };
1
+ import{r as __toESM,t as __commonJSMin}from"../rolldown-runtime.mjs";import{a as require_iterator,i as require_typed_arrays,o as require_foreach,r as require_iterables}from"./graphology-dag.mjs";var require_default_map=__commonJSMin(((e,t)=>{function n(e){if(typeof e!=`function`)throw Error(`mnemonist/DefaultMap.constructor: expecting a function.`);this.items=new Map,this.factory=e,this.size=0}n.prototype.clear=function(){this.items.clear(),this.size=0},n.prototype.get=function(e){var t=this.items.get(e);return t===void 0&&(t=this.factory(e,this.size),this.items.set(e,t),this.size++),t},n.prototype.peek=function(e){return this.items.get(e)},n.prototype.set=function(e,t){return this.items.set(e,t),this.size=this.items.size,this},n.prototype.has=function(e){return this.items.has(e)},n.prototype.delete=function(e){var t=this.items.delete(e);return this.size=this.items.size,t},n.prototype.forEach=function(e,t){t=arguments.length>1?t:this,this.items.forEach(e,t)},n.prototype.entries=function(){return this.items.entries()},n.prototype.keys=function(){return this.items.keys()},n.prototype.values=function(){return this.items.values()},typeof Symbol<`u`&&(n.prototype[Symbol.iterator]=n.prototype.entries),n.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(n.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=n.prototype.inspect),n.autoIncrement=function(){var e=0;return function(){return e++}},t.exports=n})),require_default_weak_map=__commonJSMin(((e,t)=>{function n(e){if(typeof e!=`function`)throw Error(`mnemonist/DefaultWeakMap.constructor: expecting a function.`);this.items=new WeakMap,this.factory=e}n.prototype.clear=function(){this.items=new WeakMap},n.prototype.get=function(e){var t=this.items.get(e);return t===void 0&&(t=this.factory(e),this.items.set(e,t)),t},n.prototype.peek=function(e){return this.items.get(e)},n.prototype.set=function(e,t){return this.items.set(e,t),this},n.prototype.has=function(e){return this.items.has(e)},n.prototype.delete=function(e){return this.items.delete(e)},n.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(n.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=n.prototype.inspect),t.exports=n})),require_linked_list=__commonJSMin(((e,t)=>{var r=require_iterator(),a=require_foreach();function o(){this.clear()}o.prototype.clear=function(){this.head=null,this.tail=null,this.size=0},o.prototype.first=function(){return this.head?this.head.item:void 0},o.prototype.peek=o.prototype.first,o.prototype.last=function(){return this.tail?this.tail.item:void 0},o.prototype.push=function(e){var t={item:e,next:null};return this.head?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),this.size++,this.size},o.prototype.unshift=function(e){var t={item:e,next:null};return this.head?(this.head.next||(this.tail=this.head),t.next=this.head,this.head=t):(this.head=t,this.tail=t),this.size++,this.size},o.prototype.shift=function(){if(this.size){var e=this.head;return this.head=e.next,this.size--,e.item}},o.prototype.forEach=function(e,t){if(this.size){t=arguments.length>1?t:this;for(var n=this.head,r=0;n;)e.call(t,n.item,r,this),n=n.next,r++}},o.prototype.toArray=function(){if(!this.size)return[];for(var e=Array(this.size),t=0,n=this.size,r=this.head;t<n;t++)e[t]=r.item,r=r.next;return e},o.prototype.values=function(){var e=this.head;return new r(function(){if(!e)return{done:!0};var t=e.item;return e=e.next,{value:t,done:!1}})},o.prototype.entries=function(){var e=this.head,t=0;return new r(function(){if(!e)return{done:!0};var n=e.item;return e=e.next,t++,{value:[t-1,n],done:!1}})},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.toString=function(){return this.toArray().join(`,`)},o.prototype.toJSON=function(){return this.toArray()},o.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,`constructor`,{value:o,enumerable:!1}),e},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.from=function(e){var t=new o;return a(e,function(e){t.push(e)}),t},t.exports=o})),require_multi_map=__commonJSMin(((e,t)=>{var r=require_iterator(),a=require_foreach();function o(e){this.Container=e||Array,this.items=new Map,this.clear(),Object.defineProperty(this.items,`constructor`,{value:o,enumerable:!1})}o.prototype.clear=function(){this.size=0,this.dimension=0,this.items.clear()},o.prototype.set=function(e,t){var n=this.items.get(e),r;return n||(this.dimension++,n=new this.Container,this.items.set(e,n)),this.Container===Set?(r=n.size,n.add(t),r<n.size&&this.size++):(n.push(t),this.size++),this},o.prototype.delete=function(e){var t=this.items.get(e);return t?(this.size-=this.Container===Set?t.size:t.length,this.dimension--,this.items.delete(e),!0):!1},o.prototype.remove=function(e,t){var n=this.items.get(e),r,i;return n?this.Container===Set?(r=n.delete(t),r&&this.size--,n.size===0&&(this.items.delete(e),this.dimension--),r):(i=n.indexOf(t),i===-1?!1:(this.size--,n.length===1?(this.items.delete(e),this.dimension--,!0):(n.splice(i,1),!0))):!1},o.prototype.has=function(e){return this.items.has(e)},o.prototype.get=function(e){return this.items.get(e)},o.prototype.multiplicity=function(e){var t=this.items.get(e);return t===void 0?0:this.Container===Set?t.size:t.length},o.prototype.count=o.prototype.multiplicity,o.prototype.forEach=function(e,t){t=arguments.length>1?t:this;var n;function r(r){e.call(t,r,n)}this.items.forEach(function(e,t){n=t,e.forEach(r)})},o.prototype.forEachAssociation=function(e,t){t=arguments.length>1?t:this,this.items.forEach(e,t)},o.prototype.keys=function(){return this.items.keys()},o.prototype.values=function(){var e=this.items.values(),t=!1,n,i,a,o;return this.Container===Set?new r(function r(){if(!t){if(i=e.next(),i.done)return{done:!0};t=!0,n=i.value.values()}return i=n.next(),i.done?(t=!1,r()):{done:!1,value:i.value}}):new r(function r(){if(!t){if(i=e.next(),i.done)return{done:!0};t=!0,n=i.value,a=0,o=n.length}return a>=o?(t=!1,r()):{done:!1,value:n[a++]}})},o.prototype.entries=function(){var e=this.items.entries(),t=!1,n,i,a,o,s;return this.Container===Set?new r(function r(){if(!t){if(i=e.next(),i.done)return{done:!0};t=!0,a=i.value[0],n=i.value[1].values()}return i=n.next(),i.done?(t=!1,r()):{done:!1,value:[a,i.value]}}):new r(function r(){if(!t){if(i=e.next(),i.done)return{done:!0};t=!0,a=i.value[0],n=i.value[1],o=0,s=n.length}return o>=s?(t=!1,r()):{done:!1,value:[a,n[o++]]}})},o.prototype.containers=function(){return this.items.values()},o.prototype.associations=function(){return this.items.entries()},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.entries),o.prototype.inspect=function(){return this.items},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.prototype.toJSON=function(){return this.items},o.from=function(e,t){var n=new o(t);return a(e,function(e,t){n.set(t,e)}),n},t.exports=o})),require_queue=__commonJSMin(((e,t)=>{var r=require_iterator(),a=require_foreach();function o(){this.clear()}o.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},o.prototype.enqueue=function(e){return this.items.push(e),++this.size},o.prototype.dequeue=function(){if(this.size){var e=this.items[this.offset];return++this.offset*2>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,e}},o.prototype.peek=function(){if(this.size)return this.items[this.offset]},o.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=this.offset,r=0,i=this.items.length;n<i;n++,r++)e.call(t,this.items[n],r,this)},o.prototype.toArray=function(){return this.items.slice(this.offset)},o.prototype.values=function(){var e=this.items,t=this.offset;return new r(function(){if(t>=e.length)return{done:!0};var n=e[t];return t++,{value:n,done:!1}})},o.prototype.entries=function(){var e=this.items,t=this.offset,n=0;return new r(function(){if(t>=e.length)return{done:!0};var r=e[t];return t++,{value:[n++,r],done:!1}})},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.toString=function(){return this.toArray().join(`,`)},o.prototype.toJSON=function(){return this.toArray()},o.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,`constructor`,{value:o,enumerable:!1}),e},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.from=function(e){var t=new o;return a(e,function(e){t.enqueue(e)}),t},o.of=function(){return o.from(arguments)},t.exports=o})),require_lru_cache=__commonJSMin(((e,t)=>{var o=require_iterator(),s=require_foreach(),c=require_typed_arrays(),l=require_iterables();function u(e,t,n){if(arguments.length<2&&(n=e,e=null,t=null),this.capacity=n,typeof this.capacity!=`number`||this.capacity<=0)throw Error(`mnemonist/lru-cache: capacity should be positive number.`);if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw Error(`mnemonist/lru-cache: capacity should be a finite positive integer.`);var r=c.getPointerArray(n);this.forward=new r(n),this.backward=new r(n),this.K=typeof e==`function`?new e(n):Array(n),this.V=typeof t==`function`?new t(n):Array(n),this.size=0,this.head=0,this.tail=0,this.items={}}u.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},u.prototype.splayOnTop=function(e){var t=this.head;if(this.head===e)return this;var n=this.backward[e],r=this.forward[e];return this.tail===e?this.tail=n:this.backward[r]=n,this.forward[n]=r,this.backward[t]=e,this.head=e,this.forward[e]=t,this},u.prototype.set=function(e,t){var n=this.items[e];if(n!==void 0){this.splayOnTop(n),this.V[n]=t;return}this.size<this.capacity?n=this.size++:(n=this.tail,this.tail=this.backward[n],delete this.items[this.K[n]]),this.items[e]=n,this.K[n]=e,this.V[n]=t,this.forward[n]=this.head,this.backward[this.head]=n,this.head=n},u.prototype.setpop=function(e,t){var n=null,r=null,i=this.items[e];return i===void 0?(this.size<this.capacity?i=this.size++:(i=this.tail,this.tail=this.backward[i],n=this.V[i],r=this.K[i],delete this.items[r]),this.items[e]=i,this.K[i]=e,this.V[i]=t,this.forward[i]=this.head,this.backward[this.head]=i,this.head=i,r?{evicted:!0,key:r,value:n}:null):(this.splayOnTop(i),n=this.V[i],this.V[i]=t,{evicted:!1,key:e,value:n})},u.prototype.has=function(e){return e in this.items},u.prototype.get=function(e){var t=this.items[e];if(t!==void 0)return this.splayOnTop(t),this.V[t]},u.prototype.peek=function(e){var t=this.items[e];if(t!==void 0)return this.V[t]},u.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0,r=this.size,i=this.head,a=this.K,o=this.V,s=this.forward;n<r;)e.call(t,o[i],a[i],this),i=s[i],n++},u.prototype.keys=function(){var e=0,t=this.size,n=this.head,r=this.K,i=this.forward;return new o(function(){if(e>=t)return{done:!0};var a=r[n];return e++,e<t&&(n=i[n]),{done:!1,value:a}})},u.prototype.values=function(){var e=0,t=this.size,n=this.head,r=this.V,i=this.forward;return new o(function(){if(e>=t)return{done:!0};var a=r[n];return e++,e<t&&(n=i[n]),{done:!1,value:a}})},u.prototype.entries=function(){var e=0,t=this.size,n=this.head,r=this.K,i=this.V,a=this.forward;return new o(function(){if(e>=t)return{done:!0};var o=r[n],s=i[n];return e++,e<t&&(n=a[n]),{done:!1,value:[o,s]}})},typeof Symbol<`u`&&(u.prototype[Symbol.iterator]=u.prototype.entries),u.prototype.inspect=function(){for(var e=new Map,t=this.entries(),n;n=t.next(),!n.done;)e.set(n.value[0],n.value[1]);return Object.defineProperty(e,`constructor`,{value:u,enumerable:!1}),e},typeof Symbol<`u`&&(u.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=u.prototype.inspect),u.from=function(e,t,n,r){if(arguments.length<2){if(r=l.guessLength(e),typeof r!=`number`)throw Error(`mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.`)}else arguments.length===2&&(r=t,t=null,n=null);var i=new u(t,n,r);return s(e,function(e,t){i.set(t,e)}),i},t.exports=u})),require_lru_map=__commonJSMin(((e,t)=>{var n=require_lru_cache(),o=require_foreach(),s=require_typed_arrays(),c=require_iterables();function l(e,t,n){if(arguments.length<2&&(n=e,e=null,t=null),this.capacity=n,typeof this.capacity!=`number`||this.capacity<=0)throw Error(`mnemonist/lru-map: capacity should be positive number.`);if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw Error(`mnemonist/lru-map: capacity should be a finite positive integer.`);var r=s.getPointerArray(n);this.forward=new r(n),this.backward=new r(n),this.K=typeof e==`function`?new e(n):Array(n),this.V=typeof t==`function`?new t(n):Array(n),this.size=0,this.head=0,this.tail=0,this.items=new Map}l.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items.clear()},l.prototype.set=function(e,t){var n=this.items.get(e);if(n!==void 0){this.splayOnTop(n),this.V[n]=t;return}this.size<this.capacity?n=this.size++:(n=this.tail,this.tail=this.backward[n],this.items.delete(this.K[n])),this.items.set(e,n),this.K[n]=e,this.V[n]=t,this.forward[n]=this.head,this.backward[this.head]=n,this.head=n},l.prototype.setpop=function(e,t){var n=null,r=null,i=this.items.get(e);return i===void 0?(this.size<this.capacity?i=this.size++:(i=this.tail,this.tail=this.backward[i],n=this.V[i],r=this.K[i],this.items.delete(r)),this.items.set(e,i),this.K[i]=e,this.V[i]=t,this.forward[i]=this.head,this.backward[this.head]=i,this.head=i,r?{evicted:!0,key:r,value:n}:null):(this.splayOnTop(i),n=this.V[i],this.V[i]=t,{evicted:!1,key:e,value:n})},l.prototype.has=function(e){return this.items.has(e)},l.prototype.get=function(e){var t=this.items.get(e);if(t!==void 0)return this.splayOnTop(t),this.V[t]},l.prototype.peek=function(e){var t=this.items.get(e);if(t!==void 0)return this.V[t]},l.prototype.splayOnTop=n.prototype.splayOnTop,l.prototype.forEach=n.prototype.forEach,l.prototype.keys=n.prototype.keys,l.prototype.values=n.prototype.values,l.prototype.entries=n.prototype.entries,typeof Symbol<`u`&&(l.prototype[Symbol.iterator]=l.prototype.entries),l.prototype.inspect=n.prototype.inspect,l.from=function(e,t,n,r){if(arguments.length<2){if(r=c.guessLength(e),typeof r!=`number`)throw Error(`mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.`)}else arguments.length===2&&(r=t,t=null,n=null);var i=new l(t,n,r);return o(e,function(e,t){i.set(t,e)}),i},t.exports=l})),require_set=__commonJSMin((e=>{e.intersection=function(){if(arguments.length<2)throw Error(`mnemonist/Set.intersection: needs at least two arguments.`);var e=new Set,t=1/0,n=null,r,i,a=arguments.length;for(i=0;i<a;i++){if(r=arguments[i],r.size===0)return e;r.size<t&&(t=r.size,n=r)}for(var o=n.values(),s,c,l,u;s=o.next(),!s.done;){for(c=s.value,l=!0,i=0;i<a;i++)if(u=arguments[i],u!==n&&!u.has(c)){l=!1;break}l&&e.add(c)}return e},e.union=function(){if(arguments.length<2)throw Error(`mnemonist/Set.union: needs at least two arguments.`);var e=new Set,t,n=arguments.length,r,i;for(t=0;t<n;t++)for(r=arguments[t].values();i=r.next(),!i.done;)e.add(i.value);return e},e.difference=function(e,t){if(!e.size)return new Set;if(!t.size)return new Set(e);for(var n=new Set,r=e.values(),i;i=r.next(),!i.done;)t.has(i.value)||n.add(i.value);return n},e.symmetricDifference=function(e,t){for(var n=new Set,r=e.values(),i;i=r.next(),!i.done;)t.has(i.value)||n.add(i.value);for(r=t.values();i=r.next(),!i.done;)e.has(i.value)||n.add(i.value);return n},e.isSubset=function(e,t){var n=e.values(),r;if(e===t)return!0;if(e.size>t.size)return!1;for(;r=n.next(),!r.done;)if(!t.has(r.value))return!1;return!0},e.isSuperset=function(t,n){return e.isSubset(n,t)},e.add=function(e,t){for(var n=t.values(),r;r=n.next(),!r.done;)e.add(r.value)},e.subtract=function(e,t){for(var n=t.values(),r;r=n.next(),!r.done;)e.delete(r.value)},e.intersect=function(e,t){for(var n=e.values(),r;r=n.next(),!r.done;)t.has(r.value)||e.delete(r.value)},e.disjunct=function(e,t){for(var n=e.values(),r,i=[];r=n.next(),!r.done;)t.has(r.value)&&i.push(r.value);for(n=t.values();r=n.next(),!r.done;)e.has(r.value)||e.add(r.value);for(var a=0,o=i.length;a<o;a++)e.delete(i[a])},e.intersectionSize=function(e,t){var n;if(e.size>t.size&&(n=e,e=t,t=n),e.size===0)return 0;if(e===t)return e.size;for(var r=e.values(),i,a=0;i=r.next(),!i.done;)t.has(i.value)&&a++;return a},e.unionSize=function(t,n){var r=e.intersectionSize(t,n);return t.size+n.size-r},e.jaccard=function(t,n){var r=e.intersectionSize(t,n);return r===0?0:r/(t.size+n.size-r)},e.overlap=function(t,n){var r=e.intersectionSize(t,n);return r===0?0:r/Math.min(t.size,n.size)}})),require_stack=__commonJSMin(((e,t)=>{var r=require_iterator(),a=require_foreach();function o(){this.clear()}o.prototype.clear=function(){this.items=[],this.size=0},o.prototype.push=function(e){return this.items.push(e),++this.size},o.prototype.pop=function(){if(this.size!==0)return this.size--,this.items.pop()},o.prototype.peek=function(){return this.items[this.size-1]},o.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0,r=this.items.length;n<r;n++)e.call(t,this.items[r-n-1],n,this)},o.prototype.toArray=function(){for(var e=Array(this.size),t=this.size-1,n=this.size;n--;)e[n]=this.items[t-n];return e},o.prototype.values=function(){var e=this.items,t=e.length,n=0;return new r(function(){if(n>=t)return{done:!0};var r=e[t-n-1];return n++,{value:r,done:!1}})},o.prototype.entries=function(){var e=this.items,t=e.length,n=0;return new r(function(){if(n>=t)return{done:!0};var r=e[t-n-1];return{value:[n++,r],done:!1}})},typeof Symbol<`u`&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.toString=function(){return this.toArray().join(`,`)},o.prototype.toJSON=function(){return this.toArray()},o.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,`constructor`,{value:o,enumerable:!1}),e},typeof Symbol<`u`&&(o.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=o.prototype.inspect),o.from=function(e){var t=new o;return a(e,function(e){t.push(e)}),t},o.of=function(){return o.from(arguments)},t.exports=o})),import_default_map=__toESM(require_default_map(),1),import_default_weak_map=__toESM(require_default_weak_map(),1),import_linked_list=__toESM(require_linked_list(),1),import_multi_map=__toESM(require_multi_map(),1),import_queue=__toESM(require_queue(),1),import_lru_map=__toESM(require_lru_map(),1),import_set=require_set(),import_stack=__toESM(require_stack(),1);export{import_multi_map as a,import_stack as c,import_lru_map as i,import_default_weak_map as n,import_queue as o,import_linked_list as r,import_set as s,import_default_map as t};