@interopio/fdc3 2.7.1-beta.0 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/fdc3.umd.js CHANGED
@@ -232,10 +232,10 @@
232
232
  var type = TypeError;
233
233
 
234
234
  /** @type {import('./gOPD')} */
235
- var gOPD$6 = Object.getOwnPropertyDescriptor;
235
+ var gOPD$5 = Object.getOwnPropertyDescriptor;
236
236
 
237
237
  /** @type {import('.')} */
238
- var $gOPD$2 = gOPD$6;
238
+ var $gOPD$2 = gOPD$5;
239
239
 
240
240
  if ($gOPD$2) {
241
241
  try {
@@ -370,7 +370,7 @@
370
370
 
371
371
  var defineProperties_1 = defineProperties$1;
372
372
 
373
- var callBind$7 = {exports: {}};
373
+ var callBind$6 = {exports: {}};
374
374
 
375
375
  /** @type {import('.')} */
376
376
  var esObjectAtoms = Object;
@@ -647,16 +647,16 @@
647
647
  /** @type {import('./reflectApply')} */
648
648
  var reflectApply$1 = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
649
649
 
650
- var bind$4 = requireFunctionBind();
650
+ var bind$3 = requireFunctionBind();
651
651
 
652
652
  var $apply$2 = requireFunctionApply();
653
653
  var $call$2 = requireFunctionCall();
654
654
  var $reflectApply = reflectApply$1;
655
655
 
656
656
  /** @type {import('./actualApply')} */
657
- var actualApply$1 = $reflectApply || bind$4.call($call$2, $apply$2);
657
+ var actualApply$1 = $reflectApply || bind$3.call($call$2, $apply$2);
658
658
 
659
- var bind$3 = requireFunctionBind();
659
+ var bind$2 = requireFunctionBind();
660
660
  var $TypeError$a = type;
661
661
 
662
662
  var $call$1 = requireFunctionCall();
@@ -667,70 +667,97 @@
667
667
  if (args.length < 1 || typeof args[0] !== 'function') {
668
668
  throw new $TypeError$a('a function is required');
669
669
  }
670
- return $actualApply(bind$3, $call$1, args);
670
+ return $actualApply(bind$2, $call$1, args);
671
671
  };
672
672
 
673
- var callBind$6 = callBindApplyHelpers;
674
- var gOPD$5 = gopd$1;
673
+ var get;
674
+ var hasRequiredGet;
675
675
 
676
- var hasProtoAccessor;
677
- try {
678
- // eslint-disable-next-line no-extra-parens, no-proto
679
- hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;
680
- } catch (e) {
681
- if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {
682
- throw e;
676
+ function requireGet () {
677
+ if (hasRequiredGet) return get;
678
+ hasRequiredGet = 1;
679
+
680
+ var callBind = callBindApplyHelpers;
681
+ var gOPD = gopd$1;
682
+
683
+ var hasProtoAccessor;
684
+ try {
685
+ // eslint-disable-next-line no-extra-parens, no-proto
686
+ hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;
687
+ } catch (e) {
688
+ if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {
689
+ throw e;
690
+ }
683
691
  }
684
- }
685
692
 
686
- // eslint-disable-next-line no-extra-parens
687
- var desc = !!hasProtoAccessor && gOPD$5 && gOPD$5(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
693
+ // eslint-disable-next-line no-extra-parens
694
+ var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
688
695
 
689
- var $Object$3 = Object;
690
- var $getPrototypeOf = $Object$3.getPrototypeOf;
696
+ var $Object = Object;
697
+ var $getPrototypeOf = $Object.getPrototypeOf;
691
698
 
692
- /** @type {import('./get')} */
693
- var get = desc && typeof desc.get === 'function'
694
- ? callBind$6([desc.get])
695
- : typeof $getPrototypeOf === 'function'
696
- ? /** @type {import('./get')} */ function getDunder(value) {
697
- // eslint-disable-next-line eqeqeq
698
- return $getPrototypeOf(value == null ? value : $Object$3(value));
699
- }
700
- : false;
699
+ /** @type {import('./get')} */
700
+ get = desc && typeof desc.get === 'function'
701
+ ? callBind([desc.get])
702
+ : typeof $getPrototypeOf === 'function'
703
+ ? /** @type {import('./get')} */ function getDunder(value) {
704
+ // eslint-disable-next-line eqeqeq
705
+ return $getPrototypeOf(value == null ? value : $Object(value));
706
+ }
707
+ : false;
708
+ return get;
709
+ }
701
710
 
702
- var reflectGetProto = requireReflect_getPrototypeOf();
703
- var originalGetProto = requireObject_getPrototypeOf();
711
+ var getProto$3;
712
+ var hasRequiredGetProto;
704
713
 
705
- var getDunderProto = get;
714
+ function requireGetProto () {
715
+ if (hasRequiredGetProto) return getProto$3;
716
+ hasRequiredGetProto = 1;
706
717
 
707
- /** @type {import('.')} */
708
- var getProto$3 = reflectGetProto
709
- ? function getProto(O) {
710
- // @ts-expect-error TS can't narrow inside a closure, for some reason
711
- return reflectGetProto(O);
712
- }
713
- : originalGetProto
718
+ var reflectGetProto = requireReflect_getPrototypeOf();
719
+ var originalGetProto = requireObject_getPrototypeOf();
720
+
721
+ var getDunderProto = requireGet();
722
+
723
+ /** @type {import('.')} */
724
+ getProto$3 = reflectGetProto
714
725
  ? function getProto(O) {
715
- if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
716
- throw new TypeError('getProto: not an object');
717
- }
718
726
  // @ts-expect-error TS can't narrow inside a closure, for some reason
719
- return originalGetProto(O);
727
+ return reflectGetProto(O);
720
728
  }
721
- : getDunderProto
729
+ : originalGetProto
722
730
  ? function getProto(O) {
731
+ if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
732
+ throw new TypeError('getProto: not an object');
733
+ }
723
734
  // @ts-expect-error TS can't narrow inside a closure, for some reason
724
- return getDunderProto(O);
735
+ return originalGetProto(O);
725
736
  }
726
- : null;
737
+ : getDunderProto
738
+ ? function getProto(O) {
739
+ // @ts-expect-error TS can't narrow inside a closure, for some reason
740
+ return getDunderProto(O);
741
+ }
742
+ : null;
743
+ return getProto$3;
744
+ }
727
745
 
728
- var call = Function.prototype.call;
729
- var $hasOwn = Object.prototype.hasOwnProperty;
730
- var bind$2 = requireFunctionBind();
746
+ var hasown;
747
+ var hasRequiredHasown;
731
748
 
732
- /** @type {import('.')} */
733
- var hasown = bind$2.call(call, $hasOwn);
749
+ function requireHasown () {
750
+ if (hasRequiredHasown) return hasown;
751
+ hasRequiredHasown = 1;
752
+
753
+ var call = Function.prototype.call;
754
+ var $hasOwn = Object.prototype.hasOwnProperty;
755
+ var bind = requireFunctionBind();
756
+
757
+ /** @type {import('.')} */
758
+ hasown = bind.call(call, $hasOwn);
759
+ return hasown;
760
+ }
734
761
 
735
762
  var undefined$1;
736
763
 
@@ -786,7 +813,7 @@
786
813
 
787
814
  var hasSymbols$2 = hasSymbols$3();
788
815
 
789
- var getProto$2 = getProto$3;
816
+ var getProto$2 = requireGetProto();
790
817
  var $ObjectGPO = requireObject_getPrototypeOf();
791
818
  var $ReflectGPO = requireReflect_getPrototypeOf();
792
819
 
@@ -973,7 +1000,7 @@
973
1000
  };
