@itwin/core-bentley 4.0.0-dev.7 → 4.0.0-dev.72
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/CHANGELOG.md +50 -1
- package/lib/cjs/AccessToken.d.ts +10 -10
- package/lib/cjs/AccessToken.d.ts.map +1 -1
- package/lib/cjs/AccessToken.js +9 -9
- package/lib/cjs/Assert.d.ts +25 -25
- package/lib/cjs/Assert.js +45 -45
- package/lib/cjs/Assert.js.map +1 -1
- package/lib/cjs/BeEvent.d.ts +81 -81
- package/lib/cjs/BeEvent.d.ts.map +1 -1
- package/lib/cjs/BeEvent.js +156 -156
- package/lib/cjs/BeSQLite.d.ts +172 -170
- package/lib/cjs/BeSQLite.d.ts.map +1 -1
- package/lib/cjs/BeSQLite.js +185 -183
- package/lib/cjs/BeSQLite.js.map +1 -1
- package/lib/cjs/BentleyError.d.ts +378 -378
- package/lib/cjs/BentleyError.d.ts.map +1 -1
- package/lib/cjs/BentleyError.js +703 -702
- package/lib/cjs/BentleyError.js.map +1 -1
- package/lib/cjs/BentleyLoggerCategory.d.ts +11 -11
- package/lib/cjs/BentleyLoggerCategory.js +19 -19
- package/lib/cjs/ByteStream.d.ts +110 -110
- package/lib/cjs/ByteStream.js +159 -159
- package/lib/cjs/ClassUtils.d.ts +14 -14
- package/lib/cjs/ClassUtils.js +27 -27
- package/lib/cjs/Compare.d.ts +47 -47
- package/lib/cjs/Compare.d.ts.map +1 -1
- package/lib/cjs/Compare.js +75 -75
- package/lib/cjs/CompressedId64Set.d.ts +134 -134
- package/lib/cjs/CompressedId64Set.d.ts.map +1 -1
- package/lib/cjs/CompressedId64Set.js +428 -428
- package/lib/cjs/CompressedId64Set.js.map +1 -1
- package/lib/cjs/Dictionary.d.ts +125 -125
- package/lib/cjs/Dictionary.js +203 -203
- package/lib/cjs/Disposable.d.ts +80 -80
- package/lib/cjs/Disposable.d.ts.map +1 -1
- package/lib/cjs/Disposable.js +120 -120
- package/lib/cjs/Id.d.ts +285 -285
- package/lib/cjs/Id.d.ts.map +1 -1
- package/lib/cjs/Id.js +643 -643
- package/lib/cjs/IndexMap.d.ts +65 -65
- package/lib/cjs/IndexMap.js +91 -91
- package/lib/cjs/JsonSchema.d.ts +77 -77
- package/lib/cjs/JsonSchema.d.ts.map +1 -1
- package/lib/cjs/JsonSchema.js +9 -9
- package/lib/cjs/JsonUtils.d.ts +78 -78
- package/lib/cjs/JsonUtils.js +151 -151
- package/lib/cjs/LRUMap.d.ts +129 -129
- package/lib/cjs/LRUMap.js +333 -333
- package/lib/cjs/LRUMap.js.map +1 -1
- package/lib/cjs/Logger.d.ts +143 -143
- package/lib/cjs/Logger.d.ts.map +1 -1
- package/lib/cjs/Logger.js +256 -258
- package/lib/cjs/Logger.js.map +1 -1
- package/lib/cjs/ObservableSet.d.ts +23 -23
- package/lib/cjs/ObservableSet.js +51 -51
- package/lib/cjs/OneAtATimeAction.d.ts +31 -31
- package/lib/cjs/OneAtATimeAction.js +94 -94
- package/lib/cjs/OneAtATimeAction.js.map +1 -1
- package/lib/cjs/OrderedId64Iterable.d.ts +74 -74
- package/lib/cjs/OrderedId64Iterable.d.ts.map +1 -1
- package/lib/cjs/OrderedId64Iterable.js +235 -235
- package/lib/cjs/OrderedSet.d.ts +40 -40
- package/lib/cjs/OrderedSet.js +64 -64
- package/lib/cjs/PriorityQueue.d.ts +70 -70
- package/lib/cjs/PriorityQueue.d.ts.map +1 -1
- package/lib/cjs/PriorityQueue.js +140 -140
- package/lib/cjs/ProcessDetector.d.ts +59 -59
- package/lib/cjs/ProcessDetector.js +71 -71
- package/lib/cjs/SortedArray.d.ts +236 -232
- package/lib/cjs/SortedArray.d.ts.map +1 -1
- package/lib/cjs/SortedArray.js +315 -303
- package/lib/cjs/SortedArray.js.map +1 -1
- package/lib/cjs/StatusCategory.d.ts +30 -30
- package/lib/cjs/StatusCategory.d.ts.map +1 -1
- package/lib/cjs/StatusCategory.js +460 -460
- package/lib/cjs/StatusCategory.js.map +1 -1
- package/lib/cjs/StringUtils.d.ts +22 -22
- package/lib/cjs/StringUtils.js +148 -148
- package/lib/cjs/Time.d.ts +122 -122
- package/lib/cjs/Time.js +152 -152
- package/lib/cjs/Time.js.map +1 -1
- package/lib/cjs/Tracing.d.ts +43 -40
- package/lib/cjs/Tracing.d.ts.map +1 -1
- package/lib/cjs/Tracing.js +134 -130
- package/lib/cjs/Tracing.js.map +1 -1
- package/lib/cjs/TupleKeyedMap.d.ts +36 -36
- package/lib/cjs/TupleKeyedMap.js +102 -102
- package/lib/cjs/TypedArrayBuilder.d.ts +155 -155
- package/lib/cjs/TypedArrayBuilder.d.ts.map +1 -1
- package/lib/cjs/TypedArrayBuilder.js +206 -208
- package/lib/cjs/TypedArrayBuilder.js.map +1 -1
- package/lib/cjs/UnexpectedErrors.d.ts +43 -43
- package/lib/cjs/UnexpectedErrors.d.ts.map +1 -1
- package/lib/cjs/UnexpectedErrors.js +68 -68
- package/lib/cjs/UnexpectedErrors.js.map +1 -1
- package/lib/cjs/UtilityTypes.d.ts +112 -96
- package/lib/cjs/UtilityTypes.d.ts.map +1 -1
- package/lib/cjs/UtilityTypes.js +40 -40
- package/lib/cjs/UtilityTypes.js.map +1 -1
- package/lib/cjs/YieldManager.d.ts +18 -18
- package/lib/cjs/YieldManager.js +34 -34
- package/lib/cjs/core-bentley.d.ts +74 -74
- package/lib/cjs/core-bentley.js +94 -90
- package/lib/cjs/core-bentley.js.map +1 -1
- package/lib/cjs/partitionArray.d.ts +21 -21
- package/lib/cjs/partitionArray.js +43 -43
- package/lib/esm/AccessToken.d.ts +10 -10
- package/lib/esm/AccessToken.d.ts.map +1 -1
- package/lib/esm/AccessToken.js +8 -8
- package/lib/esm/Assert.d.ts +25 -25
- package/lib/esm/Assert.js +41 -41
- package/lib/esm/Assert.js.map +1 -1
- package/lib/esm/BeEvent.d.ts +81 -81
- package/lib/esm/BeEvent.d.ts.map +1 -1
- package/lib/esm/BeEvent.js +150 -150
- package/lib/esm/BeSQLite.d.ts +172 -170
- package/lib/esm/BeSQLite.d.ts.map +1 -1
- package/lib/esm/BeSQLite.js +182 -180
- package/lib/esm/BeSQLite.js.map +1 -1
- package/lib/esm/BentleyError.d.ts +378 -378
- package/lib/esm/BentleyError.d.ts.map +1 -1
- package/lib/esm/BentleyError.js +699 -698
- package/lib/esm/BentleyError.js.map +1 -1
- package/lib/esm/BentleyLoggerCategory.d.ts +11 -11
- package/lib/esm/BentleyLoggerCategory.js +16 -16
- package/lib/esm/ByteStream.d.ts +110 -110
- package/lib/esm/ByteStream.js +155 -155
- package/lib/esm/ClassUtils.d.ts +14 -14
- package/lib/esm/ClassUtils.js +22 -22
- package/lib/esm/Compare.d.ts +47 -47
- package/lib/esm/Compare.d.ts.map +1 -1
- package/lib/esm/Compare.js +63 -63
- package/lib/esm/CompressedId64Set.d.ts +134 -134
- package/lib/esm/CompressedId64Set.d.ts.map +1 -1
- package/lib/esm/CompressedId64Set.js +423 -423
- package/lib/esm/CompressedId64Set.js.map +1 -1
- package/lib/esm/Dictionary.d.ts +125 -125
- package/lib/esm/Dictionary.js +199 -199
- package/lib/esm/Disposable.d.ts +80 -80
- package/lib/esm/Disposable.d.ts.map +1 -1
- package/lib/esm/Disposable.js +112 -112
- package/lib/esm/Id.d.ts +285 -285
- package/lib/esm/Id.d.ts.map +1 -1
- package/lib/esm/Id.js +639 -639
- package/lib/esm/IndexMap.d.ts +65 -65
- package/lib/esm/IndexMap.js +86 -86
- package/lib/esm/JsonSchema.d.ts +77 -77
- package/lib/esm/JsonSchema.d.ts.map +1 -1
- package/lib/esm/JsonSchema.js +8 -8
- package/lib/esm/JsonUtils.d.ts +78 -78
- package/lib/esm/JsonUtils.js +148 -148
- package/lib/esm/LRUMap.d.ts +129 -129
- package/lib/esm/LRUMap.js +326 -326
- package/lib/esm/LRUMap.js.map +1 -1
- package/lib/esm/Logger.d.ts +143 -143
- package/lib/esm/Logger.d.ts.map +1 -1
- package/lib/esm/Logger.js +253 -253
- package/lib/esm/Logger.js.map +1 -1
- package/lib/esm/ObservableSet.d.ts +23 -23
- package/lib/esm/ObservableSet.js +47 -47
- package/lib/esm/OneAtATimeAction.d.ts +31 -31
- package/lib/esm/OneAtATimeAction.js +89 -89
- package/lib/esm/OneAtATimeAction.js.map +1 -1
- package/lib/esm/OrderedId64Iterable.d.ts +74 -74
- package/lib/esm/OrderedId64Iterable.d.ts.map +1 -1
- package/lib/esm/OrderedId64Iterable.js +232 -232
- package/lib/esm/OrderedSet.d.ts +40 -40
- package/lib/esm/OrderedSet.js +59 -59
- package/lib/esm/PriorityQueue.d.ts +70 -70
- package/lib/esm/PriorityQueue.d.ts.map +1 -1
- package/lib/esm/PriorityQueue.js +136 -136
- package/lib/esm/ProcessDetector.d.ts +59 -59
- package/lib/esm/ProcessDetector.js +67 -67
- package/lib/esm/SortedArray.d.ts +236 -232
- package/lib/esm/SortedArray.d.ts.map +1 -1
- package/lib/esm/SortedArray.js +308 -296
- package/lib/esm/SortedArray.js.map +1 -1
- package/lib/esm/StatusCategory.d.ts +30 -30
- package/lib/esm/StatusCategory.d.ts.map +1 -1
- package/lib/esm/StatusCategory.js +455 -454
- package/lib/esm/StatusCategory.js.map +1 -1
- package/lib/esm/StringUtils.d.ts +22 -22
- package/lib/esm/StringUtils.js +142 -142
- package/lib/esm/Time.d.ts +122 -122
- package/lib/esm/Time.js +146 -146
- package/lib/esm/Time.js.map +1 -1
- package/lib/esm/Tracing.d.ts +43 -40
- package/lib/esm/Tracing.d.ts.map +1 -1
- package/lib/esm/Tracing.js +130 -126
- package/lib/esm/Tracing.js.map +1 -1
- package/lib/esm/TupleKeyedMap.d.ts +36 -36
- package/lib/esm/TupleKeyedMap.js +98 -98
- package/lib/esm/TypedArrayBuilder.d.ts +155 -155
- package/lib/esm/TypedArrayBuilder.d.ts.map +1 -1
- package/lib/esm/TypedArrayBuilder.js +198 -200
- package/lib/esm/TypedArrayBuilder.js.map +1 -1
- package/lib/esm/UnexpectedErrors.d.ts +43 -43
- package/lib/esm/UnexpectedErrors.d.ts.map +1 -1
- package/lib/esm/UnexpectedErrors.js +65 -64
- package/lib/esm/UnexpectedErrors.js.map +1 -1
- package/lib/esm/UtilityTypes.d.ts +112 -96
- package/lib/esm/UtilityTypes.d.ts.map +1 -1
- package/lib/esm/UtilityTypes.js +34 -34
- package/lib/esm/UtilityTypes.js.map +1 -1
- package/lib/esm/YieldManager.d.ts +18 -18
- package/lib/esm/YieldManager.js +30 -30
- package/lib/esm/core-bentley.d.ts +74 -74
- package/lib/esm/core-bentley.js +78 -78
- package/lib/esm/partitionArray.d.ts +21 -21
- package/lib/esm/partitionArray.js +39 -39
- package/package.json +9 -9
package/lib/cjs/Dictionary.js
CHANGED
|
@@ -1,204 +1,204 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
/** @packageDocumentation
|
|
7
|
-
* @module Collections
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.Dictionary = void 0;
|
|
11
|
-
const SortedArray_1 = require("./SortedArray");
|
|
12
|
-
class DictionaryIterator {
|
|
13
|
-
constructor(keys, values) {
|
|
14
|
-
this._curIndex = -1;
|
|
15
|
-
this._keys = keys;
|
|
16
|
-
this._values = values;
|
|
17
|
-
}
|
|
18
|
-
next() {
|
|
19
|
-
if (++this._curIndex >= this._keys.length) {
|
|
20
|
-
// The ECMAScript spec states that value=undefined is valid if done=true. The TypeScript interface violates the spec hence the cast to any and back below.
|
|
21
|
-
return { done: true };
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
return {
|
|
25
|
-
value: {
|
|
26
|
-
key: this._keys[this._curIndex],
|
|
27
|
-
value: this._values[this._curIndex],
|
|
28
|
-
},
|
|
29
|
-
done: false,
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Maintains a mapping of keys to values.
|
|
36
|
-
* Unlike the standard Map<K, V>, a Dictionary<K, V> supports custom comparison logic for keys of object type (and for any other type).
|
|
37
|
-
* The user supplies a key comparison function to the constructor, that must meet the following criteria given 'lhs' and 'rhs' of type K:
|
|
38
|
-
* - If lhs is equal to rhs, returns 0
|
|
39
|
-
* - If lhs is less than rhs, returns a negative value
|
|
40
|
-
* - If lhs is greater than rhs, returns a positive value
|
|
41
|
-
* - If compare(lhs, rhs) returns 0, then compare(rhs, lhs) must also return 0
|
|
42
|
-
* - If compare(lhs, rhs) returns a negative value, then compare(rhs, lhs) must return a positive value, and vice versa.
|
|
43
|
-
*
|
|
44
|
-
* Modifying a key in a way that affects the comparison function will produce unpredictable results, the
|
|
45
|
-
* most likely of which is that keys will cease to map to the values with which they were initially inserted.
|
|
46
|
-
* @public
|
|
47
|
-
*/
|
|
48
|
-
class Dictionary {
|
|
49
|
-
/**
|
|
50
|
-
* Construct a new Dictionary<K, V>.
|
|
51
|
-
* @param compareKeys The function used to compare keys within the dictionary.
|
|
52
|
-
* @param cloneKey The function invoked to clone a key for insertion into the dictionary. The default implementation simply returns its input.
|
|
53
|
-
* @param cloneValue The function invoked to clone a value for insertion into the dictionary. The default implementation simply returns its input.
|
|
54
|
-
*/
|
|
55
|
-
constructor(compareKeys, cloneKey = SortedArray_1.shallowClone, cloneValue = SortedArray_1.shallowClone) {
|
|
56
|
-
this._keys = [];
|
|
57
|
-
this._values = [];
|
|
58
|
-
this._compareKeys = compareKeys;
|
|
59
|
-
this._cloneKey = cloneKey;
|
|
60
|
-
this._cloneValue = cloneValue;
|
|
61
|
-
}
|
|
62
|
-
/** The number of entries in the dictionary. */
|
|
63
|
-
get size() { return this._keys.length; }
|
|
64
|
-
/** Returns an iterator over the key-value pairs in the Dictionary suitable for use in `for-of` loops. Entries are returned in sorted order by key. */
|
|
65
|
-
[Symbol.iterator]() {
|
|
66
|
-
return new DictionaryIterator(this._keys, this._values);
|
|
67
|
-
}
|
|
68
|
-
/** Provides iteration over the keys in this Dictionary, in sorted order. */
|
|
69
|
-
keys() {
|
|
70
|
-
function* iterator(dict) {
|
|
71
|
-
for (const entry of dict)
|
|
72
|
-
yield entry.key;
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
[Symbol.iterator]: () => iterator(this),
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
/** Provides iteration over the values in this Dictionary, in sorted order by the corresponding keys. */
|
|
79
|
-
values() {
|
|
80
|
-
function* iterator(dict) {
|
|
81
|
-
for (const entry of dict)
|
|
82
|
-
yield entry.value;
|
|
83
|
-
}
|
|
84
|
-
return {
|
|
85
|
-
[Symbol.iterator]: () => iterator(this),
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
/** Removes all entries from this dictionary */
|
|
89
|
-
clear() {
|
|
90
|
-
this._keys = [];
|
|
91
|
-
this._values = [];
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Looks up a value by its key.
|
|
95
|
-
* @param key The key to search for
|
|
96
|
-
* @returns the value associated with the key, or undefined if the key is not present in the dictionary.
|
|
97
|
-
*/
|
|
98
|
-
get(key) {
|
|
99
|
-
const bound = this.lowerBound(key);
|
|
100
|
-
return bound.equal ? this._values[bound.index] : undefined;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Determines if an entry exists for the specified key
|
|
104
|
-
* @param key The key to search for
|
|
105
|
-
* @returns true if an entry exists in this dictionary corresponding to the specified key.
|
|
106
|
-
*/
|
|
107
|
-
has(key) {
|
|
108
|
-
return this.lowerBound(key).equal;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Deletes a value using its key.
|
|
112
|
-
* @param key The key to delete
|
|
113
|
-
* @returns true if the key was found and deleted.
|
|
114
|
-
*/
|
|
115
|
-
delete(key) {
|
|
116
|
-
const bound = this.lowerBound(key);
|
|
117
|
-
if (bound.equal) {
|
|
118
|
-
this._values.splice(bound.index, 1);
|
|
119
|
-
this._keys.splice(bound.index, 1);
|
|
120
|
-
return true;
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
return false;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Attempts to insert a new entry into the dictionary. If an entry with an equivalent key exists, the dictionary is unmodified.
|
|
128
|
-
* If the new entry is in fact inserted, both the key and value will be cloned using the functions supplied to the dictionary's constructor.
|
|
129
|
-
* @param key The key to associate with the value
|
|
130
|
-
* @param value The value to associate with the key
|
|
131
|
-
* @returns true if the new entry was inserted, false if an entry with an equivalent key already exists.
|
|
132
|
-
*/
|
|
133
|
-
insert(key, value) {
|
|
134
|
-
const result = this.findOrInsert(key, value);
|
|
135
|
-
return result.inserted;
|
|
136
|
-
}
|
|
137
|
-
/** Obtains the value associated with the specified key, or inserts it if the specified key does not yet exist.
|
|
138
|
-
* @param key The key to search for.
|
|
139
|
-
* @param value The value to associate with `key` if `key` does not yet exist in the dictionary.
|
|
140
|
-
* @returns The found or inserted value and a flag indicating whether the new value was inserted.
|
|
141
|
-
*/
|
|
142
|
-
findOrInsert(key, value) {
|
|
143
|
-
const bound = this.lowerBound(key);
|
|
144
|
-
if (bound.equal)
|
|
145
|
-
return { value: this._values[bound.index], inserted: false };
|
|
146
|
-
value = this._cloneValue(value);
|
|
147
|
-
this._keys.splice(bound.index, 0, this._cloneKey(key));
|
|
148
|
-
this._values.splice(bound.index, 0, this._cloneValue(value));
|
|
149
|
-
return { value, inserted: true };
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Sets the value associated with the specified key in the dictionary.
|
|
153
|
-
* If no such key already exists, this is equivalent to insert(key, value); otherwise, the existing value associated with the key is replaced.
|
|
154
|
-
* In either case, the value will be cloned using the function supplied to the dictionary's constructor.
|
|
155
|
-
*/
|
|
156
|
-
set(key, value) {
|
|
157
|
-
value = this._cloneValue(value);
|
|
158
|
-
const bound = this.lowerBound(key);
|
|
159
|
-
if (bound.equal) {
|
|
160
|
-
this._values[bound.index] = value;
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
this._keys.splice(bound.index, 0, this._cloneKey(key));
|
|
164
|
-
this._values.splice(bound.index, 0, value);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Extracts the contents of this dictionary as an array of { key, value } pairs, and empties this dictionary.
|
|
169
|
-
* @returns An array of { key, value } pairs sorted by key.
|
|
170
|
-
*/
|
|
171
|
-
extractPairs() {
|
|
172
|
-
const pairs = [];
|
|
173
|
-
for (let i = 0; i < this.size; i++)
|
|
174
|
-
pairs.push({ key: this._keys[i], value: this._values[i] });
|
|
175
|
-
this.clear();
|
|
176
|
-
return pairs;
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Extracts the contents of this dictionary as a pair of { keys, values } arrays, and empties this dictionary.
|
|
180
|
-
* The array of keys is sorted according to the comparison criterion.
|
|
181
|
-
* The position of each value in the array of values corresponds the the position of the corresponding key in the array of keys.
|
|
182
|
-
* @returns a pair of { keys, values } arrays in which key[i] corresponds to value[i] in this dictionary and the keys are in sorted order.
|
|
183
|
-
*/
|
|
184
|
-
extractArrays() {
|
|
185
|
-
const result = { keys: this._keys, values: this._values };
|
|
186
|
-
this.clear();
|
|
187
|
-
return result;
|
|
188
|
-
}
|
|
189
|
-
/** Apply a function to each (key, value) pair in the dictionary, in sorted order.
|
|
190
|
-
* @param func The function to be applied.
|
|
191
|
-
*/
|
|
192
|
-
forEach(func) {
|
|
193
|
-
for (let i = 0; i < this.size; i++)
|
|
194
|
-
func(this._keys[i], this._values[i]);
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Computes the position at which the specified key should be inserted to maintain sorted order.
|
|
198
|
-
* @param key The key whose position is to be computed.
|
|
199
|
-
* @returns an object with 'index' corresponding to the computed position and 'equal' set to true if an equivalent key already exists at that index.
|
|
200
|
-
*/
|
|
201
|
-
lowerBound(key) { return (0, SortedArray_1.lowerBound)(key, this._keys, this._compareKeys); }
|
|
202
|
-
}
|
|
203
|
-
exports.Dictionary = Dictionary;
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module Collections
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.Dictionary = void 0;
|
|
11
|
+
const SortedArray_1 = require("./SortedArray");
|
|
12
|
+
class DictionaryIterator {
|
|
13
|
+
constructor(keys, values) {
|
|
14
|
+
this._curIndex = -1;
|
|
15
|
+
this._keys = keys;
|
|
16
|
+
this._values = values;
|
|
17
|
+
}
|
|
18
|
+
next() {
|
|
19
|
+
if (++this._curIndex >= this._keys.length) {
|
|
20
|
+
// The ECMAScript spec states that value=undefined is valid if done=true. The TypeScript interface violates the spec hence the cast to any and back below.
|
|
21
|
+
return { done: true };
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
return {
|
|
25
|
+
value: {
|
|
26
|
+
key: this._keys[this._curIndex],
|
|
27
|
+
value: this._values[this._curIndex],
|
|
28
|
+
},
|
|
29
|
+
done: false,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Maintains a mapping of keys to values.
|
|
36
|
+
* Unlike the standard Map<K, V>, a Dictionary<K, V> supports custom comparison logic for keys of object type (and for any other type).
|
|
37
|
+
* The user supplies a key comparison function to the constructor, that must meet the following criteria given 'lhs' and 'rhs' of type K:
|
|
38
|
+
* - If lhs is equal to rhs, returns 0
|
|
39
|
+
* - If lhs is less than rhs, returns a negative value
|
|
40
|
+
* - If lhs is greater than rhs, returns a positive value
|
|
41
|
+
* - If compare(lhs, rhs) returns 0, then compare(rhs, lhs) must also return 0
|
|
42
|
+
* - If compare(lhs, rhs) returns a negative value, then compare(rhs, lhs) must return a positive value, and vice versa.
|
|
43
|
+
*
|
|
44
|
+
* Modifying a key in a way that affects the comparison function will produce unpredictable results, the
|
|
45
|
+
* most likely of which is that keys will cease to map to the values with which they were initially inserted.
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
class Dictionary {
|
|
49
|
+
/**
|
|
50
|
+
* Construct a new Dictionary<K, V>.
|
|
51
|
+
* @param compareKeys The function used to compare keys within the dictionary.
|
|
52
|
+
* @param cloneKey The function invoked to clone a key for insertion into the dictionary. The default implementation simply returns its input.
|
|
53
|
+
* @param cloneValue The function invoked to clone a value for insertion into the dictionary. The default implementation simply returns its input.
|
|
54
|
+
*/
|
|
55
|
+
constructor(compareKeys, cloneKey = SortedArray_1.shallowClone, cloneValue = SortedArray_1.shallowClone) {
|
|
56
|
+
this._keys = [];
|
|
57
|
+
this._values = [];
|
|
58
|
+
this._compareKeys = compareKeys;
|
|
59
|
+
this._cloneKey = cloneKey;
|
|
60
|
+
this._cloneValue = cloneValue;
|
|
61
|
+
}
|
|
62
|
+
/** The number of entries in the dictionary. */
|
|
63
|
+
get size() { return this._keys.length; }
|
|
64
|
+
/** Returns an iterator over the key-value pairs in the Dictionary suitable for use in `for-of` loops. Entries are returned in sorted order by key. */
|
|
65
|
+
[Symbol.iterator]() {
|
|
66
|
+
return new DictionaryIterator(this._keys, this._values);
|
|
67
|
+
}
|
|
68
|
+
/** Provides iteration over the keys in this Dictionary, in sorted order. */
|
|
69
|
+
keys() {
|
|
70
|
+
function* iterator(dict) {
|
|
71
|
+
for (const entry of dict)
|
|
72
|
+
yield entry.key;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
[Symbol.iterator]: () => iterator(this),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/** Provides iteration over the values in this Dictionary, in sorted order by the corresponding keys. */
|
|
79
|
+
values() {
|
|
80
|
+
function* iterator(dict) {
|
|
81
|
+
for (const entry of dict)
|
|
82
|
+
yield entry.value;
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
[Symbol.iterator]: () => iterator(this),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
/** Removes all entries from this dictionary */
|
|
89
|
+
clear() {
|
|
90
|
+
this._keys = [];
|
|
91
|
+
this._values = [];
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Looks up a value by its key.
|
|
95
|
+
* @param key The key to search for
|
|
96
|
+
* @returns the value associated with the key, or undefined if the key is not present in the dictionary.
|
|
97
|
+
*/
|
|
98
|
+
get(key) {
|
|
99
|
+
const bound = this.lowerBound(key);
|
|
100
|
+
return bound.equal ? this._values[bound.index] : undefined;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Determines if an entry exists for the specified key
|
|
104
|
+
* @param key The key to search for
|
|
105
|
+
* @returns true if an entry exists in this dictionary corresponding to the specified key.
|
|
106
|
+
*/
|
|
107
|
+
has(key) {
|
|
108
|
+
return this.lowerBound(key).equal;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Deletes a value using its key.
|
|
112
|
+
* @param key The key to delete
|
|
113
|
+
* @returns true if the key was found and deleted.
|
|
114
|
+
*/
|
|
115
|
+
delete(key) {
|
|
116
|
+
const bound = this.lowerBound(key);
|
|
117
|
+
if (bound.equal) {
|
|
118
|
+
this._values.splice(bound.index, 1);
|
|
119
|
+
this._keys.splice(bound.index, 1);
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Attempts to insert a new entry into the dictionary. If an entry with an equivalent key exists, the dictionary is unmodified.
|
|
128
|
+
* If the new entry is in fact inserted, both the key and value will be cloned using the functions supplied to the dictionary's constructor.
|
|
129
|
+
* @param key The key to associate with the value
|
|
130
|
+
* @param value The value to associate with the key
|
|
131
|
+
* @returns true if the new entry was inserted, false if an entry with an equivalent key already exists.
|
|
132
|
+
*/
|
|
133
|
+
insert(key, value) {
|
|
134
|
+
const result = this.findOrInsert(key, value);
|
|
135
|
+
return result.inserted;
|
|
136
|
+
}
|
|
137
|
+
/** Obtains the value associated with the specified key, or inserts it if the specified key does not yet exist.
|
|
138
|
+
* @param key The key to search for.
|
|
139
|
+
* @param value The value to associate with `key` if `key` does not yet exist in the dictionary.
|
|
140
|
+
* @returns The found or inserted value and a flag indicating whether the new value was inserted.
|
|
141
|
+
*/
|
|
142
|
+
findOrInsert(key, value) {
|
|
143
|
+
const bound = this.lowerBound(key);
|
|
144
|
+
if (bound.equal)
|
|
145
|
+
return { value: this._values[bound.index], inserted: false };
|
|
146
|
+
value = this._cloneValue(value);
|
|
147
|
+
this._keys.splice(bound.index, 0, this._cloneKey(key));
|
|
148
|
+
this._values.splice(bound.index, 0, this._cloneValue(value));
|
|
149
|
+
return { value, inserted: true };
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Sets the value associated with the specified key in the dictionary.
|
|
153
|
+
* If no such key already exists, this is equivalent to insert(key, value); otherwise, the existing value associated with the key is replaced.
|
|
154
|
+
* In either case, the value will be cloned using the function supplied to the dictionary's constructor.
|
|
155
|
+
*/
|
|
156
|
+
set(key, value) {
|
|
157
|
+
value = this._cloneValue(value);
|
|
158
|
+
const bound = this.lowerBound(key);
|
|
159
|
+
if (bound.equal) {
|
|
160
|
+
this._values[bound.index] = value;
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
this._keys.splice(bound.index, 0, this._cloneKey(key));
|
|
164
|
+
this._values.splice(bound.index, 0, value);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Extracts the contents of this dictionary as an array of { key, value } pairs, and empties this dictionary.
|
|
169
|
+
* @returns An array of { key, value } pairs sorted by key.
|
|
170
|
+
*/
|
|
171
|
+
extractPairs() {
|
|
172
|
+
const pairs = [];
|
|
173
|
+
for (let i = 0; i < this.size; i++)
|
|
174
|
+
pairs.push({ key: this._keys[i], value: this._values[i] });
|
|
175
|
+
this.clear();
|
|
176
|
+
return pairs;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Extracts the contents of this dictionary as a pair of { keys, values } arrays, and empties this dictionary.
|
|
180
|
+
* The array of keys is sorted according to the comparison criterion.
|
|
181
|
+
* The position of each value in the array of values corresponds the the position of the corresponding key in the array of keys.
|
|
182
|
+
* @returns a pair of { keys, values } arrays in which key[i] corresponds to value[i] in this dictionary and the keys are in sorted order.
|
|
183
|
+
*/
|
|
184
|
+
extractArrays() {
|
|
185
|
+
const result = { keys: this._keys, values: this._values };
|
|
186
|
+
this.clear();
|
|
187
|
+
return result;
|
|
188
|
+
}
|
|
189
|
+
/** Apply a function to each (key, value) pair in the dictionary, in sorted order.
|
|
190
|
+
* @param func The function to be applied.
|
|
191
|
+
*/
|
|
192
|
+
forEach(func) {
|
|
193
|
+
for (let i = 0; i < this.size; i++)
|
|
194
|
+
func(this._keys[i], this._values[i]);
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Computes the position at which the specified key should be inserted to maintain sorted order.
|
|
198
|
+
* @param key The key whose position is to be computed.
|
|
199
|
+
* @returns an object with 'index' corresponding to the computed position and 'equal' set to true if an equivalent key already exists at that index.
|
|
200
|
+
*/
|
|
201
|
+
lowerBound(key) { return (0, SortedArray_1.lowerBound)(key, this._keys, this._compareKeys); }
|
|
202
|
+
}
|
|
203
|
+
exports.Dictionary = Dictionary;
|
|
204
204
|
//# sourceMappingURL=Dictionary.js.map
|
package/lib/cjs/Disposable.d.ts
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module Utils
|
|
3
|
-
*/
|
|
4
|
-
/** Interface adopted by a type which has deterministic cleanup logic.
|
|
5
|
-
* For example:
|
|
6
|
-
* - Most rendering-related types, such as [[RenderGraphic]] and [[Viewport]], own WebGL resources which must be explicitly released when no longer needed.
|
|
7
|
-
* - Some low-level objects like [[ECDb]] own native types defined in C++ code which must be explicitly released when no longer needed.
|
|
8
|
-
*
|
|
9
|
-
* A similar concept exists in languages like C++ (implemented as "destructors") and C# ("IDisposable").
|
|
10
|
-
* However, because TypeScript and Javascript lack any built-in support for deterministic destruction, it is up to the programmer to ensure dispose() is called appropriately.
|
|
11
|
-
* Failure to do so may result in memory leaks or leaking of other resources.
|
|
12
|
-
*
|
|
13
|
-
* IDisposable tends to be contagious; that is, if a type has members which implement IDisposable, that type should also implement IDisposable to dispose of those members.
|
|
14
|
-
*
|
|
15
|
-
* Implementations of IDisposable tend to be more "low-level" types. The disposal of such types is often handled on your behalf.
|
|
16
|
-
* However, always consult the documentation for an IDisposable type to determine under what circumstances you are expected to explicitly dispose of it.
|
|
17
|
-
* @public
|
|
18
|
-
*/
|
|
19
|
-
export interface IDisposable {
|
|
20
|
-
/** Disposes of any resources owned by this object.
|
|
21
|
-
* @note The object is generally considered unusable after it has been disposed of.
|
|
22
|
-
*/
|
|
23
|
-
dispose(): void;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* A type guard that checks whether the given argument implements `IDisposable` interface
|
|
27
|
-
* @public
|
|
28
|
-
*/
|
|
29
|
-
export declare function isIDisposable(obj: unknown): obj is IDisposable;
|
|
30
|
-
/** Convenience function for disposing of a disposable object that may be undefined.
|
|
31
|
-
* This is primarily used to simplify implementations of [[IDisposable.dispose]].
|
|
32
|
-
* As a simple example:
|
|
33
|
-
* ```ts
|
|
34
|
-
* class Disposable implements IDisposable {
|
|
35
|
-
* public member1?: DisposableType1;
|
|
36
|
-
* public member2?: DisposableType2;
|
|
37
|
-
*
|
|
38
|
-
* public dispose() {
|
|
39
|
-
* this.member1 = dispose(this.member1); // If member1 is defined, dispose of it and set it to undefined.
|
|
40
|
-
* this.member2 = dispose(this.member2); // Likewise for member2.
|
|
41
|
-
* }
|
|
42
|
-
* }
|
|
43
|
-
* ```
|
|
44
|
-
* @param disposable The object to be disposed of.
|
|
45
|
-
* @returns undefined
|
|
46
|
-
* @public
|
|
47
|
-
*/
|
|
48
|
-
export declare function dispose(disposable?: IDisposable): undefined;
|
|
49
|
-
/** Disposes of and empties a list of disposable objects.
|
|
50
|
-
* @param list The list of disposable objects.
|
|
51
|
-
* @returns undefined
|
|
52
|
-
* @public
|
|
53
|
-
*/
|
|
54
|
-
export declare function disposeArray(list?: IDisposable[]): undefined;
|
|
55
|
-
/** A 'using' function which is a substitution for .NET's using statement. It makes sure that 'dispose'
|
|
56
|
-
* is called on the resource no matter if the func returns or throws. If func returns, the return value
|
|
57
|
-
* of this function is equal to return value of func. If func throws, this function also throws (after
|
|
58
|
-
* disposing the resource).
|
|
59
|
-
* @public
|
|
60
|
-
*/
|
|
61
|
-
export declare function using<T extends IDisposable, TResult>(resources: T | T[], func: (...r: T[]) => TResult): TResult;
|
|
62
|
-
/** A definition of function which may be called to dispose an object
|
|
63
|
-
* @public
|
|
64
|
-
*/
|
|
65
|
-
export
|
|
66
|
-
/** A disposable container of disposable objects.
|
|
67
|
-
* @public
|
|
68
|
-
*/
|
|
69
|
-
export declare class DisposableList implements IDisposable {
|
|
70
|
-
private _disposables;
|
|
71
|
-
/** Creates a disposable list. */
|
|
72
|
-
constructor(disposables?: Array<IDisposable | DisposeFunc>);
|
|
73
|
-
private isDisposable;
|
|
74
|
-
/** Register an object for disposal. */
|
|
75
|
-
add(disposable: IDisposable | DisposeFunc): void;
|
|
76
|
-
/** Unregister disposable object. */
|
|
77
|
-
remove(disposable: IDisposable): void;
|
|
78
|
-
/** Disposes all registered objects. */
|
|
79
|
-
dispose(): void;
|
|
80
|
-
}
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Utils
|
|
3
|
+
*/
|
|
4
|
+
/** Interface adopted by a type which has deterministic cleanup logic.
|
|
5
|
+
* For example:
|
|
6
|
+
* - Most rendering-related types, such as [[RenderGraphic]] and [[Viewport]], own WebGL resources which must be explicitly released when no longer needed.
|
|
7
|
+
* - Some low-level objects like [[ECDb]] own native types defined in C++ code which must be explicitly released when no longer needed.
|
|
8
|
+
*
|
|
9
|
+
* A similar concept exists in languages like C++ (implemented as "destructors") and C# ("IDisposable").
|
|
10
|
+
* However, because TypeScript and Javascript lack any built-in support for deterministic destruction, it is up to the programmer to ensure dispose() is called appropriately.
|
|
11
|
+
* Failure to do so may result in memory leaks or leaking of other resources.
|
|
12
|
+
*
|
|
13
|
+
* IDisposable tends to be contagious; that is, if a type has members which implement IDisposable, that type should also implement IDisposable to dispose of those members.
|
|
14
|
+
*
|
|
15
|
+
* Implementations of IDisposable tend to be more "low-level" types. The disposal of such types is often handled on your behalf.
|
|
16
|
+
* However, always consult the documentation for an IDisposable type to determine under what circumstances you are expected to explicitly dispose of it.
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export interface IDisposable {
|
|
20
|
+
/** Disposes of any resources owned by this object.
|
|
21
|
+
* @note The object is generally considered unusable after it has been disposed of.
|
|
22
|
+
*/
|
|
23
|
+
dispose(): void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A type guard that checks whether the given argument implements `IDisposable` interface
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export declare function isIDisposable(obj: unknown): obj is IDisposable;
|
|
30
|
+
/** Convenience function for disposing of a disposable object that may be undefined.
|
|
31
|
+
* This is primarily used to simplify implementations of [[IDisposable.dispose]].
|
|
32
|
+
* As a simple example:
|
|
33
|
+
* ```ts
|
|
34
|
+
* class Disposable implements IDisposable {
|
|
35
|
+
* public member1?: DisposableType1;
|
|
36
|
+
* public member2?: DisposableType2;
|
|
37
|
+
*
|
|
38
|
+
* public dispose() {
|
|
39
|
+
* this.member1 = dispose(this.member1); // If member1 is defined, dispose of it and set it to undefined.
|
|
40
|
+
* this.member2 = dispose(this.member2); // Likewise for member2.
|
|
41
|
+
* }
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
* @param disposable The object to be disposed of.
|
|
45
|
+
* @returns undefined
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
export declare function dispose(disposable?: IDisposable): undefined;
|
|
49
|
+
/** Disposes of and empties a list of disposable objects.
|
|
50
|
+
* @param list The list of disposable objects.
|
|
51
|
+
* @returns undefined
|
|
52
|
+
* @public
|
|
53
|
+
*/
|
|
54
|
+
export declare function disposeArray(list?: IDisposable[]): undefined;
|
|
55
|
+
/** A 'using' function which is a substitution for .NET's using statement. It makes sure that 'dispose'
|
|
56
|
+
* is called on the resource no matter if the func returns or throws. If func returns, the return value
|
|
57
|
+
* of this function is equal to return value of func. If func throws, this function also throws (after
|
|
58
|
+
* disposing the resource).
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
export declare function using<T extends IDisposable, TResult>(resources: T | T[], func: (...r: T[]) => TResult): TResult;
|
|
62
|
+
/** A definition of function which may be called to dispose an object
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
export type DisposeFunc = () => void;
|
|
66
|
+
/** A disposable container of disposable objects.
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
export declare class DisposableList implements IDisposable {
|
|
70
|
+
private _disposables;
|
|
71
|
+
/** Creates a disposable list. */
|
|
72
|
+
constructor(disposables?: Array<IDisposable | DisposeFunc>);
|
|
73
|
+
private isDisposable;
|
|
74
|
+
/** Register an object for disposal. */
|
|
75
|
+
add(disposable: IDisposable | DisposeFunc): void;
|
|
76
|
+
/** Unregister disposable object. */
|
|
77
|
+
remove(disposable: IDisposable): void;
|
|
78
|
+
/** Disposes all registered objects. */
|
|
79
|
+
dispose(): void;
|
|
80
|
+
}
|
|
81
81
|
//# sourceMappingURL=Disposable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Disposable.d.ts","sourceRoot":"","sources":["../../src/Disposable.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,WAAW,CAG9D;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,OAAO,CAAC,UAAU,CAAC,EAAE,WAAW,GAAG,SAAS,CAI3D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,GAAG,SAAS,CAS5D;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,KAAK,OAAO,GAAG,OAAO,CAkB/G;AAED;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"Disposable.d.ts","sourceRoot":"","sources":["../../src/Disposable.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,WAAW,CAG9D;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,OAAO,CAAC,UAAU,CAAC,EAAE,WAAW,GAAG,SAAS,CAI3D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,GAAG,SAAS,CAS5D;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,KAAK,OAAO,GAAG,OAAO,CAkB/G;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC;AAQrC;;GAEG;AACH,qBAAa,cAAe,YAAW,WAAW;IAChD,OAAO,CAAC,YAAY,CAAgB;IAEpC,iCAAiC;gBACrB,WAAW,GAAE,KAAK,CAAC,WAAW,GAAG,WAAW,CAAM;IAO9D,OAAO,CAAC,YAAY;IAIpB,uCAAuC;IAChC,GAAG,CAAC,UAAU,EAAE,WAAW,GAAG,WAAW;IAOhD,oCAAoC;IAC7B,MAAM,CAAC,UAAU,EAAE,WAAW,GAAG,IAAI;IAM5C,uCAAuC;IAChC,OAAO,IAAI,IAAI;CAIvB"}
|