@salesforce/lds-ads-bridge 1.128.0 → 1.128.1
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/ads-bridge-perf.js +313 -313
- package/dist/adsBridge.js +1 -1
- package/package.json +1 -1
package/dist/ads-bridge-perf.js
CHANGED
|
@@ -4,324 +4,324 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
var SnapshotState;
|
|
8
|
-
(function (SnapshotState) {
|
|
9
|
-
SnapshotState["Fulfilled"] = "Fulfilled";
|
|
10
|
-
SnapshotState["Unfulfilled"] = "Unfulfilled";
|
|
11
|
-
SnapshotState["Error"] = "Error";
|
|
12
|
-
SnapshotState["Pending"] = "Pending";
|
|
13
|
-
SnapshotState["Stale"] = "Stale";
|
|
7
|
+
var SnapshotState;
|
|
8
|
+
(function (SnapshotState) {
|
|
9
|
+
SnapshotState["Fulfilled"] = "Fulfilled";
|
|
10
|
+
SnapshotState["Unfulfilled"] = "Unfulfilled";
|
|
11
|
+
SnapshotState["Error"] = "Error";
|
|
12
|
+
SnapshotState["Pending"] = "Pending";
|
|
13
|
+
SnapshotState["Stale"] = "Stale";
|
|
14
14
|
})(SnapshotState || (SnapshotState = {}));
|
|
15
15
|
|
|
16
|
-
const { create: create$1, entries, freeze: freeze$1, keys: keys$2, values } = Object;
|
|
17
|
-
const { isArray: isArray$1 } = Array;
|
|
16
|
+
const { create: create$1, entries, freeze: freeze$1, keys: keys$2, values } = Object;
|
|
17
|
+
const { isArray: isArray$1 } = Array;
|
|
18
18
|
const { parse: parse$1, stringify: stringify$1 } = JSON;
|
|
19
19
|
|
|
20
|
-
Promise.resolve();
|
|
21
|
-
|
|
22
|
-
var StoreErrorStatus;
|
|
23
|
-
(function (StoreErrorStatus) {
|
|
24
|
-
StoreErrorStatus[StoreErrorStatus["RESOURCE_NOT_FOUND"] = 404] = "RESOURCE_NOT_FOUND";
|
|
25
|
-
})(StoreErrorStatus || (StoreErrorStatus = {}));
|
|
26
|
-
var StoreRecordType;
|
|
27
|
-
(function (StoreRecordType) {
|
|
28
|
-
StoreRecordType["Error"] = "error";
|
|
29
|
-
})(StoreRecordType || (StoreRecordType = {}));
|
|
30
|
-
var StoreLinkStateValues$1;
|
|
31
|
-
(function (StoreLinkStateValues) {
|
|
32
|
-
StoreLinkStateValues[StoreLinkStateValues["NotPresent"] = 0] = "NotPresent";
|
|
33
|
-
StoreLinkStateValues[StoreLinkStateValues["RefNotPresent"] = 1] = "RefNotPresent";
|
|
34
|
-
StoreLinkStateValues[StoreLinkStateValues["RefPresent"] = 2] = "RefPresent";
|
|
35
|
-
StoreLinkStateValues[StoreLinkStateValues["Null"] = 3] = "Null";
|
|
36
|
-
StoreLinkStateValues[StoreLinkStateValues["Missing"] = 4] = "Missing";
|
|
37
|
-
StoreLinkStateValues[StoreLinkStateValues["Pending"] = 5] = "Pending";
|
|
38
|
-
})(StoreLinkStateValues$1 || (StoreLinkStateValues$1 = {}));
|
|
39
|
-
var StoreResolveResultState;
|
|
40
|
-
(function (StoreResolveResultState) {
|
|
41
|
-
StoreResolveResultState[StoreResolveResultState["Found"] = 0] = "Found";
|
|
42
|
-
StoreResolveResultState[StoreResolveResultState["Error"] = 1] = "Error";
|
|
43
|
-
StoreResolveResultState[StoreResolveResultState["Null"] = 2] = "Null";
|
|
44
|
-
StoreResolveResultState[StoreResolveResultState["NotPresent"] = 3] = "NotPresent";
|
|
45
|
-
StoreResolveResultState[StoreResolveResultState["Stale"] = 4] = "Stale";
|
|
20
|
+
Promise.resolve();
|
|
21
|
+
|
|
22
|
+
var StoreErrorStatus;
|
|
23
|
+
(function (StoreErrorStatus) {
|
|
24
|
+
StoreErrorStatus[StoreErrorStatus["RESOURCE_NOT_FOUND"] = 404] = "RESOURCE_NOT_FOUND";
|
|
25
|
+
})(StoreErrorStatus || (StoreErrorStatus = {}));
|
|
26
|
+
var StoreRecordType;
|
|
27
|
+
(function (StoreRecordType) {
|
|
28
|
+
StoreRecordType["Error"] = "error";
|
|
29
|
+
})(StoreRecordType || (StoreRecordType = {}));
|
|
30
|
+
var StoreLinkStateValues$1;
|
|
31
|
+
(function (StoreLinkStateValues) {
|
|
32
|
+
StoreLinkStateValues[StoreLinkStateValues["NotPresent"] = 0] = "NotPresent";
|
|
33
|
+
StoreLinkStateValues[StoreLinkStateValues["RefNotPresent"] = 1] = "RefNotPresent";
|
|
34
|
+
StoreLinkStateValues[StoreLinkStateValues["RefPresent"] = 2] = "RefPresent";
|
|
35
|
+
StoreLinkStateValues[StoreLinkStateValues["Null"] = 3] = "Null";
|
|
36
|
+
StoreLinkStateValues[StoreLinkStateValues["Missing"] = 4] = "Missing";
|
|
37
|
+
StoreLinkStateValues[StoreLinkStateValues["Pending"] = 5] = "Pending";
|
|
38
|
+
})(StoreLinkStateValues$1 || (StoreLinkStateValues$1 = {}));
|
|
39
|
+
var StoreResolveResultState;
|
|
40
|
+
(function (StoreResolveResultState) {
|
|
41
|
+
StoreResolveResultState[StoreResolveResultState["Found"] = 0] = "Found";
|
|
42
|
+
StoreResolveResultState[StoreResolveResultState["Error"] = 1] = "Error";
|
|
43
|
+
StoreResolveResultState[StoreResolveResultState["Null"] = 2] = "Null";
|
|
44
|
+
StoreResolveResultState[StoreResolveResultState["NotPresent"] = 3] = "NotPresent";
|
|
45
|
+
StoreResolveResultState[StoreResolveResultState["Stale"] = 4] = "Stale";
|
|
46
46
|
})(StoreResolveResultState || (StoreResolveResultState = {}));
|
|
47
47
|
|
|
48
|
-
/**
|
|
49
|
-
* A deterministic JSON stringify implementation. Heavily adapted from https://github.com/epoberezkin/fast-json-stable-stringify.
|
|
50
|
-
* This is needed because insertion order for JSON.stringify(object) affects output:
|
|
51
|
-
* JSON.stringify({a: 1, b: 2})
|
|
52
|
-
* "{"a":1,"b":2}"
|
|
53
|
-
* JSON.stringify({b: 2, a: 1})
|
|
54
|
-
* "{"b":2,"a":1}"
|
|
55
|
-
* @param data Data to be JSON-stringified.
|
|
56
|
-
* @returns JSON.stringified value with consistent ordering of keys.
|
|
57
|
-
*/
|
|
58
|
-
function stableJSONStringify(node) {
|
|
59
|
-
// This is for Date values.
|
|
60
|
-
if (node && node.toJSON && typeof node.toJSON === 'function') {
|
|
61
|
-
// eslint-disable-next-line no-param-reassign
|
|
62
|
-
node = node.toJSON();
|
|
63
|
-
}
|
|
64
|
-
if (node === undefined) {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
if (typeof node === 'number') {
|
|
68
|
-
return isFinite(node) ? '' + node : 'null';
|
|
69
|
-
}
|
|
70
|
-
if (typeof node !== 'object') {
|
|
71
|
-
return stringify$1(node);
|
|
72
|
-
}
|
|
73
|
-
let i;
|
|
74
|
-
let out;
|
|
75
|
-
if (isArray$1(node)) {
|
|
76
|
-
out = '[';
|
|
77
|
-
for (i = 0; i < node.length; i++) {
|
|
78
|
-
if (i) {
|
|
79
|
-
out += ',';
|
|
80
|
-
}
|
|
81
|
-
out += stableJSONStringify(node[i]) || 'null';
|
|
82
|
-
}
|
|
83
|
-
return out + ']';
|
|
84
|
-
}
|
|
85
|
-
if (node === null) {
|
|
86
|
-
return 'null';
|
|
87
|
-
}
|
|
88
|
-
const keys$1 = keys$2(node).sort();
|
|
89
|
-
out = '';
|
|
90
|
-
for (i = 0; i < keys$1.length; i++) {
|
|
91
|
-
const key = keys$1[i];
|
|
92
|
-
const value = stableJSONStringify(node[key]);
|
|
93
|
-
if (!value) {
|
|
94
|
-
continue;
|
|
95
|
-
}
|
|
96
|
-
if (out) {
|
|
97
|
-
out += ',';
|
|
98
|
-
}
|
|
99
|
-
out += stringify$1(key) + ':' + value;
|
|
100
|
-
}
|
|
101
|
-
return '{' + out + '}';
|
|
102
|
-
}
|
|
103
|
-
const structuredKeySerializationCache = new WeakMap();
|
|
104
|
-
function serializeStructuredKey(key) {
|
|
105
|
-
if (typeof key === 'string') {
|
|
106
|
-
return key;
|
|
107
|
-
}
|
|
108
|
-
const cacheValue = structuredKeySerializationCache.get(key);
|
|
109
|
-
if (cacheValue === undefined) {
|
|
110
|
-
const value = stableJSONStringify(key);
|
|
111
|
-
structuredKeySerializationCache.set(key, value);
|
|
112
|
-
return value;
|
|
113
|
-
}
|
|
114
|
-
return cacheValue;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
const undefinedKeyError$1 = 'Undefined value used in StoreKeyMap operation';
|
|
118
|
-
class StoreKeyMap {
|
|
119
|
-
constructor() {
|
|
120
|
-
this.keyMap = new Map();
|
|
121
|
-
this.valueMap = new Map();
|
|
122
|
-
}
|
|
123
|
-
clear() {
|
|
124
|
-
this.valueMap.clear();
|
|
125
|
-
this.keyMap.clear();
|
|
126
|
-
}
|
|
127
|
-
delete(key) {
|
|
128
|
-
const stringifiedKey = serializeStructuredKey(key);
|
|
129
|
-
if (stringifiedKey !== undefined) {
|
|
130
|
-
this.keyMap.delete(stringifiedKey);
|
|
131
|
-
return this.valueMap.delete(stringifiedKey);
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
throw new Error(`${undefinedKeyError$1}: delete`);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
entries() {
|
|
138
|
-
const recordEntries = this.valueMap.entries();
|
|
139
|
-
const keyRecordArray = [];
|
|
140
|
-
for (const [stringifiedKey, value] of Array.from(recordEntries)) {
|
|
141
|
-
const structuredKey = this.keyMap.get(stringifiedKey);
|
|
142
|
-
if (structuredKey !== undefined) {
|
|
143
|
-
keyRecordArray.push([structuredKey, value]);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
return keyRecordArray.values();
|
|
147
|
-
}
|
|
148
|
-
forEachKey(callbackFn, thisArg) {
|
|
149
|
-
return this.keyMap.forEach(callbackFn, thisArg);
|
|
150
|
-
}
|
|
151
|
-
forEachValue(callbackFn, thisArg) {
|
|
152
|
-
return this.valueMap.forEach(callbackFn, thisArg);
|
|
153
|
-
}
|
|
154
|
-
get(key) {
|
|
155
|
-
const stringifiedKey = serializeStructuredKey(key);
|
|
156
|
-
if (stringifiedKey !== undefined) {
|
|
157
|
-
return this.valueMap.get(stringifiedKey);
|
|
158
|
-
}
|
|
159
|
-
else {
|
|
160
|
-
throw new Error(`${undefinedKeyError$1}: get`);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
has(key) {
|
|
164
|
-
const stringifiedKey = serializeStructuredKey(key);
|
|
165
|
-
if (stringifiedKey !== undefined) {
|
|
166
|
-
return this.valueMap.has(stringifiedKey);
|
|
167
|
-
}
|
|
168
|
-
else {
|
|
169
|
-
throw new Error(`${undefinedKeyError$1}: has`);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
keys() {
|
|
173
|
-
return this.keyMap.values();
|
|
174
|
-
}
|
|
175
|
-
keysAsArray() {
|
|
176
|
-
return Array.from(this.keys());
|
|
177
|
-
}
|
|
178
|
-
keysAsStrings() {
|
|
179
|
-
return this.keyMap.keys();
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Merges in the values of the passed-in StoreKeyMap. Overwrites existing values.
|
|
183
|
-
* @param sourceSet - The StoreKeyMap to merge in.
|
|
184
|
-
*/
|
|
185
|
-
merge(sourceMap) {
|
|
186
|
-
sourceMap.keyMap.forEach((value, key) => {
|
|
187
|
-
this.keyMap.set(key, value);
|
|
188
|
-
});
|
|
189
|
-
sourceMap.valueMap.forEach((value, key) => {
|
|
190
|
-
this.valueMap.set(key, value);
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
set(key, value) {
|
|
194
|
-
const stringifiedKey = serializeStructuredKey(key);
|
|
195
|
-
if (stringifiedKey !== undefined) {
|
|
196
|
-
this.keyMap.set(stringifiedKey, key);
|
|
197
|
-
return this.valueMap.set(stringifiedKey, value);
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
throw new Error(`${undefinedKeyError$1}: set`);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
size() {
|
|
204
|
-
return this.valueMap.size;
|
|
205
|
-
}
|
|
206
|
-
values() {
|
|
207
|
-
return this.valueMap.values();
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
const undefinedKeyError = 'Undefined value used in StoreKeySet operation';
|
|
212
|
-
class StoreKeySet {
|
|
213
|
-
constructor() {
|
|
214
|
-
this.set = new Set();
|
|
215
|
-
this.valueMap = new Map();
|
|
216
|
-
}
|
|
217
|
-
add(key) {
|
|
218
|
-
const stringifiedKey = serializeStructuredKey(key);
|
|
219
|
-
if (stringifiedKey !== undefined) {
|
|
220
|
-
this.set.add(stringifiedKey);
|
|
221
|
-
this.valueMap.set(stringifiedKey, key);
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
throw new Error(`${undefinedKeyError}: add`);
|
|
225
|
-
}
|
|
226
|
-
return this;
|
|
227
|
-
}
|
|
228
|
-
clear() {
|
|
229
|
-
this.set.clear();
|
|
230
|
-
this.valueMap.clear();
|
|
231
|
-
}
|
|
232
|
-
delete(key) {
|
|
233
|
-
const stringifiedKey = serializeStructuredKey(key);
|
|
234
|
-
if (stringifiedKey !== undefined) {
|
|
235
|
-
this.set.delete(stringifiedKey);
|
|
236
|
-
return this.valueMap.delete(stringifiedKey);
|
|
237
|
-
}
|
|
238
|
-
else {
|
|
239
|
-
throw new Error(`${undefinedKeyError}: delete`);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
entries() {
|
|
243
|
-
return this.valueMap.entries();
|
|
244
|
-
}
|
|
245
|
-
forEach(callbackFn, thisArg) {
|
|
246
|
-
return this.valueMap.forEach(callbackFn, thisArg);
|
|
247
|
-
}
|
|
248
|
-
has(key) {
|
|
249
|
-
const stringifiedKey = serializeStructuredKey(key);
|
|
250
|
-
if (stringifiedKey !== undefined) {
|
|
251
|
-
return this.set.has(stringifiedKey);
|
|
252
|
-
}
|
|
253
|
-
else {
|
|
254
|
-
throw new Error(`${undefinedKeyError}: has`);
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
keys() {
|
|
258
|
-
return this.valueMap.values();
|
|
259
|
-
}
|
|
260
|
-
keysAsArray() {
|
|
261
|
-
return Array.from(this.keys());
|
|
262
|
-
}
|
|
263
|
-
keysAsStrings() {
|
|
264
|
-
return this.set.keys();
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* Merges in the values of the passed-in StoreKeySet. Overwrites existing values.
|
|
268
|
-
* @param sourceSet - The StoreKeySet to merge in.
|
|
269
|
-
*/
|
|
270
|
-
merge(sourceSet) {
|
|
271
|
-
sourceSet.set.forEach((value) => {
|
|
272
|
-
this.set.add(value);
|
|
273
|
-
});
|
|
274
|
-
sourceSet.valueMap.forEach((value, key) => {
|
|
275
|
-
this.valueMap.set(key, value);
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
size() {
|
|
279
|
-
return this.set.size;
|
|
280
|
-
}
|
|
281
|
-
values() {
|
|
282
|
-
return this.valueMap.values();
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
var HttpStatusCode;
|
|
286
|
-
(function (HttpStatusCode) {
|
|
287
|
-
HttpStatusCode[HttpStatusCode["Ok"] = 200] = "Ok";
|
|
288
|
-
HttpStatusCode[HttpStatusCode["Created"] = 201] = "Created";
|
|
289
|
-
HttpStatusCode[HttpStatusCode["NoContent"] = 204] = "NoContent";
|
|
290
|
-
HttpStatusCode[HttpStatusCode["NotModified"] = 304] = "NotModified";
|
|
291
|
-
HttpStatusCode[HttpStatusCode["BadRequest"] = 400] = "BadRequest";
|
|
292
|
-
HttpStatusCode[HttpStatusCode["Unauthorized"] = 401] = "Unauthorized";
|
|
293
|
-
HttpStatusCode[HttpStatusCode["Forbidden"] = 403] = "Forbidden";
|
|
294
|
-
HttpStatusCode[HttpStatusCode["NotFound"] = 404] = "NotFound";
|
|
295
|
-
HttpStatusCode[HttpStatusCode["ServerError"] = 500] = "ServerError";
|
|
296
|
-
HttpStatusCode[HttpStatusCode["GatewayTimeout"] = 504] = "GatewayTimeout";
|
|
297
|
-
})(HttpStatusCode || (HttpStatusCode = {}));
|
|
298
|
-
var GraphNodeType;
|
|
299
|
-
(function (GraphNodeType) {
|
|
300
|
-
GraphNodeType["Link"] = "Link";
|
|
301
|
-
GraphNodeType["Node"] = "Node";
|
|
302
|
-
GraphNodeType["Error"] = "Error";
|
|
303
|
-
GraphNodeType["Locked"] = "Locked";
|
|
304
|
-
})(GraphNodeType || (GraphNodeType = {}));
|
|
305
|
-
|
|
306
|
-
var StoreLinkStateValues;
|
|
307
|
-
(function (StoreLinkStateValues) {
|
|
308
|
-
StoreLinkStateValues[StoreLinkStateValues["NotPresent"] = 0] = "NotPresent";
|
|
309
|
-
StoreLinkStateValues[StoreLinkStateValues["RefNotPresent"] = 1] = "RefNotPresent";
|
|
310
|
-
StoreLinkStateValues[StoreLinkStateValues["RefPresent"] = 2] = "RefPresent";
|
|
311
|
-
StoreLinkStateValues[StoreLinkStateValues["Null"] = 3] = "Null";
|
|
312
|
-
StoreLinkStateValues[StoreLinkStateValues["Missing"] = 4] = "Missing";
|
|
313
|
-
StoreLinkStateValues[StoreLinkStateValues["Pending"] = 5] = "Pending";
|
|
314
|
-
})(StoreLinkStateValues || (StoreLinkStateValues = {}));
|
|
315
|
-
var FragmentReadResultState;
|
|
316
|
-
(function (FragmentReadResultState) {
|
|
317
|
-
FragmentReadResultState[FragmentReadResultState["Missing"] = 0] = "Missing";
|
|
318
|
-
FragmentReadResultState[FragmentReadResultState["Success"] = 1] = "Success";
|
|
319
|
-
FragmentReadResultState[FragmentReadResultState["Error"] = 2] = "Error";
|
|
320
|
-
})(FragmentReadResultState || (FragmentReadResultState = {}));
|
|
321
|
-
({
|
|
322
|
-
state: FragmentReadResultState.Missing,
|
|
323
|
-
});
|
|
324
|
-
// engine version: 0.138.
|
|
48
|
+
/**
|
|
49
|
+
* A deterministic JSON stringify implementation. Heavily adapted from https://github.com/epoberezkin/fast-json-stable-stringify.
|
|
50
|
+
* This is needed because insertion order for JSON.stringify(object) affects output:
|
|
51
|
+
* JSON.stringify({a: 1, b: 2})
|
|
52
|
+
* "{"a":1,"b":2}"
|
|
53
|
+
* JSON.stringify({b: 2, a: 1})
|
|
54
|
+
* "{"b":2,"a":1}"
|
|
55
|
+
* @param data Data to be JSON-stringified.
|
|
56
|
+
* @returns JSON.stringified value with consistent ordering of keys.
|
|
57
|
+
*/
|
|
58
|
+
function stableJSONStringify(node) {
|
|
59
|
+
// This is for Date values.
|
|
60
|
+
if (node && node.toJSON && typeof node.toJSON === 'function') {
|
|
61
|
+
// eslint-disable-next-line no-param-reassign
|
|
62
|
+
node = node.toJSON();
|
|
63
|
+
}
|
|
64
|
+
if (node === undefined) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (typeof node === 'number') {
|
|
68
|
+
return isFinite(node) ? '' + node : 'null';
|
|
69
|
+
}
|
|
70
|
+
if (typeof node !== 'object') {
|
|
71
|
+
return stringify$1(node);
|
|
72
|
+
}
|
|
73
|
+
let i;
|
|
74
|
+
let out;
|
|
75
|
+
if (isArray$1(node)) {
|
|
76
|
+
out = '[';
|
|
77
|
+
for (i = 0; i < node.length; i++) {
|
|
78
|
+
if (i) {
|
|
79
|
+
out += ',';
|
|
80
|
+
}
|
|
81
|
+
out += stableJSONStringify(node[i]) || 'null';
|
|
82
|
+
}
|
|
83
|
+
return out + ']';
|
|
84
|
+
}
|
|
85
|
+
if (node === null) {
|
|
86
|
+
return 'null';
|
|
87
|
+
}
|
|
88
|
+
const keys$1 = keys$2(node).sort();
|
|
89
|
+
out = '';
|
|
90
|
+
for (i = 0; i < keys$1.length; i++) {
|
|
91
|
+
const key = keys$1[i];
|
|
92
|
+
const value = stableJSONStringify(node[key]);
|
|
93
|
+
if (!value) {
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
if (out) {
|
|
97
|
+
out += ',';
|
|
98
|
+
}
|
|
99
|
+
out += stringify$1(key) + ':' + value;
|
|
100
|
+
}
|
|
101
|
+
return '{' + out + '}';
|
|
102
|
+
}
|
|
103
|
+
const structuredKeySerializationCache = new WeakMap();
|
|
104
|
+
function serializeStructuredKey(key) {
|
|
105
|
+
if (typeof key === 'string') {
|
|
106
|
+
return key;
|
|
107
|
+
}
|
|
108
|
+
const cacheValue = structuredKeySerializationCache.get(key);
|
|
109
|
+
if (cacheValue === undefined) {
|
|
110
|
+
const value = stableJSONStringify(key);
|
|
111
|
+
structuredKeySerializationCache.set(key, value);
|
|
112
|
+
return value;
|
|
113
|
+
}
|
|
114
|
+
return cacheValue;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const undefinedKeyError$1 = 'Undefined value used in StoreKeyMap operation';
|
|
118
|
+
class StoreKeyMap {
|
|
119
|
+
constructor() {
|
|
120
|
+
this.keyMap = new Map();
|
|
121
|
+
this.valueMap = new Map();
|
|
122
|
+
}
|
|
123
|
+
clear() {
|
|
124
|
+
this.valueMap.clear();
|
|
125
|
+
this.keyMap.clear();
|
|
126
|
+
}
|
|
127
|
+
delete(key) {
|
|
128
|
+
const stringifiedKey = serializeStructuredKey(key);
|
|
129
|
+
if (stringifiedKey !== undefined) {
|
|
130
|
+
this.keyMap.delete(stringifiedKey);
|
|
131
|
+
return this.valueMap.delete(stringifiedKey);
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
throw new Error(`${undefinedKeyError$1}: delete`);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
entries() {
|
|
138
|
+
const recordEntries = this.valueMap.entries();
|
|
139
|
+
const keyRecordArray = [];
|
|
140
|
+
for (const [stringifiedKey, value] of Array.from(recordEntries)) {
|
|
141
|
+
const structuredKey = this.keyMap.get(stringifiedKey);
|
|
142
|
+
if (structuredKey !== undefined) {
|
|
143
|
+
keyRecordArray.push([structuredKey, value]);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return keyRecordArray.values();
|
|
147
|
+
}
|
|
148
|
+
forEachKey(callbackFn, thisArg) {
|
|
149
|
+
return this.keyMap.forEach(callbackFn, thisArg);
|
|
150
|
+
}
|
|
151
|
+
forEachValue(callbackFn, thisArg) {
|
|
152
|
+
return this.valueMap.forEach(callbackFn, thisArg);
|
|
153
|
+
}
|
|
154
|
+
get(key) {
|
|
155
|
+
const stringifiedKey = serializeStructuredKey(key);
|
|
156
|
+
if (stringifiedKey !== undefined) {
|
|
157
|
+
return this.valueMap.get(stringifiedKey);
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
throw new Error(`${undefinedKeyError$1}: get`);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
has(key) {
|
|
164
|
+
const stringifiedKey = serializeStructuredKey(key);
|
|
165
|
+
if (stringifiedKey !== undefined) {
|
|
166
|
+
return this.valueMap.has(stringifiedKey);
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
throw new Error(`${undefinedKeyError$1}: has`);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
keys() {
|
|
173
|
+
return this.keyMap.values();
|
|
174
|
+
}
|
|
175
|
+
keysAsArray() {
|
|
176
|
+
return Array.from(this.keys());
|
|
177
|
+
}
|
|
178
|
+
keysAsStrings() {
|
|
179
|
+
return this.keyMap.keys();
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Merges in the values of the passed-in StoreKeyMap. Overwrites existing values.
|
|
183
|
+
* @param sourceSet - The StoreKeyMap to merge in.
|
|
184
|
+
*/
|
|
185
|
+
merge(sourceMap) {
|
|
186
|
+
sourceMap.keyMap.forEach((value, key) => {
|
|
187
|
+
this.keyMap.set(key, value);
|
|
188
|
+
});
|
|
189
|
+
sourceMap.valueMap.forEach((value, key) => {
|
|
190
|
+
this.valueMap.set(key, value);
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
set(key, value) {
|
|
194
|
+
const stringifiedKey = serializeStructuredKey(key);
|
|
195
|
+
if (stringifiedKey !== undefined) {
|
|
196
|
+
this.keyMap.set(stringifiedKey, key);
|
|
197
|
+
return this.valueMap.set(stringifiedKey, value);
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
throw new Error(`${undefinedKeyError$1}: set`);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
size() {
|
|
204
|
+
return this.valueMap.size;
|
|
205
|
+
}
|
|
206
|
+
values() {
|
|
207
|
+
return this.valueMap.values();
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const undefinedKeyError = 'Undefined value used in StoreKeySet operation';
|
|
212
|
+
class StoreKeySet {
|
|
213
|
+
constructor() {
|
|
214
|
+
this.set = new Set();
|
|
215
|
+
this.valueMap = new Map();
|
|
216
|
+
}
|
|
217
|
+
add(key) {
|
|
218
|
+
const stringifiedKey = serializeStructuredKey(key);
|
|
219
|
+
if (stringifiedKey !== undefined) {
|
|
220
|
+
this.set.add(stringifiedKey);
|
|
221
|
+
this.valueMap.set(stringifiedKey, key);
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
throw new Error(`${undefinedKeyError}: add`);
|
|
225
|
+
}
|
|
226
|
+
return this;
|
|
227
|
+
}
|
|
228
|
+
clear() {
|
|
229
|
+
this.set.clear();
|
|
230
|
+
this.valueMap.clear();
|
|
231
|
+
}
|
|
232
|
+
delete(key) {
|
|
233
|
+
const stringifiedKey = serializeStructuredKey(key);
|
|
234
|
+
if (stringifiedKey !== undefined) {
|
|
235
|
+
this.set.delete(stringifiedKey);
|
|
236
|
+
return this.valueMap.delete(stringifiedKey);
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
throw new Error(`${undefinedKeyError}: delete`);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
entries() {
|
|
243
|
+
return this.valueMap.entries();
|
|
244
|
+
}
|
|
245
|
+
forEach(callbackFn, thisArg) {
|
|
246
|
+
return this.valueMap.forEach(callbackFn, thisArg);
|
|
247
|
+
}
|
|
248
|
+
has(key) {
|
|
249
|
+
const stringifiedKey = serializeStructuredKey(key);
|
|
250
|
+
if (stringifiedKey !== undefined) {
|
|
251
|
+
return this.set.has(stringifiedKey);
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
throw new Error(`${undefinedKeyError}: has`);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
keys() {
|
|
258
|
+
return this.valueMap.values();
|
|
259
|
+
}
|
|
260
|
+
keysAsArray() {
|
|
261
|
+
return Array.from(this.keys());
|
|
262
|
+
}
|
|
263
|
+
keysAsStrings() {
|
|
264
|
+
return this.set.keys();
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Merges in the values of the passed-in StoreKeySet. Overwrites existing values.
|
|
268
|
+
* @param sourceSet - The StoreKeySet to merge in.
|
|
269
|
+
*/
|
|
270
|
+
merge(sourceSet) {
|
|
271
|
+
sourceSet.set.forEach((value) => {
|
|
272
|
+
this.set.add(value);
|
|
273
|
+
});
|
|
274
|
+
sourceSet.valueMap.forEach((value, key) => {
|
|
275
|
+
this.valueMap.set(key, value);
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
size() {
|
|
279
|
+
return this.set.size;
|
|
280
|
+
}
|
|
281
|
+
values() {
|
|
282
|
+
return this.valueMap.values();
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
var HttpStatusCode;
|
|
286
|
+
(function (HttpStatusCode) {
|
|
287
|
+
HttpStatusCode[HttpStatusCode["Ok"] = 200] = "Ok";
|
|
288
|
+
HttpStatusCode[HttpStatusCode["Created"] = 201] = "Created";
|
|
289
|
+
HttpStatusCode[HttpStatusCode["NoContent"] = 204] = "NoContent";
|
|
290
|
+
HttpStatusCode[HttpStatusCode["NotModified"] = 304] = "NotModified";
|
|
291
|
+
HttpStatusCode[HttpStatusCode["BadRequest"] = 400] = "BadRequest";
|
|
292
|
+
HttpStatusCode[HttpStatusCode["Unauthorized"] = 401] = "Unauthorized";
|
|
293
|
+
HttpStatusCode[HttpStatusCode["Forbidden"] = 403] = "Forbidden";
|
|
294
|
+
HttpStatusCode[HttpStatusCode["NotFound"] = 404] = "NotFound";
|
|
295
|
+
HttpStatusCode[HttpStatusCode["ServerError"] = 500] = "ServerError";
|
|
296
|
+
HttpStatusCode[HttpStatusCode["GatewayTimeout"] = 504] = "GatewayTimeout";
|
|
297
|
+
})(HttpStatusCode || (HttpStatusCode = {}));
|
|
298
|
+
var GraphNodeType;
|
|
299
|
+
(function (GraphNodeType) {
|
|
300
|
+
GraphNodeType["Link"] = "Link";
|
|
301
|
+
GraphNodeType["Node"] = "Node";
|
|
302
|
+
GraphNodeType["Error"] = "Error";
|
|
303
|
+
GraphNodeType["Locked"] = "Locked";
|
|
304
|
+
})(GraphNodeType || (GraphNodeType = {}));
|
|
305
|
+
|
|
306
|
+
var StoreLinkStateValues;
|
|
307
|
+
(function (StoreLinkStateValues) {
|
|
308
|
+
StoreLinkStateValues[StoreLinkStateValues["NotPresent"] = 0] = "NotPresent";
|
|
309
|
+
StoreLinkStateValues[StoreLinkStateValues["RefNotPresent"] = 1] = "RefNotPresent";
|
|
310
|
+
StoreLinkStateValues[StoreLinkStateValues["RefPresent"] = 2] = "RefPresent";
|
|
311
|
+
StoreLinkStateValues[StoreLinkStateValues["Null"] = 3] = "Null";
|
|
312
|
+
StoreLinkStateValues[StoreLinkStateValues["Missing"] = 4] = "Missing";
|
|
313
|
+
StoreLinkStateValues[StoreLinkStateValues["Pending"] = 5] = "Pending";
|
|
314
|
+
})(StoreLinkStateValues || (StoreLinkStateValues = {}));
|
|
315
|
+
var FragmentReadResultState;
|
|
316
|
+
(function (FragmentReadResultState) {
|
|
317
|
+
FragmentReadResultState[FragmentReadResultState["Missing"] = 0] = "Missing";
|
|
318
|
+
FragmentReadResultState[FragmentReadResultState["Success"] = 1] = "Success";
|
|
319
|
+
FragmentReadResultState[FragmentReadResultState["Error"] = 2] = "Error";
|
|
320
|
+
})(FragmentReadResultState || (FragmentReadResultState = {}));
|
|
321
|
+
({
|
|
322
|
+
state: FragmentReadResultState.Missing,
|
|
323
|
+
});
|
|
324
|
+
// engine version: 0.138.3-dee50acf
|
|
325
325
|
|
|
326
326
|
/**
|
|
327
327
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -368,7 +368,7 @@ const callbacks$1 = [];
|
|
|
368
368
|
function register(r) {
|
|
369
369
|
callbacks$1.forEach((callback) => callback(r));
|
|
370
370
|
}
|
|
371
|
-
// version: 1.128.
|
|
371
|
+
// version: 1.128.1-55cd38df6
|
|
372
372
|
|
|
373
373
|
/**
|
|
374
374
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
package/dist/adsBridge.js
CHANGED