974
1001
 
975
1002
  var bind$1 = requireFunctionBind();
976
- var hasOwn$3 = hasown;
1003
+ var hasOwn$3 = requireHasown();
977
1004
  var $concat$1 = bind$1.call($call, Array.prototype.concat);
978
1005
  var $spliceApply = bind$1.call($apply$1, Array.prototype.splice);
979
1006
  var $replace$1 = bind$1.call($call, String.prototype.replace);
@@ -1183,9 +1210,9 @@
1183
1210
  } else {
1184
1211
  module.exports.apply = applyBind$1;
1185
1212
  }
1186
- } (callBind$7));
1213
+ } (callBind$6));
1187
1214
 
1188
- var callBindExports = callBind$7.exports;
1215
+ var callBindExports = callBind$6.exports;
1189
1216
 
1190
1217
  var GetIntrinsic$7 = getIntrinsic;
1191
1218
 
@@ -1195,7 +1222,7 @@
1195
1222
  var $indexOf$2 = callBindBasic([GetIntrinsic$7('%String.prototype.indexOf%')]);
1196
1223
 
1197
1224
  /** @type {import('.')} */
1198
- var callBound$i = function callBoundIntrinsic(name, allowMissing) {
1225
+ var callBound$h = function callBoundIntrinsic(name, allowMissing) {
1199
1226
  /* eslint no-extra-parens: 0 */
1200
1227
 
1201
1228
  var intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */ (GetIntrinsic$7(name, !!allowMissing));
@@ -1208,10 +1235,10 @@
1208
1235
  // modified from https://github.com/es-shims/es6-shim
1209
1236
  var objectKeys$1 = objectKeys$2;
1210
1237
  var hasSymbols$1 = requireShams$1()();
1211
- var callBound$h = callBound$i;
1238
+ var callBound$g = callBound$h;
1212
1239
  var $Object$1 = esObjectAtoms;
1213
- var $push = callBound$h('Array.prototype.push');
1214
- var $propIsEnumerable = callBound$h('Object.prototype.propertyIsEnumerable');
1240
+ var $push = callBound$g('Array.prototype.push');
1241
+ var $propIsEnumerable = callBound$g('Object.prototype.propertyIsEnumerable');
1215
1242
  var originalGetSymbols = hasSymbols$1 ? $Object$1.getOwnPropertySymbols : null;
1216
1243
 
1217
1244
  // eslint-disable-next-line no-unused-vars
@@ -1344,7 +1371,7 @@
1344
1371
 
1345
1372
  var $indexOf$1 = callBind$4(GetIntrinsic$6('String.prototype.indexOf'));
1346
1373
 
1347
- var callBound$g = function callBoundIntrinsic(name, allowMissing) {
1374
+ var callBound$f = function callBoundIntrinsic(name, allowMissing) {
1348
1375
  var intrinsic = GetIntrinsic$6(name, !!allowMissing);
1349
1376
  if (typeof intrinsic === 'function' && $indexOf$1(name, '.prototype.') > -1) {
1350
1377
  return callBind$4(intrinsic);
@@ -1484,7 +1511,7 @@
1484
1511
  var gOPD$2 = gopd$1;
1485
1512
  var defineProperty = Object.defineProperty;
1486
1513
  var $TypeError$5 = esErrors;
1487
- var getProto$1 = getProto$3;
1514
+ var getProto$1 = requireGetProto();
1488
1515
  var regex = /a/;
1489
1516
 
1490
1517
  var shim$3 = function shimFlags() {
@@ -1539,22 +1566,22 @@
1539
1566
  return shams;
1540
1567
  }
1541
1568
 
1542
- var hasToStringTag$7 = requireShams()();
1543
- var callBound$f = callBound$i;
1569
+ var hasToStringTag$6 = requireShams()();
1570
+ var callBound$e = callBound$h;
1544
1571
 
1545
- var $toString$7 = callBound$f('Object.prototype.toString');
1572
+ var $toString$6 = callBound$e('Object.prototype.toString');
1546
1573
 
1547
1574
  /** @type {import('.')} */
1548
1575
  var isStandardArguments = function isArguments(value) {
1549
1576
  if (
1550
- hasToStringTag$7
1577
+ hasToStringTag$6
1551
1578
  && value
1552
1579
  && typeof value === 'object'
1553
1580
  && Symbol.toStringTag in value
1554
1581
  ) {
1555
1582
  return false;
1556
1583
  }
1557
- return $toString$7(value) === '[object Arguments]';
1584
+ return $toString$6(value) === '[object Arguments]';
1558
1585
  };
1559
1586
 
1560
1587
  /** @type {import('.')} */
@@ -1567,9 +1594,9 @@
1567
1594
  && 'length' in value
1568
1595
  && typeof value.length === 'number'
1569
1596
  && value.length >= 0
1570
- && $toString$7(value) !== '[object Array]'
1597
+ && $toString$6(value) !== '[object Array]'
1571
1598
  && 'callee' in value
1572
- && $toString$7(value.callee) === '[object Function]';
1599
+ && $toString$6(value.callee) === '[object Function]';
1573
1600
  };
1574
1601
 
1575
1602
  var supportsStandardArguments = (function () {
@@ -2249,22 +2276,22 @@
2249
2276
  };
2250
2277
 
2251
2278
  var GetIntrinsic$5 = getIntrinsic;
2252
- var callBound$e = callBound$i;
2279
+ var callBound$d = callBound$h;
2253
2280
  var inspect$2 = objectInspect;
2254
2281
 
2255
2282
  var $TypeError$3 = type;
2256
2283
  var $Map$3 = GetIntrinsic$5('%Map%', true);
2257
2284
 
2258
2285
  /** @type {<K, V>(thisArg: Map<K, V>, key: K) => V} */
2259
- var $mapGet$1 = callBound$e('Map.prototype.get', true);
2286
+ var $mapGet$1 = callBound$d('Map.prototype.get', true);
2260
2287
  /** @type {<K, V>(thisArg: Map<K, V>, key: K, value: V) => void} */
2261
- var $mapSet = callBound$e('Map.prototype.set', true);
2288
+ var $mapSet = callBound$d('Map.prototype.set', true);
2262
2289
  /** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
2263
- var $mapHas$5 = callBound$e('Map.prototype.has', true);
2290
+ var $mapHas$5 = callBound$d('Map.prototype.has', true);
2264
2291
  /** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
2265
- var $mapDelete = callBound$e('Map.prototype.delete', true);
2292
+ var $mapDelete = callBound$d('Map.prototype.delete', true);
2266
2293
  /** @type {<K, V>(thisArg: Map<K, V>) => number} */
2267
- var $mapSize$1 = callBound$e('Map.prototype.size', true);
2294
+ var $mapSize$1 = callBound$d('Map.prototype.size', true);
2268
2295
 
2269
2296
  /** @type {import('.')} */
2270
2297
  var sideChannelMap = !!$Map$3 && /** @type {Exclude<import('.'), false>} */ function getSideChannelMap() {
@@ -2316,7 +2343,7 @@
2316
2343
  };
2317
2344
 
2318
2345
  var GetIntrinsic$4 = getIntrinsic;
2319
- var callBound$d = callBound$i;
2346
+ var callBound$c = callBound$h;
2320
2347
  var inspect$1 = objectInspect;
2321
2348
  var getSideChannelMap$1 = sideChannelMap;
2322
2349
 
@@ -2324,13 +2351,13 @@
2324
2351
  var $WeakMap$1 = GetIntrinsic$4('%WeakMap%', true);
2325
2352
 
2326
2353
  /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => V} */
2327
- var $weakMapGet = callBound$d('WeakMap.prototype.get', true);
2354
+ var $weakMapGet = callBound$c('WeakMap.prototype.get', true);
2328
2355
  /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K, value: V) => void} */
2329
- var $weakMapSet = callBound$d('WeakMap.prototype.set', true);
2356
+ var $weakMapSet = callBound$c('WeakMap.prototype.set', true);
2330
2357
  /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
2331
- var $weakMapHas = callBound$d('WeakMap.prototype.has', true);
2358
+ var $weakMapHas = callBound$c('WeakMap.prototype.has', true);
2332
2359
  /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
2333
- var $weakMapDelete = callBound$d('WeakMap.prototype.delete', true);
2360
+ var $weakMapDelete = callBound$c('WeakMap.prototype.delete', true);
2334
2361
 
2335
2362
  /** @type {import('.')} */
2336
2363
  var sideChannelWeakmap = $WeakMap$1
@@ -2443,7 +2470,7 @@
2443
2470
  /** @typedef {`$${import('.').InternalSlot}`} SaltedInternalSlot */
2444
2471
  /** @typedef {{ [k in SaltedInternalSlot]?: unknown }} SlotsObject */
2445
2472
 
2446
- var hasOwn$1 = hasown;
2473
+ var hasOwn$1 = requireHasown();
2447
2474
  /** @type {import('side-channel').Channel<object, SlotsObject>} */
2448
2475
  var channel = sideChannel();
2449
2476
 
@@ -2559,35 +2586,44 @@
2559
2586
  return toString.call(arr) == '[object Array]';
2560
2587
  };
2561
2588
 
2562
- var callBound$c = callBound$i;
2589
+ var isString$2;
2590
+ var hasRequiredIsString;
2563
2591
 
2564
- /** @type {(receiver: ThisParameterType<typeof String.prototype.valueOf>, ...args: Parameters<typeof String.prototype.valueOf>) => ReturnType<typeof String.prototype.valueOf>} */
2565
- var $strValueOf = callBound$c('String.prototype.valueOf');
2592
+ function requireIsString () {
2593
+ if (hasRequiredIsString) return isString$2;
2594
+ hasRequiredIsString = 1;
2566
2595
 
2567
- /** @type {import('.')} */
2568
- var tryStringObject = function tryStringObject(value) {
2569
- try {
2570
- $strValueOf(value);
2571
- return true;
2572
- } catch (e) {
2573
- return false;
2574
- }
2575
- };
2576
- /** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
2577
- var $toString$6 = callBound$c('Object.prototype.toString');
2578
- var strClass = '[object String]';
2579
- var hasToStringTag$6 = requireShams()();
2596
+ var callBound = callBound$h;
2580
2597
 
2581
- /** @type {import('.')} */
2582
- var isString$2 = function isString(value) {
2583
- if (typeof value === 'string') {
2584
- return true;
2585
- }
2586
- if (!value || typeof value !== 'object') {
2587
- return false;
2588
- }
2589
- return hasToStringTag$6 ? tryStringObject(value) : $toString$6(value) === strClass;
2590
- };
2598
+ /** @type {(receiver: ThisParameterType<typeof String.prototype.valueOf>, ...args: Parameters<typeof String.prototype.valueOf>) => ReturnType<typeof String.prototype.valueOf>} */
2599
+ var $strValueOf = callBound('String.prototype.valueOf');
2600
+
2601
+ /** @type {import('.')} */
2602
+ var tryStringObject = function tryStringObject(value) {
2603
+ try {
2604
+ $strValueOf(value);
2605
+ return true;
2606
+ } catch (e) {
2607
+ return false;
2608
+ }
2609
+ };
2610
+ /** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
2611
+ var $toString = callBound('Object.prototype.toString');
2612
+ var strClass = '[object String]';
2613
+ var hasToStringTag = requireShams()();
2614
+
2615
+ /** @type {import('.')} */
2616
+ isString$2 = function isString(value) {
2617
+ if (typeof value === 'string') {
2618
+ return true;
2619
+ }
2620
+ if (!value || typeof value !== 'object') {
2621
+ return false;
2622
+ }
2623
+ return hasToStringTag ? tryStringObject(value) : $toString(value) === strClass;
2624
+ };
2625
+ return isString$2;
2626
+ }
2591
2627
 
2592
2628
  /** @const */
2593
2629
  var $Map$2 = typeof Map === 'function' && Map.prototype ? Map : null;
@@ -2715,11 +2751,11 @@
2715
2751
  } else {
2716
2752
  // Symbol is not available, native or shammed
2717
2753
  var isArray$2 = isarray;
2718
- var isString$1 = isString$2;
2754
+ var isString$1 = requireIsString();
2719
2755
  var GetIntrinsic$3 = getIntrinsic;
2720
2756
  var $Map = GetIntrinsic$3('%Map%', true);
2721
2757
  var $Set$1 = GetIntrinsic$3('%Set%', true);
2722
- var callBound$b = callBound$g;
2758
+ var callBound$b = callBound$f;
2723
2759
  var $arrayPush = callBound$b('Array.prototype.push');
2724
2760
  var $charCodeAt = callBound$b('String.prototype.charCodeAt');
2725
2761
  var $stringSlice = callBound$b('String.prototype.slice');
@@ -2924,7 +2960,7 @@
2924
2960
  var objectIs = polyfill;
2925
2961
 
2926
2962
  var callBind$1 = callBindExports;
2927
- var callBound$a = callBound$i;
2963
+ var callBound$a = callBound$h;
2928
2964
  var GetIntrinsic$2 = getIntrinsic;
2929
2965
 
2930
2966
  var $ArrayBuffer = GetIntrinsic$2('%ArrayBuffer%', true);
@@ -2965,7 +3001,7 @@
2965
3001
  return false;
2966
3002
  };
