stack-typed 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +552 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/esm/index.mjs +548 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/types/data-structures/base/index.d.ts +2 -1
- package/dist/types/data-structures/binary-tree/avl-tree-counter.d.ts +182 -2
- package/dist/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +135 -2
- package/dist/types/data-structures/binary-tree/avl-tree.d.ts +291 -2
- package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +174 -1
- package/dist/types/data-structures/binary-tree/binary-tree.d.ts +754 -29
- package/dist/types/data-structures/binary-tree/bst.d.ts +413 -12
- package/dist/types/data-structures/binary-tree/index.d.ts +3 -2
- package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +208 -3
- package/dist/types/data-structures/binary-tree/segment-tree.d.ts +160 -1
- package/dist/types/data-structures/binary-tree/tree-counter.d.ts +190 -2
- package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +270 -2
- package/dist/types/data-structures/graph/abstract-graph.d.ts +340 -14
- package/dist/types/data-structures/graph/directed-graph.d.ts +207 -1
- package/dist/types/data-structures/graph/index.d.ts +2 -1
- package/dist/types/data-structures/graph/map-graph.d.ts +78 -1
- package/dist/types/data-structures/graph/undirected-graph.d.ts +188 -1
- package/dist/types/data-structures/hash/hash-map.d.ts +345 -19
- package/dist/types/data-structures/hash/index.d.ts +0 -1
- package/dist/types/data-structures/heap/heap.d.ts +503 -5
- package/dist/types/data-structures/heap/index.d.ts +2 -0
- package/dist/types/data-structures/heap/max-heap.d.ts +32 -1
- package/dist/types/data-structures/heap/min-heap.d.ts +33 -1
- package/dist/types/data-structures/index.d.ts +7 -7
- package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +769 -2
- package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +451 -2
- package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +27 -4
- package/dist/types/data-structures/matrix/index.d.ts +1 -1
- package/dist/types/data-structures/matrix/matrix.d.ts +168 -7
- package/dist/types/data-structures/matrix/navigator.d.ts +54 -13
- package/dist/types/data-structures/priority-queue/max-priority-queue.d.ts +27 -1
- package/dist/types/data-structures/priority-queue/min-priority-queue.d.ts +26 -1
- package/dist/types/data-structures/priority-queue/priority-queue.d.ts +15 -2
- package/dist/types/data-structures/queue/deque.d.ts +431 -4
- package/dist/types/data-structures/queue/queue.d.ts +308 -4
- package/dist/types/data-structures/stack/stack.d.ts +306 -2
- package/dist/types/data-structures/tree/tree.d.ts +62 -1
- package/dist/types/data-structures/trie/trie.d.ts +350 -4
- package/dist/types/index.d.ts +11 -2
- package/dist/{interfaces → types/interfaces}/binary-tree.d.ts +1 -1
- package/dist/types/types/data-structures/base/index.d.ts +1 -0
- package/dist/types/types/data-structures/binary-tree/avl-tree-counter.d.ts +2 -0
- package/dist/types/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +2 -0
- package/dist/types/types/data-structures/binary-tree/avl-tree.d.ts +2 -0
- package/dist/types/types/data-structures/binary-tree/binary-indexed-tree.d.ts +1 -0
- package/dist/types/types/data-structures/binary-tree/binary-tree.d.ts +29 -0
- package/dist/types/types/data-structures/binary-tree/bst.d.ts +12 -0
- package/dist/{data-structures → types/types/data-structures}/binary-tree/index.d.ts +2 -3
- package/dist/types/types/data-structures/binary-tree/red-black-tree.d.ts +3 -0
- package/dist/types/types/data-structures/binary-tree/segment-tree.d.ts +1 -0
- package/dist/types/types/data-structures/binary-tree/tree-counter.d.ts +2 -0
- package/dist/types/types/data-structures/binary-tree/tree-multi-map.d.ts +2 -0
- package/dist/types/types/data-structures/graph/abstract-graph.d.ts +14 -0
- package/dist/types/types/data-structures/graph/directed-graph.d.ts +1 -0
- package/dist/{data-structures → types/types/data-structures}/graph/index.d.ts +1 -2
- package/dist/types/types/data-structures/graph/map-graph.d.ts +1 -0
- package/dist/types/types/data-structures/graph/undirected-graph.d.ts +1 -0
- package/dist/types/types/data-structures/hash/hash-map.d.ts +19 -0
- package/dist/types/types/data-structures/hash/index.d.ts +2 -0
- package/dist/types/types/data-structures/heap/heap.d.ts +5 -0
- package/dist/types/types/data-structures/heap/index.d.ts +1 -0
- package/dist/types/types/data-structures/heap/max-heap.d.ts +1 -0
- package/dist/types/types/data-structures/heap/min-heap.d.ts +1 -0
- package/dist/types/types/data-structures/linked-list/doubly-linked-list.d.ts +2 -0
- package/dist/types/types/data-structures/linked-list/singly-linked-list.d.ts +2 -0
- package/dist/types/types/data-structures/linked-list/skip-linked-list.d.ts +4 -0
- package/dist/types/types/data-structures/matrix/matrix.d.ts +7 -0
- package/dist/types/types/data-structures/matrix/navigator.d.ts +14 -0
- package/dist/types/types/data-structures/priority-queue/max-priority-queue.d.ts +1 -0
- package/dist/types/types/data-structures/priority-queue/min-priority-queue.d.ts +1 -0
- package/dist/types/types/data-structures/priority-queue/priority-queue.d.ts +2 -0
- package/dist/types/types/data-structures/queue/deque.d.ts +4 -0
- package/dist/types/types/data-structures/queue/queue.d.ts +4 -0
- package/dist/types/types/data-structures/stack/stack.d.ts +2 -0
- package/dist/types/types/data-structures/tree/tree.d.ts +1 -0
- package/dist/types/types/data-structures/trie/trie.d.ts +4 -0
- package/dist/types/types/index.d.ts +3 -0
- package/dist/types/types/utils/index.d.ts +2 -0
- package/dist/types/types/utils/utils.d.ts +22 -0
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/utils/utils.d.ts +209 -22
- package/dist/umd/stack-typed.js +563 -0
- package/dist/umd/stack-typed.js.map +1 -0
- package/dist/umd/stack-typed.min.js +9 -0
- package/dist/umd/stack-typed.min.js.map +1 -0
- package/package.json +25 -5
- package/src/data-structures/binary-tree/avl-tree-counter.ts +4 -4
- package/src/data-structures/binary-tree/avl-tree-multi-map.ts +1 -1
- package/src/data-structures/binary-tree/avl-tree.ts +2 -2
- package/src/data-structures/binary-tree/binary-tree.ts +4 -4
- package/src/data-structures/binary-tree/bst.ts +1 -1
- package/src/data-structures/binary-tree/red-black-tree.ts +2 -2
- package/src/data-structures/binary-tree/tree-counter.ts +4 -4
- package/src/data-structures/binary-tree/tree-multi-map.ts +1 -1
- package/src/data-structures/heap/heap.ts +5 -5
- package/src/data-structures/linked-list/singly-linked-list.ts +2 -2
- package/src/interfaces/binary-tree.ts +1 -1
- package/tsconfig.base.json +23 -0
- package/tsconfig.json +8 -34
- package/tsconfig.test.json +8 -0
- package/tsconfig.types.json +15 -0
- package/tsup.config.js +28 -0
- package/tsup.node.config.js +37 -0
- package/dist/common/index.js +0 -28
- package/dist/constants/index.js +0 -8
- package/dist/data-structures/base/index.d.ts +0 -2
- package/dist/data-structures/base/index.js +0 -18
- package/dist/data-structures/base/iterable-element-base.js +0 -243
- package/dist/data-structures/base/iterable-entry-base.js +0 -183
- package/dist/data-structures/base/linear-base.js +0 -415
- package/dist/data-structures/binary-tree/avl-tree-counter.d.ts +0 -182
- package/dist/data-structures/binary-tree/avl-tree-counter.js +0 -374
- package/dist/data-structures/binary-tree/avl-tree-multi-map.d.ts +0 -135
- package/dist/data-structures/binary-tree/avl-tree-multi-map.js +0 -250
- package/dist/data-structures/binary-tree/avl-tree.d.ts +0 -291
- package/dist/data-structures/binary-tree/avl-tree.js +0 -611
- package/dist/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -174
- package/dist/data-structures/binary-tree/binary-indexed-tree.js +0 -294
- package/dist/data-structures/binary-tree/binary-tree.d.ts +0 -754
- package/dist/data-structures/binary-tree/binary-tree.js +0 -1925
- package/dist/data-structures/binary-tree/bst.d.ts +0 -413
- package/dist/data-structures/binary-tree/bst.js +0 -903
- package/dist/data-structures/binary-tree/index.js +0 -26
- package/dist/data-structures/binary-tree/red-black-tree.d.ts +0 -208
- package/dist/data-structures/binary-tree/red-black-tree.js +0 -546
- package/dist/data-structures/binary-tree/segment-tree.d.ts +0 -160
- package/dist/data-structures/binary-tree/segment-tree.js +0 -297
- package/dist/data-structures/binary-tree/tree-counter.d.ts +0 -190
- package/dist/data-structures/binary-tree/tree-counter.js +0 -413
- package/dist/data-structures/binary-tree/tree-multi-map.d.ts +0 -270
- package/dist/data-structures/binary-tree/tree-multi-map.js +0 -384
- package/dist/data-structures/graph/abstract-graph.d.ts +0 -340
- package/dist/data-structures/graph/abstract-graph.js +0 -896
- package/dist/data-structures/graph/directed-graph.d.ts +0 -207
- package/dist/data-structures/graph/directed-graph.js +0 -525
- package/dist/data-structures/graph/index.js +0 -20
- package/dist/data-structures/graph/map-graph.d.ts +0 -78
- package/dist/data-structures/graph/map-graph.js +0 -107
- package/dist/data-structures/graph/undirected-graph.d.ts +0 -188
- package/dist/data-structures/graph/undirected-graph.js +0 -424
- package/dist/data-structures/hash/hash-map.d.ts +0 -345
- package/dist/data-structures/hash/hash-map.js +0 -692
- package/dist/data-structures/hash/index.d.ts +0 -1
- package/dist/data-structures/hash/index.js +0 -17
- package/dist/data-structures/heap/heap.d.ts +0 -503
- package/dist/data-structures/heap/heap.js +0 -901
- package/dist/data-structures/heap/index.d.ts +0 -3
- package/dist/data-structures/heap/index.js +0 -19
- package/dist/data-structures/heap/max-heap.d.ts +0 -32
- package/dist/data-structures/heap/max-heap.js +0 -40
- package/dist/data-structures/heap/min-heap.d.ts +0 -33
- package/dist/data-structures/heap/min-heap.js +0 -31
- package/dist/data-structures/index.js +0 -28
- package/dist/data-structures/linked-list/doubly-linked-list.d.ts +0 -769
- package/dist/data-structures/linked-list/doubly-linked-list.js +0 -1111
- package/dist/data-structures/linked-list/index.js +0 -19
- package/dist/data-structures/linked-list/singly-linked-list.d.ts +0 -451
- package/dist/data-structures/linked-list/singly-linked-list.js +0 -850
- package/dist/data-structures/linked-list/skip-linked-list.d.ts +0 -27
- package/dist/data-structures/linked-list/skip-linked-list.js +0 -144
- package/dist/data-structures/matrix/index.js +0 -18
- package/dist/data-structures/matrix/matrix.d.ts +0 -168
- package/dist/data-structures/matrix/matrix.js +0 -448
- package/dist/data-structures/matrix/navigator.d.ts +0 -55
- package/dist/data-structures/matrix/navigator.js +0 -111
- package/dist/data-structures/priority-queue/index.js +0 -19
- package/dist/data-structures/priority-queue/max-priority-queue.d.ts +0 -27
- package/dist/data-structures/priority-queue/max-priority-queue.js +0 -34
- package/dist/data-structures/priority-queue/min-priority-queue.d.ts +0 -26
- package/dist/data-structures/priority-queue/min-priority-queue.js +0 -24
- package/dist/data-structures/priority-queue/priority-queue.d.ts +0 -15
- package/dist/data-structures/priority-queue/priority-queue.js +0 -20
- package/dist/data-structures/queue/deque.d.ts +0 -431
- package/dist/data-structures/queue/deque.js +0 -879
- package/dist/data-structures/queue/index.js +0 -18
- package/dist/data-structures/queue/queue.d.ts +0 -308
- package/dist/data-structures/queue/queue.js +0 -473
- package/dist/data-structures/stack/index.js +0 -17
- package/dist/data-structures/stack/stack.d.ts +0 -306
- package/dist/data-structures/stack/stack.js +0 -401
- package/dist/data-structures/tree/index.js +0 -17
- package/dist/data-structures/tree/tree.d.ts +0 -62
- package/dist/data-structures/tree/tree.js +0 -107
- package/dist/data-structures/trie/index.js +0 -17
- package/dist/data-structures/trie/trie.d.ts +0 -350
- package/dist/data-structures/trie/trie.js +0 -610
- package/dist/index.d.ts +0 -12
- package/dist/index.js +0 -28
- package/dist/interfaces/binary-tree.js +0 -2
- package/dist/interfaces/doubly-linked-list.js +0 -2
- package/dist/interfaces/graph.js +0 -2
- package/dist/interfaces/heap.js +0 -2
- package/dist/interfaces/index.js +0 -24
- package/dist/interfaces/navigator.js +0 -2
- package/dist/interfaces/priority-queue.js +0 -2
- package/dist/interfaces/segment-tree.js +0 -2
- package/dist/interfaces/singly-linked-list.js +0 -2
- package/dist/types/common.js +0 -2
- package/dist/types/data-structures/base/base.js +0 -2
- package/dist/types/data-structures/base/index.js +0 -17
- package/dist/types/data-structures/binary-tree/avl-tree-counter.js +0 -2
- package/dist/types/data-structures/binary-tree/avl-tree-multi-map.js +0 -2
- package/dist/types/data-structures/binary-tree/avl-tree.js +0 -2
- package/dist/types/data-structures/binary-tree/binary-indexed-tree.js +0 -2
- package/dist/types/data-structures/binary-tree/binary-tree.js +0 -2
- package/dist/types/data-structures/binary-tree/bst.js +0 -2
- package/dist/types/data-structures/binary-tree/index.js +0 -25
- package/dist/types/data-structures/binary-tree/red-black-tree.js +0 -2
- package/dist/types/data-structures/binary-tree/segment-tree.js +0 -2
- package/dist/types/data-structures/binary-tree/tree-counter.js +0 -2
- package/dist/types/data-structures/binary-tree/tree-multi-map.js +0 -2
- package/dist/types/data-structures/graph/abstract-graph.js +0 -2
- package/dist/types/data-structures/graph/directed-graph.js +0 -2
- package/dist/types/data-structures/graph/index.js +0 -19
- package/dist/types/data-structures/graph/map-graph.js +0 -2
- package/dist/types/data-structures/graph/undirected-graph.js +0 -2
- package/dist/types/data-structures/hash/hash-map.js +0 -2
- package/dist/types/data-structures/hash/index.js +0 -17
- package/dist/types/data-structures/heap/heap.js +0 -2
- package/dist/types/data-structures/heap/index.js +0 -17
- package/dist/types/data-structures/heap/max-heap.js +0 -2
- package/dist/types/data-structures/heap/min-heap.js +0 -2
- package/dist/types/data-structures/index.js +0 -28
- package/dist/types/data-structures/linked-list/doubly-linked-list.js +0 -2
- package/dist/types/data-structures/linked-list/index.js +0 -19
- package/dist/types/data-structures/linked-list/singly-linked-list.js +0 -2
- package/dist/types/data-structures/linked-list/skip-linked-list.js +0 -2
- package/dist/types/data-structures/matrix/index.js +0 -18
- package/dist/types/data-structures/matrix/matrix.js +0 -2
- package/dist/types/data-structures/matrix/navigator.js +0 -2
- package/dist/types/data-structures/priority-queue/index.js +0 -19
- package/dist/types/data-structures/priority-queue/max-priority-queue.js +0 -2
- package/dist/types/data-structures/priority-queue/min-priority-queue.js +0 -2
- package/dist/types/data-structures/priority-queue/priority-queue.js +0 -2
- package/dist/types/data-structures/queue/deque.js +0 -2
- package/dist/types/data-structures/queue/index.js +0 -18
- package/dist/types/data-structures/queue/queue.js +0 -2
- package/dist/types/data-structures/stack/index.js +0 -17
- package/dist/types/data-structures/stack/stack.js +0 -2
- package/dist/types/data-structures/tree/index.js +0 -17
- package/dist/types/data-structures/tree/tree.js +0 -2
- package/dist/types/data-structures/trie/index.js +0 -17
- package/dist/types/data-structures/trie/trie.js +0 -2
- package/dist/types/index.js +0 -19
- package/dist/types/utils/index.js +0 -18
- package/dist/types/utils/utils.js +0 -2
- package/dist/types/utils/validate-type.js +0 -2
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.js +0 -18
- package/dist/utils/number.js +0 -24
- package/dist/utils/utils.d.ts +0 -209
- package/dist/utils/utils.js +0 -353
- package/dist/{common → types/common}/index.d.ts +0 -0
- package/dist/{constants → types/constants}/index.d.ts +0 -0
- package/dist/{data-structures → types/data-structures}/base/iterable-element-base.d.ts +0 -0
- package/dist/{data-structures → types/data-structures}/base/iterable-entry-base.d.ts +0 -0
- package/dist/{data-structures → types/data-structures}/base/linear-base.d.ts +0 -0
- package/dist/{interfaces → types/interfaces}/doubly-linked-list.d.ts +0 -0
- package/dist/{interfaces → types/interfaces}/graph.d.ts +0 -0
- package/dist/{interfaces → types/interfaces}/heap.d.ts +0 -0
- package/dist/{interfaces → types/interfaces}/index.d.ts +0 -0
- package/dist/{interfaces → types/interfaces}/navigator.d.ts +0 -0
- package/dist/{interfaces → types/interfaces}/priority-queue.d.ts +0 -0
- package/dist/{interfaces → types/interfaces}/segment-tree.d.ts +0 -0
- package/dist/{interfaces → types/interfaces}/singly-linked-list.d.ts +0 -0
- package/dist/types/{common.d.ts → types/common.d.ts} +0 -0
- package/dist/types/{data-structures → types/data-structures}/base/base.d.ts +0 -0
- package/dist/{data-structures → types/types/data-structures}/index.d.ts +7 -7
- package/dist/{data-structures → types/types/data-structures}/linked-list/index.d.ts +0 -0
- package/dist/{data-structures → types/types/data-structures}/matrix/index.d.ts +1 -1
- /package/dist/{data-structures → types/types/data-structures}/priority-queue/index.d.ts +0 -0
- /package/dist/{data-structures → types/types/data-structures}/queue/index.d.ts +0 -0
- /package/dist/{data-structures → types/types/data-structures}/stack/index.d.ts +0 -0
- /package/dist/{data-structures → types/types/data-structures}/tree/index.d.ts +0 -0
- /package/dist/{data-structures → types/types/data-structures}/trie/index.d.ts +0 -0
- /package/dist/types/{utils → types/utils}/validate-type.d.ts +0 -0
- /package/dist/{utils → types/utils}/number.d.ts +0 -0
|
@@ -0,0 +1,563 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var stackTyped = (() => {
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
|
+
|
|
23
|
+
// src/index.ts
|
|
24
|
+
var src_exports = {};
|
|
25
|
+
__export(src_exports, {
|
|
26
|
+
DFSOperation: () => DFSOperation,
|
|
27
|
+
Range: () => Range,
|
|
28
|
+
Stack: () => Stack
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
// src/data-structures/base/iterable-element-base.ts
|
|
32
|
+
var IterableElementBase = class {
|
|
33
|
+
/**
|
|
34
|
+
* Create a new iterable base.
|
|
35
|
+
*
|
|
36
|
+
* @param options Optional behavior overrides. When provided, a `toElementFn`
|
|
37
|
+
* is used to convert a raw element (`R`) into a public element (`E`).
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* Time O(1), Space O(1).
|
|
41
|
+
*/
|
|
42
|
+
constructor(options) {
|
|
43
|
+
/**
|
|
44
|
+
* The converter used to transform a raw element (`R`) into a public element (`E`).
|
|
45
|
+
*
|
|
46
|
+
* @remarks
|
|
47
|
+
* Time O(1), Space O(1).
|
|
48
|
+
*/
|
|
49
|
+
__publicField(this, "_toElementFn");
|
|
50
|
+
if (options) {
|
|
51
|
+
const { toElementFn } = options;
|
|
52
|
+
if (typeof toElementFn === "function") this._toElementFn = toElementFn;
|
|
53
|
+
else if (toElementFn) throw new TypeError("toElementFn must be a function type");
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Exposes the current `toElementFn`, if configured.
|
|
58
|
+
*
|
|
59
|
+
* @returns The converter function or `undefined` when not set.
|
|
60
|
+
* @remarks
|
|
61
|
+
* Time O(1), Space O(1).
|
|
62
|
+
*/
|
|
63
|
+
get toElementFn() {
|
|
64
|
+
return this._toElementFn;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Returns an iterator over the structure's elements.
|
|
68
|
+
*
|
|
69
|
+
* @param args Optional iterator arguments forwarded to the internal iterator.
|
|
70
|
+
* @returns An `IterableIterator<E>` that yields the elements in traversal order.
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* Producing the iterator is O(1); consuming the entire iterator is Time O(n) with O(1) extra space.
|
|
74
|
+
*/
|
|
75
|
+
*[Symbol.iterator](...args) {
|
|
76
|
+
yield* this._getIterator(...args);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Returns an iterator over the values (alias of the default iterator).
|
|
80
|
+
*
|
|
81
|
+
* @returns An `IterableIterator<E>` over all elements.
|
|
82
|
+
* @remarks
|
|
83
|
+
* Creating the iterator is O(1); full iteration is Time O(n), Space O(1).
|
|
84
|
+
*/
|
|
85
|
+
*values() {
|
|
86
|
+
for (const item of this) yield item;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Tests whether all elements satisfy the predicate.
|
|
90
|
+
*
|
|
91
|
+
* @template TReturn
|
|
92
|
+
* @param predicate Function invoked for each element with signature `(value, index, self)`.
|
|
93
|
+
* @param thisArg Optional `this` binding for the predicate.
|
|
94
|
+
* @returns `true` if every element passes; otherwise `false`.
|
|
95
|
+
*
|
|
96
|
+
* @remarks
|
|
97
|
+
* Time O(n) in the worst case; may exit early when the first failure is found. Space O(1).
|
|
98
|
+
*/
|
|
99
|
+
every(predicate, thisArg) {
|
|
100
|
+
let index = 0;
|
|
101
|
+
for (const item of this) {
|
|
102
|
+
if (thisArg === void 0) {
|
|
103
|
+
if (!predicate(item, index++, this)) return false;
|
|
104
|
+
} else {
|
|
105
|
+
const fn = predicate;
|
|
106
|
+
if (!fn.call(thisArg, item, index++, this)) return false;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Tests whether at least one element satisfies the predicate.
|
|
113
|
+
*
|
|
114
|
+
* @param predicate Function invoked for each element with signature `(value, index, self)`.
|
|
115
|
+
* @param thisArg Optional `this` binding for the predicate.
|
|
116
|
+
* @returns `true` if any element passes; otherwise `false`.
|
|
117
|
+
*
|
|
118
|
+
* @remarks
|
|
119
|
+
* Time O(n) in the worst case; may exit early on first success. Space O(1).
|
|
120
|
+
*/
|
|
121
|
+
some(predicate, thisArg) {
|
|
122
|
+
let index = 0;
|
|
123
|
+
for (const item of this) {
|
|
124
|
+
if (thisArg === void 0) {
|
|
125
|
+
if (predicate(item, index++, this)) return true;
|
|
126
|
+
} else {
|
|
127
|
+
const fn = predicate;
|
|
128
|
+
if (fn.call(thisArg, item, index++, this)) return true;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Invokes a callback for each element in iteration order.
|
|
135
|
+
*
|
|
136
|
+
* @param callbackfn Function invoked per element with signature `(value, index, self)`.
|
|
137
|
+
* @param thisArg Optional `this` binding for the callback.
|
|
138
|
+
* @returns `void`.
|
|
139
|
+
*
|
|
140
|
+
* @remarks
|
|
141
|
+
* Time O(n), Space O(1).
|
|
142
|
+
*/
|
|
143
|
+
forEach(callbackfn, thisArg) {
|
|
144
|
+
let index = 0;
|
|
145
|
+
for (const item of this) {
|
|
146
|
+
if (thisArg === void 0) {
|
|
147
|
+
callbackfn(item, index++, this);
|
|
148
|
+
} else {
|
|
149
|
+
const fn = callbackfn;
|
|
150
|
+
fn.call(thisArg, item, index++, this);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
// Implementation signature
|
|
155
|
+
find(predicate, thisArg) {
|
|
156
|
+
let index = 0;
|
|
157
|
+
for (const item of this) {
|
|
158
|
+
if (thisArg === void 0) {
|
|
159
|
+
if (predicate(item, index++, this)) return item;
|
|
160
|
+
} else {
|
|
161
|
+
const fn = predicate;
|
|
162
|
+
if (fn.call(thisArg, item, index++, this)) return item;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Checks whether a strictly-equal element exists in the structure.
|
|
169
|
+
*
|
|
170
|
+
* @param element The element to test with `===` equality.
|
|
171
|
+
* @returns `true` if an equal element is found; otherwise `false`.
|
|
172
|
+
*
|
|
173
|
+
* @remarks
|
|
174
|
+
* Time O(n) in the worst case. Space O(1).
|
|
175
|
+
*/
|
|
176
|
+
has(element) {
|
|
177
|
+
for (const ele of this) if (ele === element) return true;
|
|
178
|
+
return false;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Reduces all elements to a single accumulated value.
|
|
182
|
+
*
|
|
183
|
+
* @overload
|
|
184
|
+
* @param callbackfn Reducer of signature `(acc, value, index, self) => nextAcc`. The first element is used as the initial accumulator.
|
|
185
|
+
* @returns The final accumulated value typed as `E`.
|
|
186
|
+
*
|
|
187
|
+
* @overload
|
|
188
|
+
* @param callbackfn Reducer of signature `(acc, value, index, self) => nextAcc`.
|
|
189
|
+
* @param initialValue The initial accumulator value of type `E`.
|
|
190
|
+
* @returns The final accumulated value typed as `E`.
|
|
191
|
+
*
|
|
192
|
+
* @overload
|
|
193
|
+
* @template U The accumulator type when it differs from `E`.
|
|
194
|
+
* @param callbackfn Reducer of signature `(acc: U, value, index, self) => U`.
|
|
195
|
+
* @param initialValue The initial accumulator value of type `U`.
|
|
196
|
+
* @returns The final accumulated value typed as `U`.
|
|
197
|
+
*
|
|
198
|
+
* @remarks
|
|
199
|
+
* Time O(n), Space O(1). Throws if called on an empty structure without `initialValue`.
|
|
200
|
+
*/
|
|
201
|
+
reduce(callbackfn, initialValue) {
|
|
202
|
+
let index = 0;
|
|
203
|
+
const iter = this[Symbol.iterator]();
|
|
204
|
+
let acc;
|
|
205
|
+
if (arguments.length >= 2) {
|
|
206
|
+
acc = initialValue;
|
|
207
|
+
} else {
|
|
208
|
+
const first = iter.next();
|
|
209
|
+
if (first.done) throw new TypeError("Reduce of empty structure with no initial value");
|
|
210
|
+
acc = first.value;
|
|
211
|
+
index = 1;
|
|
212
|
+
}
|
|
213
|
+
for (const value of iter) {
|
|
214
|
+
acc = callbackfn(acc, value, index++, this);
|
|
215
|
+
}
|
|
216
|
+
return acc;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Materializes the elements into a new array.
|
|
220
|
+
*
|
|
221
|
+
* @returns A shallow array copy of the iteration order.
|
|
222
|
+
* @remarks
|
|
223
|
+
* Time O(n), Space O(n).
|
|
224
|
+
*/
|
|
225
|
+
toArray() {
|
|
226
|
+
return [...this];
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Returns a representation of the structure suitable for quick visualization.
|
|
230
|
+
* Defaults to an array of elements; subclasses may override to provide richer visuals.
|
|
231
|
+
*
|
|
232
|
+
* @returns A visual representation (array by default).
|
|
233
|
+
* @remarks
|
|
234
|
+
* Time O(n), Space O(n).
|
|
235
|
+
*/
|
|
236
|
+
toVisual() {
|
|
237
|
+
return [...this];
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Prints `toVisual()` to the console. Intended for quick debugging.
|
|
241
|
+
*
|
|
242
|
+
* @returns `void`.
|
|
243
|
+
* @remarks
|
|
244
|
+
* Time O(n) due to materialization, Space O(n) for the intermediate representation.
|
|
245
|
+
*/
|
|
246
|
+
print() {
|
|
247
|
+
console.log(this.toVisual());
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
// src/data-structures/stack/stack.ts
|
|
252
|
+
var Stack = class extends IterableElementBase {
|
|
253
|
+
/**
|
|
254
|
+
* Create a Stack and optionally bulk-push elements.
|
|
255
|
+
* @remarks Time O(N), Space O(N)
|
|
256
|
+
* @param [elements] - Iterable of elements (or raw records if toElementFn is set).
|
|
257
|
+
* @param [options] - Options such as toElementFn and equality function.
|
|
258
|
+
* @returns New Stack instance.
|
|
259
|
+
*/
|
|
260
|
+
constructor(elements = [], options) {
|
|
261
|
+
super(options);
|
|
262
|
+
__publicField(this, "_equals", Object.is);
|
|
263
|
+
__publicField(this, "_elements", []);
|
|
264
|
+
this.pushMany(elements);
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Get the backing array of elements.
|
|
268
|
+
* @remarks Time O(1), Space O(1)
|
|
269
|
+
* @returns Internal elements array.
|
|
270
|
+
*/
|
|
271
|
+
get elements() {
|
|
272
|
+
return this._elements;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Get the number of stored elements.
|
|
276
|
+
* @remarks Time O(1), Space O(1)
|
|
277
|
+
* @returns Current size.
|
|
278
|
+
*/
|
|
279
|
+
get size() {
|
|
280
|
+
return this.elements.length;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Create a stack from an array of elements.
|
|
284
|
+
* @remarks Time O(N), Space O(N)
|
|
285
|
+
* @template E
|
|
286
|
+
* @template R
|
|
287
|
+
* @param this - The constructor (subclass) to instantiate.
|
|
288
|
+
* @param elements - Array of elements to push in order.
|
|
289
|
+
* @param [options] - Options forwarded to the constructor.
|
|
290
|
+
* @returns A new Stack populated from the array.
|
|
291
|
+
*/
|
|
292
|
+
static fromArray(elements, options) {
|
|
293
|
+
return new this(elements, options);
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Check whether the stack is empty.
|
|
297
|
+
* @remarks Time O(1), Space O(1)
|
|
298
|
+
* @returns True if size is 0.
|
|
299
|
+
*/
|
|
300
|
+
isEmpty() {
|
|
301
|
+
return this.elements.length === 0;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Get the top element without removing it.
|
|
305
|
+
* @remarks Time O(1), Space O(1)
|
|
306
|
+
* @returns Top element or undefined.
|
|
307
|
+
*/
|
|
308
|
+
peek() {
|
|
309
|
+
return this.isEmpty() ? void 0 : this.elements[this.elements.length - 1];
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Push one element onto the top.
|
|
313
|
+
* @remarks Time O(1), Space O(1)
|
|
314
|
+
* @param element - Element to push.
|
|
315
|
+
* @returns True when pushed.
|
|
316
|
+
*/
|
|
317
|
+
push(element) {
|
|
318
|
+
this.elements.push(element);
|
|
319
|
+
return true;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Pop and return the top element.
|
|
323
|
+
* @remarks Time O(1), Space O(1)
|
|
324
|
+
* @returns Removed element or undefined.
|
|
325
|
+
*/
|
|
326
|
+
pop() {
|
|
327
|
+
return this.isEmpty() ? void 0 : this.elements.pop();
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Push many elements from an iterable.
|
|
331
|
+
* @remarks Time O(N), Space O(1)
|
|
332
|
+
* @param elements - Iterable of elements (or raw records if toElementFn is set).
|
|
333
|
+
* @returns Array of per-element success flags.
|
|
334
|
+
*/
|
|
335
|
+
pushMany(elements) {
|
|
336
|
+
const ans = [];
|
|
337
|
+
for (const el of elements) {
|
|
338
|
+
if (this.toElementFn) ans.push(this.push(this.toElementFn(el)));
|
|
339
|
+
else ans.push(this.push(el));
|
|
340
|
+
}
|
|
341
|
+
return ans;
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Delete the first occurrence of a specific element.
|
|
345
|
+
* @remarks Time O(N), Space O(1)
|
|
346
|
+
* @param element - Element to remove (using the configured equality).
|
|
347
|
+
* @returns True if an element was removed.
|
|
348
|
+
*/
|
|
349
|
+
delete(element) {
|
|
350
|
+
const idx = this._indexOfByEquals(element);
|
|
351
|
+
return this.deleteAt(idx);
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Delete the element at an index.
|
|
355
|
+
* @remarks Time O(N), Space O(1)
|
|
356
|
+
* @param index - Zero-based index from the bottom.
|
|
357
|
+
* @returns True if removed.
|
|
358
|
+
*/
|
|
359
|
+
deleteAt(index) {
|
|
360
|
+
if (index < 0 || index >= this.elements.length) return false;
|
|
361
|
+
const spliced = this.elements.splice(index, 1);
|
|
362
|
+
return spliced.length === 1;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Delete the first element that satisfies a predicate.
|
|
366
|
+
* @remarks Time O(N), Space O(1)
|
|
367
|
+
* @param predicate - Function (value, index, stack) → boolean to decide deletion.
|
|
368
|
+
* @returns True if a match was removed.
|
|
369
|
+
*/
|
|
370
|
+
deleteWhere(predicate) {
|
|
371
|
+
for (let i = 0; i < this.elements.length; i++) {
|
|
372
|
+
if (predicate(this.elements[i], i, this)) {
|
|
373
|
+
this.elements.splice(i, 1);
|
|
374
|
+
return true;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
return false;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Remove all elements and reset storage.
|
|
381
|
+
* @remarks Time O(1), Space O(1)
|
|
382
|
+
* @returns void
|
|
383
|
+
*/
|
|
384
|
+
clear() {
|
|
385
|
+
this._elements = [];
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Deep clone this stack.
|
|
389
|
+
* @remarks Time O(N), Space O(N)
|
|
390
|
+
* @returns A new stack with the same content.
|
|
391
|
+
*/
|
|
392
|
+
clone() {
|
|
393
|
+
const out = this._createInstance({ toElementFn: this.toElementFn });
|
|
394
|
+
for (const v of this) out.push(v);
|
|
395
|
+
return out;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Filter elements into a new stack of the same class.
|
|
399
|
+
* @remarks Time O(N), Space O(N)
|
|
400
|
+
* @param predicate - Predicate (value, index, stack) → boolean to keep value.
|
|
401
|
+
* @param [thisArg] - Value for `this` inside the predicate.
|
|
402
|
+
* @returns A new stack with kept values.
|
|
403
|
+
*/
|
|
404
|
+
filter(predicate, thisArg) {
|
|
405
|
+
const out = this._createInstance({ toElementFn: this.toElementFn });
|
|
406
|
+
let index = 0;
|
|
407
|
+
for (const v of this) {
|
|
408
|
+
if (predicate.call(thisArg, v, index, this)) out.push(v);
|
|
409
|
+
index++;
|
|
410
|
+
}
|
|
411
|
+
return out;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Map values into a new stack of the same element type.
|
|
415
|
+
* @remarks Time O(N), Space O(N)
|
|
416
|
+
* @param callback - Mapping function (value, index, stack) → newValue.
|
|
417
|
+
* @param [thisArg] - Value for `this` inside the callback.
|
|
418
|
+
* @returns A new stack with mapped values.
|
|
419
|
+
*/
|
|
420
|
+
mapSame(callback, thisArg) {
|
|
421
|
+
const out = this._createInstance({ toElementFn: this.toElementFn });
|
|
422
|
+
let index = 0;
|
|
423
|
+
for (const v of this) {
|
|
424
|
+
const mv = thisArg === void 0 ? callback(v, index++, this) : callback.call(thisArg, v, index++, this);
|
|
425
|
+
out.push(mv);
|
|
426
|
+
}
|
|
427
|
+
return out;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Map values into a new stack (possibly different element type).
|
|
431
|
+
* @remarks Time O(N), Space O(N)
|
|
432
|
+
* @template EM
|
|
433
|
+
* @template RM
|
|
434
|
+
* @param callback - Mapping function (value, index, stack) → newElement.
|
|
435
|
+
* @param [options] - Options for the output stack (e.g., toElementFn).
|
|
436
|
+
* @param [thisArg] - Value for `this` inside the callback.
|
|
437
|
+
* @returns A new Stack with mapped elements.
|
|
438
|
+
*/
|
|
439
|
+
map(callback, options, thisArg) {
|
|
440
|
+
const out = this._createLike([], { ...options != null ? options : {} });
|
|
441
|
+
let index = 0;
|
|
442
|
+
for (const v of this) {
|
|
443
|
+
out.push(thisArg === void 0 ? callback(v, index, this) : callback.call(thisArg, v, index, this));
|
|
444
|
+
index++;
|
|
445
|
+
}
|
|
446
|
+
return out;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Set the equality comparator used by delete/search operations.
|
|
450
|
+
* @remarks Time O(1), Space O(1)
|
|
451
|
+
* @param equals - Equality predicate (a, b) → boolean.
|
|
452
|
+
* @returns This stack.
|
|
453
|
+
*/
|
|
454
|
+
setEquality(equals) {
|
|
455
|
+
this._equals = equals;
|
|
456
|
+
return this;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* (Protected) Find the index of a target element using the equality function.
|
|
460
|
+
* @remarks Time O(N), Space O(1)
|
|
461
|
+
* @param target - Element to search for.
|
|
462
|
+
* @returns Index or -1 if not found.
|
|
463
|
+
*/
|
|
464
|
+
_indexOfByEquals(target) {
|
|
465
|
+
for (let i = 0; i < this.elements.length; i++) if (this._equals(this.elements[i], target)) return i;
|
|
466
|
+
return -1;
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* (Protected) Create an empty instance of the same concrete class.
|
|
470
|
+
* @remarks Time O(1), Space O(1)
|
|
471
|
+
* @param [options] - Options forwarded to the constructor.
|
|
472
|
+
* @returns An empty like-kind stack instance.
|
|
473
|
+
*/
|
|
474
|
+
_createInstance(options) {
|
|
475
|
+
const Ctor = this.constructor;
|
|
476
|
+
return new Ctor([], options);
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* (Protected) Create a like-kind stack and seed it from an iterable.
|
|
480
|
+
* @remarks Time O(N), Space O(N)
|
|
481
|
+
* @template T
|
|
482
|
+
* @template RR
|
|
483
|
+
* @param [elements] - Iterable used to seed the new stack.
|
|
484
|
+
* @param [options] - Options forwarded to the constructor.
|
|
485
|
+
* @returns A like-kind Stack instance.
|
|
486
|
+
*/
|
|
487
|
+
_createLike(elements = [], options) {
|
|
488
|
+
const Ctor = this.constructor;
|
|
489
|
+
return new Ctor(elements, options);
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
* (Protected) Iterate elements from bottom to top.
|
|
493
|
+
* @remarks Time O(N), Space O(1)
|
|
494
|
+
* @returns Iterator of elements.
|
|
495
|
+
*/
|
|
496
|
+
*_getIterator() {
|
|
497
|
+
for (let i = 0; i < this.elements.length; i++) yield this.elements[i];
|
|
498
|
+
}
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
// src/utils/utils.ts
|
|
502
|
+
function isPrimitiveComparable(value) {
|
|
503
|
+
const valueType = typeof value;
|
|
504
|
+
if (valueType === "number") return true;
|
|
505
|
+
return valueType === "bigint" || valueType === "string" || valueType === "boolean";
|
|
506
|
+
}
|
|
507
|
+
function tryObjectToPrimitive(obj) {
|
|
508
|
+
if (typeof obj.valueOf === "function") {
|
|
509
|
+
const valueOfResult = obj.valueOf();
|
|
510
|
+
if (valueOfResult !== obj) {
|
|
511
|
+
if (isPrimitiveComparable(valueOfResult)) return valueOfResult;
|
|
512
|
+
if (typeof valueOfResult === "object" && valueOfResult !== null) return tryObjectToPrimitive(valueOfResult);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
if (typeof obj.toString === "function") {
|
|
516
|
+
const stringResult = obj.toString();
|
|
517
|
+
if (stringResult !== "[object Object]") return stringResult;
|
|
518
|
+
}
|
|
519
|
+
return null;
|
|
520
|
+
}
|
|
521
|
+
function isComparable(value, isForceObjectComparable = false) {
|
|
522
|
+
if (value === null || value === void 0) return false;
|
|
523
|
+
if (isPrimitiveComparable(value)) return true;
|
|
524
|
+
if (typeof value !== "object") return false;
|
|
525
|
+
if (value instanceof Date) return true;
|
|
526
|
+
if (isForceObjectComparable) return true;
|
|
527
|
+
const comparableValue = tryObjectToPrimitive(value);
|
|
528
|
+
if (comparableValue === null || comparableValue === void 0) return false;
|
|
529
|
+
return isPrimitiveComparable(comparableValue);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
// src/common/index.ts
|
|
533
|
+
var DFSOperation = /* @__PURE__ */ ((DFSOperation2) => {
|
|
534
|
+
DFSOperation2[DFSOperation2["VISIT"] = 0] = "VISIT";
|
|
535
|
+
DFSOperation2[DFSOperation2["PROCESS"] = 1] = "PROCESS";
|
|
536
|
+
return DFSOperation2;
|
|
537
|
+
})(DFSOperation || {});
|
|
538
|
+
var Range = class {
|
|
539
|
+
constructor(low, high, includeLow = true, includeHigh = true) {
|
|
540
|
+
this.low = low;
|
|
541
|
+
this.high = high;
|
|
542
|
+
this.includeLow = includeLow;
|
|
543
|
+
this.includeHigh = includeHigh;
|
|
544
|
+
if (!(isComparable(low) && isComparable(high))) throw new RangeError("low or high is not comparable");
|
|
545
|
+
if (low > high) throw new RangeError("low must be less than or equal to high");
|
|
546
|
+
}
|
|
547
|
+
// Determine whether a key is within the range
|
|
548
|
+
isInRange(key, comparator) {
|
|
549
|
+
const lowCheck = this.includeLow ? comparator(key, this.low) >= 0 : comparator(key, this.low) > 0;
|
|
550
|
+
const highCheck = this.includeHigh ? comparator(key, this.high) <= 0 : comparator(key, this.high) < 0;
|
|
551
|
+
return lowCheck && highCheck;
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
return __toCommonJS(src_exports);
|
|
555
|
+
})();
|
|
556
|
+
/**
|
|
557
|
+
* data-structure-typed
|
|
558
|
+
*
|
|
559
|
+
* @author Pablo Zeng
|
|
560
|
+
* @copyright Copyright (c) 2022 Pablo Zeng <zrwusa@gmail.com>
|
|
561
|
+
* @license MIT License
|
|
562
|
+
*/
|
|
563
|
+
//# sourceMappingURL=stack-typed.js.map
|