@interopio/fdc3 2.5.1 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +4 -0
- package/dist/fdc3.electron.es.js +2659 -686
- package/dist/fdc3.electron.umd.js +2659 -686
- package/dist/fdc3.es.js +2659 -686
- package/dist/fdc3.umd.js +2659 -686
- package/package.json +5 -6
package/dist/fdc3.es.js
CHANGED
|
@@ -29,10 +29,10 @@ function getAugmentedNamespace(n) {
|
|
|
29
29
|
return a;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
var toStr$
|
|
32
|
+
var toStr$8 = Object.prototype.toString;
|
|
33
33
|
|
|
34
34
|
var isArguments$3 = function isArguments(value) {
|
|
35
|
-
var str = toStr$
|
|
35
|
+
var str = toStr$8.call(value);
|
|
36
36
|
var isArgs = str === '[object Arguments]';
|
|
37
37
|
if (!isArgs) {
|
|
38
38
|
isArgs = str !== '[object Array]' &&
|
|
@@ -40,17 +40,17 @@ var isArguments$3 = function isArguments(value) {
|
|
|
40
40
|
typeof value === 'object' &&
|
|
41
41
|
typeof value.length === 'number' &&
|
|
42
42
|
value.length >= 0 &&
|
|
43
|
-
toStr$
|
|
43
|
+
toStr$8.call(value.callee) === '[object Function]';
|
|
44
44
|
}
|
|
45
45
|
return isArgs;
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
var implementation$
|
|
49
|
-
var hasRequiredImplementation;
|
|
48
|
+
var implementation$a;
|
|
49
|
+
var hasRequiredImplementation$1;
|
|
50
50
|
|
|
51
|
-
function requireImplementation () {
|
|
52
|
-
if (hasRequiredImplementation) return implementation$
|
|
53
|
-
hasRequiredImplementation = 1;
|
|
51
|
+
function requireImplementation$1 () {
|
|
52
|
+
if (hasRequiredImplementation$1) return implementation$a;
|
|
53
|
+
hasRequiredImplementation$1 = 1;
|
|
54
54
|
|
|
55
55
|
var keysShim;
|
|
56
56
|
if (!Object.keys) {
|
|
@@ -171,15 +171,15 @@ function requireImplementation () {
|
|
|
171
171
|
return theKeys;
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
|
-
implementation$
|
|
175
|
-
return implementation$
|
|
174
|
+
implementation$a = keysShim;
|
|
175
|
+
return implementation$a;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
var slice = Array.prototype.slice;
|
|
179
179
|
var isArgs = isArguments$3;
|
|
180
180
|
|
|
181
181
|
var origKeys = Object.keys;
|
|
182
|
-
var keysShim = origKeys ? function keys(o) { return origKeys(o); } : requireImplementation();
|
|
182
|
+
var keysShim = origKeys ? function keys(o) { return origKeys(o); } : requireImplementation$1();
|
|
183
183
|
|
|
184
184
|
var originalKeys = Object.keys;
|
|
185
185
|
|
|
@@ -206,6 +206,274 @@ keysShim.shim = function shimObjectKeys() {
|
|
|
206
206
|
|
|
207
207
|
var objectKeys$2 = keysShim;
|
|
208
208
|
|
|
209
|
+
/** @type {import('.')} */
|
|
210
|
+
var $defineProperty$3 = Object.defineProperty || false;
|
|
211
|
+
if ($defineProperty$3) {
|
|
212
|
+
try {
|
|
213
|
+
$defineProperty$3({}, 'a', { value: 1 });
|
|
214
|
+
} catch (e) {
|
|
215
|
+
// IE 8 has a broken defineProperty
|
|
216
|
+
$defineProperty$3 = false;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
var esDefineProperty = $defineProperty$3;
|
|
221
|
+
|
|
222
|
+
/** @type {import('./syntax')} */
|
|
223
|
+
var syntax = SyntaxError;
|
|
224
|
+
|
|
225
|
+
/** @type {import('./type')} */
|
|
226
|
+
var type = TypeError;
|
|
227
|
+
|
|
228
|
+
/** @type {import('./gOPD')} */
|
|
229
|
+
var gOPD$5 = Object.getOwnPropertyDescriptor;
|
|
230
|
+
|
|
231
|
+
/** @type {import('.')} */
|
|
232
|
+
var $gOPD$2 = gOPD$5;
|
|
233
|
+
|
|
234
|
+
if ($gOPD$2) {
|
|
235
|
+
try {
|
|
236
|
+
$gOPD$2([], 'length');
|
|
237
|
+
} catch (e) {
|
|
238
|
+
// IE 8 has a broken gOPD
|
|
239
|
+
$gOPD$2 = null;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
var gopd$1 = $gOPD$2;
|
|
244
|
+
|
|
245
|
+
var $defineProperty$2 = esDefineProperty;
|
|
246
|
+
|
|
247
|
+
var $SyntaxError$2 = syntax;
|
|
248
|
+
var $TypeError$a = type;
|
|
249
|
+
|
|
250
|
+
var gopd = gopd$1;
|
|
251
|
+
|
|
252
|
+
/** @type {import('.')} */
|
|
253
|
+
var defineDataProperty$1 = function defineDataProperty(
|
|
254
|
+
obj,
|
|
255
|
+
property,
|
|
256
|
+
value
|
|
257
|
+
) {
|
|
258
|
+
if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
|
259
|
+
throw new $TypeError$a('`obj` must be an object or a function`');
|
|
260
|
+
}
|
|
261
|
+
if (typeof property !== 'string' && typeof property !== 'symbol') {
|
|
262
|
+
throw new $TypeError$a('`property` must be a string or a symbol`');
|
|
263
|
+
}
|
|
264
|
+
if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
|
|
265
|
+
throw new $TypeError$a('`nonEnumerable`, if provided, must be a boolean or null');
|
|
266
|
+
}
|
|
267
|
+
if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
|
|
268
|
+
throw new $TypeError$a('`nonWritable`, if provided, must be a boolean or null');
|
|
269
|
+
}
|
|
270
|
+
if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
|
|
271
|
+
throw new $TypeError$a('`nonConfigurable`, if provided, must be a boolean or null');
|
|
272
|
+
}
|
|
273
|
+
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
|
|
274
|
+
throw new $TypeError$a('`loose`, if provided, must be a boolean');
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
|
278
|
+
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
|
279
|
+
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
|
280
|
+
var loose = arguments.length > 6 ? arguments[6] : false;
|
|
281
|
+
|
|
282
|
+
/* @type {false | TypedPropertyDescriptor<unknown>} */
|
|
283
|
+
var desc = !!gopd && gopd(obj, property);
|
|
284
|
+
|
|
285
|
+
if ($defineProperty$2) {
|
|
286
|
+
$defineProperty$2(obj, property, {
|
|
287
|
+
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
|
288
|
+
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
|
289
|
+
value: value,
|
|
290
|
+
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
|
291
|
+
});
|
|
292
|
+
} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
|
|
293
|
+
// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
|
|
294
|
+
obj[property] = value; // eslint-disable-line no-param-reassign
|
|
295
|
+
} else {
|
|
296
|
+
throw new $SyntaxError$2('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
var $defineProperty$1 = esDefineProperty;
|
|
301
|
+
|
|
302
|
+
var hasPropertyDescriptors = function hasPropertyDescriptors() {
|
|
303
|
+
return !!$defineProperty$1;
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
307
|
+
// node v0.6 has a bug where array lengths can be Set but not Defined
|
|
308
|
+
if (!$defineProperty$1) {
|
|
309
|
+
return null;
|
|
310
|
+
}
|
|
311
|
+
try {
|
|
312
|
+
return $defineProperty$1([], 'length', { value: 1 }).length !== 1;
|
|
313
|
+
} catch (e) {
|
|
314
|
+
// In Firefox 4-22, defining length on an array throws an exception.
|
|
315
|
+
return true;
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
var hasPropertyDescriptors_1 = hasPropertyDescriptors;
|
|
320
|
+
|
|
321
|
+
var keys = objectKeys$2;
|
|
322
|
+
var hasSymbols$5 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
|
|
323
|
+
|
|
324
|
+
var toStr$7 = Object.prototype.toString;
|
|
325
|
+
var concat = Array.prototype.concat;
|
|
326
|
+
var defineDataProperty = defineDataProperty$1;
|
|
327
|
+
|
|
328
|
+
var isFunction = function (fn) {
|
|
329
|
+
return typeof fn === 'function' && toStr$7.call(fn) === '[object Function]';
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
var supportsDescriptors$2 = hasPropertyDescriptors_1();
|
|
333
|
+
|
|
334
|
+
var defineProperty$1 = function (object, name, value, predicate) {
|
|
335
|
+
if (name in object) {
|
|
336
|
+
if (predicate === true) {
|
|
337
|
+
if (object[name] === value) {
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
} else if (!isFunction(predicate) || !predicate()) {
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
if (supportsDescriptors$2) {
|
|
346
|
+
defineDataProperty(object, name, value, true);
|
|
347
|
+
} else {
|
|
348
|
+
defineDataProperty(object, name, value);
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
var defineProperties$1 = function (object, map) {
|
|
353
|
+
var predicates = arguments.length > 2 ? arguments[2] : {};
|
|
354
|
+
var props = keys(map);
|
|
355
|
+
if (hasSymbols$5) {
|
|
356
|
+
props = concat.call(props, Object.getOwnPropertySymbols(map));
|
|
357
|
+
}
|
|
358
|
+
for (var i = 0; i < props.length; i += 1) {
|
|
359
|
+
defineProperty$1(object, props[i], map[props[i]], predicates[props[i]]);
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
defineProperties$1.supportsDescriptors = !!supportsDescriptors$2;
|
|
364
|
+
|
|
365
|
+
var defineProperties_1 = defineProperties$1;
|
|
366
|
+
|
|
367
|
+
var callBind$6 = {exports: {}};
|
|
368
|
+
|
|
369
|
+
var implementation$9;
|
|
370
|
+
var hasRequiredImplementation;
|
|
371
|
+
|
|
372
|
+
function requireImplementation () {
|
|
373
|
+
if (hasRequiredImplementation) return implementation$9;
|
|
374
|
+
hasRequiredImplementation = 1;
|
|
375
|
+
|
|
376
|
+
/* eslint no-invalid-this: 1 */
|
|
377
|
+
|
|
378
|
+
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
379
|
+
var toStr = Object.prototype.toString;
|
|
380
|
+
var max = Math.max;
|
|
381
|
+
var funcType = '[object Function]';
|
|
382
|
+
|
|
383
|
+
var concatty = function concatty(a, b) {
|
|
384
|
+
var arr = [];
|
|
385
|
+
|
|
386
|
+
for (var i = 0; i < a.length; i += 1) {
|
|
387
|
+
arr[i] = a[i];
|
|
388
|
+
}
|
|
389
|
+
for (var j = 0; j < b.length; j += 1) {
|
|
390
|
+
arr[j + a.length] = b[j];
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
return arr;
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
var slicy = function slicy(arrLike, offset) {
|
|
397
|
+
var arr = [];
|
|
398
|
+
for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
399
|
+
arr[j] = arrLike[i];
|
|
400
|
+
}
|
|
401
|
+
return arr;
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
var joiny = function (arr, joiner) {
|
|
405
|
+
var str = '';
|
|
406
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
407
|
+
str += arr[i];
|
|
408
|
+
if (i + 1 < arr.length) {
|
|
409
|
+
str += joiner;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
return str;
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
implementation$9 = function bind(that) {
|
|
416
|
+
var target = this;
|
|
417
|
+
if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
|
|
418
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
419
|
+
}
|
|
420
|
+
var args = slicy(arguments, 1);
|
|
421
|
+
|
|
422
|
+
var bound;
|
|
423
|
+
var binder = function () {
|
|
424
|
+
if (this instanceof bound) {
|
|
425
|
+
var result = target.apply(
|
|
426
|
+
this,
|
|
427
|
+
concatty(args, arguments)
|
|
428
|
+
);
|
|
429
|
+
if (Object(result) === result) {
|
|
430
|
+
return result;
|
|
431
|
+
}
|
|
432
|
+
return this;
|
|
433
|
+
}
|
|
434
|
+
return target.apply(
|
|
435
|
+
that,
|
|
436
|
+
concatty(args, arguments)
|
|
437
|
+
);
|
|
438
|
+
|
|
439
|
+
};
|
|
440
|
+
|
|
441
|
+
var boundLength = max(0, target.length - args.length);
|
|
442
|
+
var boundArgs = [];
|
|
443
|
+
for (var i = 0; i < boundLength; i++) {
|
|
444
|
+
boundArgs[i] = '$' + i;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
|
|
448
|
+
|
|
449
|
+
if (target.prototype) {
|
|
450
|
+
var Empty = function Empty() {};
|
|
451
|
+
Empty.prototype = target.prototype;
|
|
452
|
+
bound.prototype = new Empty();
|
|
453
|
+
Empty.prototype = null;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
return bound;
|
|
457
|
+
};
|
|
458
|
+
return implementation$9;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
var functionBind;
|
|
462
|
+
var hasRequiredFunctionBind;
|
|
463
|
+
|
|
464
|
+
function requireFunctionBind () {
|
|
465
|
+
if (hasRequiredFunctionBind) return functionBind;
|
|
466
|
+
hasRequiredFunctionBind = 1;
|
|
467
|
+
|
|
468
|
+
var implementation = requireImplementation();
|
|
469
|
+
|
|
470
|
+
functionBind = Function.prototype.bind || implementation;
|
|
471
|
+
return functionBind;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/** @type {import('.')} */
|
|
475
|
+
var esObjectAtoms = Object;
|
|
476
|
+
|
|
209
477
|
/** @type {import('.')} */
|
|
210
478
|
var esErrors = Error;
|
|
211
479
|
|
|
@@ -218,15 +486,42 @@ var range = RangeError;
|
|
|
218
486
|
/** @type {import('./ref')} */
|
|
219
487
|
var ref = ReferenceError;
|
|
220
488
|
|
|
221
|
-
/** @type {import('./syntax')} */
|
|
222
|
-
var syntax = SyntaxError;
|
|
223
|
-
|
|
224
|
-
/** @type {import('./type')} */
|
|
225
|
-
var type = TypeError;
|
|
226
|
-
|
|
227
489
|
/** @type {import('./uri')} */
|
|
228
490
|
var uri = URIError;
|
|
229
491
|
|
|
492
|
+
/** @type {import('./abs')} */
|
|
493
|
+
var abs$1 = Math.abs;
|
|
494
|
+
|
|
495
|
+
/** @type {import('./floor')} */
|
|
496
|
+
var floor$1 = Math.floor;
|
|
497
|
+
|
|
498
|
+
/** @type {import('./max')} */
|
|
499
|
+
var max$1 = Math.max;
|
|
500
|
+
|
|
501
|
+
/** @type {import('./min')} */
|
|
502
|
+
var min$1 = Math.min;
|
|
503
|
+
|
|
504
|
+
/** @type {import('./pow')} */
|
|
505
|
+
var pow$1 = Math.pow;
|
|
506
|
+
|
|
507
|
+
/** @type {import('./round')} */
|
|
508
|
+
var round$1 = Math.round;
|
|
509
|
+
|
|
510
|
+
/** @type {import('./isNaN')} */
|
|
511
|
+
var _isNaN = Number.isNaN || function isNaN(a) {
|
|
512
|
+
return a !== a;
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
var $isNaN = _isNaN;
|
|
516
|
+
|
|
517
|
+
/** @type {import('./sign')} */
|
|
518
|
+
var sign$1 = function sign(number) {
|
|
519
|
+
if ($isNaN(number) || number === 0) {
|
|
520
|
+
return number;
|
|
521
|
+
}
|
|
522
|
+
return number < 0 ? -1 : 1;
|
|
523
|
+
};
|
|
524
|
+
|
|
230
525
|
var shams$1;
|
|
231
526
|
var hasRequiredShams;
|
|
232
527
|
|
|
@@ -234,11 +529,13 @@ function requireShams () {
|
|
|
234
529
|
if (hasRequiredShams) return shams$1;
|
|
235
530
|
hasRequiredShams = 1;
|
|
236
531
|
|
|
532
|
+
/** @type {import('./shams')} */
|
|
237
533
|
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
238
534
|
shams$1 = function hasSymbols() {
|
|
239
535
|
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
240
536
|
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
241
537
|
|
|
538
|
+
/** @type {{ [k in symbol]?: unknown }} */
|
|
242
539
|
var obj = {};
|
|
243
540
|
var sym = Symbol('test');
|
|
244
541
|
var symObj = Object(sym);
|
|
@@ -257,7 +554,7 @@ function requireShams () {
|
|
|
257
554
|
|
|
258
555
|
var symVal = 42;
|
|
259
556
|
obj[sym] = symVal;
|
|
260
|
-
for (
|
|
557
|
+
for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
261
558
|
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
262
559
|
|
|
263
560
|
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
@@ -268,7 +565,8 @@ function requireShams () {
|
|
|
268
565
|
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
269
566
|
|
|
270
567
|
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
271
|
-
|
|
568
|
+
// eslint-disable-next-line no-extra-parens
|
|
569
|
+
var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));
|
|
272
570
|
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
273
571
|
}
|
|
274
572
|
|
|
@@ -280,7 +578,8 @@ function requireShams () {
|
|
|
280
578
|
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
281
579
|
var hasSymbolSham = requireShams();
|
|
282
580
|
|
|
283
|
-
|
|
581
|
+
/** @type {import('.')} */
|
|
582
|
+
var hasSymbols$4 = function hasNativeSymbols() {
|
|
284
583
|
if (typeof origSymbol !== 'function') { return false; }
|
|
285
584
|
if (typeof Symbol !== 'function') { return false; }
|
|
286
585
|
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
@@ -289,124 +588,191 @@ var hasSymbols$5 = function hasNativeSymbols() {
|
|
|
289
588
|
return hasSymbolSham();
|
|
290
589
|
};
|
|
291
590
|
|
|
292
|
-
var
|
|
293
|
-
|
|
294
|
-
foo: {}
|
|
295
|
-
};
|
|
591
|
+
var Reflect_getPrototypeOf;
|
|
592
|
+
var hasRequiredReflect_getPrototypeOf;
|
|
296
593
|
|
|
297
|
-
|
|
594
|
+
function requireReflect_getPrototypeOf () {
|
|
595
|
+
if (hasRequiredReflect_getPrototypeOf) return Reflect_getPrototypeOf;
|
|
596
|
+
hasRequiredReflect_getPrototypeOf = 1;
|
|
298
597
|
|
|
299
|
-
/** @type {import('.')} */
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
&& !(test instanceof $Object$1);
|
|
304
|
-
};
|
|
598
|
+
/** @type {import('./Reflect.getPrototypeOf')} */
|
|
599
|
+
Reflect_getPrototypeOf = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;
|
|
600
|
+
return Reflect_getPrototypeOf;
|
|
601
|
+
}
|
|
305
602
|
|
|
306
|
-
|
|
603
|
+
var Object_getPrototypeOf;
|
|
604
|
+
var hasRequiredObject_getPrototypeOf;
|
|
307
605
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
var funcType = '[object Function]';
|
|
606
|
+
function requireObject_getPrototypeOf () {
|
|
607
|
+
if (hasRequiredObject_getPrototypeOf) return Object_getPrototypeOf;
|
|
608
|
+
hasRequiredObject_getPrototypeOf = 1;
|
|
312
609
|
|
|
313
|
-
var
|
|
314
|
-
var arr = [];
|
|
610
|
+
var $Object = esObjectAtoms;
|
|
315
611
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
arr[j + a.length] = b[j];
|
|
321
|
-
}
|
|
612
|
+
/** @type {import('./Object.getPrototypeOf')} */
|
|
613
|
+
Object_getPrototypeOf = $Object.getPrototypeOf || null;
|
|
614
|
+
return Object_getPrototypeOf;
|
|
615
|
+
}
|
|
322
616
|
|
|
323
|
-
|
|
324
|
-
|
|
617
|
+
var functionCall;
|
|
618
|
+
var hasRequiredFunctionCall;
|
|
325
619
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
arr[j] = arrLike[i];
|
|
330
|
-
}
|
|
331
|
-
return arr;
|
|
332
|
-
};
|
|
620
|
+
function requireFunctionCall () {
|
|
621
|
+
if (hasRequiredFunctionCall) return functionCall;
|
|
622
|
+
hasRequiredFunctionCall = 1;
|
|
333
623
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
if (i + 1 < arr.length) {
|
|
339
|
-
str += joiner;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
return str;
|
|
343
|
-
};
|
|
624
|
+
/** @type {import('./functionCall')} */
|
|
625
|
+
functionCall = Function.prototype.call;
|
|
626
|
+
return functionCall;
|
|
627
|
+
}
|
|
344
628
|
|
|
345
|
-
var
|
|
346
|
-
|
|
347
|
-
if (typeof target !== 'function' || toStr$8.apply(target) !== funcType) {
|
|
348
|
-
throw new TypeError(ERROR_MESSAGE + target);
|
|
349
|
-
}
|
|
350
|
-
var args = slicy(arguments, 1);
|
|
351
|
-
|
|
352
|
-
var bound;
|
|
353
|
-
var binder = function () {
|
|
354
|
-
if (this instanceof bound) {
|
|
355
|
-
var result = target.apply(
|
|
356
|
-
this,
|
|
357
|
-
concatty(args, arguments)
|
|
358
|
-
);
|
|
359
|
-
if (Object(result) === result) {
|
|
360
|
-
return result;
|
|
361
|
-
}
|
|
362
|
-
return this;
|
|
363
|
-
}
|
|
364
|
-
return target.apply(
|
|
365
|
-
that,
|
|
366
|
-
concatty(args, arguments)
|
|
367
|
-
);
|
|
629
|
+
var functionApply;
|
|
630
|
+
var hasRequiredFunctionApply;
|
|
368
631
|
|
|
369
|
-
|
|
632
|
+
function requireFunctionApply () {
|
|
633
|
+
if (hasRequiredFunctionApply) return functionApply;
|
|
634
|
+
hasRequiredFunctionApply = 1;
|
|
370
635
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
}
|
|
636
|
+
/** @type {import('./functionApply')} */
|
|
637
|
+
functionApply = Function.prototype.apply;
|
|
638
|
+
return functionApply;
|
|
639
|
+
}
|
|
376
640
|
|
|
377
|
-
|
|
641
|
+
/** @type {import('./reflectApply')} */
|
|
642
|
+
var reflectApply$1 = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
|
|
378
643
|
|
|
379
|
-
|
|
380
|
-
var Empty = function Empty() {};
|
|
381
|
-
Empty.prototype = target.prototype;
|
|
382
|
-
bound.prototype = new Empty();
|
|
383
|
-
Empty.prototype = null;
|
|
384
|
-
}
|
|
644
|
+
var bind$2 = requireFunctionBind();
|
|
385
645
|
|
|
386
|
-
|
|
387
|
-
|
|
646
|
+
var $apply$1 = requireFunctionApply();
|
|
647
|
+
var $call$2 = requireFunctionCall();
|
|
648
|
+
var $reflectApply = reflectApply$1;
|
|
388
649
|
|
|
389
|
-
|
|
650
|
+
/** @type {import('./actualApply')} */
|
|
651
|
+
var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
|
|
390
652
|
|
|
391
|
-
var
|
|
653
|
+
var bind$1 = requireFunctionBind();
|
|
654
|
+
var $TypeError$9 = type;
|
|
392
655
|
|
|
393
|
-
var call =
|
|
394
|
-
var $
|
|
395
|
-
var bind$1 = functionBind;
|
|
656
|
+
var $call$1 = requireFunctionCall();
|
|
657
|
+
var $actualApply = actualApply;
|
|
396
658
|
|
|
397
659
|
/** @type {import('.')} */
|
|
398
|
-
var
|
|
660
|
+
var callBindApplyHelpers = function callBindBasic(args) {
|
|
661
|
+
if (args.length < 1 || typeof args[0] !== 'function') {
|
|
662
|
+
throw new $TypeError$9('a function is required');
|
|
663
|
+
}
|
|
664
|
+
return $actualApply(bind$1, $call$1, args);
|
|
665
|
+
};
|
|
666
|
+
|
|
667
|
+
var get;
|
|
668
|
+
var hasRequiredGet;
|
|
669
|
+
|
|
670
|
+
function requireGet () {
|
|
671
|
+
if (hasRequiredGet) return get;
|
|
672
|
+
hasRequiredGet = 1;
|
|
673
|
+
|
|
674
|
+
var callBind = callBindApplyHelpers;
|
|
675
|
+
var gOPD = gopd$1;
|
|
676
|
+
|
|
677
|
+
var hasProtoAccessor;
|
|
678
|
+
try {
|
|
679
|
+
// eslint-disable-next-line no-extra-parens, no-proto
|
|
680
|
+
hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;
|
|
681
|
+
} catch (e) {
|
|
682
|
+
if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {
|
|
683
|
+
throw e;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
// eslint-disable-next-line no-extra-parens
|
|
688
|
+
var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
|
|
689
|
+
|
|
690
|
+
var $Object = Object;
|
|
691
|
+
var $getPrototypeOf = $Object.getPrototypeOf;
|
|
692
|
+
|
|
693
|
+
/** @type {import('./get')} */
|
|
694
|
+
get = desc && typeof desc.get === 'function'
|
|
695
|
+
? callBind([desc.get])
|
|
696
|
+
: typeof $getPrototypeOf === 'function'
|
|
697
|
+
? /** @type {import('./get')} */ function getDunder(value) {
|
|
698
|
+
// eslint-disable-next-line eqeqeq
|
|
699
|
+
return $getPrototypeOf(value == null ? value : $Object(value));
|
|
700
|
+
}
|
|
701
|
+
: false;
|
|
702
|
+
return get;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
var getProto$2;
|
|
706
|
+
var hasRequiredGetProto;
|
|
707
|
+
|
|
708
|
+
function requireGetProto () {
|
|
709
|
+
if (hasRequiredGetProto) return getProto$2;
|
|
710
|
+
hasRequiredGetProto = 1;
|
|
711
|
+
|
|
712
|
+
var reflectGetProto = requireReflect_getPrototypeOf();
|
|
713
|
+
var originalGetProto = requireObject_getPrototypeOf();
|
|
714
|
+
|
|
715
|
+
var getDunderProto = requireGet();
|
|
716
|
+
|
|
717
|
+
/** @type {import('.')} */
|
|
718
|
+
getProto$2 = reflectGetProto
|
|
719
|
+
? function getProto(O) {
|
|
720
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
721
|
+
return reflectGetProto(O);
|
|
722
|
+
}
|
|
723
|
+
: originalGetProto
|
|
724
|
+
? function getProto(O) {
|
|
725
|
+
if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
|
|
726
|
+
throw new TypeError('getProto: not an object');
|
|
727
|
+
}
|
|
728
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
729
|
+
return originalGetProto(O);
|
|
730
|
+
}
|
|
731
|
+
: getDunderProto
|
|
732
|
+
? function getProto(O) {
|
|
733
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
734
|
+
return getDunderProto(O);
|
|
735
|
+
}
|
|
736
|
+
: null;
|
|
737
|
+
return getProto$2;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
var hasown;
|
|
741
|
+
var hasRequiredHasown;
|
|
742
|
+
|
|
743
|
+
function requireHasown () {
|
|
744
|
+
if (hasRequiredHasown) return hasown;
|
|
745
|
+
hasRequiredHasown = 1;
|
|
746
|
+
|
|
747
|
+
var call = Function.prototype.call;
|
|
748
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
749
|
+
var bind = requireFunctionBind();
|
|
750
|
+
|
|
751
|
+
/** @type {import('.')} */
|
|
752
|
+
hasown = bind.call(call, $hasOwn);
|
|
753
|
+
return hasown;
|
|
754
|
+
}
|
|
399
755
|
|
|
400
756
|
var undefined$1;
|
|
401
757
|
|
|
758
|
+
var $Object$1 = esObjectAtoms;
|
|
759
|
+
|
|
402
760
|
var $Error = esErrors;
|
|
403
761
|
var $EvalError = _eval;
|
|
404
762
|
var $RangeError = range;
|
|
405
763
|
var $ReferenceError = ref;
|
|
406
|
-
var $SyntaxError$
|
|
407
|
-
var $TypeError$
|
|
764
|
+
var $SyntaxError$1 = syntax;
|
|
765
|
+
var $TypeError$8 = type;
|
|
408
766
|
var $URIError = uri;
|
|
409
767
|
|
|
768
|
+
var abs = abs$1;
|
|
769
|
+
var floor = floor$1;
|
|
770
|
+
var max = max$1;
|
|
771
|
+
var min = min$1;
|
|
772
|
+
var pow = pow$1;
|
|
773
|
+
var round = round$1;
|
|
774
|
+
var sign = sign$1;
|
|
775
|
+
|
|
410
776
|
var $Function = Function;
|
|
411
777
|
|
|
412
778
|
// eslint-disable-next-line consistent-return
|
|
@@ -416,19 +782,13 @@ var getEvalledConstructor = function (expressionSyntax) {
|
|
|
416
782
|
} catch (e) {}
|
|
417
783
|
};
|
|
418
784
|
|
|
419
|
-
var $gOPD$
|
|
420
|
-
|
|
421
|
-
try {
|
|
422
|
-
$gOPD$2({}, '');
|
|
423
|
-
} catch (e) {
|
|
424
|
-
$gOPD$2 = null; // this is IE 8, which has a broken gOPD
|
|
425
|
-
}
|
|
426
|
-
}
|
|
785
|
+
var $gOPD$1 = gopd$1;
|
|
786
|
+
var $defineProperty = esDefineProperty;
|
|
427
787
|
|
|
428
788
|
var throwTypeError = function () {
|
|
429
|
-
throw new $TypeError$
|
|
789
|
+
throw new $TypeError$8();
|
|
430
790
|
};
|
|
431
|
-
var ThrowTypeError = $gOPD$
|
|
791
|
+
var ThrowTypeError = $gOPD$1
|
|
432
792
|
? (function () {
|
|
433
793
|
try {
|
|
434
794
|
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
|
@@ -437,7 +797,7 @@ var ThrowTypeError = $gOPD$2
|
|
|
437
797
|
} catch (calleeThrows) {
|
|
438
798
|
try {
|
|
439
799
|
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
|
440
|
-
return $gOPD$
|
|
800
|
+
return $gOPD$1(arguments, 'callee').get;
|
|
441
801
|
} catch (gOPDthrows) {
|
|
442
802
|
return throwTypeError;
|
|
443
803
|
}
|
|
@@ -445,14 +805,14 @@ var ThrowTypeError = $gOPD$2
|
|
|
445
805
|
}())
|
|
446
806
|
: throwTypeError;
|
|
447
807
|
|
|
448
|
-
var hasSymbols$
|
|
449
|
-
var hasProto = hasProto$1();
|
|
808
|
+
var hasSymbols$3 = hasSymbols$4();
|
|
450
809
|
|
|
451
|
-
var getProto$1 =
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
);
|
|
810
|
+
var getProto$1 = requireGetProto();
|
|
811
|
+
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
812
|
+
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
813
|
+
|
|
814
|
+
var $apply = requireFunctionApply();
|
|
815
|
+
var $call = requireFunctionCall();
|
|
456
816
|
|
|
457
817
|
var needsEval = {};
|
|
458
818
|
|
|
@@ -463,7 +823,7 @@ var INTRINSICS = {
|
|
|
463
823
|
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
464
824
|
'%Array%': Array,
|
|
465
825
|
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
466
|
-
'%ArrayIteratorPrototype%': hasSymbols$
|
|
826
|
+
'%ArrayIteratorPrototype%': hasSymbols$3 && getProto$1 ? getProto$1([][Symbol.iterator]()) : undefined$1,
|
|
467
827
|
'%AsyncFromSyncIteratorPrototype%': undefined$1,
|
|
468
828
|
'%AsyncFunction%': needsEval,
|
|
469
829
|
'%AsyncGenerator%': needsEval,
|
|
@@ -493,13 +853,14 @@ var INTRINSICS = {
|
|
|
493
853
|
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
|
494
854
|
'%isFinite%': isFinite,
|
|
495
855
|
'%isNaN%': isNaN,
|
|
496
|
-
'%IteratorPrototype%': hasSymbols$
|
|
856
|
+
'%IteratorPrototype%': hasSymbols$3 && getProto$1 ? getProto$1(getProto$1([][Symbol.iterator]())) : undefined$1,
|
|
497
857
|
'%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
|
|
498
858
|
'%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
|
499
|
-
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$
|
|
859
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$3 || !getProto$1 ? undefined$1 : getProto$1(new Map()[Symbol.iterator]()),
|
|
500
860
|
'%Math%': Math,
|
|
501
861
|
'%Number%': Number,
|
|
502
|
-
'%Object%': Object,
|
|
862
|
+
'%Object%': $Object$1,
|
|
863
|
+
'%Object.getOwnPropertyDescriptor%': $gOPD$1,
|
|
503
864
|
'%parseFloat%': parseFloat,
|
|
504
865
|
'%parseInt%': parseInt,
|
|
505
866
|
'%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
|
|
@@ -509,15 +870,15 @@ var INTRINSICS = {
|
|
|
509
870
|
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
510
871
|
'%RegExp%': RegExp,
|
|
511
872
|
'%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
|
512
|
-
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$
|
|
873
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$3 || !getProto$1 ? undefined$1 : getProto$1(new Set()[Symbol.iterator]()),
|
|
513
874
|
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
|
514
875
|
'%String%': String,
|
|
515
|
-
'%StringIteratorPrototype%': hasSymbols$
|
|
516
|
-
'%Symbol%': hasSymbols$
|
|
517
|
-
'%SyntaxError%': $SyntaxError$
|
|
876
|
+
'%StringIteratorPrototype%': hasSymbols$3 && getProto$1 ? getProto$1(''[Symbol.iterator]()) : undefined$1,
|
|
877
|
+
'%Symbol%': hasSymbols$3 ? Symbol : undefined$1,
|
|
878
|
+
'%SyntaxError%': $SyntaxError$1,
|
|
518
879
|
'%ThrowTypeError%': ThrowTypeError,
|
|
519
880
|
'%TypedArray%': TypedArray,
|
|
520
|
-
'%TypeError%': $TypeError$
|
|
881
|
+
'%TypeError%': $TypeError$8,
|
|
521
882
|
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
|
|
522
883
|
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
|
|
523
884
|
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
|
|
@@ -525,7 +886,20 @@ var INTRINSICS = {
|
|
|
525
886
|
'%URIError%': $URIError,
|
|
526
887
|
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
|
|
527
888
|
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
|
|
528
|
-
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
|
|
889
|
+
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet,
|
|
890
|
+
|
|
891
|
+
'%Function.prototype.call%': $call,
|
|
892
|
+
'%Function.prototype.apply%': $apply,
|
|
893
|
+
'%Object.defineProperty%': $defineProperty,
|
|
894
|
+
'%Object.getPrototypeOf%': $ObjectGPO,
|
|
895
|
+
'%Math.abs%': abs,
|
|
896
|
+
'%Math.floor%': floor,
|
|
897
|
+
'%Math.max%': max,
|
|
898
|
+
'%Math.min%': min,
|
|
899
|
+
'%Math.pow%': pow,
|
|
900
|
+
'%Math.round%': round,
|
|
901
|
+
'%Math.sign%': sign,
|
|
902
|
+
'%Reflect.getPrototypeOf%': $ReflectGPO
|
|
529
903
|
};
|
|
530
904
|
|
|
531
905
|
if (getProto$1) {
|
|
@@ -618,13 +992,13 @@ var LEGACY_ALIASES = {
|
|
|
618
992
|
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
619
993
|
};
|
|
620
994
|
|
|
621
|
-
var bind =
|
|
622
|
-
var hasOwn$2 =
|
|
623
|
-
var $concat$1 = bind.call(
|
|
624
|
-
var $spliceApply = bind.call(
|
|
625
|
-
var $replace$1 = bind.call(
|
|
626
|
-
var $strSlice = bind.call(
|
|
627
|
-
var $exec$1 = bind.call(
|
|
995
|
+
var bind = requireFunctionBind();
|
|
996
|
+
var hasOwn$2 = requireHasown();
|
|
997
|
+
var $concat$1 = bind.call($call, Array.prototype.concat);
|
|
998
|
+
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
999
|
+
var $replace$1 = bind.call($call, String.prototype.replace);
|
|
1000
|
+
var $strSlice = bind.call($call, String.prototype.slice);
|
|
1001
|
+
var $exec$1 = bind.call($call, RegExp.prototype.exec);
|
|
628
1002
|
|
|
629
1003
|
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
630
1004
|
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
@@ -633,9 +1007,9 @@ var stringToPath = function stringToPath(string) {
|
|
|
633
1007
|
var first = $strSlice(string, 0, 1);
|
|
634
1008
|
var last = $strSlice(string, -1);
|
|
635
1009
|
if (first === '%' && last !== '%') {
|
|
636
|
-
throw new $SyntaxError$
|
|
1010
|
+
throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
|
|
637
1011
|
} else if (last === '%' && first !== '%') {
|
|
638
|
-
throw new $SyntaxError$
|
|
1012
|
+
throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
|
|
639
1013
|
}
|
|
640
1014
|
var result = [];
|
|
641
1015
|
$replace$1(string, rePropName, function (match, number, quote, subString) {
|
|
@@ -659,7 +1033,7 @@ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
|
659
1033
|
value = doEval(intrinsicName);
|
|
660
1034
|
}
|
|
661
1035
|
if (typeof value === 'undefined' && !allowMissing) {
|
|
662
|
-
throw new $TypeError$
|
|
1036
|
+
throw new $TypeError$8('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
663
1037
|
}
|
|
664
1038
|
|
|
665
1039
|
return {
|
|
@@ -669,19 +1043,19 @@ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
|
669
1043
|
};
|
|
670
1044
|
}
|
|
671
1045
|
|
|
672
|
-
throw new $SyntaxError$
|
|
1046
|
+
throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
|
|
673
1047
|
};
|
|
674
1048
|
|
|
675
1049
|
var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
676
1050
|
if (typeof name !== 'string' || name.length === 0) {
|
|
677
|
-
throw new $TypeError$
|
|
1051
|
+
throw new $TypeError$8('intrinsic name must be a non-empty string');
|
|
678
1052
|
}
|
|
679
1053
|
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
680
|
-
throw new $TypeError$
|
|
1054
|
+
throw new $TypeError$8('"allowMissing" argument must be a boolean');
|
|
681
1055
|
}
|
|
682
1056
|
|
|
683
1057
|
if ($exec$1(/^%?[^%]*%?$/, name) === null) {
|
|
684
|
-
throw new $SyntaxError$
|
|
1058
|
+
throw new $SyntaxError$1('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
685
1059
|
}
|
|
686
1060
|
var parts = stringToPath(name);
|
|
687
1061
|
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
@@ -708,7 +1082,7 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
|
708
1082
|
)
|
|
709
1083
|
&& first !== last
|
|
710
1084
|
) {
|
|
711
|
-
throw new $SyntaxError$
|
|
1085
|
+
throw new $SyntaxError$1('property names with quotes must have matching quotes');
|
|
712
1086
|
}
|
|
713
1087
|
if (part === 'constructor' || !isOwn) {
|
|
714
1088
|
skipFurtherCaching = true;
|
|
@@ -722,12 +1096,12 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
|
722
1096
|
} else if (value != null) {
|
|
723
1097
|
if (!(part in value)) {
|
|
724
1098
|
if (!allowMissing) {
|
|
725
|
-
throw new $TypeError$
|
|
1099
|
+
throw new $TypeError$8('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
726
1100
|
}
|
|
727
|
-
return void
|
|
1101
|
+
return void 0;
|
|
728
1102
|
}
|
|
729
|
-
if ($gOPD$
|
|
730
|
-
var desc = $gOPD$
|
|
1103
|
+
if ($gOPD$1 && (i + 1) >= parts.length) {
|
|
1104
|
+
var desc = $gOPD$1(value, part);
|
|
731
1105
|
isOwn = !!desc;
|
|
732
1106
|
|
|
733
1107
|
// By convention, when a data property is converted to an accessor
|
|
@@ -755,184 +1129,21 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
|
755
1129
|
return value;
|
|
756
1130
|
};
|
|
757
1131
|
|
|
758
|
-
var
|
|
759
|
-
var hasRequiredEsDefineProperty;
|
|
760
|
-
|
|
761
|
-
function requireEsDefineProperty () {
|
|
762
|
-
if (hasRequiredEsDefineProperty) return esDefineProperty;
|
|
763
|
-
hasRequiredEsDefineProperty = 1;
|
|
764
|
-
|
|
765
|
-
var GetIntrinsic = getIntrinsic;
|
|
766
|
-
|
|
767
|
-
/** @type {import('.')} */
|
|
768
|
-
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;
|
|
769
|
-
if ($defineProperty) {
|
|
770
|
-
try {
|
|
771
|
-
$defineProperty({}, 'a', { value: 1 });
|
|
772
|
-
} catch (e) {
|
|
773
|
-
// IE 8 has a broken defineProperty
|
|
774
|
-
$defineProperty = false;
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
esDefineProperty = $defineProperty;
|
|
779
|
-
return esDefineProperty;
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
var GetIntrinsic$7 = getIntrinsic;
|
|
783
|
-
|
|
784
|
-
var $gOPD$1 = GetIntrinsic$7('%Object.getOwnPropertyDescriptor%', true);
|
|
785
|
-
|
|
786
|
-
if ($gOPD$1) {
|
|
787
|
-
try {
|
|
788
|
-
$gOPD$1([], 'length');
|
|
789
|
-
} catch (e) {
|
|
790
|
-
// IE 8 has a broken gOPD
|
|
791
|
-
$gOPD$1 = null;
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
var gopd$1 = $gOPD$1;
|
|
796
|
-
|
|
797
|
-
var $defineProperty$1 = requireEsDefineProperty();
|
|
798
|
-
|
|
799
|
-
var $SyntaxError$1 = syntax;
|
|
800
|
-
var $TypeError$5 = type;
|
|
801
|
-
|
|
802
|
-
var gopd = gopd$1;
|
|
803
|
-
|
|
804
|
-
/** @type {import('.')} */
|
|
805
|
-
var defineDataProperty$1 = function defineDataProperty(
|
|
806
|
-
obj,
|
|
807
|
-
property,
|
|
808
|
-
value
|
|
809
|
-
) {
|
|
810
|
-
if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
|
811
|
-
throw new $TypeError$5('`obj` must be an object or a function`');
|
|
812
|
-
}
|
|
813
|
-
if (typeof property !== 'string' && typeof property !== 'symbol') {
|
|
814
|
-
throw new $TypeError$5('`property` must be a string or a symbol`');
|
|
815
|
-
}
|
|
816
|
-
if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
|
|
817
|
-
throw new $TypeError$5('`nonEnumerable`, if provided, must be a boolean or null');
|
|
818
|
-
}
|
|
819
|
-
if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
|
|
820
|
-
throw new $TypeError$5('`nonWritable`, if provided, must be a boolean or null');
|
|
821
|
-
}
|
|
822
|
-
if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
|
|
823
|
-
throw new $TypeError$5('`nonConfigurable`, if provided, must be a boolean or null');
|
|
824
|
-
}
|
|
825
|
-
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
|
|
826
|
-
throw new $TypeError$5('`loose`, if provided, must be a boolean');
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
|
830
|
-
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
|
831
|
-
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
|
832
|
-
var loose = arguments.length > 6 ? arguments[6] : false;
|
|
833
|
-
|
|
834
|
-
/* @type {false | TypedPropertyDescriptor<unknown>} */
|
|
835
|
-
var desc = !!gopd && gopd(obj, property);
|
|
836
|
-
|
|
837
|
-
if ($defineProperty$1) {
|
|
838
|
-
$defineProperty$1(obj, property, {
|
|
839
|
-
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
|
840
|
-
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
|
841
|
-
value: value,
|
|
842
|
-
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
|
843
|
-
});
|
|
844
|
-
} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
|
|
845
|
-
// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
|
|
846
|
-
obj[property] = value; // eslint-disable-line no-param-reassign
|
|
847
|
-
} else {
|
|
848
|
-
throw new $SyntaxError$1('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
|
|
849
|
-
}
|
|
850
|
-
};
|
|
851
|
-
|
|
852
|
-
var $defineProperty = requireEsDefineProperty();
|
|
853
|
-
|
|
854
|
-
var hasPropertyDescriptors = function hasPropertyDescriptors() {
|
|
855
|
-
return !!$defineProperty;
|
|
856
|
-
};
|
|
857
|
-
|
|
858
|
-
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
859
|
-
// node v0.6 has a bug where array lengths can be Set but not Defined
|
|
860
|
-
if (!$defineProperty) {
|
|
861
|
-
return null;
|
|
862
|
-
}
|
|
863
|
-
try {
|
|
864
|
-
return $defineProperty([], 'length', { value: 1 }).length !== 1;
|
|
865
|
-
} catch (e) {
|
|
866
|
-
// In Firefox 4-22, defining length on an array throws an exception.
|
|
867
|
-
return true;
|
|
868
|
-
}
|
|
869
|
-
};
|
|
870
|
-
|
|
871
|
-
var hasPropertyDescriptors_1 = hasPropertyDescriptors;
|
|
872
|
-
|
|
873
|
-
var keys = objectKeys$2;
|
|
874
|
-
var hasSymbols$3 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
|
|
875
|
-
|
|
876
|
-
var toStr$7 = Object.prototype.toString;
|
|
877
|
-
var concat = Array.prototype.concat;
|
|
878
|
-
var defineDataProperty = defineDataProperty$1;
|
|
879
|
-
|
|
880
|
-
var isFunction = function (fn) {
|
|
881
|
-
return typeof fn === 'function' && toStr$7.call(fn) === '[object Function]';
|
|
882
|
-
};
|
|
883
|
-
|
|
884
|
-
var supportsDescriptors$2 = hasPropertyDescriptors_1();
|
|
885
|
-
|
|
886
|
-
var defineProperty$1 = function (object, name, value, predicate) {
|
|
887
|
-
if (name in object) {
|
|
888
|
-
if (predicate === true) {
|
|
889
|
-
if (object[name] === value) {
|
|
890
|
-
return;
|
|
891
|
-
}
|
|
892
|
-
} else if (!isFunction(predicate) || !predicate()) {
|
|
893
|
-
return;
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
if (supportsDescriptors$2) {
|
|
898
|
-
defineDataProperty(object, name, value, true);
|
|
899
|
-
} else {
|
|
900
|
-
defineDataProperty(object, name, value);
|
|
901
|
-
}
|
|
902
|
-
};
|
|
903
|
-
|
|
904
|
-
var defineProperties$1 = function (object, map) {
|
|
905
|
-
var predicates = arguments.length > 2 ? arguments[2] : {};
|
|
906
|
-
var props = keys(map);
|
|
907
|
-
if (hasSymbols$3) {
|
|
908
|
-
props = concat.call(props, Object.getOwnPropertySymbols(map));
|
|
909
|
-
}
|
|
910
|
-
for (var i = 0; i < props.length; i += 1) {
|
|
911
|
-
defineProperty$1(object, props[i], map[props[i]], predicates[props[i]]);
|
|
912
|
-
}
|
|
913
|
-
};
|
|
914
|
-
|
|
915
|
-
defineProperties$1.supportsDescriptors = !!supportsDescriptors$2;
|
|
916
|
-
|
|
917
|
-
var defineProperties_1 = defineProperties$1;
|
|
918
|
-
|
|
919
|
-
var callBind$6 = {exports: {}};
|
|
920
|
-
|
|
921
|
-
var GetIntrinsic$6 = getIntrinsic;
|
|
1132
|
+
var GetIntrinsic$8 = getIntrinsic;
|
|
922
1133
|
var define$5 = defineDataProperty$1;
|
|
923
1134
|
var hasDescriptors$1 = hasPropertyDescriptors_1();
|
|
924
1135
|
var gOPD$4 = gopd$1;
|
|
925
1136
|
|
|
926
|
-
var $TypeError$
|
|
927
|
-
var $floor$1 = GetIntrinsic$
|
|
1137
|
+
var $TypeError$7 = type;
|
|
1138
|
+
var $floor$1 = GetIntrinsic$8('%Math.floor%');
|
|
928
1139
|
|
|
929
1140
|
/** @type {import('.')} */
|
|
930
1141
|
var setFunctionLength = function setFunctionLength(fn, length) {
|
|
931
1142
|
if (typeof fn !== 'function') {
|
|
932
|
-
throw new $TypeError$
|
|
1143
|
+
throw new $TypeError$7('`fn` is not a function');
|
|
933
1144
|
}
|
|
934
1145
|
if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor$1(length) !== length) {
|
|
935
|
-
throw new $TypeError$
|
|
1146
|
+
throw new $TypeError$7('`length` must be a positive 32-bit integer');
|
|
936
1147
|
}
|
|
937
1148
|
|
|
938
1149
|
var loose = arguments.length > 2 && !!arguments[2];
|
|
@@ -961,7 +1172,7 @@ var setFunctionLength = function setFunctionLength(fn, length) {
|
|
|
961
1172
|
|
|
962
1173
|
(function (module) {
|
|
963
1174
|
|
|
964
|
-
var bind =
|
|
1175
|
+
var bind = requireFunctionBind();
|
|
965
1176
|
var GetIntrinsic = getIntrinsic;
|
|
966
1177
|
var setFunctionLength$1 = setFunctionLength;
|
|
967
1178
|
|
|
@@ -970,7 +1181,7 @@ var setFunctionLength = function setFunctionLength(fn, length) {
|
|
|
970
1181
|
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
971
1182
|
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
972
1183
|
|
|
973
|
-
var $defineProperty =
|
|
1184
|
+
var $defineProperty = esDefineProperty;
|
|
974
1185
|
var $max = GetIntrinsic('%Math.max%');
|
|
975
1186
|
|
|
976
1187
|
module.exports = function callBind(originalFunction) {
|
|
@@ -998,15 +1209,15 @@ var setFunctionLength = function setFunctionLength(fn, length) {
|
|
|
998
1209
|
|
|
999
1210
|
var callBindExports = callBind$6.exports;
|
|
1000
1211
|
|
|
1001
|
-
var GetIntrinsic$
|
|
1212
|
+
var GetIntrinsic$7 = getIntrinsic;
|
|
1002
1213
|
|
|
1003
1214
|
var callBind$5 = callBindExports;
|
|
1004
1215
|
|
|
1005
|
-
var $indexOf$
|
|
1216
|
+
var $indexOf$2 = callBind$5(GetIntrinsic$7('String.prototype.indexOf'));
|
|
1006
1217
|
|
|
1007
|
-
var callBound$
|
|
1008
|
-
var intrinsic = GetIntrinsic$
|
|
1009
|
-
if (typeof intrinsic === 'function' && $indexOf$
|
|
1218
|
+
var callBound$e = function callBoundIntrinsic(name, allowMissing) {
|
|
1219
|
+
var intrinsic = GetIntrinsic$7(name, !!allowMissing);
|
|
1220
|
+
if (typeof intrinsic === 'function' && $indexOf$2(name, '.prototype.') > -1) {
|
|
1010
1221
|
return callBind$5(intrinsic);
|
|
1011
1222
|
}
|
|
1012
1223
|
return intrinsic;
|
|
@@ -1015,10 +1226,10 @@ var callBound$c = function callBoundIntrinsic(name, allowMissing) {
|
|
|
1015
1226
|
// modified from https://github.com/es-shims/es6-shim
|
|
1016
1227
|
var objectKeys$1 = objectKeys$2;
|
|
1017
1228
|
var hasSymbols$2 = requireShams()();
|
|
1018
|
-
var callBound$
|
|
1229
|
+
var callBound$d = callBound$e;
|
|
1019
1230
|
var toObject = Object;
|
|
1020
|
-
var $push = callBound$
|
|
1021
|
-
var $propIsEnumerable = callBound$
|
|
1231
|
+
var $push = callBound$d('Array.prototype.push');
|
|
1232
|
+
var $propIsEnumerable = callBound$d('Object.prototype.propertyIsEnumerable');
|
|
1022
1233
|
var originalGetSymbols = hasSymbols$2 ? Object.getOwnPropertySymbols : null;
|
|
1023
1234
|
|
|
1024
1235
|
// eslint-disable-next-line no-unused-vars
|
|
@@ -1179,12 +1390,12 @@ var define$3 = defineDataProperty$1;
|
|
|
1179
1390
|
var hasDescriptors = hasPropertyDescriptors_1();
|
|
1180
1391
|
var functionsHaveConfigurableNames = functionsHaveNames_1.functionsHaveConfigurableNames();
|
|
1181
1392
|
|
|
1182
|
-
var $TypeError$
|
|
1393
|
+
var $TypeError$6 = type;
|
|
1183
1394
|
|
|
1184
1395
|
/** @type {import('.')} */
|
|
1185
1396
|
var setFunctionName$1 = function setFunctionName(fn, name) {
|
|
1186
1397
|
if (typeof fn !== 'function') {
|
|
1187
|
-
throw new $TypeError$
|
|
1398
|
+
throw new $TypeError$6('`fn` is not a function');
|
|
1188
1399
|
}
|
|
1189
1400
|
var loose = arguments.length > 2 && !!arguments[2];
|
|
1190
1401
|
if (!loose || functionsHaveConfigurableNames) {
|
|
@@ -1198,13 +1409,13 @@ var setFunctionName$1 = function setFunctionName(fn, name) {
|
|
|
1198
1409
|
};
|
|
1199
1410
|
|
|
1200
1411
|
var setFunctionName = setFunctionName$1;
|
|
1201
|
-
var $TypeError$
|
|
1412
|
+
var $TypeError$5 = type;
|
|
1202
1413
|
|
|
1203
1414
|
var $Object = Object;
|
|
1204
1415
|
|
|
1205
1416
|
var implementation$5 = setFunctionName(function flags() {
|
|
1206
1417
|
if (this == null || this !== $Object(this)) {
|
|
1207
|
-
throw new $TypeError$
|
|
1418
|
+
throw new $TypeError$5('RegExp.prototype.flags getter called on non-object');
|
|
1208
1419
|
}
|
|
1209
1420
|
var result = '';
|
|
1210
1421
|
if (this.hasIndices) {
|
|
@@ -1321,9 +1532,9 @@ var shams = function hasToStringTagShams() {
|
|
|
1321
1532
|
};
|
|
1322
1533
|
|
|
1323
1534
|
var hasToStringTag$7 = shams();
|
|
1324
|
-
var callBound$
|
|
1535
|
+
var callBound$c = callBound$e;
|
|
1325
1536
|
|
|
1326
|
-
var $toString$4 = callBound$
|
|
1537
|
+
var $toString$4 = callBound$c('Object.prototype.toString');
|
|
1327
1538
|
|
|
1328
1539
|
var isStandardArguments = function isArguments(value) {
|
|
1329
1540
|
if (hasToStringTag$7 && value && typeof value === 'object' && Symbol.toStringTag in value) {
|
|
@@ -1411,7 +1622,7 @@ function addNumericSeparator(num, str) {
|
|
|
1411
1622
|
num === Infinity
|
|
1412
1623
|
|| num === -Infinity
|
|
1413
1624
|
|| num !== num
|
|
1414
|
-
|| (num && num > -
|
|
1625
|
+
|| (num && num > -1e3 && num < 1000)
|
|
1415
1626
|
|| $test.call(/e/, str)
|
|
1416
1627
|
) {
|
|
1417
1628
|
return str;
|
|
@@ -1432,10 +1643,21 @@ var utilInspect = require$$0;
|
|
|
1432
1643
|
var inspectCustom = utilInspect.custom;
|
|
1433
1644
|
var inspectSymbol = isSymbol$2(inspectCustom) ? inspectCustom : null;
|
|
1434
1645
|
|
|
1646
|
+
var quotes = {
|
|
1647
|
+
__proto__: null,
|
|
1648
|
+
'double': '"',
|
|
1649
|
+
single: "'"
|
|
1650
|
+
};
|
|
1651
|
+
var quoteREs = {
|
|
1652
|
+
__proto__: null,
|
|
1653
|
+
'double': /(["\\])/g,
|
|
1654
|
+
single: /(['\\])/g
|
|
1655
|
+
};
|
|
1656
|
+
|
|
1435
1657
|
var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
1436
1658
|
var opts = options || {};
|
|
1437
1659
|
|
|
1438
|
-
if (has$1(opts, 'quoteStyle') && (
|
|
1660
|
+
if (has$1(opts, 'quoteStyle') && !has$1(quotes, opts.quoteStyle)) {
|
|
1439
1661
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
1440
1662
|
}
|
|
1441
1663
|
if (
|
|
@@ -1607,7 +1829,10 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
|
1607
1829
|
if (typeof window !== 'undefined' && obj === window) {
|
|
1608
1830
|
return '{ [object Window] }';
|
|
1609
1831
|
}
|
|
1610
|
-
if (
|
|
1832
|
+
if (
|
|
1833
|
+
(typeof globalThis !== 'undefined' && obj === globalThis)
|
|
1834
|
+
|| (typeof commonjsGlobal !== 'undefined' && obj === commonjsGlobal)
|
|
1835
|
+
) {
|
|
1611
1836
|
return '{ [object globalThis] }';
|
|
1612
1837
|
}
|
|
1613
1838
|
if (!isDate$1(obj) && !isRegExp(obj)) {
|
|
@@ -1627,7 +1852,8 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
|
1627
1852
|
};
|
|
1628
1853
|
|
|
1629
1854
|
function wrapQuotes(s, defaultStyle, opts) {
|
|
1630
|
-
var
|
|
1855
|
+
var style = opts.quoteStyle || defaultStyle;
|
|
1856
|
+
var quoteChar = quotes[style];
|
|
1631
1857
|
return quoteChar + s + quoteChar;
|
|
1632
1858
|
}
|
|
1633
1859
|
|
|
@@ -1785,8 +2011,10 @@ function inspectString(str, opts) {
|
|
|
1785
2011
|
var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
|
|
1786
2012
|
return inspectString($slice$1.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
1787
2013
|
}
|
|
2014
|
+
var quoteRE = quoteREs[opts.quoteStyle || 'single'];
|
|
2015
|
+
quoteRE.lastIndex = 0;
|
|
1788
2016
|
// eslint-disable-next-line no-control-regex
|
|
1789
|
-
var s = $replace.call($replace.call(str,
|
|
2017
|
+
var s = $replace.call($replace.call(str, quoteRE, '\\$1'), /[\x00-\x1f]/g, lowbyte);
|
|
1790
2018
|
return wrapQuotes(s, 'single', opts);
|
|
1791
2019
|
}
|
|
1792
2020
|
|
|
@@ -1886,135 +2114,328 @@ function arrObjKeys(obj, inspect) {
|
|
|
1886
2114
|
return xs;
|
|
1887
2115
|
}
|
|
1888
2116
|
|
|
1889
|
-
var
|
|
1890
|
-
var callBound$9 = callBound$c;
|
|
1891
|
-
var inspect = objectInspect;
|
|
1892
|
-
|
|
1893
|
-
var $TypeError$1 = type;
|
|
1894
|
-
var $WeakMap$1 = GetIntrinsic$4('%WeakMap%', true);
|
|
1895
|
-
var $Map$3 = GetIntrinsic$4('%Map%', true);
|
|
2117
|
+
var inspect$3 = objectInspect;
|
|
1896
2118
|
|
|
1897
|
-
var $
|
|
1898
|
-
var $weakMapSet = callBound$9('WeakMap.prototype.set', true);
|
|
1899
|
-
var $weakMapHas = callBound$9('WeakMap.prototype.has', true);
|
|
1900
|
-
var $mapGet$1 = callBound$9('Map.prototype.get', true);
|
|
1901
|
-
var $mapSet = callBound$9('Map.prototype.set', true);
|
|
1902
|
-
var $mapHas$5 = callBound$9('Map.prototype.has', true);
|
|
2119
|
+
var $TypeError$4 = type;
|
|
1903
2120
|
|
|
1904
2121
|
/*
|
|
1905
2122
|
* This function traverses the list returning the node corresponding to the given key.
|
|
1906
2123
|
*
|
|
1907
|
-
* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list.
|
|
2124
|
+
* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list.
|
|
2125
|
+
* By doing so, all the recently used nodes can be accessed relatively quickly.
|
|
1908
2126
|
*/
|
|
1909
|
-
/** @type {import('.').listGetNode} */
|
|
1910
|
-
|
|
2127
|
+
/** @type {import('./list.d.ts').listGetNode} */
|
|
2128
|
+
// eslint-disable-next-line consistent-return
|
|
2129
|
+
var listGetNode = function (list, key, isDelete) {
|
|
1911
2130
|
/** @type {typeof list | NonNullable<(typeof list)['next']>} */
|
|
1912
2131
|
var prev = list;
|
|
1913
2132
|
/** @type {(typeof list)['next']} */
|
|
1914
2133
|
var curr;
|
|
1915
|
-
|
|
2134
|
+
// eslint-disable-next-line eqeqeq
|
|
2135
|
+
for (; (curr = prev.next) != null; prev = curr) {
|
|
1916
2136
|
if (curr.key === key) {
|
|
1917
2137
|
prev.next = curr.next;
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
2138
|
+
if (!isDelete) {
|
|
2139
|
+
// eslint-disable-next-line no-extra-parens
|
|
2140
|
+
curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next);
|
|
2141
|
+
list.next = curr; // eslint-disable-line no-param-reassign
|
|
2142
|
+
}
|
|
1921
2143
|
return curr;
|
|
1922
2144
|
}
|
|
1923
2145
|
}
|
|
1924
2146
|
};
|
|
1925
2147
|
|
|
1926
|
-
/** @type {import('.').listGet} */
|
|
2148
|
+
/** @type {import('./list.d.ts').listGet} */
|
|
1927
2149
|
var listGet = function (objects, key) {
|
|
2150
|
+
if (!objects) {
|
|
2151
|
+
return void 0;
|
|
2152
|
+
}
|
|
1928
2153
|
var node = listGetNode(objects, key);
|
|
1929
2154
|
return node && node.value;
|
|
1930
2155
|
};
|
|
1931
|
-
/** @type {import('.').listSet} */
|
|
2156
|
+
/** @type {import('./list.d.ts').listSet} */
|
|
1932
2157
|
var listSet = function (objects, key, value) {
|
|
1933
2158
|
var node = listGetNode(objects, key);
|
|
1934
2159
|
if (node) {
|
|
1935
2160
|
node.value = value;
|
|
1936
2161
|
} else {
|
|
1937
2162
|
// Prepend the new node to the beginning of the list
|
|
1938
|
-
objects.next = /** @type {import('.').ListNode<typeof value>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
|
|
2163
|
+
objects.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
|
|
1939
2164
|
key: key,
|
|
1940
2165
|
next: objects.next,
|
|
1941
2166
|
value: value
|
|
1942
2167
|
});
|
|
1943
2168
|
}
|
|
1944
2169
|
};
|
|
1945
|
-
/** @type {import('.').listHas} */
|
|
2170
|
+
/** @type {import('./list.d.ts').listHas} */
|
|
1946
2171
|
var listHas = function (objects, key) {
|
|
2172
|
+
if (!objects) {
|
|
2173
|
+
return false;
|
|
2174
|
+
}
|
|
1947
2175
|
return !!listGetNode(objects, key);
|
|
1948
2176
|
};
|
|
2177
|
+
/** @type {import('./list.d.ts').listDelete} */
|
|
2178
|
+
// eslint-disable-next-line consistent-return
|
|
2179
|
+
var listDelete = function (objects, key) {
|
|
2180
|
+
if (objects) {
|
|
2181
|
+
return listGetNode(objects, key, true);
|
|
2182
|
+
}
|
|
2183
|
+
};
|
|
2184
|
+
|
|
2185
|
+
/** @type {import('.')} */
|
|
2186
|
+
var sideChannelList = function getSideChannelList() {
|
|
2187
|
+
/** @typedef {ReturnType<typeof getSideChannelList>} Channel */
|
|
2188
|
+
/** @typedef {Parameters<Channel['get']>[0]} K */
|
|
2189
|
+
/** @typedef {Parameters<Channel['set']>[1]} V */
|
|
2190
|
+
|
|
2191
|
+
/** @type {import('./list.d.ts').RootNode<V, K> | undefined} */ var $o;
|
|
2192
|
+
|
|
2193
|
+
/** @type {Channel} */
|
|
2194
|
+
var channel = {
|
|
2195
|
+
assert: function (key) {
|
|
2196
|
+
if (!channel.has(key)) {
|
|
2197
|
+
throw new $TypeError$4('Side channel does not contain ' + inspect$3(key));
|
|
2198
|
+
}
|
|
2199
|
+
},
|
|
2200
|
+
'delete': function (key) {
|
|
2201
|
+
var root = $o && $o.next;
|
|
2202
|
+
var deletedNode = listDelete($o, key);
|
|
2203
|
+
if (deletedNode && root && root === deletedNode) {
|
|
2204
|
+
$o = void 0;
|
|
2205
|
+
}
|
|
2206
|
+
return !!deletedNode;
|
|
2207
|
+
},
|
|
2208
|
+
get: function (key) {
|
|
2209
|
+
return listGet($o, key);
|
|
2210
|
+
},
|
|
2211
|
+
has: function (key) {
|
|
2212
|
+
return listHas($o, key);
|
|
2213
|
+
},
|
|
2214
|
+
set: function (key, value) {
|
|
2215
|
+
if (!$o) {
|
|
2216
|
+
// Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
|
|
2217
|
+
$o = {
|
|
2218
|
+
next: void 0
|
|
2219
|
+
};
|
|
2220
|
+
}
|
|
2221
|
+
// eslint-disable-next-line no-extra-parens
|
|
2222
|
+
listSet(/** @type {NonNullable<typeof $o>} */ ($o), key, value);
|
|
2223
|
+
}
|
|
2224
|
+
};
|
|
2225
|
+
// @ts-expect-error TODO: figure out why this is erroring
|
|
2226
|
+
return channel;
|
|
2227
|
+
};
|
|
2228
|
+
|
|
2229
|
+
var GetIntrinsic$6 = getIntrinsic;
|
|
2230
|
+
|
|
2231
|
+
var callBindBasic = callBindApplyHelpers;
|
|
2232
|
+
|
|
2233
|
+
/** @type {(thisArg: string, searchString: string, position?: number) => number} */
|
|
2234
|
+
var $indexOf$1 = callBindBasic([GetIntrinsic$6('%String.prototype.indexOf%')]);
|
|
2235
|
+
|
|
2236
|
+
/** @type {import('.')} */
|
|
2237
|
+
var callBound$b = function callBoundIntrinsic(name, allowMissing) {
|
|
2238
|
+
// eslint-disable-next-line no-extra-parens
|
|
2239
|
+
var intrinsic = /** @type {Parameters<typeof callBindBasic>[0][0]} */ (GetIntrinsic$6(name, !!allowMissing));
|
|
2240
|
+
if (typeof intrinsic === 'function' && $indexOf$1(name, '.prototype.') > -1) {
|
|
2241
|
+
return callBindBasic([intrinsic]);
|
|
2242
|
+
}
|
|
2243
|
+
return intrinsic;
|
|
2244
|
+
};
|
|
2245
|
+
|
|
2246
|
+
var GetIntrinsic$5 = getIntrinsic;
|
|
2247
|
+
var callBound$a = callBound$b;
|
|
2248
|
+
var inspect$2 = objectInspect;
|
|
2249
|
+
|
|
2250
|
+
var $TypeError$3 = type;
|
|
2251
|
+
var $Map$3 = GetIntrinsic$5('%Map%', true);
|
|
2252
|
+
|
|
2253
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => V} */
|
|
2254
|
+
var $mapGet$1 = callBound$a('Map.prototype.get', true);
|
|
2255
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K, value: V) => void} */
|
|
2256
|
+
var $mapSet = callBound$a('Map.prototype.set', true);
|
|
2257
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
|
|
2258
|
+
var $mapHas$5 = callBound$a('Map.prototype.has', true);
|
|
2259
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
|
|
2260
|
+
var $mapDelete = callBound$a('Map.prototype.delete', true);
|
|
2261
|
+
/** @type {<K, V>(thisArg: Map<K, V>) => number} */
|
|
2262
|
+
var $mapSize$1 = callBound$a('Map.prototype.size', true);
|
|
2263
|
+
|
|
2264
|
+
/** @type {import('.')} */
|
|
2265
|
+
var sideChannelMap = !!$Map$3 && /** @type {Exclude<import('.'), false>} */ function getSideChannelMap() {
|
|
2266
|
+
/** @typedef {ReturnType<typeof getSideChannelMap>} Channel */
|
|
2267
|
+
/** @typedef {Parameters<Channel['get']>[0]} K */
|
|
2268
|
+
/** @typedef {Parameters<Channel['set']>[1]} V */
|
|
2269
|
+
|
|
2270
|
+
/** @type {Map<K, V> | undefined} */ var $m;
|
|
2271
|
+
|
|
2272
|
+
/** @type {Channel} */
|
|
2273
|
+
var channel = {
|
|
2274
|
+
assert: function (key) {
|
|
2275
|
+
if (!channel.has(key)) {
|
|
2276
|
+
throw new $TypeError$3('Side channel does not contain ' + inspect$2(key));
|
|
2277
|
+
}
|
|
2278
|
+
},
|
|
2279
|
+
'delete': function (key) {
|
|
2280
|
+
if ($m) {
|
|
2281
|
+
var result = $mapDelete($m, key);
|
|
2282
|
+
if ($mapSize$1($m) === 0) {
|
|
2283
|
+
$m = void 0;
|
|
2284
|
+
}
|
|
2285
|
+
return result;
|
|
2286
|
+
}
|
|
2287
|
+
return false;
|
|
2288
|
+
},
|
|
2289
|
+
get: function (key) { // eslint-disable-line consistent-return
|
|
2290
|
+
if ($m) {
|
|
2291
|
+
return $mapGet$1($m, key);
|
|
2292
|
+
}
|
|
2293
|
+
},
|
|
2294
|
+
has: function (key) {
|
|
2295
|
+
if ($m) {
|
|
2296
|
+
return $mapHas$5($m, key);
|
|
2297
|
+
}
|
|
2298
|
+
return false;
|
|
2299
|
+
},
|
|
2300
|
+
set: function (key, value) {
|
|
2301
|
+
if (!$m) {
|
|
2302
|
+
// @ts-expect-error TS can't handle narrowing a variable inside a closure
|
|
2303
|
+
$m = new $Map$3();
|
|
2304
|
+
}
|
|
2305
|
+
$mapSet($m, key, value);
|
|
2306
|
+
}
|
|
2307
|
+
};
|
|
2308
|
+
|
|
2309
|
+
// @ts-expect-error TODO: figure out why TS is erroring here
|
|
2310
|
+
return channel;
|
|
2311
|
+
};
|
|
2312
|
+
|
|
2313
|
+
var GetIntrinsic$4 = getIntrinsic;
|
|
2314
|
+
var callBound$9 = callBound$b;
|
|
2315
|
+
var inspect$1 = objectInspect;
|
|
2316
|
+
var getSideChannelMap$1 = sideChannelMap;
|
|
2317
|
+
|
|
2318
|
+
var $TypeError$2 = type;
|
|
2319
|
+
var $WeakMap$1 = GetIntrinsic$4('%WeakMap%', true);
|
|
2320
|
+
|
|
2321
|
+
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => V} */
|
|
2322
|
+
var $weakMapGet = callBound$9('WeakMap.prototype.get', true);
|
|
2323
|
+
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K, value: V) => void} */
|
|
2324
|
+
var $weakMapSet = callBound$9('WeakMap.prototype.set', true);
|
|
2325
|
+
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
|
|
2326
|
+
var $weakMapHas = callBound$9('WeakMap.prototype.has', true);
|
|
2327
|
+
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
|
|
2328
|
+
var $weakMapDelete = callBound$9('WeakMap.prototype.delete', true);
|
|
2329
|
+
|
|
2330
|
+
/** @type {import('.')} */
|
|
2331
|
+
var sideChannelWeakmap = $WeakMap$1
|
|
2332
|
+
? /** @type {Exclude<import('.'), false>} */ function getSideChannelWeakMap() {
|
|
2333
|
+
/** @typedef {ReturnType<typeof getSideChannelWeakMap>} Channel */
|
|
2334
|
+
/** @typedef {Parameters<Channel['get']>[0]} K */
|
|
2335
|
+
/** @typedef {Parameters<Channel['set']>[1]} V */
|
|
2336
|
+
|
|
2337
|
+
/** @type {WeakMap<K & object, V> | undefined} */ var $wm;
|
|
2338
|
+
/** @type {Channel | undefined} */ var $m;
|
|
2339
|
+
|
|
2340
|
+
/** @type {Channel} */
|
|
2341
|
+
var channel = {
|
|
2342
|
+
assert: function (key) {
|
|
2343
|
+
if (!channel.has(key)) {
|
|
2344
|
+
throw new $TypeError$2('Side channel does not contain ' + inspect$1(key));
|
|
2345
|
+
}
|
|
2346
|
+
},
|
|
2347
|
+
'delete': function (key) {
|
|
2348
|
+
if ($WeakMap$1 && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
2349
|
+
if ($wm) {
|
|
2350
|
+
return $weakMapDelete($wm, key);
|
|
2351
|
+
}
|
|
2352
|
+
} else if (getSideChannelMap$1) {
|
|
2353
|
+
if ($m) {
|
|
2354
|
+
return $m['delete'](key);
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2357
|
+
return false;
|
|
2358
|
+
},
|
|
2359
|
+
get: function (key) {
|
|
2360
|
+
if ($WeakMap$1 && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
2361
|
+
if ($wm) {
|
|
2362
|
+
return $weakMapGet($wm, key);
|
|
2363
|
+
}
|
|
2364
|
+
}
|
|
2365
|
+
return $m && $m.get(key);
|
|
2366
|
+
},
|
|
2367
|
+
has: function (key) {
|
|
2368
|
+
if ($WeakMap$1 && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
2369
|
+
if ($wm) {
|
|
2370
|
+
return $weakMapHas($wm, key);
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
return !!$m && $m.has(key);
|
|
2374
|
+
},
|
|
2375
|
+
set: function (key, value) {
|
|
2376
|
+
if ($WeakMap$1 && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
2377
|
+
if (!$wm) {
|
|
2378
|
+
$wm = new $WeakMap$1();
|
|
2379
|
+
}
|
|
2380
|
+
$weakMapSet($wm, key, value);
|
|
2381
|
+
} else if (getSideChannelMap$1) {
|
|
2382
|
+
if (!$m) {
|
|
2383
|
+
$m = getSideChannelMap$1();
|
|
2384
|
+
}
|
|
2385
|
+
// eslint-disable-next-line no-extra-parens
|
|
2386
|
+
/** @type {NonNullable<typeof $m>} */ ($m).set(key, value);
|
|
2387
|
+
}
|
|
2388
|
+
}
|
|
2389
|
+
};
|
|
2390
|
+
|
|
2391
|
+
// @ts-expect-error TODO: figure out why this is erroring
|
|
2392
|
+
return channel;
|
|
2393
|
+
}
|
|
2394
|
+
: getSideChannelMap$1;
|
|
2395
|
+
|
|
2396
|
+
var $TypeError$1 = type;
|
|
2397
|
+
var inspect = objectInspect;
|
|
2398
|
+
var getSideChannelList = sideChannelList;
|
|
2399
|
+
var getSideChannelMap = sideChannelMap;
|
|
2400
|
+
var getSideChannelWeakMap = sideChannelWeakmap;
|
|
2401
|
+
|
|
2402
|
+
var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
|
|
1949
2403
|
|
|
1950
2404
|
/** @type {import('.')} */
|
|
1951
2405
|
var sideChannel = function getSideChannel() {
|
|
1952
|
-
/** @
|
|
1953
|
-
|
|
1954
|
-
/** @type {
|
|
2406
|
+
/** @typedef {ReturnType<typeof getSideChannel>} Channel */
|
|
2407
|
+
|
|
2408
|
+
/** @type {Channel | undefined} */ var $channelData;
|
|
1955
2409
|
|
|
1956
|
-
/** @type {
|
|
2410
|
+
/** @type {Channel} */
|
|
1957
2411
|
var channel = {
|
|
1958
2412
|
assert: function (key) {
|
|
1959
2413
|
if (!channel.has(key)) {
|
|
1960
2414
|
throw new $TypeError$1('Side channel does not contain ' + inspect(key));
|
|
1961
2415
|
}
|
|
1962
2416
|
},
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
} else if ($Map$3) {
|
|
1969
|
-
if ($m) {
|
|
1970
|
-
return $mapGet$1($m, key);
|
|
1971
|
-
}
|
|
1972
|
-
} else {
|
|
1973
|
-
if ($o) { // eslint-disable-line no-lonely-if
|
|
1974
|
-
return listGet($o, key);
|
|
1975
|
-
}
|
|
1976
|
-
}
|
|
2417
|
+
'delete': function (key) {
|
|
2418
|
+
return !!$channelData && $channelData['delete'](key);
|
|
2419
|
+
},
|
|
2420
|
+
get: function (key) {
|
|
2421
|
+
return $channelData && $channelData.get(key);
|
|
1977
2422
|
},
|
|
1978
2423
|
has: function (key) {
|
|
1979
|
-
|
|
1980
|
-
if ($wm) {
|
|
1981
|
-
return $weakMapHas($wm, key);
|
|
1982
|
-
}
|
|
1983
|
-
} else if ($Map$3) {
|
|
1984
|
-
if ($m) {
|
|
1985
|
-
return $mapHas$5($m, key);
|
|
1986
|
-
}
|
|
1987
|
-
} else {
|
|
1988
|
-
if ($o) { // eslint-disable-line no-lonely-if
|
|
1989
|
-
return listHas($o, key);
|
|
1990
|
-
}
|
|
1991
|
-
}
|
|
1992
|
-
return false;
|
|
2424
|
+
return !!$channelData && $channelData.has(key);
|
|
1993
2425
|
},
|
|
1994
2426
|
set: function (key, value) {
|
|
1995
|
-
if (
|
|
1996
|
-
|
|
1997
|
-
$wm = new $WeakMap$1();
|
|
1998
|
-
}
|
|
1999
|
-
$weakMapSet($wm, key, value);
|
|
2000
|
-
} else if ($Map$3) {
|
|
2001
|
-
if (!$m) {
|
|
2002
|
-
$m = new $Map$3();
|
|
2003
|
-
}
|
|
2004
|
-
$mapSet($m, key, value);
|
|
2005
|
-
} else {
|
|
2006
|
-
if (!$o) {
|
|
2007
|
-
// Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
|
|
2008
|
-
$o = { key: {}, next: null };
|
|
2009
|
-
}
|
|
2010
|
-
listSet($o, key, value);
|
|
2427
|
+
if (!$channelData) {
|
|
2428
|
+
$channelData = makeChannel();
|
|
2011
2429
|
}
|
|
2430
|
+
|
|
2431
|
+
$channelData.set(key, value);
|
|
2012
2432
|
}
|
|
2013
2433
|
};
|
|
2434
|
+
// @ts-expect-error TODO: figure out why this is erroring
|
|
2014
2435
|
return channel;
|
|
2015
2436
|
};
|
|
2016
2437
|
|
|
2017
|
-
var hasOwn =
|
|
2438
|
+
var hasOwn = requireHasown();
|
|
2018
2439
|
var channel = sideChannel();
|
|
2019
2440
|
|
|
2020
2441
|
var $TypeError = type;
|
|
@@ -2102,7 +2523,7 @@ var stopIterationIterator = function getStopIterationIterator(origIterator) {
|
|
|
2102
2523
|
}
|
|
2103
2524
|
return {
|
|
2104
2525
|
done: true,
|
|
2105
|
-
value: void
|
|
2526
|
+
value: void 0
|
|
2106
2527
|
};
|
|
2107
2528
|
}
|
|
2108
2529
|
}
|
|
@@ -2245,7 +2666,7 @@ var isSet$2 = exported$1 || function isSet(x) {
|
|
|
2245
2666
|
var isArguments$1 = isArguments$2;
|
|
2246
2667
|
var getStopIterationIterator = stopIterationIterator;
|
|
2247
2668
|
|
|
2248
|
-
if (hasSymbols$
|
|
2669
|
+
if (hasSymbols$4() || requireShams()()) {
|
|
2249
2670
|
var $iterator = Symbol.iterator;
|
|
2250
2671
|
// Symbol is available natively or shammed
|
|
2251
2672
|
// natively:
|
|
@@ -2272,7 +2693,7 @@ if (hasSymbols$5() || requireShams()()) {
|
|
|
2272
2693
|
var GetIntrinsic$3 = getIntrinsic;
|
|
2273
2694
|
var $Map = GetIntrinsic$3('%Map%', true);
|
|
2274
2695
|
var $Set$1 = GetIntrinsic$3('%Set%', true);
|
|
2275
|
-
var callBound$8 = callBound$
|
|
2696
|
+
var callBound$8 = callBound$e;
|
|
2276
2697
|
var $arrayPush = callBound$8('Array.prototype.push');
|
|
2277
2698
|
var $charCodeAt = callBound$8('String.prototype.charCodeAt');
|
|
2278
2699
|
var $stringSlice = callBound$8('String.prototype.slice');
|
|
@@ -2477,7 +2898,7 @@ define(polyfill, {
|
|
|
2477
2898
|
var objectIs = polyfill;
|
|
2478
2899
|
|
|
2479
2900
|
var callBind$1 = callBindExports;
|
|
2480
|
-
var callBound$7 = callBound$
|
|
2901
|
+
var callBound$7 = callBound$e;
|
|
2481
2902
|
var GetIntrinsic$2 = getIntrinsic;
|
|
2482
2903
|
|
|
2483
2904
|
var $ArrayBuffer = GetIntrinsic$2('%ArrayBuffer%', true);
|
|
@@ -2538,7 +2959,7 @@ var isDateObject = function isDateObject(value) {
|
|
|
2538
2959
|
return hasToStringTag$5 ? tryDateObject(value) : toStr$4.call(value) === dateClass;
|
|
2539
2960
|
};
|
|
2540
2961
|
|
|
2541
|
-
var callBound$6 = callBound$
|
|
2962
|
+
var callBound$6 = callBound$e;
|
|
2542
2963
|
var hasToStringTag$4 = shams();
|
|
2543
2964
|
var has;
|
|
2544
2965
|
var $exec;
|
|
@@ -2595,7 +3016,7 @@ var isRegex$1 = hasToStringTag$4
|
|
|
2595
3016
|
return $toString$2(value) === regexClass;
|
|
2596
3017
|
};
|
|
2597
3018
|
|
|
2598
|
-
var callBound$5 = callBound$
|
|
3019
|
+
var callBound$5 = callBound$e;
|
|
2599
3020
|
|
|
2600
3021
|
var $byteLength$1 = callBound$5('SharedArrayBuffer.prototype.byteLength', true);
|
|
2601
3022
|
|
|
@@ -2639,7 +3060,7 @@ var isNumberObject = function isNumberObject(value) {
|
|
|
2639
3060
|
return hasToStringTag$3 ? tryNumberObject(value) : toStr$3.call(value) === numClass;
|
|
2640
3061
|
};
|
|
2641
3062
|
|
|
2642
|
-
var callBound$4 = callBound$
|
|
3063
|
+
var callBound$4 = callBound$e;
|
|
2643
3064
|
var $boolToStr = callBound$4('Boolean.prototype.toString');
|
|
2644
3065
|
var $toString$1 = callBound$4('Object.prototype.toString');
|
|
2645
3066
|
|
|
@@ -2667,7 +3088,7 @@ var isBooleanObject = function isBoolean(value) {
|
|
|
2667
3088
|
var isSymbol$1 = {exports: {}};
|
|
2668
3089
|
|
|
2669
3090
|
var toStr$2 = Object.prototype.toString;
|
|
2670
|
-
var hasSymbols = hasSymbols$
|
|
3091
|
+
var hasSymbols = hasSymbols$4();
|
|
2671
3092
|
|
|
2672
3093
|
if (hasSymbols) {
|
|
2673
3094
|
var symToStr = Symbol.prototype.toString;
|
|
@@ -2829,7 +3250,7 @@ var isWeakmap = exported || function isWeakMap(x) {
|
|
|
2829
3250
|
var isWeakset = {exports: {}};
|
|
2830
3251
|
|
|
2831
3252
|
var GetIntrinsic$1 = getIntrinsic;
|
|
2832
|
-
var callBound$3 = callBound$
|
|
3253
|
+
var callBound$3 = callBound$e;
|
|
2833
3254
|
|
|
2834
3255
|
var $WeakSet = GetIntrinsic$1('%WeakSet%', true);
|
|
2835
3256
|
|
|
@@ -3087,7 +3508,7 @@ var availableTypedArrays$1 = function availableTypedArrays() {
|
|
|
3087
3508
|
var forEach = forEach_1;
|
|
3088
3509
|
var availableTypedArrays = availableTypedArrays$1;
|
|
3089
3510
|
var callBind = callBindExports;
|
|
3090
|
-
var callBound$2 = callBound$
|
|
3511
|
+
var callBound$2 = callBound$e;
|
|
3091
3512
|
var gOPD = gopd$1;
|
|
3092
3513
|
|
|
3093
3514
|
/** @type {(O: object) => string} */
|
|
@@ -3199,7 +3620,7 @@ var whichTypedArray$1 = function whichTypedArray(value) {
|
|
|
3199
3620
|
return tryTypedArrays(value);
|
|
3200
3621
|
};
|
|
3201
3622
|
|
|
3202
|
-
var callBound$1 = callBound$
|
|
3623
|
+
var callBound$1 = callBound$e;
|
|
3203
3624
|
var $byteLength = callBound$1('ArrayBuffer.prototype.byteLength', true);
|
|
3204
3625
|
|
|
3205
3626
|
var isArrayBuffer$1 = isArrayBuffer$2;
|
|
@@ -3213,7 +3634,7 @@ var arrayBufferByteLength = function byteLength(ab) {
|
|
|
3213
3634
|
}; // in node < 0.11, byteLength is an own nonconfigurable property
|
|
3214
3635
|
|
|
3215
3636
|
var assign = object_assign;
|
|
3216
|
-
var callBound = callBound$
|
|
3637
|
+
var callBound = callBound$e;
|
|
3217
3638
|
var flags = regexp_prototype_flags;
|
|
3218
3639
|
var GetIntrinsic = getIntrinsic;
|
|
3219
3640
|
var getIterator = esGetIteratorExports;
|
|
@@ -3605,11 +4026,12 @@ var deepEqual = function deepEqual(a, b, opts) {
|
|
|
3605
4026
|
|
|
3606
4027
|
var deepEqual$1 = /*@__PURE__*/getDefaultExportFromCjs(deepEqual);
|
|
3607
4028
|
|
|
4029
|
+
/* @ts-self-types="./index.d.ts" */
|
|
3608
4030
|
let urlAlphabet =
|
|
3609
4031
|
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
|
|
3610
4032
|
let nanoid = (size = 21) => {
|
|
3611
4033
|
let id = '';
|
|
3612
|
-
let i = size;
|
|
4034
|
+
let i = size | 0;
|
|
3613
4035
|
while (i--) {
|
|
3614
4036
|
id += urlAlphabet[(Math.random() * 64) | 0];
|
|
3615
4037
|
}
|
|
@@ -3619,21 +4041,17 @@ let nanoid = (size = 21) => {
|
|
|
3619
4041
|
const isValidNonEmptyObject = (obj) => {
|
|
3620
4042
|
return typeof obj === "object" && !Array.isArray(obj) && Object.keys(obj).length !== 0;
|
|
3621
4043
|
};
|
|
3622
|
-
const
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
return;
|
|
3628
|
-
}
|
|
3629
|
-
if (typeof actualUnsub === "function") {
|
|
3630
|
-
actualUnsub();
|
|
3631
|
-
}
|
|
3632
|
-
else {
|
|
3633
|
-
actualUnsub.then((unsubFunc) => unsubFunc()).catch(console.error);
|
|
3634
|
-
}
|
|
4044
|
+
const getListenerWithAsyncUnsubscribe = (unsub) => {
|
|
4045
|
+
const asyncUnsub = () => new Promise((res, rej) => {
|
|
4046
|
+
try {
|
|
4047
|
+
unsub();
|
|
4048
|
+
res();
|
|
3635
4049
|
}
|
|
3636
|
-
|
|
4050
|
+
catch (err) {
|
|
4051
|
+
rej(err instanceof Error ? err : new Error(err));
|
|
4052
|
+
}
|
|
4053
|
+
});
|
|
4054
|
+
return { unsubscribe: asyncUnsub };
|
|
3637
4055
|
};
|
|
3638
4056
|
const promisePlus = (promise, timeoutMilliseconds, timeoutMessage) => {
|
|
3639
4057
|
return new Promise((resolve, reject) => {
|
|
@@ -4740,6 +5158,9 @@ class FDC3Service {
|
|
|
4740
5158
|
}
|
|
4741
5159
|
mergeBaseAppDataWithGlueManifest(baseAppData, hostManifestDefinition) {
|
|
4742
5160
|
let baseApplicationDefinition = baseAppData;
|
|
5161
|
+
if (hostManifestDefinition.customProperties) {
|
|
5162
|
+
baseApplicationDefinition.userProperties = { ...baseAppData.userProperties, ...hostManifestDefinition.customProperties };
|
|
5163
|
+
}
|
|
4743
5164
|
if (hostManifestDefinition.details) {
|
|
4744
5165
|
const details = { ...baseAppData.createOptions, ...hostManifestDefinition.details };
|
|
4745
5166
|
baseApplicationDefinition.createOptions = details;
|
|
@@ -4835,16 +5256,24 @@ const IntentsMethodPrefix = "Tick42.FDC3.Intents.";
|
|
|
4835
5256
|
const IO_ERRORS = errors.intents;
|
|
4836
5257
|
const BrowserClientControlMethodName = "T42.Web.Client.Control";
|
|
4837
5258
|
const DesktopClientControlMethodName = "T42.Channels.Command";
|
|
5259
|
+
const GlueReceivedPromiseTimeout = 120 * 1000;
|
|
4838
5260
|
|
|
4839
5261
|
const ioConnectFDC3SystemMethod = "FDC3.Collaborate";
|
|
4840
5262
|
const PrivateChannelPrefix = "___privateFDC3Channel___";
|
|
4841
|
-
var
|
|
4842
|
-
(function (
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
})(
|
|
5263
|
+
var LegacyPrivateChannelEventMethods;
|
|
5264
|
+
(function (LegacyPrivateChannelEventMethods) {
|
|
5265
|
+
LegacyPrivateChannelEventMethods["ListenerAdded"] = "listenerAdded";
|
|
5266
|
+
LegacyPrivateChannelEventMethods["OnAddContextListener"] = "onAddContextListener";
|
|
5267
|
+
LegacyPrivateChannelEventMethods["OnUnsubscribe"] = "onUnsubscribe";
|
|
5268
|
+
LegacyPrivateChannelEventMethods["OnDisconnect"] = "onDisconnect";
|
|
5269
|
+
})(LegacyPrivateChannelEventMethods || (LegacyPrivateChannelEventMethods = {}));
|
|
5270
|
+
var NewPrivateChannelEventMethods;
|
|
5271
|
+
(function (NewPrivateChannelEventMethods) {
|
|
5272
|
+
NewPrivateChannelEventMethods["ContextListenerAdded"] = "contextListenerAdded";
|
|
5273
|
+
NewPrivateChannelEventMethods["AddContextListener"] = "addContextListener";
|
|
5274
|
+
NewPrivateChannelEventMethods["Unsubscribe"] = "unsubscribe";
|
|
5275
|
+
NewPrivateChannelEventMethods["Disconnect"] = "disconnect";
|
|
5276
|
+
})(NewPrivateChannelEventMethods || (NewPrivateChannelEventMethods = {}));
|
|
4848
5277
|
|
|
4849
5278
|
/**
|
|
4850
5279
|
* Wraps values in an `Ok` type.
|
|
@@ -5692,19 +6121,19 @@ const FDC3StartupContextDecoder = object({
|
|
|
5692
6121
|
object({
|
|
5693
6122
|
channelId: optional(nonEmptyStringDecoder)
|
|
5694
6123
|
});
|
|
6124
|
+
const privateChannelEventTypesDecoder = oneOf(constant("addContextListener"), constant("unsubscribe"), constant("disconnect"));
|
|
6125
|
+
const optionalPrivateChannelEventTypesDecoder = optional(privateChannelEventTypesDecoder);
|
|
6126
|
+
const optionalFdc3EventTypesDecoder = optional(constant("userChannelChanged"));
|
|
5695
6127
|
|
|
5696
6128
|
class GlueController {
|
|
5697
6129
|
channelsParser;
|
|
5698
|
-
channelsStateStore;
|
|
5699
6130
|
glue;
|
|
5700
6131
|
_logger;
|
|
5701
6132
|
glueInitPromise;
|
|
5702
6133
|
resolveGluePromise;
|
|
5703
6134
|
rejectGluePromise;
|
|
5704
|
-
|
|
5705
|
-
constructor(channelsParser, channelsStateStore) {
|
|
6135
|
+
constructor(channelsParser) {
|
|
5706
6136
|
this.channelsParser = channelsParser;
|
|
5707
|
-
this.channelsStateStore = channelsStateStore;
|
|
5708
6137
|
}
|
|
5709
6138
|
get gluePromise() {
|
|
5710
6139
|
return this.glueInitPromise.then(this.initializeLogger.bind(this));
|
|
@@ -5722,7 +6151,7 @@ class GlueController {
|
|
|
5722
6151
|
this.resolveGluePromise = resolve;
|
|
5723
6152
|
this.rejectGluePromise = reject;
|
|
5724
6153
|
});
|
|
5725
|
-
},
|
|
6154
|
+
}, GlueReceivedPromiseTimeout, `Timeout of ${GlueReceivedPromiseTimeout}ms waiting to receive initialized 'io'`);
|
|
5726
6155
|
}
|
|
5727
6156
|
get logger() {
|
|
5728
6157
|
return this._logger;
|
|
@@ -5744,11 +6173,14 @@ class GlueController {
|
|
|
5744
6173
|
getApplication(name) {
|
|
5745
6174
|
return this.glue.appManager.application(name);
|
|
5746
6175
|
}
|
|
6176
|
+
getAllAppManagerInstances() {
|
|
6177
|
+
return this.glue.appManager.instances();
|
|
6178
|
+
}
|
|
5747
6179
|
getApplicationInstances(appName) {
|
|
5748
|
-
return this.
|
|
6180
|
+
return this.getAllAppManagerInstances().filter(inst => inst.application.name === appName);
|
|
5749
6181
|
}
|
|
5750
6182
|
getAppInstanceById(id) {
|
|
5751
|
-
return this.
|
|
6183
|
+
return this.getAllAppManagerInstances().find(inst => inst.id === id);
|
|
5752
6184
|
}
|
|
5753
6185
|
async findIntents(intentFilter) {
|
|
5754
6186
|
return this.glue.intents.find(intentFilter);
|
|
@@ -5781,11 +6213,11 @@ class GlueController {
|
|
|
5781
6213
|
}
|
|
5782
6214
|
return myWin.getContext();
|
|
5783
6215
|
}
|
|
5784
|
-
addIntentListener(intent, handler) {
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
6216
|
+
async addIntentListener(intent, handler) {
|
|
6217
|
+
if (typeof this.glue.intents.register === "function") {
|
|
6218
|
+
return await this.glue.intents.register(intent, handler);
|
|
6219
|
+
}
|
|
6220
|
+
return this.glue.intents.addIntentListener(intent, handler);
|
|
5789
6221
|
}
|
|
5790
6222
|
getAllContexts() {
|
|
5791
6223
|
return this.glue.contexts.all();
|
|
@@ -5860,7 +6292,11 @@ class GlueController {
|
|
|
5860
6292
|
}
|
|
5861
6293
|
getMyWindow() {
|
|
5862
6294
|
const win = this.glue.windows.my();
|
|
5863
|
-
|
|
6295
|
+
const isValidWindow = isValidNonEmptyObject(win);
|
|
6296
|
+
if (isValidWindow) {
|
|
6297
|
+
return win;
|
|
6298
|
+
}
|
|
6299
|
+
return this.glue.windows.findById(this.glue.interop.instance.instance);
|
|
5864
6300
|
}
|
|
5865
6301
|
getMyInteropInstance() {
|
|
5866
6302
|
return this.glue.interop.instance;
|
|
@@ -5941,9 +6377,12 @@ class GlueController {
|
|
|
5941
6377
|
getPrefs(app) {
|
|
5942
6378
|
return this.glue.prefs.get(app);
|
|
5943
6379
|
}
|
|
6380
|
+
isRunningInBrowser() {
|
|
6381
|
+
return typeof window !== "undefined" && !window.iodesktop;
|
|
6382
|
+
}
|
|
5944
6383
|
async checkIsFdc3DataWrappingSupported() {
|
|
5945
|
-
const
|
|
5946
|
-
const methodName =
|
|
6384
|
+
const inBrowserNamespace = this.isRunningInBrowser();
|
|
6385
|
+
const methodName = inBrowserNamespace ? BrowserClientControlMethodName : DesktopClientControlMethodName;
|
|
5947
6386
|
const myServer = this.glue.interop.servers().find((server) => server.instance === this.glue.interop.instance.instance);
|
|
5948
6387
|
if (!myServer) {
|
|
5949
6388
|
return false;
|
|
@@ -5952,7 +6391,7 @@ class GlueController {
|
|
|
5952
6391
|
if (!registersControlMethod) {
|
|
5953
6392
|
return false;
|
|
5954
6393
|
}
|
|
5955
|
-
const data =
|
|
6394
|
+
const data = inBrowserNamespace ? { domain: "system", operation: "isFdc3DataWrappingSupported" } : { command: "isFdc3DataWrappingSupported" };
|
|
5956
6395
|
try {
|
|
5957
6396
|
const res = await this.glue.interop.invoke(methodName, data, { instance: this.interopInstance().instance });
|
|
5958
6397
|
return res.returned.isSupported;
|
|
@@ -5978,7 +6417,7 @@ class GlueController {
|
|
|
5978
6417
|
}
|
|
5979
6418
|
return {
|
|
5980
6419
|
source: {
|
|
5981
|
-
appId: instanceServer.applicationName,
|
|
6420
|
+
appId: instanceServer.application ?? instanceServer.applicationName,
|
|
5982
6421
|
instanceId: instanceServer.instance
|
|
5983
6422
|
}
|
|
5984
6423
|
};
|
|
@@ -6037,7 +6476,7 @@ const REQUEST_GLUE = "requestGlue";
|
|
|
6037
6476
|
const REQUEST_GLUE_RESPONSE = "requestGlueResponse";
|
|
6038
6477
|
const FDC3_READY = "fdc3Ready";
|
|
6039
6478
|
|
|
6040
|
-
class
|
|
6479
|
+
class WebEventDispatcher {
|
|
6041
6480
|
fireFdc3Ready() {
|
|
6042
6481
|
const event = new Event(FDC3_READY);
|
|
6043
6482
|
window.dispatchEvent(event);
|
|
@@ -6057,9 +6496,851 @@ class EventDispatcher {
|
|
|
6057
6496
|
|
|
6058
6497
|
// To parse this data:
|
|
6059
6498
|
//
|
|
6060
|
-
// import { Convert,
|
|
6499
|
+
// import { Convert, Action, Chart, ChatInitSettings, ChatMessage, ChatRoom, ChatSearchCriteria, Contact, ContactList, Context, Country, Currency, Email, FileAttachment, Instrument, InstrumentList, Interaction, Message, Nothing, Order, OrderList, Organization, Portfolio, Position, Product, TimeRange, Trade, TradeList, TransactionResult, Valuation } from "./file";
|
|
6500
|
+
//
|
|
6501
|
+
// const action = Convert.toAction(json);
|
|
6502
|
+
// const chart = Convert.toChart(json);
|
|
6503
|
+
// const chatInitSettings = Convert.toChatInitSettings(json);
|
|
6504
|
+
// const chatMessage = Convert.toChatMessage(json);
|
|
6505
|
+
// const chatRoom = Convert.toChatRoom(json);
|
|
6506
|
+
// const chatSearchCriteria = Convert.toChatSearchCriteria(json);
|
|
6507
|
+
// const contact = Convert.toContact(json);
|
|
6508
|
+
// const contactList = Convert.toContactList(json);
|
|
6509
|
+
// const context = Convert.toContext(json);
|
|
6510
|
+
// const country = Convert.toCountry(json);
|
|
6511
|
+
// const currency = Convert.toCurrency(json);
|
|
6512
|
+
// const email = Convert.toEmail(json);
|
|
6513
|
+
// const fileAttachment = Convert.toFileAttachment(json);
|
|
6514
|
+
// const instrument = Convert.toInstrument(json);
|
|
6515
|
+
// const instrumentList = Convert.toInstrumentList(json);
|
|
6516
|
+
// const interaction = Convert.toInteraction(json);
|
|
6517
|
+
// const message = Convert.toMessage(json);
|
|
6518
|
+
// const nothing = Convert.toNothing(json);
|
|
6519
|
+
// const order = Convert.toOrder(json);
|
|
6520
|
+
// const orderList = Convert.toOrderList(json);
|
|
6521
|
+
// const organization = Convert.toOrganization(json);
|
|
6522
|
+
// const portfolio = Convert.toPortfolio(json);
|
|
6523
|
+
// const position = Convert.toPosition(json);
|
|
6524
|
+
// const product = Convert.toProduct(json);
|
|
6525
|
+
// const timeRange = Convert.toTimeRange(json);
|
|
6526
|
+
// const trade = Convert.toTrade(json);
|
|
6527
|
+
// const tradeList = Convert.toTradeList(json);
|
|
6528
|
+
// const transactionResult = Convert.toTransactionResult(json);
|
|
6529
|
+
// const valuation = Convert.toValuation(json);
|
|
6530
|
+
//
|
|
6531
|
+
// These functions will throw an error if the JSON doesn't
|
|
6532
|
+
// match the expected interface, even if the JSON is valid.
|
|
6533
|
+
/**
|
|
6534
|
+
* Free text to be used for a keyword search
|
|
6535
|
+
*
|
|
6536
|
+
* `interactionType` SHOULD be one of `'Instant Message'`, `'Email'`, `'Call'`, or
|
|
6537
|
+
* `'Meeting'` although other string values are permitted.
|
|
6538
|
+
*/
|
|
6539
|
+
// Converts JSON strings to/from your types
|
|
6540
|
+
// and asserts the results of JSON.parse at runtime
|
|
6541
|
+
function a$2(typ) {
|
|
6542
|
+
return { arrayItems: typ };
|
|
6543
|
+
}
|
|
6544
|
+
function u$2(...typs) {
|
|
6545
|
+
return { unionMembers: typs };
|
|
6546
|
+
}
|
|
6547
|
+
function o$2(props, additional) {
|
|
6548
|
+
return { props, additional };
|
|
6549
|
+
}
|
|
6550
|
+
function m$2(additional) {
|
|
6551
|
+
return { props: [], additional };
|
|
6552
|
+
}
|
|
6553
|
+
function r$2(name) {
|
|
6554
|
+
return { ref: name };
|
|
6555
|
+
}
|
|
6556
|
+
({
|
|
6557
|
+
Action: o$2([
|
|
6558
|
+
{ json: 'action', js: 'action', typ: u$2(undefined, r$2('ActionType')) },
|
|
6559
|
+
{ json: 'app', js: 'app', typ: u$2(undefined, r$2('AppIdentifier')) },
|
|
6560
|
+
{ json: 'channelId', js: 'channelId', typ: u$2(undefined, '') },
|
|
6561
|
+
{ json: 'context', js: 'context', typ: r$2('ContextElement') },
|
|
6562
|
+
{ json: 'intent', js: 'intent', typ: u$2(undefined, '') },
|
|
6563
|
+
{ json: 'title', js: 'title', typ: '' },
|
|
6564
|
+
{ json: 'type', js: 'type', typ: r$2('ActionTypeEnum') },
|
|
6565
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6566
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6567
|
+
], 'any'),
|
|
6568
|
+
AppIdentifier: o$2([
|
|
6569
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
6570
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: u$2(undefined, '') },
|
|
6571
|
+
{ json: 'instanceId', js: 'instanceId', typ: u$2(undefined, '') },
|
|
6572
|
+
], 'any'),
|
|
6573
|
+
ContextElement: o$2([
|
|
6574
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6575
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6576
|
+
{ json: 'type', js: 'type', typ: '' },
|
|
6577
|
+
], 'any'),
|
|
6578
|
+
Chart: o$2([
|
|
6579
|
+
{ json: 'instruments', js: 'instruments', typ: a$2(r$2('InstrumentElement')) },
|
|
6580
|
+
{ json: 'otherConfig', js: 'otherConfig', typ: u$2(undefined, a$2(r$2('ContextElement'))) },
|
|
6581
|
+
{ json: 'range', js: 'range', typ: u$2(undefined, r$2('TimeRangeObject')) },
|
|
6582
|
+
{ json: 'style', js: 'style', typ: u$2(undefined, r$2('ChartStyle')) },
|
|
6583
|
+
{ json: 'type', js: 'type', typ: r$2('ChartType') },
|
|
6584
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6585
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6586
|
+
], 'any'),
|
|
6587
|
+
InstrumentElement: o$2([
|
|
6588
|
+
{ json: 'id', js: 'id', typ: r$2('PurpleInstrumentIdentifiers') },
|
|
6589
|
+
{ json: 'market', js: 'market', typ: u$2(undefined, r$2('OrganizationMarket')) },
|
|
6590
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6591
|
+
{ json: 'type', js: 'type', typ: r$2('PurpleInteractionType') },
|
|
6592
|
+
], 'any'),
|
|
6593
|
+
PurpleInstrumentIdentifiers: o$2([
|
|
6594
|
+
{ json: 'BBG', js: 'BBG', typ: u$2(undefined, '') },
|
|
6595
|
+
{ json: 'CUSIP', js: 'CUSIP', typ: u$2(undefined, '') },
|
|
6596
|
+
{ json: 'FDS_ID', js: 'FDS_ID', typ: u$2(undefined, '') },
|
|
6597
|
+
{ json: 'FIGI', js: 'FIGI', typ: u$2(undefined, '') },
|
|
6598
|
+
{ json: 'ISIN', js: 'ISIN', typ: u$2(undefined, '') },
|
|
6599
|
+
{ json: 'PERMID', js: 'PERMID', typ: u$2(undefined, '') },
|
|
6600
|
+
{ json: 'RIC', js: 'RIC', typ: u$2(undefined, '') },
|
|
6601
|
+
{ json: 'SEDOL', js: 'SEDOL', typ: u$2(undefined, '') },
|
|
6602
|
+
{ json: 'ticker', js: 'ticker', typ: u$2(undefined, '') },
|
|
6603
|
+
], 'any'),
|
|
6604
|
+
OrganizationMarket: o$2([
|
|
6605
|
+
{ json: 'BBG', js: 'BBG', typ: u$2(undefined, '') },
|
|
6606
|
+
{ json: 'COUNTRY_ISOALPHA2', js: 'COUNTRY_ISOALPHA2', typ: u$2(undefined, '') },
|
|
6607
|
+
{ json: 'MIC', js: 'MIC', typ: u$2(undefined, '') },
|
|
6608
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6609
|
+
], 'any'),
|
|
6610
|
+
TimeRangeObject: o$2([
|
|
6611
|
+
{ json: 'endTime', js: 'endTime', typ: u$2(undefined, Date) },
|
|
6612
|
+
{ json: 'startTime', js: 'startTime', typ: u$2(undefined, Date) },
|
|
6613
|
+
{ json: 'type', js: 'type', typ: r$2('TimeRangeType') },
|
|
6614
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6615
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6616
|
+
], 'any'),
|
|
6617
|
+
ChatInitSettings: o$2([
|
|
6618
|
+
{ json: 'chatName', js: 'chatName', typ: u$2(undefined, '') },
|
|
6619
|
+
{ json: 'members', js: 'members', typ: u$2(undefined, r$2('ContactListObject')) },
|
|
6620
|
+
{ json: 'message', js: 'message', typ: u$2(undefined, u$2(r$2('MessageObject'), '')) },
|
|
6621
|
+
{ json: 'options', js: 'options', typ: u$2(undefined, r$2('ChatOptions')) },
|
|
6622
|
+
{ json: 'type', js: 'type', typ: r$2('ChatInitSettingsType') },
|
|
6623
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6624
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6625
|
+
], 'any'),
|
|
6626
|
+
ContactListObject: o$2([
|
|
6627
|
+
{ json: 'contacts', js: 'contacts', typ: a$2(r$2('ContactElement')) },
|
|
6628
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('')) },
|
|
6629
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6630
|
+
{ json: 'type', js: 'type', typ: r$2('ContactListType') },
|
|
6631
|
+
], 'any'),
|
|
6632
|
+
ContactElement: o$2([
|
|
6633
|
+
{ json: 'id', js: 'id', typ: r$2('PurpleContactIdentifiers') },
|
|
6634
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6635
|
+
{ json: 'type', js: 'type', typ: r$2('FluffyInteractionType') },
|
|
6636
|
+
], 'any'),
|
|
6637
|
+
PurpleContactIdentifiers: o$2([
|
|
6638
|
+
{ json: 'email', js: 'email', typ: u$2(undefined, '') },
|
|
6639
|
+
{ json: 'FDS_ID', js: 'FDS_ID', typ: u$2(undefined, '') },
|
|
6640
|
+
], 'any'),
|
|
6641
|
+
MessageObject: o$2([
|
|
6642
|
+
{ json: 'entities', js: 'entities', typ: u$2(undefined, m$2(r$2('EntityValue'))) },
|
|
6643
|
+
{ json: 'text', js: 'text', typ: u$2(undefined, r$2('PurpleMessageText')) },
|
|
6644
|
+
{ json: 'type', js: 'type', typ: r$2('MessageType') },
|
|
6645
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6646
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6647
|
+
], 'any'),
|
|
6648
|
+
EntityValue: o$2([
|
|
6649
|
+
{ json: 'action', js: 'action', typ: u$2(undefined, r$2('ActionType')) },
|
|
6650
|
+
{ json: 'app', js: 'app', typ: u$2(undefined, r$2('AppIdentifier')) },
|
|
6651
|
+
{ json: 'channelId', js: 'channelId', typ: u$2(undefined, '') },
|
|
6652
|
+
{ json: 'context', js: 'context', typ: u$2(undefined, r$2('ContextElement')) },
|
|
6653
|
+
{ json: 'intent', js: 'intent', typ: u$2(undefined, '') },
|
|
6654
|
+
{ json: 'title', js: 'title', typ: u$2(undefined, '') },
|
|
6655
|
+
{ json: 'type', js: 'type', typ: r$2('EntityType') },
|
|
6656
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6657
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6658
|
+
{ json: 'data', js: 'data', typ: u$2(undefined, r$2('EntityData')) },
|
|
6659
|
+
], 'any'),
|
|
6660
|
+
PurpleMessageText: o$2([
|
|
6661
|
+
{ json: 'text/markdown', js: 'text/markdown', typ: u$2(undefined, '') },
|
|
6662
|
+
{ json: 'text/plain', js: 'text/plain', typ: u$2(undefined, '') },
|
|
6663
|
+
], 'any'),
|
|
6664
|
+
ChatOptions: o$2([
|
|
6665
|
+
{ json: 'allowAddUser', js: 'allowAddUser', typ: u$2(undefined, true) },
|
|
6666
|
+
{ json: 'allowHistoryBrowsing', js: 'allowHistoryBrowsing', typ: u$2(undefined, true) },
|
|
6667
|
+
{ json: 'allowMessageCopy', js: 'allowMessageCopy', typ: u$2(undefined, true) },
|
|
6668
|
+
{ json: 'groupRecipients', js: 'groupRecipients', typ: u$2(undefined, true) },
|
|
6669
|
+
{ json: 'isPublic', js: 'isPublic', typ: u$2(undefined, true) },
|
|
6670
|
+
], 'any'),
|
|
6671
|
+
ChatMessage: o$2([
|
|
6672
|
+
{ json: 'chatRoom', js: 'chatRoom', typ: r$2('ChatRoomObject') },
|
|
6673
|
+
{ json: 'message', js: 'message', typ: r$2('MessageObject') },
|
|
6674
|
+
{ json: 'type', js: 'type', typ: r$2('ChatMessageType') },
|
|
6675
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6676
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6677
|
+
], 'any'),
|
|
6678
|
+
ChatRoomObject: o$2([
|
|
6679
|
+
{ json: 'id', js: 'id', typ: m$2('') },
|
|
6680
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6681
|
+
{ json: 'providerName', js: 'providerName', typ: '' },
|
|
6682
|
+
{ json: 'type', js: 'type', typ: r$2('ChatRoomType') },
|
|
6683
|
+
{ json: 'url', js: 'url', typ: u$2(undefined, '') },
|
|
6684
|
+
], 'any'),
|
|
6685
|
+
ChatRoom: o$2([
|
|
6686
|
+
{ json: 'id', js: 'id', typ: m$2('') },
|
|
6687
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6688
|
+
{ json: 'providerName', js: 'providerName', typ: '' },
|
|
6689
|
+
{ json: 'type', js: 'type', typ: r$2('ChatRoomType') },
|
|
6690
|
+
{ json: 'url', js: 'url', typ: u$2(undefined, '') },
|
|
6691
|
+
], 'any'),
|
|
6692
|
+
ChatSearchCriteria: o$2([
|
|
6693
|
+
{ json: 'criteria', js: 'criteria', typ: a$2(u$2(r$2('OrganizationObject'), '')) },
|
|
6694
|
+
{ json: 'type', js: 'type', typ: r$2('ChatSearchCriteriaType') },
|
|
6695
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6696
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6697
|
+
], 'any'),
|
|
6698
|
+
OrganizationObject: o$2([
|
|
6699
|
+
{ json: 'id', js: 'id', typ: r$2('Identifiers') },
|
|
6700
|
+
{ json: 'market', js: 'market', typ: u$2(undefined, r$2('OrganizationMarket')) },
|
|
6701
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6702
|
+
{ json: 'type', js: 'type', typ: r$2('TentacledInteractionType') },
|
|
6703
|
+
], 'any'),
|
|
6704
|
+
Identifiers: o$2([
|
|
6705
|
+
{ json: 'BBG', js: 'BBG', typ: u$2(undefined, '') },
|
|
6706
|
+
{ json: 'CUSIP', js: 'CUSIP', typ: u$2(undefined, '') },
|
|
6707
|
+
{ json: 'FDS_ID', js: 'FDS_ID', typ: u$2(undefined, '') },
|
|
6708
|
+
{ json: 'FIGI', js: 'FIGI', typ: u$2(undefined, '') },
|
|
6709
|
+
{ json: 'ISIN', js: 'ISIN', typ: u$2(undefined, '') },
|
|
6710
|
+
{ json: 'PERMID', js: 'PERMID', typ: u$2(undefined, '') },
|
|
6711
|
+
{ json: 'RIC', js: 'RIC', typ: u$2(undefined, '') },
|
|
6712
|
+
{ json: 'SEDOL', js: 'SEDOL', typ: u$2(undefined, '') },
|
|
6713
|
+
{ json: 'ticker', js: 'ticker', typ: u$2(undefined, '') },
|
|
6714
|
+
{ json: 'LEI', js: 'LEI', typ: u$2(undefined, '') },
|
|
6715
|
+
{ json: 'email', js: 'email', typ: u$2(undefined, '') },
|
|
6716
|
+
], 'any'),
|
|
6717
|
+
Contact: o$2([
|
|
6718
|
+
{ json: 'id', js: 'id', typ: r$2('FluffyContactIdentifiers') },
|
|
6719
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6720
|
+
{ json: 'type', js: 'type', typ: r$2('FluffyInteractionType') },
|
|
6721
|
+
], 'any'),
|
|
6722
|
+
FluffyContactIdentifiers: o$2([
|
|
6723
|
+
{ json: 'email', js: 'email', typ: u$2(undefined, '') },
|
|
6724
|
+
{ json: 'FDS_ID', js: 'FDS_ID', typ: u$2(undefined, '') },
|
|
6725
|
+
], 'any'),
|
|
6726
|
+
ContactList: o$2([
|
|
6727
|
+
{ json: 'contacts', js: 'contacts', typ: a$2(r$2('ContactElement')) },
|
|
6728
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('')) },
|
|
6729
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6730
|
+
{ json: 'type', js: 'type', typ: r$2('ContactListType') },
|
|
6731
|
+
], 'any'),
|
|
6732
|
+
Context: o$2([
|
|
6733
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6734
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6735
|
+
{ json: 'type', js: 'type', typ: '' },
|
|
6736
|
+
], 'any'),
|
|
6737
|
+
Country: o$2([
|
|
6738
|
+
{ json: 'id', js: 'id', typ: r$2('CountryID') },
|
|
6739
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6740
|
+
{ json: 'type', js: 'type', typ: r$2('CountryType') },
|
|
6741
|
+
], 'any'),
|
|
6742
|
+
CountryID: o$2([
|
|
6743
|
+
{ json: 'COUNTRY_ISOALPHA2', js: 'COUNTRY_ISOALPHA2', typ: u$2(undefined, '') },
|
|
6744
|
+
{ json: 'COUNTRY_ISOALPHA3', js: 'COUNTRY_ISOALPHA3', typ: u$2(undefined, '') },
|
|
6745
|
+
{ json: 'ISOALPHA2', js: 'ISOALPHA2', typ: u$2(undefined, '') },
|
|
6746
|
+
{ json: 'ISOALPHA3', js: 'ISOALPHA3', typ: u$2(undefined, '') },
|
|
6747
|
+
], 'any'),
|
|
6748
|
+
Currency: o$2([
|
|
6749
|
+
{ json: 'id', js: 'id', typ: r$2('CurrencyID') },
|
|
6750
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6751
|
+
{ json: 'type', js: 'type', typ: r$2('CurrencyType') },
|
|
6752
|
+
], 'any'),
|
|
6753
|
+
CurrencyID: o$2([{ json: 'CURRENCY_ISOCODE', js: 'CURRENCY_ISOCODE', typ: u$2(undefined, '') }], 'any'),
|
|
6754
|
+
Email: o$2([
|
|
6755
|
+
{ json: 'recipients', js: 'recipients', typ: r$2('EmailRecipients') },
|
|
6756
|
+
{ json: 'subject', js: 'subject', typ: u$2(undefined, '') },
|
|
6757
|
+
{ json: 'textBody', js: 'textBody', typ: u$2(undefined, '') },
|
|
6758
|
+
{ json: 'type', js: 'type', typ: r$2('EmailType') },
|
|
6759
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6760
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6761
|
+
], 'any'),
|
|
6762
|
+
EmailRecipients: o$2([
|
|
6763
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, r$2('ContactTIdentifiers')) },
|
|
6764
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6765
|
+
{ json: 'type', js: 'type', typ: r$2('EmailRecipientsType') },
|
|
6766
|
+
{ json: 'contacts', js: 'contacts', typ: u$2(undefined, a$2(r$2('ContactElement'))) },
|
|
6767
|
+
], 'any'),
|
|
6768
|
+
ContactTIdentifiers: o$2([
|
|
6769
|
+
{ json: 'email', js: 'email', typ: u$2(undefined, '') },
|
|
6770
|
+
{ json: 'FDS_ID', js: 'FDS_ID', typ: u$2(undefined, '') },
|
|
6771
|
+
], 'any'),
|
|
6772
|
+
FileAttachment: o$2([
|
|
6773
|
+
{ json: 'data', js: 'data', typ: r$2('FileAttachmentData') },
|
|
6774
|
+
{ json: 'type', js: 'type', typ: r$2('FileAttachmentType') },
|
|
6775
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6776
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6777
|
+
], 'any'),
|
|
6778
|
+
Instrument: o$2([
|
|
6779
|
+
{ json: 'id', js: 'id', typ: r$2('FluffyInstrumentIdentifiers') },
|
|
6780
|
+
{ json: 'market', js: 'market', typ: u$2(undefined, r$2('PurpleMarket')) },
|
|
6781
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6782
|
+
{ json: 'type', js: 'type', typ: r$2('PurpleInteractionType') },
|
|
6783
|
+
], 'any'),
|
|
6784
|
+
FluffyInstrumentIdentifiers: o$2([
|
|
6785
|
+
{ json: 'BBG', js: 'BBG', typ: u$2(undefined, '') },
|
|
6786
|
+
{ json: 'CUSIP', js: 'CUSIP', typ: u$2(undefined, '') },
|
|
6787
|
+
{ json: 'FDS_ID', js: 'FDS_ID', typ: u$2(undefined, '') },
|
|
6788
|
+
{ json: 'FIGI', js: 'FIGI', typ: u$2(undefined, '') },
|
|
6789
|
+
{ json: 'ISIN', js: 'ISIN', typ: u$2(undefined, '') },
|
|
6790
|
+
{ json: 'PERMID', js: 'PERMID', typ: u$2(undefined, '') },
|
|
6791
|
+
{ json: 'RIC', js: 'RIC', typ: u$2(undefined, '') },
|
|
6792
|
+
{ json: 'SEDOL', js: 'SEDOL', typ: u$2(undefined, '') },
|
|
6793
|
+
{ json: 'ticker', js: 'ticker', typ: u$2(undefined, '') },
|
|
6794
|
+
], 'any'),
|
|
6795
|
+
PurpleMarket: o$2([
|
|
6796
|
+
{ json: 'BBG', js: 'BBG', typ: u$2(undefined, '') },
|
|
6797
|
+
{ json: 'COUNTRY_ISOALPHA2', js: 'COUNTRY_ISOALPHA2', typ: u$2(undefined, '') },
|
|
6798
|
+
{ json: 'MIC', js: 'MIC', typ: u$2(undefined, '') },
|
|
6799
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6800
|
+
], 'any'),
|
|
6801
|
+
InstrumentList: o$2([
|
|
6802
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('')) },
|
|
6803
|
+
{ json: 'instruments', js: 'instruments', typ: a$2(r$2('InstrumentElement')) },
|
|
6804
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6805
|
+
{ json: 'type', js: 'type', typ: r$2('InstrumentListType') },
|
|
6806
|
+
], 'any'),
|
|
6807
|
+
Interaction: o$2([
|
|
6808
|
+
{ json: 'description', js: 'description', typ: '' },
|
|
6809
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, r$2('InteractionID')) },
|
|
6810
|
+
{ json: 'initiator', js: 'initiator', typ: u$2(undefined, r$2('ContactElement')) },
|
|
6811
|
+
{ json: 'interactionType', js: 'interactionType', typ: '' },
|
|
6812
|
+
{ json: 'origin', js: 'origin', typ: u$2(undefined, '') },
|
|
6813
|
+
{ json: 'participants', js: 'participants', typ: r$2('ContactListObject') },
|
|
6814
|
+
{ json: 'timeRange', js: 'timeRange', typ: r$2('TimeRangeObject') },
|
|
6815
|
+
{ json: 'type', js: 'type', typ: r$2('InteractionType') },
|
|
6816
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6817
|
+
], 'any'),
|
|
6818
|
+
InteractionID: o$2([
|
|
6819
|
+
{ json: 'SALESFORCE', js: 'SALESFORCE', typ: u$2(undefined, '') },
|
|
6820
|
+
{ json: 'SINGLETRACK', js: 'SINGLETRACK', typ: u$2(undefined, '') },
|
|
6821
|
+
{ json: 'URI', js: 'URI', typ: u$2(undefined, '') },
|
|
6822
|
+
], 'any'),
|
|
6823
|
+
Message: o$2([
|
|
6824
|
+
{ json: 'entities', js: 'entities', typ: u$2(undefined, m$2(r$2('EntityValue'))) },
|
|
6825
|
+
{ json: 'text', js: 'text', typ: u$2(undefined, r$2('FluffyMessageText')) },
|
|
6826
|
+
{ json: 'type', js: 'type', typ: r$2('MessageType') },
|
|
6827
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6828
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6829
|
+
], 'any'),
|
|
6830
|
+
FluffyMessageText: o$2([
|
|
6831
|
+
{ json: 'text/markdown', js: 'text/markdown', typ: u$2(undefined, '') },
|
|
6832
|
+
{ json: 'text/plain', js: 'text/plain', typ: u$2(undefined, '') },
|
|
6833
|
+
], 'any'),
|
|
6834
|
+
Nothing: o$2([
|
|
6835
|
+
{ json: 'type', js: 'type', typ: r$2('NothingType') },
|
|
6836
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6837
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6838
|
+
], 'any'),
|
|
6839
|
+
Order: o$2([
|
|
6840
|
+
{ json: 'details', js: 'details', typ: u$2(undefined, r$2('PurpleOrderDetails')) },
|
|
6841
|
+
{ json: 'id', js: 'id', typ: m$2('') },
|
|
6842
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6843
|
+
{ json: 'type', js: 'type', typ: r$2('OrderType') },
|
|
6844
|
+
], 'any'),
|
|
6845
|
+
PurpleOrderDetails: o$2([{ json: 'product', js: 'product', typ: u$2(undefined, r$2('ProductObject')) }], 'any'),
|
|
6846
|
+
ProductObject: o$2([
|
|
6847
|
+
{ json: 'id', js: 'id', typ: m$2('') },
|
|
6848
|
+
{ json: 'instrument', js: 'instrument', typ: u$2(undefined, r$2('InstrumentElement')) },
|
|
6849
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6850
|
+
{ json: 'type', js: 'type', typ: r$2('ProductType') },
|
|
6851
|
+
], 'any'),
|
|
6852
|
+
OrderList: o$2([
|
|
6853
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('')) },
|
|
6854
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6855
|
+
{ json: 'orders', js: 'orders', typ: a$2(r$2('OrderElement')) },
|
|
6856
|
+
{ json: 'type', js: 'type', typ: r$2('OrderListType') },
|
|
6857
|
+
], 'any'),
|
|
6858
|
+
OrderElement: o$2([
|
|
6859
|
+
{ json: 'details', js: 'details', typ: u$2(undefined, r$2('FluffyOrderDetails')) },
|
|
6860
|
+
{ json: 'id', js: 'id', typ: m$2('') },
|
|
6861
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6862
|
+
{ json: 'type', js: 'type', typ: r$2('OrderType') },
|
|
6863
|
+
], 'any'),
|
|
6864
|
+
FluffyOrderDetails: o$2([{ json: 'product', js: 'product', typ: u$2(undefined, r$2('ProductObject')) }], 'any'),
|
|
6865
|
+
Organization: o$2([
|
|
6866
|
+
{ json: 'id', js: 'id', typ: r$2('OrganizationIdentifiers') },
|
|
6867
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6868
|
+
{ json: 'type', js: 'type', typ: r$2('StickyInteractionType') },
|
|
6869
|
+
], 'any'),
|
|
6870
|
+
OrganizationIdentifiers: o$2([
|
|
6871
|
+
{ json: 'FDS_ID', js: 'FDS_ID', typ: u$2(undefined, '') },
|
|
6872
|
+
{ json: 'LEI', js: 'LEI', typ: u$2(undefined, '') },
|
|
6873
|
+
{ json: 'PERMID', js: 'PERMID', typ: u$2(undefined, '') },
|
|
6874
|
+
], 'any'),
|
|
6875
|
+
Portfolio: o$2([
|
|
6876
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('')) },
|
|
6877
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6878
|
+
{ json: 'positions', js: 'positions', typ: a$2(r$2('PositionElement')) },
|
|
6879
|
+
{ json: 'type', js: 'type', typ: r$2('PortfolioType') },
|
|
6880
|
+
], 'any'),
|
|
6881
|
+
PositionElement: o$2([
|
|
6882
|
+
{ json: 'holding', js: 'holding', typ: 3.14 },
|
|
6883
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('')) },
|
|
6884
|
+
{ json: 'instrument', js: 'instrument', typ: r$2('InstrumentElement') },
|
|
6885
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6886
|
+
{ json: 'type', js: 'type', typ: r$2('PositionType') },
|
|
6887
|
+
], 'any'),
|
|
6888
|
+
Position: o$2([
|
|
6889
|
+
{ json: 'holding', js: 'holding', typ: 3.14 },
|
|
6890
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('')) },
|
|
6891
|
+
{ json: 'instrument', js: 'instrument', typ: r$2('InstrumentElement') },
|
|
6892
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6893
|
+
{ json: 'type', js: 'type', typ: r$2('PositionType') },
|
|
6894
|
+
], 'any'),
|
|
6895
|
+
Product: o$2([
|
|
6896
|
+
{ json: 'id', js: 'id', typ: m$2('') },
|
|
6897
|
+
{ json: 'instrument', js: 'instrument', typ: u$2(undefined, r$2('InstrumentElement')) },
|
|
6898
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6899
|
+
{ json: 'type', js: 'type', typ: r$2('ProductType') },
|
|
6900
|
+
], 'any'),
|
|
6901
|
+
TimeRange: o$2([
|
|
6902
|
+
{ json: 'endTime', js: 'endTime', typ: u$2(undefined, Date) },
|
|
6903
|
+
{ json: 'startTime', js: 'startTime', typ: u$2(undefined, Date) },
|
|
6904
|
+
{ json: 'type', js: 'type', typ: r$2('TimeRangeType') },
|
|
6905
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6906
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6907
|
+
], 'any'),
|
|
6908
|
+
Trade: o$2([
|
|
6909
|
+
{ json: 'id', js: 'id', typ: m$2('') },
|
|
6910
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6911
|
+
{ json: 'product', js: 'product', typ: r$2('ProductObject') },
|
|
6912
|
+
{ json: 'type', js: 'type', typ: r$2('TradeType') },
|
|
6913
|
+
], 'any'),
|
|
6914
|
+
TradeList: o$2([
|
|
6915
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('')) },
|
|
6916
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6917
|
+
{ json: 'trades', js: 'trades', typ: a$2(r$2('TradeElement')) },
|
|
6918
|
+
{ json: 'type', js: 'type', typ: r$2('TradeListType') },
|
|
6919
|
+
], 'any'),
|
|
6920
|
+
TradeElement: o$2([
|
|
6921
|
+
{ json: 'id', js: 'id', typ: m$2('') },
|
|
6922
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6923
|
+
{ json: 'product', js: 'product', typ: r$2('ProductObject') },
|
|
6924
|
+
{ json: 'type', js: 'type', typ: r$2('TradeType') },
|
|
6925
|
+
], 'any'),
|
|
6926
|
+
TransactionResult: o$2([
|
|
6927
|
+
{ json: 'context', js: 'context', typ: u$2(undefined, r$2('ContextElement')) },
|
|
6928
|
+
{ json: 'message', js: 'message', typ: u$2(undefined, '') },
|
|
6929
|
+
{ json: 'status', js: 'status', typ: r$2('TransactionStatus') },
|
|
6930
|
+
{ json: 'type', js: 'type', typ: r$2('TransactionResultType') },
|
|
6931
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6932
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6933
|
+
], 'any'),
|
|
6934
|
+
Valuation: o$2([
|
|
6935
|
+
{ json: 'CURRENCY_ISOCODE', js: 'CURRENCY_ISOCODE', typ: '' },
|
|
6936
|
+
{ json: 'expiryTime', js: 'expiryTime', typ: u$2(undefined, Date) },
|
|
6937
|
+
{ json: 'price', js: 'price', typ: u$2(undefined, 3.14) },
|
|
6938
|
+
{ json: 'type', js: 'type', typ: r$2('ValuationType') },
|
|
6939
|
+
{ json: 'valuationTime', js: 'valuationTime', typ: u$2(undefined, Date) },
|
|
6940
|
+
{ json: 'value', js: 'value', typ: 3.14 },
|
|
6941
|
+
{ json: 'id', js: 'id', typ: u$2(undefined, m$2('any')) },
|
|
6942
|
+
{ json: 'name', js: 'name', typ: u$2(undefined, '') },
|
|
6943
|
+
], 'any')});
|
|
6944
|
+
|
|
6945
|
+
// To parse this data:
|
|
6946
|
+
//
|
|
6947
|
+
// import { Convert, WebConnectionProtocol1Hello, WebConnectionProtocol2LoadURL, WebConnectionProtocol3Handshake, WebConnectionProtocol4ValidateAppIdentity, WebConnectionProtocol5ValidateAppIdentityFailedResponse, WebConnectionProtocol5ValidateAppIdentitySuccessResponse, WebConnectionProtocol6Goodbye, WebConnectionProtocolMessage, AddContextListenerRequest, AddContextListenerResponse, AddEventListenerRequest, AddEventListenerResponse, AddIntentListenerRequest, AddIntentListenerResponse, AgentEventMessage, AgentResponseMessage, AppRequestMessage, BroadcastEvent, BroadcastRequest, BroadcastResponse, ChannelChangedEvent, ContextListenerUnsubscribeRequest, ContextListenerUnsubscribeResponse, CreatePrivateChannelRequest, CreatePrivateChannelResponse, EventListenerUnsubscribeRequest, EventListenerUnsubscribeResponse, Fdc3UserInterfaceChannelSelected, Fdc3UserInterfaceChannels, Fdc3UserInterfaceDrag, Fdc3UserInterfaceHandshake, Fdc3UserInterfaceHello, Fdc3UserInterfaceMessage, Fdc3UserInterfaceResolve, Fdc3UserInterfaceResolveAction, Fdc3UserInterfaceRestyle, FindInstancesRequest, FindInstancesResponse, FindIntentRequest, FindIntentResponse, FindIntentsByContextRequest, FindIntentsByContextResponse, GetAppMetadataRequest, GetAppMetadataResponse, GetCurrentChannelRequest, GetCurrentChannelResponse, GetCurrentContextRequest, GetCurrentContextResponse, GetInfoRequest, GetInfoResponse, GetOrCreateChannelRequest, GetOrCreateChannelResponse, GetUserChannelsRequest, GetUserChannelsResponse, HeartbeatAcknowledgementRequest, HeartbeatEvent, IntentEvent, IntentListenerUnsubscribeRequest, IntentListenerUnsubscribeResponse, IntentResultRequest, IntentResultResponse, JoinUserChannelRequest, JoinUserChannelResponse, LeaveCurrentChannelRequest, LeaveCurrentChannelResponse, OpenRequest, OpenResponse, PrivateChannelAddEventListenerRequest, PrivateChannelAddEventListenerResponse, PrivateChannelDisconnectRequest, PrivateChannelDisconnectResponse, PrivateChannelOnAddContextListenerEvent, PrivateChannelOnDisconnectEvent, PrivateChannelOnUnsubscribeEvent, PrivateChannelUnsubscribeEventListenerRequest, PrivateChannelUnsubscribeEventListenerResponse, RaiseIntentForContextRequest, RaiseIntentForContextResponse, RaiseIntentRequest, RaiseIntentResponse, RaiseIntentResultResponse } from "./file";
|
|
6948
|
+
//
|
|
6949
|
+
// const webConnectionProtocol1Hello = Convert.toWebConnectionProtocol1Hello(json);
|
|
6950
|
+
// const webConnectionProtocol2LoadURL = Convert.toWebConnectionProtocol2LoadURL(json);
|
|
6951
|
+
// const webConnectionProtocol3Handshake = Convert.toWebConnectionProtocol3Handshake(json);
|
|
6952
|
+
// const webConnectionProtocol4ValidateAppIdentity = Convert.toWebConnectionProtocol4ValidateAppIdentity(json);
|
|
6953
|
+
// const webConnectionProtocol5ValidateAppIdentityFailedResponse = Convert.toWebConnectionProtocol5ValidateAppIdentityFailedResponse(json);
|
|
6954
|
+
// const webConnectionProtocol5ValidateAppIdentitySuccessResponse = Convert.toWebConnectionProtocol5ValidateAppIdentitySuccessResponse(json);
|
|
6955
|
+
// const webConnectionProtocol6Goodbye = Convert.toWebConnectionProtocol6Goodbye(json);
|
|
6956
|
+
// const webConnectionProtocolMessage = Convert.toWebConnectionProtocolMessage(json);
|
|
6957
|
+
// const addContextListenerRequest = Convert.toAddContextListenerRequest(json);
|
|
6958
|
+
// const addContextListenerResponse = Convert.toAddContextListenerResponse(json);
|
|
6959
|
+
// const addEventListenerRequest = Convert.toAddEventListenerRequest(json);
|
|
6960
|
+
// const addEventListenerResponse = Convert.toAddEventListenerResponse(json);
|
|
6961
|
+
// const addIntentListenerRequest = Convert.toAddIntentListenerRequest(json);
|
|
6962
|
+
// const addIntentListenerResponse = Convert.toAddIntentListenerResponse(json);
|
|
6963
|
+
// const agentEventMessage = Convert.toAgentEventMessage(json);
|
|
6964
|
+
// const agentResponseMessage = Convert.toAgentResponseMessage(json);
|
|
6965
|
+
// const appRequestMessage = Convert.toAppRequestMessage(json);
|
|
6966
|
+
// const broadcastEvent = Convert.toBroadcastEvent(json);
|
|
6967
|
+
// const broadcastRequest = Convert.toBroadcastRequest(json);
|
|
6968
|
+
// const broadcastResponse = Convert.toBroadcastResponse(json);
|
|
6969
|
+
// const channelChangedEvent = Convert.toChannelChangedEvent(json);
|
|
6970
|
+
// const contextListenerUnsubscribeRequest = Convert.toContextListenerUnsubscribeRequest(json);
|
|
6971
|
+
// const contextListenerUnsubscribeResponse = Convert.toContextListenerUnsubscribeResponse(json);
|
|
6972
|
+
// const createPrivateChannelRequest = Convert.toCreatePrivateChannelRequest(json);
|
|
6973
|
+
// const createPrivateChannelResponse = Convert.toCreatePrivateChannelResponse(json);
|
|
6974
|
+
// const eventListenerUnsubscribeRequest = Convert.toEventListenerUnsubscribeRequest(json);
|
|
6975
|
+
// const eventListenerUnsubscribeResponse = Convert.toEventListenerUnsubscribeResponse(json);
|
|
6976
|
+
// const fdc3UserInterfaceChannelSelected = Convert.toFdc3UserInterfaceChannelSelected(json);
|
|
6977
|
+
// const fdc3UserInterfaceChannels = Convert.toFdc3UserInterfaceChannels(json);
|
|
6978
|
+
// const fdc3UserInterfaceDrag = Convert.toFdc3UserInterfaceDrag(json);
|
|
6979
|
+
// const fdc3UserInterfaceHandshake = Convert.toFdc3UserInterfaceHandshake(json);
|
|
6980
|
+
// const fdc3UserInterfaceHello = Convert.toFdc3UserInterfaceHello(json);
|
|
6981
|
+
// const fdc3UserInterfaceMessage = Convert.toFdc3UserInterfaceMessage(json);
|
|
6982
|
+
// const fdc3UserInterfaceResolve = Convert.toFdc3UserInterfaceResolve(json);
|
|
6983
|
+
// const fdc3UserInterfaceResolveAction = Convert.toFdc3UserInterfaceResolveAction(json);
|
|
6984
|
+
// const fdc3UserInterfaceRestyle = Convert.toFdc3UserInterfaceRestyle(json);
|
|
6985
|
+
// const findInstancesRequest = Convert.toFindInstancesRequest(json);
|
|
6986
|
+
// const findInstancesResponse = Convert.toFindInstancesResponse(json);
|
|
6987
|
+
// const findIntentRequest = Convert.toFindIntentRequest(json);
|
|
6988
|
+
// const findIntentResponse = Convert.toFindIntentResponse(json);
|
|
6989
|
+
// const findIntentsByContextRequest = Convert.toFindIntentsByContextRequest(json);
|
|
6990
|
+
// const findIntentsByContextResponse = Convert.toFindIntentsByContextResponse(json);
|
|
6991
|
+
// const getAppMetadataRequest = Convert.toGetAppMetadataRequest(json);
|
|
6992
|
+
// const getAppMetadataResponse = Convert.toGetAppMetadataResponse(json);
|
|
6993
|
+
// const getCurrentChannelRequest = Convert.toGetCurrentChannelRequest(json);
|
|
6994
|
+
// const getCurrentChannelResponse = Convert.toGetCurrentChannelResponse(json);
|
|
6995
|
+
// const getCurrentContextRequest = Convert.toGetCurrentContextRequest(json);
|
|
6996
|
+
// const getCurrentContextResponse = Convert.toGetCurrentContextResponse(json);
|
|
6997
|
+
// const getInfoRequest = Convert.toGetInfoRequest(json);
|
|
6998
|
+
// const getInfoResponse = Convert.toGetInfoResponse(json);
|
|
6999
|
+
// const getOrCreateChannelRequest = Convert.toGetOrCreateChannelRequest(json);
|
|
7000
|
+
// const getOrCreateChannelResponse = Convert.toGetOrCreateChannelResponse(json);
|
|
7001
|
+
// const getUserChannelsRequest = Convert.toGetUserChannelsRequest(json);
|
|
7002
|
+
// const getUserChannelsResponse = Convert.toGetUserChannelsResponse(json);
|
|
7003
|
+
// const heartbeatAcknowledgementRequest = Convert.toHeartbeatAcknowledgementRequest(json);
|
|
7004
|
+
// const heartbeatEvent = Convert.toHeartbeatEvent(json);
|
|
7005
|
+
// const intentEvent = Convert.toIntentEvent(json);
|
|
7006
|
+
// const intentListenerUnsubscribeRequest = Convert.toIntentListenerUnsubscribeRequest(json);
|
|
7007
|
+
// const intentListenerUnsubscribeResponse = Convert.toIntentListenerUnsubscribeResponse(json);
|
|
7008
|
+
// const intentResultRequest = Convert.toIntentResultRequest(json);
|
|
7009
|
+
// const intentResultResponse = Convert.toIntentResultResponse(json);
|
|
7010
|
+
// const joinUserChannelRequest = Convert.toJoinUserChannelRequest(json);
|
|
7011
|
+
// const joinUserChannelResponse = Convert.toJoinUserChannelResponse(json);
|
|
7012
|
+
// const leaveCurrentChannelRequest = Convert.toLeaveCurrentChannelRequest(json);
|
|
7013
|
+
// const leaveCurrentChannelResponse = Convert.toLeaveCurrentChannelResponse(json);
|
|
7014
|
+
// const openRequest = Convert.toOpenRequest(json);
|
|
7015
|
+
// const openResponse = Convert.toOpenResponse(json);
|
|
7016
|
+
// const privateChannelAddEventListenerRequest = Convert.toPrivateChannelAddEventListenerRequest(json);
|
|
7017
|
+
// const privateChannelAddEventListenerResponse = Convert.toPrivateChannelAddEventListenerResponse(json);
|
|
7018
|
+
// const privateChannelDisconnectRequest = Convert.toPrivateChannelDisconnectRequest(json);
|
|
7019
|
+
// const privateChannelDisconnectResponse = Convert.toPrivateChannelDisconnectResponse(json);
|
|
7020
|
+
// const privateChannelOnAddContextListenerEvent = Convert.toPrivateChannelOnAddContextListenerEvent(json);
|
|
7021
|
+
// const privateChannelOnDisconnectEvent = Convert.toPrivateChannelOnDisconnectEvent(json);
|
|
7022
|
+
// const privateChannelOnUnsubscribeEvent = Convert.toPrivateChannelOnUnsubscribeEvent(json);
|
|
7023
|
+
// const privateChannelUnsubscribeEventListenerRequest = Convert.toPrivateChannelUnsubscribeEventListenerRequest(json);
|
|
7024
|
+
// const privateChannelUnsubscribeEventListenerResponse = Convert.toPrivateChannelUnsubscribeEventListenerResponse(json);
|
|
7025
|
+
// const raiseIntentForContextRequest = Convert.toRaiseIntentForContextRequest(json);
|
|
7026
|
+
// const raiseIntentForContextResponse = Convert.toRaiseIntentForContextResponse(json);
|
|
7027
|
+
// const raiseIntentRequest = Convert.toRaiseIntentRequest(json);
|
|
7028
|
+
// const raiseIntentResponse = Convert.toRaiseIntentResponse(json);
|
|
7029
|
+
// const raiseIntentResultResponse = Convert.toRaiseIntentResultResponse(json);
|
|
7030
|
+
//
|
|
7031
|
+
// These functions will throw an error if the JSON doesn't
|
|
7032
|
+
// match the expected interface, even if the JSON is valid.
|
|
7033
|
+
/**
|
|
7034
|
+
* Identifies the type of the message and it is typically set to the FDC3 function name that
|
|
7035
|
+
* the message relates to, e.g. 'findIntent', with 'Response' appended.
|
|
7036
|
+
*/
|
|
7037
|
+
// Converts JSON strings to/from your types
|
|
7038
|
+
// and asserts the results of JSON.parse at runtime
|
|
7039
|
+
function a$1(typ) {
|
|
7040
|
+
return { arrayItems: typ };
|
|
7041
|
+
}
|
|
7042
|
+
function u$1(...typs) {
|
|
7043
|
+
return { unionMembers: typs };
|
|
7044
|
+
}
|
|
7045
|
+
function o$1(props, additional) {
|
|
7046
|
+
return { props, additional };
|
|
7047
|
+
}
|
|
7048
|
+
function m$1(additional) {
|
|
7049
|
+
return { props: [], additional };
|
|
7050
|
+
}
|
|
7051
|
+
function r$1(name) {
|
|
7052
|
+
return { ref: name };
|
|
7053
|
+
}
|
|
7054
|
+
({
|
|
7055
|
+
WebConnectionProtocol1HelloPayload: o$1([
|
|
7056
|
+
{ json: 'actualUrl', js: 'actualUrl', typ: '' },
|
|
7057
|
+
{ json: 'channelSelector', js: 'channelSelector', typ: u$1(undefined, true) },
|
|
7058
|
+
{ json: 'fdc3Version', js: 'fdc3Version', typ: '' },
|
|
7059
|
+
{ json: 'identityUrl', js: 'identityUrl', typ: '' },
|
|
7060
|
+
{ json: 'intentResolver', js: 'intentResolver', typ: u$1(undefined, true) },
|
|
7061
|
+
], 'any'),
|
|
7062
|
+
WebConnectionProtocol3HandshakePayload: o$1([
|
|
7063
|
+
{ json: 'appLaunchTimeout', js: 'appLaunchTimeout', typ: u$1(undefined, 3.14) },
|
|
7064
|
+
{ json: 'channelSelectorUrl', js: 'channelSelectorUrl', typ: u$1(true, '') },
|
|
7065
|
+
{ json: 'fdc3Version', js: 'fdc3Version', typ: '' },
|
|
7066
|
+
{ json: 'intentResolverUrl', js: 'intentResolverUrl', typ: u$1(true, '') },
|
|
7067
|
+
{ json: 'messageExchangeTimeout', js: 'messageExchangeTimeout', typ: u$1(undefined, 3.14) },
|
|
7068
|
+
], false),
|
|
7069
|
+
WebConnectionProtocol4ValidateAppIdentityPayload: o$1([
|
|
7070
|
+
{ json: 'actualUrl', js: 'actualUrl', typ: '' },
|
|
7071
|
+
{ json: 'identityUrl', js: 'identityUrl', typ: '' },
|
|
7072
|
+
{ json: 'instanceId', js: 'instanceId', typ: u$1(undefined, '') },
|
|
7073
|
+
{ json: 'instanceUuid', js: 'instanceUuid', typ: u$1(undefined, '') },
|
|
7074
|
+
], false),
|
|
7075
|
+
WebConnectionProtocol5ValidateAppIdentityFailedResponsePayload: o$1([{ json: 'message', js: 'message', typ: u$1(undefined, '') }], false),
|
|
7076
|
+
ImplementationMetadata: o$1([
|
|
7077
|
+
{ json: 'appMetadata', js: 'appMetadata', typ: r$1('AppMetadata') },
|
|
7078
|
+
{ json: 'fdc3Version', js: 'fdc3Version', typ: '' },
|
|
7079
|
+
{ json: 'optionalFeatures', js: 'optionalFeatures', typ: r$1('OptionalFeatures') },
|
|
7080
|
+
{ json: 'provider', js: 'provider', typ: '' },
|
|
7081
|
+
{ json: 'providerVersion', js: 'providerVersion', typ: u$1(undefined, '') },
|
|
7082
|
+
], false),
|
|
7083
|
+
AppMetadata: o$1([
|
|
7084
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7085
|
+
{ json: 'description', js: 'description', typ: u$1(undefined, '') },
|
|
7086
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: u$1(undefined, '') },
|
|
7087
|
+
{ json: 'icons', js: 'icons', typ: u$1(undefined, a$1(r$1('Icon'))) },
|
|
7088
|
+
{ json: 'instanceId', js: 'instanceId', typ: u$1(undefined, '') },
|
|
7089
|
+
{ json: 'instanceMetadata', js: 'instanceMetadata', typ: u$1(undefined, m$1('any')) },
|
|
7090
|
+
{ json: 'name', js: 'name', typ: u$1(undefined, '') },
|
|
7091
|
+
{ json: 'resultType', js: 'resultType', typ: u$1(undefined, u$1(null, '')) },
|
|
7092
|
+
{ json: 'screenshots', js: 'screenshots', typ: u$1(undefined, a$1(r$1('Image'))) },
|
|
7093
|
+
{ json: 'title', js: 'title', typ: u$1(undefined, '') },
|
|
7094
|
+
{ json: 'tooltip', js: 'tooltip', typ: u$1(undefined, '') },
|
|
7095
|
+
{ json: 'version', js: 'version', typ: u$1(undefined, '') },
|
|
7096
|
+
], false),
|
|
7097
|
+
Icon: o$1([
|
|
7098
|
+
{ json: 'size', js: 'size', typ: u$1(undefined, '') },
|
|
7099
|
+
{ json: 'src', js: 'src', typ: '' },
|
|
7100
|
+
{ json: 'type', js: 'type', typ: u$1(undefined, '') },
|
|
7101
|
+
], false),
|
|
7102
|
+
Image: o$1([
|
|
7103
|
+
{ json: 'label', js: 'label', typ: u$1(undefined, '') },
|
|
7104
|
+
{ json: 'size', js: 'size', typ: u$1(undefined, '') },
|
|
7105
|
+
{ json: 'src', js: 'src', typ: '' },
|
|
7106
|
+
{ json: 'type', js: 'type', typ: u$1(undefined, '') },
|
|
7107
|
+
], false),
|
|
7108
|
+
WebConnectionProtocolMessage: o$1([
|
|
7109
|
+
{ json: 'meta', js: 'meta', typ: r$1('ConnectionStepMetadata') },
|
|
7110
|
+
{ json: 'payload', js: 'payload', typ: u$1(undefined, m$1('any')) },
|
|
7111
|
+
{ json: 'type', js: 'type', typ: r$1('ConnectionStepMessageType') },
|
|
7112
|
+
], false),
|
|
7113
|
+
ConnectionStepMetadata: o$1([
|
|
7114
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7115
|
+
{ json: 'connectionAttemptUuid', js: 'connectionAttemptUuid', typ: u$1(undefined, '') },
|
|
7116
|
+
], false),
|
|
7117
|
+
AddContextListenerRequestMeta: o$1([
|
|
7118
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7119
|
+
{ json: 'source', js: 'source', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7120
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7121
|
+
], false),
|
|
7122
|
+
AppIdentifier: o$1([
|
|
7123
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7124
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: u$1(undefined, '') },
|
|
7125
|
+
{ json: 'instanceId', js: 'instanceId', typ: u$1(undefined, '') },
|
|
7126
|
+
], 'any'),
|
|
7127
|
+
AddContextListenerRequestPayload: o$1([
|
|
7128
|
+
{ json: 'channelId', js: 'channelId', typ: u$1(null, '') },
|
|
7129
|
+
{ json: 'contextType', js: 'contextType', typ: u$1(null, '') },
|
|
7130
|
+
], false),
|
|
7131
|
+
AddContextListenerResponseMeta: o$1([
|
|
7132
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7133
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: '' },
|
|
7134
|
+
{ json: 'source', js: 'source', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7135
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7136
|
+
], false),
|
|
7137
|
+
AddContextListenerResponsePayload: o$1([
|
|
7138
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('PurpleError')) },
|
|
7139
|
+
{ json: 'listenerUUID', js: 'listenerUUID', typ: u$1(undefined, '') },
|
|
7140
|
+
], false),
|
|
7141
|
+
AddEventListenerRequestPayload: o$1([{ json: 'type', js: 'type', typ: u$1(r$1('FDC3EventType'), null) }], false),
|
|
7142
|
+
AddEventListenerResponsePayload: o$1([
|
|
7143
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('ResponsePayloadError')) },
|
|
7144
|
+
{ json: 'listenerUUID', js: 'listenerUUID', typ: u$1(undefined, '') },
|
|
7145
|
+
], false),
|
|
7146
|
+
PayloadObject: o$1([
|
|
7147
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('FluffyError')) },
|
|
7148
|
+
{ json: 'listenerUUID', js: 'listenerUUID', typ: u$1(undefined, '') },
|
|
7149
|
+
], 'any'),
|
|
7150
|
+
AgentResponseMessageMeta: o$1([
|
|
7151
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7152
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: '' },
|
|
7153
|
+
{ json: 'source', js: 'source', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7154
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7155
|
+
], false),
|
|
7156
|
+
AgentResponseMessageResponsePayload: o$1([{ json: 'error', js: 'error', typ: u$1(undefined, r$1('ResponsePayloadError')) }], 'any'),
|
|
7157
|
+
AppRequestMessageMeta: o$1([
|
|
7158
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7159
|
+
{ json: 'source', js: 'source', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7160
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7161
|
+
], false),
|
|
7162
|
+
BroadcastEventPayload: o$1([
|
|
7163
|
+
{ json: 'channelId', js: 'channelId', typ: u$1(null, '') },
|
|
7164
|
+
{ json: 'context', js: 'context', typ: r$1('Context') },
|
|
7165
|
+
{ json: 'originatingApp', js: 'originatingApp', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7166
|
+
], false),
|
|
7167
|
+
Context: o$1([
|
|
7168
|
+
{ json: 'id', js: 'id', typ: u$1(undefined, m$1('any')) },
|
|
7169
|
+
{ json: 'name', js: 'name', typ: u$1(undefined, '') },
|
|
7170
|
+
{ json: 'type', js: 'type', typ: '' },
|
|
7171
|
+
], 'any'),
|
|
7172
|
+
BroadcastResponseResponsePayload: o$1([{ json: 'error', js: 'error', typ: u$1(undefined, r$1('ResponsePayloadError')) }], 'any'),
|
|
7173
|
+
ChannelChangedEventPayload: o$1([{ json: 'newChannelId', js: 'newChannelId', typ: u$1(null, '') }], false),
|
|
7174
|
+
CreatePrivateChannelResponsePayload: o$1([
|
|
7175
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('PurpleError')) },
|
|
7176
|
+
{ json: 'privateChannel', js: 'privateChannel', typ: u$1(undefined, r$1('Channel')) },
|
|
7177
|
+
], false),
|
|
7178
|
+
Channel: o$1([
|
|
7179
|
+
{ json: 'displayMetadata', js: 'displayMetadata', typ: u$1(undefined, r$1('DisplayMetadata')) },
|
|
7180
|
+
{ json: 'id', js: 'id', typ: '' },
|
|
7181
|
+
{ json: 'type', js: 'type', typ: r$1('Type') },
|
|
7182
|
+
], false),
|
|
7183
|
+
DisplayMetadata: o$1([
|
|
7184
|
+
{ json: 'color', js: 'color', typ: u$1(undefined, '') },
|
|
7185
|
+
{ json: 'glyph', js: 'glyph', typ: u$1(undefined, '') },
|
|
7186
|
+
{ json: 'name', js: 'name', typ: u$1(undefined, '') },
|
|
7187
|
+
], false),
|
|
7188
|
+
Fdc3UserInterfaceChannelSelectedPayload: o$1([{ json: 'selected', js: 'selected', typ: u$1(null, '') }], false),
|
|
7189
|
+
Fdc3UserInterfaceChannelsPayload: o$1([
|
|
7190
|
+
{ json: 'selected', js: 'selected', typ: u$1(null, '') },
|
|
7191
|
+
{ json: 'userChannels', js: 'userChannels', typ: a$1(r$1('Channel')) },
|
|
7192
|
+
], false),
|
|
7193
|
+
InitialCSS: o$1([
|
|
7194
|
+
{ json: 'bottom', js: 'bottom', typ: u$1(undefined, '') },
|
|
7195
|
+
{ json: 'height', js: 'height', typ: u$1(undefined, '') },
|
|
7196
|
+
{ json: 'left', js: 'left', typ: u$1(undefined, '') },
|
|
7197
|
+
{ json: 'maxHeight', js: 'maxHeight', typ: u$1(undefined, '') },
|
|
7198
|
+
{ json: 'maxWidth', js: 'maxWidth', typ: u$1(undefined, '') },
|
|
7199
|
+
{ json: 'right', js: 'right', typ: u$1(undefined, '') },
|
|
7200
|
+
{ json: 'top', js: 'top', typ: u$1(undefined, '') },
|
|
7201
|
+
{ json: 'transition', js: 'transition', typ: u$1(undefined, '') },
|
|
7202
|
+
{ json: 'width', js: 'width', typ: u$1(undefined, '') },
|
|
7203
|
+
{ json: 'zIndex', js: 'zIndex', typ: u$1(undefined, '') },
|
|
7204
|
+
], 'any'),
|
|
7205
|
+
Fdc3UserInterfaceMessage: o$1([
|
|
7206
|
+
{ json: 'payload', js: 'payload', typ: u$1(undefined, m$1('any')) },
|
|
7207
|
+
{ json: 'type', js: 'type', typ: r$1('Fdc3UserInterfaceMessageType') },
|
|
7208
|
+
], false),
|
|
7209
|
+
IntentMetadata: o$1([
|
|
7210
|
+
{ json: 'displayName', js: 'displayName', typ: u$1(undefined, '') },
|
|
7211
|
+
{ json: 'name', js: 'name', typ: '' },
|
|
7212
|
+
], false),
|
|
7213
|
+
Fdc3UserInterfaceResolveActionPayload: o$1([
|
|
7214
|
+
{ json: 'action', js: 'action', typ: r$1('Action') },
|
|
7215
|
+
{ json: 'appIdentifier', js: 'appIdentifier', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7216
|
+
{ json: 'intent', js: 'intent', typ: u$1(undefined, '') },
|
|
7217
|
+
], false),
|
|
7218
|
+
UpdatedCSS: o$1([
|
|
7219
|
+
{ json: 'bottom', js: 'bottom', typ: u$1(undefined, '') },
|
|
7220
|
+
{ json: 'height', js: 'height', typ: u$1(undefined, '') },
|
|
7221
|
+
{ json: 'left', js: 'left', typ: u$1(undefined, '') },
|
|
7222
|
+
{ json: 'maxHeight', js: 'maxHeight', typ: u$1(undefined, '') },
|
|
7223
|
+
{ json: 'maxWidth', js: 'maxWidth', typ: u$1(undefined, '') },
|
|
7224
|
+
{ json: 'right', js: 'right', typ: u$1(undefined, '') },
|
|
7225
|
+
{ json: 'top', js: 'top', typ: u$1(undefined, '') },
|
|
7226
|
+
{ json: 'transition', js: 'transition', typ: u$1(undefined, '') },
|
|
7227
|
+
{ json: 'width', js: 'width', typ: u$1(undefined, '') },
|
|
7228
|
+
{ json: 'zIndex', js: 'zIndex', typ: u$1(undefined, '') },
|
|
7229
|
+
], 'any'),
|
|
7230
|
+
FindInstancesResponsePayload: o$1([
|
|
7231
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('FindInstancesErrors')) },
|
|
7232
|
+
{ json: 'appIdentifiers', js: 'appIdentifiers', typ: u$1(undefined, a$1(r$1('AppMetadata'))) },
|
|
7233
|
+
], false),
|
|
7234
|
+
FindIntentRequestPayload: o$1([
|
|
7235
|
+
{ json: 'context', js: 'context', typ: u$1(undefined, r$1('Context')) },
|
|
7236
|
+
{ json: 'intent', js: 'intent', typ: '' },
|
|
7237
|
+
{ json: 'resultType', js: 'resultType', typ: u$1(undefined, '') },
|
|
7238
|
+
], false),
|
|
7239
|
+
FindIntentResponsePayload: o$1([
|
|
7240
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('FindInstancesErrors')) },
|
|
7241
|
+
{ json: 'appIntent', js: 'appIntent', typ: u$1(undefined, r$1('AppIntent')) },
|
|
7242
|
+
], false),
|
|
7243
|
+
FindIntentsByContextRequestPayload: o$1([
|
|
7244
|
+
{ json: 'context', js: 'context', typ: r$1('Context') },
|
|
7245
|
+
{ json: 'resultType', js: 'resultType', typ: u$1(undefined, '') },
|
|
7246
|
+
], false),
|
|
7247
|
+
FindIntentsByContextResponsePayload: o$1([
|
|
7248
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('FindInstancesErrors')) },
|
|
7249
|
+
{ json: 'appIntents', js: 'appIntents', typ: u$1(undefined, a$1(r$1('AppIntent'))) },
|
|
7250
|
+
], false),
|
|
7251
|
+
GetAppMetadataResponsePayload: o$1([
|
|
7252
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('FindInstancesErrors')) },
|
|
7253
|
+
{ json: 'appMetadata', js: 'appMetadata', typ: u$1(undefined, r$1('AppMetadata')) },
|
|
7254
|
+
], false),
|
|
7255
|
+
GetCurrentChannelResponsePayload: o$1([
|
|
7256
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('ResponsePayloadError')) },
|
|
7257
|
+
{ json: 'channel', js: 'channel', typ: u$1(undefined, u$1(r$1('Channel'), null)) },
|
|
7258
|
+
], false),
|
|
7259
|
+
GetCurrentContextRequestPayload: o$1([
|
|
7260
|
+
{ json: 'channelId', js: 'channelId', typ: '' },
|
|
7261
|
+
{ json: 'contextType', js: 'contextType', typ: u$1(null, '') },
|
|
7262
|
+
], false),
|
|
7263
|
+
GetCurrentContextResponsePayload: o$1([
|
|
7264
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('PurpleError')) },
|
|
7265
|
+
{ json: 'context', js: 'context', typ: u$1(undefined, u$1(null, r$1('Context'))) },
|
|
7266
|
+
], false),
|
|
7267
|
+
GetInfoResponsePayload: o$1([
|
|
7268
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('ResponsePayloadError')) },
|
|
7269
|
+
{ json: 'implementationMetadata', js: 'implementationMetadata', typ: u$1(undefined, r$1('ImplementationMetadata')) },
|
|
7270
|
+
], false),
|
|
7271
|
+
GetOrCreateChannelResponsePayload: o$1([
|
|
7272
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('PurpleError')) },
|
|
7273
|
+
{ json: 'channel', js: 'channel', typ: u$1(undefined, r$1('Channel')) },
|
|
7274
|
+
], false),
|
|
7275
|
+
GetUserChannelsResponsePayload: o$1([
|
|
7276
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('PurpleError')) },
|
|
7277
|
+
{ json: 'userChannels', js: 'userChannels', typ: u$1(undefined, a$1(r$1('Channel'))) },
|
|
7278
|
+
], false),
|
|
7279
|
+
IntentEventPayload: o$1([
|
|
7280
|
+
{ json: 'context', js: 'context', typ: r$1('Context') },
|
|
7281
|
+
{ json: 'intent', js: 'intent', typ: '' },
|
|
7282
|
+
{ json: 'originatingApp', js: 'originatingApp', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7283
|
+
{ json: 'raiseIntentRequestUuid', js: 'raiseIntentRequestUuid', typ: '' },
|
|
7284
|
+
], false),
|
|
7285
|
+
IntentResult: o$1([
|
|
7286
|
+
{ json: 'context', js: 'context', typ: u$1(undefined, r$1('Context')) },
|
|
7287
|
+
{ json: 'channel', js: 'channel', typ: u$1(undefined, r$1('Channel')) },
|
|
7288
|
+
], false),
|
|
7289
|
+
JoinUserChannelResponsePayload: o$1([{ json: 'error', js: 'error', typ: u$1(undefined, r$1('PurpleError')) }], false),
|
|
7290
|
+
LeaveCurrentChannelResponsePayload: o$1([{ json: 'error', js: 'error', typ: u$1(undefined, r$1('PurpleError')) }], false),
|
|
7291
|
+
OpenRequestPayload: o$1([
|
|
7292
|
+
{ json: 'app', js: 'app', typ: r$1('AppIdentifier') },
|
|
7293
|
+
{ json: 'context', js: 'context', typ: u$1(undefined, r$1('Context')) },
|
|
7294
|
+
], false),
|
|
7295
|
+
OpenResponsePayload: o$1([
|
|
7296
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('OpenErrorResponsePayload')) },
|
|
7297
|
+
{ json: 'appIdentifier', js: 'appIdentifier', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7298
|
+
], false),
|
|
7299
|
+
PrivateChannelAddEventListenerRequestPayload: o$1([
|
|
7300
|
+
{ json: 'listenerType', js: 'listenerType', typ: u$1(r$1('PrivateChannelEventType'), null) },
|
|
7301
|
+
{ json: 'privateChannelId', js: 'privateChannelId', typ: '' },
|
|
7302
|
+
], false),
|
|
7303
|
+
PrivateChannelAddEventListenerResponsePayload: o$1([
|
|
7304
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('PurpleError')) },
|
|
7305
|
+
{ json: 'listenerUUID', js: 'listenerUUID', typ: u$1(undefined, '') },
|
|
7306
|
+
], false),
|
|
7307
|
+
PrivateChannelDisconnectResponsePayload: o$1([{ json: 'error', js: 'error', typ: u$1(undefined, r$1('PurpleError')) }], false),
|
|
7308
|
+
PrivateChannelOnAddContextListenerEventPayload: o$1([
|
|
7309
|
+
{ json: 'contextType', js: 'contextType', typ: u$1(null, '') },
|
|
7310
|
+
{ json: 'privateChannelId', js: 'privateChannelId', typ: '' },
|
|
7311
|
+
], false),
|
|
7312
|
+
PrivateChannelOnUnsubscribeEventPayload: o$1([
|
|
7313
|
+
{ json: 'contextType', js: 'contextType', typ: u$1(null, '') },
|
|
7314
|
+
{ json: 'privateChannelId', js: 'privateChannelId', typ: '' },
|
|
7315
|
+
], false),
|
|
7316
|
+
RaiseIntentForContextRequestPayload: o$1([
|
|
7317
|
+
{ json: 'app', js: 'app', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7318
|
+
{ json: 'context', js: 'context', typ: r$1('Context') },
|
|
7319
|
+
], false),
|
|
7320
|
+
RaiseIntentForContextResponsePayload: o$1([
|
|
7321
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('FindInstancesErrors')) },
|
|
7322
|
+
{ json: 'intentResolution', js: 'intentResolution', typ: u$1(undefined, r$1('IntentResolution')) },
|
|
7323
|
+
{ json: 'appIntents', js: 'appIntents', typ: u$1(undefined, a$1(r$1('AppIntent'))) },
|
|
7324
|
+
], false),
|
|
7325
|
+
RaiseIntentRequestPayload: o$1([
|
|
7326
|
+
{ json: 'app', js: 'app', typ: u$1(undefined, r$1('AppIdentifier')) },
|
|
7327
|
+
{ json: 'context', js: 'context', typ: r$1('Context') },
|
|
7328
|
+
{ json: 'intent', js: 'intent', typ: '' },
|
|
7329
|
+
], false),
|
|
7330
|
+
RaiseIntentResponsePayload: o$1([
|
|
7331
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('FindInstancesErrors')) },
|
|
7332
|
+
{ json: 'intentResolution', js: 'intentResolution', typ: u$1(undefined, r$1('IntentResolution')) },
|
|
7333
|
+
{ json: 'appIntent', js: 'appIntent', typ: u$1(undefined, r$1('AppIntent')) },
|
|
7334
|
+
], false),
|
|
7335
|
+
RaiseIntentResultResponsePayload: o$1([
|
|
7336
|
+
{ json: 'error', js: 'error', typ: u$1(undefined, r$1('ResponsePayloadError')) },
|
|
7337
|
+
{ json: 'intentResult', js: 'intentResult', typ: u$1(undefined, r$1('IntentResult')) },
|
|
7338
|
+
], false)});
|
|
7339
|
+
|
|
7340
|
+
// To parse this data:
|
|
7341
|
+
//
|
|
7342
|
+
// import { Convert, AgentErrorResponseMessage, AgentRequestMessage, AgentResponseMessage, BridgeErrorResponseMessage, BridgeRequestMessage, BridgeResponseMessage, BroadcastAgentRequest, BroadcastBridgeRequest, ConnectionStepMessage, ConnectionStep2Hello, ConnectionStep3Handshake, ConnectionStep4AuthenticationFailed, ConnectionStep6ConnectedAgentsUpdate, FindInstancesAgentErrorResponse, FindInstancesAgentRequest, FindInstancesAgentResponse, FindInstancesBridgeErrorResponse, FindInstancesBridgeRequest, FindInstancesBridgeResponse, FindIntentAgentErrorResponse, FindIntentAgentRequest, FindIntentAgentResponse, FindIntentBridgeErrorResponse, FindIntentBridgeRequest, FindIntentBridgeResponse, FindIntentsByContextAgentErrorResponse, FindIntentsByContextAgentRequest, FindIntentsByContextAgentResponse, FindIntentsByContextBridgeErrorResponse, FindIntentsByContextBridgeRequest, FindIntentsByContextBridgeResponse, GetAppMetadataAgentErrorResponse, GetAppMetadataAgentRequest, GetAppMetadataAgentResponse, GetAppMetadataBridgeErrorResponse, GetAppMetadataBridgeRequest, GetAppMetadataBridgeResponse, OpenAgentErrorResponse, OpenAgentRequest, OpenAgentResponse, OpenBridgeErrorResponse, OpenBridgeRequest, OpenBridgeResponse, PrivateChannelBroadcastAgentRequest, PrivateChannelBroadcastBridgeRequest, PrivateChannelEventListenerAddedAgentRequest, PrivateChannelEventListenerAddedBridgeRequest, PrivateChannelEventListenerRemovedAgentRequest, PrivateChannelEventListenerRemovedBridgeRequest, PrivateChannelOnAddContextListenerAgentRequest, PrivateChannelOnAddContextListenerBridgeRequest, PrivateChannelOnDisconnectAgentRequest, PrivateChannelOnDisconnectBridgeRequest, PrivateChannelOnUnsubscribeAgentRequest, PrivateChannelOnUnsubscribeBridgeRequest, RaiseIntentAgentErrorResponse, RaiseIntentAgentRequest, RaiseIntentAgentResponse, RaiseIntentBridgeErrorResponse, RaiseIntentBridgeRequest, RaiseIntentBridgeResponse, RaiseIntentResultAgentErrorResponse, RaiseIntentResultAgentResponse, RaiseIntentResultBridgeErrorResponse, RaiseIntentResultBridgeResponse } from "./file";
|
|
6061
7343
|
//
|
|
6062
|
-
// const fDC3DesktopAgentAPISchema = Convert.toFDC3DesktopAgentAPISchema(json);
|
|
6063
7344
|
// const agentErrorResponseMessage = Convert.toAgentErrorResponseMessage(json);
|
|
6064
7345
|
// const agentRequestMessage = Convert.toAgentRequestMessage(json);
|
|
6065
7346
|
// const agentResponseMessage = Convert.toAgentResponseMessage(json);
|
|
@@ -6068,7 +7349,7 @@ class EventDispatcher {
|
|
|
6068
7349
|
// const bridgeResponseMessage = Convert.toBridgeResponseMessage(json);
|
|
6069
7350
|
// const broadcastAgentRequest = Convert.toBroadcastAgentRequest(json);
|
|
6070
7351
|
// const broadcastBridgeRequest = Convert.toBroadcastBridgeRequest(json);
|
|
6071
|
-
// const
|
|
7352
|
+
// const bridgeCommonDefinitions = Convert.toBridgeCommonDefinitions(json);
|
|
6072
7353
|
// const connectionStepMessage = Convert.toConnectionStepMessage(json);
|
|
6073
7354
|
// const connectionStep2Hello = Convert.toConnectionStep2Hello(json);
|
|
6074
7355
|
// const connectionStep3Handshake = Convert.toConnectionStep3Handshake(json);
|
|
@@ -6126,17 +7407,439 @@ class EventDispatcher {
|
|
|
6126
7407
|
// const raiseIntentResultAgentResponse = Convert.toRaiseIntentResultAgentResponse(json);
|
|
6127
7408
|
// const raiseIntentResultBridgeErrorResponse = Convert.toRaiseIntentResultBridgeErrorResponse(json);
|
|
6128
7409
|
// const raiseIntentResultBridgeResponse = Convert.toRaiseIntentResultBridgeResponse(json);
|
|
6129
|
-
// const context = Convert.toContext(json);
|
|
6130
7410
|
//
|
|
6131
7411
|
// These functions will throw an error if the JSON doesn't
|
|
6132
7412
|
// match the expected interface, even if the JSON is valid.
|
|
6133
7413
|
// Converts JSON strings to/from your types
|
|
6134
7414
|
// and asserts the results of JSON.parse at runtime
|
|
7415
|
+
function a(typ) {
|
|
7416
|
+
return { arrayItems: typ };
|
|
7417
|
+
}
|
|
7418
|
+
function u(...typs) {
|
|
7419
|
+
return { unionMembers: typs };
|
|
7420
|
+
}
|
|
7421
|
+
function o(props, additional) {
|
|
7422
|
+
return { props, additional };
|
|
7423
|
+
}
|
|
7424
|
+
function m(additional) {
|
|
7425
|
+
return { props: [], additional };
|
|
7426
|
+
}
|
|
7427
|
+
function r(name) {
|
|
7428
|
+
return { ref: name };
|
|
7429
|
+
}
|
|
7430
|
+
({
|
|
7431
|
+
AgentRequestMetadata: o([
|
|
7432
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('BridgeParticipantIdentifier')) },
|
|
7433
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7434
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceIdentifier')) },
|
|
7435
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7436
|
+
], false),
|
|
7437
|
+
BridgeParticipantIdentifier: o([
|
|
7438
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: '' },
|
|
7439
|
+
{ json: 'appId', js: 'appId', typ: u(undefined, '') },
|
|
7440
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7441
|
+
], 'any'),
|
|
7442
|
+
SourceIdentifier: o([
|
|
7443
|
+
{ json: 'appId', js: 'appId', typ: u(undefined, '') },
|
|
7444
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: u(undefined, '') },
|
|
7445
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7446
|
+
], 'any'),
|
|
7447
|
+
ResponseErrorMessagePayload: o([{ json: 'error', js: 'error', typ: u(undefined, r('ResponseErrorDetail')) }], 'any'),
|
|
7448
|
+
BridgeRequestMetadata: o([
|
|
7449
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('BridgeParticipantIdentifier')) },
|
|
7450
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7451
|
+
{ json: 'source', js: 'source', typ: r('BridgeParticipantIdentifier') },
|
|
7452
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7453
|
+
], false),
|
|
7454
|
+
BridgeResponseMessageMeta: o([
|
|
7455
|
+
{ json: 'errorDetails', js: 'errorDetails', typ: u(undefined, a(r('ResponseErrorDetail'))) },
|
|
7456
|
+
{ json: 'errorSources', js: 'errorSources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7457
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7458
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: '' },
|
|
7459
|
+
{ json: 'sources', js: 'sources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7460
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7461
|
+
], false),
|
|
7462
|
+
SourceObject: o([
|
|
7463
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7464
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: u(undefined, '') },
|
|
7465
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7466
|
+
], 'any'),
|
|
7467
|
+
Context: o([
|
|
7468
|
+
{ json: 'id', js: 'id', typ: u(undefined, m('any')) },
|
|
7469
|
+
{ json: 'name', js: 'name', typ: u(undefined, '') },
|
|
7470
|
+
{ json: 'type', js: 'type', typ: '' },
|
|
7471
|
+
], 'any'),
|
|
7472
|
+
MetaSource: o([
|
|
7473
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7474
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: '' },
|
|
7475
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7476
|
+
], 'any'),
|
|
7477
|
+
ConnectionStepMetadata: o([
|
|
7478
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: u(undefined, '') },
|
|
7479
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: u(undefined, '') },
|
|
7480
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7481
|
+
], false),
|
|
7482
|
+
ConnectionStep2HelloPayload: o([
|
|
7483
|
+
{ json: 'authRequired', js: 'authRequired', typ: true },
|
|
7484
|
+
{ json: 'authToken', js: 'authToken', typ: u(undefined, '') },
|
|
7485
|
+
{ json: 'desktopAgentBridgeVersion', js: 'desktopAgentBridgeVersion', typ: '' },
|
|
7486
|
+
{ json: 'supportedFDC3Versions', js: 'supportedFDC3Versions', typ: a('') },
|
|
7487
|
+
], false),
|
|
7488
|
+
ConnectionStep3HandshakePayload: o([
|
|
7489
|
+
{ json: 'authToken', js: 'authToken', typ: u(undefined, '') },
|
|
7490
|
+
{ json: 'channelsState', js: 'channelsState', typ: m(a(r('Context'))) },
|
|
7491
|
+
{ json: 'implementationMetadata', js: 'implementationMetadata', typ: r('ConnectingAgentImplementationMetadata') },
|
|
7492
|
+
{ json: 'requestedName', js: 'requestedName', typ: '' },
|
|
7493
|
+
], false),
|
|
7494
|
+
ConnectingAgentImplementationMetadata: o([
|
|
7495
|
+
{ json: 'fdc3Version', js: 'fdc3Version', typ: '' },
|
|
7496
|
+
{ json: 'optionalFeatures', js: 'optionalFeatures', typ: r('OptionalFeatures') },
|
|
7497
|
+
{ json: 'provider', js: 'provider', typ: '' },
|
|
7498
|
+
{ json: 'providerVersion', js: 'providerVersion', typ: u(undefined, '') },
|
|
7499
|
+
], false),
|
|
7500
|
+
ConnectionStep4AuthenticationFailedPayload: o([{ json: 'message', js: 'message', typ: u(undefined, '') }], false),
|
|
7501
|
+
ConnectionStep6ConnectedAgentsUpdatePayload: o([
|
|
7502
|
+
{ json: 'addAgent', js: 'addAgent', typ: u(undefined, '') },
|
|
7503
|
+
{ json: 'allAgents', js: 'allAgents', typ: a(r('DesktopAgentImplementationMetadata')) },
|
|
7504
|
+
{ json: 'channelsState', js: 'channelsState', typ: u(undefined, m(a(r('Context')))) },
|
|
7505
|
+
{ json: 'removeAgent', js: 'removeAgent', typ: u(undefined, '') },
|
|
7506
|
+
], false),
|
|
7507
|
+
DesktopAgentImplementationMetadata: o([
|
|
7508
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: '' },
|
|
7509
|
+
{ json: 'fdc3Version', js: 'fdc3Version', typ: '' },
|
|
7510
|
+
{ json: 'optionalFeatures', js: 'optionalFeatures', typ: r('OptionalFeatures') },
|
|
7511
|
+
{ json: 'provider', js: 'provider', typ: '' },
|
|
7512
|
+
{ json: 'providerVersion', js: 'providerVersion', typ: u(undefined, '') },
|
|
7513
|
+
], false),
|
|
7514
|
+
FindInstancesAgentRequestMeta: o([
|
|
7515
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('DestinationObject')) },
|
|
7516
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7517
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceIdentifier')) },
|
|
7518
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7519
|
+
], false),
|
|
7520
|
+
DestinationObject: o([
|
|
7521
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: '' },
|
|
7522
|
+
{ json: 'appId', js: 'appId', typ: u(undefined, '') },
|
|
7523
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7524
|
+
], 'any'),
|
|
7525
|
+
AppIdentifier: o([
|
|
7526
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7527
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: u(undefined, '') },
|
|
7528
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7529
|
+
], 'any'),
|
|
7530
|
+
AppMetadata: o([
|
|
7531
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7532
|
+
{ json: 'description', js: 'description', typ: u(undefined, '') },
|
|
7533
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: u(undefined, '') },
|
|
7534
|
+
{ json: 'icons', js: 'icons', typ: u(undefined, a(r('Icon'))) },
|
|
7535
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7536
|
+
{ json: 'instanceMetadata', js: 'instanceMetadata', typ: u(undefined, m('any')) },
|
|
7537
|
+
{ json: 'name', js: 'name', typ: u(undefined, '') },
|
|
7538
|
+
{ json: 'resultType', js: 'resultType', typ: u(undefined, u(null, '')) },
|
|
7539
|
+
{ json: 'screenshots', js: 'screenshots', typ: u(undefined, a(r('Image'))) },
|
|
7540
|
+
{ json: 'title', js: 'title', typ: u(undefined, '') },
|
|
7541
|
+
{ json: 'tooltip', js: 'tooltip', typ: u(undefined, '') },
|
|
7542
|
+
{ json: 'version', js: 'version', typ: u(undefined, '') },
|
|
7543
|
+
], false),
|
|
7544
|
+
Icon: o([
|
|
7545
|
+
{ json: 'size', js: 'size', typ: u(undefined, '') },
|
|
7546
|
+
{ json: 'src', js: 'src', typ: '' },
|
|
7547
|
+
{ json: 'type', js: 'type', typ: u(undefined, '') },
|
|
7548
|
+
], false),
|
|
7549
|
+
Image: o([
|
|
7550
|
+
{ json: 'label', js: 'label', typ: u(undefined, '') },
|
|
7551
|
+
{ json: 'size', js: 'size', typ: u(undefined, '') },
|
|
7552
|
+
{ json: 'src', js: 'src', typ: '' },
|
|
7553
|
+
{ json: 'type', js: 'type', typ: u(undefined, '') },
|
|
7554
|
+
], false),
|
|
7555
|
+
FindInstancesBridgeRequestMeta: o([
|
|
7556
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('DestinationObject')) },
|
|
7557
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7558
|
+
{ json: 'source', js: 'source', typ: r('MetaSourceObject') },
|
|
7559
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7560
|
+
], false),
|
|
7561
|
+
MetaSourceObject: o([
|
|
7562
|
+
{ json: 'appId', js: 'appId', typ: u(undefined, '') },
|
|
7563
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: '' },
|
|
7564
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7565
|
+
], 'any'),
|
|
7566
|
+
FindIntentAgentRequestMeta: o([
|
|
7567
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7568
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceIdentifier')) },
|
|
7569
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7570
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('BridgeParticipantIdentifier')) },
|
|
7571
|
+
], false),
|
|
7572
|
+
FindIntentAgentRequestPayload: o([
|
|
7573
|
+
{ json: 'context', js: 'context', typ: u(undefined, r('Context')) },
|
|
7574
|
+
{ json: 'intent', js: 'intent', typ: '' },
|
|
7575
|
+
{ json: 'resultType', js: 'resultType', typ: u(undefined, '') },
|
|
7576
|
+
], false),
|
|
7577
|
+
IntentMetadata: o([
|
|
7578
|
+
{ json: 'displayName', js: 'displayName', typ: u(undefined, '') },
|
|
7579
|
+
{ json: 'name', js: 'name', typ: '' },
|
|
7580
|
+
], false),
|
|
7581
|
+
FindIntentBridgeRequestMeta: o([
|
|
7582
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7583
|
+
{ json: 'source', js: 'source', typ: r('BridgeParticipantIdentifier') },
|
|
7584
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7585
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('BridgeParticipantIdentifier')) },
|
|
7586
|
+
], false),
|
|
7587
|
+
FindIntentBridgeRequestPayload: o([
|
|
7588
|
+
{ json: 'context', js: 'context', typ: u(undefined, r('Context')) },
|
|
7589
|
+
{ json: 'intent', js: 'intent', typ: '' },
|
|
7590
|
+
{ json: 'resultType', js: 'resultType', typ: u(undefined, '') },
|
|
7591
|
+
], false),
|
|
7592
|
+
FindIntentBridgeResponseMeta: o([
|
|
7593
|
+
{ json: 'errorDetails', js: 'errorDetails', typ: u(undefined, a(r('ResponseErrorDetail'))) },
|
|
7594
|
+
{ json: 'errorSources', js: 'errorSources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7595
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7596
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: '' },
|
|
7597
|
+
{ json: 'sources', js: 'sources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7598
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7599
|
+
], false),
|
|
7600
|
+
FindIntentsByContextAgentRequestMeta: o([
|
|
7601
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7602
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceObject')) },
|
|
7603
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7604
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('BridgeParticipantIdentifier')) },
|
|
7605
|
+
], false),
|
|
7606
|
+
FindIntentsByContextAgentRequestPayload: o([
|
|
7607
|
+
{ json: 'context', js: 'context', typ: r('Context') },
|
|
7608
|
+
{ json: 'resultType', js: 'resultType', typ: u(undefined, '') },
|
|
7609
|
+
], false),
|
|
7610
|
+
FindIntentsByContextBridgeRequestMeta: o([
|
|
7611
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7612
|
+
{ json: 'source', js: 'source', typ: r('MetaSource') },
|
|
7613
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7614
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('BridgeParticipantIdentifier')) },
|
|
7615
|
+
], false),
|
|
7616
|
+
FindIntentsByContextBridgeRequestPayload: o([
|
|
7617
|
+
{ json: 'context', js: 'context', typ: r('Context') },
|
|
7618
|
+
{ json: 'resultType', js: 'resultType', typ: u(undefined, '') },
|
|
7619
|
+
], false),
|
|
7620
|
+
FindIntentsByContextBridgeResponseMeta: o([
|
|
7621
|
+
{ json: 'errorDetails', js: 'errorDetails', typ: u(undefined, a(r('ResponseErrorDetail'))) },
|
|
7622
|
+
{ json: 'errorSources', js: 'errorSources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7623
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7624
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: '' },
|
|
7625
|
+
{ json: 'sources', js: 'sources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7626
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7627
|
+
], false),
|
|
7628
|
+
GetAppMetadataAgentRequestMeta: o([
|
|
7629
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('DestinationObject')) },
|
|
7630
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7631
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceIdentifier')) },
|
|
7632
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7633
|
+
], false),
|
|
7634
|
+
AppObject: o([
|
|
7635
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: '' },
|
|
7636
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7637
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7638
|
+
], 'any'),
|
|
7639
|
+
GetAppMetadataBridgeRequestMeta: o([
|
|
7640
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('DestinationObject')) },
|
|
7641
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7642
|
+
{ json: 'source', js: 'source', typ: r('MetaSourceObject') },
|
|
7643
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7644
|
+
], false),
|
|
7645
|
+
GetAppMetadataBridgeResponseMeta: o([
|
|
7646
|
+
{ json: 'errorDetails', js: 'errorDetails', typ: u(undefined, a(r('ResponseErrorDetail'))) },
|
|
7647
|
+
{ json: 'errorSources', js: 'errorSources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7648
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7649
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: '' },
|
|
7650
|
+
{ json: 'sources', js: 'sources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7651
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7652
|
+
], false),
|
|
7653
|
+
OpenAgentRequestMeta: o([
|
|
7654
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('DestinationObject')) },
|
|
7655
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7656
|
+
{ json: 'source', js: 'source', typ: r('SourceObject') },
|
|
7657
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7658
|
+
], false),
|
|
7659
|
+
OpenAgentRequestPayload: o([
|
|
7660
|
+
{ json: 'app', js: 'app', typ: r('AppToOpen') },
|
|
7661
|
+
{ json: 'context', js: 'context', typ: u(undefined, r('Context')) },
|
|
7662
|
+
], false),
|
|
7663
|
+
AppToOpen: o([
|
|
7664
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: '' },
|
|
7665
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7666
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7667
|
+
], 'any'),
|
|
7668
|
+
OpenBridgeRequestMeta: o([
|
|
7669
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('DestinationObject')) },
|
|
7670
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7671
|
+
{ json: 'source', js: 'source', typ: r('MetaSource') },
|
|
7672
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7673
|
+
], false),
|
|
7674
|
+
OpenBridgeRequestPayload: o([
|
|
7675
|
+
{ json: 'app', js: 'app', typ: r('AppToOpen') },
|
|
7676
|
+
{ json: 'context', js: 'context', typ: u(undefined, r('Context')) },
|
|
7677
|
+
], false),
|
|
7678
|
+
OpenBridgeResponseMeta: o([
|
|
7679
|
+
{ json: 'errorDetails', js: 'errorDetails', typ: u(undefined, a(r('ResponseErrorDetail'))) },
|
|
7680
|
+
{ json: 'errorSources', js: 'errorSources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7681
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7682
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: '' },
|
|
7683
|
+
{ json: 'sources', js: 'sources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7684
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7685
|
+
], false),
|
|
7686
|
+
PrivateChannelBroadcastAgentRequestMeta: o([
|
|
7687
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7688
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7689
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceObject')) },
|
|
7690
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7691
|
+
], false),
|
|
7692
|
+
MetaDestination: o([
|
|
7693
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: '' },
|
|
7694
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7695
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7696
|
+
], 'any'),
|
|
7697
|
+
PrivateChannelBroadcastBridgeRequestMeta: o([
|
|
7698
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7699
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7700
|
+
{ json: 'source', js: 'source', typ: r('MetaSource') },
|
|
7701
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7702
|
+
], false),
|
|
7703
|
+
PrivateChannelEventListenerAddedAgentRequestMeta: o([
|
|
7704
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7705
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7706
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceObject')) },
|
|
7707
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7708
|
+
], false),
|
|
7709
|
+
PrivateChannelEventListenerAddedBridgeRequestMeta: o([
|
|
7710
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7711
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7712
|
+
{ json: 'source', js: 'source', typ: r('MetaSource') },
|
|
7713
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7714
|
+
], false),
|
|
7715
|
+
PrivateChannelEventListenerRemovedAgentRequestMeta: o([
|
|
7716
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7717
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7718
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceObject')) },
|
|
7719
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7720
|
+
], false),
|
|
7721
|
+
PrivateChannelEventListenerRemovedBridgeRequestMeta: o([
|
|
7722
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7723
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7724
|
+
{ json: 'source', js: 'source', typ: r('MetaSource') },
|
|
7725
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7726
|
+
], false),
|
|
7727
|
+
PrivateChannelOnAddContextListenerAgentRequestMeta: o([
|
|
7728
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7729
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7730
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceObject')) },
|
|
7731
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7732
|
+
], false),
|
|
7733
|
+
PrivateChannelOnAddContextListenerAgentRequestPayload: o([
|
|
7734
|
+
{ json: 'channelId', js: 'channelId', typ: '' },
|
|
7735
|
+
{ json: 'contextType', js: 'contextType', typ: u(null, '') },
|
|
7736
|
+
], false),
|
|
7737
|
+
PrivateChannelOnAddContextListenerBridgeRequestMeta: o([
|
|
7738
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7739
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7740
|
+
{ json: 'source', js: 'source', typ: r('MetaSource') },
|
|
7741
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7742
|
+
], false),
|
|
7743
|
+
PrivateChannelOnAddContextListenerBridgeRequestPayload: o([
|
|
7744
|
+
{ json: 'channelId', js: 'channelId', typ: '' },
|
|
7745
|
+
{ json: 'contextType', js: 'contextType', typ: u(null, '') },
|
|
7746
|
+
], false),
|
|
7747
|
+
PrivateChannelOnDisconnectAgentRequestMeta: o([
|
|
7748
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7749
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7750
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceObject')) },
|
|
7751
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7752
|
+
], false),
|
|
7753
|
+
PrivateChannelOnDisconnectBridgeRequestMeta: o([
|
|
7754
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7755
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7756
|
+
{ json: 'source', js: 'source', typ: r('MetaSource') },
|
|
7757
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7758
|
+
], false),
|
|
7759
|
+
PrivateChannelOnUnsubscribeAgentRequestMeta: o([
|
|
7760
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7761
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7762
|
+
{ json: 'source', js: 'source', typ: u(undefined, r('SourceObject')) },
|
|
7763
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7764
|
+
], false),
|
|
7765
|
+
PrivateChannelOnUnsubscribeAgentRequestPayload: o([
|
|
7766
|
+
{ json: 'channelId', js: 'channelId', typ: '' },
|
|
7767
|
+
{ json: 'contextType', js: 'contextType', typ: u(null, '') },
|
|
7768
|
+
], false),
|
|
7769
|
+
ERequestMetadata: o([
|
|
7770
|
+
{ json: 'destination', js: 'destination', typ: u(undefined, r('MetaDestination')) },
|
|
7771
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7772
|
+
{ json: 'source', js: 'source', typ: r('MetaSource') },
|
|
7773
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7774
|
+
], false),
|
|
7775
|
+
PrivateChannelOnUnsubscribeBridgeRequestPayload: o([
|
|
7776
|
+
{ json: 'channelId', js: 'channelId', typ: '' },
|
|
7777
|
+
{ json: 'contextType', js: 'contextType', typ: u(null, '') },
|
|
7778
|
+
], false),
|
|
7779
|
+
AppDestinationIdentifier: o([
|
|
7780
|
+
{ json: 'desktopAgent', js: 'desktopAgent', typ: '' },
|
|
7781
|
+
{ json: 'appId', js: 'appId', typ: '' },
|
|
7782
|
+
{ json: 'instanceId', js: 'instanceId', typ: u(undefined, '') },
|
|
7783
|
+
], 'any'),
|
|
7784
|
+
RaiseIntentBridgeResponseMeta: o([
|
|
7785
|
+
{ json: 'errorDetails', js: 'errorDetails', typ: u(undefined, a(r('ResponseErrorDetail'))) },
|
|
7786
|
+
{ json: 'errorSources', js: 'errorSources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7787
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7788
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: '' },
|
|
7789
|
+
{ json: 'sources', js: 'sources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7790
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7791
|
+
], false),
|
|
7792
|
+
IntentResult: o([
|
|
7793
|
+
{ json: 'context', js: 'context', typ: u(undefined, r('Context')) },
|
|
7794
|
+
{ json: 'channel', js: 'channel', typ: u(undefined, r('Channel')) },
|
|
7795
|
+
], false),
|
|
7796
|
+
Channel: o([
|
|
7797
|
+
{ json: 'displayMetadata', js: 'displayMetadata', typ: u(undefined, r('DisplayMetadata')) },
|
|
7798
|
+
{ json: 'id', js: 'id', typ: '' },
|
|
7799
|
+
{ json: 'type', js: 'type', typ: r('Type') },
|
|
7800
|
+
], false),
|
|
7801
|
+
DisplayMetadata: o([
|
|
7802
|
+
{ json: 'color', js: 'color', typ: u(undefined, '') },
|
|
7803
|
+
{ json: 'glyph', js: 'glyph', typ: u(undefined, '') },
|
|
7804
|
+
{ json: 'name', js: 'name', typ: u(undefined, '') },
|
|
7805
|
+
], false),
|
|
7806
|
+
RaiseIntentResultBridgeResponseMeta: o([
|
|
7807
|
+
{ json: 'errorDetails', js: 'errorDetails', typ: u(undefined, a(r('ResponseErrorDetail'))) },
|
|
7808
|
+
{ json: 'errorSources', js: 'errorSources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7809
|
+
{ json: 'requestUuid', js: 'requestUuid', typ: '' },
|
|
7810
|
+
{ json: 'responseUuid', js: 'responseUuid', typ: '' },
|
|
7811
|
+
{ json: 'sources', js: 'sources', typ: u(undefined, a(r('DesktopAgentIdentifier'))) },
|
|
7812
|
+
{ json: 'timestamp', js: 'timestamp', typ: Date },
|
|
7813
|
+
], false)});
|
|
6135
7814
|
|
|
6136
7815
|
/**
|
|
6137
7816
|
* SPDX-License-Identifier: Apache-2.0
|
|
6138
7817
|
* Copyright FINOS FDC3 contributors - see NOTICE file
|
|
6139
7818
|
*/
|
|
7819
|
+
/**
|
|
7820
|
+
* Contains constants representing the errors that can be encountered when trying to connect to a web-based Desktop Agent with the getAgent function.
|
|
7821
|
+
*/
|
|
7822
|
+
var AgentError;
|
|
7823
|
+
(function (AgentError) {
|
|
7824
|
+
/** Returned if no Desktop Agent was found by any means available or
|
|
7825
|
+
* if the Agent previously connected to is not contactable on a
|
|
7826
|
+
* subsequent connection attempt.*/
|
|
7827
|
+
AgentError["AgentNotFound"] = "AgentNotFound";
|
|
7828
|
+
/** Returned if validation of the app identity by the Desktop Agent
|
|
7829
|
+
* Failed or the app is not being allowed to connect to the Desktop Agent
|
|
7830
|
+
* for another reason. */
|
|
7831
|
+
AgentError["AccessDenied"] = "AccessDenied";
|
|
7832
|
+
/** Returned if an error or exception occurs while trying to set
|
|
7833
|
+
* up communication with a Desktop Agent. */
|
|
7834
|
+
AgentError["ErrorOnConnect"] = "ErrorOnConnect";
|
|
7835
|
+
/** Returned if the failover function is not a function, or it did not
|
|
7836
|
+
* resolve to one of the allowed types. */
|
|
7837
|
+
AgentError["InvalidFailover"] = "InvalidFailover";
|
|
7838
|
+
/** Returned if an API call rejects after a timeout. Used where an API call
|
|
7839
|
+
* is not aligned to another error enumeration.
|
|
7840
|
+
*/
|
|
7841
|
+
AgentError["ApiTimeout"] = "ApiTimeout";
|
|
7842
|
+
})(AgentError || (AgentError = {}));
|
|
6140
7843
|
/** Constants representing the errors that can be encountered when calling the `open` method on the DesktopAgent object (`fdc3`). */
|
|
6141
7844
|
var OpenError;
|
|
6142
7845
|
(function (OpenError) {
|
|
@@ -6152,6 +7855,8 @@ var OpenError;
|
|
|
6152
7855
|
OpenError["MalformedContext"] = "MalformedContext";
|
|
6153
7856
|
/** @experimental Returned if the specified Desktop Agent is not found, via a connected Desktop Agent Bridge.*/
|
|
6154
7857
|
OpenError["DesktopAgentNotFound"] = "DesktopAgentNotFound";
|
|
7858
|
+
/** Returned if a timeout occurs before a call to open is resolved for any reason other than the not adding its context listener in time.*/
|
|
7859
|
+
OpenError["ApiTimeout"] = "ApiTimeout";
|
|
6155
7860
|
})(OpenError || (OpenError = {}));
|
|
6156
7861
|
/** Constants representing the errors that can be encountered when calling the `findIntent`, `findIntentsByContext`, `raiseIntent` or `raiseIntentForContext` methods on the DesktopAgent (`fdc3`). */
|
|
6157
7862
|
var ResolveError;
|
|
@@ -6174,6 +7879,8 @@ var ResolveError;
|
|
|
6174
7879
|
ResolveError["MalformedContext"] = "MalformedContext";
|
|
6175
7880
|
/** @experimental Returned if the specified Desktop Agent is not found, via a connected Desktop Agent Bridge.*/
|
|
6176
7881
|
ResolveError["DesktopAgentNotFound"] = "DesktopAgentNotFound";
|
|
7882
|
+
/** Returned if a timeout occurs before the API call is resolved for any reason other than the resolver timing out (use ResolverTimeout) or an app launched by a raiseIntent function doesn't add its intent listener in time (use IntentDeliveryFailed).*/
|
|
7883
|
+
ResolveError["ApiTimeout"] = "ApiTimeout";
|
|
6177
7884
|
})(ResolveError || (ResolveError = {}));
|
|
6178
7885
|
var ResultError;
|
|
6179
7886
|
(function (ResultError) {
|
|
@@ -6181,6 +7888,8 @@ var ResultError;
|
|
|
6181
7888
|
ResultError["NoResultReturned"] = "NoResultReturned";
|
|
6182
7889
|
/** Returned if the Intent handler function processing the raised intent throws an error or rejects the Promise it returned. */
|
|
6183
7890
|
ResultError["IntentHandlerRejected"] = "IntentHandlerRejected";
|
|
7891
|
+
/** Returned if a timeout occurs before the getResult() API call is resolved.*/
|
|
7892
|
+
ResultError["ApiTimeout"] = "ApiTimeout";
|
|
6184
7893
|
})(ResultError || (ResultError = {}));
|
|
6185
7894
|
var ChannelError;
|
|
6186
7895
|
(function (ChannelError) {
|
|
@@ -6192,6 +7901,8 @@ var ChannelError;
|
|
|
6192
7901
|
ChannelError["CreationFailed"] = "CreationFailed";
|
|
6193
7902
|
/** Returned if a call to the `broadcast` functions is made with an invalid context argument. Contexts should be Objects with at least a `type` field that has a `string` value.*/
|
|
6194
7903
|
ChannelError["MalformedContext"] = "MalformedContext";
|
|
7904
|
+
/** Returned if a timeout occurs before any Channel related API call is resolved.*/
|
|
7905
|
+
ChannelError["ApiTimeout"] = "ApiTimeout";
|
|
6195
7906
|
})(ChannelError || (ChannelError = {}));
|
|
6196
7907
|
var BridgingError;
|
|
6197
7908
|
(function (BridgingError) {
|
|
@@ -6204,28 +7915,51 @@ var BridgingError;
|
|
|
6204
7915
|
/** @experimental Returned if a message to a Bridge deviates from the schema for that message sufficiently that it could not be processed. */
|
|
6205
7916
|
BridgingError["MalformedMessage"] = "MalformedMessage";
|
|
6206
7917
|
})(BridgingError || (BridgingError = {}));
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
7918
|
+
|
|
7919
|
+
/**
|
|
7920
|
+
* Type representing the different log-levels that can be set.
|
|
7921
|
+
*/
|
|
7922
|
+
var LogLevel;
|
|
7923
|
+
(function (LogLevel) {
|
|
7924
|
+
LogLevel[LogLevel["NONE"] = 0] = "NONE";
|
|
7925
|
+
LogLevel[LogLevel["ERROR"] = 1] = "ERROR";
|
|
7926
|
+
LogLevel[LogLevel["WARN"] = 2] = "WARN";
|
|
7927
|
+
LogLevel[LogLevel["INFO"] = 3] = "INFO";
|
|
7928
|
+
LogLevel[LogLevel["DEBUG"] = 4] = "DEBUG";
|
|
7929
|
+
})(LogLevel || (LogLevel = {}));
|
|
7930
|
+
/** Enumeration of values used to describe types of web-based
|
|
7931
|
+
* Desktop Agent. Each 'type' refers to the means by which
|
|
7932
|
+
* a connection to the agent is made and/or an interface to it
|
|
7933
|
+
* received. */
|
|
7934
|
+
var WebDesktopAgentType;
|
|
7935
|
+
(function (WebDesktopAgentType) {
|
|
7936
|
+
/** Denotes Desktop Agents that inject the FDC3 interface
|
|
7937
|
+
* at `window.fdc3`. */
|
|
7938
|
+
WebDesktopAgentType["Preload"] = "PRELOAD";
|
|
7939
|
+
/** Denotes Desktop Agents that run (or provide an interface)
|
|
7940
|
+
* within a parent window or frame, a reference to which
|
|
7941
|
+
* will be found at `window.opener`, `window.parent`,
|
|
7942
|
+
* `window.parent.opener` etc. */
|
|
7943
|
+
WebDesktopAgentType["ProxyParent"] = "PROXY_PARENT";
|
|
7944
|
+
/** Denotes Desktop Agents that are connected to by loading a URL
|
|
7945
|
+
* into a hidden iframe whose URL was returned by a parent window
|
|
7946
|
+
* or frame. */
|
|
7947
|
+
WebDesktopAgentType["ProxyUrl"] = "PROXY_URL";
|
|
7948
|
+
/** Denotes a Desktop Agent that was returned by a failover
|
|
7949
|
+
* function that was passed by the application. */
|
|
7950
|
+
WebDesktopAgentType["Failover"] = "FAILOVER";
|
|
7951
|
+
})(WebDesktopAgentType || (WebDesktopAgentType = {}));
|
|
6212
7952
|
|
|
6213
7953
|
/**
|
|
6214
7954
|
* Ensures at compile time that the given string tuple is exhaustive on a given union type, i.e. contains ALL possible values of the given UNION_TYPE.
|
|
6215
7955
|
*/
|
|
6216
|
-
|
|
6217
|
-
var tuple = [];
|
|
6218
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
6219
|
-
tuple[_i] = arguments[_i];
|
|
6220
|
-
}
|
|
6221
|
-
return tuple;
|
|
6222
|
-
}; };
|
|
7956
|
+
const exhaustiveStringTuple = () => (...tuple) => tuple;
|
|
6223
7957
|
|
|
6224
|
-
|
|
7958
|
+
const STANDARD_CONTEXT_TYPES = exhaustiveStringTuple()('fdc3.action', 'fdc3.chart', 'fdc3.chat.initSettings', 'fdc3.chat.message', 'fdc3.chat.room', 'fdc3.chat.searchCriteria', 'fdc3.contact', 'fdc3.contactList', 'fdc3.country', 'fdc3.currency', 'fdc3.email', 'fdc3.instrument', 'fdc3.instrumentList', 'fdc3.interaction', 'fdc3.message', 'fdc3.organization', 'fdc3.portfolio', 'fdc3.position', 'fdc3.nothing', 'fdc3.timeRange', 'fdc3.transactionResult', 'fdc3.valuation');
|
|
6225
7959
|
// used internally to check if a given intent/context is a standard one
|
|
6226
7960
|
new Set(STANDARD_CONTEXT_TYPES);
|
|
6227
7961
|
|
|
6228
|
-
|
|
7962
|
+
const STANDARD_INTENTS = exhaustiveStringTuple()('CreateInteraction', 'CreateOrUpdateProfile', 'SendChatMessage', 'StartCall', 'StartChat', 'StartEmail', 'ViewAnalysis', 'ViewChat', 'ViewChart', 'ViewContact', 'ViewHoldings', 'ViewInstrument', 'ViewInteractions', 'ViewMessages', 'ViewNews', 'ViewOrders', 'ViewProfile', 'ViewQuote', 'ViewResearch');
|
|
6229
7963
|
// used internally to check if a given intent/context is a standard one
|
|
6230
7964
|
new Set(STANDARD_INTENTS);
|
|
6231
7965
|
|
|
@@ -6269,6 +8003,7 @@ var ContextTypes;
|
|
|
6269
8003
|
var Intents;
|
|
6270
8004
|
(function (Intents) {
|
|
6271
8005
|
Intents["CreateInteraction"] = "CreateInteraction";
|
|
8006
|
+
Intents["CreateOrUpdateProfile"] = "CreateOrUpdateProfile";
|
|
6272
8007
|
Intents["SendChatMessage"] = "SendChatMessage";
|
|
6273
8008
|
Intents["StartCall"] = "StartCall";
|
|
6274
8009
|
Intents["StartChat"] = "StartChat";
|
|
@@ -6288,6 +8023,90 @@ var Intents;
|
|
|
6288
8023
|
Intents["ViewResearch"] = "ViewResearch";
|
|
6289
8024
|
})(Intents || (Intents = {}));
|
|
6290
8025
|
|
|
8026
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
8027
|
+
//check if color is supported in (node) console;
|
|
8028
|
+
let noColor = true;
|
|
8029
|
+
//else only occurs in a browser and can't be tested in node
|
|
8030
|
+
/* istanbul ignore if */
|
|
8031
|
+
if (typeof process !== 'undefined') {
|
|
8032
|
+
const argv = process.argv || /* istanbul ignore next */ [];
|
|
8033
|
+
const env = process.env || /* istanbul ignore next */ {};
|
|
8034
|
+
noColor =
|
|
8035
|
+
(!!env.NO_COLOR || argv.includes('--no-color')) &&
|
|
8036
|
+
!(!!env.FORCE_COLOR ||
|
|
8037
|
+
argv.includes('--color') ||
|
|
8038
|
+
process.platform === 'win32' /* istanbul ignore next */ ||
|
|
8039
|
+
((process.stdout || {}).isTTY && env.TERM !== 'dumb') ||
|
|
8040
|
+
/* istanbul ignore next */ !!env.CI);
|
|
8041
|
+
}
|
|
8042
|
+
class AbstractFDC3Logger {
|
|
8043
|
+
/** This should be overridden by sub-classes to set the prefix applied
|
|
8044
|
+
* to log messages. */
|
|
8045
|
+
/* istanbul ignore next */ static get prefix() {
|
|
8046
|
+
return '';
|
|
8047
|
+
}
|
|
8048
|
+
//sub-classes should override this default log level
|
|
8049
|
+
static logLevel = LogLevel.DEBUG;
|
|
8050
|
+
static setLogLevel(level) {
|
|
8051
|
+
if (level in LogLevel) {
|
|
8052
|
+
this.logLevel = level;
|
|
8053
|
+
}
|
|
8054
|
+
else {
|
|
8055
|
+
/* istanbul ignore next */
|
|
8056
|
+
this.error(`Ignoring unrecognized LogLevel '${level}'! Current log level: '${this.logLevel} (${LogLevel[this.logLevel]})'`);
|
|
8057
|
+
}
|
|
8058
|
+
}
|
|
8059
|
+
static debugColor(value) {
|
|
8060
|
+
return noColor ? /* istanbul ignore next */ value : '\x1b[30m\x1b[2m' + value + '\x1b[22m\x1b[39m';
|
|
8061
|
+
}
|
|
8062
|
+
static logColor(value) {
|
|
8063
|
+
return noColor ? /* istanbul ignore next */ value : '\x1b[32m\x1b[2m' + value + '\x1b[22m\x1b[39m';
|
|
8064
|
+
}
|
|
8065
|
+
static warnColor(value) {
|
|
8066
|
+
return noColor ? /* istanbul ignore next */ value : '\x1b[33m' + value + '\x1b[39m';
|
|
8067
|
+
}
|
|
8068
|
+
static errorColor(value) {
|
|
8069
|
+
return noColor ? /* istanbul ignore next */ value : '\x1b[31m' + value + '\x1b[39m';
|
|
8070
|
+
}
|
|
8071
|
+
static debug(...params) {
|
|
8072
|
+
if (this.logLevel >= LogLevel.DEBUG) {
|
|
8073
|
+
console.debug(...this.prefixAndColorize(this.prefix, params, this.debugColor));
|
|
8074
|
+
}
|
|
8075
|
+
}
|
|
8076
|
+
static log(...params) {
|
|
8077
|
+
if (this.logLevel >= LogLevel.INFO) {
|
|
8078
|
+
console.log(...this.prefixAndColorize(this.prefix, params, this.logColor));
|
|
8079
|
+
}
|
|
8080
|
+
}
|
|
8081
|
+
static warn(...params) {
|
|
8082
|
+
if (this.logLevel >= LogLevel.WARN) {
|
|
8083
|
+
console.warn(...this.prefixAndColorize(this.prefix, params, this.warnColor));
|
|
8084
|
+
}
|
|
8085
|
+
}
|
|
8086
|
+
static error(...params) {
|
|
8087
|
+
if (this.logLevel >= LogLevel.ERROR) {
|
|
8088
|
+
console.error(...this.prefixAndColorize(this.prefix, params, this.errorColor));
|
|
8089
|
+
}
|
|
8090
|
+
}
|
|
8091
|
+
static prefixAndColorize = (prefix, params, colorFn) => {
|
|
8092
|
+
const prefixed = [prefix, ...params];
|
|
8093
|
+
return prefixed.map(value => {
|
|
8094
|
+
if (typeof value === 'string') {
|
|
8095
|
+
//just color strings
|
|
8096
|
+
return colorFn(value);
|
|
8097
|
+
}
|
|
8098
|
+
else if (value && value.stack && value.message) {
|
|
8099
|
+
//probably an error
|
|
8100
|
+
return colorFn(value.stack);
|
|
8101
|
+
}
|
|
8102
|
+
else {
|
|
8103
|
+
//something else... lets hope it stringifies
|
|
8104
|
+
return colorFn(JSON.stringify(value, null, 2));
|
|
8105
|
+
}
|
|
8106
|
+
});
|
|
8107
|
+
};
|
|
8108
|
+
}
|
|
8109
|
+
|
|
6291
8110
|
class DesktopAgent {
|
|
6292
8111
|
intentsController;
|
|
6293
8112
|
applicationController;
|
|
@@ -6301,6 +8120,7 @@ class DesktopAgent {
|
|
|
6301
8120
|
const api = {
|
|
6302
8121
|
getStartupContext: this.getStartupContext.bind(this),
|
|
6303
8122
|
addContextListener: this.addContextListener.bind(this),
|
|
8123
|
+
addEventListener: this.addEventListener.bind(this),
|
|
6304
8124
|
addIntentListener: this.addIntentListener.bind(this),
|
|
6305
8125
|
broadcast: this.broadcast.bind(this),
|
|
6306
8126
|
createPrivateChannel: this.createPrivateChannel.bind(this),
|
|
@@ -6442,6 +8262,13 @@ class DesktopAgent {
|
|
|
6442
8262
|
async leaveCurrentChannels() {
|
|
6443
8263
|
return this.channelsController.leave(generateCommandId());
|
|
6444
8264
|
}
|
|
8265
|
+
async addEventListener(type, handler) {
|
|
8266
|
+
optionalFdc3EventTypesDecoder.runWithException(type);
|
|
8267
|
+
if (typeof handler !== "function") {
|
|
8268
|
+
throw new Error("Please provide the handler as a function!");
|
|
8269
|
+
}
|
|
8270
|
+
return this.channelsController.addEventListener({ commandId: generateCommandId(), type, handler });
|
|
8271
|
+
}
|
|
6445
8272
|
}
|
|
6446
8273
|
|
|
6447
8274
|
class AppChannel {
|
|
@@ -6559,13 +8386,13 @@ class UserChannel {
|
|
|
6559
8386
|
async addContextListener(contextType, handler) {
|
|
6560
8387
|
if (arguments.length === 1) {
|
|
6561
8388
|
if (typeof contextType !== "function") {
|
|
6562
|
-
throw
|
|
8389
|
+
throw new Error(ChannelError.AccessDenied);
|
|
6563
8390
|
}
|
|
6564
8391
|
return this.channelsController.addContextListener({ commandId: generateCommandId(), handler: contextType, channelId: this.id });
|
|
6565
8392
|
}
|
|
6566
8393
|
const contextTypeDecoder = optionalNonEmptyStringDecoder.runWithException(contextType);
|
|
6567
8394
|
if (typeof handler !== "function") {
|
|
6568
|
-
throw
|
|
8395
|
+
throw new Error(ChannelError.AccessDenied);
|
|
6569
8396
|
}
|
|
6570
8397
|
return this.channelsController.addContextListener({ commandId: generateCommandId(), handler, contextType: contextTypeDecoder, channelId: this.id });
|
|
6571
8398
|
}
|
|
@@ -6596,6 +8423,22 @@ const parseContextHandler = (handler, contextType) => {
|
|
|
6596
8423
|
};
|
|
6597
8424
|
return subHandler;
|
|
6598
8425
|
};
|
|
8426
|
+
const parseHandlerToEventHandler = ({ handler, eventType, contextType }) => {
|
|
8427
|
+
const eventHandler = (event) => {
|
|
8428
|
+
const { type, details } = event;
|
|
8429
|
+
if (eventType && type !== eventType) {
|
|
8430
|
+
return;
|
|
8431
|
+
}
|
|
8432
|
+
if (contextType) {
|
|
8433
|
+
if (details.type === contextType) {
|
|
8434
|
+
handler(details, details.metadata);
|
|
8435
|
+
}
|
|
8436
|
+
return;
|
|
8437
|
+
}
|
|
8438
|
+
handler(details, details.metadata);
|
|
8439
|
+
};
|
|
8440
|
+
return eventHandler;
|
|
8441
|
+
};
|
|
6599
8442
|
|
|
6600
8443
|
class IntentsController {
|
|
6601
8444
|
glueController;
|
|
@@ -6633,11 +8476,11 @@ class IntentsController {
|
|
|
6633
8476
|
this.logger?.info(`[${commandId}] - findIntent() invoked for intent ${intent} with contextType ${context?.type} and resultType ${resultType}`);
|
|
6634
8477
|
const glueIntents = await this.glueController.findIntents({ name: intent });
|
|
6635
8478
|
if (!glueIntents.length) {
|
|
6636
|
-
throw
|
|
8479
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
6637
8480
|
}
|
|
6638
8481
|
const searchedGlueIntent = glueIntents.find((glueIntent) => glueIntent.name === intent);
|
|
6639
8482
|
if (!searchedGlueIntent) {
|
|
6640
|
-
throw
|
|
8483
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
6641
8484
|
}
|
|
6642
8485
|
if (!context && !resultType) {
|
|
6643
8486
|
return this.convertGlue42IntentToFDC3Intent(searchedGlueIntent);
|
|
@@ -6645,7 +8488,7 @@ class IntentsController {
|
|
|
6645
8488
|
const contextType = (context && context.type === fdc3NothingContextType) ? undefined : context?.type;
|
|
6646
8489
|
const filteredIntent = this.getGlueIntentWithFilteredHandlers(searchedGlueIntent, { contextType, resultType });
|
|
6647
8490
|
if (!filteredIntent.handlers.length) {
|
|
6648
|
-
throw
|
|
8491
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
6649
8492
|
}
|
|
6650
8493
|
return this.convertGlue42IntentToFDC3Intent(filteredIntent);
|
|
6651
8494
|
}
|
|
@@ -6654,7 +8497,7 @@ class IntentsController {
|
|
|
6654
8497
|
this.logger?.info(`[${commandId}] - findIntentsByContext() invoked for context type ${context.type} and resultType ${resultType}`);
|
|
6655
8498
|
const glueIntents = await this.glueController.findIntents({ contextType: context.type, resultType });
|
|
6656
8499
|
if (!glueIntents.length) {
|
|
6657
|
-
throw
|
|
8500
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
6658
8501
|
}
|
|
6659
8502
|
this.logger?.info(`[${commandId}] - parsing glue intents to fdc3 intents and returning`);
|
|
6660
8503
|
return glueIntents.map((glueIntent) => {
|
|
@@ -6664,11 +8507,12 @@ class IntentsController {
|
|
|
6664
8507
|
}
|
|
6665
8508
|
async raiseIntent({ commandId, intent, context, target }) {
|
|
6666
8509
|
await this.glueController.gluePromise;
|
|
6667
|
-
this.logger?.info(`[${commandId}] - raiseIntent() invoked for intent ${intent} with contextType: ${context.type} and target: ${target}`);
|
|
8510
|
+
this.logger?.info(`[${commandId}] - raiseIntent() invoked for intent ${intent} with contextType: ${context.type} and target: ${JSON.stringify(target)}`);
|
|
6668
8511
|
const glueContext = { type: context.type, data: { ...context } };
|
|
6669
8512
|
const searchedGlueIntent = (await this.glueController.findIntents({ name: intent })).find(glueIntent => glueIntent.name === intent);
|
|
8513
|
+
this.logger?.info(`[${commandId}] - searchedGlueIntent: ${JSON.stringify(searchedGlueIntent)}`);
|
|
6670
8514
|
if (!searchedGlueIntent) {
|
|
6671
|
-
throw
|
|
8515
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
6672
8516
|
}
|
|
6673
8517
|
if (!target) {
|
|
6674
8518
|
const filteredGlueIntent = this.filterGlueIntentHandlers({ commandId, intent: searchedGlueIntent, context, target });
|
|
@@ -6676,14 +8520,17 @@ class IntentsController {
|
|
|
6676
8520
|
return this.invokeRaiseIntent(commandId, { intent, context: glueContext, handlers: filteredGlueIntent.handlers });
|
|
6677
8521
|
}
|
|
6678
8522
|
if (target?.instanceId) {
|
|
6679
|
-
this.
|
|
6680
|
-
return this.invokeRaiseIntent(commandId, {
|
|
6681
|
-
intent,
|
|
6682
|
-
context: glueContext,
|
|
6683
|
-
target: { instance: target.instanceId }
|
|
6684
|
-
});
|
|
8523
|
+
return this.raiseIntentToInstanceTarget({ intent, context: glueContext, target: { instance: target.instanceId } }, searchedGlueIntent.handlers, target, commandId);
|
|
6685
8524
|
}
|
|
6686
8525
|
const targetAppName = typeof target === "string" ? target : target.appId;
|
|
8526
|
+
const appHandlersWithAppId = searchedGlueIntent.handlers.filter((handler) => handler.applicationName === targetAppName);
|
|
8527
|
+
if (!appHandlersWithAppId.length) {
|
|
8528
|
+
throw new Error(ResolveError.TargetAppUnavailable);
|
|
8529
|
+
}
|
|
8530
|
+
const appHandlersWithContextType = appHandlersWithAppId.filter((handler) => !handler.instanceId && handler.contextTypes?.includes(context.type));
|
|
8531
|
+
if (!appHandlersWithContextType.length) {
|
|
8532
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
8533
|
+
}
|
|
6687
8534
|
return this.invokeRaiseIntent(commandId, {
|
|
6688
8535
|
intent,
|
|
6689
8536
|
context: glueContext,
|
|
@@ -6733,7 +8580,23 @@ class IntentsController {
|
|
|
6733
8580
|
await this.glueController.gluePromise;
|
|
6734
8581
|
this.logger?.info(`[${commandId}] - addIntentListener() invoked for intent ${intent}`);
|
|
6735
8582
|
const wrappedHandler = this.getWrappedIntentHandler(handler);
|
|
6736
|
-
|
|
8583
|
+
const unsub = await this.glueController.addIntentListener(intent, wrappedHandler);
|
|
8584
|
+
return getListenerWithAsyncUnsubscribe(unsub.unsubscribe);
|
|
8585
|
+
}
|
|
8586
|
+
raiseIntentToInstanceTarget(request, glueHandlers, target, commandId) {
|
|
8587
|
+
this.logger?.info(`[${commandId}] - raising intent ${request.intent} with contextType ${request.context?.type} to target instance of app ${target.appId} and id ${target.instanceId}`);
|
|
8588
|
+
const handlersWithSameAppName = glueHandlers.filter((handler) => handler.applicationName === target.appId);
|
|
8589
|
+
const handlersWithSameContext = this.getGlueIntentWithFilteredHandlers({ name: request.intent, handlers: handlersWithSameAppName }, { contextType: request.context?.type }).handlers;
|
|
8590
|
+
if (!handlersWithSameContext.length) {
|
|
8591
|
+
this.logger?.info(`[${commandId}] - No handlers found for intent ${request.intent} with appName ${target.appId} and contextType ${request.context?.type}`);
|
|
8592
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
8593
|
+
}
|
|
8594
|
+
const isValidInstanceHandler = handlersWithSameContext.find((handler) => handler.instanceId === target.instanceId);
|
|
8595
|
+
if (!isValidInstanceHandler) {
|
|
8596
|
+
this.logger?.info(`[${commandId}] - There's no instance with id ${target.instanceId} of the passed app ${target.appId}`);
|
|
8597
|
+
throw new Error(ResolveError.TargetInstanceUnavailable);
|
|
8598
|
+
}
|
|
8599
|
+
return this.invokeRaiseIntent(commandId, request);
|
|
6737
8600
|
}
|
|
6738
8601
|
async checkForRememberedIntentHandlerForContext(contextType) {
|
|
6739
8602
|
let prefs;
|
|
@@ -6776,12 +8639,12 @@ class IntentsController {
|
|
|
6776
8639
|
const app = this.glueController.getApplication(appName);
|
|
6777
8640
|
const serverInstances = this.serverInstanceAsIntentHandler(intent.name);
|
|
6778
8641
|
if (!app && (typeof target === "string" || !target.instanceId || !serverInstances.length)) {
|
|
6779
|
-
throw
|
|
8642
|
+
throw new Error(ResolveError.TargetAppUnavailable);
|
|
6780
8643
|
}
|
|
6781
8644
|
this.logger?.info(`[${commandId}] - target app ${appName} found. Filtering handlers by applicationName: ${appName}`);
|
|
6782
8645
|
const validHandlersByApplicationName = intent.handlers.filter((handler) => handler.applicationName === appName);
|
|
6783
8646
|
if (!validHandlersByApplicationName.length) {
|
|
6784
|
-
throw
|
|
8647
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
6785
8648
|
}
|
|
6786
8649
|
if (!instanceId) {
|
|
6787
8650
|
this.logger?.log(`[${commandId}] - returning all handlers for intent ${intent.name} and target: ${JSON.stringify(target)}`);
|
|
@@ -6791,12 +8654,12 @@ class IntentsController {
|
|
|
6791
8654
|
? app.instances.find((inst) => inst.id === instanceId)
|
|
6792
8655
|
: serverInstances.find((inst) => inst.instance === instanceId);
|
|
6793
8656
|
if (!isValidInstanceOfTheApp) {
|
|
6794
|
-
throw
|
|
8657
|
+
throw new Error(ResolveError.TargetInstanceUnavailable);
|
|
6795
8658
|
}
|
|
6796
8659
|
this.logger?.info(`[${commandId}] - Filtering handlers by instanceId: ${instanceId}`);
|
|
6797
8660
|
const validHandlersByInstanceId = validHandlersByApplicationName.filter((handler) => handler.instanceId === instanceId);
|
|
6798
8661
|
if (!validHandlersByInstanceId.length) {
|
|
6799
|
-
throw
|
|
8662
|
+
throw new Error(ResolveError.IntentDeliveryFailed);
|
|
6800
8663
|
}
|
|
6801
8664
|
return { name: intent.name, handlers: validHandlersByInstanceId };
|
|
6802
8665
|
}
|
|
@@ -6808,7 +8671,7 @@ class IntentsController {
|
|
|
6808
8671
|
filterIntentHandlersByContext(intent, context) {
|
|
6809
8672
|
const filteredGlueIntent = this.getGlueIntentWithFilteredHandlers(intent, { contextType: context.type });
|
|
6810
8673
|
if (!filteredGlueIntent.handlers.length) {
|
|
6811
|
-
throw
|
|
8674
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
6812
8675
|
}
|
|
6813
8676
|
return filteredGlueIntent;
|
|
6814
8677
|
}
|
|
@@ -6860,15 +8723,17 @@ class IntentsController {
|
|
|
6860
8723
|
apps: handlers.map((handler) => {
|
|
6861
8724
|
const appName = handler.applicationName;
|
|
6862
8725
|
const app = this.glueController.getApplication(appName);
|
|
8726
|
+
const icons = (handler.applicationIcon ? [handler.applicationIcon, ...(app?.userProperties.icons ?? [])] : (app?.userProperties.icons ?? [])).filter((icon) => !!icon).map((icon) => ({ src: icon }));
|
|
8727
|
+
const images = (app?.userProperties.images ?? []).filter((image) => !!image).map((image) => ({ src: image }));
|
|
6863
8728
|
return {
|
|
6864
8729
|
appId: appName,
|
|
6865
8730
|
instanceId: handler.instanceId,
|
|
6866
8731
|
name: appName,
|
|
6867
8732
|
title: handler.applicationTitle || handler.instanceTitle || appName,
|
|
6868
|
-
tooltip: app?.userProperties.tooltip
|
|
8733
|
+
tooltip: app?.userProperties.tooltip ?? `${appName} (${handler.type})`,
|
|
6869
8734
|
description: handler.applicationDescription,
|
|
6870
|
-
icons
|
|
6871
|
-
images
|
|
8735
|
+
icons,
|
|
8736
|
+
images,
|
|
6872
8737
|
resultType: handler.resultType
|
|
6873
8738
|
};
|
|
6874
8739
|
})
|
|
@@ -6930,8 +8795,9 @@ class IntentsController {
|
|
|
6930
8795
|
return { name, handlers: filteredHandlers };
|
|
6931
8796
|
}
|
|
6932
8797
|
async invokeRaiseIntent(commandId, request) {
|
|
8798
|
+
const inBrowser = this.glueController.isRunningInBrowser();
|
|
6933
8799
|
try {
|
|
6934
|
-
const glueIntentResult = await this.glueController.raiseIntent({ ...request, timeout: RaiseTimeoutMs });
|
|
8800
|
+
const glueIntentResult = await this.glueController.raiseIntent({ ...request, timeout: RaiseTimeoutMs, options: { waitForAGMReady: !inBrowser } });
|
|
6935
8801
|
return {
|
|
6936
8802
|
source: {
|
|
6937
8803
|
appId: glueIntentResult.handler.applicationName,
|
|
@@ -6942,7 +8808,7 @@ class IntentsController {
|
|
|
6942
8808
|
};
|
|
6943
8809
|
}
|
|
6944
8810
|
catch (error) {
|
|
6945
|
-
throw this.parseIoToFdc3Error(error);
|
|
8811
|
+
throw new Error(this.parseIoToFdc3Error(error).message);
|
|
6946
8812
|
}
|
|
6947
8813
|
}
|
|
6948
8814
|
parseIoToFdc3Error(error) {
|
|
@@ -6956,10 +8822,7 @@ class IntentsController {
|
|
|
6956
8822
|
this.logger?.info(`[${commandId}] - raiseIntentForContext() invoked with contextType ${context.type} and target ${target}`);
|
|
6957
8823
|
const appIntents = await this.findIntentsByContext({ commandId, context });
|
|
6958
8824
|
if (!appIntents || appIntents.length === 0) {
|
|
6959
|
-
throw
|
|
6960
|
-
message: ResolveError.NoAppsFound,
|
|
6961
|
-
reason: `No apps registering intent with contextType ${context.type} ${target ? `and target ${JSON.stringify(target)}` : ""}`
|
|
6962
|
-
};
|
|
8825
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
6963
8826
|
}
|
|
6964
8827
|
return this.raiseIntent({ commandId, intent: appIntents[0].intent.name, context, target });
|
|
6965
8828
|
}
|
|
@@ -6984,50 +8847,51 @@ class ApplicationsController {
|
|
|
6984
8847
|
}
|
|
6985
8848
|
async open({ commandId, target, context }) {
|
|
6986
8849
|
await this.glueController.gluePromise;
|
|
6987
|
-
this.logger?.log(`[${commandId}] - open() invoked with target ${target} ${context ? `and contextType ${context.type}` : ""}`);
|
|
8850
|
+
this.logger?.log(`[${commandId}] - open() invoked with target ${JSON.stringify(target)} ${context ? `and contextType ${context.type}` : ""}`);
|
|
6988
8851
|
const name = typeof target === "object" ? target.appId : target;
|
|
6989
8852
|
const app = this.glueController.getApplication(name);
|
|
6990
8853
|
if (!app) {
|
|
6991
|
-
throw
|
|
8854
|
+
throw new Error(OpenError.AppNotFound);
|
|
6992
8855
|
}
|
|
6993
8856
|
if (context) {
|
|
6994
8857
|
await this.glueEventsController.initializeCollaborateMethod();
|
|
6995
|
-
this.logger?.info(`[${commandId}] - opening app ${app} with startup context`);
|
|
8858
|
+
this.logger?.info(`[${commandId}] - opening app '${app.name}' with startup context`);
|
|
6996
8859
|
return this.openAppWithContext(app, context);
|
|
6997
8860
|
}
|
|
6998
8861
|
try {
|
|
6999
|
-
this.logger?.info(`[${commandId}] - opening app ${app}`);
|
|
7000
|
-
const
|
|
8862
|
+
this.logger?.info(`[${commandId}] - opening app '${app.name}' without context`);
|
|
8863
|
+
const inBrowser = this.glueController.isRunningInBrowser();
|
|
8864
|
+
const glueInst = await app.start(undefined, { waitForAGMReady: !inBrowser });
|
|
7001
8865
|
this.logger?.info(`[${commandId}] - instance with id ${glueInst.id} started`);
|
|
7002
8866
|
return this.parseGlueInstToAppIdentifier(glueInst);
|
|
7003
8867
|
}
|
|
7004
8868
|
catch (error) {
|
|
7005
|
-
throw
|
|
8869
|
+
throw new Error(OpenError.ErrorOnLaunch);
|
|
7006
8870
|
}
|
|
7007
8871
|
}
|
|
7008
8872
|
async findInstances({ commandId, appIdentifier }) {
|
|
7009
8873
|
await this.glueController.gluePromise;
|
|
7010
|
-
this.logger?.info(`[${commandId}] - findInstances() invoked with appIdentifier ${appIdentifier}`);
|
|
8874
|
+
this.logger?.info(`[${commandId}] - findInstances() invoked with appIdentifier ${JSON.stringify(appIdentifier)}`);
|
|
7011
8875
|
const { appId } = appIdentifier;
|
|
7012
8876
|
const app = this.glueController.getApplication(appId);
|
|
7013
8877
|
if (!app) {
|
|
7014
|
-
throw
|
|
8878
|
+
throw new Error(ResolveError.NoAppsFound);
|
|
7015
8879
|
}
|
|
7016
8880
|
const glueInstances = this.glueController.getApplicationInstances(appId);
|
|
7017
8881
|
const fdc3Instances = glueInstances.map(glueInst => this.parseGlueInstToAppIdentifier(glueInst));
|
|
7018
|
-
this.logger?.info(`[${commandId}] - ids of opened instances for appIdentifier ${appIdentifier}: ${JSON.stringify(fdc3Instances.map(inst => inst.instanceId))}`);
|
|
8882
|
+
this.logger?.info(`[${commandId}] - ids of opened instances for appIdentifier ${JSON.stringify(appIdentifier)}: ${JSON.stringify(fdc3Instances.map(inst => inst.instanceId))}`);
|
|
7019
8883
|
return fdc3Instances;
|
|
7020
8884
|
}
|
|
7021
8885
|
async getAppMetadata({ commandId, appIdentifier }) {
|
|
7022
8886
|
await this.glueController.gluePromise;
|
|
7023
|
-
this.logger?.info(`[${commandId}] - getAppMetadata() invoked with appIdentifier ${appIdentifier}`);
|
|
8887
|
+
this.logger?.info(`[${commandId}] - getAppMetadata() invoked with appIdentifier ${JSON.stringify(appIdentifier)}`);
|
|
7024
8888
|
const { appId, instanceId } = appIdentifier;
|
|
7025
8889
|
const app = this.glueController.getApplication(appId);
|
|
7026
8890
|
if (!app) {
|
|
7027
|
-
throw
|
|
8891
|
+
throw new Error(OpenError.AppNotFound);
|
|
7028
8892
|
}
|
|
7029
8893
|
if (!instanceId) {
|
|
7030
|
-
this.logger?.info(`[${commandId}] - no opened instances found. Parsing app ${app}`);
|
|
8894
|
+
this.logger?.info(`[${commandId}] - no opened instances found. Parsing app ${app.name}`);
|
|
7031
8895
|
return this.parseGlueAppToAppMetadata(app);
|
|
7032
8896
|
}
|
|
7033
8897
|
const instance = this.glueController.getAppInstanceById(instanceId);
|
|
@@ -7038,8 +8902,9 @@ class ApplicationsController {
|
|
|
7038
8902
|
async getInfo({ commandId }) {
|
|
7039
8903
|
await this.glueController.gluePromise;
|
|
7040
8904
|
this.logger?.info(`${commandId} - getInfo() invoked`);
|
|
7041
|
-
const appMetadata =
|
|
7042
|
-
const
|
|
8905
|
+
const appMetadata = this.getCurrentAppMetadata();
|
|
8906
|
+
const globalScope = typeof process !== "undefined" ? process : window;
|
|
8907
|
+
const { provider, providerVersion, standardVersion } = globalScope.fdc3Info;
|
|
7043
8908
|
return {
|
|
7044
8909
|
provider,
|
|
7045
8910
|
providerVersion,
|
|
@@ -7054,10 +8919,13 @@ class ApplicationsController {
|
|
|
7054
8919
|
}
|
|
7055
8920
|
getCurrentAppMetadata() {
|
|
7056
8921
|
const myInstance = this.glueController.interopInstance();
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
8922
|
+
const myInstanceApplicationName = myInstance.application ?? myInstance.applicationName;
|
|
8923
|
+
const myApp = this.glueController.getApplication(myInstanceApplicationName);
|
|
8924
|
+
if (myApp) {
|
|
8925
|
+
return { appId: myApp.name, instanceId: myInstance.instance };
|
|
8926
|
+
}
|
|
8927
|
+
this.logger?.info(`No application found with name ${myInstanceApplicationName} probably because it's an iframe.`);
|
|
8928
|
+
return { appId: myInstanceApplicationName, instanceId: myInstance.instance };
|
|
7061
8929
|
}
|
|
7062
8930
|
parseGlueInstToAppIdentifier(glueInst) {
|
|
7063
8931
|
return {
|
|
@@ -7073,13 +8941,13 @@ class ApplicationsController {
|
|
|
7073
8941
|
return this.addInstanceMetadataToAppMetadata(appMetadata, instance);
|
|
7074
8942
|
}
|
|
7075
8943
|
async getBaseGlueAppToAppMetadata(app) {
|
|
7076
|
-
const
|
|
7077
|
-
const appConfiguration =
|
|
7078
|
-
?
|
|
7079
|
-
: app.
|
|
7080
|
-
const icon =
|
|
7081
|
-
?
|
|
7082
|
-
: app.icon;
|
|
8944
|
+
const inBrowserNamespace = this.glueController.isRunningInBrowser();
|
|
8945
|
+
const appConfiguration = inBrowserNamespace
|
|
8946
|
+
? app.userProperties
|
|
8947
|
+
: await app.getConfiguration();
|
|
8948
|
+
const icon = inBrowserNamespace
|
|
8949
|
+
? app.icon
|
|
8950
|
+
: (await app.getConfiguration()).icon;
|
|
7083
8951
|
return {
|
|
7084
8952
|
appId: app.name,
|
|
7085
8953
|
name: app.name,
|
|
@@ -7088,9 +8956,9 @@ class ApplicationsController {
|
|
|
7088
8956
|
title: app.title,
|
|
7089
8957
|
icons: icon ? [{ src: icon }] : [],
|
|
7090
8958
|
tooltip: appConfiguration.tooltip,
|
|
7091
|
-
screenshots:
|
|
7092
|
-
? appConfiguration.
|
|
7093
|
-
: appConfiguration.screenshots
|
|
8959
|
+
screenshots: inBrowserNamespace
|
|
8960
|
+
? appConfiguration.screenshots
|
|
8961
|
+
: appConfiguration.customProperties.screenshots
|
|
7094
8962
|
};
|
|
7095
8963
|
}
|
|
7096
8964
|
addInstanceMetadataToAppMetadata(appMetadata, instance) {
|
|
@@ -7101,24 +8969,26 @@ class ApplicationsController {
|
|
|
7101
8969
|
const startContext = this.buildStartContext(context, guid);
|
|
7102
8970
|
const wrappedPromise = this.createContextListenerWrappedPromise(app);
|
|
7103
8971
|
this.appsStateStore.addOpenAppPromise(guid, wrappedPromise);
|
|
8972
|
+
const inBrowser = this.glueController.isRunningInBrowser();
|
|
7104
8973
|
try {
|
|
7105
|
-
const glueInst = await app.start(startContext);
|
|
8974
|
+
const glueInst = await app.start(startContext, { waitForAGMReady: !inBrowser });
|
|
7106
8975
|
await wrappedPromise.promise;
|
|
7107
8976
|
this.appsStateStore.removeOpenAppPromise(guid);
|
|
7108
8977
|
return this.parseGlueInstToAppIdentifier(glueInst);
|
|
7109
8978
|
}
|
|
7110
8979
|
catch (error) {
|
|
7111
8980
|
this.appsStateStore.removeOpenAppPromise(guid);
|
|
7112
|
-
throw
|
|
8981
|
+
throw new Error(OpenError.AppTimeout);
|
|
7113
8982
|
}
|
|
7114
8983
|
}
|
|
7115
8984
|
buildStartContext(fdc3Context, guid) {
|
|
7116
8985
|
const myInteropInstance = this.glueController.getMyInteropInstance();
|
|
8986
|
+
const appId = myInteropInstance.application || myInteropInstance.applicationName || "";
|
|
7117
8987
|
return {
|
|
7118
8988
|
fdc3: {
|
|
7119
8989
|
collaborationId: guid,
|
|
7120
8990
|
openApp: {
|
|
7121
|
-
appId
|
|
8991
|
+
appId,
|
|
7122
8992
|
instanceId: myInteropInstance.instance
|
|
7123
8993
|
},
|
|
7124
8994
|
context: {
|
|
@@ -7141,7 +9011,7 @@ class ApplicationsController {
|
|
|
7141
9011
|
}
|
|
7142
9012
|
}
|
|
7143
9013
|
|
|
7144
|
-
class
|
|
9014
|
+
class WebEventReceiver {
|
|
7145
9015
|
glueController;
|
|
7146
9016
|
eventDispatcher;
|
|
7147
9017
|
glueResponseReceived = false;
|
|
@@ -7168,7 +9038,7 @@ class EventReceiver {
|
|
|
7168
9038
|
}
|
|
7169
9039
|
glueReceiverHandler(event) {
|
|
7170
9040
|
const data = event.detail;
|
|
7171
|
-
if (!data
|
|
9041
|
+
if (!data?.glue42) {
|
|
7172
9042
|
return;
|
|
7173
9043
|
}
|
|
7174
9044
|
const glue42Event = data.glue42.event;
|
|
@@ -7352,7 +9222,8 @@ class PrivateChannel {
|
|
|
7352
9222
|
this.isCreator = isCreator;
|
|
7353
9223
|
this.id = channelId;
|
|
7354
9224
|
const myServerInstance = this.channelsController.getMyServerInstance();
|
|
7355
|
-
|
|
9225
|
+
const myAppId = myServerInstance.application || myServerInstance.applicationName;
|
|
9226
|
+
this.myAppMetadata = { source: { appId: myAppId, instanceId: myServerInstance.instance } };
|
|
7356
9227
|
}
|
|
7357
9228
|
toApi() {
|
|
7358
9229
|
const api = {
|
|
@@ -7362,10 +9233,11 @@ class PrivateChannel {
|
|
|
7362
9233
|
broadcast: this.broadcast.bind(this),
|
|
7363
9234
|
getCurrentContext: this.getCurrentContext.bind(this),
|
|
7364
9235
|
addContextListener: this.addContextListener.bind(this),
|
|
7365
|
-
onAddContextListener: this.
|
|
7366
|
-
onUnsubscribe: this.
|
|
7367
|
-
onDisconnect: this.
|
|
9236
|
+
onAddContextListener: this.legacyOnAddContextListener.bind(this),
|
|
9237
|
+
onUnsubscribe: this.legacyOnUnsubscribe.bind(this),
|
|
9238
|
+
onDisconnect: this.legacyOnDisconnect.bind(this),
|
|
7368
9239
|
disconnect: this.disconnect.bind(this),
|
|
9240
|
+
addEventListener: this.addEventListener.bind(this),
|
|
7369
9241
|
};
|
|
7370
9242
|
return api;
|
|
7371
9243
|
}
|
|
@@ -7381,54 +9253,62 @@ class PrivateChannel {
|
|
|
7381
9253
|
}
|
|
7382
9254
|
async handleCollaboratorJoin(collaborator, commandId) {
|
|
7383
9255
|
this.setCollaborator(collaborator, commandId);
|
|
7384
|
-
await Promise.all(this.myListenerTypesBeforeBound.map((contextType) => {
|
|
7385
|
-
const listenerAddedArgs = {
|
|
7386
|
-
action: "addedContextListenerOnPrivateChannel",
|
|
7387
|
-
correlationId: this.id,
|
|
7388
|
-
collaborationObject: {
|
|
7389
|
-
channelId: this.id,
|
|
7390
|
-
contextType: contextType || undefined
|
|
7391
|
-
}
|
|
7392
|
-
};
|
|
7393
|
-
this.logger?.trace(`[${commandId}] - announcing ${"addedContextListenerOnPrivateChannel"} to collaborator ${JSON.stringify(this.collaborator)}`);
|
|
7394
|
-
return this.channelsController.invokeSystemMethod(listenerAddedArgs, this.collaborator?.instanceId);
|
|
7395
|
-
})).catch((err) => this.logger?.error(err));
|
|
9256
|
+
await Promise.all(this.myListenerTypesBeforeBound.map((contextType) => this.sendCollaborateMessage({ action: "addedContextListenerOnPrivateChannel", contextType }))).catch((err) => this.logger?.error(err));
|
|
7396
9257
|
}
|
|
7397
9258
|
handleCollaboratorBroadcast(context, metadata, commandId) {
|
|
7398
9259
|
this.logger?.trace(`[${commandId}] - heard context with type ${context.type} broadcasted on the channel`);
|
|
7399
9260
|
this.lastBroadcastedContextType = context.type;
|
|
7400
9261
|
this.broadcastedContexts[context.type] = { context, metadata };
|
|
7401
9262
|
this.logger?.trace(`[${commandId}] - invoking all context listeners`);
|
|
7402
|
-
this.
|
|
9263
|
+
this.executeCollaboratorBroadcastEvents(context, metadata);
|
|
7403
9264
|
}
|
|
7404
9265
|
handleCollaboratorAddContextListener(contextType, commandId) {
|
|
7405
9266
|
this.logger?.trace(`[${commandId}] - heard collaborator added context listener for type ${contextType}`);
|
|
7406
9267
|
this.collaboratorListenerTypes.push(contextType);
|
|
7407
|
-
this.
|
|
9268
|
+
this.executeCollaboratorAddContextListenerEvents(contextType);
|
|
7408
9269
|
}
|
|
7409
9270
|
handleCollaboratorRemovedListener(contextType, commandId) {
|
|
7410
9271
|
this.logger?.trace(`[${commandId}] - heard collaborator removed context listener with type ${contextType}`);
|
|
7411
|
-
|
|
7412
|
-
this.
|
|
7413
|
-
this.registry.execute(PrivateChannelEventMethods.OnUnsubscribe, contextType);
|
|
9272
|
+
this.collaboratorListenerTypes.splice(this.collaboratorListenerTypes.indexOf(contextType), 1);
|
|
9273
|
+
this.executeCollaboratorUnsubscribeEvents(contextType);
|
|
7414
9274
|
}
|
|
7415
9275
|
handleCollaboratorDisconnect() {
|
|
7416
9276
|
this.disconnected = true;
|
|
7417
|
-
this.
|
|
7418
|
-
this.registry.execute(PrivateChannelEventMethods.OnDisconnect);
|
|
9277
|
+
this.executeCollaboratorDisconnectEvents();
|
|
7419
9278
|
}
|
|
7420
9279
|
async announceJoin(targetInstance, commandId) {
|
|
7421
|
-
|
|
7422
|
-
action: "joinPrivateChannel",
|
|
7423
|
-
correlationId: this.id,
|
|
7424
|
-
collaborationObject: {
|
|
7425
|
-
channelId: this.id
|
|
7426
|
-
}
|
|
7427
|
-
};
|
|
7428
|
-
this.logger?.trace(`[${commandId}] - announcing ${"joinPrivateChannel"} to target instance with id ${JSON.stringify(targetInstance)}`);
|
|
7429
|
-
await this.channelsController.invokeSystemMethod(joinChannelArgs, targetInstance);
|
|
9280
|
+
await this.sendCollaborateMessage({ action: "joinPrivateChannel" });
|
|
7430
9281
|
this.logger?.trace(`[${commandId}] - collaborator received ${"joinPrivateChannel"} action`);
|
|
7431
9282
|
}
|
|
9283
|
+
async addEventListener(type, handler) {
|
|
9284
|
+
const decodedType = optionalPrivateChannelEventTypesDecoder.run(type);
|
|
9285
|
+
if (!decodedType.ok) {
|
|
9286
|
+
this.logger?.error(`Expected first argument 'type' as one of ${Object.values(NewPrivateChannelEventMethods).join(", ")}, got ${type}`);
|
|
9287
|
+
throw new Error(ChannelError.AccessDenied);
|
|
9288
|
+
}
|
|
9289
|
+
if (typeof handler !== "function") {
|
|
9290
|
+
this.logger?.error(`Expected function as an argument, got ${typeof handler}`);
|
|
9291
|
+
throw new Error(ChannelError.AccessDenied);
|
|
9292
|
+
}
|
|
9293
|
+
const commandId = generateCommandId();
|
|
9294
|
+
this.ensureAlive(commandId);
|
|
9295
|
+
this.logger?.trace(`[${commandId}] - adding event listener for type ${type}`);
|
|
9296
|
+
return this.addEventListenerByEventType(type, handler);
|
|
9297
|
+
}
|
|
9298
|
+
addEventListenerByEventType(type, handler) {
|
|
9299
|
+
const replayArgs = type === "addContextListener"
|
|
9300
|
+
? this.collaboratorListenerTypes.map((contextType) => ({ type: NewPrivateChannelEventMethods.AddContextListener, details: { contextType } }))
|
|
9301
|
+
: undefined;
|
|
9302
|
+
if (type) {
|
|
9303
|
+
const unsubscribe = this.registry.add(type, handler, replayArgs);
|
|
9304
|
+
return getListenerWithAsyncUnsubscribe(unsubscribe);
|
|
9305
|
+
}
|
|
9306
|
+
const addContextListener = this.addEventListenerByEventType("addContextListener", handler);
|
|
9307
|
+
const unsubscribeListener = this.addEventListenerByEventType("unsubscribe", handler);
|
|
9308
|
+
const disconnectListener = this.addEventListenerByEventType("disconnect", handler);
|
|
9309
|
+
const unsubscribe = () => [addContextListener, unsubscribeListener, disconnectListener].forEach((listener) => listener.unsubscribe());
|
|
9310
|
+
return getListenerWithAsyncUnsubscribe(unsubscribe);
|
|
9311
|
+
}
|
|
7432
9312
|
async broadcast(context) {
|
|
7433
9313
|
const contextDecoderResult = contextDecoder.run(context);
|
|
7434
9314
|
if (!contextDecoderResult.ok) {
|
|
@@ -7439,17 +9319,7 @@ class PrivateChannel {
|
|
|
7439
9319
|
this.ensureBound(commandId, "broadcast");
|
|
7440
9320
|
this.lastBroadcastedContextType = context.type;
|
|
7441
9321
|
this.broadcastedContexts[context.type] = { context, metadata: this.myAppMetadata };
|
|
7442
|
-
|
|
7443
|
-
action: "publishOnPrivateChannel",
|
|
7444
|
-
correlationId: this.id,
|
|
7445
|
-
collaborationObject: {
|
|
7446
|
-
channelId: this.id,
|
|
7447
|
-
contextType: context.type,
|
|
7448
|
-
payload: context
|
|
7449
|
-
}
|
|
7450
|
-
};
|
|
7451
|
-
this.logger?.trace(`[${commandId}] - announcing ${"publishOnPrivateChannel"} to collaborator ${JSON.stringify(this.collaborator)}`);
|
|
7452
|
-
await this.channelsController.invokeSystemMethod(broadcastArgs, this.collaborator?.instanceId);
|
|
9322
|
+
this.sendCollaborateMessage({ action: "publishOnPrivateChannel", contextType: context.type, payload: context });
|
|
7453
9323
|
this.logger?.trace(`[${commandId}] - collaborator received context for action ${"publishOnPrivateChannel"}`);
|
|
7454
9324
|
}
|
|
7455
9325
|
async getCurrentContext(contextType) {
|
|
@@ -7461,7 +9331,10 @@ class PrivateChannel {
|
|
|
7461
9331
|
if (!contextType && !this.lastBroadcastedContextType) {
|
|
7462
9332
|
return null;
|
|
7463
9333
|
}
|
|
7464
|
-
const searchedType = contextType
|
|
9334
|
+
const searchedType = contextType ?? this.lastBroadcastedContextType;
|
|
9335
|
+
if (!searchedType) {
|
|
9336
|
+
throw new Error("No context type specified and no last broadcasted context available");
|
|
9337
|
+
}
|
|
7465
9338
|
this.logger?.trace(`[${commandId}] - Returning context with type ${searchedType}`);
|
|
7466
9339
|
return this.broadcastedContexts[searchedType].context;
|
|
7467
9340
|
}
|
|
@@ -7470,51 +9343,42 @@ class PrivateChannel {
|
|
|
7470
9343
|
this.ensureAlive(commandId);
|
|
7471
9344
|
optionalNonEmptyStringDecoder.runWithException(contextType);
|
|
7472
9345
|
if (typeof handler !== "function") {
|
|
7473
|
-
throw
|
|
9346
|
+
throw new Error(ChannelError.AccessDenied);
|
|
7474
9347
|
}
|
|
7475
9348
|
this.logger?.trace(`[${commandId}] - adding subscription for broadcasted contexts with type: ${contextType}`);
|
|
7476
|
-
const
|
|
7477
|
-
if (contextType) {
|
|
7478
|
-
if (data.type === contextType) {
|
|
7479
|
-
handler(data, metadata);
|
|
7480
|
-
}
|
|
7481
|
-
return;
|
|
7482
|
-
}
|
|
7483
|
-
handler(data, metadata);
|
|
7484
|
-
};
|
|
7485
|
-
const lastBroadcastedContextPerType = this.retrieveLatestBroadcastedContextPerType(contextType);
|
|
7486
|
-
const replayArgs = lastBroadcastedContextPerType ? [[lastBroadcastedContextPerType.context, lastBroadcastedContextPerType.metadata]] : undefined;
|
|
7487
|
-
const unsub = this.registry.add(PrivateChannelEventMethods.ListenerAdded, subHandler, replayArgs);
|
|
9349
|
+
const unsub = this.addContextListenerInRegistry(contextType, handler);
|
|
7488
9350
|
if (!this.collaborator) {
|
|
7489
9351
|
this.myListenerTypesBeforeBound.push(contextType);
|
|
7490
9352
|
const unsubscribe = this.getAddContextListenerUnsub(unsub, contextType, commandId);
|
|
7491
|
-
return
|
|
9353
|
+
return { unsubscribe };
|
|
7492
9354
|
}
|
|
7493
|
-
|
|
7494
|
-
action: "addedContextListenerOnPrivateChannel",
|
|
7495
|
-
correlationId: this.id,
|
|
7496
|
-
collaborationObject: {
|
|
7497
|
-
channelId: this.id,
|
|
7498
|
-
contextType: contextType || undefined
|
|
7499
|
-
}
|
|
7500
|
-
};
|
|
7501
|
-
this.logger?.trace(`[${commandId}] - announcing ${"addedContextListenerOnPrivateChannel"} to collaborator ${JSON.stringify(this.collaborator)}`);
|
|
7502
|
-
await this.channelsController.invokeSystemMethod(listenerAddedArgs, this.collaborator?.instanceId);
|
|
9355
|
+
await this.sendCollaborateMessage({ action: "addedContextListenerOnPrivateChannel", contextType });
|
|
7503
9356
|
this.logger?.trace(`[${commandId}] - collaborator received action ${"addedContextListenerOnPrivateChannel"}`);
|
|
7504
9357
|
const unsubscribe = this.getAddContextListenerUnsub(unsub, contextType, commandId);
|
|
7505
|
-
return
|
|
9358
|
+
return { unsubscribe };
|
|
7506
9359
|
}
|
|
9360
|
+
addContextListenerInRegistry = (contextType, handler) => {
|
|
9361
|
+
const legacySubHandler = parseContextHandler(handler, contextType);
|
|
9362
|
+
const lastBroadcastedContextPerType = this.retrieveLatestBroadcastedContextPerType(contextType);
|
|
9363
|
+
const legacyReplayArgs = lastBroadcastedContextPerType ? [[lastBroadcastedContextPerType.context, lastBroadcastedContextPerType.metadata]] : undefined;
|
|
9364
|
+
const legacyUnsub = this.registry.add(LegacyPrivateChannelEventMethods.ListenerAdded, legacySubHandler, legacyReplayArgs);
|
|
9365
|
+
const replayArgs = lastBroadcastedContextPerType ? [{ type: NewPrivateChannelEventMethods.ContextListenerAdded, details: { contextType: lastBroadcastedContextPerType.context.type, metadata: lastBroadcastedContextPerType.metadata } }] : undefined;
|
|
9366
|
+
const subHandler = parseHandlerToEventHandler({ handler, eventType: NewPrivateChannelEventMethods.ContextListenerAdded, contextType });
|
|
9367
|
+
const newUnsub = this.registry.add(NewPrivateChannelEventMethods.ContextListenerAdded, subHandler, replayArgs);
|
|
9368
|
+
const unsub = () => {
|
|
9369
|
+
legacyUnsub();
|
|
9370
|
+
newUnsub();
|
|
9371
|
+
};
|
|
9372
|
+
return unsub;
|
|
9373
|
+
};
|
|
7507
9374
|
retrieveLatestBroadcastedContextPerType(contextType) {
|
|
7508
|
-
if (
|
|
7509
|
-
return;
|
|
9375
|
+
if (contextType) {
|
|
9376
|
+
return this.broadcastedContexts[contextType];
|
|
7510
9377
|
}
|
|
7511
|
-
if (!
|
|
7512
|
-
return
|
|
7513
|
-
context: this.broadcastedContexts[this.lastBroadcastedContextType].context,
|
|
7514
|
-
metadata: this.broadcastedContexts[this.lastBroadcastedContextType].metadata
|
|
7515
|
-
};
|
|
9378
|
+
if (!this.lastBroadcastedContextType) {
|
|
9379
|
+
return;
|
|
7516
9380
|
}
|
|
7517
|
-
return this.broadcastedContexts[
|
|
9381
|
+
return this.broadcastedContexts[this.lastBroadcastedContextType];
|
|
7518
9382
|
}
|
|
7519
9383
|
getAddContextListenerUnsub(unsub, contextType, commandId) {
|
|
7520
9384
|
return async () => {
|
|
@@ -7524,45 +9388,36 @@ class PrivateChannel {
|
|
|
7524
9388
|
this.myListenerTypesBeforeBound.splice(index, 1);
|
|
7525
9389
|
return;
|
|
7526
9390
|
}
|
|
7527
|
-
|
|
7528
|
-
action: "removedContextListenerOnPrivateChannel",
|
|
7529
|
-
correlationId: this.id,
|
|
7530
|
-
collaborationObject: {
|
|
7531
|
-
channelId: this.id,
|
|
7532
|
-
contextType: contextType || undefined
|
|
7533
|
-
}
|
|
7534
|
-
};
|
|
7535
|
-
this.logger?.trace(`[${commandId}] - announcing unsubscribe from context listener for type ${contextType}`);
|
|
7536
|
-
await this.channelsController.invokeSystemMethod(unsubArgs, this.collaborator?.instanceId);
|
|
9391
|
+
await this.sendCollaborateMessage({ action: "removedContextListenerOnPrivateChannel", contextType });
|
|
7537
9392
|
this.logger?.trace(`[${commandId}] - collaborator heard ${"removedContextListenerOnPrivateChannel"}`);
|
|
7538
9393
|
};
|
|
7539
9394
|
}
|
|
7540
|
-
|
|
9395
|
+
legacyOnAddContextListener(handler) {
|
|
7541
9396
|
if (typeof handler !== "function") {
|
|
7542
|
-
throw
|
|
9397
|
+
throw new Error(ChannelError.AccessDenied);
|
|
7543
9398
|
}
|
|
7544
9399
|
const commandId = generateCommandId();
|
|
7545
9400
|
this.ensureAlive(commandId);
|
|
7546
|
-
const unsub = this.registry.add(
|
|
7547
|
-
return
|
|
9401
|
+
const unsub = this.registry.add(LegacyPrivateChannelEventMethods.OnAddContextListener, handler, this.collaboratorListenerTypes);
|
|
9402
|
+
return getListenerWithAsyncUnsubscribe(unsub);
|
|
7548
9403
|
}
|
|
7549
|
-
|
|
9404
|
+
legacyOnUnsubscribe(handler) {
|
|
7550
9405
|
if (typeof handler !== "function") {
|
|
7551
|
-
throw
|
|
9406
|
+
throw new Error(ChannelError.AccessDenied);
|
|
7552
9407
|
}
|
|
7553
9408
|
const commandId = generateCommandId();
|
|
7554
9409
|
this.ensureAlive(commandId);
|
|
7555
|
-
const unsub = this.registry.add(
|
|
7556
|
-
return
|
|
9410
|
+
const unsub = this.registry.add(LegacyPrivateChannelEventMethods.OnUnsubscribe, handler);
|
|
9411
|
+
return getListenerWithAsyncUnsubscribe(unsub);
|
|
7557
9412
|
}
|
|
7558
|
-
|
|
9413
|
+
legacyOnDisconnect(handler) {
|
|
7559
9414
|
if (typeof handler !== "function") {
|
|
7560
|
-
throw
|
|
9415
|
+
throw new Error(ChannelError.AccessDenied);
|
|
7561
9416
|
}
|
|
7562
9417
|
const commandId = generateCommandId();
|
|
7563
9418
|
this.ensureAlive(commandId);
|
|
7564
|
-
const unsub = this.registry.add(
|
|
7565
|
-
return
|
|
9419
|
+
const unsub = this.registry.add(LegacyPrivateChannelEventMethods.OnDisconnect, handler);
|
|
9420
|
+
return getListenerWithAsyncUnsubscribe(unsub);
|
|
7566
9421
|
}
|
|
7567
9422
|
async disconnect() {
|
|
7568
9423
|
const commandId = generateCommandId();
|
|
@@ -7575,15 +9430,8 @@ class PrivateChannel {
|
|
|
7575
9430
|
this.logger?.trace(`[${commandId}] - disconnect invoked`);
|
|
7576
9431
|
this.disconnected = true;
|
|
7577
9432
|
this.logger?.trace(`[${commandId}] - announcing ${"disconnectedFromPrivateChannel"} to collaborator ${JSON.stringify(this.collaborator)}`);
|
|
7578
|
-
const disconnectArgs = {
|
|
7579
|
-
action: "disconnectedFromPrivateChannel",
|
|
7580
|
-
correlationId: this.id,
|
|
7581
|
-
collaborationObject: {
|
|
7582
|
-
channelId: this.id
|
|
7583
|
-
}
|
|
7584
|
-
};
|
|
7585
9433
|
this.channelsController.removePrivateChannelFromStoreById(this.id);
|
|
7586
|
-
await this.
|
|
9434
|
+
await this.sendCollaborateMessage({ action: "disconnectedFromPrivateChannel" });
|
|
7587
9435
|
this.logger?.trace(`[${commandId}] - collaborator received action ${"disconnectedFromPrivateChannel"}`);
|
|
7588
9436
|
if (this.unsubFromInstanceStopped) {
|
|
7589
9437
|
this.unsubFromInstanceStopped();
|
|
@@ -7595,7 +9443,7 @@ class PrivateChannel {
|
|
|
7595
9443
|
}
|
|
7596
9444
|
const errorMsg = "Channel is disconnected - operation is no longer available";
|
|
7597
9445
|
this.logger?.error(`[${commandId}] - ${errorMsg}`);
|
|
7598
|
-
throw
|
|
9446
|
+
throw new Error(ChannelError.AccessDenied);
|
|
7599
9447
|
}
|
|
7600
9448
|
ensureBound(commandId, operation) {
|
|
7601
9449
|
if (this.collaborator) {
|
|
@@ -7603,7 +9451,7 @@ class PrivateChannel {
|
|
|
7603
9451
|
}
|
|
7604
9452
|
const errorMsg = `There's no collaborator on the other side of the channel - operation ${operation} is unavailable`;
|
|
7605
9453
|
this.logger?.error(`[${commandId}] - ${errorMsg}`);
|
|
7606
|
-
throw
|
|
9454
|
+
throw new Error(ChannelError.AccessDenied);
|
|
7607
9455
|
}
|
|
7608
9456
|
subscribeForCollaboratorInstanceStop(commandId) {
|
|
7609
9457
|
const handler = (instance) => {
|
|
@@ -7614,6 +9462,43 @@ class PrivateChannel {
|
|
|
7614
9462
|
};
|
|
7615
9463
|
this.unsubFromInstanceStopped = this.channelsController.subscribeOnInstanceStop(this.id, handler.bind(this), commandId);
|
|
7616
9464
|
}
|
|
9465
|
+
async sendCollaborateMessage({ action, contextType, payload }) {
|
|
9466
|
+
const args = {
|
|
9467
|
+
action,
|
|
9468
|
+
correlationId: this.id,
|
|
9469
|
+
collaborationObject: {
|
|
9470
|
+
channelId: this.id,
|
|
9471
|
+
contextType,
|
|
9472
|
+
payload
|
|
9473
|
+
}
|
|
9474
|
+
};
|
|
9475
|
+
this.logger?.trace(`Sending '${action}' collaborate message ${JSON.stringify(args)} to collaborator ${JSON.stringify(this.collaborator)}`);
|
|
9476
|
+
await this.channelsController.invokeSystemMethod(args, this.collaborator?.instanceId);
|
|
9477
|
+
}
|
|
9478
|
+
executeCollaboratorAddContextListenerEvents(contextType) {
|
|
9479
|
+
this.registry.execute(LegacyPrivateChannelEventMethods.OnAddContextListener, contextType);
|
|
9480
|
+
const event = { type: NewPrivateChannelEventMethods.AddContextListener, details: { contextType } };
|
|
9481
|
+
this.registry.execute(NewPrivateChannelEventMethods.AddContextListener, event);
|
|
9482
|
+
}
|
|
9483
|
+
executeCollaboratorBroadcastEvents(context, metadata) {
|
|
9484
|
+
this.registry.execute(LegacyPrivateChannelEventMethods.ListenerAdded, context, metadata);
|
|
9485
|
+
const event = {
|
|
9486
|
+
type: NewPrivateChannelEventMethods.ContextListenerAdded,
|
|
9487
|
+
details: { context, metadata }
|
|
9488
|
+
};
|
|
9489
|
+
this.registry.execute(NewPrivateChannelEventMethods.ContextListenerAdded, event);
|
|
9490
|
+
}
|
|
9491
|
+
executeCollaboratorUnsubscribeEvents(contextType) {
|
|
9492
|
+
this.registry.execute(LegacyPrivateChannelEventMethods.OnUnsubscribe, contextType);
|
|
9493
|
+
const event = { type: NewPrivateChannelEventMethods.Unsubscribe, details: { contextType } };
|
|
9494
|
+
this.registry.execute(NewPrivateChannelEventMethods.Unsubscribe, event);
|
|
9495
|
+
}
|
|
9496
|
+
executeCollaboratorDisconnectEvents() {
|
|
9497
|
+
this.collaboratorListenerTypes.forEach((contextType) => this.executeCollaboratorUnsubscribeEvents(contextType));
|
|
9498
|
+
this.registry.execute(LegacyPrivateChannelEventMethods.OnDisconnect);
|
|
9499
|
+
const event = { type: NewPrivateChannelEventMethods.Disconnect, details: {} };
|
|
9500
|
+
this.registry.execute(NewPrivateChannelEventMethods.Disconnect, event);
|
|
9501
|
+
}
|
|
7617
9502
|
}
|
|
7618
9503
|
|
|
7619
9504
|
class ChannelsFactory {
|
|
@@ -7815,7 +9700,7 @@ class ChannelsBaseController {
|
|
|
7815
9700
|
const subHandler = parseContextHandler(handler, contextType);
|
|
7816
9701
|
if (!channelIdToSubscribeTo || onMultiChannels) {
|
|
7817
9702
|
const unsubscribe = this.glueController.channelsSubscribe(subHandler, contextType);
|
|
7818
|
-
return
|
|
9703
|
+
return getListenerWithAsyncUnsubscribe(unsubscribe);
|
|
7819
9704
|
}
|
|
7820
9705
|
return this.addContextListenerByChannelId({ commandId, handler: subHandler, invokedOnChannelModel: !!channelId, channelId: channelIdToSubscribeTo, contextType });
|
|
7821
9706
|
}
|
|
@@ -7988,6 +9873,14 @@ class ChannelsBaseController {
|
|
|
7988
9873
|
this.logger?.info(`[${commandId}] - leaving channel '${ioChannelToLeave.name}'`);
|
|
7989
9874
|
return this.glueController.leaveChannel({ channel: ioChannelToLeave.name });
|
|
7990
9875
|
}
|
|
9876
|
+
async addEventListener({ commandId, type, handler }) {
|
|
9877
|
+
await this.initDonePromise;
|
|
9878
|
+
this.logger?.info(`[${commandId}] - addEventListener() invoked for event type ${type}`);
|
|
9879
|
+
if (!type || type === "userChannelChanged") {
|
|
9880
|
+
return this.subscribeForChannelChangedEvent(handler);
|
|
9881
|
+
}
|
|
9882
|
+
throw new Error(`Received unknown event type: ${type}`);
|
|
9883
|
+
}
|
|
7991
9884
|
get logger() {
|
|
7992
9885
|
if (!this._logger) {
|
|
7993
9886
|
this._logger = this.glueController.initSubLogger("fdc3.channels.controller");
|
|
@@ -8025,7 +9918,7 @@ class ChannelsBaseController {
|
|
|
8025
9918
|
}
|
|
8026
9919
|
async handleWindowContextOnOpening(commandId, handler, contextType) {
|
|
8027
9920
|
const myWindow = this.glueController.getMyWindow();
|
|
8028
|
-
if (!myWindow) {
|
|
9921
|
+
if (!myWindow || !Object.keys(myWindow).length) {
|
|
8029
9922
|
this.logger?.trace(`[${commandId}] - Cannot get window context because this is not a Glue window, it's probably an iframe`);
|
|
8030
9923
|
this.invokeContextHandlerWithStartupContext = false;
|
|
8031
9924
|
return;
|
|
@@ -8106,12 +9999,10 @@ class ChannelsBaseController {
|
|
|
8106
9999
|
if (channelType === ChannelTypes.App) {
|
|
8107
10000
|
this.logger?.info(`[${commandId}] - subscribing for fdc3 app channel with id ${channelId} (underlying glue context with same name)`);
|
|
8108
10001
|
const unsubscribe = await this.glueController.contextsSubscribe(channelId, subHandler);
|
|
8109
|
-
return {
|
|
8110
|
-
unsubscribe
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
}
|
|
8114
|
-
};
|
|
10002
|
+
return getListenerWithAsyncUnsubscribe(() => {
|
|
10003
|
+
this.logger?.info(`[${commandId}] - invoking unsubscribe for app channel with id ${channelId}`);
|
|
10004
|
+
unsubscribe();
|
|
10005
|
+
});
|
|
8115
10006
|
}
|
|
8116
10007
|
this.logger?.error("Cannot add a context listener on an invalid channel");
|
|
8117
10008
|
throw new Error(ChannelError.AccessDenied);
|
|
@@ -8128,6 +10019,28 @@ class ChannelsBaseController {
|
|
|
8128
10019
|
this.logger?.error(`Channel with id: ${channelId} does not exist`);
|
|
8129
10020
|
throw new Error(ChannelError.NoChannelFound);
|
|
8130
10021
|
}
|
|
10022
|
+
subscribeForChannelChangedEvent(handler) {
|
|
10023
|
+
const wrappedCallback = async (channelName) => {
|
|
10024
|
+
if (!channelName) {
|
|
10025
|
+
this.invokeChannelChangedEventHandler(null, handler);
|
|
10026
|
+
return;
|
|
10027
|
+
}
|
|
10028
|
+
const fdc3ChannelName = await this.glueController.getFDC3ChannelIdByIoChannelName(channelName);
|
|
10029
|
+
if (!fdc3ChannelName) {
|
|
10030
|
+
return;
|
|
10031
|
+
}
|
|
10032
|
+
this.invokeChannelChangedEventHandler(fdc3ChannelName, handler);
|
|
10033
|
+
};
|
|
10034
|
+
const unsubscribe = this.glueController.setOnChannelChanged(wrappedCallback);
|
|
10035
|
+
return getListenerWithAsyncUnsubscribe(unsubscribe);
|
|
10036
|
+
}
|
|
10037
|
+
invokeChannelChangedEventHandler(channelId, handler) {
|
|
10038
|
+
const event = {
|
|
10039
|
+
type: "userChannelChanged",
|
|
10040
|
+
details: { currentChannelId: channelId }
|
|
10041
|
+
};
|
|
10042
|
+
handler(event);
|
|
10043
|
+
}
|
|
8131
10044
|
}
|
|
8132
10045
|
|
|
8133
10046
|
class LegacyDataWrappingChannelsController {
|
|
@@ -8165,7 +10078,7 @@ class LegacyDataWrappingChannelsController {
|
|
|
8165
10078
|
if (!invokedOnChannelModel) {
|
|
8166
10079
|
this.logger?.info(`[${commandId}] - subscribing for fdc3 user channel with id ${channelId}`);
|
|
8167
10080
|
const unsubscribe = this.glueController.legacyChannelsSubscribe(handler, contextType);
|
|
8168
|
-
return
|
|
10081
|
+
return getListenerWithAsyncUnsubscribe(unsubscribe);
|
|
8169
10082
|
}
|
|
8170
10083
|
const ioChannelName = await this.glueController.getIoChannelNameByFDC3ChannelId(channelId);
|
|
8171
10084
|
if (!ioChannelName) {
|
|
@@ -8175,7 +10088,7 @@ class LegacyDataWrappingChannelsController {
|
|
|
8175
10088
|
const contextToSubscribeTo = this.parser.mapChannelNameToContextName(ioChannelName);
|
|
8176
10089
|
this.logger?.info(`[${commandId}] - subscribing for fdc3 user channel with id ${channelId}`);
|
|
8177
10090
|
const unsubscribe = await this.glueController.contextsSubscribe(contextToSubscribeTo, handler);
|
|
8178
|
-
return
|
|
10091
|
+
return getListenerWithAsyncUnsubscribe(unsubscribe);
|
|
8179
10092
|
}
|
|
8180
10093
|
get logger() {
|
|
8181
10094
|
if (!this._logger) {
|
|
@@ -8221,7 +10134,7 @@ class NewDataWrappingChannelsController {
|
|
|
8221
10134
|
if (!invokedOnChannelModel) {
|
|
8222
10135
|
this.logger?.info(`[${commandId}] - subscribing for fdc3 user channel with id ${channelId}`);
|
|
8223
10136
|
const unsubscribe = this.glueController.channelsSubscribe(handler, contextType);
|
|
8224
|
-
return
|
|
10137
|
+
return getListenerWithAsyncUnsubscribe(unsubscribe);
|
|
8225
10138
|
}
|
|
8226
10139
|
const ioChannelName = await this.glueController.getIoChannelNameByFDC3ChannelId(channelId);
|
|
8227
10140
|
if (!ioChannelName) {
|
|
@@ -8231,7 +10144,7 @@ class NewDataWrappingChannelsController {
|
|
|
8231
10144
|
const contextToSubscribeTo = this.parser.mapChannelNameToContextName(ioChannelName);
|
|
8232
10145
|
this.logger?.info(`[${commandId}] - subscribing for fdc3 user channel with id ${channelId}`);
|
|
8233
10146
|
const unsubscribe = await this.glueController.contextsSubscribe(contextToSubscribeTo, handler);
|
|
8234
|
-
return
|
|
10147
|
+
return getListenerWithAsyncUnsubscribe(unsubscribe);
|
|
8235
10148
|
}
|
|
8236
10149
|
get logger() {
|
|
8237
10150
|
if (!this._logger) {
|
|
@@ -8241,9 +10154,55 @@ class NewDataWrappingChannelsController {
|
|
|
8241
10154
|
}
|
|
8242
10155
|
}
|
|
8243
10156
|
|
|
10157
|
+
class NodeEventReceiver {
|
|
10158
|
+
glueController;
|
|
10159
|
+
glueReceived = false;
|
|
10160
|
+
glueInitialized = false;
|
|
10161
|
+
timer;
|
|
10162
|
+
constructor(glueController) {
|
|
10163
|
+
this.glueController = glueController;
|
|
10164
|
+
}
|
|
10165
|
+
start() {
|
|
10166
|
+
setTimeout(this.clearInterval, GlueReceivedPromiseTimeout);
|
|
10167
|
+
this.setupInterval();
|
|
10168
|
+
}
|
|
10169
|
+
setupInterval() {
|
|
10170
|
+
this.timer = setInterval(() => {
|
|
10171
|
+
if (this.glueReceived) {
|
|
10172
|
+
return this.clearInterval();
|
|
10173
|
+
}
|
|
10174
|
+
const glueAvailable = typeof (process.io ?? process.glue) !== "undefined";
|
|
10175
|
+
if (!glueAvailable) {
|
|
10176
|
+
return;
|
|
10177
|
+
}
|
|
10178
|
+
this.glueReceived = true;
|
|
10179
|
+
const glue = process.io ?? process.glue;
|
|
10180
|
+
const glueValidator = this.glueController.validateGlue(glue);
|
|
10181
|
+
if (!glueValidator.isValid) {
|
|
10182
|
+
this.glueController.initializeFailed(glueValidator.error);
|
|
10183
|
+
return this.clearInterval();
|
|
10184
|
+
}
|
|
10185
|
+
this.clearInterval();
|
|
10186
|
+
this.glueController.initialize(glue);
|
|
10187
|
+
this.glueInitialized = true;
|
|
10188
|
+
}, 100);
|
|
10189
|
+
}
|
|
10190
|
+
clearInterval() {
|
|
10191
|
+
if (!this.timer) {
|
|
10192
|
+
return;
|
|
10193
|
+
}
|
|
10194
|
+
clearInterval(this.timer);
|
|
10195
|
+
this.timer = undefined;
|
|
10196
|
+
if (!this.glueReceived && !this.glueInitialized) {
|
|
10197
|
+
this.glueController.initializeFailed(`Timeout ${GlueReceivedPromiseTimeout}ms waiting for 'io' to be available on the process object`);
|
|
10198
|
+
}
|
|
10199
|
+
}
|
|
10200
|
+
}
|
|
10201
|
+
|
|
8244
10202
|
class IoC {
|
|
8245
|
-
|
|
8246
|
-
|
|
10203
|
+
_webEventDispatcher;
|
|
10204
|
+
_webEventReceiver;
|
|
10205
|
+
_nodeEventReceiver;
|
|
8247
10206
|
_desktopAgent;
|
|
8248
10207
|
_glueController;
|
|
8249
10208
|
_intentsController;
|
|
@@ -8261,14 +10220,15 @@ class IoC {
|
|
|
8261
10220
|
return this;
|
|
8262
10221
|
}
|
|
8263
10222
|
get eventReceiver() {
|
|
8264
|
-
|
|
8265
|
-
|
|
10223
|
+
const inNode = typeof process !== "undefined";
|
|
10224
|
+
if (inNode) {
|
|
10225
|
+
return this.nodeEventReceiver;
|
|
8266
10226
|
}
|
|
8267
|
-
return this.
|
|
10227
|
+
return this.webEventReceiver;
|
|
8268
10228
|
}
|
|
8269
10229
|
get glueController() {
|
|
8270
10230
|
if (!this._glueController) {
|
|
8271
|
-
this._glueController = new GlueController(this.channelsParser
|
|
10231
|
+
this._glueController = new GlueController(this.channelsParser);
|
|
8272
10232
|
}
|
|
8273
10233
|
return this._glueController;
|
|
8274
10234
|
}
|
|
@@ -8278,11 +10238,23 @@ class IoC {
|
|
|
8278
10238
|
}
|
|
8279
10239
|
return this._fdc3;
|
|
8280
10240
|
}
|
|
8281
|
-
get
|
|
8282
|
-
if (!this.
|
|
8283
|
-
this.
|
|
10241
|
+
get nodeEventReceiver() {
|
|
10242
|
+
if (!this._nodeEventReceiver) {
|
|
10243
|
+
this._nodeEventReceiver = new NodeEventReceiver(this.glueController);
|
|
10244
|
+
}
|
|
10245
|
+
return this._nodeEventReceiver;
|
|
10246
|
+
}
|
|
10247
|
+
get webEventReceiver() {
|
|
10248
|
+
if (!this._webEventReceiver) {
|
|
10249
|
+
this._webEventReceiver = new WebEventReceiver(this.glueController, this.webEventDispatcher);
|
|
10250
|
+
}
|
|
10251
|
+
return this._webEventReceiver;
|
|
10252
|
+
}
|
|
10253
|
+
get webEventDispatcher() {
|
|
10254
|
+
if (!this._webEventDispatcher) {
|
|
10255
|
+
this._webEventDispatcher = new WebEventDispatcher();
|
|
8284
10256
|
}
|
|
8285
|
-
return this.
|
|
10257
|
+
return this._webEventDispatcher;
|
|
8286
10258
|
}
|
|
8287
10259
|
get channelsFactory() {
|
|
8288
10260
|
if (!this._channelsFactory) {
|
|
@@ -8368,17 +10340,18 @@ const fdc3Factory = () => {
|
|
|
8368
10340
|
return ioc.fdc3;
|
|
8369
10341
|
};
|
|
8370
10342
|
|
|
8371
|
-
var version = "2.
|
|
10343
|
+
var version = "2.6.0";
|
|
8372
10344
|
|
|
8373
|
-
|
|
8374
|
-
|
|
10345
|
+
const globalScope = typeof process !== "undefined" ? process : window;
|
|
10346
|
+
globalScope.fdc3Info = {
|
|
8375
10347
|
provider: "io.Connect",
|
|
8376
10348
|
providerVersion: version,
|
|
8377
|
-
standardVersion: "2.
|
|
10349
|
+
standardVersion: "2.2"
|
|
8378
10350
|
};
|
|
10351
|
+
let globalFdc3 = globalScope.fdc3;
|
|
8379
10352
|
if (typeof globalFdc3 === "undefined") {
|
|
8380
10353
|
globalFdc3 = fdc3Factory();
|
|
8381
|
-
|
|
10354
|
+
globalScope.fdc3 = globalFdc3;
|
|
8382
10355
|
}
|
|
8383
10356
|
else {
|
|
8384
10357
|
console.warn("Defaulting to using the auto-injected fdc3.");
|