2967
3003
 
2968
- var callBound$9 = callBound$i;
3004
+ var callBound$9 = callBound$h;
2969
3005
 
2970
3006
  var getDay = callBound$9('Date.prototype.getDay');
2971
3007
  /** @type {import('.')} */
@@ -2991,9 +3027,9 @@
2991
3027
  return hasToStringTag$5 ? tryDateObject(value) : toStr$2(value) === dateClass;
2992
3028
  };
2993
3029
 
2994
- var callBound$8 = callBound$i;
3030
+ var callBound$8 = callBound$h;
2995
3031
  var hasToStringTag$4 = requireShams()();
2996
- var hasOwn = hasown;
3032
+ var hasOwn = requireHasown();
2997
3033
  var gOPD$1 = gopd$1;
2998
3034
 
2999
3035
  /** @type {import('.')} */
@@ -3059,7 +3095,7 @@
3059
3095
 
3060
3096
  var isRegex$1 = fn;
3061
3097
 
3062
- var callBound$7 = callBound$i;
3098
+ var callBound$7 = callBound$h;
3063
3099
 
3064
3100
  /** @type {undefined | ((thisArg: SharedArrayBuffer) => number)} */
3065
3101
  var $byteLength$1 = callBound$7('SharedArrayBuffer.prototype.byteLength', true);
