@openfin/node-adapter 43.100.32 → 43.100.36

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.
Files changed (2) hide show
  1. package/out/node-adapter.js +382 -266
  2. package/package.json +2 -2
@@ -73,13 +73,13 @@ async function promiseMapSerial(arr, func) {
73
73
  }
74
74
  promises.promiseMapSerial = promiseMapSerial;
75
75
 
76
- var __classPrivateFieldSet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
76
+ var __classPrivateFieldSet$h = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
77
77
  if (kind === "m") throw new TypeError("Private method is not writable");
78
78
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
79
79
  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");
80
80
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
81
81
  };
82
- var __classPrivateFieldGet$h = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
82
+ var __classPrivateFieldGet$i = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
83
83
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
84
84
  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");
85
85
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -164,7 +164,7 @@ class EmitterBase extends Base {
164
164
  this.emit = (eventType, payload, ...args) => {
165
165
  return this.hasEmitter() ? this.getOrCreateEmitter().emit(eventType, payload, ...args) : false;
166
166
  };
167
- this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
167
+ this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
168
168
  /**
169
169
  * Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
170
170
  * `once` subscription.
@@ -174,14 +174,14 @@ class EmitterBase extends Base {
174
174
  * which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
175
175
  */
176
176
  this.cleanUpRemovedListener = (eventType, listener) => {
177
- const deregister = __classPrivateFieldGet$h(this, _EmitterBase_deregisterOnceListeners, "f").get(listener);
177
+ const deregister = __classPrivateFieldGet$i(this, _EmitterBase_deregisterOnceListeners, "f").get(listener);
178
178
  if (deregister) {
179
- const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
179
+ const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
180
180
  emitter.removeListener(eventType, deregister);
181
181
  }
182
182
  };
183
183
  this.getOrCreateEmitter = () => {
184
- const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
184
+ const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
185
185
  if (!emitter.listeners('removeListener').includes(this.cleanUpRemovedListener)) {
186
186
  emitter.on('removeListener', this.cleanUpRemovedListener);
187
187
  }
@@ -223,8 +223,8 @@ class EmitterBase extends Base {
223
223
  // This will only be reached if unsubscribe from event that does not exist but do not want to error here
224
224
  return Promise.resolve();
225
225
  };
226
- __classPrivateFieldSet$g(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
227
- __classPrivateFieldSet$g(this, _EmitterBase_deregisterOnceListeners, new WeakMap(), "f");
226
+ __classPrivateFieldSet$h(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
227
+ __classPrivateFieldSet$h(this, _EmitterBase_deregisterOnceListeners, new WeakMap(), "f");
228
228
  this.listeners = (event) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(event) : [];
229
229
  }
230
230
  /**
@@ -253,7 +253,7 @@ class EmitterBase extends Base {
253
253
  */
254
254
  async once(eventType, listener, options) {
255
255
  const deregister = () => this.deregisterEventListener(eventType);
256
- __classPrivateFieldGet$h(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
256
+ __classPrivateFieldGet$i(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
257
257
  await this.registerEventListener(eventType, options, (emitter) => {
258
258
  emitter.once(eventType, deregister);
259
259
  emitter.once(eventType, listener);
@@ -284,7 +284,7 @@ class EmitterBase extends Base {
284
284
  */
285
285
  async prependOnceListener(eventType, listener, options) {
286
286
  const deregister = () => this.deregisterEventListener(eventType);
287
- __classPrivateFieldGet$h(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
287
+ __classPrivateFieldGet$i(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
288
288
  await this.registerEventListener(eventType, options, (emitter) => {
289
289
  emitter.prependOnceListener(eventType, listener);
290
290
  emitter.once(eventType, deregister);
@@ -344,7 +344,7 @@ class EmitterBase extends Base {
344
344
  }
345
345
  deleteEmitterIfNothingRegistered(emitter) {
346
346
  if (emitter.eventNames().every((type) => type === 'removeListener')) {
347
- this.wire.eventAggregator.delete(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
347
+ this.wire.eventAggregator.delete(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
348
348
  }
349
349
  }
350
350
  }
@@ -795,8 +795,8 @@ var main = {};
795
795
 
796
796
  Object.defineProperty(main, "__esModule", { value: true });
797
797
  main.WebContents = void 0;
798
- const base_1$m = base;
799
- class WebContents extends base_1$m.EmitterBase {
798
+ const base_1$n = base;
799
+ class WebContents extends base_1$n.EmitterBase {
800
800
  /**
801
801
  * @param identity The identity of the {@link OpenFin.WebContentsEvents WebContents}.
802
802
  * @param entityType The type of the {@link OpenFin.WebContentsEvents WebContents}.
@@ -5144,7 +5144,7 @@ function requireWindow () {
5144
5144
  */
5145
5145
  Object.defineProperty(system, "__esModule", { value: true });
5146
5146
  system.System = void 0;
5147
- const base_1$l = base;
5147
+ const base_1$m = base;
5148
5148
  const transport_errors_1$6 = transportErrors;
5149
5149
  const window_1 = requireWindow();
5150
5150
  const events_1$6 = require$$0;
@@ -5154,7 +5154,7 @@ const events_1$6 = require$$0;
5154
5154
  * clearing the cache and exiting the runtime as well as listen to {@link OpenFin.SystemEvents system events}.
5155
5155
  *
5156
5156
  */
5157
- class System extends base_1$l.EmitterBase {
5157
+ class System extends base_1$m.EmitterBase {
5158
5158
  /**
5159
5159
  * @internal
5160
5160
  */
@@ -7044,6 +7044,12 @@ class System extends base_1$l.EmitterBase {
7044
7044
  async serveAsset(options) {
7045
7045
  return (await this.wire.sendAction('serve-asset', { options })).payload.data;
7046
7046
  }
7047
+ /**
7048
+ * Launches the Log Uploader. Full documentation can be found [here](https://resources.here.io/docs/core/develop/debug/log-uploader/).
7049
+ */
7050
+ async launchLogUploader(options) {
7051
+ return (await this.wire.sendAction('launch-log-uploader', { options })).payload.data;
7052
+ }
7047
7053
  }
7048
7054
  system.System = System;
7049
7055
 
@@ -7465,12 +7471,12 @@ class ChannelError extends Error {
7465
7471
  }
7466
7472
  channelError.ChannelError = ChannelError;
7467
7473
 
7468
- var __classPrivateFieldGet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7474
+ var __classPrivateFieldGet$h = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7469
7475
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
7470
7476
  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");
7471
7477
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
7472
7478
  };
7473
- var __classPrivateFieldSet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7479
+ var __classPrivateFieldSet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7474
7480
  if (kind === "m") throw new TypeError("Private method is not writable");
7475
7481
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
7476
7482
  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");
@@ -7514,7 +7520,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
7514
7520
  static closeChannelByEndpointId(id) {
7515
7521
  const channel = channelClientsByEndpointId.get(id);
7516
7522
  if (channel) {
7517
- __classPrivateFieldGet$g(channel, _ChannelClient_close, "f").call(channel);
7523
+ __classPrivateFieldGet$h(channel, _ChannelClient_close, "f").call(channel);
7518
7524
  }
7519
7525
  }
7520
7526
  /**
@@ -7525,7 +7531,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
7525
7531
  for (const channelClient of channelClientsByEndpointId.values()) {
7526
7532
  if (channelClient.providerIdentity.channelId === eventPayload.channelId) {
7527
7533
  channelClient.disconnectListener(eventPayload);
7528
- __classPrivateFieldGet$g(channelClient, _ChannelClient_close, "f").call(channelClient);
7534
+ __classPrivateFieldGet$h(channelClient, _ChannelClient_close, "f").call(channelClient);
7529
7535
  }
7530
7536
  }
7531
7537
  }
@@ -7540,12 +7546,12 @@ class ChannelClient extends channel_1$1.ChannelBase {
7540
7546
  this.processAction = (action, payload, senderIdentity) => super.processAction(action, payload, senderIdentity);
7541
7547
  _ChannelClient_close.set(this, () => {
7542
7548
  channelClientsByEndpointId.delete(this.endpointId);
7543
- __classPrivateFieldGet$g(this, _ChannelClient_strategy, "f").close();
7549
+ __classPrivateFieldGet$h(this, _ChannelClient_strategy, "f").close();
7544
7550
  });
7545
- __classPrivateFieldSet$f(this, _ChannelClient_protectedObj, new channel_1$1.ProtectedItems(routingInfo, close), "f");
7551
+ __classPrivateFieldSet$g(this, _ChannelClient_protectedObj, new channel_1$1.ProtectedItems(routingInfo, close), "f");
7546
7552
  this.disconnectListener = () => undefined;
7547
7553
  this.endpointId = routingInfo.endpointId;
7548
- __classPrivateFieldSet$f(this, _ChannelClient_strategy, strategy, "f");
7554
+ __classPrivateFieldSet$g(this, _ChannelClient_strategy, strategy, "f");
7549
7555
  channelClientsByEndpointId.set(this.endpointId, this);
7550
7556
  strategy.receive(this.processAction);
7551
7557
  }
@@ -7553,7 +7559,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
7553
7559
  * a read-only provider identity
7554
7560
  */
7555
7561
  get providerIdentity() {
7556
- const protectedObj = __classPrivateFieldGet$g(this, _ChannelClient_protectedObj, "f");
7562
+ const protectedObj = __classPrivateFieldGet$h(this, _ChannelClient_protectedObj, "f");
7557
7563
  return protectedObj.providerIdentity;
7558
7564
  }
7559
7565
  /**
@@ -7582,9 +7588,9 @@ class ChannelClient extends channel_1$1.ChannelBase {
7582
7588
  * ```
7583
7589
  */
7584
7590
  async dispatch(action, payload) {
7585
- if (__classPrivateFieldGet$g(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
7591
+ if (__classPrivateFieldGet$h(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
7586
7592
  const callSites = transport_errors_1$3.RuntimeError.getCallSite();
7587
- return __classPrivateFieldGet$g(this, _ChannelClient_strategy, "f").send(this.providerIdentity.channelId, action, payload).catch((e) => {
7593
+ return __classPrivateFieldGet$h(this, _ChannelClient_strategy, "f").send(this.providerIdentity.channelId, action, payload).catch((e) => {
7588
7594
  throw new channel_error_1$1.ChannelError(e, action, payload, callSites);
7589
7595
  });
7590
7596
  }
@@ -7636,10 +7642,10 @@ class ChannelClient extends channel_1$1.ChannelBase {
7636
7642
  */
7637
7643
  async disconnect() {
7638
7644
  await this.sendDisconnectAction();
7639
- __classPrivateFieldGet$g(this, _ChannelClient_close, "f").call(this);
7645
+ __classPrivateFieldGet$h(this, _ChannelClient_close, "f").call(this);
7640
7646
  }
7641
7647
  async sendDisconnectAction() {
7642
- const protectedObj = __classPrivateFieldGet$g(this, _ChannelClient_protectedObj, "f");
7648
+ const protectedObj = __classPrivateFieldGet$h(this, _ChannelClient_protectedObj, "f");
7643
7649
  await protectedObj.close();
7644
7650
  }
7645
7651
  /**
@@ -7672,13 +7678,13 @@ exhaustive.exhaustiveCheck = exhaustiveCheck;
7672
7678
 
7673
7679
  var strategy$3 = {};
7674
7680
 
7675
- var __classPrivateFieldSet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7681
+ var __classPrivateFieldSet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7676
7682
  if (kind === "m") throw new TypeError("Private method is not writable");
7677
7683
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
7678
7684
  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");
7679
7685
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7680
7686
  };
7681
- var __classPrivateFieldGet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7687
+ var __classPrivateFieldGet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7682
7688
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
7683
7689
  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");
7684
7690
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -7703,7 +7709,7 @@ class ClassicStrategy {
7703
7709
  // connection problems occur
7704
7710
  _ClassicStrategy_pendingMessagesByEndpointId.set(this, new Map());
7705
7711
  this.send = async (endpointId, action, payload) => {
7706
- const to = __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
7712
+ const to = __classPrivateFieldGet$g(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
7707
7713
  if (!to) {
7708
7714
  throw new Error(`Could not locate routing info for endpoint ${endpointId}`);
7709
7715
  }
@@ -7715,13 +7721,13 @@ class ClassicStrategy {
7715
7721
  }
7716
7722
  delete cleanId.isLocalEndpointId;
7717
7723
  // grab the promise before awaiting it to save in our pending messages map
7718
- const p = __classPrivateFieldGet$f(this, _ClassicStrategy_wire, "f").sendAction('send-channel-message', {
7724
+ const p = __classPrivateFieldGet$g(this, _ClassicStrategy_wire, "f").sendAction('send-channel-message', {
7719
7725
  ...cleanId,
7720
7726
  providerIdentity: this.providerIdentity,
7721
7727
  action,
7722
7728
  payload
7723
7729
  });
7724
- __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
7730
+ __classPrivateFieldGet$g(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
7725
7731
  const raw = await p
7726
7732
  .catch((error) => {
7727
7733
  if ('cause' in error) {
@@ -7731,16 +7737,16 @@ class ClassicStrategy {
7731
7737
  })
7732
7738
  .finally(() => {
7733
7739
  // clean up the pending promise
7734
- __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
7740
+ __classPrivateFieldGet$g(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
7735
7741
  });
7736
7742
  return raw.payload.data.result;
7737
7743
  };
7738
7744
  this.close = async () => {
7739
7745
  this.messageReceiver.removeEndpoint(this.providerIdentity.channelId, this.endpointId);
7740
- [...__classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
7741
- __classPrivateFieldSet$e(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
7746
+ [...__classPrivateFieldGet$g(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
7747
+ __classPrivateFieldSet$f(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
7742
7748
  };
7743
- __classPrivateFieldSet$e(this, _ClassicStrategy_wire, wire, "f");
7749
+ __classPrivateFieldSet$f(this, _ClassicStrategy_wire, wire, "f");
7744
7750
  }
7745
7751
  onEndpointDisconnect(endpointId, listener) {
7746
7752
  // Never fires for 'classic'.
@@ -7749,20 +7755,20 @@ class ClassicStrategy {
7749
7755
  this.messageReceiver.addEndpoint(listener, this.providerIdentity.channelId, this.endpointId);
7750
7756
  }
7751
7757
  async closeEndpoint(endpointId) {
7752
- const id = __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
7753
- __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
7754
- const pendingSet = __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId);
7758
+ const id = __classPrivateFieldGet$g(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
7759
+ __classPrivateFieldGet$g(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
7760
+ const pendingSet = __classPrivateFieldGet$g(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId);
7755
7761
  pendingSet?.forEach((p) => {
7756
7762
  const errorMsg = `Channel connection with identity uuid: ${id?.uuid} / name: ${id?.name} / endpointId: ${endpointId} no longer connected.`;
7757
7763
  p.cancel(new Error(errorMsg));
7758
7764
  });
7759
7765
  }
7760
7766
  isEndpointConnected(endpointId) {
7761
- return __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").has(endpointId);
7767
+ return __classPrivateFieldGet$g(this, _ClassicStrategy_endpointIdentityMap, "f").has(endpointId);
7762
7768
  }
7763
7769
  addEndpoint(endpointId, payload) {
7764
- __classPrivateFieldGet$f(this, _ClassicStrategy_endpointIdentityMap, "f").set(endpointId, payload.endpointIdentity);
7765
- __classPrivateFieldGet$f(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").set(endpointId, new Set());
7770
+ __classPrivateFieldGet$g(this, _ClassicStrategy_endpointIdentityMap, "f").set(endpointId, payload.endpointIdentity);
7771
+ __classPrivateFieldGet$g(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").set(endpointId, new Set());
7766
7772
  }
7767
7773
  isValidEndpointPayload(payload) {
7768
7774
  return (typeof payload?.endpointIdentity?.endpointId === 'string' ||
@@ -7797,12 +7803,12 @@ function errorToPOJO(error) {
7797
7803
  }
7798
7804
  errors.errorToPOJO = errorToPOJO;
7799
7805
 
7800
- var __classPrivateFieldGet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7806
+ var __classPrivateFieldGet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7801
7807
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
7802
7808
  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");
7803
7809
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
7804
7810
  };
7805
- var __classPrivateFieldSet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7811
+ var __classPrivateFieldSet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7806
7812
  if (kind === "m") throw new TypeError("Private method is not writable");
7807
7813
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
7808
7814
  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");
@@ -7837,8 +7843,8 @@ class RTCEndpoint {
7837
7843
  if (this.rtc.rtcClient.connectionState !== 'connected') {
7838
7844
  this.rtc.rtcClient.removeEventListener('connectionstatechange', this.connectionStateChangeHandler);
7839
7845
  this.close();
7840
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f")) {
7841
- __classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f").call(this);
7846
+ if (__classPrivateFieldGet$f(this, _RTCEndpoint_disconnectListener, "f")) {
7847
+ __classPrivateFieldGet$f(this, _RTCEndpoint_disconnectListener, "f").call(this);
7842
7848
  }
7843
7849
  }
7844
7850
  };
@@ -7886,9 +7892,9 @@ class RTCEndpoint {
7886
7892
  data = new TextDecoder().decode(e.data);
7887
7893
  }
7888
7894
  const { messageId, action, payload } = JSON.parse(data);
7889
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_processAction, "f")) {
7895
+ if (__classPrivateFieldGet$f(this, _RTCEndpoint_processAction, "f")) {
7890
7896
  try {
7891
- const res = await __classPrivateFieldGet$e(this, _RTCEndpoint_processAction, "f").call(this, action, payload, endpointIdentity);
7897
+ const res = await __classPrivateFieldGet$f(this, _RTCEndpoint_processAction, "f").call(this, action, payload, endpointIdentity);
7892
7898
  this.rtc.channels.response.send(JSON.stringify({
7893
7899
  messageId,
7894
7900
  payload: res,
@@ -7922,25 +7928,25 @@ class RTCEndpoint {
7922
7928
  datachannel.onclose = (e) => {
7923
7929
  [...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.')));
7924
7930
  this.close();
7925
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f")) {
7926
- __classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f").call(this);
7931
+ if (__classPrivateFieldGet$f(this, _RTCEndpoint_disconnectListener, "f")) {
7932
+ __classPrivateFieldGet$f(this, _RTCEndpoint_disconnectListener, "f").call(this);
7927
7933
  }
7928
7934
  };
7929
7935
  });
7930
7936
  }
7931
7937
  onDisconnect(listener) {
7932
- if (!__classPrivateFieldGet$e(this, _RTCEndpoint_disconnectListener, "f")) {
7933
- __classPrivateFieldSet$d(this, _RTCEndpoint_disconnectListener, listener, "f");
7938
+ if (!__classPrivateFieldGet$f(this, _RTCEndpoint_disconnectListener, "f")) {
7939
+ __classPrivateFieldSet$e(this, _RTCEndpoint_disconnectListener, listener, "f");
7934
7940
  }
7935
7941
  else {
7936
7942
  throw new Error('RTCEndpoint disconnectListener cannot be set twice.');
7937
7943
  }
7938
7944
  }
7939
7945
  receive(listener) {
7940
- if (__classPrivateFieldGet$e(this, _RTCEndpoint_processAction, "f")) {
7946
+ if (__classPrivateFieldGet$f(this, _RTCEndpoint_processAction, "f")) {
7941
7947
  throw new Error('You have already set a listener for this RTC Endpoint.');
7942
7948
  }
7943
- __classPrivateFieldSet$d(this, _RTCEndpoint_processAction, listener, "f");
7949
+ __classPrivateFieldSet$e(this, _RTCEndpoint_processAction, listener, "f");
7944
7950
  }
7945
7951
  get connected() {
7946
7952
  return this.rtc.rtcClient.connectionState === 'connected';
@@ -7951,12 +7957,12 @@ _RTCEndpoint_processAction = new WeakMap(), _RTCEndpoint_disconnectListener = ne
7951
7957
 
7952
7958
  var strategy$1 = {};
7953
7959
 
7954
- var __classPrivateFieldGet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7960
+ var __classPrivateFieldGet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7955
7961
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
7956
7962
  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");
7957
7963
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
7958
7964
  };
7959
- var __classPrivateFieldSet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7965
+ var __classPrivateFieldSet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7960
7966
  if (kind === "m") throw new TypeError("Private method is not writable");
7961
7967
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
7962
7968
  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");
@@ -7977,11 +7983,11 @@ class EndpointStrategy {
7977
7983
  return this.getEndpointById(endpointId).send(action, payload);
7978
7984
  };
7979
7985
  this.close = async () => {
7980
- if (__classPrivateFieldGet$d(this, _EndpointStrategy_connected, "f")) {
7981
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
7982
- __classPrivateFieldSet$c(this, _EndpointStrategy_endpointMap, new Map(), "f");
7986
+ if (__classPrivateFieldGet$e(this, _EndpointStrategy_connected, "f")) {
7987
+ __classPrivateFieldGet$e(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
7988
+ __classPrivateFieldSet$d(this, _EndpointStrategy_endpointMap, new Map(), "f");
7983
7989
  }
7984
- __classPrivateFieldSet$c(this, _EndpointStrategy_connected, false, "f");
7990
+ __classPrivateFieldSet$d(this, _EndpointStrategy_connected, false, "f");
7985
7991
  };
7986
7992
  this.isValidEndpointPayload = validateEndpoint;
7987
7993
  }
@@ -7989,39 +7995,39 @@ class EndpointStrategy {
7989
7995
  this.getEndpointById(endpointId).onDisconnect(listener);
7990
7996
  }
7991
7997
  receive(listener) {
7992
- if (__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f")) {
7998
+ if (__classPrivateFieldGet$e(this, _EndpointStrategy_processAction, "f")) {
7993
7999
  throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);
7994
8000
  }
7995
- __classPrivateFieldSet$c(this, _EndpointStrategy_processAction, listener, "f");
8001
+ __classPrivateFieldSet$d(this, _EndpointStrategy_processAction, listener, "f");
7996
8002
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
7997
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.receive(__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f")));
8003
+ __classPrivateFieldGet$e(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.receive(__classPrivateFieldGet$e(this, _EndpointStrategy_processAction, "f")));
7998
8004
  }
7999
8005
  getEndpointById(endpointId) {
8000
- const endpoint = __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").get(endpointId);
8006
+ const endpoint = __classPrivateFieldGet$e(this, _EndpointStrategy_endpointMap, "f").get(endpointId);
8001
8007
  if (!endpoint) {
8002
8008
  throw new Error(`Client with endpoint id ${endpointId} is not connected`);
8003
8009
  }
8004
8010
  return endpoint;
8005
8011
  }
8006
8012
  get connected() {
8007
- return __classPrivateFieldGet$d(this, _EndpointStrategy_connected, "f");
8013
+ return __classPrivateFieldGet$e(this, _EndpointStrategy_connected, "f");
8008
8014
  }
8009
8015
  isEndpointConnected(endpointId) {
8010
- return __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").has(endpointId);
8016
+ return __classPrivateFieldGet$e(this, _EndpointStrategy_endpointMap, "f").has(endpointId);
8011
8017
  }
8012
8018
  addEndpoint(endpointId, payload) {
8013
- if (!__classPrivateFieldGet$d(this, _EndpointStrategy_connected, "f")) {
8019
+ if (!__classPrivateFieldGet$e(this, _EndpointStrategy_connected, "f")) {
8014
8020
  console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);
8015
8021
  return;
8016
8022
  }
8017
8023
  const clientStrat = new this.EndpointType(payload);
8018
- if (__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f")) {
8019
- clientStrat.receive(__classPrivateFieldGet$d(this, _EndpointStrategy_processAction, "f"));
8024
+ if (__classPrivateFieldGet$e(this, _EndpointStrategy_processAction, "f")) {
8025
+ clientStrat.receive(__classPrivateFieldGet$e(this, _EndpointStrategy_processAction, "f"));
8020
8026
  }
8021
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").set(endpointId, clientStrat);
8027
+ __classPrivateFieldGet$e(this, _EndpointStrategy_endpointMap, "f").set(endpointId, clientStrat);
8022
8028
  }
8023
8029
  async closeEndpoint(endpointId) {
8024
- __classPrivateFieldGet$d(this, _EndpointStrategy_endpointMap, "f").delete(endpointId);
8030
+ __classPrivateFieldGet$e(this, _EndpointStrategy_endpointMap, "f").delete(endpointId);
8025
8031
  }
8026
8032
  }
8027
8033
  strategy$1.EndpointStrategy = EndpointStrategy;
@@ -8048,11 +8054,11 @@ var iceManager = {};
8048
8054
 
8049
8055
  Object.defineProperty(iceManager, "__esModule", { value: true });
8050
8056
  iceManager.RTCICEManager = void 0;
8051
- const base_1$k = base;
8057
+ const base_1$l = base;
8052
8058
  /*
8053
8059
  Singleton that facilitates Offer and Answer exchange required for establishing RTC connections.
8054
8060
  */
8055
- class RTCICEManager extends base_1$k.EmitterBase {
8061
+ class RTCICEManager extends base_1$l.EmitterBase {
8056
8062
  constructor(wire) {
8057
8063
  super(wire, 'channel');
8058
8064
  this.ensureChannelOpened = (channel) => {
@@ -8203,12 +8209,12 @@ function runtimeUuidMeetsMinimumRuntimeVersion(runtimeUuid, minVersion) {
8203
8209
  }
8204
8210
  runtimeVersioning.runtimeUuidMeetsMinimumRuntimeVersion = runtimeUuidMeetsMinimumRuntimeVersion;
8205
8211
 
8206
- var __classPrivateFieldGet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8212
+ var __classPrivateFieldGet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8207
8213
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
8208
8214
  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");
8209
8215
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
8210
8216
  };
8211
- var __classPrivateFieldSet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8217
+ var __classPrivateFieldSet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8212
8218
  if (kind === "m") throw new TypeError("Private method is not writable");
8213
8219
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
8214
8220
  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");
@@ -8252,19 +8258,19 @@ class ChannelProvider extends channel_1.ChannelBase {
8252
8258
  * a read-only array containing all the identities of connecting clients.
8253
8259
  */
8254
8260
  get connections() {
8255
- return [...__classPrivateFieldGet$c(this, _ChannelProvider_connections, "f")];
8261
+ return [...__classPrivateFieldGet$d(this, _ChannelProvider_connections, "f")];
8256
8262
  }
8257
8263
  static handleClientDisconnection(channel, payload) {
8258
8264
  if (payload?.endpointId) {
8259
8265
  const { uuid, name, endpointId, isLocalEndpointId } = payload;
8260
- __classPrivateFieldGet$c(channel, _ChannelProvider_removeEndpoint, "f").call(channel, { uuid, name, endpointId, isLocalEndpointId });
8266
+ __classPrivateFieldGet$d(channel, _ChannelProvider_removeEndpoint, "f").call(channel, { uuid, name, endpointId, isLocalEndpointId });
8261
8267
  }
8262
8268
  else {
8263
8269
  // this is here to support older runtimes that did not have endpointId
8264
8270
  const multipleRemoves = channel.connections.filter((identity) => {
8265
8271
  return identity.uuid === payload.uuid && identity.name === payload.name;
8266
8272
  });
8267
- multipleRemoves.forEach(__classPrivateFieldGet$c(channel, _ChannelProvider_removeEndpoint, "f"));
8273
+ multipleRemoves.forEach(__classPrivateFieldGet$d(channel, _ChannelProvider_removeEndpoint, "f"));
8268
8274
  }
8269
8275
  channel.disconnectListener(payload);
8270
8276
  }
@@ -8281,8 +8287,8 @@ class ChannelProvider extends channel_1.ChannelBase {
8281
8287
  _ChannelProvider_strategy.set(this, void 0);
8282
8288
  _ChannelProvider_removeEndpoint.set(this, (identity) => {
8283
8289
  const remainingConnections = this.connections.filter((clientIdentity) => clientIdentity.endpointId !== identity.endpointId);
8284
- __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
8285
- __classPrivateFieldSet$b(this, _ChannelProvider_connections, remainingConnections, "f");
8290
+ __classPrivateFieldGet$d(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
8291
+ __classPrivateFieldSet$c(this, _ChannelProvider_connections, remainingConnections, "f");
8286
8292
  });
8287
8293
  // Must be bound.
8288
8294
  this.processAction = async (action, payload, senderIdentity) => {
@@ -8296,17 +8302,17 @@ class ChannelProvider extends channel_1.ChannelBase {
8296
8302
  return super.processAction(action, payload, senderIdentity);
8297
8303
  };
8298
8304
  _ChannelProvider_close.set(this, () => {
8299
- __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").close();
8305
+ __classPrivateFieldGet$d(this, _ChannelProvider_strategy, "f").close();
8300
8306
  const remove = ChannelProvider.removalMap.get(this);
8301
8307
  if (remove) {
8302
8308
  remove();
8303
8309
  }
8304
8310
  });
8305
- __classPrivateFieldSet$b(this, _ChannelProvider_protectedObj, new channel_1.ProtectedItems(providerIdentity, close), "f");
8311
+ __classPrivateFieldSet$c(this, _ChannelProvider_protectedObj, new channel_1.ProtectedItems(providerIdentity, close), "f");
8306
8312
  this.connectListener = () => undefined;
8307
8313
  this.disconnectListener = () => undefined;
8308
- __classPrivateFieldSet$b(this, _ChannelProvider_connections, [], "f");
8309
- __classPrivateFieldSet$b(this, _ChannelProvider_strategy, strategy, "f");
8314
+ __classPrivateFieldSet$c(this, _ChannelProvider_connections, [], "f");
8315
+ __classPrivateFieldSet$c(this, _ChannelProvider_strategy, strategy, "f");
8310
8316
  strategy.receive(this.processAction);
8311
8317
  }
8312
8318
  /**
@@ -8337,16 +8343,16 @@ class ChannelProvider extends channel_1.ChannelBase {
8337
8343
  */
8338
8344
  dispatch(to, action, payload) {
8339
8345
  const endpointId = to.endpointId ?? this.getEndpointIdForOpenFinId(to, action);
8340
- if (endpointId && __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
8346
+ if (endpointId && __classPrivateFieldGet$d(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
8341
8347
  const callSites = transport_errors_1$2.RuntimeError.getCallSite();
8342
- return __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload).catch((e) => {
8348
+ return __classPrivateFieldGet$d(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload).catch((e) => {
8343
8349
  throw new channel_error_1.ChannelError(e, action, payload, callSites);
8344
8350
  });
8345
8351
  }
8346
8352
  return Promise.reject(new Error(`Client connection with identity uuid: ${to.uuid} / name: ${to.name} / endpointId: ${endpointId} no longer connected.`));
8347
8353
  }
8348
8354
  async processConnection(senderId, payload) {
8349
- __classPrivateFieldGet$c(this, _ChannelProvider_connections, "f").push(senderId);
8355
+ __classPrivateFieldGet$d(this, _ChannelProvider_connections, "f").push(senderId);
8350
8356
  return this.connectListener(senderId, payload);
8351
8357
  }
8352
8358
  /**
@@ -8369,7 +8375,7 @@ class ChannelProvider extends channel_1.ChannelBase {
8369
8375
  * ```
8370
8376
  */
8371
8377
  publish(action, payload) {
8372
- return this.connections.map((to) => __classPrivateFieldGet$c(this, _ChannelProvider_strategy, "f").send(to.endpointId, action, payload));
8378
+ return this.connections.map((to) => __classPrivateFieldGet$d(this, _ChannelProvider_strategy, "f").send(to.endpointId, action, payload));
8373
8379
  }
8374
8380
  /**
8375
8381
  * Register a listener that is called on every new client connection.
@@ -8443,11 +8449,11 @@ class ChannelProvider extends channel_1.ChannelBase {
8443
8449
  * ```
8444
8450
  */
8445
8451
  async destroy() {
8446
- const protectedObj = __classPrivateFieldGet$c(this, _ChannelProvider_protectedObj, "f");
8452
+ const protectedObj = __classPrivateFieldGet$d(this, _ChannelProvider_protectedObj, "f");
8447
8453
  protectedObj.providerIdentity;
8448
- __classPrivateFieldSet$b(this, _ChannelProvider_connections, [], "f");
8454
+ __classPrivateFieldSet$c(this, _ChannelProvider_connections, [], "f");
8449
8455
  await protectedObj.close();
8450
- __classPrivateFieldGet$c(this, _ChannelProvider_close, "f").call(this);
8456
+ __classPrivateFieldGet$d(this, _ChannelProvider_close, "f").call(this);
8451
8457
  }
8452
8458
  /**
8453
8459
  * Returns an array with info on every Client connected to the Provider
@@ -8517,7 +8523,7 @@ class ChannelProvider extends channel_1.ChannelBase {
8517
8523
  getEndpointIdForOpenFinId(clientIdentity, action) {
8518
8524
  const matchingConnections = this.connections.filter((c) => c.name === clientIdentity.name && c.uuid === clientIdentity.uuid);
8519
8525
  if (matchingConnections.length >= 2) {
8520
- const protectedObj = __classPrivateFieldGet$c(this, _ChannelProvider_protectedObj, "f");
8526
+ const protectedObj = __classPrivateFieldGet$d(this, _ChannelProvider_protectedObj, "f");
8521
8527
  const { uuid, name } = clientIdentity;
8522
8528
  const providerUuid = protectedObj?.providerIdentity.uuid;
8523
8529
  const providerName = protectedObj?.providerIdentity.name;
@@ -8553,14 +8559,14 @@ var messageReceiver$1 = {};
8553
8559
  Object.defineProperty(messageReceiver$1, "__esModule", { value: true });
8554
8560
  messageReceiver$1.MessageReceiver = void 0;
8555
8561
  const client_1$1 = client;
8556
- const base_1$j = base;
8562
+ const base_1$k = base;
8557
8563
  const errors_1$1 = errors;
8558
8564
  /*
8559
8565
  This is a singleton (per fin object) tasked with routing messages coming off the ipc to the correct endpoint.
8560
8566
  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.
8561
8567
  If functionality is not about receiving messages, it does not belong here.
8562
8568
  */
8563
- class MessageReceiver extends base_1$j.Base {
8569
+ class MessageReceiver extends base_1$k.Base {
8564
8570
  constructor(wire) {
8565
8571
  super(wire);
8566
8572
  this.onmessage = (msg) => {
@@ -8729,13 +8735,13 @@ class CombinedStrategy {
8729
8735
  }
8730
8736
  strategy.default = CombinedStrategy;
8731
8737
 
8732
- var __classPrivateFieldSet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8738
+ var __classPrivateFieldSet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8733
8739
  if (kind === "m") throw new TypeError("Private method is not writable");
8734
8740
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
8735
8741
  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");
8736
8742
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
8737
8743
  };
8738
- var __classPrivateFieldGet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8744
+ var __classPrivateFieldGet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8739
8745
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
8740
8746
  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");
8741
8747
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -8747,7 +8753,7 @@ var _ConnectionManager_messageReceiver, _ConnectionManager_rtcConnectionManager;
8747
8753
  Object.defineProperty(connectionManager, "__esModule", { value: true });
8748
8754
  connectionManager.ConnectionManager = void 0;
8749
8755
  const exhaustive_1 = exhaustive;
8750
- const base_1$i = base;
8756
+ const base_1$j = base;
8751
8757
  const strategy_1 = strategy$3;
8752
8758
  const strategy_2 = strategy$2;
8753
8759
  const ice_manager_1 = iceManager;
@@ -8755,7 +8761,7 @@ const provider_1$1 = provider;
8755
8761
  const message_receiver_1 = messageReceiver$1;
8756
8762
  const protocol_manager_1 = protocolManager;
8757
8763
  const strategy_3 = __importDefault$5(strategy);
8758
- class ConnectionManager extends base_1$i.Base {
8764
+ class ConnectionManager extends base_1$j.Base {
8759
8765
  static getProtocolOptionsFromStrings(protocols) {
8760
8766
  return protocols.map((protocol) => {
8761
8767
  switch (protocol) {
@@ -8784,8 +8790,8 @@ class ConnectionManager extends base_1$i.Base {
8784
8790
  };
8785
8791
  this.providerMap = new Map();
8786
8792
  this.protocolManager = new protocol_manager_1.ProtocolManager(this.wire.environment.type === 'node' ? ['classic'] : ['rtc', 'classic']);
8787
- __classPrivateFieldSet$a(this, _ConnectionManager_messageReceiver, new message_receiver_1.MessageReceiver(wire), "f");
8788
- __classPrivateFieldSet$a(this, _ConnectionManager_rtcConnectionManager, new ice_manager_1.RTCICEManager(wire), "f");
8793
+ __classPrivateFieldSet$b(this, _ConnectionManager_messageReceiver, new message_receiver_1.MessageReceiver(wire), "f");
8794
+ __classPrivateFieldSet$b(this, _ConnectionManager_rtcConnectionManager, new ice_manager_1.RTCICEManager(wire), "f");
8789
8795
  wire.registerMessageHandler(this.onmessage.bind(this));
8790
8796
  }
8791
8797
  createProvider(options, providerIdentity) {
@@ -8796,7 +8802,7 @@ class ConnectionManager extends base_1$i.Base {
8796
8802
  case 'rtc':
8797
8803
  return new strategy_2.RTCStrategy();
8798
8804
  case 'classic':
8799
- return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$b(this, _ConnectionManager_messageReceiver, "f"),
8805
+ return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$c(this, _ConnectionManager_messageReceiver, "f"),
8800
8806
  // Providers do not have an endpointId, use channelId as endpointId in the strategy.
8801
8807
  providerIdentity.channelId, providerIdentity);
8802
8808
  default:
@@ -8832,7 +8838,7 @@ class ConnectionManager extends base_1$i.Base {
8832
8838
  const supportedProtocols = await Promise.all(protocols.map(async (type) => {
8833
8839
  switch (type) {
8834
8840
  case 'rtc': {
8835
- const { rtcClient, channels, offer, rtcConnectionId, channelsOpened } = await __classPrivateFieldGet$b(this, _ConnectionManager_rtcConnectionManager, "f").startClientOffer();
8841
+ const { rtcClient, channels, offer, rtcConnectionId, channelsOpened } = await __classPrivateFieldGet$c(this, _ConnectionManager_rtcConnectionManager, "f").startClientOffer();
8836
8842
  rtcPacket = { rtcClient, channels, channelsOpened };
8837
8843
  return {
8838
8844
  type: 'rtc',
@@ -8859,18 +8865,18 @@ class ConnectionManager extends base_1$i.Base {
8859
8865
  routingInfo.endpointId = this.wire.environment.getNextMessageId();
8860
8866
  // For New Clients connecting to Old Providers. To prevent multi-dispatching and publishing, we delete previously-connected
8861
8867
  // clients that are in the same context as the newly-connected client.
8862
- __classPrivateFieldGet$b(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
8868
+ __classPrivateFieldGet$c(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
8863
8869
  }
8864
8870
  const answer = routingInfo.answer ?? {
8865
8871
  supportedProtocols: [{ type: 'classic', version: 1 }]
8866
8872
  };
8867
8873
  const createStrategyFromAnswer = async (protocol) => {
8868
8874
  if (protocol.type === 'rtc' && rtcPacket) {
8869
- await __classPrivateFieldGet$b(this, _ConnectionManager_rtcConnectionManager, "f").finishClientOffer(rtcPacket.rtcClient, protocol.payload.answer, rtcPacket.channelsOpened);
8875
+ await __classPrivateFieldGet$c(this, _ConnectionManager_rtcConnectionManager, "f").finishClientOffer(rtcPacket.rtcClient, protocol.payload.answer, rtcPacket.channelsOpened);
8870
8876
  return new strategy_2.RTCStrategy();
8871
8877
  }
8872
8878
  if (protocol.type === 'classic') {
8873
- return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$b(this, _ConnectionManager_messageReceiver, "f"), routingInfo.endpointId, routingInfo);
8879
+ return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$c(this, _ConnectionManager_messageReceiver, "f"), routingInfo.endpointId, routingInfo);
8874
8880
  }
8875
8881
  return null;
8876
8882
  };
@@ -8938,7 +8944,7 @@ class ConnectionManager extends base_1$i.Base {
8938
8944
  clientAnswer = await overlappingProtocols.reduce(async (accumP, protocolToUse) => {
8939
8945
  const answer = await accumP;
8940
8946
  if (protocolToUse.type === 'rtc') {
8941
- const { answer: rtcAnswer, rtcClient, channels } = await __classPrivateFieldGet$b(this, _ConnectionManager_rtcConnectionManager, "f").createProviderAnswer(protocolToUse.payload.rtcConnectionId, protocolToUse.payload.offer);
8947
+ const { answer: rtcAnswer, rtcClient, channels } = await __classPrivateFieldGet$c(this, _ConnectionManager_rtcConnectionManager, "f").createProviderAnswer(protocolToUse.payload.rtcConnectionId, protocolToUse.payload.offer);
8942
8948
  answer.supportedProtocols.push({
8943
8949
  type: 'rtc',
8944
8950
  version: strategy_2.RTCInfo.version,
@@ -8986,13 +8992,13 @@ _ConnectionManager_messageReceiver = new WeakMap(), _ConnectionManager_rtcConnec
8986
8992
  *
8987
8993
  * @packageDocumentation
8988
8994
  */
8989
- var __classPrivateFieldSet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8995
+ var __classPrivateFieldSet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8990
8996
  if (kind === "m") throw new TypeError("Private method is not writable");
8991
8997
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
8992
8998
  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");
8993
8999
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
8994
9000
  };
8995
- var __classPrivateFieldGet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9001
+ var __classPrivateFieldGet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8996
9002
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
8997
9003
  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");
8998
9004
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -9002,8 +9008,8 @@ Object.defineProperty(channel$1, "__esModule", { value: true });
9002
9008
  channel$1.Channel = void 0;
9003
9009
  /* eslint-disable no-console */
9004
9010
  const events_1$5 = require$$0;
9005
- const lazy_1$2 = lazy;
9006
- const base_1$h = base;
9011
+ const lazy_1$3 = lazy;
9012
+ const base_1$i = base;
9007
9013
  const client_1 = client;
9008
9014
  const connection_manager_1 = connectionManager;
9009
9015
  const provider_1 = provider;
@@ -9034,7 +9040,7 @@ function retryDelay(count) {
9034
9040
  * * {@link Channel.onChannelConnect onChannelConnect(listener)}
9035
9041
  * * {@link Channel.onChannelDisconnect onChannelDisconnect(listener)}
9036
9042
  */
9037
- class Channel extends base_1$h.EmitterBase {
9043
+ class Channel extends base_1$i.EmitterBase {
9038
9044
  /**
9039
9045
  * @internal
9040
9046
  */
@@ -9043,17 +9049,17 @@ class Channel extends base_1$h.EmitterBase {
9043
9049
  _Channel_connectionManager.set(this, void 0);
9044
9050
  _Channel_internalEmitter.set(this, new events_1$5.EventEmitter());
9045
9051
  // OpenFin API has not been injected at construction time, *must* wait for API to be ready.
9046
- _Channel_readyToConnect.set(this, new lazy_1$2.AsyncRetryableLazy(async () => {
9052
+ _Channel_readyToConnect.set(this, new lazy_1$3.AsyncRetryableLazy(async () => {
9047
9053
  await Promise.all([
9048
9054
  this.on('disconnected', (eventPayload) => {
9049
9055
  client_1.ChannelClient.handleProviderDisconnect(eventPayload);
9050
9056
  }),
9051
9057
  this.on('connected', (...args) => {
9052
- __classPrivateFieldGet$a(this, _Channel_internalEmitter, "f").emit('connected', ...args);
9058
+ __classPrivateFieldGet$b(this, _Channel_internalEmitter, "f").emit('connected', ...args);
9053
9059
  })
9054
9060
  ]).catch(() => new Error('error setting up channel connection listeners'));
9055
9061
  }));
9056
- __classPrivateFieldSet$9(this, _Channel_connectionManager, new connection_manager_1.ConnectionManager(wire), "f");
9062
+ __classPrivateFieldSet$a(this, _Channel_connectionManager, new connection_manager_1.ConnectionManager(wire), "f");
9057
9063
  }
9058
9064
  /**
9059
9065
  *
@@ -9128,7 +9134,7 @@ class Channel extends base_1$h.EmitterBase {
9128
9134
  resolve(true);
9129
9135
  }
9130
9136
  };
9131
- __classPrivateFieldGet$a(this, _Channel_internalEmitter, "f").on('connected', connectedListener);
9137
+ __classPrivateFieldGet$b(this, _Channel_internalEmitter, "f").on('connected', connectedListener);
9132
9138
  });
9133
9139
  try {
9134
9140
  if (retryInfo.count > 0) {
@@ -9160,7 +9166,7 @@ class Channel extends base_1$h.EmitterBase {
9160
9166
  finally {
9161
9167
  retryInfo.count += 1;
9162
9168
  // in case of other errors, remove our listener
9163
- __classPrivateFieldGet$a(this, _Channel_internalEmitter, "f").removeListener('connected', connectedListener);
9169
+ __classPrivateFieldGet$b(this, _Channel_internalEmitter, "f").removeListener('connected', connectedListener);
9164
9170
  }
9165
9171
  } while (shouldWait); // If we're waiting we retry the above loop
9166
9172
  // Should wait was false, no channel was found.
@@ -9219,12 +9225,12 @@ class Channel extends base_1$h.EmitterBase {
9219
9225
  async connect(channelName, options = {}) {
9220
9226
  // Make sure we don't connect before listeners are set up
9221
9227
  // This also errors if we're not in OpenFin, ensuring we don't run unnecessary code
9222
- await __classPrivateFieldGet$a(this, _Channel_readyToConnect, "f").getValue();
9228
+ await __classPrivateFieldGet$b(this, _Channel_readyToConnect, "f").getValue();
9223
9229
  if (!channelName || typeof channelName !== 'string') {
9224
9230
  throw new Error('Please provide a channelName string to connect to a channel.');
9225
9231
  }
9226
9232
  const opts = { wait: true, ...this.wire.environment.getDefaultChannelOptions().connect, ...options };
9227
- const { offer, rtc: rtcPacket } = await __classPrivateFieldGet$a(this, _Channel_connectionManager, "f").createClientOffer(opts);
9233
+ const { offer, rtc: rtcPacket } = await __classPrivateFieldGet$b(this, _Channel_connectionManager, "f").createClientOffer(opts);
9228
9234
  let connectionUrl;
9229
9235
  if (this.fin.me.isFrame || this.fin.me.isView || this.fin.me.isWindow) {
9230
9236
  connectionUrl = (await this.fin.me.getInfo()).url;
@@ -9236,7 +9242,7 @@ class Channel extends base_1$h.EmitterBase {
9236
9242
  connectionUrl
9237
9243
  };
9238
9244
  const routingInfo = await this.safeConnect(channelName, opts.wait, connectPayload);
9239
- const strategy = await __classPrivateFieldGet$a(this, _Channel_connectionManager, "f").createClientStrategy(rtcPacket, routingInfo);
9245
+ const strategy = await __classPrivateFieldGet$b(this, _Channel_connectionManager, "f").createClientStrategy(rtcPacket, routingInfo);
9240
9246
  const channel = new client_1.ChannelClient(routingInfo, () => client_1.ChannelClient.wireClose(this.wire, routingInfo, routingInfo.endpointId), strategy);
9241
9247
  // It is the client's responsibility to handle endpoint disconnection to the provider.
9242
9248
  // If the endpoint dies, the client will force a disconnection through the core.
@@ -9305,7 +9311,7 @@ class Channel extends base_1$h.EmitterBase {
9305
9311
  throw new Error('Please provide a channelName to create a channel');
9306
9312
  }
9307
9313
  const { payload: { data: providerIdentity } } = await this.wire.sendAction('create-channel', { channelName });
9308
- const channel = __classPrivateFieldGet$a(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
9314
+ const channel = __classPrivateFieldGet$b(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
9309
9315
  // TODO: fix typing (internal)
9310
9316
  // @ts-expect-error
9311
9317
  this.on('client-disconnected', (eventPayload) => {
@@ -9329,7 +9335,7 @@ interappbus.InterAppPayload = interappbus.InterApplicationBus = void 0;
9329
9335
  * @packageDocumentation
9330
9336
  */
9331
9337
  const events_1$4 = require$$0;
9332
- const base_1$g = base;
9338
+ const base_1$h = base;
9333
9339
  const ref_counter_1 = refCounter;
9334
9340
  const index_1$2 = channel$1;
9335
9341
  const validate_1$3 = validate;
@@ -9337,7 +9343,7 @@ const validate_1$3 = validate;
9337
9343
  * A messaging bus that allows for pub/sub messaging between different applications.
9338
9344
  *
9339
9345
  */
9340
- class InterApplicationBus extends base_1$g.Base {
9346
+ class InterApplicationBus extends base_1$h.Base {
9341
9347
  /**
9342
9348
  * @internal
9343
9349
  */
@@ -9543,12 +9549,12 @@ var clipboard = {};
9543
9549
  */
9544
9550
  Object.defineProperty(clipboard, "__esModule", { value: true });
9545
9551
  clipboard.Clipboard = void 0;
9546
- const base_1$f = base;
9552
+ const base_1$g = base;
9547
9553
  /**
9548
9554
  * The Clipboard API allows reading and writing to the clipboard in multiple formats.
9549
9555
  *
9550
9556
  */
9551
- class Clipboard extends base_1$f.Base {
9557
+ class Clipboard extends base_1$g.Base {
9552
9558
  /**
9553
9559
  * Writes data into the clipboard as plain text
9554
9560
  * @param writeObj The object for writing data into the clipboard
@@ -9737,7 +9743,7 @@ var Instance$4 = {};
9737
9743
  Object.defineProperty(Instance$4, "__esModule", { value: true });
9738
9744
  Instance$4.ExternalApplication = void 0;
9739
9745
  /* eslint-disable import/prefer-default-export */
9740
- const base_1$e = base;
9746
+ const base_1$f = base;
9741
9747
  /**
9742
9748
  * An ExternalApplication object representing native language adapter connections to the runtime. Allows
9743
9749
  * the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
@@ -9748,7 +9754,7 @@ const base_1$e = base;
9748
9754
  * - Processes started via `System.launchExternalApplication`
9749
9755
  * - Processes monitored via `System.monitorExternalProcess`
9750
9756
  */
9751
- class ExternalApplication extends base_1$e.EmitterBase {
9757
+ class ExternalApplication extends base_1$f.EmitterBase {
9752
9758
  /**
9753
9759
  * @internal
9754
9760
  */
@@ -9776,12 +9782,12 @@ Instance$4.ExternalApplication = ExternalApplication;
9776
9782
 
9777
9783
  Object.defineProperty(Factory$5, "__esModule", { value: true });
9778
9784
  Factory$5.ExternalApplicationModule = void 0;
9779
- const base_1$d = base;
9785
+ const base_1$e = base;
9780
9786
  const Instance_1$4 = Instance$4;
9781
9787
  /**
9782
9788
  * Static namespace for OpenFin API methods that interact with the {@link ExternalApplication} class, available under `fin.ExternalApplication`.
9783
9789
  */
9784
- class ExternalApplicationModule extends base_1$d.Base {
9790
+ class ExternalApplicationModule extends base_1$e.Base {
9785
9791
  /**
9786
9792
  * Asynchronously returns an External Application object that represents an external application.
9787
9793
  * <br>It is possible to wrap a process that does not yet exist, (for example, to listen for startup-related events)
@@ -9863,7 +9869,7 @@ var Instance$3 = {};
9863
9869
  Object.defineProperty(Instance$3, "__esModule", { value: true });
9864
9870
  Instance$3._Frame = void 0;
9865
9871
  /* eslint-disable import/prefer-default-export */
9866
- const base_1$c = base;
9872
+ const base_1$d = base;
9867
9873
  /**
9868
9874
  * An iframe represents an embedded HTML page within a parent HTML page. Because this embedded page
9869
9875
  * has its own DOM and global JS context (which may or may not be linked to that of the parent depending
@@ -9884,7 +9890,7 @@ const base_1$c = base;
9884
9890
  * The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
9885
9891
  * (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
9886
9892
  */
9887
- class _Frame extends base_1$c.EmitterBase {
9893
+ class _Frame extends base_1$d.EmitterBase {
9888
9894
  /**
9889
9895
  * @internal
9890
9896
  */
@@ -9930,13 +9936,13 @@ Instance$3._Frame = _Frame;
9930
9936
 
9931
9937
  Object.defineProperty(Factory$4, "__esModule", { value: true });
9932
9938
  Factory$4._FrameModule = void 0;
9933
- const base_1$b = base;
9939
+ const base_1$c = base;
9934
9940
  const validate_1$2 = validate;
9935
9941
  const Instance_1$3 = Instance$3;
9936
9942
  /**
9937
9943
  * Static namespace for OpenFin API methods that interact with the {@link _Frame} class, available under `fin.Frame`.
9938
9944
  */
9939
- class _FrameModule extends base_1$b.Base {
9945
+ class _FrameModule extends base_1$c.Base {
9940
9946
  /**
9941
9947
  * Asynchronously returns an API handle for the given Frame identity.
9942
9948
  *
@@ -10057,12 +10063,12 @@ var globalHotkey = {};
10057
10063
 
10058
10064
  Object.defineProperty(globalHotkey, "__esModule", { value: true });
10059
10065
  globalHotkey.GlobalHotkey = void 0;
10060
- const base_1$a = base;
10066
+ const base_1$b = base;
10061
10067
  /**
10062
10068
  * The GlobalHotkey module can register/unregister a global hotkeys.
10063
10069
  *
10064
10070
  */
10065
- class GlobalHotkey extends base_1$a.EmitterBase {
10071
+ class GlobalHotkey extends base_1$b.EmitterBase {
10066
10072
  /**
10067
10073
  * @internal
10068
10074
  */
@@ -10196,13 +10202,13 @@ var Factory$3 = {};
10196
10202
 
10197
10203
  var Instance$2 = {};
10198
10204
 
10199
- var __classPrivateFieldSet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10205
+ var __classPrivateFieldSet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10200
10206
  if (kind === "m") throw new TypeError("Private method is not writable");
10201
10207
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10202
10208
  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");
10203
10209
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
10204
10210
  };
10205
- var __classPrivateFieldGet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10211
+ var __classPrivateFieldGet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10206
10212
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10207
10213
  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");
10208
10214
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -10211,14 +10217,14 @@ var _Platform_channelName, _Platform_connectToProvider;
10211
10217
  Object.defineProperty(Instance$2, "__esModule", { value: true });
10212
10218
  Instance$2.Platform = void 0;
10213
10219
  /* eslint-disable import/prefer-default-export, no-undef */
10214
- const base_1$9 = base;
10220
+ const base_1$a = base;
10215
10221
  const validate_1$1 = validate;
10216
10222
  /** Manages the life cycle of windows and views in the application.
10217
10223
  *
10218
10224
  * Enables taking snapshots of itself and applying them to restore a previous configuration
10219
10225
  * as well as listen to {@link OpenFin.PlatformEvents platform events}.
10220
10226
  */
10221
- class Platform extends base_1$9.EmitterBase {
10227
+ class Platform extends base_1$a.EmitterBase {
10222
10228
  /**
10223
10229
  * @internal
10224
10230
  */
@@ -10239,24 +10245,24 @@ class Platform extends base_1$9.EmitterBase {
10239
10245
  this.wire.sendAction('platform-get-client', this.identity).catch((e) => {
10240
10246
  // don't expose
10241
10247
  });
10242
- if (!Platform.clientMap.has(__classPrivateFieldGet$9(this, _Platform_channelName, "f"))) {
10243
- const clientPromise = __classPrivateFieldGet$9(this, _Platform_connectToProvider, "f").call(this);
10244
- Platform.clientMap.set(__classPrivateFieldGet$9(this, _Platform_channelName, "f"), clientPromise);
10248
+ if (!Platform.clientMap.has(__classPrivateFieldGet$a(this, _Platform_channelName, "f"))) {
10249
+ const clientPromise = __classPrivateFieldGet$a(this, _Platform_connectToProvider, "f").call(this);
10250
+ Platform.clientMap.set(__classPrivateFieldGet$a(this, _Platform_channelName, "f"), clientPromise);
10245
10251
  }
10246
10252
  // we set it above
10247
10253
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
10248
- return Platform.clientMap.get(__classPrivateFieldGet$9(this, _Platform_channelName, "f"));
10254
+ return Platform.clientMap.get(__classPrivateFieldGet$a(this, _Platform_channelName, "f"));
10249
10255
  };
10250
10256
  _Platform_connectToProvider.set(this, async () => {
10251
10257
  try {
10252
- const client = await this._channel.connect(__classPrivateFieldGet$9(this, _Platform_channelName, "f"), { wait: false });
10258
+ const client = await this._channel.connect(__classPrivateFieldGet$a(this, _Platform_channelName, "f"), { wait: false });
10253
10259
  client.onDisconnection(() => {
10254
- Platform.clientMap.delete(__classPrivateFieldGet$9(this, _Platform_channelName, "f"));
10260
+ Platform.clientMap.delete(__classPrivateFieldGet$a(this, _Platform_channelName, "f"));
10255
10261
  });
10256
10262
  return client;
10257
10263
  }
10258
10264
  catch (e) {
10259
- Platform.clientMap.delete(__classPrivateFieldGet$9(this, _Platform_channelName, "f"));
10265
+ Platform.clientMap.delete(__classPrivateFieldGet$a(this, _Platform_channelName, "f"));
10260
10266
  throw new Error('The targeted Platform is not currently running. Listen for application-started event for the given Uuid.');
10261
10267
  }
10262
10268
  });
@@ -10269,7 +10275,7 @@ class Platform extends base_1$9.EmitterBase {
10269
10275
  if (errorMsg) {
10270
10276
  throw new Error(errorMsg);
10271
10277
  }
10272
- __classPrivateFieldSet$8(this, _Platform_channelName, channelName, "f");
10278
+ __classPrivateFieldSet$9(this, _Platform_channelName, channelName, "f");
10273
10279
  this._channel = this.fin.InterApplicationBus.Channel;
10274
10280
  this.identity = { uuid: identity.uuid };
10275
10281
  this.Layout = this.fin.Platform.Layout;
@@ -11325,13 +11331,13 @@ const createRelayedDispatch = (client, target, relayId, relayErrorMsg) => async
11325
11331
  };
11326
11332
  channelApiRelay.createRelayedDispatch = createRelayedDispatch;
11327
11333
 
11328
- var __classPrivateFieldSet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11334
+ var __classPrivateFieldSet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11329
11335
  if (kind === "m") throw new TypeError("Private method is not writable");
11330
11336
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
11331
11337
  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");
11332
11338
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11333
11339
  };
11334
- var __classPrivateFieldGet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11340
+ var __classPrivateFieldGet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11335
11341
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
11336
11342
  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");
11337
11343
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -11385,7 +11391,7 @@ class LayoutNode {
11385
11391
  * console.log(`The parent ColumnOrRow is root: ${parentIsRoot}`);
11386
11392
  * ```
11387
11393
  */
11388
- this.isRoot = () => __classPrivateFieldGet$8(this, _LayoutNode_client, "f").isRoot(this.entityId);
11394
+ this.isRoot = () => __classPrivateFieldGet$9(this, _LayoutNode_client, "f").isRoot(this.entityId);
11389
11395
  /**
11390
11396
  * Checks if the TabStack or ColumnOrRow exists
11391
11397
  *
@@ -11405,7 +11411,7 @@ class LayoutNode {
11405
11411
  * console.log(`The entity exists: ${exists}`);
11406
11412
  * ```
11407
11413
  */
11408
- this.exists = () => __classPrivateFieldGet$8(this, _LayoutNode_client, "f").exists(this.entityId);
11414
+ this.exists = () => __classPrivateFieldGet$9(this, _LayoutNode_client, "f").exists(this.entityId);
11409
11415
  /**
11410
11416
  * Retrieves the parent of the TabStack or ColumnOrRow
11411
11417
  *
@@ -11426,11 +11432,11 @@ class LayoutNode {
11426
11432
  * ```
11427
11433
  */
11428
11434
  this.getParent = async () => {
11429
- const parent = await __classPrivateFieldGet$8(this, _LayoutNode_client, "f").getParent(this.entityId);
11435
+ const parent = await __classPrivateFieldGet$9(this, _LayoutNode_client, "f").getParent(this.entityId);
11430
11436
  if (!parent) {
11431
11437
  return undefined;
11432
11438
  }
11433
- return LayoutNode.getEntity(parent, __classPrivateFieldGet$8(this, _LayoutNode_client, "f"));
11439
+ return LayoutNode.getEntity(parent, __classPrivateFieldGet$9(this, _LayoutNode_client, "f"));
11434
11440
  };
11435
11441
  /**
11436
11442
  * Creates a new TabStack adjacent to the given TabStack or ColumnOrRow. Inputs can be new views to create, or existing views.
@@ -11481,8 +11487,8 @@ class LayoutNode {
11481
11487
  * @experimental
11482
11488
  */
11483
11489
  this.createAdjacentStack = async (views, options) => {
11484
- const entityId = await __classPrivateFieldGet$8(this, _LayoutNode_client, "f").createAdjacentStack(this.entityId, views, options);
11485
- return LayoutNode.getEntity({ entityId, type: 'stack' }, __classPrivateFieldGet$8(this, _LayoutNode_client, "f"));
11490
+ const entityId = await __classPrivateFieldGet$9(this, _LayoutNode_client, "f").createAdjacentStack(this.entityId, views, options);
11491
+ return LayoutNode.getEntity({ entityId, type: 'stack' }, __classPrivateFieldGet$9(this, _LayoutNode_client, "f"));
11486
11492
  };
11487
11493
  /**
11488
11494
  * Retrieves the adjacent TabStacks of the given TabStack or ColumnOrRow.
@@ -11510,16 +11516,16 @@ class LayoutNode {
11510
11516
  * @experimental
11511
11517
  */
11512
11518
  this.getAdjacentStacks = async (edge) => {
11513
- const adjacentStacks = await __classPrivateFieldGet$8(this, _LayoutNode_client, "f").getAdjacentStacks({
11519
+ const adjacentStacks = await __classPrivateFieldGet$9(this, _LayoutNode_client, "f").getAdjacentStacks({
11514
11520
  targetId: this.entityId,
11515
11521
  edge
11516
11522
  });
11517
11523
  return adjacentStacks.map((stack) => LayoutNode.getEntity({
11518
11524
  type: 'stack',
11519
11525
  entityId: stack.entityId
11520
- }, __classPrivateFieldGet$8(this, _LayoutNode_client, "f")));
11526
+ }, __classPrivateFieldGet$9(this, _LayoutNode_client, "f")));
11521
11527
  };
11522
- __classPrivateFieldSet$7(this, _LayoutNode_client, client, "f");
11528
+ __classPrivateFieldSet$8(this, _LayoutNode_client, client, "f");
11523
11529
  this.entityId = entityId;
11524
11530
  }
11525
11531
  }
@@ -11592,7 +11598,7 @@ class TabStack extends LayoutNode {
11592
11598
  * ```
11593
11599
  * @experimental
11594
11600
  */
11595
- this.getViews = () => __classPrivateFieldGet$8(this, _TabStack_client, "f").getStackViews(this.entityId);
11601
+ this.getViews = () => __classPrivateFieldGet$9(this, _TabStack_client, "f").getStackViews(this.entityId);
11596
11602
  /**
11597
11603
  * Adds or creates a view in this {@link TabStack}.
11598
11604
  *
@@ -11622,7 +11628,7 @@ class TabStack extends LayoutNode {
11622
11628
  * ```
11623
11629
  * @experimental
11624
11630
  */
11625
- this.addView = async (view, options = { index: 0 }) => __classPrivateFieldGet$8(this, _TabStack_client, "f").addViewToStack(this.entityId, view, options);
11631
+ this.addView = async (view, options = { index: 0 }) => __classPrivateFieldGet$9(this, _TabStack_client, "f").addViewToStack(this.entityId, view, options);
11626
11632
  /**
11627
11633
  * Removes a view from this {@link TabStack}.
11628
11634
  *
@@ -11652,7 +11658,7 @@ class TabStack extends LayoutNode {
11652
11658
  * ```
11653
11659
  */
11654
11660
  this.removeView = async (view) => {
11655
- await __classPrivateFieldGet$8(this, _TabStack_client, "f").removeViewFromStack(this.entityId, view);
11661
+ await __classPrivateFieldGet$9(this, _TabStack_client, "f").removeViewFromStack(this.entityId, view);
11656
11662
  };
11657
11663
  /**
11658
11664
  * Sets the active view of the {@link TabStack} without focusing it.
@@ -11676,9 +11682,9 @@ class TabStack extends LayoutNode {
11676
11682
  * @experimental
11677
11683
  */
11678
11684
  this.setActiveView = async (view) => {
11679
- await __classPrivateFieldGet$8(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
11685
+ await __classPrivateFieldGet$9(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
11680
11686
  };
11681
- __classPrivateFieldSet$7(this, _TabStack_client, client, "f");
11687
+ __classPrivateFieldSet$8(this, _TabStack_client, client, "f");
11682
11688
  }
11683
11689
  }
11684
11690
  layoutEntities.TabStack = TabStack;
@@ -11717,10 +11723,10 @@ class ColumnOrRow extends LayoutNode {
11717
11723
  * ```
11718
11724
  */
11719
11725
  this.getContent = async () => {
11720
- const contentItemEntities = await __classPrivateFieldGet$8(this, _ColumnOrRow_client, "f").getContent(this.entityId);
11721
- return contentItemEntities.map((entity) => LayoutNode.getEntity(entity, __classPrivateFieldGet$8(this, _ColumnOrRow_client, "f")));
11726
+ const contentItemEntities = await __classPrivateFieldGet$9(this, _ColumnOrRow_client, "f").getContent(this.entityId);
11727
+ return contentItemEntities.map((entity) => LayoutNode.getEntity(entity, __classPrivateFieldGet$9(this, _ColumnOrRow_client, "f")));
11722
11728
  };
11723
- __classPrivateFieldSet$7(this, _ColumnOrRow_client, client, "f");
11729
+ __classPrivateFieldSet$8(this, _ColumnOrRow_client, client, "f");
11724
11730
  this.type = type;
11725
11731
  }
11726
11732
  }
@@ -11735,7 +11741,7 @@ layout_constants.LAYOUT_CONTROLLER_ID = 'layout-entities';
11735
11741
  // TODO: eventually export this somehow
11736
11742
  layout_constants.DEFAULT_LAYOUT_KEY = '__default__';
11737
11743
 
11738
- var __classPrivateFieldGet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11744
+ var __classPrivateFieldGet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11739
11745
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
11740
11746
  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");
11741
11747
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -11743,9 +11749,9 @@ var __classPrivateFieldGet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateF
11743
11749
  var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
11744
11750
  Object.defineProperty(Instance$1, "__esModule", { value: true });
11745
11751
  Instance$1.Layout = void 0;
11746
- const lazy_1$1 = lazy;
11752
+ const lazy_1$2 = lazy;
11747
11753
  const validate_1 = validate;
11748
- const base_1$8 = base;
11754
+ const base_1$9 = base;
11749
11755
  const common_utils_1$1 = commonUtils;
11750
11756
  const layout_entities_1 = layoutEntities;
11751
11757
  const layout_constants_1$1 = layout_constants;
@@ -11881,12 +11887,12 @@ const layout_constants_1$1 = layout_constants;
11881
11887
  * }
11882
11888
  * ```
11883
11889
  */
11884
- class Layout extends base_1$8.Base {
11890
+ class Layout extends base_1$9.Base {
11885
11891
  /**
11886
11892
  * @internal
11887
11893
  */
11888
11894
  static getClient(layout) {
11889
- return __classPrivateFieldGet$7(layout, _Layout_layoutClient, "f").getValue();
11895
+ return __classPrivateFieldGet$8(layout, _Layout_layoutClient, "f").getValue();
11890
11896
  }
11891
11897
  /**
11892
11898
  * @internal
@@ -11900,7 +11906,7 @@ class Layout extends base_1$8.Base {
11900
11906
  * Lazily constructed {@link LayoutEntitiesClient} bound to this platform's client and identity
11901
11907
  * The client is for {@link LayoutEntitiesController}
11902
11908
  */
11903
- _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)));
11909
+ _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)));
11904
11910
  /**
11905
11911
  * Replaces a Platform window's layout with a new layout.
11906
11912
  *
@@ -12109,7 +12115,7 @@ class Layout extends base_1$8.Base {
12109
12115
  this.wire.sendAction('layout-get-root-item').catch(() => {
12110
12116
  // don't expose
12111
12117
  });
12112
- const client = await __classPrivateFieldGet$7(this, _Layout_layoutClient, "f").getValue();
12118
+ const client = await __classPrivateFieldGet$8(this, _Layout_layoutClient, "f").getValue();
12113
12119
  const root = await client.getRoot('layoutName' in this.identity ? this.identity : undefined);
12114
12120
  return layout_entities_1.LayoutNode.getEntity(root, client);
12115
12121
  }
@@ -12127,7 +12133,7 @@ class Layout extends base_1$8.Base {
12127
12133
  this.wire.sendAction('layout-get-stack-by-view').catch(() => {
12128
12134
  // don't expose
12129
12135
  });
12130
- const client = await __classPrivateFieldGet$7(this, _Layout_layoutClient, "f").getValue();
12136
+ const client = await __classPrivateFieldGet$8(this, _Layout_layoutClient, "f").getValue();
12131
12137
  const stack = await client.getStackByView(identity);
12132
12138
  if (!stack) {
12133
12139
  throw new Error(`No stack found for view: ${identity.uuid}/${identity.name}`);
@@ -12147,7 +12153,7 @@ class Layout extends base_1$8.Base {
12147
12153
  this.wire.sendAction('layout-add-view').catch((e) => {
12148
12154
  // don't expose
12149
12155
  });
12150
- const { identity } = await __classPrivateFieldGet$7(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-add-view', {
12156
+ const { identity } = await __classPrivateFieldGet$8(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-add-view', {
12151
12157
  viewOptions,
12152
12158
  location,
12153
12159
  targetView
@@ -12165,7 +12171,7 @@ class Layout extends base_1$8.Base {
12165
12171
  this.wire.sendAction('layout-close-view').catch((e) => {
12166
12172
  // don't expose
12167
12173
  });
12168
- await __classPrivateFieldGet$7(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
12174
+ await __classPrivateFieldGet$8(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
12169
12175
  }
12170
12176
  }
12171
12177
  Instance$1.Layout = Layout;
@@ -12179,12 +12185,12 @@ async function _Layout_forwardLayoutAction(action, payload) {
12179
12185
  return client.dispatch(action, { target: this.identity, opts: payload });
12180
12186
  };
12181
12187
 
12182
- var __classPrivateFieldGet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12188
+ var __classPrivateFieldGet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12183
12189
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
12184
12190
  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");
12185
12191
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12186
12192
  };
12187
- var __classPrivateFieldSet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12193
+ var __classPrivateFieldSet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12188
12194
  if (kind === "m") throw new TypeError("Private method is not writable");
12189
12195
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
12190
12196
  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");
@@ -12193,13 +12199,13 @@ var __classPrivateFieldSet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateF
12193
12199
  var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getLayoutManagerSpy, _LayoutModule_getSafeLayoutManager;
12194
12200
  Object.defineProperty(Factory$2, "__esModule", { value: true });
12195
12201
  Factory$2.LayoutModule = void 0;
12196
- const base_1$7 = base;
12202
+ const base_1$8 = base;
12197
12203
  const Instance_1$2 = Instance$1;
12198
12204
  const layout_constants_1 = layout_constants;
12199
12205
  /**
12200
12206
  * Static namespace for OpenFin API methods that interact with the {@link Layout} class, available under `fin.Platform.Layout`.
12201
12207
  */
12202
- class LayoutModule extends base_1$7.Base {
12208
+ class LayoutModule extends base_1$8.Base {
12203
12209
  constructor() {
12204
12210
  super(...arguments);
12205
12211
  _LayoutModule_instances.add(this);
@@ -12250,23 +12256,23 @@ class LayoutModule extends base_1$7.Base {
12250
12256
  if (!this.wire.environment.layoutAllowedInContext(this.fin)) {
12251
12257
  throw new Error('Layout.init can only be called from a Window context.');
12252
12258
  }
12253
- if (__classPrivateFieldGet$6(this, _LayoutModule_layoutInitializationAttempted, "f")) {
12259
+ if (__classPrivateFieldGet$7(this, _LayoutModule_layoutInitializationAttempted, "f")) {
12254
12260
  throw new Error('Layout.init was already called, please use Layout.create to add additional layouts.');
12255
12261
  }
12256
12262
  if (this.wire.environment.type === 'openfin') {
12257
12263
  // preload the client
12258
12264
  await this.fin.Platform.getCurrentSync().getClient();
12259
12265
  }
12260
- __classPrivateFieldSet$6(this, _LayoutModule_layoutInitializationAttempted, true, "f");
12266
+ __classPrivateFieldSet$7(this, _LayoutModule_layoutInitializationAttempted, true, "f");
12261
12267
  // TODO: rename to createLayoutManager
12262
- __classPrivateFieldSet$6(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
12263
- await this.wire.environment.applyLayoutSnapshot(this.fin, __classPrivateFieldGet$6(this, _LayoutModule_layoutManager, "f"), options);
12268
+ __classPrivateFieldSet$7(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
12269
+ await this.wire.environment.applyLayoutSnapshot(this.fin, __classPrivateFieldGet$7(this, _LayoutModule_layoutManager, "f"), options);
12264
12270
  const meIdentity = { name: this.fin.me.name, uuid: this.fin.me.uuid };
12265
12271
  if (!options.layoutManagerOverride) {
12266
12272
  // CORE-1081 to be removed when we actually delete the `layoutManager` prop
12267
12273
  // in single-layout case, we return the undocumented layoutManager type
12268
12274
  const layoutIdentity = { layoutName: layout_constants_1.DEFAULT_LAYOUT_KEY, ...meIdentity };
12269
- return __classPrivateFieldGet$6(this, _LayoutModule_getLayoutManagerSpy, "f").call(this, layoutIdentity);
12275
+ return __classPrivateFieldGet$7(this, _LayoutModule_getLayoutManagerSpy, "f").call(this, layoutIdentity);
12270
12276
  }
12271
12277
  return this.wrapSync(meIdentity);
12272
12278
  };
@@ -12295,13 +12301,13 @@ class LayoutModule extends base_1$7.Base {
12295
12301
  * @returns
12296
12302
  */
12297
12303
  this.getCurrentLayoutManagerSync = () => {
12298
- return __classPrivateFieldGet$6(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
12304
+ return __classPrivateFieldGet$7(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
12299
12305
  };
12300
12306
  this.create = async (options) => {
12301
- return this.wire.environment.createLayout(__classPrivateFieldGet$6(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.create()`), options);
12307
+ return this.wire.environment.createLayout(__classPrivateFieldGet$7(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.create()`), options);
12302
12308
  };
12303
12309
  this.destroy = async (layoutIdentity) => {
12304
- return this.wire.environment.destroyLayout(__classPrivateFieldGet$6(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.destroy()`), layoutIdentity);
12310
+ return this.wire.environment.destroyLayout(__classPrivateFieldGet$7(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.destroy()`), layoutIdentity);
12305
12311
  };
12306
12312
  }
12307
12313
  /**
@@ -12442,10 +12448,10 @@ class LayoutModule extends base_1$7.Base {
12442
12448
  }
12443
12449
  Factory$2.LayoutModule = LayoutModule;
12444
12450
  _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getLayoutManagerSpy = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_getSafeLayoutManager = function _LayoutModule_getSafeLayoutManager(method) {
12445
- if (!__classPrivateFieldGet$6(this, _LayoutModule_layoutManager, "f")) {
12451
+ if (!__classPrivateFieldGet$7(this, _LayoutModule_layoutManager, "f")) {
12446
12452
  throw new Error(`You must call init before using the API ${method}`);
12447
12453
  }
12448
- return __classPrivateFieldGet$6(this, _LayoutModule_layoutManager, "f");
12454
+ return __classPrivateFieldGet$7(this, _LayoutModule_layoutManager, "f");
12449
12455
  };
12450
12456
 
12451
12457
  (function (exports) {
@@ -12482,13 +12488,13 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layou
12482
12488
 
12483
12489
  Object.defineProperty(Factory$3, "__esModule", { value: true });
12484
12490
  Factory$3.PlatformModule = void 0;
12485
- const base_1$6 = base;
12491
+ const base_1$7 = base;
12486
12492
  const Instance_1$1 = Instance$2;
12487
12493
  const index_1$1 = layout;
12488
12494
  /**
12489
12495
  * Static namespace for OpenFin API methods that interact with the {@link Platform} class, available under `fin.Platform`.
12490
12496
  */
12491
- class PlatformModule extends base_1$6.Base {
12497
+ class PlatformModule extends base_1$7.Base {
12492
12498
  /**
12493
12499
  * @internal
12494
12500
  */
@@ -13408,13 +13414,13 @@ class PrivateChannelProvider {
13408
13414
  }
13409
13415
  PrivateChannelProvider$1.PrivateChannelProvider = PrivateChannelProvider;
13410
13416
 
13411
- var __classPrivateFieldSet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13417
+ var __classPrivateFieldSet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13412
13418
  if (kind === "m") throw new TypeError("Private method is not writable");
13413
13419
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
13414
13420
  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");
13415
13421
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
13416
13422
  };
13417
- var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13423
+ var __classPrivateFieldGet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13418
13424
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13419
13425
  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");
13420
13426
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -13425,12 +13431,12 @@ var __importDefault$4 = (commonjsGlobal && commonjsGlobal.__importDefault) || fu
13425
13431
  var _InteropBroker_fdc3Info, _InteropBroker_contextGroups, _InteropBroker_providerPromise;
13426
13432
  Object.defineProperty(InteropBroker$1, "__esModule", { value: true });
13427
13433
  InteropBroker$1.InteropBroker = void 0;
13428
- const base_1$5 = base;
13434
+ const base_1$6 = base;
13429
13435
  const SessionContextGroupBroker_1 = __importDefault$4(SessionContextGroupBroker$1);
13430
13436
  const utils_1$7 = utils$3;
13431
13437
  const isEqual_1$1 = __importDefault$4(require$$3);
13432
13438
  const PrivateChannelProvider_1 = PrivateChannelProvider$1;
13433
- const lazy_1 = lazy;
13439
+ const lazy_1$1 = lazy;
13434
13440
  const defaultContextGroups = [
13435
13441
  {
13436
13442
  id: 'green',
@@ -13594,7 +13600,7 @@ const defaultContextGroups = [
13594
13600
  * ---
13595
13601
  *
13596
13602
  */
13597
- class InteropBroker extends base_1$5.Base {
13603
+ class InteropBroker extends base_1$6.Base {
13598
13604
  /**
13599
13605
  * @internal
13600
13606
  */
@@ -13605,19 +13611,19 @@ class InteropBroker extends base_1$5.Base {
13605
13611
  _InteropBroker_contextGroups.set(this, void 0);
13606
13612
  _InteropBroker_providerPromise.set(this, void 0);
13607
13613
  this.getProvider = () => {
13608
- return __classPrivateFieldGet$5(this, _InteropBroker_providerPromise, "f").getValue();
13614
+ return __classPrivateFieldGet$6(this, _InteropBroker_providerPromise, "f").getValue();
13609
13615
  };
13610
13616
  this.interopClients = new Map();
13611
13617
  this.contextGroupsById = new Map();
13612
- __classPrivateFieldSet$5(this, _InteropBroker_contextGroups, options.contextGroups ?? [...defaultContextGroups], "f");
13613
- __classPrivateFieldSet$5(this, _InteropBroker_fdc3Info, options.fdc3Info, "f");
13618
+ __classPrivateFieldSet$6(this, _InteropBroker_contextGroups, options.contextGroups ?? [...defaultContextGroups], "f");
13619
+ __classPrivateFieldSet$6(this, _InteropBroker_fdc3Info, options.fdc3Info, "f");
13614
13620
  if (options?.logging) {
13615
13621
  this.logging = options.logging;
13616
13622
  }
13617
13623
  this.intentClientMap = new Map();
13618
13624
  this.lastContextMap = new Map();
13619
13625
  this.sessionContextGroupMap = new Map();
13620
- __classPrivateFieldSet$5(this, _InteropBroker_providerPromise, new lazy_1.Lazy(createProvider), "f");
13626
+ __classPrivateFieldSet$6(this, _InteropBroker_providerPromise, new lazy_1$1.Lazy(createProvider), "f");
13621
13627
  this.setContextGroupMap();
13622
13628
  this.setupChannelProvider();
13623
13629
  }
@@ -13885,7 +13891,7 @@ class InteropBroker extends base_1$5.Base {
13885
13891
  // don't expose, analytics-only call
13886
13892
  });
13887
13893
  // Create copy for immutability
13888
- return __classPrivateFieldGet$5(this, _InteropBroker_contextGroups, "f").map((contextGroup) => {
13894
+ return __classPrivateFieldGet$6(this, _InteropBroker_contextGroups, "f").map((contextGroup) => {
13889
13895
  return { ...contextGroup };
13890
13896
  });
13891
13897
  }
@@ -14296,7 +14302,7 @@ class InteropBroker extends base_1$5.Base {
14296
14302
  const { fdc3Version } = payload;
14297
14303
  return {
14298
14304
  fdc3Version,
14299
- ...__classPrivateFieldGet$5(this, _InteropBroker_fdc3Info, "f"),
14305
+ ...__classPrivateFieldGet$6(this, _InteropBroker_fdc3Info, "f"),
14300
14306
  optionalFeatures: {
14301
14307
  OriginatingAppMetadata: false,
14302
14308
  UserChannelMembershipAPIs: true
@@ -14673,27 +14679,27 @@ var InteropClient$1 = {};
14673
14679
 
14674
14680
  var SessionContextGroupClient$1 = {};
14675
14681
 
14676
- var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14682
+ var __classPrivateFieldSet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14677
14683
  if (kind === "m") throw new TypeError("Private method is not writable");
14678
14684
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14679
14685
  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");
14680
14686
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
14681
14687
  };
14682
- var __classPrivateFieldGet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14688
+ var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14683
14689
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14684
14690
  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");
14685
14691
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
14686
14692
  };
14687
14693
  var _SessionContextGroupClient_clientPromise;
14688
14694
  Object.defineProperty(SessionContextGroupClient$1, "__esModule", { value: true });
14689
- const base_1$4 = base;
14695
+ const base_1$5 = base;
14690
14696
  const utils_1$6 = utils$3;
14691
- class SessionContextGroupClient extends base_1$4.Base {
14697
+ class SessionContextGroupClient extends base_1$5.Base {
14692
14698
  constructor(wire, client, id) {
14693
14699
  super(wire);
14694
14700
  _SessionContextGroupClient_clientPromise.set(this, void 0);
14695
14701
  this.id = id;
14696
- __classPrivateFieldSet$4(this, _SessionContextGroupClient_clientPromise, client, "f");
14702
+ __classPrivateFieldSet$5(this, _SessionContextGroupClient_clientPromise, client, "f");
14697
14703
  }
14698
14704
  /**
14699
14705
  * Sets a context for the session context group.
@@ -14705,7 +14711,7 @@ class SessionContextGroupClient extends base_1$4.Base {
14705
14711
  this.wire.sendAction('interop-session-context-group-set-context').catch((e) => {
14706
14712
  // don't expose, analytics-only call
14707
14713
  });
14708
- const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
14714
+ const client = await __classPrivateFieldGet$5(this, _SessionContextGroupClient_clientPromise, "f");
14709
14715
  return client.dispatch(`sessionContextGroup:setContext-${this.id}`, {
14710
14716
  sessionContextGroupId: this.id,
14711
14717
  context
@@ -14715,7 +14721,7 @@ class SessionContextGroupClient extends base_1$4.Base {
14715
14721
  this.wire.sendAction('interop-session-context-group-get-context').catch((e) => {
14716
14722
  // don't expose, analytics-only call
14717
14723
  });
14718
- const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
14724
+ const client = await __classPrivateFieldGet$5(this, _SessionContextGroupClient_clientPromise, "f");
14719
14725
  return client.dispatch(`sessionContextGroup:getContext-${this.id}`, {
14720
14726
  sessionContextGroupId: this.id,
14721
14727
  type
@@ -14728,7 +14734,7 @@ class SessionContextGroupClient extends base_1$4.Base {
14728
14734
  if (typeof contextHandler !== 'function') {
14729
14735
  throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");
14730
14736
  }
14731
- const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
14737
+ const client = await __classPrivateFieldGet$5(this, _SessionContextGroupClient_clientPromise, "f");
14732
14738
  let handlerId;
14733
14739
  if (contextType) {
14734
14740
  handlerId = `sessionContextHandler:invoke-${this.id}-${contextType}-${(0, utils_1$6.generateId)()}`;
@@ -14741,7 +14747,7 @@ class SessionContextGroupClient extends base_1$4.Base {
14741
14747
  return { unsubscribe: await this.createUnsubscribeCb(handlerId) };
14742
14748
  }
14743
14749
  async createUnsubscribeCb(handlerId) {
14744
- const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
14750
+ const client = await __classPrivateFieldGet$5(this, _SessionContextGroupClient_clientPromise, "f");
14745
14751
  return async () => {
14746
14752
  client.remove(handlerId);
14747
14753
  await client.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`, { handlerId });
@@ -14759,13 +14765,13 @@ class SessionContextGroupClient extends base_1$4.Base {
14759
14765
  SessionContextGroupClient$1.default = SessionContextGroupClient;
14760
14766
  _SessionContextGroupClient_clientPromise = new WeakMap();
14761
14767
 
14762
- var __classPrivateFieldSet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14768
+ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14763
14769
  if (kind === "m") throw new TypeError("Private method is not writable");
14764
14770
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14765
14771
  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");
14766
14772
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
14767
14773
  };
14768
- var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14774
+ var __classPrivateFieldGet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14769
14775
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14770
14776
  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");
14771
14777
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -14776,7 +14782,7 @@ var __importDefault$3 = (commonjsGlobal && commonjsGlobal.__importDefault) || fu
14776
14782
  var _InteropClient_clientPromise, _InteropClient_sessionContextGroups, _InteropClient_fdc3Factory;
14777
14783
  Object.defineProperty(InteropClient$1, "__esModule", { value: true });
14778
14784
  InteropClient$1.InteropClient = void 0;
14779
- const base_1$3 = base;
14785
+ const base_1$4 = base;
14780
14786
  const SessionContextGroupClient_1 = __importDefault$3(SessionContextGroupClient$1);
14781
14787
  const utils_1$5 = utils$3;
14782
14788
  /**
@@ -14828,7 +14834,7 @@ const utils_1$5 = utils$3;
14828
14834
  * * {@link InteropClient#getAllClientsInContextGroup getAllClientsInContextGroup(contextGroupId)}
14829
14835
  *
14830
14836
  */
14831
- class InteropClient extends base_1$3.Base {
14837
+ class InteropClient extends base_1$4.Base {
14832
14838
  /**
14833
14839
  * @internal
14834
14840
  */
@@ -14837,9 +14843,9 @@ class InteropClient extends base_1$3.Base {
14837
14843
  _InteropClient_clientPromise.set(this, void 0);
14838
14844
  _InteropClient_sessionContextGroups.set(this, void 0);
14839
14845
  _InteropClient_fdc3Factory.set(this, void 0);
14840
- __classPrivateFieldSet$3(this, _InteropClient_sessionContextGroups, new Map(), "f");
14841
- __classPrivateFieldSet$3(this, _InteropClient_clientPromise, clientPromise, "f");
14842
- __classPrivateFieldSet$3(this, _InteropClient_fdc3Factory, fdc3Factory, "f");
14846
+ __classPrivateFieldSet$4(this, _InteropClient_sessionContextGroups, new Map(), "f");
14847
+ __classPrivateFieldSet$4(this, _InteropClient_clientPromise, clientPromise, "f");
14848
+ __classPrivateFieldSet$4(this, _InteropClient_fdc3Factory, fdc3Factory, "f");
14843
14849
  }
14844
14850
  /*
14845
14851
  Client APIs
@@ -14867,7 +14873,7 @@ class InteropClient extends base_1$3.Base {
14867
14873
  this.wire.sendAction('interop-client-set-context').catch((e) => {
14868
14874
  // don't expose, analytics-only call
14869
14875
  });
14870
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
14876
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
14871
14877
  return client.dispatch('setContext', { context });
14872
14878
  }
14873
14879
  /**
@@ -14934,7 +14940,7 @@ class InteropClient extends base_1$3.Base {
14934
14940
  if (typeof handler !== 'function') {
14935
14941
  throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");
14936
14942
  }
14937
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
14943
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
14938
14944
  let handlerId;
14939
14945
  if (contextType) {
14940
14946
  handlerId = `invokeContextHandler-${contextType}-${(0, utils_1$5.generateId)()}`;
@@ -14974,7 +14980,7 @@ class InteropClient extends base_1$3.Base {
14974
14980
  this.wire.sendAction('interop-client-get-context-groups').catch((e) => {
14975
14981
  // don't expose, analytics-only call
14976
14982
  });
14977
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
14983
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
14978
14984
  return client.dispatch('getContextGroups');
14979
14985
  }
14980
14986
  /**
@@ -15005,7 +15011,7 @@ class InteropClient extends base_1$3.Base {
15005
15011
  this.wire.sendAction('interop-client-join-context-group').catch((e) => {
15006
15012
  // don't expose, analytics-only call
15007
15013
  });
15008
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15014
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15009
15015
  if (!contextGroupId) {
15010
15016
  throw new Error('No contextGroupId specified for joinContextGroup.');
15011
15017
  }
@@ -15034,7 +15040,7 @@ class InteropClient extends base_1$3.Base {
15034
15040
  this.wire.sendAction('interop-client-remove-from-context-group').catch((e) => {
15035
15041
  // don't expose, analytics-only call
15036
15042
  });
15037
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15043
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15038
15044
  return client.dispatch('removeFromContextGroup', { target });
15039
15045
  }
15040
15046
  /**
@@ -15057,7 +15063,7 @@ class InteropClient extends base_1$3.Base {
15057
15063
  this.wire.sendAction('interop-client-get-all-clients-in-context-group').catch((e) => {
15058
15064
  // don't expose, analytics-only call
15059
15065
  });
15060
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15066
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15061
15067
  if (!contextGroupId) {
15062
15068
  throw new Error('No contextGroupId specified for getAllClientsInContextGroup.');
15063
15069
  }
@@ -15082,7 +15088,7 @@ class InteropClient extends base_1$3.Base {
15082
15088
  this.wire.sendAction('interop-client-get-info-for-context-group').catch((e) => {
15083
15089
  // don't expose, analytics-only call
15084
15090
  });
15085
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15091
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15086
15092
  if (!contextGroupId) {
15087
15093
  throw new Error('No contextGroupId specified for getInfoForContextGroup.');
15088
15094
  }
@@ -15110,7 +15116,7 @@ class InteropClient extends base_1$3.Base {
15110
15116
  this.wire.sendAction('interop-client-fire-intent').catch((e) => {
15111
15117
  // don't expose, this is only for api analytics purposes
15112
15118
  });
15113
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15119
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15114
15120
  return client.dispatch('fireIntent', intent);
15115
15121
  }
15116
15122
  /**
@@ -15137,7 +15143,7 @@ class InteropClient extends base_1$3.Base {
15137
15143
  this.wire.sendAction('interop-client-register-intent-handler').catch((e) => {
15138
15144
  // don't expose, this is only for api analytics purposes
15139
15145
  });
15140
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15146
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15141
15147
  const handlerId = `intent-handler-${intentName}`;
15142
15148
  const wrappedHandler = (0, utils_1$5.wrapIntentHandler)(handler, handlerId);
15143
15149
  try {
@@ -15175,7 +15181,7 @@ class InteropClient extends base_1$3.Base {
15175
15181
  this.wire.sendAction('interop-client-get-current-context').catch((e) => {
15176
15182
  // don't expose, analytics-only call
15177
15183
  });
15178
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15184
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15179
15185
  return client.dispatch('getCurrentContext', { contextType });
15180
15186
  }
15181
15187
  /**
@@ -15195,7 +15201,7 @@ class InteropClient extends base_1$3.Base {
15195
15201
  this.wire.sendAction('interop-client-get-info-for-intent').catch((e) => {
15196
15202
  // don't expose, analytics-only call
15197
15203
  });
15198
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15204
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15199
15205
  return client.dispatch('getInfoForIntent', options);
15200
15206
  }
15201
15207
  /**
@@ -15226,7 +15232,7 @@ class InteropClient extends base_1$3.Base {
15226
15232
  this.wire.sendAction('interop-client-get-info-for-intents-by-context').catch((e) => {
15227
15233
  // don't expose, analytics-only call
15228
15234
  });
15229
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15235
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15230
15236
  return client.dispatch('getInfoForIntentsByContext', context);
15231
15237
  }
15232
15238
  /**
@@ -15258,7 +15264,7 @@ class InteropClient extends base_1$3.Base {
15258
15264
  this.wire.sendAction('interop-client-fire-intent-for-context').catch((e) => {
15259
15265
  // don't expose, analytics-only call
15260
15266
  });
15261
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15267
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15262
15268
  return client.dispatch('fireIntentForContext', context);
15263
15269
  }
15264
15270
  /**
@@ -15295,19 +15301,19 @@ class InteropClient extends base_1$3.Base {
15295
15301
  */
15296
15302
  async joinSessionContextGroup(sessionContextGroupId) {
15297
15303
  try {
15298
- const currentSessionContextGroup = __classPrivateFieldGet$3(this, _InteropClient_sessionContextGroups, "f").get(sessionContextGroupId);
15304
+ const currentSessionContextGroup = __classPrivateFieldGet$4(this, _InteropClient_sessionContextGroups, "f").get(sessionContextGroupId);
15299
15305
  if (currentSessionContextGroup) {
15300
15306
  return currentSessionContextGroup.getUserInstance();
15301
15307
  }
15302
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15308
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15303
15309
  const { hasConflict } = await client.dispatch('sessionContextGroup:createIfNeeded', {
15304
15310
  sessionContextGroupId
15305
15311
  });
15306
15312
  if (hasConflict) {
15307
15313
  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.`);
15308
15314
  }
15309
- const newSessionContextGroup = new SessionContextGroupClient_1.default(this.wire, __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
15310
- __classPrivateFieldGet$3(this, _InteropClient_sessionContextGroups, "f").set(sessionContextGroupId, newSessionContextGroup);
15315
+ const newSessionContextGroup = new SessionContextGroupClient_1.default(this.wire, __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
15316
+ __classPrivateFieldGet$4(this, _InteropClient_sessionContextGroups, "f").set(sessionContextGroupId, newSessionContextGroup);
15311
15317
  return newSessionContextGroup.getUserInstance();
15312
15318
  }
15313
15319
  catch (error) {
@@ -15334,14 +15340,14 @@ class InteropClient extends base_1$3.Base {
15334
15340
  this.wire.sendAction('interop-client-add-ondisconnection-listener').catch((e) => {
15335
15341
  // don't expose, analytics-only call
15336
15342
  });
15337
- const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15343
+ const client = await __classPrivateFieldGet$4(this, _InteropClient_clientPromise, "f");
15338
15344
  return client.onDisconnection((event) => {
15339
15345
  const { uuid } = event;
15340
15346
  listener({ type: 'interop-broker', topic: 'disconnected', brokerName: uuid });
15341
15347
  });
15342
15348
  }
15343
15349
  getFDC3Sync(version) {
15344
- return __classPrivateFieldGet$3(this, _InteropClient_fdc3Factory, "f").call(this, version, this, this.wire);
15350
+ return __classPrivateFieldGet$4(this, _InteropClient_fdc3Factory, "f").call(this, version, this, this.wire);
15345
15351
  }
15346
15352
  async getFDC3(version) {
15347
15353
  return this.getFDC3Sync(version);
@@ -15352,7 +15358,7 @@ class InteropClient extends base_1$3.Base {
15352
15358
  * Used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
15353
15359
  */
15354
15360
  static async ferryFdc3Call(interopClient, action, payload) {
15355
- const client = await __classPrivateFieldGet$3(interopClient, _InteropClient_clientPromise, "f");
15361
+ const client = await __classPrivateFieldGet$4(interopClient, _InteropClient_clientPromise, "f");
15356
15362
  return client.dispatch(action, payload || null);
15357
15363
  }
15358
15364
  }
@@ -15767,12 +15773,12 @@ PrivateChannelClient$1.PrivateChannelClient = PrivateChannelClient;
15767
15773
  exports.getIntentResolution = getIntentResolution;
15768
15774
  } (utils$2));
15769
15775
 
15770
- var __classPrivateFieldGet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15776
+ var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15771
15777
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
15772
15778
  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");
15773
15779
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15774
15780
  };
15775
- var __classPrivateFieldSet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
15781
+ var __classPrivateFieldSet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
15776
15782
  if (kind === "m") throw new TypeError("Private method is not writable");
15777
15783
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
15778
15784
  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");
@@ -15790,7 +15796,7 @@ const InteropClient_1$2 = InteropClient$1;
15790
15796
  const isEqual_1 = __importDefault$2(require$$3);
15791
15797
  class FDC3ModuleBase {
15792
15798
  get client() {
15793
- return __classPrivateFieldGet$2(this, _FDC3ModuleBase_producer, "f").call(this);
15799
+ return __classPrivateFieldGet$3(this, _FDC3ModuleBase_producer, "f").call(this);
15794
15800
  }
15795
15801
  get fin() {
15796
15802
  return this.wire.getFin();
@@ -15799,7 +15805,7 @@ class FDC3ModuleBase {
15799
15805
  constructor(producer, wire) {
15800
15806
  this.wire = wire;
15801
15807
  _FDC3ModuleBase_producer.set(this, void 0);
15802
- __classPrivateFieldSet$2(this, _FDC3ModuleBase_producer, producer, "f");
15808
+ __classPrivateFieldSet$3(this, _FDC3ModuleBase_producer, producer, "f");
15803
15809
  }
15804
15810
  /**
15805
15811
  * Broadcasts a context for the channel of the current entity.
@@ -16580,7 +16586,7 @@ Object.defineProperty(Factory$1, "__esModule", { value: true });
16580
16586
  Factory$1.InteropModule = void 0;
16581
16587
  const cloneDeep_1 = __importDefault$1(require$$0$1);
16582
16588
  const inaccessibleObject_1 = inaccessibleObject;
16583
- const base_1$2 = base;
16589
+ const base_1$3 = base;
16584
16590
  const InteropBroker_1 = InteropBroker$1;
16585
16591
  const InteropClient_1 = InteropClient$1;
16586
16592
  const overrideCheck_1$1 = overrideCheck$1;
@@ -16592,7 +16598,7 @@ const BrokerParamAccessError = 'You have attempted to use or modify InteropBroke
16592
16598
  * Manages creation of Interop Brokers and Interop Clients. These APIs are called under-the-hood in Platforms.
16593
16599
  *
16594
16600
  */
16595
- class InteropModule extends base_1$2.Base {
16601
+ class InteropModule extends base_1$3.Base {
16596
16602
  /**
16597
16603
  * Initializes an Interop Broker. This is called under-the-hood for Platforms.
16598
16604
  *
@@ -16716,13 +16722,13 @@ const channelPrefix = 'snapshot-source-provider-';
16716
16722
  const getSnapshotSourceChannelName = (id) => `${channelPrefix}${id.uuid}`;
16717
16723
  utils.getSnapshotSourceChannelName = getSnapshotSourceChannelName;
16718
16724
 
16719
- var __classPrivateFieldSet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16725
+ var __classPrivateFieldSet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16720
16726
  if (kind === "m") throw new TypeError("Private method is not writable");
16721
16727
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
16722
16728
  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");
16723
16729
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16724
16730
  };
16725
- var __classPrivateFieldGet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16731
+ var __classPrivateFieldGet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16726
16732
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
16727
16733
  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");
16728
16734
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -16731,7 +16737,7 @@ var _SnapshotSource_identity, _SnapshotSource_getConnection, _SnapshotSource_get
16731
16737
  Object.defineProperty(Instance, "__esModule", { value: true });
16732
16738
  Instance.SnapshotSource = void 0;
16733
16739
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
16734
- const base_1$1 = base;
16740
+ const base_1$2 = base;
16735
16741
  const utils_1$1 = utils;
16736
16742
  const connectionMap = new Map();
16737
16743
  /**
@@ -16740,7 +16746,7 @@ const connectionMap = new Map();
16740
16746
  * @typeParam Snapshot Implementation-defined shape of an application snapshot. Allows
16741
16747
  * custom snapshot implementations for legacy applications to define their own snapshot format.
16742
16748
  */
16743
- class SnapshotSource extends base_1$1.Base {
16749
+ class SnapshotSource extends base_1$2.Base {
16744
16750
  /**
16745
16751
  * @internal
16746
16752
  */
@@ -16754,26 +16760,26 @@ class SnapshotSource extends base_1$1.Base {
16754
16760
  return connectionMap.get(this.identity.uuid);
16755
16761
  });
16756
16762
  _SnapshotSource_getClient.set(this, () => {
16757
- if (!__classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise) {
16758
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = __classPrivateFieldGet$1(this, _SnapshotSource_startConnection, "f").call(this);
16763
+ if (!__classPrivateFieldGet$2(this, _SnapshotSource_getConnection, "f").call(this).clientPromise) {
16764
+ __classPrivateFieldGet$2(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = __classPrivateFieldGet$2(this, _SnapshotSource_startConnection, "f").call(this);
16759
16765
  }
16760
- return __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise;
16766
+ return __classPrivateFieldGet$2(this, _SnapshotSource_getConnection, "f").call(this).clientPromise;
16761
16767
  });
16762
16768
  _SnapshotSource_startConnection.set(this, async () => {
16763
16769
  const channelName = (0, utils_1$1.getSnapshotSourceChannelName)(this.identity);
16764
16770
  try {
16765
- if (!__classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired) {
16766
- await __classPrivateFieldGet$1(this, _SnapshotSource_setUpConnectionListener, "f").call(this);
16771
+ if (!__classPrivateFieldGet$2(this, _SnapshotSource_getConnection, "f").call(this).eventFired) {
16772
+ await __classPrivateFieldGet$2(this, _SnapshotSource_setUpConnectionListener, "f").call(this);
16767
16773
  }
16768
16774
  const client = await this.fin.InterApplicationBus.Channel.connect(channelName, { wait: false });
16769
16775
  client.onDisconnection(() => {
16770
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
16771
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired = null;
16776
+ __classPrivateFieldGet$2(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
16777
+ __classPrivateFieldGet$2(this, _SnapshotSource_getConnection, "f").call(this).eventFired = null;
16772
16778
  });
16773
16779
  return client;
16774
16780
  }
16775
16781
  catch (e) {
16776
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
16782
+ __classPrivateFieldGet$2(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
16777
16783
  throw new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.");
16778
16784
  }
16779
16785
  });
@@ -16785,7 +16791,7 @@ class SnapshotSource extends base_1$1.Base {
16785
16791
  resolve = y;
16786
16792
  reject = n;
16787
16793
  });
16788
- __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired = eventFired;
16794
+ __classPrivateFieldGet$2(this, _SnapshotSource_getConnection, "f").call(this).eventFired = eventFired;
16789
16795
  const listener = async (e) => {
16790
16796
  try {
16791
16797
  if (e.channelName === channelName) {
@@ -16799,10 +16805,10 @@ class SnapshotSource extends base_1$1.Base {
16799
16805
  };
16800
16806
  await this.fin.InterApplicationBus.Channel.on('connected', listener);
16801
16807
  });
16802
- __classPrivateFieldSet$1(this, _SnapshotSource_identity, id, "f");
16808
+ __classPrivateFieldSet$2(this, _SnapshotSource_identity, id, "f");
16803
16809
  }
16804
16810
  get identity() {
16805
- return __classPrivateFieldGet$1(this, _SnapshotSource_identity, "f");
16811
+ return __classPrivateFieldGet$2(this, _SnapshotSource_identity, "f");
16806
16812
  }
16807
16813
  /**
16808
16814
  * Method to determine if the SnapshotSource has been initialized.
@@ -16838,11 +16844,11 @@ class SnapshotSource extends base_1$1.Base {
16838
16844
  // eslint-disable-next-line no-async-promise-executor
16839
16845
  try {
16840
16846
  // 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?
16841
- await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
16847
+ await __classPrivateFieldGet$2(this, _SnapshotSource_getClient, "f").call(this);
16842
16848
  }
16843
16849
  catch (e) {
16844
16850
  // it was not running.
16845
- await __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired;
16851
+ await __classPrivateFieldGet$2(this, _SnapshotSource_getConnection, "f").call(this).eventFired;
16846
16852
  }
16847
16853
  }
16848
16854
  /**
@@ -16853,7 +16859,7 @@ class SnapshotSource extends base_1$1.Base {
16853
16859
  this.wire.sendAction('snapshot-source-get-snapshot').catch((e) => {
16854
16860
  // don't expose, analytics-only call
16855
16861
  });
16856
- const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
16862
+ const client = await __classPrivateFieldGet$2(this, _SnapshotSource_getClient, "f").call(this);
16857
16863
  const response = (await client.dispatch('get-snapshot'));
16858
16864
  return (await response).snapshot;
16859
16865
  }
@@ -16865,7 +16871,7 @@ class SnapshotSource extends base_1$1.Base {
16865
16871
  this.wire.sendAction('snapshot-source-apply-snapshot').catch((e) => {
16866
16872
  // don't expose, analytics-only call
16867
16873
  });
16868
- const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
16874
+ const client = await __classPrivateFieldGet$2(this, _SnapshotSource_getClient, "f").call(this);
16869
16875
  return client.dispatch('apply-snapshot', { snapshot });
16870
16876
  }
16871
16877
  }
@@ -16874,13 +16880,13 @@ _SnapshotSource_identity = new WeakMap(), _SnapshotSource_getConnection = new We
16874
16880
 
16875
16881
  Object.defineProperty(Factory, "__esModule", { value: true });
16876
16882
  Factory.SnapshotSourceModule = void 0;
16877
- const base_1 = base;
16883
+ const base_1$1 = base;
16878
16884
  const Instance_1 = Instance;
16879
16885
  const utils_1 = utils;
16880
16886
  /**
16881
16887
  * Static namespace for OpenFin API methods that interact with the {@link SnapshotSource} class, available under `fin.SnapshotSource`.
16882
16888
  */
16883
- class SnapshotSourceModule extends base_1.Base {
16889
+ class SnapshotSourceModule extends base_1$1.Base {
16884
16890
  /**
16885
16891
  * Initializes a SnapshotSource with the getSnapshot and applySnapshot methods defined.
16886
16892
  *
@@ -16986,6 +16992,114 @@ Factory.SnapshotSourceModule = SnapshotSourceModule;
16986
16992
  __exportStar(Instance, exports);
16987
16993
  } (snapshotSource));
16988
16994
 
16995
+ var notificationManager = {};
16996
+
16997
+ var factory = {};
16998
+
16999
+ var instance = {};
17000
+
17001
+ var __classPrivateFieldSet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
17002
+ if (kind === "m") throw new TypeError("Private method is not writable");
17003
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
17004
+ 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");
17005
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
17006
+ };
17007
+ var __classPrivateFieldGet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17008
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
17009
+ 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");
17010
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
17011
+ };
17012
+ var _NotificationManagerInstance_wire, _NotificationManagerInstance_handler, _NotificationManagerInstance_id, _NotificationManagerInstance_isReceivingNotifications;
17013
+ Object.defineProperty(instance, "__esModule", { value: true });
17014
+ instance.NotificationManagerInstance = void 0;
17015
+ const lazy_1 = lazy;
17016
+ class NotificationManagerInstance {
17017
+ constructor(wire, id) {
17018
+ _NotificationManagerInstance_wire.set(this, void 0);
17019
+ _NotificationManagerInstance_handler.set(this, void 0);
17020
+ _NotificationManagerInstance_id.set(this, void 0);
17021
+ _NotificationManagerInstance_isReceivingNotifications.set(this, new lazy_1.Lazy(async () => {
17022
+ await __classPrivateFieldGet$1(this, _NotificationManagerInstance_wire, "f").registerMessageHandler((message) => {
17023
+ if (message.action === 'notification-created' && message.payload.managerId === __classPrivateFieldGet$1(this, _NotificationManagerInstance_id, "f")) {
17024
+ const { notificationId, properties, documentUrl: url, notificationIcon: icon, badge, image } = message.payload;
17025
+ try {
17026
+ __classPrivateFieldGet$1(this, _NotificationManagerInstance_handler, "f")?.call(this, {
17027
+ properties,
17028
+ images: {
17029
+ image,
17030
+ icon,
17031
+ badge
17032
+ },
17033
+ url,
17034
+ notificationId
17035
+ });
17036
+ }
17037
+ catch (error) {
17038
+ console.error('Failed to handle notification', error);
17039
+ }
17040
+ return true;
17041
+ }
17042
+ return false;
17043
+ });
17044
+ return true;
17045
+ }));
17046
+ this.setNotificationHandler = async (handler) => {
17047
+ await __classPrivateFieldGet$1(this, _NotificationManagerInstance_isReceivingNotifications, "f").getValue();
17048
+ __classPrivateFieldSet$1(this, _NotificationManagerInstance_handler, handler, "f");
17049
+ };
17050
+ this.destroy = async () => {
17051
+ await __classPrivateFieldGet$1(this, _NotificationManagerInstance_wire, "f").sendAction('destroy-notification-manager', { managerId: __classPrivateFieldGet$1(this, _NotificationManagerInstance_id, "f") });
17052
+ };
17053
+ this.dispatch = async (event) => {
17054
+ const { notificationId, type } = event;
17055
+ await __classPrivateFieldGet$1(this, _NotificationManagerInstance_wire, "f").sendAction('dispatch-notification-event', {
17056
+ notificationId,
17057
+ type
17058
+ });
17059
+ };
17060
+ __classPrivateFieldSet$1(this, _NotificationManagerInstance_wire, wire, "f");
17061
+ __classPrivateFieldSet$1(this, _NotificationManagerInstance_id, id, "f");
17062
+ }
17063
+ }
17064
+ instance.NotificationManagerInstance = NotificationManagerInstance;
17065
+ _NotificationManagerInstance_wire = new WeakMap(), _NotificationManagerInstance_handler = new WeakMap(), _NotificationManagerInstance_id = new WeakMap(), _NotificationManagerInstance_isReceivingNotifications = new WeakMap();
17066
+
17067
+ Object.defineProperty(factory, "__esModule", { value: true });
17068
+ factory.NotificationManagerModule = void 0;
17069
+ const base_1 = base;
17070
+ const instance_1 = instance;
17071
+ class NotificationManagerModule extends base_1.Base {
17072
+ constructor() {
17073
+ super(...arguments);
17074
+ this.init = async () => {
17075
+ const { payload: { data: { managerId } } } = await this.wire.sendAction('init-notification-manager');
17076
+ const manager = new instance_1.NotificationManagerInstance(this.wire, managerId);
17077
+ return manager;
17078
+ };
17079
+ }
17080
+ }
17081
+ factory.NotificationManagerModule = NotificationManagerModule;
17082
+
17083
+ (function (exports) {
17084
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
17085
+ if (k2 === undefined) k2 = k;
17086
+ var desc = Object.getOwnPropertyDescriptor(m, k);
17087
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17088
+ desc = { enumerable: true, get: function() { return m[k]; } };
17089
+ }
17090
+ Object.defineProperty(o, k2, desc);
17091
+ }) : (function(o, m, k, k2) {
17092
+ if (k2 === undefined) k2 = k;
17093
+ o[k2] = m[k];
17094
+ }));
17095
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
17096
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17097
+ };
17098
+ Object.defineProperty(exports, "__esModule", { value: true });
17099
+ __exportStar(factory, exports);
17100
+ __exportStar(instance, exports);
17101
+ } (notificationManager));
17102
+
16989
17103
  Object.defineProperty(fin$1, "__esModule", { value: true });
16990
17104
  var Fin_1 = fin$1.Fin = void 0;
16991
17105
  const events_1$3 = require$$0;
@@ -17003,6 +17117,7 @@ const index_10 = platform;
17003
17117
  const me_1$1 = me;
17004
17118
  const interop_1 = interop;
17005
17119
  const snapshot_source_1 = snapshotSource;
17120
+ const notification_manager_1 = notificationManager;
17006
17121
  /**
17007
17122
  * @internal
17008
17123
  */
@@ -17025,6 +17140,7 @@ class Fin extends events_1$3.EventEmitter {
17025
17140
  this.View = new index_9.ViewModule(wire);
17026
17141
  this.Interop = new interop_1.InteropModule(wire);
17027
17142
  this.SnapshotSource = new snapshot_source_1.SnapshotSourceModule(wire);
17143
+ this.NotificationManager = new notification_manager_1.NotificationManagerModule(wire);
17028
17144
  wire.registerFin(this);
17029
17145
  this.me = (0, me_1$1.getMe)(wire);
17030
17146
  // Handle disconnect events
@@ -17793,7 +17909,7 @@ class NodeEnvironment extends BaseEnvironment_1 {
17793
17909
  };
17794
17910
  }
17795
17911
  getAdapterVersionSync() {
17796
- return "43.100.32";
17912
+ return "43.100.36";
17797
17913
  }
17798
17914
  observeBounds(element, onChange) {
17799
17915
  throw new Error('Method not implemented.');