@openfin/remote-adapter 42.100.91 → 42.100.93

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/remote-adapter.js +423 -282
  2. package/package.json +2 -2
@@ -49,13 +49,13 @@ async function promiseMapSerial(arr, func) {
49
49
  }
50
50
  promises.promiseMapSerial = promiseMapSerial;
51
51
 
52
- var __classPrivateFieldSet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
52
+ var __classPrivateFieldSet$h = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
53
53
  if (kind === "m") throw new TypeError("Private method is not writable");
54
54
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
55
55
  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");
56
56
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
57
57
  };
58
- var __classPrivateFieldGet$h = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
58
+ var __classPrivateFieldGet$i = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
59
59
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
60
60
  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");
61
61
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -140,7 +140,7 @@ class EmitterBase extends Base {
140
140
  this.emit = (eventType, payload, ...args) => {
141
141
  return this.hasEmitter() ? this.getOrCreateEmitter().emit(eventType, payload, ...args) : false;
142
142
  };
143
- this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
143
+ this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
144
144
  /**
145
145
  * Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
146
146
  * `once` subscription.
@@ -150,14 +150,14 @@ class EmitterBase extends Base {
150
150
  * which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
151
151
  */
152
152
  this.cleanUpRemovedListener = (eventType, listener) => {
153
- const deregister = __classPrivateFieldGet$h(this, _EmitterBase_deregisterOnceListeners, "f").get(listener);
153
+ const deregister = __classPrivateFieldGet$i(this, _EmitterBase_deregisterOnceListeners, "f").get(listener);
154
154
  if (deregister) {
155
- const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
155
+ const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
156
156
  emitter.removeListener(eventType, deregister);
157
157
  }
158
158
  };
159
159
  this.getOrCreateEmitter = () => {
160
- const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
160
+ const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
161
161
  if (!emitter.listeners('removeListener').includes(this.cleanUpRemovedListener)) {
162
162
  emitter.on('removeListener', this.cleanUpRemovedListener);
163
163
  }
@@ -199,8 +199,8 @@ class EmitterBase extends Base {
199
199
  // This will only be reached if unsubscribe from event that does not exist but do not want to error here
200
200
  return Promise.resolve();
201
201
  };
202
- __classPrivateFieldSet$g(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
203
- __classPrivateFieldSet$g(this, _EmitterBase_deregisterOnceListeners, new WeakMap(), "f");
202
+ __classPrivateFieldSet$h(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
203
+ __classPrivateFieldSet$h(this, _EmitterBase_deregisterOnceListeners, new WeakMap(), "f");
204
204
  this.listeners = (event) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(event) : [];
205
205
  }
206
206
  /**
@@ -229,7 +229,7 @@ class EmitterBase extends Base {
229
229
  */
230
230
  async once(eventType, listener, options) {
231
231
  const deregister = () => this.deregisterEventListener(eventType);
232
- __classPrivateFieldGet$h(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
232
+ __classPrivateFieldGet$i(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
233
233
  await this.registerEventListener(eventType, options, (emitter) => {
234
234
  emitter.once(eventType, deregister);
235
235
  emitter.once(eventType, listener);
@@ -260,7 +260,7 @@ class EmitterBase extends Base {
260
260
  */
261
261
  async prependOnceListener(eventType, listener, options) {
262
262
  const deregister = () => this.deregisterEventListener(eventType);
263
- __classPrivateFieldGet$h(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
263
+ __classPrivateFieldGet$i(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
264
264
  await this.registerEventListener(eventType, options, (emitter) => {
265
265
  emitter.prependOnceListener(eventType, listener);
266
266
  emitter.once(eventType, deregister);
@@ -320,7 +320,7 @@ class EmitterBase extends Base {
320
320
  }
321
321
  deleteEmitterIfNothingRegistered(emitter) {
322
322
  if (emitter.eventNames().every((type) => type === 'removeListener')) {
323
- this.wire.eventAggregator.delete(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
323
+ this.wire.eventAggregator.delete(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
324
324
  }
325
325
  }
326
326
  }
@@ -851,13 +851,13 @@ class AsyncRetryableLazy {
851
851
  }
852
852
  lazy.AsyncRetryableLazy = AsyncRetryableLazy;
853
853
 
854
- var __classPrivateFieldSet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
854
+ var __classPrivateFieldSet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
855
855
  if (kind === "m") throw new TypeError("Private method is not writable");
856
856
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
857
857
  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");
858
858
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
859
859
  };
860
- var __classPrivateFieldGet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
860
+ var __classPrivateFieldGet$h = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
861
861
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
862
862
  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");
863
863
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -868,12 +868,12 @@ var __importDefault$6 = (commonjsGlobal && commonjsGlobal.__importDefault) || fu
868
868
  var _InteropBroker_fdc3Info, _InteropBroker_contextGroups, _InteropBroker_providerPromise;
869
869
  Object.defineProperty(InteropBroker$1, "__esModule", { value: true });
870
870
  InteropBroker$1.InteropBroker = void 0;
871
- const base_1$m = base;
871
+ const base_1$n = base;
872
872
  const SessionContextGroupBroker_1 = __importDefault$6(SessionContextGroupBroker$1);
873
873
  const utils_1$7 = utils$3;
874
874
  const isEqual_1$1 = __importDefault$6(require$$3);
875
875
  const PrivateChannelProvider_1 = PrivateChannelProvider$1;
876
- const lazy_1$2 = lazy;
876
+ const lazy_1$3 = lazy;
877
877
  const defaultContextGroups = [
878
878
  {
879
879
  id: 'green',
@@ -1037,7 +1037,7 @@ const defaultContextGroups = [
1037
1037
  * ---
1038
1038
  *
1039
1039
  */
1040
- class InteropBroker extends base_1$m.Base {
1040
+ class InteropBroker extends base_1$n.Base {
1041
1041
  /**
1042
1042
  * @internal
1043
1043
  */
@@ -1048,19 +1048,19 @@ class InteropBroker extends base_1$m.Base {
1048
1048
  _InteropBroker_contextGroups.set(this, void 0);
1049
1049
  _InteropBroker_providerPromise.set(this, void 0);
1050
1050
  this.getProvider = () => {
1051
- return __classPrivateFieldGet$g(this, _InteropBroker_providerPromise, "f").getValue();
1051
+ return __classPrivateFieldGet$h(this, _InteropBroker_providerPromise, "f").getValue();
1052
1052
  };
1053
1053
  this.interopClients = new Map();
1054
1054
  this.contextGroupsById = new Map();
1055
- __classPrivateFieldSet$f(this, _InteropBroker_contextGroups, options.contextGroups ?? [...defaultContextGroups], "f");
1056
- __classPrivateFieldSet$f(this, _InteropBroker_fdc3Info, options.fdc3Info, "f");
1055
+ __classPrivateFieldSet$g(this, _InteropBroker_contextGroups, options.contextGroups ?? [...defaultContextGroups], "f");
1056
+ __classPrivateFieldSet$g(this, _InteropBroker_fdc3Info, options.fdc3Info, "f");
1057
1057
  if (options?.logging) {
1058
1058
  this.logging = options.logging;
1059
1059
  }
1060
1060
  this.intentClientMap = new Map();
1061
1061
  this.lastContextMap = new Map();
1062
1062
  this.sessionContextGroupMap = new Map();
1063
- __classPrivateFieldSet$f(this, _InteropBroker_providerPromise, new lazy_1$2.Lazy(createProvider), "f");
1063
+ __classPrivateFieldSet$g(this, _InteropBroker_providerPromise, new lazy_1$3.Lazy(createProvider), "f");
1064
1064
  this.setContextGroupMap();
1065
1065
  this.setupChannelProvider();
1066
1066
  }
@@ -1328,7 +1328,7 @@ class InteropBroker extends base_1$m.Base {
1328
1328
  // don't expose, analytics-only call
1329
1329
  });
1330
1330
  // Create copy for immutability
1331
- return __classPrivateFieldGet$g(this, _InteropBroker_contextGroups, "f").map((contextGroup) => {
1331
+ return __classPrivateFieldGet$h(this, _InteropBroker_contextGroups, "f").map((contextGroup) => {
1332
1332
  return { ...contextGroup };
1333
1333
  });
1334
1334
  }
@@ -1739,7 +1739,7 @@ class InteropBroker extends base_1$m.Base {
1739
1739
  const { fdc3Version } = payload;
1740
1740
  return {
1741
1741
  fdc3Version,
1742
- ...__classPrivateFieldGet$g(this, _InteropBroker_fdc3Info, "f"),
1742
+ ...__classPrivateFieldGet$h(this, _InteropBroker_fdc3Info, "f"),
1743
1743
  optionalFeatures: {
1744
1744
  OriginatingAppMetadata: false,
1745
1745
  UserChannelMembershipAPIs: true
@@ -2748,8 +2748,8 @@ var main = {};
2748
2748
 
2749
2749
  Object.defineProperty(main, "__esModule", { value: true });
2750
2750
  main.WebContents = void 0;
2751
- const base_1$l = base;
2752
- class WebContents extends base_1$l.EmitterBase {
2751
+ const base_1$m = base;
2752
+ class WebContents extends base_1$m.EmitterBase {
2753
2753
  /**
2754
2754
  * @param identity The identity of the {@link OpenFin.WebContentsEvents WebContents}.
2755
2755
  * @param entityType The type of the {@link OpenFin.WebContentsEvents WebContents}.
@@ -5131,6 +5131,37 @@ function requireInstance$1 () {
5131
5131
  getAllFrames() {
5132
5132
  return this.wire.sendAction('get-all-frames', this.identity).then(({ payload }) => payload.data);
5133
5133
  }
5134
+ /**
5135
+ * Activates the current window and focuses the child entity if it exists. If this does
5136
+ * not succeed - say the child does not belong to this window, or the identity does not exist -
5137
+ * it will return false.
5138
+ *
5139
+ * @example
5140
+ * ```js
5141
+ * const win = fin.Window.wrapSync({ uuid: 'myApp', name: 'myOtherWindow' });
5142
+ *
5143
+ * win.getCurrentViews()
5144
+ * .then(([view1]) => {
5145
+ * return win.activateAndFocus(view1.identity);
5146
+ * })
5147
+ * .then(success => {
5148
+ * if (success) {
5149
+ * console.log('Window activated and child focused');
5150
+ * } else {
5151
+ * console.log('Window activation failed, focus state unchanged');
5152
+ * }
5153
+ * })
5154
+ * .catch(console.error);
5155
+ * ```
5156
+ */
5157
+ activateAndFocus(childIdentityToFocus) {
5158
+ return this.wire
5159
+ .sendAction('activate-window-and-focus', {
5160
+ winIdentity: this.identity,
5161
+ focusIdentity: childIdentityToFocus
5162
+ })
5163
+ .then(({ payload }) => payload.data);
5164
+ }
5134
5165
  /**
5135
5166
  * Gets the current bounds (top, bottom, right, left, width, height) of the window.
5136
5167
  *
@@ -7078,7 +7109,7 @@ var Instance$4 = {};
7078
7109
  Object.defineProperty(Instance$4, "__esModule", { value: true });
7079
7110
  Instance$4._Frame = void 0;
7080
7111
  /* eslint-disable import/prefer-default-export */
7081
- const base_1$k = base;
7112
+ const base_1$l = base;
7082
7113
  /**
7083
7114
  * An iframe represents an embedded HTML page within a parent HTML page. Because this embedded page
7084
7115
  * has its own DOM and global JS context (which may or may not be linked to that of the parent depending
@@ -7099,7 +7130,7 @@ const base_1$k = base;
7099
7130
  * The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
7100
7131
  * (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
7101
7132
  */
7102
- class _Frame extends base_1$k.EmitterBase {
7133
+ class _Frame extends base_1$l.EmitterBase {
7103
7134
  /**
7104
7135
  * @internal
7105
7136
  */
@@ -7145,13 +7176,13 @@ Instance$4._Frame = _Frame;
7145
7176
 
7146
7177
  Object.defineProperty(Factory$5, "__esModule", { value: true });
7147
7178
  Factory$5._FrameModule = void 0;
7148
- const base_1$j = base;
7179
+ const base_1$k = base;
7149
7180
  const validate_1$3 = validate;
7150
7181
  const Instance_1$4 = Instance$4;
7151
7182
  /**
7152
7183
  * Static namespace for OpenFin API methods that interact with the {@link _Frame} class, available under `fin.Frame`.
7153
7184
  */
7154
- class _FrameModule extends base_1$j.Base {
7185
+ class _FrameModule extends base_1$k.Base {
7155
7186
  /**
7156
7187
  * Asynchronously returns an API handle for the given Frame identity.
7157
7188
  *
@@ -7277,7 +7308,7 @@ var Instance$3 = {};
7277
7308
  Object.defineProperty(Instance$3, "__esModule", { value: true });
7278
7309
  Instance$3.ExternalApplication = void 0;
7279
7310
  /* eslint-disable import/prefer-default-export */
7280
- const base_1$i = base;
7311
+ const base_1$j = base;
7281
7312
  /**
7282
7313
  * An ExternalApplication object representing native language adapter connections to the runtime. Allows
7283
7314
  * the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
@@ -7288,7 +7319,7 @@ const base_1$i = base;
7288
7319
  * - Processes started via `System.launchExternalApplication`
7289
7320
  * - Processes monitored via `System.monitorExternalProcess`
7290
7321
  */
7291
- class ExternalApplication extends base_1$i.EmitterBase {
7322
+ class ExternalApplication extends base_1$j.EmitterBase {
7292
7323
  /**
7293
7324
  * @internal
7294
7325
  */
@@ -7316,12 +7347,12 @@ Instance$3.ExternalApplication = ExternalApplication;
7316
7347
 
7317
7348
  Object.defineProperty(Factory$4, "__esModule", { value: true });
7318
7349
  Factory$4.ExternalApplicationModule = void 0;
7319
- const base_1$h = base;
7350
+ const base_1$i = base;
7320
7351
  const Instance_1$3 = Instance$3;
7321
7352
  /**
7322
7353
  * Static namespace for OpenFin API methods that interact with the {@link ExternalApplication} class, available under `fin.ExternalApplication`.
7323
7354
  */
7324
- class ExternalApplicationModule extends base_1$h.Base {
7355
+ class ExternalApplicationModule extends base_1$i.Base {
7325
7356
  /**
7326
7357
  * Asynchronously returns an External Application object that represents an external application.
7327
7358
  * <br>It is possible to wrap a process that does not yet exist, (for example, to listen for startup-related events)
@@ -7549,13 +7580,13 @@ function errorToPOJO(error) {
7549
7580
  }
7550
7581
  errors.errorToPOJO = errorToPOJO;
7551
7582
 
7552
- var __classPrivateFieldSet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7583
+ var __classPrivateFieldSet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7553
7584
  if (kind === "m") throw new TypeError("Private method is not writable");
7554
7585
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
7555
7586
  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");
7556
7587
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7557
7588
  };
7558
- var __classPrivateFieldGet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7589
+ var __classPrivateFieldGet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7559
7590
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
7560
7591
  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");
7561
7592
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -7583,19 +7614,19 @@ class Transport extends events_1$5.EventEmitter {
7583
7614
  // Typing as unknown to avoid circular dependency, should not be used directly.
7584
7615
  _Transport_fin.set(this, void 0);
7585
7616
  this.connectSync = () => {
7586
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7617
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7587
7618
  wire.connectSync();
7588
7619
  };
7589
7620
  // This function is only used in our tests.
7590
7621
  this.getPort = () => {
7591
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7622
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7592
7623
  return wire.getPort();
7593
7624
  };
7594
- __classPrivateFieldSet$e(this, _Transport_wire, factory(this.onmessage.bind(this)), "f");
7625
+ __classPrivateFieldSet$f(this, _Transport_wire, factory(this.onmessage.bind(this)), "f");
7595
7626
  this.environment = environment;
7596
- this.sendRaw = __classPrivateFieldGet$f(this, _Transport_wire, "f").send.bind(__classPrivateFieldGet$f(this, _Transport_wire, "f"));
7627
+ this.sendRaw = __classPrivateFieldGet$g(this, _Transport_wire, "f").send.bind(__classPrivateFieldGet$g(this, _Transport_wire, "f"));
7597
7628
  this.registerMessageHandler(this.handleMessage.bind(this));
7598
- __classPrivateFieldGet$f(this, _Transport_wire, "f").on('disconnected', () => {
7629
+ __classPrivateFieldGet$g(this, _Transport_wire, "f").on('disconnected', () => {
7599
7630
  for (const [, { handleNack }] of this.wireListeners) {
7600
7631
  handleNack({ reason: 'Remote connection has closed' });
7601
7632
  }
@@ -7607,24 +7638,24 @@ class Transport extends events_1$5.EventEmitter {
7607
7638
  this.me = (0, me_1$1.getBaseMe)(entityType, uuid, name);
7608
7639
  }
7609
7640
  getFin() {
7610
- if (!__classPrivateFieldGet$f(this, _Transport_fin, "f")) {
7641
+ if (!__classPrivateFieldGet$g(this, _Transport_fin, "f")) {
7611
7642
  throw new Error('No Fin object registered for this transport');
7612
7643
  }
7613
- return __classPrivateFieldGet$f(this, _Transport_fin, "f");
7644
+ return __classPrivateFieldGet$g(this, _Transport_fin, "f");
7614
7645
  }
7615
7646
  registerFin(_fin) {
7616
- if (__classPrivateFieldGet$f(this, _Transport_fin, "f")) {
7647
+ if (__classPrivateFieldGet$g(this, _Transport_fin, "f")) {
7617
7648
  throw new Error('Fin object has already been registered for this transport');
7618
7649
  }
7619
- __classPrivateFieldSet$e(this, _Transport_fin, _fin, "f");
7650
+ __classPrivateFieldSet$f(this, _Transport_fin, _fin, "f");
7620
7651
  }
7621
7652
  shutdown() {
7622
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7653
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7623
7654
  return wire.shutdown();
7624
7655
  }
7625
7656
  async connect(config) {
7626
7657
  if ((0, wire_1.isConfigWithReceiver)(config)) {
7627
- await __classPrivateFieldGet$f(this, _Transport_wire, "f").connect(config.receiver);
7658
+ await __classPrivateFieldGet$g(this, _Transport_wire, "f").connect(config.receiver);
7628
7659
  return this.authorize(config);
7629
7660
  }
7630
7661
  if ((0, wire_1.isRemoteConfig)(config)) {
@@ -7640,13 +7671,13 @@ class Transport extends events_1$5.EventEmitter {
7640
7671
  return undefined;
7641
7672
  }
7642
7673
  async connectRemote(config) {
7643
- await __classPrivateFieldGet$f(this, _Transport_wire, "f").connect(new (this.environment.getWsConstructor())(config.address));
7674
+ await __classPrivateFieldGet$g(this, _Transport_wire, "f").connect(new (this.environment.getWsConstructor())(config.address));
7644
7675
  return this.authorize(config);
7645
7676
  }
7646
7677
  async connectByPort(config) {
7647
7678
  const { address, uuid } = config;
7648
7679
  const reqAuthPayload = { ...config, type: 'file-token' };
7649
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7680
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7650
7681
  await wire.connect(new (this.environment.getWsConstructor())(config.address));
7651
7682
  const requestExtAuthRet = await this.sendAction('request-external-authorization', {
7652
7683
  uuid,
@@ -7682,7 +7713,7 @@ class Transport extends events_1$5.EventEmitter {
7682
7713
  payload,
7683
7714
  messageId
7684
7715
  };
7685
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7716
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7686
7717
  this.addWireListener(messageId, resolve, (payload) => this.nackHandler(payload, reject, callSites), uncorrelated);
7687
7718
  return wire.send(msg).catch(reject);
7688
7719
  });
@@ -7704,7 +7735,7 @@ class Transport extends events_1$5.EventEmitter {
7704
7735
  const resolver = (data) => {
7705
7736
  resolve(data.payload);
7706
7737
  };
7707
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7738
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7708
7739
  return wire
7709
7740
  .send(origData)
7710
7741
  .then(() => this.addWireListener(id, resolver, (payload) => this.nackHandler(payload, reject), false))
@@ -7860,7 +7891,7 @@ var system = {};
7860
7891
  */
7861
7892
  Object.defineProperty(system, "__esModule", { value: true });
7862
7893
  system.System = void 0;
7863
- const base_1$g = base;
7894
+ const base_1$h = base;
7864
7895
  const transport_errors_1$4 = transportErrors;
7865
7896
  const window_1 = requireWindow();
7866
7897
  const events_1$3 = require$$0;
@@ -7870,7 +7901,7 @@ const events_1$3 = require$$0;
7870
7901
  * clearing the cache and exiting the runtime as well as listen to {@link OpenFin.SystemEvents system events}.
7871
7902
  *
7872
7903
  */
7873
- class System extends base_1$g.EmitterBase {
7904
+ class System extends base_1$h.EmitterBase {
7874
7905
  /**
7875
7906
  * @internal
7876
7907
  */
@@ -10181,12 +10212,12 @@ class ChannelError extends Error {
10181
10212
  }
10182
10213
  channelError.ChannelError = ChannelError;
10183
10214
 
10184
- var __classPrivateFieldGet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10215
+ var __classPrivateFieldGet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10185
10216
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10186
10217
  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");
10187
10218
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10188
10219
  };
10189
- var __classPrivateFieldSet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10220
+ var __classPrivateFieldSet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10190
10221
  if (kind === "m") throw new TypeError("Private method is not writable");
10191
10222
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10192
10223
  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");
@@ -10230,7 +10261,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
10230
10261
  static closeChannelByEndpointId(id) {
10231
10262
  const channel = channelClientsByEndpointId.get(id);
10232
10263
  if (channel) {
10233
- __classPrivateFieldGet$e(channel, _ChannelClient_close, "f").call(channel);
10264
+ __classPrivateFieldGet$f(channel, _ChannelClient_close, "f").call(channel);
10234
10265
  }
10235
10266
  }
10236
10267
  /**
@@ -10241,7 +10272,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
10241
10272
  for (const channelClient of channelClientsByEndpointId.values()) {
10242
10273
  if (channelClient.providerIdentity.channelId === eventPayload.channelId) {
10243
10274
  channelClient.disconnectListener(eventPayload);
10244
- __classPrivateFieldGet$e(channelClient, _ChannelClient_close, "f").call(channelClient);
10275
+ __classPrivateFieldGet$f(channelClient, _ChannelClient_close, "f").call(channelClient);
10245
10276
  }
10246
10277
  }
10247
10278
  }
@@ -10256,12 +10287,12 @@ class ChannelClient extends channel_1$1.ChannelBase {
10256
10287
  this.processAction = (action, payload, senderIdentity) => super.processAction(action, payload, senderIdentity);
10257
10288
  _ChannelClient_close.set(this, () => {
10258
10289
  channelClientsByEndpointId.delete(this.endpointId);
10259
- __classPrivateFieldGet$e(this, _ChannelClient_strategy, "f").close();
10290
+ __classPrivateFieldGet$f(this, _ChannelClient_strategy, "f").close();
10260
10291
  });
10261
- __classPrivateFieldSet$d(this, _ChannelClient_protectedObj, new channel_1$1.ProtectedItems(routingInfo, close), "f");
10292
+ __classPrivateFieldSet$e(this, _ChannelClient_protectedObj, new channel_1$1.ProtectedItems(routingInfo, close), "f");
10262
10293
  this.disconnectListener = () => undefined;
10263
10294
  this.endpointId = routingInfo.endpointId;
10264
- __classPrivateFieldSet$d(this, _ChannelClient_strategy, strategy, "f");
10295
+ __classPrivateFieldSet$e(this, _ChannelClient_strategy, strategy, "f");
10265
10296
  channelClientsByEndpointId.set(this.endpointId, this);
10266
10297
  strategy.receive(this.processAction);
10267
10298
  }
@@ -10269,7 +10300,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
10269
10300
  * a read-only provider identity
10270
10301
  */
10271
10302
  get providerIdentity() {
10272
- const protectedObj = __classPrivateFieldGet$e(this, _ChannelClient_protectedObj, "f");
10303
+ const protectedObj = __classPrivateFieldGet$f(this, _ChannelClient_protectedObj, "f");
10273
10304
  return protectedObj.providerIdentity;
10274
10305
  }
10275
10306
  /**
@@ -10298,9 +10329,9 @@ class ChannelClient extends channel_1$1.ChannelBase {
10298
10329
  * ```
10299
10330
  */
10300
10331
  async dispatch(action, payload) {
10301
- if (__classPrivateFieldGet$e(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
10332
+ if (__classPrivateFieldGet$f(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
10302
10333
  const callSites = transport_errors_1$1.RuntimeError.getCallSite();
10303
- return __classPrivateFieldGet$e(this, _ChannelClient_strategy, "f").send(this.providerIdentity.channelId, action, payload).catch((e) => {
10334
+ return __classPrivateFieldGet$f(this, _ChannelClient_strategy, "f").send(this.providerIdentity.channelId, action, payload).catch((e) => {
10304
10335
  throw new channel_error_1$1.ChannelError(e, action, payload, callSites);
10305
10336
  });
10306
10337
  }
@@ -10352,10 +10383,10 @@ class ChannelClient extends channel_1$1.ChannelBase {
10352
10383
  */
10353
10384
  async disconnect() {
10354
10385
  await this.sendDisconnectAction();
10355
- __classPrivateFieldGet$e(this, _ChannelClient_close, "f").call(this);
10386
+ __classPrivateFieldGet$f(this, _ChannelClient_close, "f").call(this);
10356
10387
  }
10357
10388
  async sendDisconnectAction() {
10358
- const protectedObj = __classPrivateFieldGet$e(this, _ChannelClient_protectedObj, "f");
10389
+ const protectedObj = __classPrivateFieldGet$f(this, _ChannelClient_protectedObj, "f");
10359
10390
  await protectedObj.close();
10360
10391
  }
10361
10392
  /**
@@ -10388,13 +10419,13 @@ exhaustive.exhaustiveCheck = exhaustiveCheck;
10388
10419
 
10389
10420
  var strategy$3 = {};
10390
10421
 
10391
- var __classPrivateFieldSet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10422
+ var __classPrivateFieldSet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10392
10423
  if (kind === "m") throw new TypeError("Private method is not writable");
10393
10424
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10394
10425
  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");
10395
10426
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
10396
10427
  };
10397
- var __classPrivateFieldGet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10428
+ var __classPrivateFieldGet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10398
10429
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10399
10430
  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");
10400
10431
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -10419,7 +10450,7 @@ class ClassicStrategy {
10419
10450
  // connection problems occur
10420
10451
  _ClassicStrategy_pendingMessagesByEndpointId.set(this, new Map());
10421
10452
  this.send = async (endpointId, action, payload) => {
10422
- const to = __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10453
+ const to = __classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10423
10454
  if (!to) {
10424
10455
  throw new Error(`Could not locate routing info for endpoint ${endpointId}`);
10425
10456
  }
@@ -10431,13 +10462,13 @@ class ClassicStrategy {
10431
10462
  }
10432
10463
  delete cleanId.isLocalEndpointId;
10433
10464
  // grab the promise before awaiting it to save in our pending messages map
10434
- const p = __classPrivateFieldGet$d(this, _ClassicStrategy_wire, "f").sendAction('send-channel-message', {
10465
+ const p = __classPrivateFieldGet$e(this, _ClassicStrategy_wire, "f").sendAction('send-channel-message', {
10435
10466
  ...cleanId,
10436
10467
  providerIdentity: this.providerIdentity,
10437
10468
  action,
10438
10469
  payload
10439
10470
  });
10440
- __classPrivateFieldGet$d(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
10471
+ __classPrivateFieldGet$e(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
10441
10472
  const raw = await p
10442
10473
  .catch((error) => {
10443
10474
  if ('cause' in error) {
@@ -10447,16 +10478,16 @@ class ClassicStrategy {
10447
10478
  })
10448
10479
  .finally(() => {
10449
10480
  // clean up the pending promise
10450
- __classPrivateFieldGet$d(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
10481
+ __classPrivateFieldGet$e(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
10451
10482
  });
10452
10483
  return raw.payload.data.result;
10453
10484
  };
10454
10485
  this.close = async () => {
10455
10486
  this.messageReceiver.removeEndpoint(this.providerIdentity.channelId, this.endpointId);
10456
- [...__classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
10457
- __classPrivateFieldSet$c(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
10487
+ [...__classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
10488
+ __classPrivateFieldSet$d(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
10458
10489
  };
10459
- __classPrivateFieldSet$c(this, _ClassicStrategy_wire, wire, "f");
10490
+ __classPrivateFieldSet$d(this, _ClassicStrategy_wire, wire, "f");
10460
10491
  }
10461
10492
  onEndpointDisconnect(endpointId, listener) {
10462
10493
  // Never fires for 'classic'.
@@ -10465,20 +10496,20 @@ class ClassicStrategy {
10465
10496
  this.messageReceiver.addEndpoint(listener, this.providerIdentity.channelId, this.endpointId);
10466
10497
  }
10467
10498
  async closeEndpoint(endpointId) {
10468
- const id = __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10469
- __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
10470
- const pendingSet = __classPrivateFieldGet$d(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId);
10499
+ const id = __classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10500
+ __classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
10501
+ const pendingSet = __classPrivateFieldGet$e(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId);
10471
10502
  pendingSet?.forEach((p) => {
10472
10503
  const errorMsg = `Channel connection with identity uuid: ${id?.uuid} / name: ${id?.name} / endpointId: ${endpointId} no longer connected.`;
10473
10504
  p.cancel(new Error(errorMsg));
10474
10505
  });
10475
10506
  }
10476
10507
  isEndpointConnected(endpointId) {
10477
- return __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").has(endpointId);
10508
+ return __classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").has(endpointId);
10478
10509
  }
10479
10510
  addEndpoint(endpointId, payload) {
10480
- __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").set(endpointId, payload.endpointIdentity);
10481
- __classPrivateFieldGet$d(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").set(endpointId, new Set());
10511
+ __classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").set(endpointId, payload.endpointIdentity);
10512
+ __classPrivateFieldGet$e(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").set(endpointId, new Set());
10482
10513
  }
10483
10514
  isValidEndpointPayload(payload) {
10484
10515
  return (typeof payload?.endpointIdentity?.endpointId === 'string' ||
@@ -10494,12 +10525,12 @@ var strategy$2 = {};
10494
10525
 
10495
10526
  var endpoint = {};
10496
10527
 
10497
- var __classPrivateFieldGet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10528
+ var __classPrivateFieldGet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10498
10529
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10499
10530
  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");
10500
10531
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10501
10532
  };
10502
- var __classPrivateFieldSet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10533
+ var __classPrivateFieldSet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10503
10534
  if (kind === "m") throw new TypeError("Private method is not writable");
10504
10535
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10505
10536
  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");
@@ -10534,8 +10565,8 @@ class RTCEndpoint {
10534
10565
  if (this.rtc.rtcClient.connectionState !== 'connected') {
10535
10566
  this.rtc.rtcClient.removeEventListener('connectionstatechange', this.connectionStateChangeHandler);
10536
10567
  this.close();
10537
- if (__classPrivateFieldGet$c(this, _RTCEndpoint_disconnectListener, "f")) {
10538
- __classPrivateFieldGet$c(this, _RTCEndpoint_disconnectListener, "f").call(this);
10568
+ if (__classPrivateFieldGet$d(this, _RTCEndpoint_disconnectListener, "f")) {
10569
+ __classPrivateFieldGet$d(this, _RTCEndpoint_disconnectListener, "f").call(this);
10539
10570
  }
10540
10571
  }
10541
10572
  };
@@ -10583,9 +10614,9 @@ class RTCEndpoint {
10583
10614
  data = new TextDecoder().decode(e.data);
10584
10615
  }
10585
10616
  const { messageId, action, payload } = JSON.parse(data);
10586
- if (__classPrivateFieldGet$c(this, _RTCEndpoint_processAction, "f")) {
10617
+ if (__classPrivateFieldGet$d(this, _RTCEndpoint_processAction, "f")) {
10587
10618
  try {
10588
- const res = await __classPrivateFieldGet$c(this, _RTCEndpoint_processAction, "f").call(this, action, payload, endpointIdentity);
10619
+ const res = await __classPrivateFieldGet$d(this, _RTCEndpoint_processAction, "f").call(this, action, payload, endpointIdentity);
10589
10620
  this.rtc.channels.response.send(JSON.stringify({
10590
10621
  messageId,
10591
10622
  payload: res,
@@ -10619,25 +10650,25 @@ class RTCEndpoint {
10619
10650
  datachannel.onclose = (e) => {
10620
10651
  [...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.')));
10621
10652
  this.close();
10622
- if (__classPrivateFieldGet$c(this, _RTCEndpoint_disconnectListener, "f")) {
10623
- __classPrivateFieldGet$c(this, _RTCEndpoint_disconnectListener, "f").call(this);
10653
+ if (__classPrivateFieldGet$d(this, _RTCEndpoint_disconnectListener, "f")) {
10654
+ __classPrivateFieldGet$d(this, _RTCEndpoint_disconnectListener, "f").call(this);
10624
10655
  }
10625
10656
  };
10626
10657
  });
10627
10658
  }
10628
10659
  onDisconnect(listener) {
10629
- if (!__classPrivateFieldGet$c(this, _RTCEndpoint_disconnectListener, "f")) {
10630
- __classPrivateFieldSet$b(this, _RTCEndpoint_disconnectListener, listener, "f");
10660
+ if (!__classPrivateFieldGet$d(this, _RTCEndpoint_disconnectListener, "f")) {
10661
+ __classPrivateFieldSet$c(this, _RTCEndpoint_disconnectListener, listener, "f");
10631
10662
  }
10632
10663
  else {
10633
10664
  throw new Error('RTCEndpoint disconnectListener cannot be set twice.');
10634
10665
  }
10635
10666
  }
10636
10667
  receive(listener) {
10637
- if (__classPrivateFieldGet$c(this, _RTCEndpoint_processAction, "f")) {
10668
+ if (__classPrivateFieldGet$d(this, _RTCEndpoint_processAction, "f")) {
10638
10669
  throw new Error('You have already set a listener for this RTC Endpoint.');
10639
10670
  }
10640
- __classPrivateFieldSet$b(this, _RTCEndpoint_processAction, listener, "f");
10671
+ __classPrivateFieldSet$c(this, _RTCEndpoint_processAction, listener, "f");
10641
10672
  }
10642
10673
  get connected() {
10643
10674
  return this.rtc.rtcClient.connectionState === 'connected';
@@ -10648,12 +10679,12 @@ _RTCEndpoint_processAction = new WeakMap(), _RTCEndpoint_disconnectListener = ne
10648
10679
 
10649
10680
  var strategy$1 = {};
10650
10681
 
10651
- var __classPrivateFieldGet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10682
+ var __classPrivateFieldGet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10652
10683
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10653
10684
  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");
10654
10685
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10655
10686
  };
10656
- var __classPrivateFieldSet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10687
+ var __classPrivateFieldSet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10657
10688
  if (kind === "m") throw new TypeError("Private method is not writable");
10658
10689
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10659
10690
  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");
@@ -10674,11 +10705,11 @@ class EndpointStrategy {
10674
10705
  return this.getEndpointById(endpointId).send(action, payload);
10675
10706
  };
10676
10707
  this.close = async () => {
10677
- if (__classPrivateFieldGet$b(this, _EndpointStrategy_connected, "f")) {
10678
- __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
10679
- __classPrivateFieldSet$a(this, _EndpointStrategy_endpointMap, new Map(), "f");
10708
+ if (__classPrivateFieldGet$c(this, _EndpointStrategy_connected, "f")) {
10709
+ __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
10710
+ __classPrivateFieldSet$b(this, _EndpointStrategy_endpointMap, new Map(), "f");
10680
10711
  }
10681
- __classPrivateFieldSet$a(this, _EndpointStrategy_connected, false, "f");
10712
+ __classPrivateFieldSet$b(this, _EndpointStrategy_connected, false, "f");
10682
10713
  };
10683
10714
  this.isValidEndpointPayload = validateEndpoint;
10684
10715
  }
@@ -10686,39 +10717,39 @@ class EndpointStrategy {
10686
10717
  this.getEndpointById(endpointId).onDisconnect(listener);
10687
10718
  }
10688
10719
  receive(listener) {
10689
- if (__classPrivateFieldGet$b(this, _EndpointStrategy_processAction, "f")) {
10720
+ if (__classPrivateFieldGet$c(this, _EndpointStrategy_processAction, "f")) {
10690
10721
  throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);
10691
10722
  }
10692
- __classPrivateFieldSet$a(this, _EndpointStrategy_processAction, listener, "f");
10723
+ __classPrivateFieldSet$b(this, _EndpointStrategy_processAction, listener, "f");
10693
10724
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
10694
- __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.receive(__classPrivateFieldGet$b(this, _EndpointStrategy_processAction, "f")));
10725
+ __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.receive(__classPrivateFieldGet$c(this, _EndpointStrategy_processAction, "f")));
10695
10726
  }
10696
10727
  getEndpointById(endpointId) {
10697
- const endpoint = __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").get(endpointId);
10728
+ const endpoint = __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").get(endpointId);
10698
10729
  if (!endpoint) {
10699
10730
  throw new Error(`Client with endpoint id ${endpointId} is not connected`);
10700
10731
  }
10701
10732
  return endpoint;
10702
10733
  }
10703
10734
  get connected() {
10704
- return __classPrivateFieldGet$b(this, _EndpointStrategy_connected, "f");
10735
+ return __classPrivateFieldGet$c(this, _EndpointStrategy_connected, "f");
10705
10736
  }
10706
10737
  isEndpointConnected(endpointId) {
10707
- return __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").has(endpointId);
10738
+ return __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").has(endpointId);
10708
10739
  }
10709
10740
  addEndpoint(endpointId, payload) {
10710
- if (!__classPrivateFieldGet$b(this, _EndpointStrategy_connected, "f")) {
10741
+ if (!__classPrivateFieldGet$c(this, _EndpointStrategy_connected, "f")) {
10711
10742
  console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);
10712
10743
  return;
10713
10744
  }
10714
10745
  const clientStrat = new this.EndpointType(payload);
10715
- if (__classPrivateFieldGet$b(this, _EndpointStrategy_processAction, "f")) {
10716
- clientStrat.receive(__classPrivateFieldGet$b(this, _EndpointStrategy_processAction, "f"));
10746
+ if (__classPrivateFieldGet$c(this, _EndpointStrategy_processAction, "f")) {
10747
+ clientStrat.receive(__classPrivateFieldGet$c(this, _EndpointStrategy_processAction, "f"));
10717
10748
  }
10718
- __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").set(endpointId, clientStrat);
10749
+ __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").set(endpointId, clientStrat);
10719
10750
  }
10720
10751
  async closeEndpoint(endpointId) {
10721
- __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").delete(endpointId);
10752
+ __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").delete(endpointId);
10722
10753
  }
10723
10754
  }
10724
10755
  strategy$1.EndpointStrategy = EndpointStrategy;
@@ -10745,11 +10776,11 @@ var iceManager = {};
10745
10776
 
10746
10777
  Object.defineProperty(iceManager, "__esModule", { value: true });
10747
10778
  iceManager.RTCICEManager = void 0;
10748
- const base_1$f = base;
10779
+ const base_1$g = base;
10749
10780
  /*
10750
10781
  Singleton that facilitates Offer and Answer exchange required for establishing RTC connections.
10751
10782
  */
10752
- class RTCICEManager extends base_1$f.EmitterBase {
10783
+ class RTCICEManager extends base_1$g.EmitterBase {
10753
10784
  constructor(wire) {
10754
10785
  super(wire, 'channel');
10755
10786
  this.ensureChannelOpened = (channel) => {
@@ -10900,12 +10931,12 @@ function runtimeUuidMeetsMinimumRuntimeVersion(runtimeUuid, minVersion) {
10900
10931
  }
10901
10932
  runtimeVersioning.runtimeUuidMeetsMinimumRuntimeVersion = runtimeUuidMeetsMinimumRuntimeVersion;
10902
10933
 
10903
- var __classPrivateFieldGet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10934
+ var __classPrivateFieldGet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10904
10935
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10905
10936
  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");
10906
10937
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10907
10938
  };
10908
- var __classPrivateFieldSet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10939
+ var __classPrivateFieldSet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10909
10940
  if (kind === "m") throw new TypeError("Private method is not writable");
10910
10941
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10911
10942
  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");
@@ -10949,19 +10980,19 @@ class ChannelProvider extends channel_1.ChannelBase {
10949
10980
  * a read-only array containing all the identities of connecting clients.
10950
10981
  */
10951
10982
  get connections() {
10952
- return [...__classPrivateFieldGet$a(this, _ChannelProvider_connections, "f")];
10983
+ return [...__classPrivateFieldGet$b(this, _ChannelProvider_connections, "f")];
10953
10984
  }
10954
10985
  static handleClientDisconnection(channel, payload) {
10955
10986
  if (payload?.endpointId) {
10956
10987
  const { uuid, name, endpointId, isLocalEndpointId } = payload;
10957
- __classPrivateFieldGet$a(channel, _ChannelProvider_removeEndpoint, "f").call(channel, { uuid, name, endpointId, isLocalEndpointId });
10988
+ __classPrivateFieldGet$b(channel, _ChannelProvider_removeEndpoint, "f").call(channel, { uuid, name, endpointId, isLocalEndpointId });
10958
10989
  }
10959
10990
  else {
10960
10991
  // this is here to support older runtimes that did not have endpointId
10961
10992
  const multipleRemoves = channel.connections.filter((identity) => {
10962
10993
  return identity.uuid === payload.uuid && identity.name === payload.name;
10963
10994
  });
10964
- multipleRemoves.forEach(__classPrivateFieldGet$a(channel, _ChannelProvider_removeEndpoint, "f"));
10995
+ multipleRemoves.forEach(__classPrivateFieldGet$b(channel, _ChannelProvider_removeEndpoint, "f"));
10965
10996
  }
10966
10997
  channel.disconnectListener(payload);
10967
10998
  }
@@ -10978,8 +11009,8 @@ class ChannelProvider extends channel_1.ChannelBase {
10978
11009
  _ChannelProvider_strategy.set(this, void 0);
10979
11010
  _ChannelProvider_removeEndpoint.set(this, (identity) => {
10980
11011
  const remainingConnections = this.connections.filter((clientIdentity) => clientIdentity.endpointId !== identity.endpointId);
10981
- __classPrivateFieldGet$a(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
10982
- __classPrivateFieldSet$9(this, _ChannelProvider_connections, remainingConnections, "f");
11012
+ __classPrivateFieldGet$b(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
11013
+ __classPrivateFieldSet$a(this, _ChannelProvider_connections, remainingConnections, "f");
10983
11014
  });
10984
11015
  // Must be bound.
10985
11016
  this.processAction = async (action, payload, senderIdentity) => {
@@ -10993,17 +11024,17 @@ class ChannelProvider extends channel_1.ChannelBase {
10993
11024
  return super.processAction(action, payload, senderIdentity);
10994
11025
  };
10995
11026
  _ChannelProvider_close.set(this, () => {
10996
- __classPrivateFieldGet$a(this, _ChannelProvider_strategy, "f").close();
11027
+ __classPrivateFieldGet$b(this, _ChannelProvider_strategy, "f").close();
10997
11028
  const remove = ChannelProvider.removalMap.get(this);
10998
11029
  if (remove) {
10999
11030
  remove();
11000
11031
  }
11001
11032
  });
11002
- __classPrivateFieldSet$9(this, _ChannelProvider_protectedObj, new channel_1.ProtectedItems(providerIdentity, close), "f");
11033
+ __classPrivateFieldSet$a(this, _ChannelProvider_protectedObj, new channel_1.ProtectedItems(providerIdentity, close), "f");
11003
11034
  this.connectListener = () => undefined;
11004
11035
  this.disconnectListener = () => undefined;
11005
- __classPrivateFieldSet$9(this, _ChannelProvider_connections, [], "f");
11006
- __classPrivateFieldSet$9(this, _ChannelProvider_strategy, strategy, "f");
11036
+ __classPrivateFieldSet$a(this, _ChannelProvider_connections, [], "f");
11037
+ __classPrivateFieldSet$a(this, _ChannelProvider_strategy, strategy, "f");
11007
11038
  strategy.receive(this.processAction);
11008
11039
  }
11009
11040
  /**
@@ -11034,16 +11065,16 @@ class ChannelProvider extends channel_1.ChannelBase {
11034
11065
  */
11035
11066
  dispatch(to, action, payload) {
11036
11067
  const endpointId = to.endpointId ?? this.getEndpointIdForOpenFinId(to, action);
11037
- if (endpointId && __classPrivateFieldGet$a(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
11068
+ if (endpointId && __classPrivateFieldGet$b(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
11038
11069
  const callSites = transport_errors_1.RuntimeError.getCallSite();
11039
- return __classPrivateFieldGet$a(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload).catch((e) => {
11070
+ return __classPrivateFieldGet$b(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload).catch((e) => {
11040
11071
  throw new channel_error_1.ChannelError(e, action, payload, callSites);
11041
11072
  });
11042
11073
  }
11043
11074
  return Promise.reject(new Error(`Client connection with identity uuid: ${to.uuid} / name: ${to.name} / endpointId: ${endpointId} no longer connected.`));
11044
11075
  }
11045
11076
  async processConnection(senderId, payload) {
11046
- __classPrivateFieldGet$a(this, _ChannelProvider_connections, "f").push(senderId);
11077
+ __classPrivateFieldGet$b(this, _ChannelProvider_connections, "f").push(senderId);
11047
11078
  return this.connectListener(senderId, payload);
11048
11079
  }
11049
11080
  /**
@@ -11066,7 +11097,7 @@ class ChannelProvider extends channel_1.ChannelBase {
11066
11097
  * ```
11067
11098
  */
11068
11099
  publish(action, payload) {
11069
- return this.connections.map((to) => __classPrivateFieldGet$a(this, _ChannelProvider_strategy, "f").send(to.endpointId, action, payload));
11100
+ return this.connections.map((to) => __classPrivateFieldGet$b(this, _ChannelProvider_strategy, "f").send(to.endpointId, action, payload));
11070
11101
  }
11071
11102
  /**
11072
11103
  * Register a listener that is called on every new client connection.
@@ -11140,11 +11171,11 @@ class ChannelProvider extends channel_1.ChannelBase {
11140
11171
  * ```
11141
11172
  */
11142
11173
  async destroy() {
11143
- const protectedObj = __classPrivateFieldGet$a(this, _ChannelProvider_protectedObj, "f");
11174
+ const protectedObj = __classPrivateFieldGet$b(this, _ChannelProvider_protectedObj, "f");
11144
11175
  protectedObj.providerIdentity;
11145
- __classPrivateFieldSet$9(this, _ChannelProvider_connections, [], "f");
11176
+ __classPrivateFieldSet$a(this, _ChannelProvider_connections, [], "f");
11146
11177
  await protectedObj.close();
11147
- __classPrivateFieldGet$a(this, _ChannelProvider_close, "f").call(this);
11178
+ __classPrivateFieldGet$b(this, _ChannelProvider_close, "f").call(this);
11148
11179
  }
11149
11180
  /**
11150
11181
  * Returns an array with info on every Client connected to the Provider
@@ -11214,7 +11245,7 @@ class ChannelProvider extends channel_1.ChannelBase {
11214
11245
  getEndpointIdForOpenFinId(clientIdentity, action) {
11215
11246
  const matchingConnections = this.connections.filter((c) => c.name === clientIdentity.name && c.uuid === clientIdentity.uuid);
11216
11247
  if (matchingConnections.length >= 2) {
11217
- const protectedObj = __classPrivateFieldGet$a(this, _ChannelProvider_protectedObj, "f");
11248
+ const protectedObj = __classPrivateFieldGet$b(this, _ChannelProvider_protectedObj, "f");
11218
11249
  const { uuid, name } = clientIdentity;
11219
11250
  const providerUuid = protectedObj?.providerIdentity.uuid;
11220
11251
  const providerName = protectedObj?.providerIdentity.name;
@@ -11250,14 +11281,14 @@ var messageReceiver = {};
11250
11281
  Object.defineProperty(messageReceiver, "__esModule", { value: true });
11251
11282
  messageReceiver.MessageReceiver = void 0;
11252
11283
  const client_1$1 = client;
11253
- const base_1$e = base;
11284
+ const base_1$f = base;
11254
11285
  const errors_1 = errors;
11255
11286
  /*
11256
11287
  This is a singleton (per fin object) tasked with routing messages coming off the ipc to the correct endpoint.
11257
11288
  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.
11258
11289
  If functionality is not about receiving messages, it does not belong here.
11259
11290
  */
11260
- class MessageReceiver extends base_1$e.Base {
11291
+ class MessageReceiver extends base_1$f.Base {
11261
11292
  constructor(wire) {
11262
11293
  super(wire);
11263
11294
  this.onmessage = (msg) => {
@@ -11426,13 +11457,13 @@ class CombinedStrategy {
11426
11457
  }
11427
11458
  strategy.default = CombinedStrategy;
11428
11459
 
11429
- var __classPrivateFieldSet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11460
+ var __classPrivateFieldSet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11430
11461
  if (kind === "m") throw new TypeError("Private method is not writable");
11431
11462
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
11432
11463
  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");
11433
11464
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11434
11465
  };
11435
- var __classPrivateFieldGet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11466
+ var __classPrivateFieldGet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11436
11467
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
11437
11468
  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");
11438
11469
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -11444,7 +11475,7 @@ var _ConnectionManager_messageReceiver, _ConnectionManager_rtcConnectionManager;
11444
11475
  Object.defineProperty(connectionManager, "__esModule", { value: true });
11445
11476
  connectionManager.ConnectionManager = void 0;
11446
11477
  const exhaustive_1 = exhaustive;
11447
- const base_1$d = base;
11478
+ const base_1$e = base;
11448
11479
  const strategy_1 = strategy$3;
11449
11480
  const strategy_2 = strategy$2;
11450
11481
  const ice_manager_1 = iceManager;
@@ -11452,7 +11483,7 @@ const provider_1$1 = provider;
11452
11483
  const message_receiver_1 = messageReceiver;
11453
11484
  const protocol_manager_1 = protocolManager;
11454
11485
  const strategy_3 = __importDefault$4(strategy);
11455
- class ConnectionManager extends base_1$d.Base {
11486
+ class ConnectionManager extends base_1$e.Base {
11456
11487
  static getProtocolOptionsFromStrings(protocols) {
11457
11488
  return protocols.map((protocol) => {
11458
11489
  switch (protocol) {
@@ -11481,8 +11512,8 @@ class ConnectionManager extends base_1$d.Base {
11481
11512
  };
11482
11513
  this.providerMap = new Map();
11483
11514
  this.protocolManager = new protocol_manager_1.ProtocolManager(this.wire.environment.type === 'node' ? ['classic'] : ['rtc', 'classic']);
11484
- __classPrivateFieldSet$8(this, _ConnectionManager_messageReceiver, new message_receiver_1.MessageReceiver(wire), "f");
11485
- __classPrivateFieldSet$8(this, _ConnectionManager_rtcConnectionManager, new ice_manager_1.RTCICEManager(wire), "f");
11515
+ __classPrivateFieldSet$9(this, _ConnectionManager_messageReceiver, new message_receiver_1.MessageReceiver(wire), "f");
11516
+ __classPrivateFieldSet$9(this, _ConnectionManager_rtcConnectionManager, new ice_manager_1.RTCICEManager(wire), "f");
11486
11517
  wire.registerMessageHandler(this.onmessage.bind(this));
11487
11518
  }
11488
11519
  createProvider(options, providerIdentity) {
@@ -11493,7 +11524,7 @@ class ConnectionManager extends base_1$d.Base {
11493
11524
  case 'rtc':
11494
11525
  return new strategy_2.RTCStrategy();
11495
11526
  case 'classic':
11496
- return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$9(this, _ConnectionManager_messageReceiver, "f"),
11527
+ return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$a(this, _ConnectionManager_messageReceiver, "f"),
11497
11528
  // Providers do not have an endpointId, use channelId as endpointId in the strategy.
11498
11529
  providerIdentity.channelId, providerIdentity);
11499
11530
  default:
@@ -11529,7 +11560,7 @@ class ConnectionManager extends base_1$d.Base {
11529
11560
  const supportedProtocols = await Promise.all(protocols.map(async (type) => {
11530
11561
  switch (type) {
11531
11562
  case 'rtc': {
11532
- const { rtcClient, channels, offer, rtcConnectionId, channelsOpened } = await __classPrivateFieldGet$9(this, _ConnectionManager_rtcConnectionManager, "f").startClientOffer();
11563
+ const { rtcClient, channels, offer, rtcConnectionId, channelsOpened } = await __classPrivateFieldGet$a(this, _ConnectionManager_rtcConnectionManager, "f").startClientOffer();
11533
11564
  rtcPacket = { rtcClient, channels, channelsOpened };
11534
11565
  return {
11535
11566
  type: 'rtc',
@@ -11556,18 +11587,18 @@ class ConnectionManager extends base_1$d.Base {
11556
11587
  routingInfo.endpointId = this.wire.environment.getNextMessageId();
11557
11588
  // For New Clients connecting to Old Providers. To prevent multi-dispatching and publishing, we delete previously-connected
11558
11589
  // clients that are in the same context as the newly-connected client.
11559
- __classPrivateFieldGet$9(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
11590
+ __classPrivateFieldGet$a(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
11560
11591
  }
11561
11592
  const answer = routingInfo.answer ?? {
11562
11593
  supportedProtocols: [{ type: 'classic', version: 1 }]
11563
11594
  };
11564
11595
  const createStrategyFromAnswer = async (protocol) => {
11565
11596
  if (protocol.type === 'rtc' && rtcPacket) {
11566
- await __classPrivateFieldGet$9(this, _ConnectionManager_rtcConnectionManager, "f").finishClientOffer(rtcPacket.rtcClient, protocol.payload.answer, rtcPacket.channelsOpened);
11597
+ await __classPrivateFieldGet$a(this, _ConnectionManager_rtcConnectionManager, "f").finishClientOffer(rtcPacket.rtcClient, protocol.payload.answer, rtcPacket.channelsOpened);
11567
11598
  return new strategy_2.RTCStrategy();
11568
11599
  }
11569
11600
  if (protocol.type === 'classic') {
11570
- return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$9(this, _ConnectionManager_messageReceiver, "f"), routingInfo.endpointId, routingInfo);
11601
+ return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$a(this, _ConnectionManager_messageReceiver, "f"), routingInfo.endpointId, routingInfo);
11571
11602
  }
11572
11603
  return null;
11573
11604
  };
@@ -11635,7 +11666,7 @@ class ConnectionManager extends base_1$d.Base {
11635
11666
  clientAnswer = await overlappingProtocols.reduce(async (accumP, protocolToUse) => {
11636
11667
  const answer = await accumP;
11637
11668
  if (protocolToUse.type === 'rtc') {
11638
- const { answer: rtcAnswer, rtcClient, channels } = await __classPrivateFieldGet$9(this, _ConnectionManager_rtcConnectionManager, "f").createProviderAnswer(protocolToUse.payload.rtcConnectionId, protocolToUse.payload.offer);
11669
+ const { answer: rtcAnswer, rtcClient, channels } = await __classPrivateFieldGet$a(this, _ConnectionManager_rtcConnectionManager, "f").createProviderAnswer(protocolToUse.payload.rtcConnectionId, protocolToUse.payload.offer);
11639
11670
  answer.supportedProtocols.push({
11640
11671
  type: 'rtc',
11641
11672
  version: strategy_2.RTCInfo.version,
@@ -11683,13 +11714,13 @@ _ConnectionManager_messageReceiver = new WeakMap(), _ConnectionManager_rtcConnec
11683
11714
  *
11684
11715
  * @packageDocumentation
11685
11716
  */
11686
- var __classPrivateFieldSet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11717
+ var __classPrivateFieldSet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11687
11718
  if (kind === "m") throw new TypeError("Private method is not writable");
11688
11719
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
11689
11720
  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");
11690
11721
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11691
11722
  };
11692
- var __classPrivateFieldGet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11723
+ var __classPrivateFieldGet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11693
11724
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
11694
11725
  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");
11695
11726
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -11699,8 +11730,8 @@ Object.defineProperty(channel$1, "__esModule", { value: true });
11699
11730
  channel$1.Channel = void 0;
11700
11731
  /* eslint-disable no-console */
11701
11732
  const events_1$2 = require$$0;
11702
- const lazy_1$1 = lazy;
11703
- const base_1$c = base;
11733
+ const lazy_1$2 = lazy;
11734
+ const base_1$d = base;
11704
11735
  const client_1 = client;
11705
11736
  const connection_manager_1 = connectionManager;
11706
11737
  const provider_1 = provider;
@@ -11731,7 +11762,7 @@ function retryDelay(count) {
11731
11762
  * * {@link Channel.onChannelConnect onChannelConnect(listener)}
11732
11763
  * * {@link Channel.onChannelDisconnect onChannelDisconnect(listener)}
11733
11764
  */
11734
- class Channel extends base_1$c.EmitterBase {
11765
+ class Channel extends base_1$d.EmitterBase {
11735
11766
  /**
11736
11767
  * @internal
11737
11768
  */
@@ -11740,17 +11771,17 @@ class Channel extends base_1$c.EmitterBase {
11740
11771
  _Channel_connectionManager.set(this, void 0);
11741
11772
  _Channel_internalEmitter.set(this, new events_1$2.EventEmitter());
11742
11773
  // OpenFin API has not been injected at construction time, *must* wait for API to be ready.
11743
- _Channel_readyToConnect.set(this, new lazy_1$1.AsyncRetryableLazy(async () => {
11774
+ _Channel_readyToConnect.set(this, new lazy_1$2.AsyncRetryableLazy(async () => {
11744
11775
  await Promise.all([
11745
11776
  this.on('disconnected', (eventPayload) => {
11746
11777
  client_1.ChannelClient.handleProviderDisconnect(eventPayload);
11747
11778
  }),
11748
11779
  this.on('connected', (...args) => {
11749
- __classPrivateFieldGet$8(this, _Channel_internalEmitter, "f").emit('connected', ...args);
11780
+ __classPrivateFieldGet$9(this, _Channel_internalEmitter, "f").emit('connected', ...args);
11750
11781
  })
11751
11782
  ]).catch(() => new Error('error setting up channel connection listeners'));
11752
11783
  }));
11753
- __classPrivateFieldSet$7(this, _Channel_connectionManager, new connection_manager_1.ConnectionManager(wire), "f");
11784
+ __classPrivateFieldSet$8(this, _Channel_connectionManager, new connection_manager_1.ConnectionManager(wire), "f");
11754
11785
  }
11755
11786
  /**
11756
11787
  *
@@ -11825,7 +11856,7 @@ class Channel extends base_1$c.EmitterBase {
11825
11856
  resolve(true);
11826
11857
  }
11827
11858
  };
11828
- __classPrivateFieldGet$8(this, _Channel_internalEmitter, "f").on('connected', connectedListener);
11859
+ __classPrivateFieldGet$9(this, _Channel_internalEmitter, "f").on('connected', connectedListener);
11829
11860
  });
11830
11861
  try {
11831
11862
  if (retryInfo.count > 0) {
@@ -11857,7 +11888,7 @@ class Channel extends base_1$c.EmitterBase {
11857
11888
  finally {
11858
11889
  retryInfo.count += 1;
11859
11890
  // in case of other errors, remove our listener
11860
- __classPrivateFieldGet$8(this, _Channel_internalEmitter, "f").removeListener('connected', connectedListener);
11891
+ __classPrivateFieldGet$9(this, _Channel_internalEmitter, "f").removeListener('connected', connectedListener);
11861
11892
  }
11862
11893
  } while (shouldWait); // If we're waiting we retry the above loop
11863
11894
  // Should wait was false, no channel was found.
@@ -11916,12 +11947,12 @@ class Channel extends base_1$c.EmitterBase {
11916
11947
  async connect(channelName, options = {}) {
11917
11948
  // Make sure we don't connect before listeners are set up
11918
11949
  // This also errors if we're not in OpenFin, ensuring we don't run unnecessary code
11919
- await __classPrivateFieldGet$8(this, _Channel_readyToConnect, "f").getValue();
11950
+ await __classPrivateFieldGet$9(this, _Channel_readyToConnect, "f").getValue();
11920
11951
  if (!channelName || typeof channelName !== 'string') {
11921
11952
  throw new Error('Please provide a channelName string to connect to a channel.');
11922
11953
  }
11923
11954
  const opts = { wait: true, ...this.wire.environment.getDefaultChannelOptions().connect, ...options };
11924
- const { offer, rtc: rtcPacket } = await __classPrivateFieldGet$8(this, _Channel_connectionManager, "f").createClientOffer(opts);
11955
+ const { offer, rtc: rtcPacket } = await __classPrivateFieldGet$9(this, _Channel_connectionManager, "f").createClientOffer(opts);
11925
11956
  let connectionUrl;
11926
11957
  if (this.fin.me.isFrame || this.fin.me.isView || this.fin.me.isWindow) {
11927
11958
  connectionUrl = (await this.fin.me.getInfo()).url;
@@ -11933,7 +11964,7 @@ class Channel extends base_1$c.EmitterBase {
11933
11964
  connectionUrl
11934
11965
  };
11935
11966
  const routingInfo = await this.safeConnect(channelName, opts.wait, connectPayload);
11936
- const strategy = await __classPrivateFieldGet$8(this, _Channel_connectionManager, "f").createClientStrategy(rtcPacket, routingInfo);
11967
+ const strategy = await __classPrivateFieldGet$9(this, _Channel_connectionManager, "f").createClientStrategy(rtcPacket, routingInfo);
11937
11968
  const channel = new client_1.ChannelClient(routingInfo, () => client_1.ChannelClient.wireClose(this.wire, routingInfo, routingInfo.endpointId), strategy);
11938
11969
  // It is the client's responsibility to handle endpoint disconnection to the provider.
11939
11970
  // If the endpoint dies, the client will force a disconnection through the core.
@@ -12002,7 +12033,7 @@ class Channel extends base_1$c.EmitterBase {
12002
12033
  throw new Error('Please provide a channelName to create a channel');
12003
12034
  }
12004
12035
  const { payload: { data: providerIdentity } } = await this.wire.sendAction('create-channel', { channelName });
12005
- const channel = __classPrivateFieldGet$8(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
12036
+ const channel = __classPrivateFieldGet$9(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
12006
12037
  // TODO: fix typing (internal)
12007
12038
  // @ts-expect-error
12008
12039
  this.on('client-disconnected', (eventPayload) => {
@@ -12026,7 +12057,7 @@ interappbus.InterAppPayload = interappbus.InterApplicationBus = void 0;
12026
12057
  * @packageDocumentation
12027
12058
  */
12028
12059
  const events_1$1 = require$$0;
12029
- const base_1$b = base;
12060
+ const base_1$c = base;
12030
12061
  const ref_counter_1 = refCounter;
12031
12062
  const index_1$2 = channel$1;
12032
12063
  const validate_1$2 = validate;
@@ -12034,7 +12065,7 @@ const validate_1$2 = validate;
12034
12065
  * A messaging bus that allows for pub/sub messaging between different applications.
12035
12066
  *
12036
12067
  */
12037
- class InterApplicationBus extends base_1$b.Base {
12068
+ class InterApplicationBus extends base_1$c.Base {
12038
12069
  /**
12039
12070
  * @internal
12040
12071
  */
@@ -12240,12 +12271,12 @@ var clipboard = {};
12240
12271
  */
12241
12272
  Object.defineProperty(clipboard, "__esModule", { value: true });
12242
12273
  clipboard.Clipboard = void 0;
12243
- const base_1$a = base;
12274
+ const base_1$b = base;
12244
12275
  /**
12245
12276
  * The Clipboard API allows reading and writing to the clipboard in multiple formats.
12246
12277
  *
12247
12278
  */
12248
- class Clipboard extends base_1$a.Base {
12279
+ class Clipboard extends base_1$b.Base {
12249
12280
  /**
12250
12281
  * Writes data into the clipboard as plain text
12251
12282
  * @param writeObj The object for writing data into the clipboard
@@ -12429,12 +12460,12 @@ var globalHotkey = {};
12429
12460
 
12430
12461
  Object.defineProperty(globalHotkey, "__esModule", { value: true });
12431
12462
  globalHotkey.GlobalHotkey = void 0;
12432
- const base_1$9 = base;
12463
+ const base_1$a = base;
12433
12464
  /**
12434
12465
  * The GlobalHotkey module can register/unregister a global hotkeys.
12435
12466
  *
12436
12467
  */
12437
- class GlobalHotkey extends base_1$9.EmitterBase {
12468
+ class GlobalHotkey extends base_1$a.EmitterBase {
12438
12469
  /**
12439
12470
  * @internal
12440
12471
  */
@@ -12568,13 +12599,13 @@ var Factory$3 = {};
12568
12599
 
12569
12600
  var Instance$2 = {};
12570
12601
 
12571
- var __classPrivateFieldSet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12602
+ var __classPrivateFieldSet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12572
12603
  if (kind === "m") throw new TypeError("Private method is not writable");
12573
12604
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
12574
12605
  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");
12575
12606
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12576
12607
  };
12577
- var __classPrivateFieldGet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12608
+ var __classPrivateFieldGet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12578
12609
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
12579
12610
  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");
12580
12611
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -12583,14 +12614,14 @@ var _Platform_channelName, _Platform_connectToProvider;
12583
12614
  Object.defineProperty(Instance$2, "__esModule", { value: true });
12584
12615
  Instance$2.Platform = void 0;
12585
12616
  /* eslint-disable import/prefer-default-export, no-undef */
12586
- const base_1$8 = base;
12617
+ const base_1$9 = base;
12587
12618
  const validate_1$1 = validate;
12588
12619
  /** Manages the life cycle of windows and views in the application.
12589
12620
  *
12590
12621
  * Enables taking snapshots of itself and applying them to restore a previous configuration
12591
12622
  * as well as listen to {@link OpenFin.PlatformEvents platform events}.
12592
12623
  */
12593
- class Platform extends base_1$8.EmitterBase {
12624
+ class Platform extends base_1$9.EmitterBase {
12594
12625
  /**
12595
12626
  * @internal
12596
12627
  */
@@ -12611,24 +12642,24 @@ class Platform extends base_1$8.EmitterBase {
12611
12642
  this.wire.sendAction('platform-get-client', this.identity).catch((e) => {
12612
12643
  // don't expose
12613
12644
  });
12614
- if (!Platform.clientMap.has(__classPrivateFieldGet$7(this, _Platform_channelName, "f"))) {
12615
- const clientPromise = __classPrivateFieldGet$7(this, _Platform_connectToProvider, "f").call(this);
12616
- Platform.clientMap.set(__classPrivateFieldGet$7(this, _Platform_channelName, "f"), clientPromise);
12645
+ if (!Platform.clientMap.has(__classPrivateFieldGet$8(this, _Platform_channelName, "f"))) {
12646
+ const clientPromise = __classPrivateFieldGet$8(this, _Platform_connectToProvider, "f").call(this);
12647
+ Platform.clientMap.set(__classPrivateFieldGet$8(this, _Platform_channelName, "f"), clientPromise);
12617
12648
  }
12618
12649
  // we set it above
12619
12650
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
12620
- return Platform.clientMap.get(__classPrivateFieldGet$7(this, _Platform_channelName, "f"));
12651
+ return Platform.clientMap.get(__classPrivateFieldGet$8(this, _Platform_channelName, "f"));
12621
12652
  };
12622
12653
  _Platform_connectToProvider.set(this, async () => {
12623
12654
  try {
12624
- const client = await this._channel.connect(__classPrivateFieldGet$7(this, _Platform_channelName, "f"), { wait: false });
12655
+ const client = await this._channel.connect(__classPrivateFieldGet$8(this, _Platform_channelName, "f"), { wait: false });
12625
12656
  client.onDisconnection(() => {
12626
- Platform.clientMap.delete(__classPrivateFieldGet$7(this, _Platform_channelName, "f"));
12657
+ Platform.clientMap.delete(__classPrivateFieldGet$8(this, _Platform_channelName, "f"));
12627
12658
  });
12628
12659
  return client;
12629
12660
  }
12630
12661
  catch (e) {
12631
- Platform.clientMap.delete(__classPrivateFieldGet$7(this, _Platform_channelName, "f"));
12662
+ Platform.clientMap.delete(__classPrivateFieldGet$8(this, _Platform_channelName, "f"));
12632
12663
  throw new Error('The targeted Platform is not currently running. Listen for application-started event for the given Uuid.');
12633
12664
  }
12634
12665
  });
@@ -12641,7 +12672,7 @@ class Platform extends base_1$8.EmitterBase {
12641
12672
  if (errorMsg) {
12642
12673
  throw new Error(errorMsg);
12643
12674
  }
12644
- __classPrivateFieldSet$6(this, _Platform_channelName, channelName, "f");
12675
+ __classPrivateFieldSet$7(this, _Platform_channelName, channelName, "f");
12645
12676
  this._channel = this.fin.InterApplicationBus.Channel;
12646
12677
  this.identity = { uuid: identity.uuid };
12647
12678
  this.Layout = this.fin.Platform.Layout;
@@ -13697,13 +13728,13 @@ const createRelayedDispatch = (client, target, relayId, relayErrorMsg) => async
13697
13728
  };
13698
13729
  channelApiRelay.createRelayedDispatch = createRelayedDispatch;
13699
13730
 
13700
- var __classPrivateFieldSet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13731
+ var __classPrivateFieldSet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13701
13732
  if (kind === "m") throw new TypeError("Private method is not writable");
13702
13733
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
13703
13734
  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");
13704
13735
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
13705
13736
  };
13706
- var __classPrivateFieldGet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13737
+ var __classPrivateFieldGet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13707
13738
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13708
13739
  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");
13709
13740
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -13757,7 +13788,7 @@ class LayoutNode {
13757
13788
  * console.log(`The parent ColumnOrRow is root: ${parentIsRoot}`);
13758
13789
  * ```
13759
13790
  */
13760
- this.isRoot = () => __classPrivateFieldGet$6(this, _LayoutNode_client, "f").isRoot(this.entityId);
13791
+ this.isRoot = () => __classPrivateFieldGet$7(this, _LayoutNode_client, "f").isRoot(this.entityId);
13761
13792
  /**
13762
13793
  * Checks if the TabStack or ColumnOrRow exists
13763
13794
  *
@@ -13777,7 +13808,7 @@ class LayoutNode {
13777
13808
  * console.log(`The entity exists: ${exists}`);
13778
13809
  * ```
13779
13810
  */
13780
- this.exists = () => __classPrivateFieldGet$6(this, _LayoutNode_client, "f").exists(this.entityId);
13811
+ this.exists = () => __classPrivateFieldGet$7(this, _LayoutNode_client, "f").exists(this.entityId);
13781
13812
  /**
13782
13813
  * Retrieves the parent of the TabStack or ColumnOrRow
13783
13814
  *
@@ -13798,11 +13829,11 @@ class LayoutNode {
13798
13829
  * ```
13799
13830
  */
13800
13831
  this.getParent = async () => {
13801
- const parent = await __classPrivateFieldGet$6(this, _LayoutNode_client, "f").getParent(this.entityId);
13832
+ const parent = await __classPrivateFieldGet$7(this, _LayoutNode_client, "f").getParent(this.entityId);
13802
13833
  if (!parent) {
13803
13834
  return undefined;
13804
13835
  }
13805
- return LayoutNode.getEntity(parent, __classPrivateFieldGet$6(this, _LayoutNode_client, "f"));
13836
+ return LayoutNode.getEntity(parent, __classPrivateFieldGet$7(this, _LayoutNode_client, "f"));
13806
13837
  };
13807
13838
  /**
13808
13839
  * Creates a new TabStack adjacent to the given TabStack or ColumnOrRow. Inputs can be new views to create, or existing views.
@@ -13853,8 +13884,8 @@ class LayoutNode {
13853
13884
  * @experimental
13854
13885
  */
13855
13886
  this.createAdjacentStack = async (views, options) => {
13856
- const entityId = await __classPrivateFieldGet$6(this, _LayoutNode_client, "f").createAdjacentStack(this.entityId, views, options);
13857
- return LayoutNode.getEntity({ entityId, type: 'stack' }, __classPrivateFieldGet$6(this, _LayoutNode_client, "f"));
13887
+ const entityId = await __classPrivateFieldGet$7(this, _LayoutNode_client, "f").createAdjacentStack(this.entityId, views, options);
13888
+ return LayoutNode.getEntity({ entityId, type: 'stack' }, __classPrivateFieldGet$7(this, _LayoutNode_client, "f"));
13858
13889
  };
13859
13890
  /**
13860
13891
  * Retrieves the adjacent TabStacks of the given TabStack or ColumnOrRow.
@@ -13882,16 +13913,16 @@ class LayoutNode {
13882
13913
  * @experimental
13883
13914
  */
13884
13915
  this.getAdjacentStacks = async (edge) => {
13885
- const adjacentStacks = await __classPrivateFieldGet$6(this, _LayoutNode_client, "f").getAdjacentStacks({
13916
+ const adjacentStacks = await __classPrivateFieldGet$7(this, _LayoutNode_client, "f").getAdjacentStacks({
13886
13917
  targetId: this.entityId,
13887
13918
  edge
13888
13919
  });
13889
13920
  return adjacentStacks.map((stack) => LayoutNode.getEntity({
13890
13921
  type: 'stack',
13891
13922
  entityId: stack.entityId
13892
- }, __classPrivateFieldGet$6(this, _LayoutNode_client, "f")));
13923
+ }, __classPrivateFieldGet$7(this, _LayoutNode_client, "f")));
13893
13924
  };
13894
- __classPrivateFieldSet$5(this, _LayoutNode_client, client, "f");
13925
+ __classPrivateFieldSet$6(this, _LayoutNode_client, client, "f");
13895
13926
  this.entityId = entityId;
13896
13927
  }
13897
13928
  }
@@ -13964,7 +13995,7 @@ class TabStack extends LayoutNode {
13964
13995
  * ```
13965
13996
  * @experimental
13966
13997
  */
13967
- this.getViews = () => __classPrivateFieldGet$6(this, _TabStack_client, "f").getStackViews(this.entityId);
13998
+ this.getViews = () => __classPrivateFieldGet$7(this, _TabStack_client, "f").getStackViews(this.entityId);
13968
13999
  /**
13969
14000
  * Adds or creates a view in this {@link TabStack}.
13970
14001
  *
@@ -13994,7 +14025,7 @@ class TabStack extends LayoutNode {
13994
14025
  * ```
13995
14026
  * @experimental
13996
14027
  */
13997
- this.addView = async (view, options = { index: 0 }) => __classPrivateFieldGet$6(this, _TabStack_client, "f").addViewToStack(this.entityId, view, options);
14028
+ this.addView = async (view, options = { index: 0 }) => __classPrivateFieldGet$7(this, _TabStack_client, "f").addViewToStack(this.entityId, view, options);
13998
14029
  /**
13999
14030
  * Removes a view from this {@link TabStack}.
14000
14031
  *
@@ -14024,7 +14055,7 @@ class TabStack extends LayoutNode {
14024
14055
  * ```
14025
14056
  */
14026
14057
  this.removeView = async (view) => {
14027
- await __classPrivateFieldGet$6(this, _TabStack_client, "f").removeViewFromStack(this.entityId, view);
14058
+ await __classPrivateFieldGet$7(this, _TabStack_client, "f").removeViewFromStack(this.entityId, view);
14028
14059
  };
14029
14060
  /**
14030
14061
  * Sets the active view of the {@link TabStack} without focusing it.
@@ -14048,9 +14079,9 @@ class TabStack extends LayoutNode {
14048
14079
  * @experimental
14049
14080
  */
14050
14081
  this.setActiveView = async (view) => {
14051
- await __classPrivateFieldGet$6(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
14082
+ await __classPrivateFieldGet$7(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
14052
14083
  };
14053
- __classPrivateFieldSet$5(this, _TabStack_client, client, "f");
14084
+ __classPrivateFieldSet$6(this, _TabStack_client, client, "f");
14054
14085
  }
14055
14086
  }
14056
14087
  layoutEntities.TabStack = TabStack;
@@ -14089,10 +14120,10 @@ class ColumnOrRow extends LayoutNode {
14089
14120
  * ```
14090
14121
  */
14091
14122
  this.getContent = async () => {
14092
- const contentItemEntities = await __classPrivateFieldGet$6(this, _ColumnOrRow_client, "f").getContent(this.entityId);
14093
- return contentItemEntities.map((entity) => LayoutNode.getEntity(entity, __classPrivateFieldGet$6(this, _ColumnOrRow_client, "f")));
14123
+ const contentItemEntities = await __classPrivateFieldGet$7(this, _ColumnOrRow_client, "f").getContent(this.entityId);
14124
+ return contentItemEntities.map((entity) => LayoutNode.getEntity(entity, __classPrivateFieldGet$7(this, _ColumnOrRow_client, "f")));
14094
14125
  };
14095
- __classPrivateFieldSet$5(this, _ColumnOrRow_client, client, "f");
14126
+ __classPrivateFieldSet$6(this, _ColumnOrRow_client, client, "f");
14096
14127
  this.type = type;
14097
14128
  }
14098
14129
  }
@@ -14107,7 +14138,7 @@ layout_constants.LAYOUT_CONTROLLER_ID = 'layout-entities';
14107
14138
  // TODO: eventually export this somehow
14108
14139
  layout_constants.DEFAULT_LAYOUT_KEY = '__default__';
14109
14140
 
14110
- var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14141
+ var __classPrivateFieldGet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14111
14142
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14112
14143
  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");
14113
14144
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -14115,9 +14146,9 @@ var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateF
14115
14146
  var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
14116
14147
  Object.defineProperty(Instance$1, "__esModule", { value: true });
14117
14148
  Instance$1.Layout = void 0;
14118
- const lazy_1 = lazy;
14149
+ const lazy_1$1 = lazy;
14119
14150
  const validate_1 = validate;
14120
- const base_1$7 = base;
14151
+ const base_1$8 = base;
14121
14152
  const common_utils_1$1 = commonUtils;
14122
14153
  const layout_entities_1 = layoutEntities;
14123
14154
  const layout_constants_1$1 = layout_constants;
@@ -14253,12 +14284,12 @@ const layout_constants_1$1 = layout_constants;
14253
14284
  * }
14254
14285
  * ```
14255
14286
  */
14256
- class Layout extends base_1$7.Base {
14287
+ class Layout extends base_1$8.Base {
14257
14288
  /**
14258
14289
  * @internal
14259
14290
  */
14260
14291
  static getClient(layout) {
14261
- return __classPrivateFieldGet$5(layout, _Layout_layoutClient, "f").getValue();
14292
+ return __classPrivateFieldGet$6(layout, _Layout_layoutClient, "f").getValue();
14262
14293
  }
14263
14294
  /**
14264
14295
  * @internal
@@ -14272,7 +14303,7 @@ class Layout extends base_1$7.Base {
14272
14303
  * Lazily constructed {@link LayoutEntitiesClient} bound to this platform's client and identity
14273
14304
  * The client is for {@link LayoutEntitiesController}
14274
14305
  */
14275
- _Layout_layoutClient.set(this, new lazy_1.Lazy(async () => layout_entities_1.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(), layout_constants_1$1.LAYOUT_CONTROLLER_ID, this.identity)));
14306
+ _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)));
14276
14307
  /**
14277
14308
  * Replaces a Platform window's layout with a new layout.
14278
14309
  *
@@ -14481,7 +14512,7 @@ class Layout extends base_1$7.Base {
14481
14512
  this.wire.sendAction('layout-get-root-item').catch(() => {
14482
14513
  // don't expose
14483
14514
  });
14484
- const client = await __classPrivateFieldGet$5(this, _Layout_layoutClient, "f").getValue();
14515
+ const client = await __classPrivateFieldGet$6(this, _Layout_layoutClient, "f").getValue();
14485
14516
  const root = await client.getRoot('layoutName' in this.identity ? this.identity : undefined);
14486
14517
  return layout_entities_1.LayoutNode.getEntity(root, client);
14487
14518
  }
@@ -14499,7 +14530,7 @@ class Layout extends base_1$7.Base {
14499
14530
  this.wire.sendAction('layout-get-stack-by-view').catch(() => {
14500
14531
  // don't expose
14501
14532
  });
14502
- const client = await __classPrivateFieldGet$5(this, _Layout_layoutClient, "f").getValue();
14533
+ const client = await __classPrivateFieldGet$6(this, _Layout_layoutClient, "f").getValue();
14503
14534
  const stack = await client.getStackByView(identity);
14504
14535
  if (!stack) {
14505
14536
  throw new Error(`No stack found for view: ${identity.uuid}/${identity.name}`);
@@ -14519,7 +14550,7 @@ class Layout extends base_1$7.Base {
14519
14550
  this.wire.sendAction('layout-add-view').catch((e) => {
14520
14551
  // don't expose
14521
14552
  });
14522
- const { identity } = await __classPrivateFieldGet$5(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-add-view', {
14553
+ const { identity } = await __classPrivateFieldGet$6(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-add-view', {
14523
14554
  viewOptions,
14524
14555
  location,
14525
14556
  targetView
@@ -14537,7 +14568,7 @@ class Layout extends base_1$7.Base {
14537
14568
  this.wire.sendAction('layout-close-view').catch((e) => {
14538
14569
  // don't expose
14539
14570
  });
14540
- await __classPrivateFieldGet$5(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
14571
+ await __classPrivateFieldGet$6(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
14541
14572
  }
14542
14573
  }
14543
14574
  Instance$1.Layout = Layout;
@@ -14551,12 +14582,12 @@ async function _Layout_forwardLayoutAction(action, payload) {
14551
14582
  return client.dispatch(action, { target: this.identity, opts: payload });
14552
14583
  };
14553
14584
 
14554
- var __classPrivateFieldGet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14585
+ var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14555
14586
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14556
14587
  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");
14557
14588
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
14558
14589
  };
14559
- var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14590
+ var __classPrivateFieldSet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14560
14591
  if (kind === "m") throw new TypeError("Private method is not writable");
14561
14592
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14562
14593
  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");
@@ -14565,13 +14596,13 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
14565
14596
  var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getLayoutManagerSpy, _LayoutModule_getSafeLayoutManager;
14566
14597
  Object.defineProperty(Factory$2, "__esModule", { value: true });
14567
14598
  Factory$2.LayoutModule = void 0;
14568
- const base_1$6 = base;
14599
+ const base_1$7 = base;
14569
14600
  const Instance_1$2 = Instance$1;
14570
14601
  const layout_constants_1 = layout_constants;
14571
14602
  /**
14572
14603
  * Static namespace for OpenFin API methods that interact with the {@link Layout} class, available under `fin.Platform.Layout`.
14573
14604
  */
14574
- class LayoutModule extends base_1$6.Base {
14605
+ class LayoutModule extends base_1$7.Base {
14575
14606
  constructor() {
14576
14607
  super(...arguments);
14577
14608
  _LayoutModule_instances.add(this);
@@ -14622,23 +14653,23 @@ class LayoutModule extends base_1$6.Base {
14622
14653
  if (!this.wire.environment.layoutAllowedInContext(this.fin)) {
14623
14654
  throw new Error('Layout.init can only be called from a Window context.');
14624
14655
  }
14625
- if (__classPrivateFieldGet$4(this, _LayoutModule_layoutInitializationAttempted, "f")) {
14656
+ if (__classPrivateFieldGet$5(this, _LayoutModule_layoutInitializationAttempted, "f")) {
14626
14657
  throw new Error('Layout.init was already called, please use Layout.create to add additional layouts.');
14627
14658
  }
14628
14659
  if (this.wire.environment.type === 'openfin') {
14629
14660
  // preload the client
14630
14661
  await this.fin.Platform.getCurrentSync().getClient();
14631
14662
  }
14632
- __classPrivateFieldSet$4(this, _LayoutModule_layoutInitializationAttempted, true, "f");
14663
+ __classPrivateFieldSet$5(this, _LayoutModule_layoutInitializationAttempted, true, "f");
14633
14664
  // TODO: rename to createLayoutManager
14634
- __classPrivateFieldSet$4(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
14635
- await this.wire.environment.applyLayoutSnapshot(this.fin, __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), options);
14665
+ __classPrivateFieldSet$5(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
14666
+ await this.wire.environment.applyLayoutSnapshot(this.fin, __classPrivateFieldGet$5(this, _LayoutModule_layoutManager, "f"), options);
14636
14667
  const meIdentity = { name: this.fin.me.name, uuid: this.fin.me.uuid };
14637
14668
  if (!options.layoutManagerOverride) {
14638
14669
  // CORE-1081 to be removed when we actually delete the `layoutManager` prop
14639
14670
  // in single-layout case, we return the undocumented layoutManager type
14640
14671
  const layoutIdentity = { layoutName: layout_constants_1.DEFAULT_LAYOUT_KEY, ...meIdentity };
14641
- return __classPrivateFieldGet$4(this, _LayoutModule_getLayoutManagerSpy, "f").call(this, layoutIdentity);
14672
+ return __classPrivateFieldGet$5(this, _LayoutModule_getLayoutManagerSpy, "f").call(this, layoutIdentity);
14642
14673
  }
14643
14674
  return this.wrapSync(meIdentity);
14644
14675
  };
@@ -14667,13 +14698,13 @@ class LayoutModule extends base_1$6.Base {
14667
14698
  * @returns
14668
14699
  */
14669
14700
  this.getCurrentLayoutManagerSync = () => {
14670
- return __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
14701
+ return __classPrivateFieldGet$5(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
14671
14702
  };
14672
14703
  this.create = async (options) => {
14673
- return this.wire.environment.createLayout(__classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.create()`), options);
14704
+ return this.wire.environment.createLayout(__classPrivateFieldGet$5(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.create()`), options);
14674
14705
  };
14675
14706
  this.destroy = async (layoutIdentity) => {
14676
- return this.wire.environment.destroyLayout(__classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.destroy()`), layoutIdentity);
14707
+ return this.wire.environment.destroyLayout(__classPrivateFieldGet$5(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.destroy()`), layoutIdentity);
14677
14708
  };
14678
14709
  }
14679
14710
  /**
@@ -14814,10 +14845,10 @@ class LayoutModule extends base_1$6.Base {
14814
14845
  }
14815
14846
  Factory$2.LayoutModule = LayoutModule;
14816
14847
  _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getLayoutManagerSpy = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_getSafeLayoutManager = function _LayoutModule_getSafeLayoutManager(method) {
14817
- if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
14848
+ if (!__classPrivateFieldGet$5(this, _LayoutModule_layoutManager, "f")) {
14818
14849
  throw new Error(`You must call init before using the API ${method}`);
14819
14850
  }
14820
- return __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f");
14851
+ return __classPrivateFieldGet$5(this, _LayoutModule_layoutManager, "f");
14821
14852
  };
14822
14853
 
14823
14854
  (function (exports) {
@@ -14854,13 +14885,13 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layou
14854
14885
 
14855
14886
  Object.defineProperty(Factory$3, "__esModule", { value: true });
14856
14887
  Factory$3.PlatformModule = void 0;
14857
- const base_1$5 = base;
14888
+ const base_1$6 = base;
14858
14889
  const Instance_1$1 = Instance$2;
14859
14890
  const index_1$1 = layout;
14860
14891
  /**
14861
14892
  * Static namespace for OpenFin API methods that interact with the {@link Platform} class, available under `fin.Platform`.
14862
14893
  */
14863
- class PlatformModule extends base_1$5.Base {
14894
+ class PlatformModule extends base_1$6.Base {
14864
14895
  /**
14865
14896
  * @internal
14866
14897
  */
@@ -15179,27 +15210,27 @@ var InteropClient$1 = {};
15179
15210
 
15180
15211
  var SessionContextGroupClient$1 = {};
15181
15212
 
15182
- var __classPrivateFieldSet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
15213
+ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
15183
15214
  if (kind === "m") throw new TypeError("Private method is not writable");
15184
15215
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
15185
15216
  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");
15186
15217
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
15187
15218
  };
15188
- var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15219
+ var __classPrivateFieldGet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15189
15220
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
15190
15221
  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");
15191
15222
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15192
15223
  };
15193
15224
  var _SessionContextGroupClient_clientPromise;
15194
15225
  Object.defineProperty(SessionContextGroupClient$1, "__esModule", { value: true });
15195
- const base_1$4 = base;
15226
+ const base_1$5 = base;
15196
15227
  const utils_1$6 = utils$3;
15197
- class SessionContextGroupClient extends base_1$4.Base {
15228
+ class SessionContextGroupClient extends base_1$5.Base {
15198
15229
  constructor(wire, client, id) {
15199
15230
  super(wire);
15200
15231
  _SessionContextGroupClient_clientPromise.set(this, void 0);
15201
15232
  this.id = id;
15202
- __classPrivateFieldSet$3(this, _SessionContextGroupClient_clientPromise, client, "f");
15233
+ __classPrivateFieldSet$4(this, _SessionContextGroupClient_clientPromise, client, "f");
15203
15234
  }
15204
15235
  /**
15205
15236
  * Sets a context for the session context group.
@@ -15211,7 +15242,7 @@ class SessionContextGroupClient extends base_1$4.Base {
15211
15242
  this.wire.sendAction('interop-session-context-group-set-context').catch((e) => {
15212
15243
  // don't expose, analytics-only call
15213
15244
  });
15214
- const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
15245
+ const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
15215
15246
  return client.dispatch(`sessionContextGroup:setContext-${this.id}`, {
15216
15247
  sessionContextGroupId: this.id,
15217
15248
  context
@@ -15221,7 +15252,7 @@ class SessionContextGroupClient extends base_1$4.Base {
15221
15252
  this.wire.sendAction('interop-session-context-group-get-context').catch((e) => {
15222
15253
  // don't expose, analytics-only call
15223
15254
  });
15224
- const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
15255
+ const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
15225
15256
  return client.dispatch(`sessionContextGroup:getContext-${this.id}`, {
15226
15257
  sessionContextGroupId: this.id,
15227
15258
  type
@@ -15234,7 +15265,7 @@ class SessionContextGroupClient extends base_1$4.Base {
15234
15265
  if (typeof contextHandler !== 'function') {
15235
15266
  throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");
15236
15267
  }
15237
- const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
15268
+ const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
15238
15269
  let handlerId;
15239
15270
  if (contextType) {
15240
15271
  handlerId = `sessionContextHandler:invoke-${this.id}-${contextType}-${(0, utils_1$6.generateId)()}`;
@@ -15247,7 +15278,7 @@ class SessionContextGroupClient extends base_1$4.Base {
15247
15278
  return { unsubscribe: await this.createUnsubscribeCb(handlerId) };
15248
15279
  }
15249
15280
  async createUnsubscribeCb(handlerId) {
15250
- const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
15281
+ const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
15251
15282
  return async () => {
15252
15283
  client.remove(handlerId);
15253
15284
  await client.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`, { handlerId });
@@ -15265,13 +15296,13 @@ class SessionContextGroupClient extends base_1$4.Base {
15265
15296
  SessionContextGroupClient$1.default = SessionContextGroupClient;
15266
15297
  _SessionContextGroupClient_clientPromise = new WeakMap();
15267
15298
 
15268
- var __classPrivateFieldSet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
15299
+ var __classPrivateFieldSet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
15269
15300
  if (kind === "m") throw new TypeError("Private method is not writable");
15270
15301
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
15271
15302
  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");
15272
15303
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
15273
15304
  };
15274
- var __classPrivateFieldGet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15305
+ var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15275
15306
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
15276
15307
  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");
15277
15308
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -15282,7 +15313,7 @@ var __importDefault$3 = (commonjsGlobal && commonjsGlobal.__importDefault) || fu
15282
15313
  var _InteropClient_clientPromise, _InteropClient_sessionContextGroups, _InteropClient_fdc3Factory;
15283
15314
  Object.defineProperty(InteropClient$1, "__esModule", { value: true });
15284
15315
  InteropClient$1.InteropClient = void 0;
15285
- const base_1$3 = base;
15316
+ const base_1$4 = base;
15286
15317
  const SessionContextGroupClient_1 = __importDefault$3(SessionContextGroupClient$1);
15287
15318
  const utils_1$5 = utils$3;
15288
15319
  /**
@@ -15334,7 +15365,7 @@ const utils_1$5 = utils$3;
15334
15365
  * * {@link InteropClient#getAllClientsInContextGroup getAllClientsInContextGroup(contextGroupId)}
15335
15366
  *
15336
15367
  */
15337
- class InteropClient extends base_1$3.Base {
15368
+ class InteropClient extends base_1$4.Base {
15338
15369
  /**
15339
15370
  * @internal
15340
15371
  */
@@ -15343,9 +15374,9 @@ class InteropClient extends base_1$3.Base {
15343
15374
  _InteropClient_clientPromise.set(this, void 0);
15344
15375
  _InteropClient_sessionContextGroups.set(this, void 0);
15345
15376
  _InteropClient_fdc3Factory.set(this, void 0);
15346
- __classPrivateFieldSet$2(this, _InteropClient_sessionContextGroups, new Map(), "f");
15347
- __classPrivateFieldSet$2(this, _InteropClient_clientPromise, clientPromise, "f");
15348
- __classPrivateFieldSet$2(this, _InteropClient_fdc3Factory, fdc3Factory, "f");
15377
+ __classPrivateFieldSet$3(this, _InteropClient_sessionContextGroups, new Map(), "f");
15378
+ __classPrivateFieldSet$3(this, _InteropClient_clientPromise, clientPromise, "f");
15379
+ __classPrivateFieldSet$3(this, _InteropClient_fdc3Factory, fdc3Factory, "f");
15349
15380
  }
15350
15381
  /*
15351
15382
  Client APIs
@@ -15373,7 +15404,7 @@ class InteropClient extends base_1$3.Base {
15373
15404
  this.wire.sendAction('interop-client-set-context').catch((e) => {
15374
15405
  // don't expose, analytics-only call
15375
15406
  });
15376
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15407
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15377
15408
  return client.dispatch('setContext', { context });
15378
15409
  }
15379
15410
  /**
@@ -15440,7 +15471,7 @@ class InteropClient extends base_1$3.Base {
15440
15471
  if (typeof handler !== 'function') {
15441
15472
  throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");
15442
15473
  }
15443
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15474
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15444
15475
  let handlerId;
15445
15476
  if (contextType) {
15446
15477
  handlerId = `invokeContextHandler-${contextType}-${(0, utils_1$5.generateId)()}`;
@@ -15480,7 +15511,7 @@ class InteropClient extends base_1$3.Base {
15480
15511
  this.wire.sendAction('interop-client-get-context-groups').catch((e) => {
15481
15512
  // don't expose, analytics-only call
15482
15513
  });
15483
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15514
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15484
15515
  return client.dispatch('getContextGroups');
15485
15516
  }
15486
15517
  /**
@@ -15511,7 +15542,7 @@ class InteropClient extends base_1$3.Base {
15511
15542
  this.wire.sendAction('interop-client-join-context-group').catch((e) => {
15512
15543
  // don't expose, analytics-only call
15513
15544
  });
15514
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15545
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15515
15546
  if (!contextGroupId) {
15516
15547
  throw new Error('No contextGroupId specified for joinContextGroup.');
15517
15548
  }
@@ -15540,7 +15571,7 @@ class InteropClient extends base_1$3.Base {
15540
15571
  this.wire.sendAction('interop-client-remove-from-context-group').catch((e) => {
15541
15572
  // don't expose, analytics-only call
15542
15573
  });
15543
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15574
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15544
15575
  return client.dispatch('removeFromContextGroup', { target });
15545
15576
  }
15546
15577
  /**
@@ -15563,7 +15594,7 @@ class InteropClient extends base_1$3.Base {
15563
15594
  this.wire.sendAction('interop-client-get-all-clients-in-context-group').catch((e) => {
15564
15595
  // don't expose, analytics-only call
15565
15596
  });
15566
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15597
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15567
15598
  if (!contextGroupId) {
15568
15599
  throw new Error('No contextGroupId specified for getAllClientsInContextGroup.');
15569
15600
  }
@@ -15588,7 +15619,7 @@ class InteropClient extends base_1$3.Base {
15588
15619
  this.wire.sendAction('interop-client-get-info-for-context-group').catch((e) => {
15589
15620
  // don't expose, analytics-only call
15590
15621
  });
15591
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15622
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15592
15623
  if (!contextGroupId) {
15593
15624
  throw new Error('No contextGroupId specified for getInfoForContextGroup.');
15594
15625
  }
@@ -15616,7 +15647,7 @@ class InteropClient extends base_1$3.Base {
15616
15647
  this.wire.sendAction('interop-client-fire-intent').catch((e) => {
15617
15648
  // don't expose, this is only for api analytics purposes
15618
15649
  });
15619
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15650
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15620
15651
  return client.dispatch('fireIntent', intent);
15621
15652
  }
15622
15653
  /**
@@ -15643,7 +15674,7 @@ class InteropClient extends base_1$3.Base {
15643
15674
  this.wire.sendAction('interop-client-register-intent-handler').catch((e) => {
15644
15675
  // don't expose, this is only for api analytics purposes
15645
15676
  });
15646
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15677
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15647
15678
  const handlerId = `intent-handler-${intentName}`;
15648
15679
  const wrappedHandler = (0, utils_1$5.wrapIntentHandler)(handler, handlerId);
15649
15680
  try {
@@ -15681,7 +15712,7 @@ class InteropClient extends base_1$3.Base {
15681
15712
  this.wire.sendAction('interop-client-get-current-context').catch((e) => {
15682
15713
  // don't expose, analytics-only call
15683
15714
  });
15684
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15715
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15685
15716
  return client.dispatch('getCurrentContext', { contextType });
15686
15717
  }
15687
15718
  /**
@@ -15701,7 +15732,7 @@ class InteropClient extends base_1$3.Base {
15701
15732
  this.wire.sendAction('interop-client-get-info-for-intent').catch((e) => {
15702
15733
  // don't expose, analytics-only call
15703
15734
  });
15704
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15735
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15705
15736
  return client.dispatch('getInfoForIntent', options);
15706
15737
  }
15707
15738
  /**
@@ -15732,7 +15763,7 @@ class InteropClient extends base_1$3.Base {
15732
15763
  this.wire.sendAction('interop-client-get-info-for-intents-by-context').catch((e) => {
15733
15764
  // don't expose, analytics-only call
15734
15765
  });
15735
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15766
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15736
15767
  return client.dispatch('getInfoForIntentsByContext', context);
15737
15768
  }
15738
15769
  /**
@@ -15764,7 +15795,7 @@ class InteropClient extends base_1$3.Base {
15764
15795
  this.wire.sendAction('interop-client-fire-intent-for-context').catch((e) => {
15765
15796
  // don't expose, analytics-only call
15766
15797
  });
15767
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15798
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15768
15799
  return client.dispatch('fireIntentForContext', context);
15769
15800
  }
15770
15801
  /**
@@ -15801,19 +15832,19 @@ class InteropClient extends base_1$3.Base {
15801
15832
  */
15802
15833
  async joinSessionContextGroup(sessionContextGroupId) {
15803
15834
  try {
15804
- const currentSessionContextGroup = __classPrivateFieldGet$2(this, _InteropClient_sessionContextGroups, "f").get(sessionContextGroupId);
15835
+ const currentSessionContextGroup = __classPrivateFieldGet$3(this, _InteropClient_sessionContextGroups, "f").get(sessionContextGroupId);
15805
15836
  if (currentSessionContextGroup) {
15806
15837
  return currentSessionContextGroup.getUserInstance();
15807
15838
  }
15808
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15839
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15809
15840
  const { hasConflict } = await client.dispatch('sessionContextGroup:createIfNeeded', {
15810
15841
  sessionContextGroupId
15811
15842
  });
15812
15843
  if (hasConflict) {
15813
15844
  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.`);
15814
15845
  }
15815
- const newSessionContextGroup = new SessionContextGroupClient_1.default(this.wire, __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
15816
- __classPrivateFieldGet$2(this, _InteropClient_sessionContextGroups, "f").set(sessionContextGroupId, newSessionContextGroup);
15846
+ const newSessionContextGroup = new SessionContextGroupClient_1.default(this.wire, __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
15847
+ __classPrivateFieldGet$3(this, _InteropClient_sessionContextGroups, "f").set(sessionContextGroupId, newSessionContextGroup);
15817
15848
  return newSessionContextGroup.getUserInstance();
15818
15849
  }
15819
15850
  catch (error) {
@@ -15840,14 +15871,14 @@ class InteropClient extends base_1$3.Base {
15840
15871
  this.wire.sendAction('interop-client-add-ondisconnection-listener').catch((e) => {
15841
15872
  // don't expose, analytics-only call
15842
15873
  });
15843
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15874
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15844
15875
  return client.onDisconnection((event) => {
15845
15876
  const { uuid } = event;
15846
15877
  listener({ type: 'interop-broker', topic: 'disconnected', brokerName: uuid });
15847
15878
  });
15848
15879
  }
15849
15880
  getFDC3Sync(version) {
15850
- return __classPrivateFieldGet$2(this, _InteropClient_fdc3Factory, "f").call(this, version, this, this.wire);
15881
+ return __classPrivateFieldGet$3(this, _InteropClient_fdc3Factory, "f").call(this, version, this, this.wire);
15851
15882
  }
15852
15883
  async getFDC3(version) {
15853
15884
  return this.getFDC3Sync(version);
@@ -15858,7 +15889,7 @@ class InteropClient extends base_1$3.Base {
15858
15889
  * Used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
15859
15890
  */
15860
15891
  static async ferryFdc3Call(interopClient, action, payload) {
15861
- const client = await __classPrivateFieldGet$2(interopClient, _InteropClient_clientPromise, "f");
15892
+ const client = await __classPrivateFieldGet$3(interopClient, _InteropClient_clientPromise, "f");
15862
15893
  return client.dispatch(action, payload || null);
15863
15894
  }
15864
15895
  }
@@ -16236,12 +16267,12 @@ PrivateChannelClient$1.PrivateChannelClient = PrivateChannelClient;
16236
16267
  exports.getIntentResolution = getIntentResolution;
16237
16268
  } (utils$2));
16238
16269
 
16239
- var __classPrivateFieldGet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16270
+ var __classPrivateFieldGet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16240
16271
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
16241
16272
  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");
16242
16273
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
16243
16274
  };
16244
- var __classPrivateFieldSet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16275
+ var __classPrivateFieldSet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16245
16276
  if (kind === "m") throw new TypeError("Private method is not writable");
16246
16277
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
16247
16278
  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");
@@ -16259,7 +16290,7 @@ const InteropClient_1$2 = InteropClient$1;
16259
16290
  const isEqual_1 = __importDefault$2(require$$3);
16260
16291
  class FDC3ModuleBase {
16261
16292
  get client() {
16262
- return __classPrivateFieldGet$1(this, _FDC3ModuleBase_producer, "f").call(this);
16293
+ return __classPrivateFieldGet$2(this, _FDC3ModuleBase_producer, "f").call(this);
16263
16294
  }
16264
16295
  get fin() {
16265
16296
  return this.wire.getFin();
@@ -16268,7 +16299,7 @@ class FDC3ModuleBase {
16268
16299
  constructor(producer, wire) {
16269
16300
  this.wire = wire;
16270
16301
  _FDC3ModuleBase_producer.set(this, void 0);
16271
- __classPrivateFieldSet$1(this, _FDC3ModuleBase_producer, producer, "f");
16302
+ __classPrivateFieldSet$2(this, _FDC3ModuleBase_producer, producer, "f");
16272
16303
  }
16273
16304
  /**
16274
16305
  * Broadcasts a context for the channel of the current entity.
@@ -17049,7 +17080,7 @@ Object.defineProperty(Factory$1, "__esModule", { value: true });
17049
17080
  Factory$1.InteropModule = void 0;
17050
17081
  const cloneDeep_1 = __importDefault$1(require$$0$1);
17051
17082
  const inaccessibleObject_1 = inaccessibleObject;
17052
- const base_1$2 = base;
17083
+ const base_1$3 = base;
17053
17084
  const InteropBroker_1 = InteropBroker$1;
17054
17085
  const InteropClient_1 = InteropClient$1;
17055
17086
  const overrideCheck_1 = overrideCheck$1;
@@ -17061,7 +17092,7 @@ const BrokerParamAccessError = 'You have attempted to use or modify InteropBroke
17061
17092
  * Manages creation of Interop Brokers and Interop Clients. These APIs are called under-the-hood in Platforms.
17062
17093
  *
17063
17094
  */
17064
- class InteropModule extends base_1$2.Base {
17095
+ class InteropModule extends base_1$3.Base {
17065
17096
  /**
17066
17097
  * Initializes an Interop Broker. This is called under-the-hood for Platforms.
17067
17098
  *
@@ -17185,13 +17216,13 @@ const channelPrefix = 'snapshot-source-provider-';
17185
17216
  const getSnapshotSourceChannelName = (id) => `${channelPrefix}${id.uuid}`;
17186
17217
  utils.getSnapshotSourceChannelName = getSnapshotSourceChannelName;
17187
17218
 
17188
- var __classPrivateFieldSet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
17219
+ var __classPrivateFieldSet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
17189
17220
  if (kind === "m") throw new TypeError("Private method is not writable");
17190
17221
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
17191
17222
  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");
17192
17223
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
17193
17224
  };
17194
- var __classPrivateFieldGet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17225
+ var __classPrivateFieldGet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17195
17226
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
17196
17227
  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");
17197
17228
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -17200,7 +17231,7 @@ var _SnapshotSource_identity, _SnapshotSource_getConnection, _SnapshotSource_get
17200
17231
  Object.defineProperty(Instance, "__esModule", { value: true });
17201
17232
  Instance.SnapshotSource = void 0;
17202
17233
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
17203
- const base_1$1 = base;
17234
+ const base_1$2 = base;
17204
17235
  const utils_1$1 = utils;
17205
17236
  const connectionMap = new Map();
17206
17237
  /**
@@ -17209,7 +17240,7 @@ const connectionMap = new Map();
17209
17240
  * @typeParam Snapshot Implementation-defined shape of an application snapshot. Allows
17210
17241
  * custom snapshot implementations for legacy applications to define their own snapshot format.
17211
17242
  */
17212
- class SnapshotSource extends base_1$1.Base {
17243
+ class SnapshotSource extends base_1$2.Base {
17213
17244
  /**
17214
17245
  * @internal
17215
17246
  */
@@ -17223,26 +17254,26 @@ class SnapshotSource extends base_1$1.Base {
17223
17254
  return connectionMap.get(this.identity.uuid);
17224
17255
  });
17225
17256
  _SnapshotSource_getClient.set(this, () => {
17226
- if (!__classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise) {
17227
- __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = __classPrivateFieldGet(this, _SnapshotSource_startConnection, "f").call(this);
17257
+ if (!__classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise) {
17258
+ __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = __classPrivateFieldGet$1(this, _SnapshotSource_startConnection, "f").call(this);
17228
17259
  }
17229
- return __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise;
17260
+ return __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise;
17230
17261
  });
17231
17262
  _SnapshotSource_startConnection.set(this, async () => {
17232
17263
  const channelName = (0, utils_1$1.getSnapshotSourceChannelName)(this.identity);
17233
17264
  try {
17234
- if (!__classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).eventFired) {
17235
- await __classPrivateFieldGet(this, _SnapshotSource_setUpConnectionListener, "f").call(this);
17265
+ if (!__classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired) {
17266
+ await __classPrivateFieldGet$1(this, _SnapshotSource_setUpConnectionListener, "f").call(this);
17236
17267
  }
17237
17268
  const client = await this.fin.InterApplicationBus.Channel.connect(channelName, { wait: false });
17238
17269
  client.onDisconnection(() => {
17239
- __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
17240
- __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).eventFired = null;
17270
+ __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
17271
+ __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired = null;
17241
17272
  });
17242
17273
  return client;
17243
17274
  }
17244
17275
  catch (e) {
17245
- __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
17276
+ __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
17246
17277
  throw new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.");
17247
17278
  }
17248
17279
  });
@@ -17254,7 +17285,7 @@ class SnapshotSource extends base_1$1.Base {
17254
17285
  resolve = y;
17255
17286
  reject = n;
17256
17287
  });
17257
- __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).eventFired = eventFired;
17288
+ __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired = eventFired;
17258
17289
  const listener = async (e) => {
17259
17290
  try {
17260
17291
  if (e.channelName === channelName) {
@@ -17268,10 +17299,10 @@ class SnapshotSource extends base_1$1.Base {
17268
17299
  };
17269
17300
  await this.fin.InterApplicationBus.Channel.on('connected', listener);
17270
17301
  });
17271
- __classPrivateFieldSet(this, _SnapshotSource_identity, id, "f");
17302
+ __classPrivateFieldSet$1(this, _SnapshotSource_identity, id, "f");
17272
17303
  }
17273
17304
  get identity() {
17274
- return __classPrivateFieldGet(this, _SnapshotSource_identity, "f");
17305
+ return __classPrivateFieldGet$1(this, _SnapshotSource_identity, "f");
17275
17306
  }
17276
17307
  /**
17277
17308
  * Method to determine if the SnapshotSource has been initialized.
@@ -17307,11 +17338,11 @@ class SnapshotSource extends base_1$1.Base {
17307
17338
  // eslint-disable-next-line no-async-promise-executor
17308
17339
  try {
17309
17340
  // 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?
17310
- await __classPrivateFieldGet(this, _SnapshotSource_getClient, "f").call(this);
17341
+ await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
17311
17342
  }
17312
17343
  catch (e) {
17313
17344
  // it was not running.
17314
- await __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).eventFired;
17345
+ await __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired;
17315
17346
  }
17316
17347
  }
17317
17348
  /**
@@ -17322,7 +17353,7 @@ class SnapshotSource extends base_1$1.Base {
17322
17353
  this.wire.sendAction('snapshot-source-get-snapshot').catch((e) => {
17323
17354
  // don't expose, analytics-only call
17324
17355
  });
17325
- const client = await __classPrivateFieldGet(this, _SnapshotSource_getClient, "f").call(this);
17356
+ const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
17326
17357
  const response = (await client.dispatch('get-snapshot'));
17327
17358
  return (await response).snapshot;
17328
17359
  }
@@ -17334,7 +17365,7 @@ class SnapshotSource extends base_1$1.Base {
17334
17365
  this.wire.sendAction('snapshot-source-apply-snapshot').catch((e) => {
17335
17366
  // don't expose, analytics-only call
17336
17367
  });
17337
- const client = await __classPrivateFieldGet(this, _SnapshotSource_getClient, "f").call(this);
17368
+ const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
17338
17369
  return client.dispatch('apply-snapshot', { snapshot });
17339
17370
  }
17340
17371
  }
@@ -17343,13 +17374,13 @@ _SnapshotSource_identity = new WeakMap(), _SnapshotSource_getConnection = new We
17343
17374
 
17344
17375
  Object.defineProperty(Factory, "__esModule", { value: true });
17345
17376
  Factory.SnapshotSourceModule = void 0;
17346
- const base_1 = base;
17377
+ const base_1$1 = base;
17347
17378
  const Instance_1 = Instance;
17348
17379
  const utils_1 = utils;
17349
17380
  /**
17350
17381
  * Static namespace for OpenFin API methods that interact with the {@link SnapshotSource} class, available under `fin.SnapshotSource`.
17351
17382
  */
17352
- class SnapshotSourceModule extends base_1.Base {
17383
+ class SnapshotSourceModule extends base_1$1.Base {
17353
17384
  /**
17354
17385
  * Initializes a SnapshotSource with the getSnapshot and applySnapshot methods defined.
17355
17386
  *
@@ -17455,6 +17486,114 @@ Factory.SnapshotSourceModule = SnapshotSourceModule;
17455
17486
  __exportStar(Instance, exports);
17456
17487
  } (snapshotSource));
17457
17488
 
17489
+ var notificationManager = {};
17490
+
17491
+ var factory = {};
17492
+
17493
+ var instance = {};
17494
+
17495
+ var __classPrivateFieldSet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
17496
+ if (kind === "m") throw new TypeError("Private method is not writable");
17497
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
17498
+ 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");
17499
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
17500
+ };
17501
+ var __classPrivateFieldGet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17502
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
17503
+ 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");
17504
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
17505
+ };
17506
+ var _NotificationManagerInstance_wire, _NotificationManagerInstance_handler, _NotificationManagerInstance_id, _NotificationManagerInstance_isReceivingNotifications;
17507
+ Object.defineProperty(instance, "__esModule", { value: true });
17508
+ instance.NotificationManagerInstance = void 0;
17509
+ const lazy_1 = lazy;
17510
+ class NotificationManagerInstance {
17511
+ constructor(wire, id) {
17512
+ _NotificationManagerInstance_wire.set(this, void 0);
17513
+ _NotificationManagerInstance_handler.set(this, void 0);
17514
+ _NotificationManagerInstance_id.set(this, void 0);
17515
+ _NotificationManagerInstance_isReceivingNotifications.set(this, new lazy_1.Lazy(async () => {
17516
+ await __classPrivateFieldGet(this, _NotificationManagerInstance_wire, "f").registerMessageHandler((message) => {
17517
+ if (message.action === 'notification-created' && message.payload.managerId === __classPrivateFieldGet(this, _NotificationManagerInstance_id, "f")) {
17518
+ const { notificationId, properties, documentUrl: url, notificationIcon: icon, badge, image } = message.payload;
17519
+ try {
17520
+ __classPrivateFieldGet(this, _NotificationManagerInstance_handler, "f")?.call(this, {
17521
+ properties,
17522
+ images: {
17523
+ image,
17524
+ icon,
17525
+ badge
17526
+ },
17527
+ url,
17528
+ notificationId
17529
+ });
17530
+ }
17531
+ catch (error) {
17532
+ console.error('Failed to handle notification', error);
17533
+ }
17534
+ return true;
17535
+ }
17536
+ return false;
17537
+ });
17538
+ return true;
17539
+ }));
17540
+ this.setNotificationHandler = async (handler) => {
17541
+ await __classPrivateFieldGet(this, _NotificationManagerInstance_isReceivingNotifications, "f").getValue();
17542
+ __classPrivateFieldSet(this, _NotificationManagerInstance_handler, handler, "f");
17543
+ };
17544
+ this.destroy = async () => {
17545
+ await __classPrivateFieldGet(this, _NotificationManagerInstance_wire, "f").sendAction('destroy-notification-manager', { managerId: __classPrivateFieldGet(this, _NotificationManagerInstance_id, "f") });
17546
+ };
17547
+ this.dispatch = async (event) => {
17548
+ const { notificationId, type } = event;
17549
+ await __classPrivateFieldGet(this, _NotificationManagerInstance_wire, "f").sendAction('dispatch-notification-event', {
17550
+ notificationId,
17551
+ type
17552
+ });
17553
+ };
17554
+ __classPrivateFieldSet(this, _NotificationManagerInstance_wire, wire, "f");
17555
+ __classPrivateFieldSet(this, _NotificationManagerInstance_id, id, "f");
17556
+ }
17557
+ }
17558
+ instance.NotificationManagerInstance = NotificationManagerInstance;
17559
+ _NotificationManagerInstance_wire = new WeakMap(), _NotificationManagerInstance_handler = new WeakMap(), _NotificationManagerInstance_id = new WeakMap(), _NotificationManagerInstance_isReceivingNotifications = new WeakMap();
17560
+
17561
+ Object.defineProperty(factory, "__esModule", { value: true });
17562
+ factory.NotificationManagerModule = void 0;
17563
+ const base_1 = base;
17564
+ const instance_1 = instance;
17565
+ class NotificationManagerModule extends base_1.Base {
17566
+ constructor() {
17567
+ super(...arguments);
17568
+ this.init = async () => {
17569
+ const { payload: { data: { managerId } } } = await this.wire.sendAction('init-notification-manager');
17570
+ const manager = new instance_1.NotificationManagerInstance(this.wire, managerId);
17571
+ return manager;
17572
+ };
17573
+ }
17574
+ }
17575
+ factory.NotificationManagerModule = NotificationManagerModule;
17576
+
17577
+ (function (exports) {
17578
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
17579
+ if (k2 === undefined) k2 = k;
17580
+ var desc = Object.getOwnPropertyDescriptor(m, k);
17581
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17582
+ desc = { enumerable: true, get: function() { return m[k]; } };
17583
+ }
17584
+ Object.defineProperty(o, k2, desc);
17585
+ }) : (function(o, m, k, k2) {
17586
+ if (k2 === undefined) k2 = k;
17587
+ o[k2] = m[k];
17588
+ }));
17589
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
17590
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17591
+ };
17592
+ Object.defineProperty(exports, "__esModule", { value: true });
17593
+ __exportStar(factory, exports);
17594
+ __exportStar(instance, exports);
17595
+ } (notificationManager));
17596
+
17458
17597
  Object.defineProperty(fin$1, "__esModule", { value: true });
17459
17598
  var Fin_1 = fin$1.Fin = void 0;
17460
17599
  const events_1 = require$$0;
@@ -17472,6 +17611,7 @@ const index_10 = platform;
17472
17611
  const me_1 = me;
17473
17612
  const interop_1 = interop;
17474
17613
  const snapshot_source_1 = snapshotSource;
17614
+ const notification_manager_1 = notificationManager;
17475
17615
  /**
17476
17616
  * @internal
17477
17617
  */
@@ -17494,6 +17634,7 @@ class Fin extends events_1.EventEmitter {
17494
17634
  this.View = new index_9.ViewModule(wire);
17495
17635
  this.Interop = new interop_1.InteropModule(wire);
17496
17636
  this.SnapshotSource = new snapshot_source_1.SnapshotSourceModule(wire);
17637
+ this.NotificationManager = new notification_manager_1.NotificationManagerModule(wire);
17497
17638
  wire.registerFin(this);
17498
17639
  this.me = (0, me_1.getMe)(wire);
17499
17640
  // Handle disconnect events