@@ -3082,7 +3118,7 @@
3082
3118
  return false;
3083
3119
  };
3084
3120
 
3085
- var callBound$6 = callBound$i;
3121
+ var callBound$6 = callBound$h;
3086
3122
 
3087
3123
  var $numToStr = callBound$6('Number.prototype.toString');
3088
3124
 
@@ -3110,7 +3146,7 @@
3110
3146
  return hasToStringTag$3 ? tryNumberObject(value) : $toString$3(value) === numClass;
3111
3147
  };
3112
3148
 
3113
- var callBound$5 = callBound$i;
3149
+ var callBound$5 = callBound$h;
3114
3150
  var $boolToStr = callBound$5('Boolean.prototype.toString');
3115
3151
  var $toString$2 = callBound$5('Object.prototype.toString');
3116
3152
 
@@ -3146,7 +3182,7 @@
3146
3182
  if (hasRequiredSafeRegexTest) return safeRegexTest$1;
3147
3183
  hasRequiredSafeRegexTest = 1;
3148
3184
 
3149
- var callBound = callBound$i;
3185
+ var callBound = callBound$h;
3150
3186
  var isRegex = isRegex$1;
3151
3187
 
3152
3188
  var $exec = callBound('RegExp.prototype.exec');
@@ -3164,7 +3200,7 @@
3164
3200
  return safeRegexTest$1;
