{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["type Comparator = (a: T, b: T) => number;\ntype Predicate = (value: T) => boolean;\n\nclass SplayTreeNode> {\n readonly key: K;\n\n left: Node | null = null;\n right: Node | null = null;\n\n constructor(key: K) {\n this.key = key;\n }\n}\n\nclass SplayTreeSetNode extends SplayTreeNode> {\n constructor(key: K) {\n super(key);\n }\n}\n\nclass SplayTreeMapNode extends SplayTreeNode> {\n readonly value: V;\n\n constructor(key: K, value: V) {\n super(key);\n this.value = value;\n }\n\n replaceValue(value: V) {\n const node = new SplayTreeMapNode(this.key, value);\n node.left = this.left;\n node.right = this.right;\n return node;\n }\n}\n\nabstract class SplayTree> {\n protected abstract root: Node | null;\n\n public size = 0;\n\n protected modificationCount = 0;\n\n protected splayCount = 0;\n\n protected abstract compare: Comparator;\n\n protected abstract validKey: Predicate;\n\n protected splay(key: K) {\n const root = this.root;\n if (root == null) {\n this.compare(key, key);\n return -1;\n }\n\n let right: Node | null = null;\n let newTreeRight: Node | null = null;\n let left: Node | null = null;\n let newTreeLeft: Node | null = null;\n let current = root;\n const compare = this.compare;\n let comp: number;\n while (true) {\n comp = compare(current.key, key);\n if (comp > 0) {\n let currentLeft = current.left;\n if (currentLeft == null) break;\n comp = compare(currentLeft.key, key);\n if (comp > 0) {\n current.left = currentLeft.right;\n currentLeft.right = current;\n current = currentLeft;\n currentLeft = current.left;\n if (currentLeft == null) break;\n }\n if (right == null) {\n newTreeRight = current;\n } else {\n right.left = current;\n }\n right = current;\n current = currentLeft;\n } else if (comp < 0) {\n let currentRight = current.right;\n if (currentRight == null) break;\n comp = compare(currentRight.key, key);\n if (comp < 0) {\n current.right = currentRight.left;\n currentRight.left = current;\n current = currentRight;\n currentRight = current.right;\n if (currentRight == null) break;\n }\n if (left == null) {\n newTreeLeft = current;\n } else {\n left.right = current;\n }\n left = current;\n current = currentRight;\n } else {\n break;\n }\n }\n if (left != null) {\n left.right = current.left;\n current.left = newTreeLeft;\n }\n if (right != null) {\n right.left = current.right;\n current.right = newTreeRight;\n }\n if (this.root !== current) {\n this.root = current;\n this.splayCount++;\n }\n return comp;\n }\n\n protected splayMin(node: Node) {\n let current = node;\n let nextLeft = current.left;\n while (nextLeft != null) {\n const left = nextLeft;\n current.left = left.right;\n left.right = current;\n current = left;\n nextLeft = current.left;\n }\n return current;\n }\n\n protected splayMax(node: Node) {\n let current = node;\n let nextRight = current.right;\n while (nextRight != null) {\n const right = nextRight;\n current.right = right.left;\n right.left = current;\n current = right;\n nextRight = current.right;\n }\n return current;\n }\n\n protected _delete(key: K) {\n if (this.root == null) return null;\n const comp = this.splay(key);\n if (comp != 0) return null;\n let root = this.root;\n const result = root;\n const left = root.left;\n this.size--;\n if (left == null) {\n this.root = root.right;\n } else {\n const right = root.right;\n root = this.splayMax(left);\n\n root.right = right;\n this.root = root;\n }\n this.modificationCount++;\n return result;\n }\n\n protected addNewRoot(node: Node, comp: number) {\n this.size++;\n this.modificationCount++;\n const root = this.root;\n if (root == null) {\n this.root = node;\n return;\n }\n if (comp < 0) {\n node.left = root;\n node.right = root.right;\n root.right = null;\n } else {\n node.right = root;\n node.left = root.left;\n root.left = null;\n }\n this.root = node;\n }\n\n protected _first() {\n const root = this.root;\n if (root == null) return null;\n this.root = this.splayMin(root);\n return this.root;\n }\n\n protected _last() {\n const root = this.root;\n if (root == null) return null;\n this.root = this.splayMax(root);\n return this.root;\n }\n\n public clear() {\n this.root = null;\n this.size = 0;\n this.modificationCount++;\n }\n\n public has(key: unknown) {\n return this.validKey(key) && this.splay(key as K) == 0;\n }\n\n protected defaultCompare(): Comparator {\n return (a: K, b: K) => a < b ? -1 : a > b ? 1 : 0;\n }\n\n protected wrap(): SplayTreeWrapper {\n return {\n getRoot: () => { return this.root },\n setRoot: (root) => { this.root = root },\n getSize: () => { return this.size },\n getModificationCount: () => { return this.modificationCount },\n getSplayCount: () => { return this.splayCount },\n setSplayCount: (count) => { this.splayCount = count },\n splay: (key) => { return this.splay(key) },\n has: (key) => { return this.has(key) },\n };\n }\n}\n\nexport class SplayTreeMap extends SplayTree> implements Iterable<[K, V]>, Map {\n protected root: SplayTreeMapNode | null = null;\n\n protected compare: Comparator;\n protected validKey: Predicate;\n\n constructor(compare?: Comparator, isValidKey?: Predicate) {\n super();\n this.compare = compare ?? this.defaultCompare();\n this.validKey = isValidKey ?? ((a: unknown) => a != null && a != undefined);\n }\n\n delete(key: unknown) {\n if (!this.validKey(key)) return false;\n return this._delete(key as K) != null;\n }\n\n forEach(f: (value: V, key: K, map: Map) => void) {\n const nodes: Iterator<[K, V]> = new SplayTreeMapEntryIterableIterator(this.wrap());\n let result: IteratorResult<[K, V]>;\n while (result = nodes.next(), !result.done) {\n f(result.value[1], result.value[0], this);\n }\n }\n\n get(key: unknown): V | undefined {\n if (!this.validKey(key)) return undefined;\n if (this.root != null) {\n const comp = this.splay(key as K);\n if (comp == 0) {\n return this.root!.value;\n }\n }\n return undefined;\n }\n\n hasValue(value: unknown) {\n const initialSplayCount = this.splayCount;\n const visit = (node: SplayTreeMapNode | null) => {\n while (node != null) {\n if (node.value == value) return true;\n if (initialSplayCount != this.splayCount) {\n throw \"Concurrent modification during iteration.\";\n }\n if (node.right != null && visit(node.right)) {\n return true;\n }\n node = node.left;\n }\n return false;\n }\n\n return visit(this.root);\n }\n\n set(key: K, value: V) {\n const comp = this.splay(key);\n if (comp == 0) {\n this.root = this.root!.replaceValue(value);\n this.splayCount += 1;\n return this;\n }\n this.addNewRoot(new SplayTreeMapNode(key, value), comp);\n return this;\n }\n\n setAll(other: Map) {\n other.forEach((value: V, key: K) => {\n this.set(key, value);\n });\n }\n\n setIfAbsent(key: K, ifAbsent: () => V) {\n let comp = this.splay(key);\n if (comp == 0) {\n return this.root!.value;\n }\n const modificationCount = this.modificationCount;\n const splayCount = this.splayCount;\n const value = ifAbsent();\n if (modificationCount != this.modificationCount) {\n throw \"Concurrent modification during iteration.\";\n }\n if (splayCount != this.splayCount) {\n comp = this.splay(key);\n }\n this.addNewRoot(new SplayTreeMapNode(key, value), comp);\n return value;\n }\n\n isEmpty() {\n return this.root == null;\n }\n\n isNotEmpty() {\n return !this.isEmpty();\n }\n\n firstKey() {\n if (this.root == null) return null;\n return this._first()!.key;\n }\n\n lastKey() {\n if (this.root == null) return null;\n return this._last()!.key;\n }\n\n lastKeyBefore(key: K) {\n if (key == null) throw \"Invalid arguments(s)\";\n if (this.root == null) return null;\n const comp = this.splay(key);\n if (comp < 0) return this.root!.key;\n let node: SplayTreeMapNode | null = this.root!.left;\n if (node == null) return null;\n let nodeRight = node.right;\n while (nodeRight != null) {\n node = nodeRight;\n nodeRight = node.right;\n }\n return node!.key;\n }\n\n firstKeyAfter(key: K) {\n if (key == null) throw \"Invalid arguments(s)\";\n if (this.root == null) return null;\n const comp = this.splay(key);\n if (comp > 0) return this.root!.key;\n let node: SplayTreeMapNode | null = this.root!.right;\n if (node == null) return null;\n let nodeLeft = node.left;\n while (nodeLeft != null) {\n node = nodeLeft;\n nodeLeft = node.left;\n }\n return node!.key;\n }\n\n update(key: K, update: (value: V) => V, ifAbsent?: () => V) {\n let comp = this.splay(key);\n if (comp == 0) {\n const modificationCount = this.modificationCount;\n const splayCount = this.splayCount;\n const newValue = update(this.root!.value);\n if (modificationCount != this.modificationCount) {\n throw \"Concurrent modification during iteration.\";\n }\n if (splayCount != this.splayCount) {\n this.splay(key);\n }\n this.root = this.root!.replaceValue(newValue);\n this.splayCount += 1;\n return newValue;\n }\n if (ifAbsent != null) {\n const modificationCount = this.modificationCount;\n const splayCount = this.splayCount;\n const newValue = ifAbsent();\n if (modificationCount != this.modificationCount) {\n throw \"Concurrent modification during iteration.\";\n }\n if (splayCount != this.splayCount) {\n comp = this.splay(key);\n }\n this.addNewRoot(new SplayTreeMapNode(key, newValue), comp);\n return newValue;\n }\n throw \"Invalid argument (key): Key not in map.\"\n }\n\n updateAll(update: (key: K, value: V) => V) {\n const root = this.root;\n if (root == null) return;\n const iterator = new SplayTreeMapEntryIterableIterator(this.wrap());\n let node: IteratorResult<[K, V]>;\n while (node = iterator.next(), !node.done) {\n const newValue = update(...node.value);\n iterator.replaceValue(newValue);\n }\n }\n\n keys(): IterableIterator {\n return new SplayTreeKeyIterableIterator>(this.wrap());\n }\n\n values(): IterableIterator {\n return new SplayTreeValueIterableIterator(this.wrap());\n }\n\n entries(): IterableIterator<[K, V]> {\n return this[Symbol.iterator]();\n }\n\n [Symbol.iterator](): IterableIterator<[K, V]> {\n return new SplayTreeMapEntryIterableIterator(this.wrap());\n }\n\n [Symbol.toStringTag] = '[object Map]'\n}\n\nexport class SplayTreeSet extends SplayTree> implements Iterable, Set {\n protected root: SplayTreeSetNode | null = null;\n\n protected compare: Comparator;\n protected validKey: Predicate;\n\n constructor(compare?: Comparator, isValidKey?: Predicate) {\n super();\n this.compare = compare ?? this.defaultCompare();\n this.validKey = isValidKey ?? ((v: unknown) => v != null && v != undefined );\n }\n\n delete(element: unknown) {\n if (!this.validKey(element)) return false;\n return this._delete(element as E) != null;\n }\n\n deleteAll(elements: Iterable) {\n for (const element of elements) {\n this.delete(element);\n }\n }\n\n forEach(f: (element: E, element2: E, set: Set) => void) {\n const nodes: Iterator = this[Symbol.iterator]();\n let result: IteratorResult;\n while (result = nodes.next(), !result.done) {\n f(result.value, result.value, this);\n }\n }\n\n add(element: E) {\n const compare = this.splay(element);\n if (compare != 0) this.addNewRoot(new SplayTreeSetNode(element), compare);\n return this;\n }\n\n addAndReturn(element: E) {\n const compare = this.splay(element);\n if (compare != 0) this.addNewRoot(new SplayTreeSetNode(element), compare);\n return this.root!.key;\n }\n\n addAll(elements: Iterable) {\n for (const element of elements) {\n this.add(element);\n }\n }\n\n isEmpty() {\n return this.root == null;\n }\n\n isNotEmpty() {\n return this.root != null;\n }\n\n single() {\n if (this.size == 0) throw \"Bad state: No element\";\n if (this.size > 1) throw \"Bad state: Too many element\";\n return this.root!.key;\n }\n\n first() {\n if (this.size == 0) throw \"Bad state: No element\";\n return this._first()!.key;\n }\n\n last() {\n if (this.size == 0) throw \"Bad state: No element\";\n return this._last()!.key;\n }\n\n lastBefore(element: E) {\n if (element == null) throw \"Invalid arguments(s)\";\n if (this.root == null) return null;\n const comp = this.splay(element);\n if (comp < 0) return this.root!.key;\n let node: SplayTreeSetNode | null = this.root!.left;\n if (node == null) return null;\n let nodeRight = node.right;\n while (nodeRight != null) {\n node = nodeRight;\n nodeRight = node.right;\n }\n return node!.key;\n }\n\n firstAfter(element: E) {\n if (element == null) throw \"Invalid arguments(s)\";\n if (this.root == null) return null;\n const comp = this.splay(element);\n if (comp > 0) return this.root!.key;\n let node: SplayTreeSetNode | null = this.root!.right;\n if (node == null) return null;\n let nodeLeft = node.left;\n while (nodeLeft != null) {\n node = nodeLeft;\n nodeLeft = node.left;\n }\n return node!.key;\n }\n\n retainAll(elements: Iterable) {\n const retainSet = new SplayTreeSet(this.compare, this.validKey);\n const modificationCount = this.modificationCount;\n for (const object of elements) {\n if (modificationCount != this.modificationCount) {\n throw \"Concurrent modification during iteration.\";\n }\n if (this.validKey(object) && this.splay(object as E) == 0) {\n retainSet.add(this.root!.key);\n }\n }\n if (retainSet.size != this.size) {\n this.root = retainSet.root;\n this.size = retainSet.size;\n this.modificationCount++;\n }\n }\n\n lookup(object: unknown): E | null {\n if (!this.validKey(object)) return null;\n const comp = this.splay(object as E);\n if (comp != 0) return null;\n return this.root!.key;\n }\n\n intersection(other: Set): Set {\n const result = new SplayTreeSet(this.compare, this.validKey);\n for (const element of this) {\n if (other.has(element)) result.add(element);\n }\n return result;\n }\n\n difference(other: Set): Set {\n const result = new SplayTreeSet(this.compare, this.validKey);\n for (const element of this) {\n if (!other.has(element)) result.add(element);\n }\n return result;\n }\n\n union(other: Set): Set {\n const u = this.clone();\n u.addAll(other);\n return u;\n }\n\n protected clone() {\n const set = new SplayTreeSet(this.compare, this.validKey);\n set.size = this.size;\n set.root = this.copyNode>(this.root);\n return set;\n }\n\n protected copyNode>(node: Node | null) {\n if (node == null) return null;\n function copyChildren(node: Node, dest: SplayTreeSetNode) {\n let left: Node | null;\n let right: Node | null;\n do {\n left = node.left;\n right = node.right;\n if (left != null) {\n const newLeft = new SplayTreeSetNode(left.key);\n dest.left = newLeft;\n copyChildren(left, newLeft);\n }\n if (right != null) {\n const newRight = new SplayTreeSetNode(right.key);\n dest.right = newRight;\n node = right;\n dest = newRight;\n }\n } while (right != null);\n }\n\n const result = new SplayTreeSetNode(node.key);\n copyChildren(node, result);\n return result;\n }\n\n toSet(): Set {\n return this.clone();\n }\n\n entries(): IterableIterator<[E, E]> {\n return new SplayTreeSetEntryIterableIterator>(this.wrap());\n }\n\n keys(): IterableIterator {\n return this[Symbol.iterator]();\n }\n \n values(): IterableIterator {\n return this[Symbol.iterator]();\n }\n\n [Symbol.iterator](): IterableIterator {\n return new SplayTreeKeyIterableIterator>(this.wrap());\n }\n\n [Symbol.toStringTag] = '[object Set]'\n}\n\ninterface SplayTreeWrapper> {\n getRoot: () => Node | null;\n setRoot: (root: Node | null) => void;\n getSize: () => number;\n getModificationCount: () => number;\n getSplayCount: () => number;\n setSplayCount: (count: number) => void;\n splay: (key: K) => number;\n has: (key: unknown) => boolean;\n}\n\ntype SplayTreeMapWrapper = SplayTreeWrapper>;\n\nabstract class SplayTreeIterableIterator, T> implements IterableIterator {\n protected readonly tree: SplayTreeWrapper;\n\n protected readonly path = new Array();\n\n protected modificationCount: number | null = null;\n\n protected splayCount: number;\n\n constructor(tree: SplayTreeWrapper) {\n this.tree = tree;\n this.splayCount = tree.getSplayCount();\n }\n\n [Symbol.iterator](): IterableIterator {\n return this;\n }\n\n next(): IteratorResult {\n if (this.moveNext()) return { done: false, value: this.current()! }\n return { done: true, value: null }\n }\n\n protected current() {\n if (!this.path.length) return null;\n const node = this.path[this.path.length - 1];\n return this.getValue(node);\n }\n\n protected rebuildPath(key: K) {\n this.path.splice(0, this.path.length)\n this.tree.splay(key);\n this.path.push(this.tree.getRoot()!);\n this.splayCount = this.tree.getSplayCount();\n }\n\n protected findLeftMostDescendent(node: Node | null) {\n while (node != null) {\n this.path.push(node);\n node = node.left;\n }\n }\n\n protected moveNext() {\n if (this.modificationCount != this.tree.getModificationCount()) {\n if (this.modificationCount == null) {\n this.modificationCount = this.tree.getModificationCount();\n let node = this.tree.getRoot();\n while (node != null) {\n this.path.push(node);\n node = node.left;\n }\n return this.path.length > 0;\n }\n throw \"Concurrent modification during iteration.\";\n }\n if (!this.path.length) return false;\n if (this.splayCount != this.tree.getSplayCount()) {\n this.rebuildPath(this.path[this.path.length - 1].key);\n }\n let node = this.path[this.path.length - 1];\n let next = node.right;\n if (next != null) {\n while (next != null) {\n this.path.push(next);\n next = next.left;\n }\n return true;\n }\n this.path.pop();\n while (this.path.length && this.path[this.path.length - 1].right === node) {\n node = this.path.pop()!;\n }\n return this.path.length > 0;\n }\n\n protected abstract getValue(node: Node): T\n}\n\nclass SplayTreeKeyIterableIterator> extends SplayTreeIterableIterator {\n\n protected getValue(node: Node) {\n return node.key;\n }\n}\n\nclass SplayTreeSetEntryIterableIterator> extends SplayTreeIterableIterator {\n\n protected getValue(node: Node): [K, K] {\n return [node.key, node.key];\n }\n}\n\nclass SplayTreeValueIterableIterator extends SplayTreeIterableIterator, V> {\n\n constructor(map: SplayTreeMapWrapper) {\n super(map);\n }\n\n protected getValue(node: SplayTreeMapNode) {\n return node.value;\n }\n}\n\nclass SplayTreeMapEntryIterableIterator extends SplayTreeIterableIterator, [K, V]> {\n\n constructor(map: SplayTreeMapWrapper) {\n super(map);\n }\n\n protected getValue(node: SplayTreeMapNode): [K, V] {\n return [node.key, node.value];\n }\n\n replaceValue(value: V) {\n if (this.modificationCount != this.tree.getModificationCount()) {\n throw \"Concurrent modification during iteration.\";\n }\n if (this.splayCount != this.tree.getSplayCount()) {\n this.rebuildPath(this.path[this.path.length - 1].key);\n }\n const last = this.path.pop()!;\n const newLast = last.replaceValue(value);\n if (!this.path.length) {\n this.tree.setRoot(newLast);\n } else {\n const parent = this.path[this.path.length - 1];\n if (last === parent.left) {\n parent.left = newLast;\n } else {\n parent.right = newLast;\n }\n }\n this.path.push(newLast);\n const count = this.tree.getSplayCount() + 1;\n this.tree.setSplayCount(count);\n this.splayCount = count;\n }\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,IAAM,gBAAN,MAA4D;AAAA,EAC/C;AAAA,EAET,OAAoB;AAAA,EACpB,QAAqB;AAAA,EAErB,YAAY,KAAQ;AAChB,SAAK,MAAM;AAAA,EACf;AACJ;AAEA,IAAM,mBAAN,cAAkC,cAAsC;AAAA,EACpE,YAAY,KAAQ;AAChB,UAAM,GAAG;AAAA,EACb;AACJ;AAEA,IAAM,mBAAN,MAAM,0BAA+B,cAAyC;AAAA,EACjE;AAAA,EAET,YAAY,KAAQ,OAAU;AAC1B,UAAM,GAAG;AACT,SAAK,QAAQ;AAAA,EACjB;AAAA,EAEA,aAAa,OAAU;AACnB,UAAM,OAAO,IAAI,kBAAiB,KAAK,KAAK,KAAK;AACjD,SAAK,OAAO,KAAK;AACjB,SAAK,QAAQ,KAAK;AAClB,WAAO;AAAA,EACX;AACJ;AAEA,IAAe,YAAf,MAAiE;AAAA,EAGtD,OAAO;AAAA,EAEJ,oBAAoB;AAAA,EAEpB,aAAa;AAAA,EAMb,MAAM,KAAQ;AACpB,UAAM,OAAO,KAAK;AAClB,QAAI,QAAQ,MAAM;AACd,WAAK,QAAQ,KAAK,GAAG;AACrB,aAAO;AAAA,IACX;AAEA,QAAI,QAAqB;AACzB,QAAI,eAA4B;AAChC,QAAI,OAAoB;AACxB,QAAI,cAA2B;AAC/B,QAAI,UAAU;AACd,UAAM,UAAU,KAAK;AACrB,QAAI;AACJ,WAAO,MAAM;AACT,aAAO,QAAQ,QAAQ,KAAK,GAAG;AAC/B,UAAI,OAAO,GAAG;AACV,YAAI,cAAc,QAAQ;AAC1B,YAAI,eAAe,KAAM;AACzB,eAAO,QAAQ,YAAY,KAAK,GAAG;AACnC,YAAI,OAAO,GAAG;AACV,kBAAQ,OAAO,YA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