@openfin/core 43.100.32 → 43.100.35

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/out/stub.js CHANGED
@@ -361,13 +361,13 @@ async function promiseMapSerial(arr, func) {
361
361
  }
362
362
  promises.promiseMapSerial = promiseMapSerial;
363
363
 
364
- var __classPrivateFieldSet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
364
+ var __classPrivateFieldSet$h = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
365
365
  if (kind === "m") throw new TypeError("Private method is not writable");
366
366
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
367
367
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
368
368
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
369
369
  };
370
- var __classPrivateFieldGet$h = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
370
+ var __classPrivateFieldGet$i = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
371
371
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
372
372
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
373
373
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -452,7 +452,7 @@ class EmitterBase extends Base {
452
452
  this.emit = (eventType, payload, ...args) => {
453
453
  return this.hasEmitter() ? this.getOrCreateEmitter().emit(eventType, payload, ...args) : false;
454
454
  };
455
- this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
455
+ this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
456
456
  /**
457
457
  * Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
458
458
  * `once` subscription.
@@ -462,14 +462,14 @@ class EmitterBase extends Base {
462
462
  * which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
463
463
  */
464
464
  this.cleanUpRemovedListener = (eventType, listener) => {
465
- const deregister = __classPrivateFieldGet$h(this, _EmitterBase_deregisterOnceListeners, "f").get(listener);
465
+ const deregister = __classPrivateFieldGet$i(this, _EmitterBase_deregisterOnceListeners, "f").get(listener);
466
466
  if (deregister) {
467
- const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
467
+ const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
468
468
  emitter.removeListener(eventType, deregister);
469
469
  }
470
470
  };
471
471
  this.getOrCreateEmitter = () => {
472
- const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
472
+ const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
473
473
  if (!emitter.listeners('removeListener').includes(this.cleanUpRemovedListener)) {
474
474
  emitter.on('removeListener', this.cleanUpRemovedListener);
475
475
  }
@@ -511,8 +511,8 @@ class EmitterBase extends Base {
511
511
  // This will only be reached if unsubscribe from event that does not exist but do not want to error here
512
512
  return Promise.resolve();
513
513
  };
514
- __classPrivateFieldSet$g(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
515
- __classPrivateFieldSet$g(this, _EmitterBase_deregisterOnceListeners, new WeakMap(), "f");
514
+ __classPrivateFieldSet$h(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
515
+ __classPrivateFieldSet$h(this, _EmitterBase_deregisterOnceListeners, new WeakMap(), "f");
516
516
  this.listeners = (event) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(event) : [];
517
517
  }
518
518
  /**
@@ -541,7 +541,7 @@ class EmitterBase extends Base {
541
541
  */
542
542
  async once(eventType, listener, options) {
543
543
  const deregister = () => this.deregisterEventListener(eventType);
544
- __classPrivateFieldGet$h(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
544
+ __classPrivateFieldGet$i(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
545
545
  await this.registerEventListener(eventType, options, (emitter) => {
546
546
  emitter.once(eventType, deregister);
547
547
  emitter.once(eventType, listener);
@@ -572,7 +572,7 @@ class EmitterBase extends Base {
572
572
  */
573
573
  async prependOnceListener(eventType, listener, options) {
574
574
  const deregister = () => this.deregisterEventListener(eventType);
575
- __classPrivateFieldGet$h(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
575
+ __classPrivateFieldGet$i(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
576
576
  await this.registerEventListener(eventType, options, (emitter) => {
577
577
  emitter.prependOnceListener(eventType, listener);
578
578
  emitter.once(eventType, deregister);
@@ -632,7 +632,7 @@ class EmitterBase extends Base {
632
632
  }
633
633
  deleteEmitterIfNothingRegistered(emitter) {
634
634
  if (emitter.eventNames().every((type) => type === 'removeListener')) {
635
- this.wire.eventAggregator.delete(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
635
+ this.wire.eventAggregator.delete(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
636
636
  }
637
637
  }
638
638
  }
@@ -1083,8 +1083,8 @@ var main = {};
1083
1083
 
1084
1084
  Object.defineProperty(main, "__esModule", { value: true });
1085
1085
  main.WebContents = void 0;
1086
- const base_1$m = base;
1087
- class WebContents extends base_1$m.EmitterBase {
1086
+ const base_1$n = base;
1087
+ class WebContents extends base_1$n.EmitterBase {
1088
1088
  /**
1089
1089
  * @param identity The identity of the {@link OpenFin.WebContentsEvents WebContents}.
1090
1090
  * @param entityType The type of the {@link OpenFin.WebContentsEvents WebContents}.
@@ -5432,7 +5432,7 @@ function requireWindow () {
5432
5432
  */
5433
5433
  Object.defineProperty(system, "__esModule", { value: true });
5434
5434
  system.System = void 0;
5435
- const base_1$l = base;
5435
+ const base_1$m = base;
5436
5436
  const transport_errors_1$5 = transportErrors;
5437
5437
  const window_1 = requireWindow();
5438
5438
  const events_1$6 = require$$0;
@@ -5442,7 +5442,7 @@ const events_1$6 = require$$0;
5442
5442
  * clearing the cache and exiting the runtime as well as listen to {@link OpenFin.SystemEvents system events}.
5443
5443
  *
5444
5444
  */
5445
- class System extends base_1$l.EmitterBase {
5445
+ class System extends base_1$m.EmitterBase {
5446
5446
  /**
5447
5447
  * @internal
5448
5448
  */
@@ -7753,12 +7753,12 @@ class ChannelError extends Error {
7753
7753
  }
7754
7754
  channelError.ChannelError = ChannelError;
7755
7755
 
7756
- var __classPrivateFieldGet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7756
+ var __classPrivateFieldGet$h = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7757
7757
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
7758
7758
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
7759
7759
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
7760
7760
  };
7761
- var __classPrivateFieldSet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7761
+ var __classPrivateFieldSet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7762
7762
  if (kind === "m") throw new TypeError("Private method is not writable");
7763
7763
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
7764
7764
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -7802,7 +7802,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
7802
7802
  static closeChannelByEndpointId(id) {
7803
7803
  const channel = channelClientsByEndpointId.get(id);
7804
7804
  if (channel) {
7805
- __classPrivateFieldGet$g(channel, _ChannelClient_close, "f").call(channel);
7805
+ __classPrivateFieldGet$h(channel, _ChannelClient_close, "f").call(channel);
7806
7806
  }
7807
7807
  }
7808
7808
  /**
@@ -7813,7 +7813,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
7813
7813
  for (const channelClient of channelClientsByEndpointId.values()) {
7814
7814
  if (channelClient.providerIdentity.channelId === eventPayload.channelId) {
7815
7815
  channelClient.disconnectListener(eventPayload);
7816
- __classPrivateFieldGet$g(channelClient, _ChannelClient_close, "f").call(channelClient);
7816
+ __classPrivateFieldGet$h(channelClient, _ChannelClient_close, "f").call(channelClient);
7817
7817
  }
7818
7818
  }
7819
7819
  }
@@ -7828,12 +7828,12 @@ class ChannelClient extends channel_1$1.ChannelBase {
7828
7828
  this.processAction = (action, payload, senderIdentity) => super.processAction(action, payload, senderIdentity);
7829
7829
  _ChannelClient_close.set(this, () => {
7830
7830
  channelClientsByEndpointId.delete(this.endpointId);
7831
- __classPrivateFieldGet$g(this, _ChannelClient_strategy, "f").close();
7831
+ __classPrivateFieldGet$h(this, _ChannelClient_strategy, "f").close();
7832
7832
  });
7833
- __classPrivateFieldSet$f(this, _ChannelClient_protectedObj, new channel_1$1.ProtectedItems(routingInfo, close), "f");
7833
+ __classPrivateFieldSet$g(this, _ChannelClient_protectedObj, new channel_1$1.ProtectedItems(routingInfo, close), "f");
7834
7834
  this.disconnectListener = () => undefined;
7835
7835
  this.endpointId = routingInfo.endpointId;
7836
- __classPrivateFieldSet$f(this, _ChannelClient_strategy, strategy, "f");
7836
+ __classPrivateFieldSet$g(this, _ChannelClient_strategy, strategy, "f");
7837
7837
  channelClientsByEndpointId.set(this.endpointId, this);
7838
7838
  strategy.receive(this.processAction);
7839
7839
  }
@@ -7841,7 +7841,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
7841
7841
  * a read-only provider identity
7842
7842
  */
7843
7843
  get providerIdentity() {
7844
- const protectedObj = __classPrivateFieldGet$g(this, _ChannelClient_protectedObj, "f");
7844
+ const protectedObj = __classPrivateFieldGet$h(this, _ChannelClient_protectedObj, "f");
7845
7845
  return protectedObj.providerIdentity;
7846
7846
  }
7847
7847
  /**
@@ -7870,9 +7870,9 @@ class ChannelClient extends channel_1$1.ChannelBase {
7870
7870
  * ```
7871
7871
  */
7872
7872
  async dispatch(action, payload) {
7873
- if (__classPrivateFieldGet$g(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
7873
+ if (__classPrivateFieldGet$h(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
7874
7874
  const callSites = transport_errors_1$2.RuntimeError.getCallSite();
7875
- return __classPrivateFieldGet$g(this, _ChannelClient_strategy, "f").send(this.providerIdentity.channelId, action, payload).catch((e) => {
7875
+ return __classPrivateFieldGet$h(this, _ChannelClient_strategy, "f").send(this.providerIdentity.channelId, action, payload).catch((e) => {
7876
7876
  throw new channel_error_1$1.ChannelError(e, action, payload, callSites);
7877
7877
  });
7878
7878
  }
@@ -7924,10 +7924,10 @@ class ChannelClient extends channel_1$1.ChannelBase {
7924
7924
  */
7925
7925
  async disconnect() {
7926
7926
  await this.sendDisconnectAction();
7927
- __classPrivateFieldGet$g(this, _ChannelClient_close, "f").call(this);
7927
+ __classPrivateFieldGet$h(this, _ChannelClient_close, "f").call(this);
7928
7928
  }
7929
7929
  async sendDisconnectAction() {
7930
- const protectedObj = __classPrivateFieldGet$g(this, _ChannelClient_protectedObj, "f");
7930
+ const protectedObj = __classPrivateFieldGet$h(this, _ChannelClient_protectedObj, "f");
7931
7931
  await protectedObj.close();
7932
7932
  }
7933
7933
  /**
@@ -7960,13 +7960,13 @@ exhaustive.exhaustiveCheck = exhaustiveCheck;
7960
7960
 
7961
7961
  var strategy$3 = {};
7962
7962
 
7963
- var __classPrivateFieldSet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7963
+ var __classPrivateFieldSet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7964
7964
  if (kind === "m") throw new TypeError("Private method is not writable");
7965
7965
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
7966
7966
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
7967
7967
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7968
7968
  };
7969
- var __classPrivateFieldGet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7969
+ var __classPrivateFieldGet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7970
7970
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
7971
7971
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
7972
7972
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -7991,7 +7991,7 @@ class ClassicStrategy {
7991
7991
  // connection problems occur
7992
7992
  _ClassicStrategy_pendingMessagesByEndpointId.set(this, new Map());
7993
7993
  this.send = async (endpointId, action, payload) => {
7994
- const to = __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
7994
+ const to = __classPrivateFieldGet$g(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
7995
7995
  if (!to) {
7996
7996
  throw new Error(`Could not locate routing info for endpoint ${endpointId}`);
7997
7997
  }
@@ -8003,13 +8003,13 @@ class ClassicStrategy {
8003
8003
  }
8004
8004
  delete cleanId.isLocalEndpointId;
8005
8005
  // grab the promise before awaiting it to save in our pending messages map
8006
- const p = __classPrivateFieldGet$f(this, _ClassicStrategy_wire, "f").sendAction('send-channel-message', {
8006
+ const p = __classPrivateFieldGet$g(this, _ClassicStrategy_wire, "f").sendAction('send-channel-message', {
8007
8007
  ...cleanId,
8008
8008
  providerIdentity: this.providerIdentity,
8009
8009
  action,
8010
8010
  payload
8011
8011
  });
8012
- __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
8012
+ __classPrivateFieldGet$g(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
8013
8013
  const raw = await p
8014
8014
  .catch((error) => {
8015
8015
  if ('cause' in error) {
@@ -8019,16 +8019,16 @@ class ClassicStrategy {
8019
8019
  })
8020
8020
  .finally(() => {
8021
8021
  // clean up the pending promise
8022
- __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
8022
+ __classPrivateFieldGet$g(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
8023
8023
  });
8024
8024
  return raw.payload.data.result;
8025
8025
  };
8026
8026
  this.close = async () => {
8027
8027
  this.messageReceiver.removeEndpoint(this.providerIdentity.channelId, this.endpointId);
8028
- [...__classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
8029
- __classPrivateFieldSet$e(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
8028
+ [...__classPrivateFieldGet$g(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
8029
+ __classPrivateFieldSet$f(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
8030
8030
  };
8031
- __classPrivateFieldSet$e(this, _ClassicStrategy_wire, wire, "f");
8031
+ __classPrivateFieldSet$f(this, _ClassicStrategy_wire, wire, "f");
8032
8032
  }
8033
8033
  onEndpointDisconnect(endpointId, listener) {
8034
8034
  // Never fires for 'classic'.
@@ -8037,20 +8037,20 @@ class ClassicStrategy {
8037
8037
  this.messageReceiver.addEndpoint(listener, this.providerIdentity.channelId, this.endpointId);
8038
8038
  }
8039
8039
  async closeEndpoint(endpointId) {
8040
- const id = __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
8041
- __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
8042
- const pendingSet = __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId);
8040
+ const id = __classPrivateFieldGet$g(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
8041
+ __classPrivateFieldGet$g(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
8042
+ const pendingSet = __classPrivateFieldGet$g(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId);
8043
8043
  pendingSet?.forEach((p) => {
8044
8044
  const errorMsg = `Channel connection with identity uuid: ${id?.uuid} / name: ${id?.name} / endpointId: ${endpointId} no longer connected.`;
8045
8045
  p.cancel(new Error(errorMsg));
8046
8046
  });
8047
8047
  }
8048
8048
  isEndpointConnected(endpointId) {
8049
- return __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").has(endpointId);
8049
+ return __classPrivateFieldGet$g(this, _ClassicStrategy_endpointIdentityMap, "f").has(endpointId);
8050
8050
  }
8051
8051
  addEndpoint(endpointId, payload) {
8052
- __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").set(endpointId, payload.endpointIdentity);
8053
- __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").set(endpointId, new Set());
8052
+ __classPrivateFieldGet$g(this, _ClassicStrategy_endpointIdentityMap, "f").set(endpointId, payload.endpointIdentity);
8053
+ __classPrivateFieldGet$g(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").set(endpointId, new Set());
8054
8054
  }
8055
8055
  isValidEndpointPayload(payload) {
8056
8056
  return (typeof payload?.endpointIdentity?.endpointId === 'string' ||
@@ -8085,12 +8085,12 @@ function errorToPOJO(error) {
8085
8085
  }
8086
8086
  errors.errorToPOJO = errorToPOJO;
8087
8087
 
8088
- var __classPrivateFieldGet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8088
+ var __classPrivateFieldGet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8089
8089
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
8090
8090
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
8091
8091
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
8092
8092
  };
8093
- var __classPrivateFieldSet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8093
+ var __classPrivateFieldSet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8094
8094
  if (kind === "m") throw new TypeError("Private method is not writable");
8095
8095
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
8096
8096
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -8125,8 +8125,8 @@ class RTCEndpoint {
8125
8125
  if (this.rtc.rtcClient.connectionState !== 'connected') {
8126
8126
  this.rtc.rtcClient.removeEventListener('connectionstatechange', this.connectionStateChangeHandler);
8127
8127
  this.close();
8128
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f")) {
8129
- __classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f").call(this);
8128
+ if (__classPrivateFieldGet$f(this, _RTCEndpoint_disconnectListener, "f")) {
8129
+ __classPrivateFieldGet$f(this, _RTCEndpoint_disconnectListener, "f").call(this);
8130
8130
  }
8131
8131
  }
8132
8132
  };
@@ -8174,9 +8174,9 @@ class RTCEndpoint {
8174
8174
  data = new TextDecoder().decode(e.data);
8175
8175
  }
8176
8176
  const { messageId, action, payload } = JSON.parse(data);
8177
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_processAction, "f")) {
8177
+ if (__classPrivateFieldGet$f(this, _RTCEndpoint_processAction, "f")) {
8178
8178
  try {
8179
- const res = await __classPrivateFieldGet$e(this, _RTCEndpoint_processAction, "f").call(this, action, payload, endpointIdentity);
8179
+ const res = await __classPrivateFieldGet$f(this, _RTCEndpoint_processAction, "f").call(this, action, payload, endpointIdentity);
8180
8180
  this.rtc.channels.response.send(JSON.stringify({
8181
8181
  messageId,
8182
8182
  payload: res,
@@ -8210,25 +8210,25 @@ class RTCEndpoint {
8210
8210
  datachannel.onclose = (e) => {
8211
8211
  [...this.responseMap.values()].forEach((promise) => promise.reject(new Error('RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.')));
8212
8212
  this.close();
8213
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f")) {
8214
- __classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f").call(this);
8213
+ if (__classPrivateFieldGet$f(this, _RTCEndpoint_disconnectListener, "f")) {
8214
+ __classPrivateFieldGet$f(this, _RTCEndpoint_disconnectListener, "f").call(this);
8215
8215
  }
8216
8216
  };
8217
8217
  });
8218
8218
  }
8219
8219
  onDisconnect(listener) {
8220
- if (!__classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f")) {
8221
- __classPrivateFieldSet$d(this, _RTCEndpoint_disconnectListener, listener, "f");
8220
+ if (!__classPrivateFieldGet$f(this, _RTCEndpoint_disconnectListener, "f")) {
8221
+ __classPrivateFieldSet$e(this, _RTCEndpoint_disconnectListener, listener, "f");
8222
8222
  }
8223
8223
  else {
8224
8224
  throw new Error('RTCEndpoint disconnectListener cannot be set twice.');
8225
8225
  }
8226
8226
  }
8227
8227
  receive(listener) {
8228
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_processAction, "f")) {
8228
+ if (__classPrivateFieldGet$f(this, _RTCEndpoint_processAction, "f")) {
8229
8229
  throw new Error('You have already set a listener for this RTC Endpoint.');
8230
8230
  }
8231
- __classPrivateFieldSet$d(this, _RTCEndpoint_processAction, listener, "f");
8231
+ __classPrivateFieldSet$e(this, _RTCEndpoint_processAction, listener, "f");
8232
8232
  }
8233
8233
  get connected() {
8234
8234
  return this.rtc.rtcClient.connectionState === 'connected';
@@ -8239,12 +8239,12 @@ _RTCEndpoint_processAction = new WeakMap(), _RTCEndpoint_disconnectListener = ne
8239
8239
 
8240
8240
  var strategy$1 = {};
8241
8241
 
8242
- var __classPrivateFieldGet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8242
+ var __classPrivateFieldGet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8243
8243
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
8244
8244
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
8245
8245
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
8246
8246
  };
8247
- var __classPrivateFieldSet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8247
+ var __classPrivateFieldSet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8248
8248
  if (kind === "m") throw new TypeError("Private method is not writable");
8249
8249
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
8250
8250
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -8265,11 +8265,11 @@ class EndpointStrategy {
8265
8265
  return this.getEndpointById(endpointId).send(action, payload);
8266
8266
  };
8267
8267
  this.close = async () => {
8268
- if (__classPrivateFieldGet$d(this, _EndpointStrategy_connected, "f")) {
8269
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
8270
- __classPrivateFieldSet$c(this, _EndpointStrategy_endpointMap, new Map(), "f");
8268
+ if (__classPrivateFieldGet$e(this, _EndpointStrategy_connected, "f")) {
8269
+ __classPrivateFieldGet$e(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
8270
+ __classPrivateFieldSet$d(this, _EndpointStrategy_endpointMap, new Map(), "f");
8271
8271
  }
8272
- __classPrivateFieldSet$c(this, _EndpointStrategy_connected, false, "f");
8272
+ __classPrivateFieldSet$d(this, _EndpointStrategy_connected, false, "f");
8273
8273
  };
8274
8274
  this.isValidEndpointPayload = validateEndpoint;
8275
8275
  }
@@ -8277,39 +8277,39 @@ class EndpointStrategy {
8277
8277
  this.getEndpointById(endpointId).onDisconnect(listener);
8278
8278
  }
8279
8279
  receive(listener) {
8280
- if (__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f")) {
8280
+ if (__classPrivateFieldGet$e(this, _EndpointStrategy_processAction, "f")) {
8281
8281
  throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);
8282
8282
  }
8283
- __classPrivateFieldSet$c(this, _EndpointStrategy_processAction, listener, "f");
8283
+ __classPrivateFieldSet$d(this, _EndpointStrategy_processAction, listener, "f");
8284
8284
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
8285
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.receive(__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f")));
8285
+ __classPrivateFieldGet$e(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.receive(__classPrivateFieldGet$e(this, _EndpointStrategy_processAction, "f")));
8286
8286
  }
8287
8287
  getEndpointById(endpointId) {
8288
- const endpoint = __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").get(endpointId);
8288
+ const endpoint = __classPrivateFieldGet$e(this, _EndpointStrategy_endpointMap, "f").get(endpointId);
8289
8289
  if (!endpoint) {
8290
8290
  throw new Error(`Client with endpoint id ${endpointId} is not connected`);
8291
8291
  }
8292
8292
  return endpoint;
8293
8293
  }
8294
8294
  get connected() {
8295
- return __classPrivateFieldGet$d(this, _EndpointStrategy_connected, "f");
8295
+ return __classPrivateFieldGet$e(this, _EndpointStrategy_connected, "f");
8296
8296
  }
8297
8297
  isEndpointConnected(endpointId) {
8298
- return __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").has(endpointId);
8298
+ return __classPrivateFieldGet$e(this, _EndpointStrategy_endpointMap, "f").has(endpointId);
8299
8299
  }
8300
8300
  addEndpoint(endpointId, payload) {
8301
- if (!__classPrivateFieldGet$d(this, _EndpointStrategy_connected, "f")) {
8301
+ if (!__classPrivateFieldGet$e(this, _EndpointStrategy_connected, "f")) {
8302
8302
  console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);
8303
8303
  return;
8304
8304
  }
8305
8305
  const clientStrat = new this.EndpointType(payload);
8306
- if (__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f")) {
8307
- clientStrat.receive(__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f"));
8306
+ if (__classPrivateFieldGet$e(this, _EndpointStrategy_processAction, "f")) {
8307
+ clientStrat.receive(__classPrivateFieldGet$e(this, _EndpointStrategy_processAction, "f"));
8308
8308
  }
8309
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").set(endpointId, clientStrat);
8309
+ __classPrivateFieldGet$e(this, _EndpointStrategy_endpointMap, "f").set(endpointId, clientStrat);
8310
8310
  }
8311
8311
  async closeEndpoint(endpointId) {
8312
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").delete(endpointId);
8312
+ __classPrivateFieldGet$e(this, _EndpointStrategy_endpointMap, "f").delete(endpointId);
8313
8313
  }
8314
8314
  }
8315
8315
  strategy$1.EndpointStrategy = EndpointStrategy;
@@ -8336,11 +8336,11 @@ var iceManager = {};
8336
8336
 
8337
8337
  Object.defineProperty(iceManager, "__esModule", { value: true });
8338
8338
  iceManager.RTCICEManager = void 0;
8339
- const base_1$k = base;
8339
+ const base_1$l = base;
8340
8340
  /*
8341
8341
  Singleton that facilitates Offer and Answer exchange required for establishing RTC connections.
8342
8342
  */
8343
- class RTCICEManager extends base_1$k.EmitterBase {
8343
+ class RTCICEManager extends base_1$l.EmitterBase {
8344
8344
  constructor(wire) {
8345
8345
  super(wire, 'channel');
8346
8346
  this.ensureChannelOpened = (channel) => {
@@ -8491,12 +8491,12 @@ function runtimeUuidMeetsMinimumRuntimeVersion(runtimeUuid, minVersion) {
8491
8491
  }
8492
8492
  runtimeVersioning.runtimeUuidMeetsMinimumRuntimeVersion = runtimeUuidMeetsMinimumRuntimeVersion;
8493
8493
 
8494
- var __classPrivateFieldGet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8494
+ var __classPrivateFieldGet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8495
8495
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
8496
8496
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
8497
8497
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
8498
8498
  };
8499
- var __classPrivateFieldSet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8499
+ var __classPrivateFieldSet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8500
8500
  if (kind === "m") throw new TypeError("Private method is not writable");
8501
8501
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
8502
8502
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -8540,19 +8540,19 @@ class ChannelProvider extends channel_1.ChannelBase {
8540
8540
  * a read-only array containing all the identities of connecting clients.
8541
8541
  */
8542
8542
  get connections() {
8543
- return [...__classPrivateFieldGet$c(this, _ChannelProvider_connections, "f")];
8543
+ return [...__classPrivateFieldGet$d(this, _ChannelProvider_connections, "f")];
8544
8544
  }
8545
8545
  static handleClientDisconnection(channel, payload) {
8546
8546
  if (payload?.endpointId) {
8547
8547
  const { uuid, name, endpointId, isLocalEndpointId } = payload;
8548
- __classPrivateFieldGet$c(channel, _ChannelProvider_removeEndpoint, "f").call(channel, { uuid, name, endpointId, isLocalEndpointId });
8548
+ __classPrivateFieldGet$d(channel, _ChannelProvider_removeEndpoint, "f").call(channel, { uuid, name, endpointId, isLocalEndpointId });
8549
8549
  }
8550
8550
  else {
8551
8551
  // this is here to support older runtimes that did not have endpointId
8552
8552
  const multipleRemoves = channel.connections.filter((identity) => {
8553
8553
  return identity.uuid === payload.uuid && identity.name === payload.name;
8554
8554
  });
8555
- multipleRemoves.forEach(__classPrivateFieldGet$c(channel, _ChannelProvider_removeEndpoint, "f"));
8555
+ multipleRemoves.forEach(__classPrivateFieldGet$d(channel, _ChannelProvider_removeEndpoint, "f"));
8556
8556
  }
8557
8557
  channel.disconnectListener(payload);
8558
8558
  }
@@ -8569,8 +8569,8 @@ class ChannelProvider extends channel_1.ChannelBase {
8569
8569
  _ChannelProvider_strategy.set(this, void 0);
8570
8570
  _ChannelProvider_removeEndpoint.set(this, (identity) => {
8571
8571
  const remainingConnections = this.connections.filter((clientIdentity) => clientIdentity.endpointId !== identity.endpointId);
8572
- __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
8573
- __classPrivateFieldSet$b(this, _ChannelProvider_connections, remainingConnections, "f");
8572
+ __classPrivateFieldGet$d(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
8573
+ __classPrivateFieldSet$c(this, _ChannelProvider_connections, remainingConnections, "f");
8574
8574
  });
8575
8575
  // Must be bound.
8576
8576
  this.processAction = async (action, payload, senderIdentity) => {
@@ -8584,17 +8584,17 @@ class ChannelProvider extends channel_1.ChannelBase {
8584
8584
  return super.processAction(action, payload, senderIdentity);
8585
8585
  };
8586
8586
  _ChannelProvider_close.set(this, () => {
8587
- __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").close();
8587
+ __classPrivateFieldGet$d(this, _ChannelProvider_strategy, "f").close();
8588
8588
  const remove = ChannelProvider.removalMap.get(this);
8589
8589
  if (remove) {
8590
8590
  remove();
8591
8591
  }
8592
8592
  });
8593
- __classPrivateFieldSet$b(this, _ChannelProvider_protectedObj, new channel_1.ProtectedItems(providerIdentity, close), "f");
8593
+ __classPrivateFieldSet$c(this, _ChannelProvider_protectedObj, new channel_1.ProtectedItems(providerIdentity, close), "f");
8594
8594
  this.connectListener = () => undefined;
8595
8595
  this.disconnectListener = () => undefined;
8596
- __classPrivateFieldSet$b(this, _ChannelProvider_connections, [], "f");
8597
- __classPrivateFieldSet$b(this, _ChannelProvider_strategy, strategy, "f");
8596
+ __classPrivateFieldSet$c(this, _ChannelProvider_connections, [], "f");
8597
+ __classPrivateFieldSet$c(this, _ChannelProvider_strategy, strategy, "f");
8598
8598
  strategy.receive(this.processAction);
8599
8599
  }
8600
8600
  /**
@@ -8625,16 +8625,16 @@ class ChannelProvider extends channel_1.ChannelBase {
8625
8625
  */
8626
8626
  dispatch(to, action, payload) {
8627
8627
  const endpointId = to.endpointId ?? this.getEndpointIdForOpenFinId(to, action);
8628
- if (endpointId && __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
8628
+ if (endpointId && __classPrivateFieldGet$d(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
8629
8629
  const callSites = transport_errors_1$1.RuntimeError.getCallSite();
8630
- return __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload).catch((e) => {
8630
+ return __classPrivateFieldGet$d(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload).catch((e) => {
8631
8631
  throw new channel_error_1.ChannelError(e, action, payload, callSites);
8632
8632
  });
8633
8633
  }
8634
8634
  return Promise.reject(new Error(`Client connection with identity uuid: ${to.uuid} / name: ${to.name} / endpointId: ${endpointId} no longer connected.`));
8635
8635
  }
8636
8636
  async processConnection(senderId, payload) {
8637
- __classPrivateFieldGet$c(this, _ChannelProvider_connections, "f").push(senderId);
8637
+ __classPrivateFieldGet$d(this, _ChannelProvider_connections, "f").push(senderId);
8638
8638
  return this.connectListener(senderId, payload);
8639
8639
  }
8640
8640
  /**
@@ -8657,7 +8657,7 @@ class ChannelProvider extends channel_1.ChannelBase {
8657
8657
  * ```
8658
8658
  */
8659
8659
  publish(action, payload) {
8660
- return this.connections.map((to) => __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").send(to.endpointId, action, payload));
8660
+ return this.connections.map((to) => __classPrivateFieldGet$d(this, _ChannelProvider_strategy, "f").send(to.endpointId, action, payload));
8661
8661
  }
8662
8662
  /**
8663
8663
  * Register a listener that is called on every new client connection.
@@ -8731,11 +8731,11 @@ class ChannelProvider extends channel_1.ChannelBase {
8731
8731
  * ```
8732
8732
  */
8733
8733
  async destroy() {
8734
- const protectedObj = __classPrivateFieldGet$c(this, _ChannelProvider_protectedObj, "f");
8734
+ const protectedObj = __classPrivateFieldGet$d(this, _ChannelProvider_protectedObj, "f");
8735
8735
  protectedObj.providerIdentity;
8736
- __classPrivateFieldSet$b(this, _ChannelProvider_connections, [], "f");
8736
+ __classPrivateFieldSet$c(this, _ChannelProvider_connections, [], "f");
8737
8737
  await protectedObj.close();
8738
- __classPrivateFieldGet$c(this, _ChannelProvider_close, "f").call(this);
8738
+ __classPrivateFieldGet$d(this, _ChannelProvider_close, "f").call(this);
8739
8739
  }
8740
8740
  /**
8741
8741
  * Returns an array with info on every Client connected to the Provider
@@ -8805,7 +8805,7 @@ class ChannelProvider extends channel_1.ChannelBase {
8805
8805
  getEndpointIdForOpenFinId(clientIdentity, action) {
8806
8806
  const matchingConnections = this.connections.filter((c) => c.name === clientIdentity.name && c.uuid === clientIdentity.uuid);
8807
8807
  if (matchingConnections.length >= 2) {
8808
- const protectedObj = __classPrivateFieldGet$c(this, _ChannelProvider_protectedObj, "f");
8808
+ const protectedObj = __classPrivateFieldGet$d(this, _ChannelProvider_protectedObj, "f");
8809
8809
  const { uuid, name } = clientIdentity;
8810
8810
  const providerUuid = protectedObj?.providerIdentity.uuid;
8811
8811
  const providerName = protectedObj?.providerIdentity.name;
@@ -8841,14 +8841,14 @@ var messageReceiver = {};
8841
8841
  Object.defineProperty(messageReceiver, "__esModule", { value: true });
8842
8842
  messageReceiver.MessageReceiver = void 0;
8843
8843
  const client_1$1 = client;
8844
- const base_1$j = base;
8844
+ const base_1$k = base;
8845
8845
  const errors_1$1 = errors;
8846
8846
  /*
8847
8847
  This is a singleton (per fin object) tasked with routing messages coming off the ipc to the correct endpoint.
8848
8848
  It needs to be a singleton because there can only be one per wire. It tracks both clients and providers' processAction passed in via the strategy.
8849
8849
  If functionality is not about receiving messages, it does not belong here.
8850
8850
  */
8851
- class MessageReceiver extends base_1$j.Base {
8851
+ class MessageReceiver extends base_1$k.Base {
8852
8852
  constructor(wire) {
8853
8853
  super(wire);
8854
8854
  this.onmessage = (msg) => {
@@ -9017,13 +9017,13 @@ class CombinedStrategy {
9017
9017
  }
9018
9018
  strategy.default = CombinedStrategy;
9019
9019
 
9020
- var __classPrivateFieldSet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
9020
+ var __classPrivateFieldSet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
9021
9021
  if (kind === "m") throw new TypeError("Private method is not writable");
9022
9022
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
9023
9023
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
9024
9024
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
9025
9025
  };
9026
- var __classPrivateFieldGet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9026
+ var __classPrivateFieldGet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9027
9027
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9028
9028
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
9029
9029
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -9035,7 +9035,7 @@ var _ConnectionManager_messageReceiver, _ConnectionManager_rtcConnectionManager;
9035
9035
  Object.defineProperty(connectionManager, "__esModule", { value: true });
9036
9036
  connectionManager.ConnectionManager = void 0;
9037
9037
  const exhaustive_1 = exhaustive;
9038
- const base_1$i = base;
9038
+ const base_1$j = base;
9039
9039
  const strategy_1 = strategy$3;
9040
9040
  const strategy_2 = strategy$2;
9041
9041
  const ice_manager_1 = iceManager;
@@ -9043,7 +9043,7 @@ const provider_1$1 = provider;
9043
9043
  const message_receiver_1 = messageReceiver;
9044
9044
  const protocol_manager_1 = protocolManager;
9045
9045
  const strategy_3 = __importDefault$5(strategy);
9046
- class ConnectionManager extends base_1$i.Base {
9046
+ class ConnectionManager extends base_1$j.Base {
9047
9047
  static getProtocolOptionsFromStrings(protocols) {
9048
9048
  return protocols.map((protocol) => {
9049
9049
  switch (protocol) {
@@ -9072,8 +9072,8 @@ class ConnectionManager extends base_1$i.Base {
9072
9072
  };
9073
9073
  this.providerMap = new Map();
9074
9074
  this.protocolManager = new protocol_manager_1.ProtocolManager(this.wire.environment.type === 'node' ? ['classic'] : ['rtc', 'classic']);
9075
- __classPrivateFieldSet$a(this, _ConnectionManager_messageReceiver, new message_receiver_1.MessageReceiver(wire), "f");
9076
- __classPrivateFieldSet$a(this, _ConnectionManager_rtcConnectionManager, new ice_manager_1.RTCICEManager(wire), "f");
9075
+ __classPrivateFieldSet$b(this, _ConnectionManager_messageReceiver, new message_receiver_1.MessageReceiver(wire), "f");
9076
+ __classPrivateFieldSet$b(this, _ConnectionManager_rtcConnectionManager, new ice_manager_1.RTCICEManager(wire), "f");
9077
9077
  wire.registerMessageHandler(this.onmessage.bind(this));
9078
9078
  }
9079
9079
  createProvider(options, providerIdentity) {
@@ -9084,7 +9084,7 @@ class ConnectionManager extends base_1$i.Base {
9084
9084
  case 'rtc':
9085
9085
  return new strategy_2.RTCStrategy();
9086
9086
  case 'classic':
9087
- return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$b(this, _ConnectionManager_messageReceiver, "f"),
9087
+ return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$c(this, _ConnectionManager_messageReceiver, "f"),
9088
9088
  // Providers do not have an endpointId, use channelId as endpointId in the strategy.
9089
9089
  providerIdentity.channelId, providerIdentity);
9090
9090
  default:
@@ -9120,7 +9120,7 @@ class ConnectionManager extends base_1$i.Base {
9120
9120
  const supportedProtocols = await Promise.all(protocols.map(async (type) => {
9121
9121
  switch (type) {
9122
9122
  case 'rtc': {
9123
- const { rtcClient, channels, offer, rtcConnectionId, channelsOpened } = await __classPrivateFieldGet$b(this, _ConnectionManager_rtcConnectionManager, "f").startClientOffer();
9123
+ const { rtcClient, channels, offer, rtcConnectionId, channelsOpened } = await __classPrivateFieldGet$c(this, _ConnectionManager_rtcConnectionManager, "f").startClientOffer();
9124
9124
  rtcPacket = { rtcClient, channels, channelsOpened };
9125
9125
  return {
9126
9126
  type: 'rtc',
@@ -9147,18 +9147,18 @@ class ConnectionManager extends base_1$i.Base {
9147
9147
  routingInfo.endpointId = this.wire.environment.getNextMessageId();
9148
9148
  // For New Clients connecting to Old Providers. To prevent multi-dispatching and publishing, we delete previously-connected
9149
9149
  // clients that are in the same context as the newly-connected client.
9150
- __classPrivateFieldGet$b(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
9150
+ __classPrivateFieldGet$c(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
9151
9151
  }
9152
9152
  const answer = routingInfo.answer ?? {
9153
9153
  supportedProtocols: [{ type: 'classic', version: 1 }]
9154
9154
  };
9155
9155
  const createStrategyFromAnswer = async (protocol) => {
9156
9156
  if (protocol.type === 'rtc' && rtcPacket) {
9157
- await __classPrivateFieldGet$b(this, _ConnectionManager_rtcConnectionManager, "f").finishClientOffer(rtcPacket.rtcClient, protocol.payload.answer, rtcPacket.channelsOpened);
9157
+ await __classPrivateFieldGet$c(this, _ConnectionManager_rtcConnectionManager, "f").finishClientOffer(rtcPacket.rtcClient, protocol.payload.answer, rtcPacket.channelsOpened);
9158
9158
  return new strategy_2.RTCStrategy();
9159
9159
  }
9160
9160
  if (protocol.type === 'classic') {
9161
- return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$b(this, _ConnectionManager_messageReceiver, "f"), routingInfo.endpointId, routingInfo);
9161
+ return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$c(this, _ConnectionManager_messageReceiver, "f"), routingInfo.endpointId, routingInfo);
9162
9162
  }
9163
9163
  return null;
9164
9164
  };
@@ -9226,7 +9226,7 @@ class ConnectionManager extends base_1$i.Base {
9226
9226
  clientAnswer = await overlappingProtocols.reduce(async (accumP, protocolToUse) => {
9227
9227
  const answer = await accumP;
9228
9228
  if (protocolToUse.type === 'rtc') {
9229
- const { answer: rtcAnswer, rtcClient, channels } = await __classPrivateFieldGet$b(this, _ConnectionManager_rtcConnectionManager, "f").createProviderAnswer(protocolToUse.payload.rtcConnectionId, protocolToUse.payload.offer);
9229
+ const { answer: rtcAnswer, rtcClient, channels } = await __classPrivateFieldGet$c(this, _ConnectionManager_rtcConnectionManager, "f").createProviderAnswer(protocolToUse.payload.rtcConnectionId, protocolToUse.payload.offer);
9230
9230
  answer.supportedProtocols.push({
9231
9231
  type: 'rtc',
9232
9232
  version: strategy_2.RTCInfo.version,
@@ -9274,13 +9274,13 @@ _ConnectionManager_messageReceiver = new WeakMap(), _ConnectionManager_rtcConnec
9274
9274
  *
9275
9275
  * @packageDocumentation
9276
9276
  */
9277
- var __classPrivateFieldSet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
9277
+ var __classPrivateFieldSet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
9278
9278
  if (kind === "m") throw new TypeError("Private method is not writable");
9279
9279
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
9280
9280
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
9281
9281
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
9282
9282
  };
9283
- var __classPrivateFieldGet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9283
+ var __classPrivateFieldGet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9284
9284
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9285
9285
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
9286
9286
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -9290,8 +9290,8 @@ Object.defineProperty(channel$1, "__esModule", { value: true });
9290
9290
  channel$1.Channel = void 0;
9291
9291
  /* eslint-disable no-console */
9292
9292
  const events_1$5 = require$$0;
9293
- const lazy_1$2 = lazy;
9294
- const base_1$h = base;
9293
+ const lazy_1$3 = lazy;
9294
+ const base_1$i = base;
9295
9295
  const client_1 = client;
9296
9296
  const connection_manager_1 = connectionManager;
9297
9297
  const provider_1 = provider;
@@ -9322,7 +9322,7 @@ function retryDelay(count) {
9322
9322
  * * {@link Channel.onChannelConnect onChannelConnect(listener)}
9323
9323
  * * {@link Channel.onChannelDisconnect onChannelDisconnect(listener)}
9324
9324
  */
9325
- class Channel extends base_1$h.EmitterBase {
9325
+ class Channel extends base_1$i.EmitterBase {
9326
9326
  /**
9327
9327
  * @internal
9328
9328
  */
@@ -9331,17 +9331,17 @@ class Channel extends base_1$h.EmitterBase {
9331
9331
  _Channel_connectionManager.set(this, void 0);
9332
9332
  _Channel_internalEmitter.set(this, new events_1$5.EventEmitter());
9333
9333
  // OpenFin API has not been injected at construction time, *must* wait for API to be ready.
9334
- _Channel_readyToConnect.set(this, new lazy_1$2.AsyncRetryableLazy(async () => {
9334
+ _Channel_readyToConnect.set(this, new lazy_1$3.AsyncRetryableLazy(async () => {
9335
9335
  await Promise.all([
9336
9336
  this.on('disconnected', (eventPayload) => {
9337
9337
  client_1.ChannelClient.handleProviderDisconnect(eventPayload);
9338
9338
  }),
9339
9339
  this.on('connected', (...args) => {
9340
- __classPrivateFieldGet$a(this, _Channel_internalEmitter, "f").emit('connected', ...args);
9340
+ __classPrivateFieldGet$b(this, _Channel_internalEmitter, "f").emit('connected', ...args);
9341
9341
  })
9342
9342
  ]).catch(() => new Error('error setting up channel connection listeners'));
9343
9343
  }));
9344
- __classPrivateFieldSet$9(this, _Channel_connectionManager, new connection_manager_1.ConnectionManager(wire), "f");
9344
+ __classPrivateFieldSet$a(this, _Channel_connectionManager, new connection_manager_1.ConnectionManager(wire), "f");
9345
9345
  }
9346
9346
  /**
9347
9347
  *
@@ -9416,7 +9416,7 @@ class Channel extends base_1$h.EmitterBase {
9416
9416
  resolve(true);
9417
9417
  }
9418
9418
  };
9419
- __classPrivateFieldGet$a(this, _Channel_internalEmitter, "f").on('connected', connectedListener);
9419
+ __classPrivateFieldGet$b(this, _Channel_internalEmitter, "f").on('connected', connectedListener);
9420
9420
  });
9421
9421
  try {
9422
9422
  if (retryInfo.count > 0) {
@@ -9448,7 +9448,7 @@ class Channel extends base_1$h.EmitterBase {
9448
9448
  finally {
9449
9449
  retryInfo.count += 1;
9450
9450
  // in case of other errors, remove our listener
9451
- __classPrivateFieldGet$a(this, _Channel_internalEmitter, "f").removeListener('connected', connectedListener);
9451
+ __classPrivateFieldGet$b(this, _Channel_internalEmitter, "f").removeListener('connected', connectedListener);
9452
9452
  }
9453
9453
  } while (shouldWait); // If we're waiting we retry the above loop
9454
9454
  // Should wait was false, no channel was found.
@@ -9507,12 +9507,12 @@ class Channel extends base_1$h.EmitterBase {
9507
9507
  async connect(channelName, options = {}) {
9508
9508
  // Make sure we don't connect before listeners are set up
9509
9509
  // This also errors if we're not in OpenFin, ensuring we don't run unnecessary code
9510
- await __classPrivateFieldGet$a(this, _Channel_readyToConnect, "f").getValue();
9510
+ await __classPrivateFieldGet$b(this, _Channel_readyToConnect, "f").getValue();
9511
9511
  if (!channelName || typeof channelName !== 'string') {
9512
9512
  throw new Error('Please provide a channelName string to connect to a channel.');
9513
9513
  }
9514
9514
  const opts = { wait: true, ...this.wire.environment.getDefaultChannelOptions().connect, ...options };
9515
- const { offer, rtc: rtcPacket } = await __classPrivateFieldGet$a(this, _Channel_connectionManager, "f").createClientOffer(opts);
9515
+ const { offer, rtc: rtcPacket } = await __classPrivateFieldGet$b(this, _Channel_connectionManager, "f").createClientOffer(opts);
9516
9516
  let connectionUrl;
9517
9517
  if (this.fin.me.isFrame || this.fin.me.isView || this.fin.me.isWindow) {
9518
9518
  connectionUrl = (await this.fin.me.getInfo()).url;
@@ -9524,7 +9524,7 @@ class Channel extends base_1$h.EmitterBase {
9524
9524
  connectionUrl
9525
9525
  };
9526
9526
  const routingInfo = await this.safeConnect(channelName, opts.wait, connectPayload);
9527
- const strategy = await __classPrivateFieldGet$a(this, _Channel_connectionManager, "f").createClientStrategy(rtcPacket, routingInfo);
9527
+ const strategy = await __classPrivateFieldGet$b(this, _Channel_connectionManager, "f").createClientStrategy(rtcPacket, routingInfo);
9528
9528
  const channel = new client_1.ChannelClient(routingInfo, () => client_1.ChannelClient.wireClose(this.wire, routingInfo, routingInfo.endpointId), strategy);
9529
9529
  // It is the client's responsibility to handle endpoint disconnection to the provider.
9530
9530
  // If the endpoint dies, the client will force a disconnection through the core.
@@ -9593,7 +9593,7 @@ class Channel extends base_1$h.EmitterBase {
9593
9593
  throw new Error('Please provide a channelName to create a channel');
9594
9594
  }
9595
9595
  const { payload: { data: providerIdentity } } = await this.wire.sendAction('create-channel', { channelName });
9596
- const channel = __classPrivateFieldGet$a(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
9596
+ const channel = __classPrivateFieldGet$b(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
9597
9597
  // TODO: fix typing (internal)
9598
9598
  // @ts-expect-error
9599
9599
  this.on('client-disconnected', (eventPayload) => {
@@ -9617,7 +9617,7 @@ interappbus.InterAppPayload = interappbus.InterApplicationBus = void 0;
9617
9617
  * @packageDocumentation
9618
9618
  */
9619
9619
  const events_1$4 = require$$0;
9620
- const base_1$g = base;
9620
+ const base_1$h = base;
9621
9621
  const ref_counter_1 = refCounter;
9622
9622
  const index_1$2 = channel$1;
9623
9623
  const validate_1$3 = validate;
@@ -9625,7 +9625,7 @@ const validate_1$3 = validate;
9625
9625
  * A messaging bus that allows for pub/sub messaging between different applications.
9626
9626
  *
9627
9627
  */
9628
- class InterApplicationBus extends base_1$g.Base {
9628
+ class InterApplicationBus extends base_1$h.Base {
9629
9629
  /**
9630
9630
  * @internal
9631
9631
  */
@@ -9831,12 +9831,12 @@ var clipboard = {};
9831
9831
  */
9832
9832
  Object.defineProperty(clipboard, "__esModule", { value: true });
9833
9833
  clipboard.Clipboard = void 0;
9834
- const base_1$f = base;
9834
+ const base_1$g = base;
9835
9835
  /**
9836
9836
  * The Clipboard API allows reading and writing to the clipboard in multiple formats.
9837
9837
  *
9838
9838
  */
9839
- class Clipboard extends base_1$f.Base {
9839
+ class Clipboard extends base_1$g.Base {
9840
9840
  /**
9841
9841
  * Writes data into the clipboard as plain text
9842
9842
  * @param writeObj The object for writing data into the clipboard
@@ -10025,7 +10025,7 @@ var Instance$4 = {};
10025
10025
  Object.defineProperty(Instance$4, "__esModule", { value: true });
10026
10026
  Instance$4.ExternalApplication = void 0;
10027
10027
  /* eslint-disable import/prefer-default-export */
10028
- const base_1$e = base;
10028
+ const base_1$f = base;
10029
10029
  /**
10030
10030
  * An ExternalApplication object representing native language adapter connections to the runtime. Allows
10031
10031
  * the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
@@ -10036,7 +10036,7 @@ const base_1$e = base;
10036
10036
  * - Processes started via `System.launchExternalApplication`
10037
10037
  * - Processes monitored via `System.monitorExternalProcess`
10038
10038
  */
10039
- class ExternalApplication extends base_1$e.EmitterBase {
10039
+ class ExternalApplication extends base_1$f.EmitterBase {
10040
10040
  /**
10041
10041
  * @internal
10042
10042
  */
@@ -10064,12 +10064,12 @@ Instance$4.ExternalApplication = ExternalApplication;
10064
10064
 
10065
10065
  Object.defineProperty(Factory$5, "__esModule", { value: true });
10066
10066
  Factory$5.ExternalApplicationModule = void 0;
10067
- const base_1$d = base;
10067
+ const base_1$e = base;
10068
10068
  const Instance_1$4 = Instance$4;
10069
10069
  /**
10070
10070
  * Static namespace for OpenFin API methods that interact with the {@link ExternalApplication} class, available under `fin.ExternalApplication`.
10071
10071
  */
10072
- class ExternalApplicationModule extends base_1$d.Base {
10072
+ class ExternalApplicationModule extends base_1$e.Base {
10073
10073
  /**
10074
10074
  * Asynchronously returns an External Application object that represents an external application.
10075
10075
  * <br>It is possible to wrap a process that does not yet exist, (for example, to listen for startup-related events)
@@ -10151,7 +10151,7 @@ var Instance$3 = {};
10151
10151
  Object.defineProperty(Instance$3, "__esModule", { value: true });
10152
10152
  Instance$3._Frame = void 0;
10153
10153
  /* eslint-disable import/prefer-default-export */
10154
- const base_1$c = base;
10154
+ const base_1$d = base;
10155
10155
  /**
10156
10156
  * An iframe represents an embedded HTML page within a parent HTML page. Because this embedded page
10157
10157
  * has its own DOM and global JS context (which may or may not be linked to that of the parent depending
@@ -10172,7 +10172,7 @@ const base_1$c = base;
10172
10172
  * The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
10173
10173
  * (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
10174
10174
  */
10175
- class _Frame extends base_1$c.EmitterBase {
10175
+ class _Frame extends base_1$d.EmitterBase {
10176
10176
  /**
10177
10177
  * @internal
10178
10178
  */
@@ -10218,13 +10218,13 @@ Instance$3._Frame = _Frame;
10218
10218
 
10219
10219
  Object.defineProperty(Factory$4, "__esModule", { value: true });
10220
10220
  Factory$4._FrameModule = void 0;
10221
- const base_1$b = base;
10221
+ const base_1$c = base;
10222
10222
  const validate_1$2 = validate;
10223
10223
  const Instance_1$3 = Instance$3;
10224
10224
  /**
10225
10225
  * Static namespace for OpenFin API methods that interact with the {@link _Frame} class, available under `fin.Frame`.
10226
10226
  */
10227
- class _FrameModule extends base_1$b.Base {
10227
+ class _FrameModule extends base_1$c.Base {
10228
10228
  /**
10229
10229
  * Asynchronously returns an API handle for the given Frame identity.
10230
10230
  *
@@ -10345,12 +10345,12 @@ var globalHotkey = {};
10345
10345
 
10346
10346
  Object.defineProperty(globalHotkey, "__esModule", { value: true });
10347
10347
  globalHotkey.GlobalHotkey = void 0;
10348
- const base_1$a = base;
10348
+ const base_1$b = base;
10349
10349
  /**
10350
10350
  * The GlobalHotkey module can register/unregister a global hotkeys.
10351
10351
  *
10352
10352
  */
10353
- class GlobalHotkey extends base_1$a.EmitterBase {
10353
+ class GlobalHotkey extends base_1$b.EmitterBase {
10354
10354
  /**
10355
10355
  * @internal
10356
10356
  */
@@ -10484,13 +10484,13 @@ var Factory$3 = {};
10484
10484
 
10485
10485
  var Instance$2 = {};
10486
10486
 
10487
- var __classPrivateFieldSet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10487
+ var __classPrivateFieldSet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10488
10488
  if (kind === "m") throw new TypeError("Private method is not writable");
10489
10489
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10490
10490
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
10491
10491
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
10492
10492
  };
10493
- var __classPrivateFieldGet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10493
+ var __classPrivateFieldGet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10494
10494
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10495
10495
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10496
10496
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -10499,14 +10499,14 @@ var _Platform_channelName, _Platform_connectToProvider;
10499
10499
  Object.defineProperty(Instance$2, "__esModule", { value: true });
10500
10500
  Instance$2.Platform = void 0;
10501
10501
  /* eslint-disable import/prefer-default-export, no-undef */
10502
- const base_1$9 = base;
10502
+ const base_1$a = base;
10503
10503
  const validate_1$1 = validate;
10504
10504
  /** Manages the life cycle of windows and views in the application.
10505
10505
  *
10506
10506
  * Enables taking snapshots of itself and applying them to restore a previous configuration
10507
10507
  * as well as listen to {@link OpenFin.PlatformEvents platform events}.
10508
10508
  */
10509
- class Platform extends base_1$9.EmitterBase {
10509
+ class Platform extends base_1$a.EmitterBase {
10510
10510
  /**
10511
10511
  * @internal
10512
10512
  */
@@ -10527,24 +10527,24 @@ class Platform extends base_1$9.EmitterBase {
10527
10527
  this.wire.sendAction('platform-get-client', this.identity).catch((e) => {
10528
10528
  // don't expose
10529
10529
  });
10530
- if (!Platform.clientMap.has(__classPrivateFieldGet$9(this, _Platform_channelName, "f"))) {
10531
- const clientPromise = __classPrivateFieldGet$9(this, _Platform_connectToProvider, "f").call(this);
10532
- Platform.clientMap.set(__classPrivateFieldGet$9(this, _Platform_channelName, "f"), clientPromise);
10530
+ if (!Platform.clientMap.has(__classPrivateFieldGet$a(this, _Platform_channelName, "f"))) {
10531
+ const clientPromise = __classPrivateFieldGet$a(this, _Platform_connectToProvider, "f").call(this);
10532
+ Platform.clientMap.set(__classPrivateFieldGet$a(this, _Platform_channelName, "f"), clientPromise);
10533
10533
  }
10534
10534
  // we set it above
10535
10535
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
10536
- return Platform.clientMap.get(__classPrivateFieldGet$9(this, _Platform_channelName, "f"));
10536
+ return Platform.clientMap.get(__classPrivateFieldGet$a(this, _Platform_channelName, "f"));
10537
10537
  };
10538
10538
  _Platform_connectToProvider.set(this, async () => {
10539
10539
  try {
10540
- const client = await this._channel.connect(__classPrivateFieldGet$9(this, _Platform_channelName, "f"), { wait: false });
10540
+ const client = await this._channel.connect(__classPrivateFieldGet$a(this, _Platform_channelName, "f"), { wait: false });
10541
10541
  client.onDisconnection(() => {
10542
- Platform.clientMap.delete(__classPrivateFieldGet$9(this, _Platform_channelName, "f"));
10542
+ Platform.clientMap.delete(__classPrivateFieldGet$a(this, _Platform_channelName, "f"));
10543
10543
  });
10544
10544
  return client;
10545
10545
  }
10546
10546
  catch (e) {
10547
- Platform.clientMap.delete(__classPrivateFieldGet$9(this, _Platform_channelName, "f"));
10547
+ Platform.clientMap.delete(__classPrivateFieldGet$a(this, _Platform_channelName, "f"));
10548
10548
  throw new Error('The targeted Platform is not currently running. Listen for application-started event for the given Uuid.');
10549
10549
  }
10550
10550
  });
@@ -10557,7 +10557,7 @@ class Platform extends base_1$9.EmitterBase {
10557
10557
  if (errorMsg) {
10558
10558
  throw new Error(errorMsg);
10559
10559
  }
10560
- __classPrivateFieldSet$8(this, _Platform_channelName, channelName, "f");
10560
+ __classPrivateFieldSet$9(this, _Platform_channelName, channelName, "f");
10561
10561
  this._channel = this.fin.InterApplicationBus.Channel;
10562
10562
  this.identity = { uuid: identity.uuid };
10563
10563
  this.Layout = this.fin.Platform.Layout;
@@ -11613,13 +11613,13 @@ const createRelayedDispatch = (client, target, relayId, relayErrorMsg) => async
11613
11613
  };
11614
11614
  channelApiRelay.createRelayedDispatch = createRelayedDispatch;
11615
11615
 
11616
- var __classPrivateFieldSet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11616
+ var __classPrivateFieldSet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11617
11617
  if (kind === "m") throw new TypeError("Private method is not writable");
11618
11618
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
11619
11619
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
11620
11620
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11621
11621
  };
11622
- var __classPrivateFieldGet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11622
+ var __classPrivateFieldGet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11623
11623
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
11624
11624
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11625
11625
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -11673,7 +11673,7 @@ class LayoutNode {
11673
11673
  * console.log(`The parent ColumnOrRow is root: ${parentIsRoot}`);
11674
11674
  * ```
11675
11675
  */
11676
- this.isRoot = () => __classPrivateFieldGet$8(this, _LayoutNode_client, "f").isRoot(this.entityId);
11676
+ this.isRoot = () => __classPrivateFieldGet$9(this, _LayoutNode_client, "f").isRoot(this.entityId);
11677
11677
  /**
11678
11678
  * Checks if the TabStack or ColumnOrRow exists
11679
11679
  *
@@ -11693,7 +11693,7 @@ class LayoutNode {
11693
11693
  * console.log(`The entity exists: ${exists}`);
11694
11694
  * ```
11695
11695
  */
11696
- this.exists = () => __classPrivateFieldGet$8(this, _LayoutNode_client, "f").exists(this.entityId);
11696
+ this.exists = () => __classPrivateFieldGet$9(this, _LayoutNode_client, "f").exists(this.entityId);
11697
11697
  /**
11698
11698
  * Retrieves the parent of the TabStack or ColumnOrRow
11699
11699
  *
@@ -11714,11 +11714,11 @@ class LayoutNode {
11714
11714
  * ```
11715
11715
  */
11716
11716
  this.getParent = async () => {
11717
- const parent = await __classPrivateFieldGet$8(this, _LayoutNode_client, "f").getParent(this.entityId);
11717
+ const parent = await __classPrivateFieldGet$9(this, _LayoutNode_client, "f").getParent(this.entityId);
11718
11718
  if (!parent) {
11719
11719
  return undefined;
11720
11720
  }
11721
- return LayoutNode.getEntity(parent, __classPrivateFieldGet$8(this, _LayoutNode_client, "f"));
11721
+ return LayoutNode.getEntity(parent, __classPrivateFieldGet$9(this, _LayoutNode_client, "f"));
11722
11722
  };
11723
11723
  /**
11724
11724
  * Creates a new TabStack adjacent to the given TabStack or ColumnOrRow. Inputs can be new views to create, or existing views.
@@ -11769,8 +11769,8 @@ class LayoutNode {
11769
11769
  * @experimental
11770
11770
  */
11771
11771
  this.createAdjacentStack = async (views, options) => {
11772
- const entityId = await __classPrivateFieldGet$8(this, _LayoutNode_client, "f").createAdjacentStack(this.entityId, views, options);
11773
- return LayoutNode.getEntity({ entityId, type: 'stack' }, __classPrivateFieldGet$8(this, _LayoutNode_client, "f"));
11772
+ const entityId = await __classPrivateFieldGet$9(this, _LayoutNode_client, "f").createAdjacentStack(this.entityId, views, options);
11773
+ return LayoutNode.getEntity({ entityId, type: 'stack' }, __classPrivateFieldGet$9(this, _LayoutNode_client, "f"));
11774
11774
  };
11775
11775
  /**
11776
11776
  * Retrieves the adjacent TabStacks of the given TabStack or ColumnOrRow.
@@ -11798,16 +11798,16 @@ class LayoutNode {
11798
11798
  * @experimental
11799
11799
  */
11800
11800
  this.getAdjacentStacks = async (edge) => {
11801
- const adjacentStacks = await __classPrivateFieldGet$8(this, _LayoutNode_client, "f").getAdjacentStacks({
11801
+ const adjacentStacks = await __classPrivateFieldGet$9(this, _LayoutNode_client, "f").getAdjacentStacks({
11802
11802
  targetId: this.entityId,
11803
11803
  edge
11804
11804
  });
11805
11805
  return adjacentStacks.map((stack) => LayoutNode.getEntity({
11806
11806
  type: 'stack',
11807
11807
  entityId: stack.entityId
11808
- }, __classPrivateFieldGet$8(this, _LayoutNode_client, "f")));
11808
+ }, __classPrivateFieldGet$9(this, _LayoutNode_client, "f")));
11809
11809
  };
11810
- __classPrivateFieldSet$7(this, _LayoutNode_client, client, "f");
11810
+ __classPrivateFieldSet$8(this, _LayoutNode_client, client, "f");
11811
11811
  this.entityId = entityId;
11812
11812
  }
11813
11813
  }
@@ -11880,7 +11880,7 @@ class TabStack extends LayoutNode {
11880
11880
  * ```
11881
11881
  * @experimental
11882
11882
  */
11883
- this.getViews = () => __classPrivateFieldGet$8(this, _TabStack_client, "f").getStackViews(this.entityId);
11883
+ this.getViews = () => __classPrivateFieldGet$9(this, _TabStack_client, "f").getStackViews(this.entityId);
11884
11884
  /**
11885
11885
  * Adds or creates a view in this {@link TabStack}.
11886
11886
  *
@@ -11910,7 +11910,7 @@ class TabStack extends LayoutNode {
11910
11910
  * ```
11911
11911
  * @experimental
11912
11912
  */
11913
- this.addView = async (view, options = { index: 0 }) => __classPrivateFieldGet$8(this, _TabStack_client, "f").addViewToStack(this.entityId, view, options);
11913
+ this.addView = async (view, options = { index: 0 }) => __classPrivateFieldGet$9(this, _TabStack_client, "f").addViewToStack(this.entityId, view, options);
11914
11914
  /**
11915
11915
  * Removes a view from this {@link TabStack}.
11916
11916
  *
@@ -11940,7 +11940,7 @@ class TabStack extends LayoutNode {
11940
11940
  * ```
11941
11941
  */
11942
11942
  this.removeView = async (view) => {
11943
- await __classPrivateFieldGet$8(this, _TabStack_client, "f").removeViewFromStack(this.entityId, view);
11943
+ await __classPrivateFieldGet$9(this, _TabStack_client, "f").removeViewFromStack(this.entityId, view);
11944
11944
  };
11945
11945
  /**
11946
11946
  * Sets the active view of the {@link TabStack} without focusing it.
@@ -11964,9 +11964,9 @@ class TabStack extends LayoutNode {
11964
11964
  * @experimental
11965
11965
  */
11966
11966
  this.setActiveView = async (view) => {
11967
- await __classPrivateFieldGet$8(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
11967
+ await __classPrivateFieldGet$9(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
11968
11968
  };
11969
- __classPrivateFieldSet$7(this, _TabStack_client, client, "f");
11969
+ __classPrivateFieldSet$8(this, _TabStack_client, client, "f");
11970
11970
  }
11971
11971
  }
11972
11972
  layoutEntities.TabStack = TabStack;
@@ -12005,10 +12005,10 @@ class ColumnOrRow extends LayoutNode {
12005
12005
  * ```
12006
12006
  */
12007
12007
  this.getContent = async () => {
12008
- const contentItemEntities = await __classPrivateFieldGet$8(this, _ColumnOrRow_client, "f").getContent(this.entityId);
12009
- return contentItemEntities.map((entity) => LayoutNode.getEntity(entity, __classPrivateFieldGet$8(this, _ColumnOrRow_client, "f")));
12008
+ const contentItemEntities = await __classPrivateFieldGet$9(this, _ColumnOrRow_client, "f").getContent(this.entityId);
12009
+ return contentItemEntities.map((entity) => LayoutNode.getEntity(entity, __classPrivateFieldGet$9(this, _ColumnOrRow_client, "f")));
12010
12010
  };
12011
- __classPrivateFieldSet$7(this, _ColumnOrRow_client, client, "f");
12011
+ __classPrivateFieldSet$8(this, _ColumnOrRow_client, client, "f");
12012
12012
  this.type = type;
12013
12013
  }
12014
12014
  }
@@ -12023,7 +12023,7 @@ layout_constants.LAYOUT_CONTROLLER_ID = 'layout-entities';
12023
12023
  // TODO: eventually export this somehow
12024
12024
  layout_constants.DEFAULT_LAYOUT_KEY = '__default__';
12025
12025
 
12026
- var __classPrivateFieldGet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12026
+ var __classPrivateFieldGet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12027
12027
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
12028
12028
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
12029
12029
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -12031,9 +12031,9 @@ var __classPrivateFieldGet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateF
12031
12031
  var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
12032
12032
  Object.defineProperty(Instance$1, "__esModule", { value: true });
12033
12033
  Instance$1.Layout = void 0;
12034
- const lazy_1$1 = lazy;
12034
+ const lazy_1$2 = lazy;
12035
12035
  const validate_1 = validate;
12036
- const base_1$8 = base;
12036
+ const base_1$9 = base;
12037
12037
  const common_utils_1$1 = commonUtils;
12038
12038
  const layout_entities_1 = layoutEntities;
12039
12039
  const layout_constants_1$1 = layout_constants;
@@ -12169,12 +12169,12 @@ const layout_constants_1$1 = layout_constants;
12169
12169
  * }
12170
12170
  * ```
12171
12171
  */
12172
- class Layout extends base_1$8.Base {
12172
+ class Layout extends base_1$9.Base {
12173
12173
  /**
12174
12174
  * @internal
12175
12175
  */
12176
12176
  static getClient(layout) {
12177
- return __classPrivateFieldGet$7(layout, _Layout_layoutClient, "f").getValue();
12177
+ return __classPrivateFieldGet$8(layout, _Layout_layoutClient, "f").getValue();
12178
12178
  }
12179
12179
  /**
12180
12180
  * @internal
@@ -12188,7 +12188,7 @@ class Layout extends base_1$8.Base {
12188
12188
  * Lazily constructed {@link LayoutEntitiesClient} bound to this platform's client and identity
12189
12189
  * The client is for {@link LayoutEntitiesController}
12190
12190
  */
12191
- _Layout_layoutClient.set(this, new lazy_1$1.Lazy(async () => layout_entities_1.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(), layout_constants_1$1.LAYOUT_CONTROLLER_ID, this.identity)));
12191
+ _Layout_layoutClient.set(this, new lazy_1$2.Lazy(async () => layout_entities_1.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(), layout_constants_1$1.LAYOUT_CONTROLLER_ID, this.identity)));
12192
12192
  /**
12193
12193
  * Replaces a Platform window's layout with a new layout.
12194
12194
  *
@@ -12397,7 +12397,7 @@ class Layout extends base_1$8.Base {
12397
12397
  this.wire.sendAction('layout-get-root-item').catch(() => {
12398
12398
  // don't expose
12399
12399
  });
12400
- const client = await __classPrivateFieldGet$7(this, _Layout_layoutClient, "f").getValue();
12400
+ const client = await __classPrivateFieldGet$8(this, _Layout_layoutClient, "f").getValue();
12401
12401
  const root = await client.getRoot('layoutName' in this.identity ? this.identity : undefined);
12402
12402
  return layout_entities_1.LayoutNode.getEntity(root, client);
12403
12403
  }
@@ -12415,7 +12415,7 @@ class Layout extends base_1$8.Base {
12415
12415
  this.wire.sendAction('layout-get-stack-by-view').catch(() => {
12416
12416
  // don't expose
12417
12417
  });
12418
- const client = await __classPrivateFieldGet$7(this, _Layout_layoutClient, "f").getValue();
12418
+ const client = await __classPrivateFieldGet$8(this, _Layout_layoutClient, "f").getValue();
12419
12419
  const stack = await client.getStackByView(identity);
12420
12420
  if (!stack) {
12421
12421
  throw new Error(`No stack found for view: ${identity.uuid}/${identity.name}`);
@@ -12435,7 +12435,7 @@ class Layout extends base_1$8.Base {
12435
12435
  this.wire.sendAction('layout-add-view').catch((e) => {
12436
12436
  // don't expose
12437
12437
  });
12438
- const { identity } = await __classPrivateFieldGet$7(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-add-view', {
12438
+ const { identity } = await __classPrivateFieldGet$8(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-add-view', {
12439
12439
  viewOptions,
12440
12440
  location,
12441
12441
  targetView
@@ -12453,7 +12453,7 @@ class Layout extends base_1$8.Base {
12453
12453
  this.wire.sendAction('layout-close-view').catch((e) => {
12454
12454
  // don't expose
12455
12455
  });
12456
- await __classPrivateFieldGet$7(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
12456
+ await __classPrivateFieldGet$8(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
12457
12457
  }
12458
12458
  }
12459
12459
  Instance$1.Layout = Layout;
@@ -12467,12 +12467,12 @@ async function _Layout_forwardLayoutAction(action, payload) {
12467
12467
  return client.dispatch(action, { target: this.identity, opts: payload });
12468
12468
  };
12469
12469
 
12470
- var __classPrivateFieldGet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12470
+ var __classPrivateFieldGet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12471
12471
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
12472
12472
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
12473
12473
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12474
12474
  };
12475
- var __classPrivateFieldSet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12475
+ var __classPrivateFieldSet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12476
12476
  if (kind === "m") throw new TypeError("Private method is not writable");
12477
12477
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
12478
12478
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -12481,13 +12481,13 @@ var __classPrivateFieldSet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateF
12481
12481
  var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getLayoutManagerSpy, _LayoutModule_getSafeLayoutManager;
12482
12482
  Object.defineProperty(Factory$2, "__esModule", { value: true });
12483
12483
  Factory$2.LayoutModule = void 0;
12484
- const base_1$7 = base;
12484
+ const base_1$8 = base;
12485
12485
  const Instance_1$2 = Instance$1;
12486
12486
  const layout_constants_1 = layout_constants;
12487
12487
  /**
12488
12488
  * Static namespace for OpenFin API methods that interact with the {@link Layout} class, available under `fin.Platform.Layout`.
12489
12489
  */
12490
- class LayoutModule extends base_1$7.Base {
12490
+ class LayoutModule extends base_1$8.Base {
12491
12491
  constructor() {
12492
12492
  super(...arguments);
12493
12493
  _LayoutModule_instances.add(this);
@@ -12538,23 +12538,23 @@ class LayoutModule extends base_1$7.Base {
12538
12538
  if (!this.wire.environment.layoutAllowedInContext(this.fin)) {
12539
12539
  throw new Error('Layout.init can only be called from a Window context.');
12540
12540
  }
12541
- if (__classPrivateFieldGet$6(this, _LayoutModule_layoutInitializationAttempted, "f")) {
12541
+ if (__classPrivateFieldGet$7(this, _LayoutModule_layoutInitializationAttempted, "f")) {
12542
12542
  throw new Error('Layout.init was already called, please use Layout.create to add additional layouts.');
12543
12543
  }
12544
12544
  if (this.wire.environment.type === 'openfin') {
12545
12545
  // preload the client
12546
12546
  await this.fin.Platform.getCurrentSync().getClient();
12547
12547
  }
12548
- __classPrivateFieldSet$6(this, _LayoutModule_layoutInitializationAttempted, true, "f");
12548
+ __classPrivateFieldSet$7(this, _LayoutModule_layoutInitializationAttempted, true, "f");
12549
12549
  // TODO: rename to createLayoutManager
12550
- __classPrivateFieldSet$6(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
12551
- await this.wire.environment.applyLayoutSnapshot(this.fin, __classPrivateFieldGet$6(this, _LayoutModule_layoutManager, "f"), options);
12550
+ __classPrivateFieldSet$7(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
12551
+ await this.wire.environment.applyLayoutSnapshot(this.fin, __classPrivateFieldGet$7(this, _LayoutModule_layoutManager, "f"), options);
12552
12552
  const meIdentity = { name: this.fin.me.name, uuid: this.fin.me.uuid };
12553
12553
  if (!options.layoutManagerOverride) {
12554
12554
  // CORE-1081 to be removed when we actually delete the `layoutManager` prop
12555
12555
  // in single-layout case, we return the undocumented layoutManager type
12556
12556
  const layoutIdentity = { layoutName: layout_constants_1.DEFAULT_LAYOUT_KEY, ...meIdentity };
12557
- return __classPrivateFieldGet$6(this, _LayoutModule_getLayoutManagerSpy, "f").call(this, layoutIdentity);
12557
+ return __classPrivateFieldGet$7(this, _LayoutModule_getLayoutManagerSpy, "f").call(this, layoutIdentity);
12558
12558
  }
12559
12559
  return this.wrapSync(meIdentity);
12560
12560
  };
@@ -12583,13 +12583,13 @@ class LayoutModule extends base_1$7.Base {
12583
12583
  * @returns
12584
12584
  */
12585
12585
  this.getCurrentLayoutManagerSync = () => {
12586
- return __classPrivateFieldGet$6(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
12586
+ return __classPrivateFieldGet$7(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
12587
12587
  };
12588
12588
  this.create = async (options) => {
12589
- return this.wire.environment.createLayout(__classPrivateFieldGet$6(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.create()`), options);
12589
+ return this.wire.environment.createLayout(__classPrivateFieldGet$7(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.create()`), options);
12590
12590
  };
12591
12591
  this.destroy = async (layoutIdentity) => {
12592
- return this.wire.environment.destroyLayout(__classPrivateFieldGet$6(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.destroy()`), layoutIdentity);
12592
+ return this.wire.environment.destroyLayout(__classPrivateFieldGet$7(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.destroy()`), layoutIdentity);
12593
12593
  };
12594
12594
  }
12595
12595
  /**
@@ -12730,10 +12730,10 @@ class LayoutModule extends base_1$7.Base {
12730
12730
  }
12731
12731
  Factory$2.LayoutModule = LayoutModule;
12732
12732
  _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getLayoutManagerSpy = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_getSafeLayoutManager = function _LayoutModule_getSafeLayoutManager(method) {
12733
- if (!__classPrivateFieldGet$6(this, _LayoutModule_layoutManager, "f")) {
12733
+ if (!__classPrivateFieldGet$7(this, _LayoutModule_layoutManager, "f")) {
12734
12734
  throw new Error(`You must call init before using the API ${method}`);
12735
12735
  }
12736
- return __classPrivateFieldGet$6(this, _LayoutModule_layoutManager, "f");
12736
+ return __classPrivateFieldGet$7(this, _LayoutModule_layoutManager, "f");
12737
12737
  };
12738
12738
 
12739
12739
  (function (exports) {
@@ -12770,13 +12770,13 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layou
12770
12770
 
12771
12771
  Object.defineProperty(Factory$3, "__esModule", { value: true });
12772
12772
  Factory$3.PlatformModule = void 0;
12773
- const base_1$6 = base;
12773
+ const base_1$7 = base;
12774
12774
  const Instance_1$1 = Instance$2;
12775
12775
  const index_1$1 = layout;
12776
12776
  /**
12777
12777
  * Static namespace for OpenFin API methods that interact with the {@link Platform} class, available under `fin.Platform`.
12778
12778
  */
12779
- class PlatformModule extends base_1$6.Base {
12779
+ class PlatformModule extends base_1$7.Base {
12780
12780
  /**
12781
12781
  * @internal
12782
12782
  */
@@ -13696,13 +13696,13 @@ class PrivateChannelProvider {
13696
13696
  }
13697
13697
  PrivateChannelProvider$1.PrivateChannelProvider = PrivateChannelProvider;
13698
13698
 
13699
- var __classPrivateFieldSet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13699
+ var __classPrivateFieldSet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13700
13700
  if (kind === "m") throw new TypeError("Private method is not writable");
13701
13701
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
13702
13702
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
13703
13703
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
13704
13704
  };
13705
- var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13705
+ var __classPrivateFieldGet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13706
13706
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13707
13707
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
13708
13708
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -13713,12 +13713,12 @@ var __importDefault$4 = (commonjsGlobal && commonjsGlobal.__importDefault) || fu
13713
13713
  var _InteropBroker_fdc3Info, _InteropBroker_contextGroups, _InteropBroker_providerPromise;
13714
13714
  Object.defineProperty(InteropBroker$1, "__esModule", { value: true });
13715
13715
  InteropBroker$1.InteropBroker = void 0;
13716
- const base_1$5 = base;
13716
+ const base_1$6 = base;
13717
13717
  const SessionContextGroupBroker_1 = __importDefault$4(SessionContextGroupBroker$1);
13718
13718
  const utils_1$7 = utils$3;
13719
13719
  const isEqual_1$1 = __importDefault$4(require$$3);
13720
13720
  const PrivateChannelProvider_1 = PrivateChannelProvider$1;
13721
- const lazy_1 = lazy;
13721
+ const lazy_1$1 = lazy;
13722
13722
  const defaultContextGroups = [
13723
13723
  {
13724
13724
  id: 'green',
@@ -13882,7 +13882,7 @@ const defaultContextGroups = [
13882
13882
  * ---
13883
13883
  *
13884
13884
  */
13885
- class InteropBroker extends base_1$5.Base {
13885
+ class InteropBroker extends base_1$6.Base {
13886
13886
  /**
13887
13887
  * @internal
13888
13888
  */
@@ -13893,19 +13893,19 @@ class InteropBroker extends base_1$5.Base {
13893
13893
  _InteropBroker_contextGroups.set(this, void 0);
13894
13894
  _InteropBroker_providerPromise.set(this, void 0);
13895
13895
  this.getProvider = () => {
13896
- return __classPrivateFieldGet$5(this, _InteropBroker_providerPromise, "f").getValue();
13896
+ return __classPrivateFieldGet$6(this, _InteropBroker_providerPromise, "f").getValue();
13897
13897
  };
13898
13898
  this.interopClients = new Map();
13899
13899
  this.contextGroupsById = new Map();
13900
- __classPrivateFieldSet$5(this, _InteropBroker_contextGroups, options.contextGroups ?? [...defaultContextGroups], "f");
13901
- __classPrivateFieldSet$5(this, _InteropBroker_fdc3Info, options.fdc3Info, "f");
13900
+ __classPrivateFieldSet$6(this, _InteropBroker_contextGroups, options.contextGroups ?? [...defaultContextGroups], "f");
13901
+ __classPrivateFieldSet$6(this, _InteropBroker_fdc3Info, options.fdc3Info, "f");
13902
13902
  if (options?.logging) {
13903
13903
  this.logging = options.logging;
13904
13904
  }
13905
13905
  this.intentClientMap = new Map();
13906
13906
  this.lastContextMap = new Map();
13907
13907
  this.sessionContextGroupMap = new Map();
13908
- __classPrivateFieldSet$5(this, _InteropBroker_providerPromise, new lazy_1.Lazy(createProvider), "f");
13908
+ __classPrivateFieldSet$6(this, _InteropBroker_providerPromise, new lazy_1$1.Lazy(createProvider), "f");
13909
13909
  this.setContextGroupMap();
13910
13910
  this.setupChannelProvider();
13911
13911
  }
@@ -14173,7 +14173,7 @@ class InteropBroker extends base_1$5.Base {
14173
14173
  // don't expose, analytics-only call
14174
14174
  });
14175
14175
  // Create copy for immutability
14176
- return __classPrivateFieldGet$5(this, _InteropBroker_contextGroups, "f").map((contextGroup) => {
14176
+ return __classPrivateFieldGet$6(this, _InteropBroker_contextGroups, "f").map((contextGroup) => {
14177
14177
  return { ...contextGroup };
14178
14178
  });
14179
14179
  }
@@ -14584,7 +14584,7 @@ class InteropBroker extends base_1$5.Base {
14584
14584
  const { fdc3Version } = payload;
14585
14585
  return {
14586
14586
  fdc3Version,
14587
- ...__classPrivateFieldGet$5(this, _InteropBroker_fdc3Info, "f"),
14587
+ ...__classPrivateFieldGet$6(this, _InteropBroker_fdc3Info, "f"),
14588
14588
  optionalFeatures: {
14589
14589
  OriginatingAppMetadata: false,
14590
14590
  UserChannelMembershipAPIs: true
@@ -14961,27 +14961,27 @@ var InteropClient$1 = {};
14961
14961
 
14962
14962
  var SessionContextGroupClient$1 = {};
14963
14963
 
14964
- var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14964
+ var __classPrivateFieldSet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14965
14965
  if (kind === "m") throw new TypeError("Private method is not writable");
14966
14966
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14967
14967
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
14968
14968
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
14969
14969
  };
14970
- var __classPrivateFieldGet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14970
+ var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14971
14971
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14972
14972
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14973
14973
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
14974
14974
  };
14975
14975
  var _SessionContextGroupClient_clientPromise;
14976
14976
  Object.defineProperty(SessionContextGroupClient$1, "__esModule", { value: true });
14977
- const base_1$4 = base;
14977
+ const base_1$5 = base;
14978
14978
  const utils_1$6 = utils$3;
14979
- class SessionContextGroupClient extends base_1$4.Base {
14979
+ class SessionContextGroupClient extends base_1$5.Base {
14980
14980
  constructor(wire, client, id) {
14981
14981
  super(wire);
14982
14982
  _SessionContextGroupClient_clientPromise.set(this, void 0);
14983
14983
  this.id = id;
14984
- __classPrivateFieldSet$4(this, _SessionContextGroupClient_clientPromise, client, "f");
14984
+ __classPrivateFieldSet$5(this, _SessionContextGroupClient_clientPromise, client, "f");
14985
14985
  }
14986
14986
  /**
14987
14987
  * Sets a context for the session context group.
@@ -14993,7 +14993,7 @@ class SessionContextGroupClient extends base_1$4.Base {
14993
14993
  this.wire.sendAction('interop-session-context-group-set-context').catch((e) => {
14994
14994
  // don't expose, analytics-only call
14995
14995
  });
14996
- const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
14996
+ const client = await __classPrivateFieldGet$5(this, _SessionContextGroupClient_clientPromise, "f");
14997
14997
  return client.dispatch(`sessionContextGroup:setContext-${this.id}`, {
14998
14998
  sessionContextGroupId: this.id,
14999
14999
  context
@@ -15003,7 +15003,7 @@ class SessionContextGroupClient extends base_1$4.Base {
15003
15003
  this.wire.sendAction('interop-session-context-group-get-context').catch((e) => {
15004
15004
  // don't expose, analytics-only call
15005
15005
  });
15006
- const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
15006
+ const client = await __classPrivateFieldGet$5(this, _SessionContextGroupClient_clientPromise, "f");
15007
15007
  return client.dispatch(`sessionContextGroup:getContext-${this.id}`, {
15008
15008
  sessionContextGroupId: this.id,
15009
15009
  type
@@ -15016,7 +15016,7 @@ class SessionContextGroupClient extends base_1$4.Base {
15016
15016
  if (typeof contextHandler !== 'function') {
15017
15017
  throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");
15018
15018
  }
15019
- const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
15019
+ const client = await __classPrivateFieldGet$5(this, _SessionContextGroupClient_clientPromise, "f");
15020
15020
  let handlerId;
15021
15021
  if (contextType) {
15022
15022
  handlerId = `sessionContextHandler:invoke-${this.id}-${contextType}-${(0, utils_1$6.generateId)()}`;
@@ -15029,7 +15029,7 @@ class SessionContextGroupClient extends base_1$4.Base {
15029
15029
  return { unsubscribe: await this.createUnsubscribeCb(handlerId) };
15030
15030
  }
15031
15031
  async createUnsubscribeCb(handlerId) {
15032
- const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
15032
+ const client = await __classPrivateFieldGet$5(this, _SessionContextGroupClient_clientPromise, "f");
15033
15033
  return async () => {
15034
15034
  client.remove(handlerId);
15035
15035
  await client.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`, { handlerId });
@@ -15047,13 +15047,13 @@ class SessionContextGroupClient extends base_1$4.Base {
15047
15047
  SessionContextGroupClient$1.default = SessionContextGroupClient;
15048
15048
  _SessionContextGroupClient_clientPromise = new WeakMap();
15049
15049
 
15050
- var __classPrivateFieldSet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
15050
+ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
15051
15051
  if (kind === "m") throw new TypeError("Private method is not writable");
15052
15052
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
15053
15053
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
15054
15054
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
15055
15055
  };
15056
- var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15056
+ var __classPrivateFieldGet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15057
15057
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
15058
15058
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
15059
15059
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -15064,7 +15064,7 @@ var __importDefault$3 = (commonjsGlobal && commonjsGlobal.__importDefault) || fu
15064
15064
  var _InteropClient_clientPromise, _InteropClient_sessionContextGroups, _InteropClient_fdc3Factory;
15065
15065
  Object.defineProperty(InteropClient$1, "__esModule", { value: true });
15066
15066
  InteropClient$1.InteropClient = void 0;
15067
- const base_1$3 = base;
15067
+ const base_1$4 = base;
15068
15068
  const SessionContextGroupClient_1 = __importDefault$3(SessionContextGroupClient$1);
15069
15069
  const utils_1$5 = utils$3;
15070
15070
  /**
@@ -15116,7 +15116,7 @@ const utils_1$5 = utils$3;
15116
15116
  * * {@link InteropClient#getAllClientsInContextGroup getAllClientsInContextGroup(contextGroupId)}
15117
15117
  *
15118
15118
  */
15119
- class InteropClient extends base_1$3.Base {
15119
+ class InteropClient extends base_1$4.Base {
15120
15120
  /**
15121
15121
  * @internal
15122
15122
  */
@@ -15125,9 +15125,9 @@ class InteropClient extends base_1$3.Base {
15125
15125
  _InteropClient_clientPromise.set(this, void 0);
15126
15126
  _InteropClient_sessionContextGroups.set(this, void 0);
15127
15127
  _InteropClient_fdc3Factory.set(this, void 0);
15128
- __classPrivateFieldSet$3(this, _InteropClient_sessionContextGroups, new Map(), "f");
15129
- __classPrivateFieldSet$3(this, _InteropClient_clientPromise, clientPromise, "f");
15130
- __classPrivateFieldSet$3(this, _InteropClient_fdc3Factory, fdc3Factory, "f");
15128
+ __classPrivateFieldSet$4(this, _InteropClient_sessionContextGroups, new Map(), "f");
15129
+ __classPrivateFieldSet$4(this, _InteropClient_clientPromise, clientPromise, "f");
15130
+ __classPrivateFieldSet$4(this, _InteropClient_fdc3Factory, fdc3Factory, "f");
15131
15131
  }
15132
15132
  /*
15133
15133
  Client APIs
@@ -15155,7 +15155,7 @@ class InteropClient extends base_1$3.Base {
15155
15155
  this.wire.sendAction('interop-client-set-context').catch((e) => {
15156
15156
  // don't expose, analytics-only call
15157
15157
  });
15158
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15158
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15159
15159
  return client.dispatch('setContext', { context });
15160
15160
  }
15161
15161
  /**
@@ -15222,7 +15222,7 @@ class InteropClient extends base_1$3.Base {
15222
15222
  if (typeof handler !== 'function') {
15223
15223
  throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");
15224
15224
  }
15225
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15225
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15226
15226
  let handlerId;
15227
15227
  if (contextType) {
15228
15228
  handlerId = `invokeContextHandler-${contextType}-${(0, utils_1$5.generateId)()}`;
@@ -15262,7 +15262,7 @@ class InteropClient extends base_1$3.Base {
15262
15262
  this.wire.sendAction('interop-client-get-context-groups').catch((e) => {
15263
15263
  // don't expose, analytics-only call
15264
15264
  });
15265
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15265
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15266
15266
  return client.dispatch('getContextGroups');
15267
15267
  }
15268
15268
  /**
@@ -15293,7 +15293,7 @@ class InteropClient extends base_1$3.Base {
15293
15293
  this.wire.sendAction('interop-client-join-context-group').catch((e) => {
15294
15294
  // don't expose, analytics-only call
15295
15295
  });
15296
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15296
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15297
15297
  if (!contextGroupId) {
15298
15298
  throw new Error('No contextGroupId specified for joinContextGroup.');
15299
15299
  }
@@ -15322,7 +15322,7 @@ class InteropClient extends base_1$3.Base {
15322
15322
  this.wire.sendAction('interop-client-remove-from-context-group').catch((e) => {
15323
15323
  // don't expose, analytics-only call
15324
15324
  });
15325
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15325
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15326
15326
  return client.dispatch('removeFromContextGroup', { target });
15327
15327
  }
15328
15328
  /**
@@ -15345,7 +15345,7 @@ class InteropClient extends base_1$3.Base {
15345
15345
  this.wire.sendAction('interop-client-get-all-clients-in-context-group').catch((e) => {
15346
15346
  // don't expose, analytics-only call
15347
15347
  });
15348
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15348
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15349
15349
  if (!contextGroupId) {
15350
15350
  throw new Error('No contextGroupId specified for getAllClientsInContextGroup.');
15351
15351
  }
@@ -15370,7 +15370,7 @@ class InteropClient extends base_1$3.Base {
15370
15370
  this.wire.sendAction('interop-client-get-info-for-context-group').catch((e) => {
15371
15371
  // don't expose, analytics-only call
15372
15372
  });
15373
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15373
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15374
15374
  if (!contextGroupId) {
15375
15375
  throw new Error('No contextGroupId specified for getInfoForContextGroup.');
15376
15376
  }
@@ -15398,7 +15398,7 @@ class InteropClient extends base_1$3.Base {
15398
15398
  this.wire.sendAction('interop-client-fire-intent').catch((e) => {
15399
15399
  // don't expose, this is only for api analytics purposes
15400
15400
  });
15401
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15401
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15402
15402
  return client.dispatch('fireIntent', intent);
15403
15403
  }
15404
15404
  /**
@@ -15425,7 +15425,7 @@ class InteropClient extends base_1$3.Base {
15425
15425
  this.wire.sendAction('interop-client-register-intent-handler').catch((e) => {
15426
15426
  // don't expose, this is only for api analytics purposes
15427
15427
  });
15428
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15428
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15429
15429
  const handlerId = `intent-handler-${intentName}`;
15430
15430
  const wrappedHandler = (0, utils_1$5.wrapIntentHandler)(handler, handlerId);
15431
15431
  try {
@@ -15463,7 +15463,7 @@ class InteropClient extends base_1$3.Base {
15463
15463
  this.wire.sendAction('interop-client-get-current-context').catch((e) => {
15464
15464
  // don't expose, analytics-only call
15465
15465
  });
15466
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15466
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15467
15467
  return client.dispatch('getCurrentContext', { contextType });
15468
15468
  }
15469
15469
  /**
@@ -15483,7 +15483,7 @@ class InteropClient extends base_1$3.Base {
15483
15483
  this.wire.sendAction('interop-client-get-info-for-intent').catch((e) => {
15484
15484
  // don't expose, analytics-only call
15485
15485
  });
15486
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15486
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15487
15487
  return client.dispatch('getInfoForIntent', options);
15488
15488
  }
15489
15489
  /**
@@ -15514,7 +15514,7 @@ class InteropClient extends base_1$3.Base {
15514
15514
  this.wire.sendAction('interop-client-get-info-for-intents-by-context').catch((e) => {
15515
15515
  // don't expose, analytics-only call
15516
15516
  });
15517
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15517
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15518
15518
  return client.dispatch('getInfoForIntentsByContext', context);
15519
15519
  }
15520
15520
  /**
@@ -15546,7 +15546,7 @@ class InteropClient extends base_1$3.Base {
15546
15546
  this.wire.sendAction('interop-client-fire-intent-for-context').catch((e) => {
15547
15547
  // don't expose, analytics-only call
15548
15548
  });
15549
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15549
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15550
15550
  return client.dispatch('fireIntentForContext', context);
15551
15551
  }
15552
15552
  /**
@@ -15583,19 +15583,19 @@ class InteropClient extends base_1$3.Base {
15583
15583
  */
15584
15584
  async joinSessionContextGroup(sessionContextGroupId) {
15585
15585
  try {
15586
- const currentSessionContextGroup = __classPrivateFieldGet$3(this, _InteropClient_sessionContextGroups, "f").get(sessionContextGroupId);
15586
+ const currentSessionContextGroup = __classPrivateFieldGet$4(this, _InteropClient_sessionContextGroups, "f").get(sessionContextGroupId);
15587
15587
  if (currentSessionContextGroup) {
15588
15588
  return currentSessionContextGroup.getUserInstance();
15589
15589
  }
15590
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15590
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15591
15591
  const { hasConflict } = await client.dispatch('sessionContextGroup:createIfNeeded', {
15592
15592
  sessionContextGroupId
15593
15593
  });
15594
15594
  if (hasConflict) {
15595
15595
  console.warn(`A (non-session) context group with the name "${sessionContextGroupId}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);
15596
15596
  }
15597
- const newSessionContextGroup = new SessionContextGroupClient_1.default(this.wire, __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
15598
- __classPrivateFieldGet$3(this, _InteropClient_sessionContextGroups, "f").set(sessionContextGroupId, newSessionContextGroup);
15597
+ const newSessionContextGroup = new SessionContextGroupClient_1.default(this.wire, __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
15598
+ __classPrivateFieldGet$4(this, _InteropClient_sessionContextGroups, "f").set(sessionContextGroupId, newSessionContextGroup);
15599
15599
  return newSessionContextGroup.getUserInstance();
15600
15600
  }
15601
15601
  catch (error) {
@@ -15622,14 +15622,14 @@ class InteropClient extends base_1$3.Base {
15622
15622
  this.wire.sendAction('interop-client-add-ondisconnection-listener').catch((e) => {
15623
15623
  // don't expose, analytics-only call
15624
15624
  });
15625
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15625
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15626
15626
  return client.onDisconnection((event) => {
15627
15627
  const { uuid } = event;
15628
15628
  listener({ type: 'interop-broker', topic: 'disconnected', brokerName: uuid });
15629
15629
  });
15630
15630
  }
15631
15631
  getFDC3Sync(version) {
15632
- return __classPrivateFieldGet$3(this, _InteropClient_fdc3Factory, "f").call(this, version, this, this.wire);
15632
+ return __classPrivateFieldGet$4(this, _InteropClient_fdc3Factory, "f").call(this, version, this, this.wire);
15633
15633
  }
15634
15634
  async getFDC3(version) {
15635
15635
  return this.getFDC3Sync(version);
@@ -15640,7 +15640,7 @@ class InteropClient extends base_1$3.Base {
15640
15640
  * Used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
15641
15641
  */
15642
15642
  static async ferryFdc3Call(interopClient, action, payload) {
15643
- const client = await __classPrivateFieldGet$3(interopClient, _InteropClient_clientPromise, "f");
15643
+ const client = await __classPrivateFieldGet$4(interopClient, _InteropClient_clientPromise, "f");
15644
15644
  return client.dispatch(action, payload || null);
15645
15645
  }
15646
15646
  }
@@ -16055,12 +16055,12 @@ PrivateChannelClient$1.PrivateChannelClient = PrivateChannelClient;
16055
16055
  exports.getIntentResolution = getIntentResolution;
16056
16056
  } (utils$2));
16057
16057
 
16058
- var __classPrivateFieldGet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16058
+ var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16059
16059
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
16060
16060
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
16061
16061
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
16062
16062
  };
16063
- var __classPrivateFieldSet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16063
+ var __classPrivateFieldSet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16064
16064
  if (kind === "m") throw new TypeError("Private method is not writable");
16065
16065
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
16066
16066
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -16078,7 +16078,7 @@ const InteropClient_1$2 = InteropClient$1;
16078
16078
  const isEqual_1 = __importDefault$2(require$$3);
16079
16079
  class FDC3ModuleBase {
16080
16080
  get client() {
16081
- return __classPrivateFieldGet$2(this, _FDC3ModuleBase_producer, "f").call(this);
16081
+ return __classPrivateFieldGet$3(this, _FDC3ModuleBase_producer, "f").call(this);
16082
16082
  }
16083
16083
  get fin() {
16084
16084
  return this.wire.getFin();
@@ -16087,7 +16087,7 @@ class FDC3ModuleBase {
16087
16087
  constructor(producer, wire) {
16088
16088
  this.wire = wire;
16089
16089
  _FDC3ModuleBase_producer.set(this, void 0);
16090
- __classPrivateFieldSet$2(this, _FDC3ModuleBase_producer, producer, "f");
16090
+ __classPrivateFieldSet$3(this, _FDC3ModuleBase_producer, producer, "f");
16091
16091
  }
16092
16092
  /**
16093
16093
  * Broadcasts a context for the channel of the current entity.
@@ -16868,7 +16868,7 @@ Object.defineProperty(Factory$1, "__esModule", { value: true });
16868
16868
  Factory$1.InteropModule = void 0;
16869
16869
  const cloneDeep_1 = __importDefault$1(require$$0$1);
16870
16870
  const inaccessibleObject_1 = inaccessibleObject;
16871
- const base_1$2 = base;
16871
+ const base_1$3 = base;
16872
16872
  const InteropBroker_1 = InteropBroker$1;
16873
16873
  const InteropClient_1 = InteropClient$1;
16874
16874
  const overrideCheck_1 = overrideCheck$1;
@@ -16880,7 +16880,7 @@ const BrokerParamAccessError = 'You have attempted to use or modify InteropBroke
16880
16880
  * Manages creation of Interop Brokers and Interop Clients. These APIs are called under-the-hood in Platforms.
16881
16881
  *
16882
16882
  */
16883
- class InteropModule extends base_1$2.Base {
16883
+ class InteropModule extends base_1$3.Base {
16884
16884
  /**
16885
16885
  * Initializes an Interop Broker. This is called under-the-hood for Platforms.
16886
16886
  *
@@ -17004,13 +17004,13 @@ const channelPrefix = 'snapshot-source-provider-';
17004
17004
  const getSnapshotSourceChannelName = (id) => `${channelPrefix}${id.uuid}`;
17005
17005
  utils.getSnapshotSourceChannelName = getSnapshotSourceChannelName;
17006
17006
 
17007
- var __classPrivateFieldSet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
17007
+ var __classPrivateFieldSet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
17008
17008
  if (kind === "m") throw new TypeError("Private method is not writable");
17009
17009
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
17010
17010
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
17011
17011
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
17012
17012
  };
17013
- var __classPrivateFieldGet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17013
+ var __classPrivateFieldGet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17014
17014
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
17015
17015
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
17016
17016
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -17019,7 +17019,7 @@ var _SnapshotSource_identity, _SnapshotSource_getConnection, _SnapshotSource_get
17019
17019
  Object.defineProperty(Instance, "__esModule", { value: true });
17020
17020
  Instance.SnapshotSource = void 0;
17021
17021
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
17022
- const base_1$1 = base;
17022
+ const base_1$2 = base;
17023
17023
  const utils_1$1 = utils;
17024
17024
  const connectionMap = new Map();
17025
17025
  /**
@@ -17028,7 +17028,7 @@ const connectionMap = new Map();
17028
17028
  * @typeParam Snapshot Implementation-defined shape of an application snapshot. Allows
17029
17029
  * custom snapshot implementations for legacy applications to define their own snapshot format.
17030
17030
  */
17031
- class SnapshotSource extends base_1$1.Base {
17031
+ class SnapshotSource extends base_1$2.Base {
17032
17032
  /**
17033
17033
  * @internal
17034
17034
  */
@@ -17042,26 +17042,26 @@ class SnapshotSource extends base_1$1.Base {
17042
17042
  return connectionMap.get(this.identity.uuid);
17043
17043
  });
17044
17044
  _SnapshotSource_getClient.set(this, () => {
17045
- if (!__classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise) {
17046
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = __classPrivateFieldGet$1(this, _SnapshotSource_startConnection, "f").call(this);
17045
+ if (!__classPrivateFieldGet$2(this, _SnapshotSource_getConnection, "f").call(this).clientPromise) {
17046
+ __classPrivateFieldGet$2(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = __classPrivateFieldGet$2(this, _SnapshotSource_startConnection, "f").call(this);
17047
17047
  }
17048
- return __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise;
17048
+ return __classPrivateFieldGet$2(this, _SnapshotSource_getConnection, "f").call(this).clientPromise;
17049
17049
  });
17050
17050
  _SnapshotSource_startConnection.set(this, async () => {
17051
17051
  const channelName = (0, utils_1$1.getSnapshotSourceChannelName)(this.identity);
17052
17052
  try {
17053
- if (!__classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired) {
17054
- await __classPrivateFieldGet$1(this, _SnapshotSource_setUpConnectionListener, "f").call(this);
17053
+ if (!__classPrivateFieldGet$2(this, _SnapshotSource_getConnection, "f").call(this).eventFired) {
17054
+ await __classPrivateFieldGet$2(this, _SnapshotSource_setUpConnectionListener, "f").call(this);
17055
17055
  }
17056
17056
  const client = await this.fin.InterApplicationBus.Channel.connect(channelName, { wait: false });
17057
17057
  client.onDisconnection(() => {
17058
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
17059
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired = null;
17058
+ __classPrivateFieldGet$2(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
17059
+ __classPrivateFieldGet$2(this, _SnapshotSource_getConnection, "f").call(this).eventFired = null;
17060
17060
  });
17061
17061
  return client;
17062
17062
  }
17063
17063
  catch (e) {
17064
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
17064
+ __classPrivateFieldGet$2(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
17065
17065
  throw new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.");
17066
17066
  }
17067
17067
  });
@@ -17073,7 +17073,7 @@ class SnapshotSource extends base_1$1.Base {
17073
17073
  resolve = y;
17074
17074
  reject = n;
17075
17075
  });
17076
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired = eventFired;
17076
+ __classPrivateFieldGet$2(this, _SnapshotSource_getConnection, "f").call(this).eventFired = eventFired;
17077
17077
  const listener = async (e) => {
17078
17078
  try {
17079
17079
  if (e.channelName === channelName) {
@@ -17087,10 +17087,10 @@ class SnapshotSource extends base_1$1.Base {
17087
17087
  };
17088
17088
  await this.fin.InterApplicationBus.Channel.on('connected', listener);
17089
17089
  });
17090
- __classPrivateFieldSet$1(this, _SnapshotSource_identity, id, "f");
17090
+ __classPrivateFieldSet$2(this, _SnapshotSource_identity, id, "f");
17091
17091
  }
17092
17092
  get identity() {
17093
- return __classPrivateFieldGet$1(this, _SnapshotSource_identity, "f");
17093
+ return __classPrivateFieldGet$2(this, _SnapshotSource_identity, "f");
17094
17094
  }
17095
17095
  /**
17096
17096
  * Method to determine if the SnapshotSource has been initialized.
@@ -17126,11 +17126,11 @@ class SnapshotSource extends base_1$1.Base {
17126
17126
  // eslint-disable-next-line no-async-promise-executor
17127
17127
  try {
17128
17128
  // If getClient was already called before this, do we have a timing issue where the channel might have been created but we missed the event but this still fails?
17129
- await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
17129
+ await __classPrivateFieldGet$2(this, _SnapshotSource_getClient, "f").call(this);
17130
17130
  }
17131
17131
  catch (e) {
17132
17132
  // it was not running.
17133
- await __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired;
17133
+ await __classPrivateFieldGet$2(this, _SnapshotSource_getConnection, "f").call(this).eventFired;
17134
17134
  }
17135
17135
  }
17136
17136
  /**
@@ -17141,7 +17141,7 @@ class SnapshotSource extends base_1$1.Base {
17141
17141
  this.wire.sendAction('snapshot-source-get-snapshot').catch((e) => {
17142
17142
  // don't expose, analytics-only call
17143
17143
  });
17144
- const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
17144
+ const client = await __classPrivateFieldGet$2(this, _SnapshotSource_getClient, "f").call(this);
17145
17145
  const response = (await client.dispatch('get-snapshot'));
17146
17146
  return (await response).snapshot;
17147
17147
  }
@@ -17153,7 +17153,7 @@ class SnapshotSource extends base_1$1.Base {
17153
17153
  this.wire.sendAction('snapshot-source-apply-snapshot').catch((e) => {
17154
17154
  // don't expose, analytics-only call
17155
17155
  });
17156
- const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
17156
+ const client = await __classPrivateFieldGet$2(this, _SnapshotSource_getClient, "f").call(this);
17157
17157
  return client.dispatch('apply-snapshot', { snapshot });
17158
17158
  }
17159
17159
  }
@@ -17162,13 +17162,13 @@ _SnapshotSource_identity = new WeakMap(), _SnapshotSource_getConnection = new We
17162
17162
 
17163
17163
  Object.defineProperty(Factory, "__esModule", { value: true });
17164
17164
  Factory.SnapshotSourceModule = void 0;
17165
- const base_1 = base;
17165
+ const base_1$1 = base;
17166
17166
  const Instance_1 = Instance;
17167
17167
  const utils_1 = utils;
17168
17168
  /**
17169
17169
  * Static namespace for OpenFin API methods that interact with the {@link SnapshotSource} class, available under `fin.SnapshotSource`.
17170
17170
  */
17171
- class SnapshotSourceModule extends base_1.Base {
17171
+ class SnapshotSourceModule extends base_1$1.Base {
17172
17172
  /**
17173
17173
  * Initializes a SnapshotSource with the getSnapshot and applySnapshot methods defined.
17174
17174
  *
@@ -17274,6 +17274,114 @@ Factory.SnapshotSourceModule = SnapshotSourceModule;
17274
17274
  __exportStar(Instance, exports);
17275
17275
  } (snapshotSource));
17276
17276
 
17277
+ var notificationManager = {};
17278
+
17279
+ var factory = {};
17280
+
17281
+ var instance = {};
17282
+
17283
+ var __classPrivateFieldSet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
17284
+ if (kind === "m") throw new TypeError("Private method is not writable");
17285
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
17286
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
17287
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
17288
+ };
17289
+ var __classPrivateFieldGet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17290
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
17291
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
17292
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
17293
+ };
17294
+ var _NotificationManagerInstance_wire, _NotificationManagerInstance_handler, _NotificationManagerInstance_id, _NotificationManagerInstance_isReceivingNotifications;
17295
+ Object.defineProperty(instance, "__esModule", { value: true });
17296
+ instance.NotificationManagerInstance = void 0;
17297
+ const lazy_1 = lazy;
17298
+ class NotificationManagerInstance {
17299
+ constructor(wire, id) {
17300
+ _NotificationManagerInstance_wire.set(this, void 0);
17301
+ _NotificationManagerInstance_handler.set(this, void 0);
17302
+ _NotificationManagerInstance_id.set(this, void 0);
17303
+ _NotificationManagerInstance_isReceivingNotifications.set(this, new lazy_1.Lazy(async () => {
17304
+ await __classPrivateFieldGet$1(this, _NotificationManagerInstance_wire, "f").registerMessageHandler((message) => {
17305
+ if (message.action === 'notification-created' && message.payload.managerId === __classPrivateFieldGet$1(this, _NotificationManagerInstance_id, "f")) {
17306
+ const { notificationId, properties, documentUrl: url, notificationIcon: icon, badge, image } = message.payload;
17307
+ try {
17308
+ __classPrivateFieldGet$1(this, _NotificationManagerInstance_handler, "f")?.call(this, {
17309
+ properties,
17310
+ images: {
17311
+ image,
17312
+ icon,
17313
+ badge
17314
+ },
17315
+ url,
17316
+ notificationId
17317
+ });
17318
+ }
17319
+ catch (error) {
17320
+ console.error('Failed to handle notification', error);
17321
+ }
17322
+ return true;
17323
+ }
17324
+ return false;
17325
+ });
17326
+ return true;
17327
+ }));
17328
+ this.setNotificationHandler = async (handler) => {
17329
+ await __classPrivateFieldGet$1(this, _NotificationManagerInstance_isReceivingNotifications, "f").getValue();
17330
+ __classPrivateFieldSet$1(this, _NotificationManagerInstance_handler, handler, "f");
17331
+ };
17332
+ this.destroy = async () => {
17333
+ await __classPrivateFieldGet$1(this, _NotificationManagerInstance_wire, "f").sendAction('destroy-notification-manager', { managerId: __classPrivateFieldGet$1(this, _NotificationManagerInstance_id, "f") });
17334
+ };
17335
+ this.dispatch = async (event) => {
17336
+ const { notificationId, type } = event;
17337
+ await __classPrivateFieldGet$1(this, _NotificationManagerInstance_wire, "f").sendAction('dispatch-notification-event', {
17338
+ notificationId,
17339
+ type
17340
+ });
17341
+ };
17342
+ __classPrivateFieldSet$1(this, _NotificationManagerInstance_wire, wire, "f");
17343
+ __classPrivateFieldSet$1(this, _NotificationManagerInstance_id, id, "f");
17344
+ }
17345
+ }
17346
+ instance.NotificationManagerInstance = NotificationManagerInstance;
17347
+ _NotificationManagerInstance_wire = new WeakMap(), _NotificationManagerInstance_handler = new WeakMap(), _NotificationManagerInstance_id = new WeakMap(), _NotificationManagerInstance_isReceivingNotifications = new WeakMap();
17348
+
17349
+ Object.defineProperty(factory, "__esModule", { value: true });
17350
+ factory.NotificationManagerModule = void 0;
17351
+ const base_1 = base;
17352
+ const instance_1 = instance;
17353
+ class NotificationManagerModule extends base_1.Base {
17354
+ constructor() {
17355
+ super(...arguments);
17356
+ this.init = async () => {
17357
+ const { payload: { data: { managerId } } } = await this.wire.sendAction('init-notification-manager');
17358
+ const manager = new instance_1.NotificationManagerInstance(this.wire, managerId);
17359
+ return manager;
17360
+ };
17361
+ }
17362
+ }
17363
+ factory.NotificationManagerModule = NotificationManagerModule;
17364
+
17365
+ (function (exports) {
17366
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
17367
+ if (k2 === undefined) k2 = k;
17368
+ var desc = Object.getOwnPropertyDescriptor(m, k);
17369
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17370
+ desc = { enumerable: true, get: function() { return m[k]; } };
17371
+ }
17372
+ Object.defineProperty(o, k2, desc);
17373
+ }) : (function(o, m, k, k2) {
17374
+ if (k2 === undefined) k2 = k;
17375
+ o[k2] = m[k];
17376
+ }));
17377
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
17378
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17379
+ };
17380
+ Object.defineProperty(exports, "__esModule", { value: true });
17381
+ __exportStar(factory, exports);
17382
+ __exportStar(instance, exports);
17383
+ } (notificationManager));
17384
+
17277
17385
  Object.defineProperty(fin$2, "__esModule", { value: true });
17278
17386
  var Fin_1 = fin$2.Fin = void 0;
17279
17387
  const events_1$3 = require$$0;
@@ -17291,6 +17399,7 @@ const index_10 = platform;
17291
17399
  const me_1$2 = me;
17292
17400
  const interop_1 = interop;
17293
17401
  const snapshot_source_1 = snapshotSource;
17402
+ const notification_manager_1 = notificationManager;
17294
17403
  /**
17295
17404
  * @internal
17296
17405
  */
@@ -17313,6 +17422,7 @@ class Fin extends events_1$3.EventEmitter {
17313
17422
  this.View = new index_9.ViewModule(wire);
17314
17423
  this.Interop = new interop_1.InteropModule(wire);
17315
17424
  this.SnapshotSource = new snapshot_source_1.SnapshotSourceModule(wire);
17425
+ this.NotificationManager = new notification_manager_1.NotificationManagerModule(wire);
17316
17426
  wire.registerFin(this);
17317
17427
  this.me = (0, me_1$2.getMe)(wire);
17318
17428
  // Handle disconnect events