3165
3201
  }
3166
3202
 
3167
- var callBound$4 = callBound$i;
3203
+ var callBound$4 = callBound$h;
3168
3204
  var $toString$1 = callBound$4('Object.prototype.toString');
3169
3205
  var hasSymbols = hasSymbols$3();
3170
3206
  var safeRegexTest = requireSafeRegexTest();
@@ -3259,7 +3295,7 @@
3259
3295
 
3260
3296
  var isBigintExports = isBigint.exports;
3261
3297
 
3262
- var isString = isString$2;
3298
+ var isString = requireIsString();
3263
3299
  var isNumber = isNumberObject;
3264
3300
  var isBoolean = isBooleanObject;
3265
3301
  var isSymbol = isSymbolExports;
@@ -3337,7 +3373,7 @@
3337
3373
  var isWeakset = {exports: {}};
3338
3374
 
3339
3375
  var GetIntrinsic$1 = getIntrinsic;
3340
- var callBound$3 = callBound$i;
3376
+ var callBound$3 = callBound$h;
3341
3377
 
3342
3378
  var $WeakSet = GetIntrinsic$1('%WeakSet%', true);
3343
3379
 
@@ -3607,9 +3643,9 @@
3607
3643
  var forEach = forEach$1;
3608
3644
  var availableTypedArrays = availableTypedArrays$1;
3609
3645
  var callBind = callBindExports;
3610
- var callBound$2 = callBound$i;
3646
+ var callBound$2 = callBound$h;
3611
3647
  var gOPD = gopd$1;
3612
- var getProto = getProto$3;
3648
+ var getProto = requireGetProto();
3613
3649
 
3614
3650
  var $toString = callBound$2('Object.prototype.toString');
3615
3651
  var hasToStringTag = requireShams()();
@@ -3720,7 +3756,7 @@
3720
3756
  return tryTypedArrays(value);
3721
3757
  };
3722
3758
 
3723
- var callBound$1 = callBound$i;
3759
+ var callBound$1 = callBound$h;
3724
3760
  var $byteLength = callBound$1('ArrayBuffer.prototype.byteLength', true);
3725
3761
 
3726
3762
  var isArrayBuffer$1 = isArrayBuffer$2;
@@ -3734,7 +3770,7 @@
3734
3770
  }; // in node < 0.11, byteLength is an own nonconfigurable property
3735
3771
 
3736
3772
  var assign = object_assign;
3737
- var callBound = callBound$g;
3773
+ var callBound = callBound$f;
3738
3774
  var flags = regexp_prototype_flags;
3739
3775
  var GetIntrinsic = getIntrinsic;
3740
3776
  var getIterator = esGetIteratorExports;
@@ -5348,7 +5384,7 @@
5348
5384
  })(ChannelTypes || (ChannelTypes = {}));
5349
5385
  const defaultChannelsProps = ["id", "type", "broadcast", "addContextListener", "getCurrentContext"];
5350
5386
  const defaultContextProps = ["type"];
5351
- const defaultGlue42APIs = ["contexts", "channels", "interop", "intents", "appManager", "windows"];
5387
+ const defaultGlue42APIs = ["contexts", "channels", "interop", "intents", "windows"];
5352
5388
  const glueChannelNamePrefix = "___channel___";
5353
5389
  const fdc3NothingContextType = "fdc3.nothing";
5354
5390
  const RaiseTimeoutMs = 75 * 1000;
@@ -6265,22 +6301,50 @@
6265
6301
  if (missingApis.length) {
6266
6302
  return { isValid: false, error: { message: `Fdc3 cannot initialize correctly - Glue is missing the following ${missingApis.length > 1 ? "properties" : "property"}: ${missingApis.join(", ")}` } };
6267
6303
  }
6304
+ if (typeof glue.apps !== "object" && typeof glue.appManager !== "object") {
6305
+ return { isValid: false, error: { message: "Glue should be initialized with either 'apps' or 'appManager' API" } };
6306
+ }
6268
6307
  return { isValid: true };
6269
6308
  }
6270
6309
  interopInstance() {
6271
6310
  return this.glue.interop.instance;
6272
6311
  }
6273
- getApplication(name) {
6274
- return this.glue.appManager.application(name);
6312
+ async getApplication(name) {
6313
+ const isAppsAPIAvailable = this.isAppsAPIAvailable();
6314
+ if (!isAppsAPIAvailable) {
6315
+ return this.glue.appManager.application(name);
6316
+ }
6317
+ const app = await this.glue.apps.registry.get({ name });
6318
+ return app ?? undefined;
6275
6319
  }
6276
- getAllAppManagerInstances() {
6277
- return this.glue.appManager.instances();
6320
+ async getApplicationInstances(appName) {
6321
+ const isAppsAPIAvailable = this.isAppsAPIAvailable();
6322
+ if (!isAppsAPIAvailable) {
6323
+ return this.glue.appManager.instances().filter(inst => inst.application.name === appName);
6324
+ }
6325
+ const appInstances = await this.glue.apps.instances.getMany({ appNames: [appName] });
6326
+ return appInstances;
6278
6327
  }
6279
- getApplicationInstances(appName) {
6280
- return this.getAllAppManagerInstances().filter(inst => inst.application.name === appName);
6328
+ async getAppInstanceById(id) {
6329
+ const isAppsAPIAvailable = this.isAppsAPIAvailable();
6330
+ if (!isAppsAPIAvailable) {
6331
+ return this.glue.appManager.instances().find(inst => inst.id === id);
6332
+ }
6333
+ const appInstance = await this.glue.apps.instances.get({ id });
6334
+ return appInstance ?? undefined;
6281
6335
  }
6282
- getAppInstanceById(id) {
6283
- return this.getAllAppManagerInstances().find(inst => inst.id === id);
6336
+ async startApplication({ app, context, waitForInstanceReady }) {
6337
+ const isAppsAPIAvailable = this.isAppsAPIAvailable();
6338
+ if (!isAppsAPIAvailable) {
6339
+ const glueInst = await app.start(context, { waitForAGMReady: waitForInstanceReady });
6340
+ return glueInst;
6341
+ }
6342
+ const glueInstance = await this.glue.apps.instances.start({ name: app.name, context });
6343
+ if (!waitForInstanceReady) {
6344
+ return glueInstance;
6345
+ }
6346
+ await this.glue.apps?.instances.waitForReady({ id: glueInstance.id });
6347
+ return glueInstance;
6284
6348
  }
6285
6349
  async findIntents(intentFilter) {
6286
6350
  return this.glue.intents.find(intentFilter);
@@ -6404,8 +6468,15 @@
6404
6468
  getGlueVersion() {
6405
6469
  return this.glue?.version;
6406
6470
  }
6407
- registerOnInstanceStopped(cb) {
6408
- return this.glue.appManager.onInstanceStopped(cb);
6471
+ async registerOnInstanceStopped(callback) {
6472
+ const isAppsAPIAvailable = this.isAppsAPIAvailable();
6473
+ if (!isAppsAPIAvailable) {
6474
+ return this.glue.appManager.onInstanceStopped((inst) => callback(inst.id));
6475
+ }
6476
+ const unsub = await this.glue.apps.instances.onStopped((event) => {
6477
+ callback(event.instance.id);
6478
+ });
6479
+ return unsub;
6409
6480
  }
6410
6481
  async unregisterMethod(methodName) {
6411
6482
  return this.glue.interop.unregister(methodName);
@@ -6567,6 +6638,9 @@
6567
6638
  async contextsSetPaths(name, paths) {
6568
6639
  await this.glue.contexts.setPaths(name, paths);
6569
6640
  }
6641
+ isAppsAPIAvailable() {
6642
+ return typeof this.glue.apps === "object";
6643
+ }
6570
6644
  }
6571
6645
 
6572
6646
  const GLUE42_EVENT_NAME = "Glue42";
@@ -8600,10 +8674,11 @@
8600
8674
  throw new Error(ResolveError.NoAppsFound);
8601
8675
  }
8602
8676
  this.logger?.info(`[${commandId}] - parsing glue intents to fdc3 intents and returning`);
8603
- return glueIntents.map((glueIntent) => {
8677
+ const appIntents = await Promise.all(glueIntents.map((glueIntent) => {
8604
8678
  const intentWithFilteredHandlers = this.getGlueIntentWithFilteredHandlers(glueIntent, { contextType: context.type, resultType });
8605
8679
  return this.convertGlue42IntentToFDC3Intent(intentWithFilteredHandlers);
8606
- });
8680
+ }));
8681
+ return appIntents;
8607
8682
  }
8608
8683
  async raiseIntent({ commandId, intent, context, target }) {
8609
8684
  await this.glueController.gluePromise;
@@ -8615,7 +8690,7 @@
8615
8690
  throw new Error(ResolveError.NoAppsFound);
8616
8691
  }
8617
8692
  if (!target) {
8618
- const filteredGlueIntent = this.filterGlueIntentHandlers({ commandId, intent: searchedGlueIntent, context, target });
8693
+ const filteredGlueIntent = await this.filterGlueIntentHandlers({ commandId, intent: searchedGlueIntent, context, target });
8619
8694
  this.logger?.info(`[${commandId}] - raising intent ${intent} with contextType ${context.type} and handlers ${filteredGlueIntent.handlers.map(h => h.applicationName && h.instanceId)}`);
8620
8695
  return this.invokeRaiseIntent(commandId, { intent, context: glueContext, handlers: filteredGlueIntent.handlers });
8621
8696
  }
@@ -8721,7 +8796,7 @@
8721
8796
  handler: rememberedHandlerWithFilter.handler
8722
8797
  };
8723
8798
  }
8724
- filterGlueIntentHandlers({ commandId, intent, context, target }) {
8799
+ async filterGlueIntentHandlers({ commandId, intent, context, target }) {
8725
8800
  let filteredGlueIntent;
8726
8801
  filteredGlueIntent = this.filterIntentHandlersByContext(intent, context);
8727
8802
  if (!target) {
@@ -8729,14 +8804,14 @@
8729
8804
  return filteredGlueIntent;
8730
8805
  }
8731
8806
  this.logger?.log(`[${commandId}] - filtering handlers by target (${JSON.stringify(target)}) for intent ${intent.name}`);
8732
- filteredGlueIntent = this.filterIntentHandlersByTarget({ intent, target, commandId });
8807
+ filteredGlueIntent = await this.filterIntentHandlersByTarget({ intent, target, commandId });
8733
8808
  return filteredGlueIntent;
8734
8809
  }
8735
- filterIntentHandlersByTarget({ intent, target, commandId }) {
8810
+ async filterIntentHandlersByTarget({ intent, target, commandId }) {
8736
8811
  const appName = typeof target === "string" ? target : target.appId;
8737
8812
  const instanceId = typeof target === "string" ? undefined : target.instanceId;
8738
8813
  this.logger?.info(`[${commandId}] - Checking if application with name ${appName} exists`);
8739
- const app = this.glueController.getApplication(appName);
8814
+ const app = await this.glueController.getApplication(appName);
8740
8815
  const serverInstances = this.serverInstanceAsIntentHandler(intent.name);
8741
8816
  if (!app && (typeof target === "string" || !target.instanceId || !serverInstances.length)) {
8742
8817
  throw new Error(ResolveError.TargetAppUnavailable);
@@ -8816,27 +8891,28 @@
8816
8891
  this.logger?.info(`[${commandId}] - returning private channel`);
8817
8892
  return channel.toApi();
8818
8893
  }
8819
- convertGlue42IntentToFDC3Intent(glueIntent) {
8894
+ async convertGlue42IntentToFDC3Intent(glueIntent) {
8820
8895
  const { name, handlers } = glueIntent;
8896
+ const apps = await Promise.all(handlers.map(async (handler) => {
8897
+ const appName = handler.applicationName;
8898
+ const app = await this.glueController.getApplication(appName);
8899
+ const icons = (handler.applicationIcon ? [handler.applicationIcon, ...(app?.userProperties.icons ?? [])] : (app?.userProperties.icons ?? [])).filter((icon) => !!icon).map((icon) => ({ src: icon }));
8900
+ const images = (app?.userProperties.images ?? []).filter((image) => !!image).map((image) => ({ src: image }));
8901
+ return {
8902
+ appId: appName,
8903
+ instanceId: handler.instanceId,
8904
+ name: appName,
8905
+ title: handler.applicationTitle || handler.instanceTitle || appName,
8906
+ tooltip: app?.userProperties.tooltip ?? `${appName} (${handler.type})`,
8907
+ description: handler.applicationDescription,
8908
+ icons,
8909
+ images,
8910
+ resultType: handler.resultType
8911
+ };
8912
+ }));
8821
8913
  const appIntent = {
8822
8914
  intent: { name, displayName: handlers[0].displayName || "" },
8823
- apps: handlers.map((handler) => {
8824
- const appName = handler.applicationName;
8825
- const app = this.glueController.getApplication(appName);
8826
- const icons = (handler.applicationIcon ? [handler.applicationIcon, ...(app?.userProperties.icons ?? [])] : (app?.userProperties.icons ?? [])).filter((icon) => !!icon).map((icon) => ({ src: icon }));
8827
- const images = (app?.userProperties.images ?? []).filter((image) => !!image).map((image) => ({ src: image }));
8828
- return {
8829
- appId: appName,
8830
- instanceId: handler.instanceId,
8831
- name: appName,
8832
- title: handler.applicationTitle || handler.instanceTitle || appName,
8833
- tooltip: app?.userProperties.tooltip ?? `${appName} (${handler.type})`,
8834
- description: handler.applicationDescription,
8835
- icons,
8836
- images,
8837
- resultType: handler.resultType
8838
- };
8839
- })
8915
+ apps
8840
8916
  };
8841
8917
  return appIntent;
8842
8918
  }
@@ -8949,7 +9025,7 @@
8949
9025
  await this.glueController.gluePromise;
8950
9026
  this.logger?.log(`[${commandId}] - open() invoked with target ${JSON.stringify(target)} ${context ? `and contextType ${context.type}` : ""}`);
8951
9027
  const name = typeof target === "object" ? target.appId : target;
8952
- const app = this.glueController.getApplication(name);
9028
+ const app = await this.glueController.getApplication(name);
8953
9029
  if (!app) {
8954
9030
  throw new Error(OpenError.AppNotFound);
8955
9031
  }
@@ -8960,8 +9036,7 @@
8960
9036
  }
8961
9037
  try {
8962
9038
  this.logger?.info(`[${commandId}] - opening app '${app.name}' without context`);
8963
- const inBrowser = this.glueController.isRunningInBrowser();
8964
- const glueInst = await app.start(undefined, { waitForAGMReady: !inBrowser });
9039
+ const glueInst = await this.glueController.startApplication({ app, waitForInstanceReady: !this.glueController.isRunningInBrowser() });
8965
9040
  this.logger?.info(`[${commandId}] - instance with id ${glueInst.id} started`);
8966
9041
  return this.parseGlueInstToAppIdentifier(glueInst);
8967
9042
  }
@@ -8973,11 +9048,11 @@
8973
9048
  await this.glueController.gluePromise;
8974
9049
  this.logger?.info(`[${commandId}] - findInstances() invoked with appIdentifier ${JSON.stringify(appIdentifier)}`);
8975
9050
  const { appId } = appIdentifier;
8976
- const app = this.glueController.getApplication(appId);
9051
+ const app = await this.glueController.getApplication(appId);
8977
9052
  if (!app) {
8978
9053
  throw new Error(ResolveError.NoAppsFound);
8979
9054
  }
8980
- const glueInstances = this.glueController.getApplicationInstances(appId);
9055
+ const glueInstances = await this.glueController.getApplicationInstances(appId);
8981
9056
  const fdc3Instances = glueInstances.map(glueInst => this.parseGlueInstToAppIdentifier(glueInst));
8982
9057
  this.logger?.info(`[${commandId}] - ids of opened instances for appIdentifier ${JSON.stringify(appIdentifier)}: ${JSON.stringify(fdc3Instances.map(inst => inst.instanceId))}`);
8983
9058
  return fdc3Instances;
@@ -8986,7 +9061,7 @@
8986
9061
  await this.glueController.gluePromise;
8987
9062
  this.logger?.info(`[${commandId}] - getAppMetadata() invoked with appIdentifier ${JSON.stringify(appIdentifier)}`);
8988
9063
  const { appId, instanceId } = appIdentifier;
8989
- const app = this.glueController.getApplication(appId);
9064
+ const app = await this.glueController.getApplication(appId);
8990
9065
  if (!app) {
8991
9066
  throw new Error(OpenError.AppNotFound);
8992
9067
  }
@@ -8994,7 +9069,7 @@
8994
9069
  this.logger?.info(`[${commandId}] - no opened instances found. Parsing app ${app.name}`);
8995
9070
  return this.parseGlueAppToAppMetadata(app);
8996
9071
  }
8997
- const instance = this.glueController.getAppInstanceById(instanceId);
9072
+ const instance = await this.glueController.getAppInstanceById(instanceId);
8998
9073
  const appMetadata = this.parseGlueAppToAppMetadata(app, instance);
8999
9074
  this.logger?.info(`[${commandId}] - found app metadata: ${appMetadata}`);
9000
9075
  return appMetadata;
@@ -9002,9 +9077,9 @@
9002
9077
  async getInfo({ commandId }) {
9003
9078
  await this.glueController.gluePromise;
9004
9079
  this.logger?.info(`${commandId} - getInfo() invoked`);
9005
- const appMetadata = this.getCurrentAppMetadata();
9080
+ const appMetadata = await this.getCurrentAppMetadata();
9006
9081
  const globalScope = typeof process !== "undefined" ? process : window;
9007
- const { provider, providerVersion, standardVersion } = globalScope.fdc3Info;
9082
+ const { provider, providerVersion, standardVersion } = globalScope.fdc3Info ?? {};
9008
9083
  return {
9009
9084
  provider,
9010
9085
  providerVersion,
@@ -9017,10 +9092,10 @@
9017
9092
  appMetadata
9018
9093
  };
9019
9094
  }
9020
- getCurrentAppMetadata() {
9095
+ async getCurrentAppMetadata() {
9021
9096
  const myInstance = this.glueController.interopInstance();
9022
9097
  const myInstanceApplicationName = myInstance.application ?? myInstance.applicationName;
9023
- const myApp = this.glueController.getApplication(myInstanceApplicationName);
9098
+ const myApp = await this.glueController.getApplication(myInstanceApplicationName);
9024
9099
  if (myApp) {
9025
9100
  return { appId: myApp.name, instanceId: myInstance.instance };
9026
9101
  }
@@ -9029,7 +9104,7 @@
9029
9104
  }
9030
9105
  parseGlueInstToAppIdentifier(glueInst) {
9031
9106
  return {
9032
- appId: glueInst.application.name,
9107
+ appId: this.isApplicationInstance(glueInst) ? glueInst.appName : glueInst.application.name,
9033
9108
  instanceId: glueInst.id
9034
9109
  };
9035
9110
  }
@@ -9048,6 +9123,10 @@
9048
9123
  const icon = inBrowserNamespace
9049
9124
  ? app.icon
9050
9125
  : (await app.getConfiguration()).icon;
9126
+ const desktopScreenshots = appConfiguration.customProperties?.screenshots ?? appConfiguration.userProperties?.screenshots;
9127
+ const screenshots = inBrowserNamespace
9128
+ ? appConfiguration.screenshots
9129
+ : desktopScreenshots;
9051
9130
  return {
9052
9131
  appId: app.name,
9053
9132
  name: app.name,
@@ -9056,22 +9135,30 @@
9056
9135
  title: app.title,
9057
9136
  icons: icon ? [{ src: icon }] : [],
9058
9137
  tooltip: appConfiguration.tooltip,
9059
- screenshots: inBrowserNamespace
9060
- ? appConfiguration.screenshots
9061
- : appConfiguration.customProperties.screenshots
9138
+ screenshots
9062
9139
  };
9063
9140
  }
9064
9141
  addInstanceMetadataToAppMetadata(appMetadata, instance) {
9065
- return { ...appMetadata, instanceId: instance.id, instanceMetadata: instance.agm };
9142
+ return {
9143
+ ...appMetadata,
9144
+ instanceId: instance.id,
9145
+ instanceMetadata: this.isApplicationInstance(instance) ? instance.interopInstance : instance.agm
9146
+ };
9147
+ }
9148
+ isApplicationInstance(instance) {
9149
+ return "appName" in instance;
9066
9150
  }
9067
9151
  async openAppWithContext(app, context) {
9068
9152
  const guid = nanoid();
9069
9153
  const startContext = this.buildStartContext(context, guid);
9070
9154
  const wrappedPromise = this.createContextListenerWrappedPromise(app);
9071
9155
  this.appsStateStore.addOpenAppPromise(guid, wrappedPromise);
9072
- const inBrowser = this.glueController.isRunningInBrowser();
9073
9156
  try {
9074
- const glueInst = await app.start(startContext, { waitForAGMReady: !inBrowser });
9157
+ const glueInst = await this.glueController.startApplication({
9158
+ app,
9159
+ context: startContext,
9160
+ waitForInstanceReady: !this.glueController.isRunningInBrowser()
9161
+ });
9075
9162
  await wrappedPromise.promise;
9076
9163
  this.appsStateStore.removeOpenAppPromise(guid);
9077
9164
  return this.parseGlueInstToAppIdentifier(glueInst);
@@ -9533,9 +9620,12 @@
9533
9620
  this.channelsController.removePrivateChannelFromStoreById(this.id);
9534
9621
  await this.sendCollaborateMessage({ action: "disconnectedFromPrivateChannel" });
9535
9622
  this.logger?.trace(`[${commandId}] - collaborator received action ${"disconnectedFromPrivateChannel"}`);
9536
- if (this.unsubFromInstanceStopped) {
9537
- this.unsubFromInstanceStopped();
9623
+ if (!this.unsubFromInstanceStopped) {
9624
+ return;
9538
9625
  }
9626
+ const unsub = this.unsubFromInstanceStopped instanceof Promise ? await this.unsubFromInstanceStopped : this.unsubFromInstanceStopped;
9627
+ unsub();
9628
+ this.unsubFromInstanceStopped = undefined;
9539
9629
  }
9540
9630
  ensureAlive(commandId) {
9541
9631
  if (!this.disconnected) {
@@ -9554,8 +9644,8 @@
9554
9644
  throw new Error(ChannelError.AccessDenied);
9555
9645
  }
9556
9646
  subscribeForCollaboratorInstanceStop(commandId) {
9557
- const handler = (instance) => {
9558
- if (instance.id !== this.collaborator?.instanceId) {
9647
+ const handler = (id) => {
9648
+ if (id !== this.collaborator?.instanceId) {
9559
9649
  return;
9560
9650
  }
9561
9651
  this.handleCollaboratorDisconnect();
@@ -10440,7 +10530,7 @@
10440
10530
  return ioc.fdc3;
10441
10531
  };
10442
10532
 
10443
- var version = "2.7.1-beta.0";
10533
+ var version = "2.7.1";
10444
10534
 
10445
10535
  const globalScope = typeof process !== "undefined" ? process : window;
10446
10536
  globalScope.fdc3Info = {