@openfin/remote-adapter 42.100.90 → 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 +426 -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
  *
@@ -6082,6 +6113,9 @@ function requireInstance$1 () {
6082
6113
  * ```
6083
6114
  */
6084
6115
  updateOptions(options) {
6116
+ if ('frame' in options) {
6117
+ console.warn(`Deprecation Warning: Starting with version 45 it will not be possible to change the frame value after window has been created.`);
6118
+ }
6085
6119
  return this.wire.sendAction('update-window-options', { options, ...this.identity }).then(() => undefined);
6086
6120
  }
6087
6121
  /**
@@ -7075,7 +7109,7 @@ var Instance$4 = {};
7075
7109
  Object.defineProperty(Instance$4, "__esModule", { value: true });
7076
7110
  Instance$4._Frame = void 0;
7077
7111
  /* eslint-disable import/prefer-default-export */
7078
- const base_1$k = base;
7112
+ const base_1$l = base;
7079
7113
  /**
7080
7114
  * An iframe represents an embedded HTML page within a parent HTML page. Because this embedded page
7081
7115
  * has its own DOM and global JS context (which may or may not be linked to that of the parent depending
@@ -7096,7 +7130,7 @@ const base_1$k = base;
7096
7130
  * The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
7097
7131
  * (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
7098
7132
  */
7099
- class _Frame extends base_1$k.EmitterBase {
7133
+ class _Frame extends base_1$l.EmitterBase {
7100
7134
  /**
7101
7135
  * @internal
7102
7136
  */
@@ -7142,13 +7176,13 @@ Instance$4._Frame = _Frame;
7142
7176
 
7143
7177
  Object.defineProperty(Factory$5, "__esModule", { value: true });
7144
7178
  Factory$5._FrameModule = void 0;
7145
- const base_1$j = base;
7179
+ const base_1$k = base;
7146
7180
  const validate_1$3 = validate;
7147
7181
  const Instance_1$4 = Instance$4;
7148
7182
  /**
7149
7183
  * Static namespace for OpenFin API methods that interact with the {@link _Frame} class, available under `fin.Frame`.
7150
7184
  */
7151
- class _FrameModule extends base_1$j.Base {
7185
+ class _FrameModule extends base_1$k.Base {
7152
7186
  /**
7153
7187
  * Asynchronously returns an API handle for the given Frame identity.
7154
7188
  *
@@ -7274,7 +7308,7 @@ var Instance$3 = {};
7274
7308
  Object.defineProperty(Instance$3, "__esModule", { value: true });
7275
7309
  Instance$3.ExternalApplication = void 0;
7276
7310
  /* eslint-disable import/prefer-default-export */
7277
- const base_1$i = base;
7311
+ const base_1$j = base;
7278
7312
  /**
7279
7313
  * An ExternalApplication object representing native language adapter connections to the runtime. Allows
7280
7314
  * the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
@@ -7285,7 +7319,7 @@ const base_1$i = base;
7285
7319
  * - Processes started via `System.launchExternalApplication`
7286
7320
  * - Processes monitored via `System.monitorExternalProcess`
7287
7321
  */
7288
- class ExternalApplication extends base_1$i.EmitterBase {
7322
+ class ExternalApplication extends base_1$j.EmitterBase {
7289
7323
  /**
7290
7324
  * @internal
7291
7325
  */
@@ -7313,12 +7347,12 @@ Instance$3.ExternalApplication = ExternalApplication;
7313
7347
 
7314
7348
  Object.defineProperty(Factory$4, "__esModule", { value: true });
7315
7349
  Factory$4.ExternalApplicationModule = void 0;
7316
- const base_1$h = base;
7350
+ const base_1$i = base;
7317
7351
  const Instance_1$3 = Instance$3;
7318
7352
  /**
7319
7353
  * Static namespace for OpenFin API methods that interact with the {@link ExternalApplication} class, available under `fin.ExternalApplication`.
7320
7354
  */
7321
- class ExternalApplicationModule extends base_1$h.Base {
7355
+ class ExternalApplicationModule extends base_1$i.Base {
7322
7356
  /**
7323
7357
  * Asynchronously returns an External Application object that represents an external application.
7324
7358
  * <br>It is possible to wrap a process that does not yet exist, (for example, to listen for startup-related events)
@@ -7546,13 +7580,13 @@ function errorToPOJO(error) {
7546
7580
  }
7547
7581
  errors.errorToPOJO = errorToPOJO;
7548
7582
 
7549
- 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) {
7550
7584
  if (kind === "m") throw new TypeError("Private method is not writable");
7551
7585
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
7552
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");
7553
7587
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7554
7588
  };
7555
- var __classPrivateFieldGet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7589
+ var __classPrivateFieldGet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7556
7590
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
7557
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");
7558
7592
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -7580,19 +7614,19 @@ class Transport extends events_1$5.EventEmitter {
7580
7614
  // Typing as unknown to avoid circular dependency, should not be used directly.
7581
7615
  _Transport_fin.set(this, void 0);
7582
7616
  this.connectSync = () => {
7583
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7617
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7584
7618
  wire.connectSync();
7585
7619
  };
7586
7620
  // This function is only used in our tests.
7587
7621
  this.getPort = () => {
7588
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7622
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7589
7623
  return wire.getPort();
7590
7624
  };
7591
- __classPrivateFieldSet$e(this, _Transport_wire, factory(this.onmessage.bind(this)), "f");
7625
+ __classPrivateFieldSet$f(this, _Transport_wire, factory(this.onmessage.bind(this)), "f");
7592
7626
  this.environment = environment;
7593
- 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"));
7594
7628
  this.registerMessageHandler(this.handleMessage.bind(this));
7595
- __classPrivateFieldGet$f(this, _Transport_wire, "f").on('disconnected', () => {
7629
+ __classPrivateFieldGet$g(this, _Transport_wire, "f").on('disconnected', () => {
7596
7630
  for (const [, { handleNack }] of this.wireListeners) {
7597
7631
  handleNack({ reason: 'Remote connection has closed' });
7598
7632
  }
@@ -7604,24 +7638,24 @@ class Transport extends events_1$5.EventEmitter {
7604
7638
  this.me = (0, me_1$1.getBaseMe)(entityType, uuid, name);
7605
7639
  }
7606
7640
  getFin() {
7607
- if (!__classPrivateFieldGet$f(this, _Transport_fin, "f")) {
7641
+ if (!__classPrivateFieldGet$g(this, _Transport_fin, "f")) {
7608
7642
  throw new Error('No Fin object registered for this transport');
7609
7643
  }
7610
- return __classPrivateFieldGet$f(this, _Transport_fin, "f");
7644
+ return __classPrivateFieldGet$g(this, _Transport_fin, "f");
7611
7645
  }
7612
7646
  registerFin(_fin) {
7613
- if (__classPrivateFieldGet$f(this, _Transport_fin, "f")) {
7647
+ if (__classPrivateFieldGet$g(this, _Transport_fin, "f")) {
7614
7648
  throw new Error('Fin object has already been registered for this transport');
7615
7649
  }
7616
- __classPrivateFieldSet$e(this, _Transport_fin, _fin, "f");
7650
+ __classPrivateFieldSet$f(this, _Transport_fin, _fin, "f");
7617
7651
  }
7618
7652
  shutdown() {
7619
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7653
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7620
7654
  return wire.shutdown();
7621
7655
  }
7622
7656
  async connect(config) {
7623
7657
  if ((0, wire_1.isConfigWithReceiver)(config)) {
7624
- await __classPrivateFieldGet$f(this, _Transport_wire, "f").connect(config.receiver);
7658
+ await __classPrivateFieldGet$g(this, _Transport_wire, "f").connect(config.receiver);
7625
7659
  return this.authorize(config);
7626
7660
  }
7627
7661
  if ((0, wire_1.isRemoteConfig)(config)) {
@@ -7637,13 +7671,13 @@ class Transport extends events_1$5.EventEmitter {
7637
7671
  return undefined;
7638
7672
  }
7639
7673
  async connectRemote(config) {
7640
- 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));
7641
7675
  return this.authorize(config);
7642
7676
  }
7643
7677
  async connectByPort(config) {
7644
7678
  const { address, uuid } = config;
7645
7679
  const reqAuthPayload = { ...config, type: 'file-token' };
7646
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7680
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7647
7681
  await wire.connect(new (this.environment.getWsConstructor())(config.address));
7648
7682
  const requestExtAuthRet = await this.sendAction('request-external-authorization', {
7649
7683
  uuid,
@@ -7679,7 +7713,7 @@ class Transport extends events_1$5.EventEmitter {
7679
7713
  payload,
7680
7714
  messageId
7681
7715
  };
7682
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7716
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7683
7717
  this.addWireListener(messageId, resolve, (payload) => this.nackHandler(payload, reject, callSites), uncorrelated);
7684
7718
  return wire.send(msg).catch(reject);
7685
7719
  });
@@ -7701,7 +7735,7 @@ class Transport extends events_1$5.EventEmitter {
7701
7735
  const resolver = (data) => {
7702
7736
  resolve(data.payload);
7703
7737
  };
7704
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7738
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7705
7739
  return wire
7706
7740
  .send(origData)
7707
7741
  .then(() => this.addWireListener(id, resolver, (payload) => this.nackHandler(payload, reject), false))
@@ -7857,7 +7891,7 @@ var system = {};
7857
7891
  */
7858
7892
  Object.defineProperty(system, "__esModule", { value: true });
7859
7893
  system.System = void 0;
7860
- const base_1$g = base;
7894
+ const base_1$h = base;
7861
7895
  const transport_errors_1$4 = transportErrors;
7862
7896
  const window_1 = requireWindow();
7863
7897
  const events_1$3 = require$$0;
@@ -7867,7 +7901,7 @@ const events_1$3 = require$$0;
7867
7901
  * clearing the cache and exiting the runtime as well as listen to {@link OpenFin.SystemEvents system events}.
7868
7902
  *
7869
7903
  */
7870
- class System extends base_1$g.EmitterBase {
7904
+ class System extends base_1$h.EmitterBase {
7871
7905
  /**
7872
7906
  * @internal
7873
7907
  */
@@ -10178,12 +10212,12 @@ class ChannelError extends Error {
10178
10212
  }
10179
10213
  channelError.ChannelError = ChannelError;
10180
10214
 
10181
- var __classPrivateFieldGet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10215
+ var __classPrivateFieldGet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10182
10216
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10183
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");
10184
10218
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10185
10219
  };
10186
- 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) {
10187
10221
  if (kind === "m") throw new TypeError("Private method is not writable");
10188
10222
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10189
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");
@@ -10227,7 +10261,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
10227
10261
  static closeChannelByEndpointId(id) {
10228
10262
  const channel = channelClientsByEndpointId.get(id);
10229
10263
  if (channel) {
10230
- __classPrivateFieldGet$e(channel, _ChannelClient_close, "f").call(channel);
10264
+ __classPrivateFieldGet$f(channel, _ChannelClient_close, "f").call(channel);
10231
10265
  }
10232
10266
  }
10233
10267
  /**
@@ -10238,7 +10272,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
10238
10272
  for (const channelClient of channelClientsByEndpointId.values()) {
10239
10273
  if (channelClient.providerIdentity.channelId === eventPayload.channelId) {
10240
10274
  channelClient.disconnectListener(eventPayload);
10241
- __classPrivateFieldGet$e(channelClient, _ChannelClient_close, "f").call(channelClient);
10275
+ __classPrivateFieldGet$f(channelClient, _ChannelClient_close, "f").call(channelClient);
10242
10276
  }
10243
10277
  }
10244
10278
  }
@@ -10253,12 +10287,12 @@ class ChannelClient extends channel_1$1.ChannelBase {
10253
10287
  this.processAction = (action, payload, senderIdentity) => super.processAction(action, payload, senderIdentity);
10254
10288
  _ChannelClient_close.set(this, () => {
10255
10289
  channelClientsByEndpointId.delete(this.endpointId);
10256
- __classPrivateFieldGet$e(this, _ChannelClient_strategy, "f").close();
10290
+ __classPrivateFieldGet$f(this, _ChannelClient_strategy, "f").close();
10257
10291
  });
10258
- __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");
10259
10293
  this.disconnectListener = () => undefined;
10260
10294
  this.endpointId = routingInfo.endpointId;
10261
- __classPrivateFieldSet$d(this, _ChannelClient_strategy, strategy, "f");
10295
+ __classPrivateFieldSet$e(this, _ChannelClient_strategy, strategy, "f");
10262
10296
  channelClientsByEndpointId.set(this.endpointId, this);
10263
10297
  strategy.receive(this.processAction);
10264
10298
  }
@@ -10266,7 +10300,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
10266
10300
  * a read-only provider identity
10267
10301
  */
10268
10302
  get providerIdentity() {
10269
- const protectedObj = __classPrivateFieldGet$e(this, _ChannelClient_protectedObj, "f");
10303
+ const protectedObj = __classPrivateFieldGet$f(this, _ChannelClient_protectedObj, "f");
10270
10304
  return protectedObj.providerIdentity;
10271
10305
  }
10272
10306
  /**
@@ -10295,9 +10329,9 @@ class ChannelClient extends channel_1$1.ChannelBase {
10295
10329
  * ```
10296
10330
  */
10297
10331
  async dispatch(action, payload) {
10298
- if (__classPrivateFieldGet$e(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
10332
+ if (__classPrivateFieldGet$f(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
10299
10333
  const callSites = transport_errors_1$1.RuntimeError.getCallSite();
10300
- 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) => {
10301
10335
  throw new channel_error_1$1.ChannelError(e, action, payload, callSites);
10302
10336
  });
10303
10337
  }
@@ -10349,10 +10383,10 @@ class ChannelClient extends channel_1$1.ChannelBase {
10349
10383
  */
10350
10384
  async disconnect() {
10351
10385
  await this.sendDisconnectAction();
10352
- __classPrivateFieldGet$e(this, _ChannelClient_close, "f").call(this);
10386
+ __classPrivateFieldGet$f(this, _ChannelClient_close, "f").call(this);
10353
10387
  }
10354
10388
  async sendDisconnectAction() {
10355
- const protectedObj = __classPrivateFieldGet$e(this, _ChannelClient_protectedObj, "f");
10389
+ const protectedObj = __classPrivateFieldGet$f(this, _ChannelClient_protectedObj, "f");
10356
10390
  await protectedObj.close();
10357
10391
  }
10358
10392
  /**
@@ -10385,13 +10419,13 @@ exhaustive.exhaustiveCheck = exhaustiveCheck;
10385
10419
 
10386
10420
  var strategy$3 = {};
10387
10421
 
10388
- 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) {
10389
10423
  if (kind === "m") throw new TypeError("Private method is not writable");
10390
10424
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10391
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");
10392
10426
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
10393
10427
  };
10394
- var __classPrivateFieldGet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10428
+ var __classPrivateFieldGet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10395
10429
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10396
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");
10397
10431
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -10416,7 +10450,7 @@ class ClassicStrategy {
10416
10450
  // connection problems occur
10417
10451
  _ClassicStrategy_pendingMessagesByEndpointId.set(this, new Map());
10418
10452
  this.send = async (endpointId, action, payload) => {
10419
- const to = __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10453
+ const to = __classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10420
10454
  if (!to) {
10421
10455
  throw new Error(`Could not locate routing info for endpoint ${endpointId}`);
10422
10456
  }
@@ -10428,13 +10462,13 @@ class ClassicStrategy {
10428
10462
  }
10429
10463
  delete cleanId.isLocalEndpointId;
10430
10464
  // grab the promise before awaiting it to save in our pending messages map
10431
- 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', {
10432
10466
  ...cleanId,
10433
10467
  providerIdentity: this.providerIdentity,
10434
10468
  action,
10435
10469
  payload
10436
10470
  });
10437
- __classPrivateFieldGet$d(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
10471
+ __classPrivateFieldGet$e(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
10438
10472
  const raw = await p
10439
10473
  .catch((error) => {
10440
10474
  if ('cause' in error) {
@@ -10444,16 +10478,16 @@ class ClassicStrategy {
10444
10478
  })
10445
10479
  .finally(() => {
10446
10480
  // clean up the pending promise
10447
- __classPrivateFieldGet$d(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
10481
+ __classPrivateFieldGet$e(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
10448
10482
  });
10449
10483
  return raw.payload.data.result;
10450
10484
  };
10451
10485
  this.close = async () => {
10452
10486
  this.messageReceiver.removeEndpoint(this.providerIdentity.channelId, this.endpointId);
10453
- [...__classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
10454
- __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");
10455
10489
  };
10456
- __classPrivateFieldSet$c(this, _ClassicStrategy_wire, wire, "f");
10490
+ __classPrivateFieldSet$d(this, _ClassicStrategy_wire, wire, "f");
10457
10491
  }
10458
10492
  onEndpointDisconnect(endpointId, listener) {
10459
10493
  // Never fires for 'classic'.
@@ -10462,20 +10496,20 @@ class ClassicStrategy {
10462
10496
  this.messageReceiver.addEndpoint(listener, this.providerIdentity.channelId, this.endpointId);
10463
10497
  }
10464
10498
  async closeEndpoint(endpointId) {
10465
- const id = __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10466
- __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
10467
- 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);
10468
10502
  pendingSet?.forEach((p) => {
10469
10503
  const errorMsg = `Channel connection with identity uuid: ${id?.uuid} / name: ${id?.name} / endpointId: ${endpointId} no longer connected.`;
10470
10504
  p.cancel(new Error(errorMsg));
10471
10505
  });
10472
10506
  }
10473
10507
  isEndpointConnected(endpointId) {
10474
- return __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").has(endpointId);
10508
+ return __classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").has(endpointId);
10475
10509
  }
10476
10510
  addEndpoint(endpointId, payload) {
10477
- __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").set(endpointId, payload.endpointIdentity);
10478
- __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());
10479
10513
  }
10480
10514
  isValidEndpointPayload(payload) {
10481
10515
  return (typeof payload?.endpointIdentity?.endpointId === 'string' ||
@@ -10491,12 +10525,12 @@ var strategy$2 = {};
10491
10525
 
10492
10526
  var endpoint = {};
10493
10527
 
10494
- var __classPrivateFieldGet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10528
+ var __classPrivateFieldGet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10495
10529
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10496
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");
10497
10531
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10498
10532
  };
10499
- 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) {
10500
10534
  if (kind === "m") throw new TypeError("Private method is not writable");
10501
10535
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10502
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");
@@ -10531,8 +10565,8 @@ class RTCEndpoint {
10531
10565
  if (this.rtc.rtcClient.connectionState !== 'connected') {
10532
10566
  this.rtc.rtcClient.removeEventListener('connectionstatechange', this.connectionStateChangeHandler);
10533
10567
  this.close();
10534
- if (__classPrivateFieldGet$c(this, _RTCEndpoint_disconnectListener, "f")) {
10535
- __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);
10536
10570
  }
10537
10571
  }
10538
10572
  };
@@ -10580,9 +10614,9 @@ class RTCEndpoint {
10580
10614
  data = new TextDecoder().decode(e.data);
10581
10615
  }
10582
10616
  const { messageId, action, payload } = JSON.parse(data);
10583
- if (__classPrivateFieldGet$c(this, _RTCEndpoint_processAction, "f")) {
10617
+ if (__classPrivateFieldGet$d(this, _RTCEndpoint_processAction, "f")) {
10584
10618
  try {
10585
- 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);
10586
10620
  this.rtc.channels.response.send(JSON.stringify({
10587
10621
  messageId,
10588
10622
  payload: res,
@@ -10616,25 +10650,25 @@ class RTCEndpoint {
10616
10650
  datachannel.onclose = (e) => {
10617
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.')));
10618
10652
  this.close();
10619
- if (__classPrivateFieldGet$c(this, _RTCEndpoint_disconnectListener, "f")) {
10620
- __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);
10621
10655
  }
10622
10656
  };
10623
10657
  });
10624
10658
  }
10625
10659
  onDisconnect(listener) {
10626
- if (!__classPrivateFieldGet$c(this, _RTCEndpoint_disconnectListener, "f")) {
10627
- __classPrivateFieldSet$b(this, _RTCEndpoint_disconnectListener, listener, "f");
10660
+ if (!__classPrivateFieldGet$d(this, _RTCEndpoint_disconnectListener, "f")) {
10661
+ __classPrivateFieldSet$c(this, _RTCEndpoint_disconnectListener, listener, "f");
10628
10662
  }
10629
10663
  else {
10630
10664
  throw new Error('RTCEndpoint disconnectListener cannot be set twice.');
10631
10665
  }
10632
10666
  }
10633
10667
  receive(listener) {
10634
- if (__classPrivateFieldGet$c(this, _RTCEndpoint_processAction, "f")) {
10668
+ if (__classPrivateFieldGet$d(this, _RTCEndpoint_processAction, "f")) {
10635
10669
  throw new Error('You have already set a listener for this RTC Endpoint.');
10636
10670
  }
10637
- __classPrivateFieldSet$b(this, _RTCEndpoint_processAction, listener, "f");
10671
+ __classPrivateFieldSet$c(this, _RTCEndpoint_processAction, listener, "f");
10638
10672
  }
10639
10673
  get connected() {
10640
10674
  return this.rtc.rtcClient.connectionState === 'connected';
@@ -10645,12 +10679,12 @@ _RTCEndpoint_processAction = new WeakMap(), _RTCEndpoint_disconnectListener = ne
10645
10679
 
10646
10680
  var strategy$1 = {};
10647
10681
 
10648
- var __classPrivateFieldGet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10682
+ var __classPrivateFieldGet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10649
10683
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10650
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");
10651
10685
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10652
10686
  };
10653
- 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) {
10654
10688
  if (kind === "m") throw new TypeError("Private method is not writable");
10655
10689
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10656
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");
@@ -10671,11 +10705,11 @@ class EndpointStrategy {
10671
10705
  return this.getEndpointById(endpointId).send(action, payload);
10672
10706
  };
10673
10707
  this.close = async () => {
10674
- if (__classPrivateFieldGet$b(this, _EndpointStrategy_connected, "f")) {
10675
- __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
10676
- __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");
10677
10711
  }
10678
- __classPrivateFieldSet$a(this, _EndpointStrategy_connected, false, "f");
10712
+ __classPrivateFieldSet$b(this, _EndpointStrategy_connected, false, "f");
10679
10713
  };
10680
10714
  this.isValidEndpointPayload = validateEndpoint;
10681
10715
  }
@@ -10683,39 +10717,39 @@ class EndpointStrategy {
10683
10717
  this.getEndpointById(endpointId).onDisconnect(listener);
10684
10718
  }
10685
10719
  receive(listener) {
10686
- if (__classPrivateFieldGet$b(this, _EndpointStrategy_processAction, "f")) {
10720
+ if (__classPrivateFieldGet$c(this, _EndpointStrategy_processAction, "f")) {
10687
10721
  throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);
10688
10722
  }
10689
- __classPrivateFieldSet$a(this, _EndpointStrategy_processAction, listener, "f");
10723
+ __classPrivateFieldSet$b(this, _EndpointStrategy_processAction, listener, "f");
10690
10724
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
10691
- __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")));
10692
10726
  }
10693
10727
  getEndpointById(endpointId) {
10694
- const endpoint = __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").get(endpointId);
10728
+ const endpoint = __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").get(endpointId);
10695
10729
  if (!endpoint) {
10696
10730
  throw new Error(`Client with endpoint id ${endpointId} is not connected`);
10697
10731
  }
10698
10732
  return endpoint;
10699
10733
  }
10700
10734
  get connected() {
10701
- return __classPrivateFieldGet$b(this, _EndpointStrategy_connected, "f");
10735
+ return __classPrivateFieldGet$c(this, _EndpointStrategy_connected, "f");
10702
10736
  }
10703
10737
  isEndpointConnected(endpointId) {
10704
- return __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").has(endpointId);
10738
+ return __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").has(endpointId);
10705
10739
  }
10706
10740
  addEndpoint(endpointId, payload) {
10707
- if (!__classPrivateFieldGet$b(this, _EndpointStrategy_connected, "f")) {
10741
+ if (!__classPrivateFieldGet$c(this, _EndpointStrategy_connected, "f")) {
10708
10742
  console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);
10709
10743
  return;
10710
10744
  }
10711
10745
  const clientStrat = new this.EndpointType(payload);
10712
- if (__classPrivateFieldGet$b(this, _EndpointStrategy_processAction, "f")) {
10713
- 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"));
10714
10748
  }
10715
- __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").set(endpointId, clientStrat);
10749
+ __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").set(endpointId, clientStrat);
10716
10750
  }
10717
10751
  async closeEndpoint(endpointId) {
10718
- __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").delete(endpointId);
10752
+ __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").delete(endpointId);
10719
10753
  }
10720
10754
  }
10721
10755
  strategy$1.EndpointStrategy = EndpointStrategy;
@@ -10742,11 +10776,11 @@ var iceManager = {};
10742
10776
 
10743
10777
  Object.defineProperty(iceManager, "__esModule", { value: true });
10744
10778
  iceManager.RTCICEManager = void 0;
10745
- const base_1$f = base;
10779
+ const base_1$g = base;
10746
10780
  /*
10747
10781
  Singleton that facilitates Offer and Answer exchange required for establishing RTC connections.
10748
10782
  */
10749
- class RTCICEManager extends base_1$f.EmitterBase {
10783
+ class RTCICEManager extends base_1$g.EmitterBase {
10750
10784
  constructor(wire) {
10751
10785
  super(wire, 'channel');
10752
10786
  this.ensureChannelOpened = (channel) => {
@@ -10897,12 +10931,12 @@ function runtimeUuidMeetsMinimumRuntimeVersion(runtimeUuid, minVersion) {
10897
10931
  }
10898
10932
  runtimeVersioning.runtimeUuidMeetsMinimumRuntimeVersion = runtimeUuidMeetsMinimumRuntimeVersion;
10899
10933
 
10900
- var __classPrivateFieldGet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10934
+ var __classPrivateFieldGet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10901
10935
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10902
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");
10903
10937
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10904
10938
  };
10905
- 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) {
10906
10940
  if (kind === "m") throw new TypeError("Private method is not writable");
10907
10941
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10908
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");
@@ -10946,19 +10980,19 @@ class ChannelProvider extends channel_1.ChannelBase {
10946
10980
  * a read-only array containing all the identities of connecting clients.
10947
10981
  */
10948
10982
  get connections() {
10949
- return [...__classPrivateFieldGet$a(this, _ChannelProvider_connections, "f")];
10983
+ return [...__classPrivateFieldGet$b(this, _ChannelProvider_connections, "f")];
10950
10984
  }
10951
10985
  static handleClientDisconnection(channel, payload) {
10952
10986
  if (payload?.endpointId) {
10953
10987
  const { uuid, name, endpointId, isLocalEndpointId } = payload;
10954
- __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 });
10955
10989
  }
10956
10990
  else {
10957
10991
  // this is here to support older runtimes that did not have endpointId
10958
10992
  const multipleRemoves = channel.connections.filter((identity) => {
10959
10993
  return identity.uuid === payload.uuid && identity.name === payload.name;
10960
10994
  });
10961
- multipleRemoves.forEach(__classPrivateFieldGet$a(channel, _ChannelProvider_removeEndpoint, "f"));
10995
+ multipleRemoves.forEach(__classPrivateFieldGet$b(channel, _ChannelProvider_removeEndpoint, "f"));
10962
10996
  }
10963
10997
  channel.disconnectListener(payload);
10964
10998
  }
@@ -10975,8 +11009,8 @@ class ChannelProvider extends channel_1.ChannelBase {
10975
11009
  _ChannelProvider_strategy.set(this, void 0);
10976
11010
  _ChannelProvider_removeEndpoint.set(this, (identity) => {
10977
11011
  const remainingConnections = this.connections.filter((clientIdentity) => clientIdentity.endpointId !== identity.endpointId);
10978
- __classPrivateFieldGet$a(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
10979
- __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");
10980
11014
  });
10981
11015
  // Must be bound.
10982
11016
  this.processAction = async (action, payload, senderIdentity) => {
@@ -10990,17 +11024,17 @@ class ChannelProvider extends channel_1.ChannelBase {
10990
11024
  return super.processAction(action, payload, senderIdentity);
10991
11025
  };
10992
11026
  _ChannelProvider_close.set(this, () => {
10993
- __classPrivateFieldGet$a(this, _ChannelProvider_strategy, "f").close();
11027
+ __classPrivateFieldGet$b(this, _ChannelProvider_strategy, "f").close();
10994
11028
  const remove = ChannelProvider.removalMap.get(this);
10995
11029
  if (remove) {
10996
11030
  remove();
10997
11031
  }
10998
11032
  });
10999
- __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");
11000
11034
  this.connectListener = () => undefined;
11001
11035
  this.disconnectListener = () => undefined;
11002
- __classPrivateFieldSet$9(this, _ChannelProvider_connections, [], "f");
11003
- __classPrivateFieldSet$9(this, _ChannelProvider_strategy, strategy, "f");
11036
+ __classPrivateFieldSet$a(this, _ChannelProvider_connections, [], "f");
11037
+ __classPrivateFieldSet$a(this, _ChannelProvider_strategy, strategy, "f");
11004
11038
  strategy.receive(this.processAction);
11005
11039
  }
11006
11040
  /**
@@ -11031,16 +11065,16 @@ class ChannelProvider extends channel_1.ChannelBase {
11031
11065
  */
11032
11066
  dispatch(to, action, payload) {
11033
11067
  const endpointId = to.endpointId ?? this.getEndpointIdForOpenFinId(to, action);
11034
- if (endpointId && __classPrivateFieldGet$a(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
11068
+ if (endpointId && __classPrivateFieldGet$b(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
11035
11069
  const callSites = transport_errors_1.RuntimeError.getCallSite();
11036
- 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) => {
11037
11071
  throw new channel_error_1.ChannelError(e, action, payload, callSites);
11038
11072
  });
11039
11073
  }
11040
11074
  return Promise.reject(new Error(`Client connection with identity uuid: ${to.uuid} / name: ${to.name} / endpointId: ${endpointId} no longer connected.`));
11041
11075
  }
11042
11076
  async processConnection(senderId, payload) {
11043
- __classPrivateFieldGet$a(this, _ChannelProvider_connections, "f").push(senderId);
11077
+ __classPrivateFieldGet$b(this, _ChannelProvider_connections, "f").push(senderId);
11044
11078
  return this.connectListener(senderId, payload);
11045
11079
  }
11046
11080
  /**
@@ -11063,7 +11097,7 @@ class ChannelProvider extends channel_1.ChannelBase {
11063
11097
  * ```
11064
11098
  */
11065
11099
  publish(action, payload) {
11066
- 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));
11067
11101
  }
11068
11102
  /**
11069
11103
  * Register a listener that is called on every new client connection.
@@ -11137,11 +11171,11 @@ class ChannelProvider extends channel_1.ChannelBase {
11137
11171
  * ```
11138
11172
  */
11139
11173
  async destroy() {
11140
- const protectedObj = __classPrivateFieldGet$a(this, _ChannelProvider_protectedObj, "f");
11174
+ const protectedObj = __classPrivateFieldGet$b(this, _ChannelProvider_protectedObj, "f");
11141
11175
  protectedObj.providerIdentity;
11142
- __classPrivateFieldSet$9(this, _ChannelProvider_connections, [], "f");
11176
+ __classPrivateFieldSet$a(this, _ChannelProvider_connections, [], "f");
11143
11177
  await protectedObj.close();
11144
- __classPrivateFieldGet$a(this, _ChannelProvider_close, "f").call(this);
11178
+ __classPrivateFieldGet$b(this, _ChannelProvider_close, "f").call(this);
11145
11179
  }
11146
11180
  /**
11147
11181
  * Returns an array with info on every Client connected to the Provider
@@ -11211,7 +11245,7 @@ class ChannelProvider extends channel_1.ChannelBase {
11211
11245
  getEndpointIdForOpenFinId(clientIdentity, action) {
11212
11246
  const matchingConnections = this.connections.filter((c) => c.name === clientIdentity.name && c.uuid === clientIdentity.uuid);
11213
11247
  if (matchingConnections.length >= 2) {
11214
- const protectedObj = __classPrivateFieldGet$a(this, _ChannelProvider_protectedObj, "f");
11248
+ const protectedObj = __classPrivateFieldGet$b(this, _ChannelProvider_protectedObj, "f");
11215
11249
  const { uuid, name } = clientIdentity;
11216
11250
  const providerUuid = protectedObj?.providerIdentity.uuid;
11217
11251
  const providerName = protectedObj?.providerIdentity.name;
@@ -11247,14 +11281,14 @@ var messageReceiver = {};
11247
11281
  Object.defineProperty(messageReceiver, "__esModule", { value: true });
11248
11282
  messageReceiver.MessageReceiver = void 0;
11249
11283
  const client_1$1 = client;
11250
- const base_1$e = base;
11284
+ const base_1$f = base;
11251
11285
  const errors_1 = errors;
11252
11286
  /*
11253
11287
  This is a singleton (per fin object) tasked with routing messages coming off the ipc to the correct endpoint.
11254
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.
11255
11289
  If functionality is not about receiving messages, it does not belong here.
11256
11290
  */
11257
- class MessageReceiver extends base_1$e.Base {
11291
+ class MessageReceiver extends base_1$f.Base {
11258
11292
  constructor(wire) {
11259
11293
  super(wire);
11260
11294
  this.onmessage = (msg) => {
@@ -11423,13 +11457,13 @@ class CombinedStrategy {
11423
11457
  }
11424
11458
  strategy.default = CombinedStrategy;
11425
11459
 
11426
- 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) {
11427
11461
  if (kind === "m") throw new TypeError("Private method is not writable");
11428
11462
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
11429
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");
11430
11464
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11431
11465
  };
11432
- var __classPrivateFieldGet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11466
+ var __classPrivateFieldGet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11433
11467
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
11434
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");
11435
11469
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -11441,7 +11475,7 @@ var _ConnectionManager_messageReceiver, _ConnectionManager_rtcConnectionManager;
11441
11475
  Object.defineProperty(connectionManager, "__esModule", { value: true });
11442
11476
  connectionManager.ConnectionManager = void 0;
11443
11477
  const exhaustive_1 = exhaustive;
11444
- const base_1$d = base;
11478
+ const base_1$e = base;
11445
11479
  const strategy_1 = strategy$3;
11446
11480
  const strategy_2 = strategy$2;
11447
11481
  const ice_manager_1 = iceManager;
@@ -11449,7 +11483,7 @@ const provider_1$1 = provider;
11449
11483
  const message_receiver_1 = messageReceiver;
11450
11484
  const protocol_manager_1 = protocolManager;
11451
11485
  const strategy_3 = __importDefault$4(strategy);
11452
- class ConnectionManager extends base_1$d.Base {
11486
+ class ConnectionManager extends base_1$e.Base {
11453
11487
  static getProtocolOptionsFromStrings(protocols) {
11454
11488
  return protocols.map((protocol) => {
11455
11489
  switch (protocol) {
@@ -11478,8 +11512,8 @@ class ConnectionManager extends base_1$d.Base {
11478
11512
  };
11479
11513
  this.providerMap = new Map();
11480
11514
  this.protocolManager = new protocol_manager_1.ProtocolManager(this.wire.environment.type === 'node' ? ['classic'] : ['rtc', 'classic']);
11481
- __classPrivateFieldSet$8(this, _ConnectionManager_messageReceiver, new message_receiver_1.MessageReceiver(wire), "f");
11482
- __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");
11483
11517
  wire.registerMessageHandler(this.onmessage.bind(this));
11484
11518
  }
11485
11519
  createProvider(options, providerIdentity) {
@@ -11490,7 +11524,7 @@ class ConnectionManager extends base_1$d.Base {
11490
11524
  case 'rtc':
11491
11525
  return new strategy_2.RTCStrategy();
11492
11526
  case 'classic':
11493
- 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"),
11494
11528
  // Providers do not have an endpointId, use channelId as endpointId in the strategy.
11495
11529
  providerIdentity.channelId, providerIdentity);
11496
11530
  default:
@@ -11526,7 +11560,7 @@ class ConnectionManager extends base_1$d.Base {
11526
11560
  const supportedProtocols = await Promise.all(protocols.map(async (type) => {
11527
11561
  switch (type) {
11528
11562
  case 'rtc': {
11529
- 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();
11530
11564
  rtcPacket = { rtcClient, channels, channelsOpened };
11531
11565
  return {
11532
11566
  type: 'rtc',
@@ -11553,18 +11587,18 @@ class ConnectionManager extends base_1$d.Base {
11553
11587
  routingInfo.endpointId = this.wire.environment.getNextMessageId();
11554
11588
  // For New Clients connecting to Old Providers. To prevent multi-dispatching and publishing, we delete previously-connected
11555
11589
  // clients that are in the same context as the newly-connected client.
11556
- __classPrivateFieldGet$9(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
11590
+ __classPrivateFieldGet$a(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
11557
11591
  }
11558
11592
  const answer = routingInfo.answer ?? {
11559
11593
  supportedProtocols: [{ type: 'classic', version: 1 }]
11560
11594
  };
11561
11595
  const createStrategyFromAnswer = async (protocol) => {
11562
11596
  if (protocol.type === 'rtc' && rtcPacket) {
11563
- 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);
11564
11598
  return new strategy_2.RTCStrategy();
11565
11599
  }
11566
11600
  if (protocol.type === 'classic') {
11567
- 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);
11568
11602
  }
11569
11603
  return null;
11570
11604
  };
@@ -11632,7 +11666,7 @@ class ConnectionManager extends base_1$d.Base {
11632
11666
  clientAnswer = await overlappingProtocols.reduce(async (accumP, protocolToUse) => {
11633
11667
  const answer = await accumP;
11634
11668
  if (protocolToUse.type === 'rtc') {
11635
- 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);
11636
11670
  answer.supportedProtocols.push({
11637
11671
  type: 'rtc',
11638
11672
  version: strategy_2.RTCInfo.version,
@@ -11680,13 +11714,13 @@ _ConnectionManager_messageReceiver = new WeakMap(), _ConnectionManager_rtcConnec
11680
11714
  *
11681
11715
  * @packageDocumentation
11682
11716
  */
11683
- 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) {
11684
11718
  if (kind === "m") throw new TypeError("Private method is not writable");
11685
11719
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
11686
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");
11687
11721
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11688
11722
  };
11689
- var __classPrivateFieldGet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11723
+ var __classPrivateFieldGet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11690
11724
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
11691
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");
11692
11726
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -11696,8 +11730,8 @@ Object.defineProperty(channel$1, "__esModule", { value: true });
11696
11730
  channel$1.Channel = void 0;
11697
11731
  /* eslint-disable no-console */
11698
11732
  const events_1$2 = require$$0;
11699
- const lazy_1$1 = lazy;
11700
- const base_1$c = base;
11733
+ const lazy_1$2 = lazy;
11734
+ const base_1$d = base;
11701
11735
  const client_1 = client;
11702
11736
  const connection_manager_1 = connectionManager;
11703
11737
  const provider_1 = provider;
@@ -11728,7 +11762,7 @@ function retryDelay(count) {
11728
11762
  * * {@link Channel.onChannelConnect onChannelConnect(listener)}
11729
11763
  * * {@link Channel.onChannelDisconnect onChannelDisconnect(listener)}
11730
11764
  */
11731
- class Channel extends base_1$c.EmitterBase {
11765
+ class Channel extends base_1$d.EmitterBase {
11732
11766
  /**
11733
11767
  * @internal
11734
11768
  */
@@ -11737,17 +11771,17 @@ class Channel extends base_1$c.EmitterBase {
11737
11771
  _Channel_connectionManager.set(this, void 0);
11738
11772
  _Channel_internalEmitter.set(this, new events_1$2.EventEmitter());
11739
11773
  // OpenFin API has not been injected at construction time, *must* wait for API to be ready.
11740
- _Channel_readyToConnect.set(this, new lazy_1$1.AsyncRetryableLazy(async () => {
11774
+ _Channel_readyToConnect.set(this, new lazy_1$2.AsyncRetryableLazy(async () => {
11741
11775
  await Promise.all([
11742
11776
  this.on('disconnected', (eventPayload) => {
11743
11777
  client_1.ChannelClient.handleProviderDisconnect(eventPayload);
11744
11778
  }),
11745
11779
  this.on('connected', (...args) => {
11746
- __classPrivateFieldGet$8(this, _Channel_internalEmitter, "f").emit('connected', ...args);
11780
+ __classPrivateFieldGet$9(this, _Channel_internalEmitter, "f").emit('connected', ...args);
11747
11781
  })
11748
11782
  ]).catch(() => new Error('error setting up channel connection listeners'));
11749
11783
  }));
11750
- __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");
11751
11785
  }
11752
11786
  /**
11753
11787
  *
@@ -11822,7 +11856,7 @@ class Channel extends base_1$c.EmitterBase {
11822
11856
  resolve(true);
11823
11857
  }
11824
11858
  };
11825
- __classPrivateFieldGet$8(this, _Channel_internalEmitter, "f").on('connected', connectedListener);
11859
+ __classPrivateFieldGet$9(this, _Channel_internalEmitter, "f").on('connected', connectedListener);
11826
11860
  });
11827
11861
  try {
11828
11862
  if (retryInfo.count > 0) {
@@ -11854,7 +11888,7 @@ class Channel extends base_1$c.EmitterBase {
11854
11888
  finally {
11855
11889
  retryInfo.count += 1;
11856
11890
  // in case of other errors, remove our listener
11857
- __classPrivateFieldGet$8(this, _Channel_internalEmitter, "f").removeListener('connected', connectedListener);
11891
+ __classPrivateFieldGet$9(this, _Channel_internalEmitter, "f").removeListener('connected', connectedListener);
11858
11892
  }
11859
11893
  } while (shouldWait); // If we're waiting we retry the above loop
11860
11894
  // Should wait was false, no channel was found.
@@ -11913,12 +11947,12 @@ class Channel extends base_1$c.EmitterBase {
11913
11947
  async connect(channelName, options = {}) {
11914
11948
  // Make sure we don't connect before listeners are set up
11915
11949
  // This also errors if we're not in OpenFin, ensuring we don't run unnecessary code
11916
- await __classPrivateFieldGet$8(this, _Channel_readyToConnect, "f").getValue();
11950
+ await __classPrivateFieldGet$9(this, _Channel_readyToConnect, "f").getValue();
11917
11951
  if (!channelName || typeof channelName !== 'string') {
11918
11952
  throw new Error('Please provide a channelName string to connect to a channel.');
11919
11953
  }
11920
11954
  const opts = { wait: true, ...this.wire.environment.getDefaultChannelOptions().connect, ...options };
11921
- 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);
11922
11956
  let connectionUrl;
11923
11957
  if (this.fin.me.isFrame || this.fin.me.isView || this.fin.me.isWindow) {
11924
11958
  connectionUrl = (await this.fin.me.getInfo()).url;
@@ -11930,7 +11964,7 @@ class Channel extends base_1$c.EmitterBase {
11930
11964
  connectionUrl
11931
11965
  };
11932
11966
  const routingInfo = await this.safeConnect(channelName, opts.wait, connectPayload);
11933
- 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);
11934
11968
  const channel = new client_1.ChannelClient(routingInfo, () => client_1.ChannelClient.wireClose(this.wire, routingInfo, routingInfo.endpointId), strategy);
11935
11969
  // It is the client's responsibility to handle endpoint disconnection to the provider.
11936
11970
  // If the endpoint dies, the client will force a disconnection through the core.
@@ -11999,7 +12033,7 @@ class Channel extends base_1$c.EmitterBase {
11999
12033
  throw new Error('Please provide a channelName to create a channel');
12000
12034
  }
12001
12035
  const { payload: { data: providerIdentity } } = await this.wire.sendAction('create-channel', { channelName });
12002
- const channel = __classPrivateFieldGet$8(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
12036
+ const channel = __classPrivateFieldGet$9(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
12003
12037
  // TODO: fix typing (internal)
12004
12038
  // @ts-expect-error
12005
12039
  this.on('client-disconnected', (eventPayload) => {
@@ -12023,7 +12057,7 @@ interappbus.InterAppPayload = interappbus.InterApplicationBus = void 0;
12023
12057
  * @packageDocumentation
12024
12058
  */
12025
12059
  const events_1$1 = require$$0;
12026
- const base_1$b = base;
12060
+ const base_1$c = base;
12027
12061
  const ref_counter_1 = refCounter;
12028
12062
  const index_1$2 = channel$1;
12029
12063
  const validate_1$2 = validate;
@@ -12031,7 +12065,7 @@ const validate_1$2 = validate;
12031
12065
  * A messaging bus that allows for pub/sub messaging between different applications.
12032
12066
  *
12033
12067
  */
12034
- class InterApplicationBus extends base_1$b.Base {
12068
+ class InterApplicationBus extends base_1$c.Base {
12035
12069
  /**
12036
12070
  * @internal
12037
12071
  */
@@ -12237,12 +12271,12 @@ var clipboard = {};
12237
12271
  */
12238
12272
  Object.defineProperty(clipboard, "__esModule", { value: true });
12239
12273
  clipboard.Clipboard = void 0;
12240
- const base_1$a = base;
12274
+ const base_1$b = base;
12241
12275
  /**
12242
12276
  * The Clipboard API allows reading and writing to the clipboard in multiple formats.
12243
12277
  *
12244
12278
  */
12245
- class Clipboard extends base_1$a.Base {
12279
+ class Clipboard extends base_1$b.Base {
12246
12280
  /**
12247
12281
  * Writes data into the clipboard as plain text
12248
12282
  * @param writeObj The object for writing data into the clipboard
@@ -12426,12 +12460,12 @@ var globalHotkey = {};
12426
12460
 
12427
12461
  Object.defineProperty(globalHotkey, "__esModule", { value: true });
12428
12462
  globalHotkey.GlobalHotkey = void 0;
12429
- const base_1$9 = base;
12463
+ const base_1$a = base;
12430
12464
  /**
12431
12465
  * The GlobalHotkey module can register/unregister a global hotkeys.
12432
12466
  *
12433
12467
  */
12434
- class GlobalHotkey extends base_1$9.EmitterBase {
12468
+ class GlobalHotkey extends base_1$a.EmitterBase {
12435
12469
  /**
12436
12470
  * @internal
12437
12471
  */
@@ -12565,13 +12599,13 @@ var Factory$3 = {};
12565
12599
 
12566
12600
  var Instance$2 = {};
12567
12601
 
12568
- 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) {
12569
12603
  if (kind === "m") throw new TypeError("Private method is not writable");
12570
12604
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
12571
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");
12572
12606
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12573
12607
  };
12574
- var __classPrivateFieldGet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12608
+ var __classPrivateFieldGet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12575
12609
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
12576
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");
12577
12611
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -12580,14 +12614,14 @@ var _Platform_channelName, _Platform_connectToProvider;
12580
12614
  Object.defineProperty(Instance$2, "__esModule", { value: true });
12581
12615
  Instance$2.Platform = void 0;
12582
12616
  /* eslint-disable import/prefer-default-export, no-undef */
12583
- const base_1$8 = base;
12617
+ const base_1$9 = base;
12584
12618
  const validate_1$1 = validate;
12585
12619
  /** Manages the life cycle of windows and views in the application.
12586
12620
  *
12587
12621
  * Enables taking snapshots of itself and applying them to restore a previous configuration
12588
12622
  * as well as listen to {@link OpenFin.PlatformEvents platform events}.
12589
12623
  */
12590
- class Platform extends base_1$8.EmitterBase {
12624
+ class Platform extends base_1$9.EmitterBase {
12591
12625
  /**
12592
12626
  * @internal
12593
12627
  */
@@ -12608,24 +12642,24 @@ class Platform extends base_1$8.EmitterBase {
12608
12642
  this.wire.sendAction('platform-get-client', this.identity).catch((e) => {
12609
12643
  // don't expose
12610
12644
  });
12611
- if (!Platform.clientMap.has(__classPrivateFieldGet$7(this, _Platform_channelName, "f"))) {
12612
- const clientPromise = __classPrivateFieldGet$7(this, _Platform_connectToProvider, "f").call(this);
12613
- 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);
12614
12648
  }
12615
12649
  // we set it above
12616
12650
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
12617
- return Platform.clientMap.get(__classPrivateFieldGet$7(this, _Platform_channelName, "f"));
12651
+ return Platform.clientMap.get(__classPrivateFieldGet$8(this, _Platform_channelName, "f"));
12618
12652
  };
12619
12653
  _Platform_connectToProvider.set(this, async () => {
12620
12654
  try {
12621
- 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 });
12622
12656
  client.onDisconnection(() => {
12623
- Platform.clientMap.delete(__classPrivateFieldGet$7(this, _Platform_channelName, "f"));
12657
+ Platform.clientMap.delete(__classPrivateFieldGet$8(this, _Platform_channelName, "f"));
12624
12658
  });
12625
12659
  return client;
12626
12660
  }
12627
12661
  catch (e) {
12628
- Platform.clientMap.delete(__classPrivateFieldGet$7(this, _Platform_channelName, "f"));
12662
+ Platform.clientMap.delete(__classPrivateFieldGet$8(this, _Platform_channelName, "f"));
12629
12663
  throw new Error('The targeted Platform is not currently running. Listen for application-started event for the given Uuid.');
12630
12664
  }
12631
12665
  });
@@ -12638,7 +12672,7 @@ class Platform extends base_1$8.EmitterBase {
12638
12672
  if (errorMsg) {
12639
12673
  throw new Error(errorMsg);
12640
12674
  }
12641
- __classPrivateFieldSet$6(this, _Platform_channelName, channelName, "f");
12675
+ __classPrivateFieldSet$7(this, _Platform_channelName, channelName, "f");
12642
12676
  this._channel = this.fin.InterApplicationBus.Channel;
12643
12677
  this.identity = { uuid: identity.uuid };
12644
12678
  this.Layout = this.fin.Platform.Layout;
@@ -13694,13 +13728,13 @@ const createRelayedDispatch = (client, target, relayId, relayErrorMsg) => async
13694
13728
  };
13695
13729
  channelApiRelay.createRelayedDispatch = createRelayedDispatch;
13696
13730
 
13697
- 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) {
13698
13732
  if (kind === "m") throw new TypeError("Private method is not writable");
13699
13733
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
13700
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");
13701
13735
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
13702
13736
  };
13703
- var __classPrivateFieldGet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13737
+ var __classPrivateFieldGet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13704
13738
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13705
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");
13706
13740
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -13754,7 +13788,7 @@ class LayoutNode {
13754
13788
  * console.log(`The parent ColumnOrRow is root: ${parentIsRoot}`);
13755
13789
  * ```
13756
13790
  */
13757
- this.isRoot = () => __classPrivateFieldGet$6(this, _LayoutNode_client, "f").isRoot(this.entityId);
13791
+ this.isRoot = () => __classPrivateFieldGet$7(this, _LayoutNode_client, "f").isRoot(this.entityId);
13758
13792
  /**
13759
13793
  * Checks if the TabStack or ColumnOrRow exists
13760
13794
  *
@@ -13774,7 +13808,7 @@ class LayoutNode {
13774
13808
  * console.log(`The entity exists: ${exists}`);
13775
13809
  * ```
13776
13810
  */
13777
- this.exists = () => __classPrivateFieldGet$6(this, _LayoutNode_client, "f").exists(this.entityId);
13811
+ this.exists = () => __classPrivateFieldGet$7(this, _LayoutNode_client, "f").exists(this.entityId);
13778
13812
  /**
13779
13813
  * Retrieves the parent of the TabStack or ColumnOrRow
13780
13814
  *
@@ -13795,11 +13829,11 @@ class LayoutNode {
13795
13829
  * ```
13796
13830
  */
13797
13831
  this.getParent = async () => {
13798
- 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);
13799
13833
  if (!parent) {
13800
13834
  return undefined;
13801
13835
  }
13802
- return LayoutNode.getEntity(parent, __classPrivateFieldGet$6(this, _LayoutNode_client, "f"));
13836
+ return LayoutNode.getEntity(parent, __classPrivateFieldGet$7(this, _LayoutNode_client, "f"));
13803
13837
  };
13804
13838
  /**
13805
13839
  * Creates a new TabStack adjacent to the given TabStack or ColumnOrRow. Inputs can be new views to create, or existing views.
@@ -13850,8 +13884,8 @@ class LayoutNode {
13850
13884
  * @experimental
13851
13885
  */
13852
13886
  this.createAdjacentStack = async (views, options) => {
13853
- const entityId = await __classPrivateFieldGet$6(this, _LayoutNode_client, "f").createAdjacentStack(this.entityId, views, options);
13854
- 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"));
13855
13889
  };
13856
13890
  /**
13857
13891
  * Retrieves the adjacent TabStacks of the given TabStack or ColumnOrRow.
@@ -13879,16 +13913,16 @@ class LayoutNode {
13879
13913
  * @experimental
13880
13914
  */
13881
13915
  this.getAdjacentStacks = async (edge) => {
13882
- const adjacentStacks = await __classPrivateFieldGet$6(this, _LayoutNode_client, "f").getAdjacentStacks({
13916
+ const adjacentStacks = await __classPrivateFieldGet$7(this, _LayoutNode_client, "f").getAdjacentStacks({
13883
13917
  targetId: this.entityId,
13884
13918
  edge
13885
13919
  });
13886
13920
  return adjacentStacks.map((stack) => LayoutNode.getEntity({
13887
13921
  type: 'stack',
13888
13922
  entityId: stack.entityId
13889
- }, __classPrivateFieldGet$6(this, _LayoutNode_client, "f")));
13923
+ }, __classPrivateFieldGet$7(this, _LayoutNode_client, "f")));
13890
13924
  };
13891
- __classPrivateFieldSet$5(this, _LayoutNode_client, client, "f");
13925
+ __classPrivateFieldSet$6(this, _LayoutNode_client, client, "f");
13892
13926
  this.entityId = entityId;
13893
13927
  }
13894
13928
  }
@@ -13961,7 +13995,7 @@ class TabStack extends LayoutNode {
13961
13995
  * ```
13962
13996
  * @experimental
13963
13997
  */
13964
- this.getViews = () => __classPrivateFieldGet$6(this, _TabStack_client, "f").getStackViews(this.entityId);
13998
+ this.getViews = () => __classPrivateFieldGet$7(this, _TabStack_client, "f").getStackViews(this.entityId);
13965
13999
  /**
13966
14000
  * Adds or creates a view in this {@link TabStack}.
13967
14001
  *
@@ -13991,7 +14025,7 @@ class TabStack extends LayoutNode {
13991
14025
  * ```
13992
14026
  * @experimental
13993
14027
  */
13994
- 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);
13995
14029
  /**
13996
14030
  * Removes a view from this {@link TabStack}.
13997
14031
  *
@@ -14021,7 +14055,7 @@ class TabStack extends LayoutNode {
14021
14055
  * ```
14022
14056
  */
14023
14057
  this.removeView = async (view) => {
14024
- await __classPrivateFieldGet$6(this, _TabStack_client, "f").removeViewFromStack(this.entityId, view);
14058
+ await __classPrivateFieldGet$7(this, _TabStack_client, "f").removeViewFromStack(this.entityId, view);
14025
14059
  };
14026
14060
  /**
14027
14061
  * Sets the active view of the {@link TabStack} without focusing it.
@@ -14045,9 +14079,9 @@ class TabStack extends LayoutNode {
14045
14079
  * @experimental
14046
14080
  */
14047
14081
  this.setActiveView = async (view) => {
14048
- await __classPrivateFieldGet$6(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
14082
+ await __classPrivateFieldGet$7(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
14049
14083
  };
14050
- __classPrivateFieldSet$5(this, _TabStack_client, client, "f");
14084
+ __classPrivateFieldSet$6(this, _TabStack_client, client, "f");
14051
14085
  }
14052
14086
  }
14053
14087
  layoutEntities.TabStack = TabStack;
@@ -14086,10 +14120,10 @@ class ColumnOrRow extends LayoutNode {
14086
14120
  * ```
14087
14121
  */
14088
14122
  this.getContent = async () => {
14089
- const contentItemEntities = await __classPrivateFieldGet$6(this, _ColumnOrRow_client, "f").getContent(this.entityId);
14090
- 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")));
14091
14125
  };
14092
- __classPrivateFieldSet$5(this, _ColumnOrRow_client, client, "f");
14126
+ __classPrivateFieldSet$6(this, _ColumnOrRow_client, client, "f");
14093
14127
  this.type = type;
14094
14128
  }
14095
14129
  }
@@ -14104,7 +14138,7 @@ layout_constants.LAYOUT_CONTROLLER_ID = 'layout-entities';
14104
14138
  // TODO: eventually export this somehow
14105
14139
  layout_constants.DEFAULT_LAYOUT_KEY = '__default__';
14106
14140
 
14107
- var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14141
+ var __classPrivateFieldGet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14108
14142
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14109
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");
14110
14144
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -14112,9 +14146,9 @@ var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateF
14112
14146
  var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
14113
14147
  Object.defineProperty(Instance$1, "__esModule", { value: true });
14114
14148
  Instance$1.Layout = void 0;
14115
- const lazy_1 = lazy;
14149
+ const lazy_1$1 = lazy;
14116
14150
  const validate_1 = validate;
14117
- const base_1$7 = base;
14151
+ const base_1$8 = base;
14118
14152
  const common_utils_1$1 = commonUtils;
14119
14153
  const layout_entities_1 = layoutEntities;
14120
14154
  const layout_constants_1$1 = layout_constants;
@@ -14250,12 +14284,12 @@ const layout_constants_1$1 = layout_constants;
14250
14284
  * }
14251
14285
  * ```
14252
14286
  */
14253
- class Layout extends base_1$7.Base {
14287
+ class Layout extends base_1$8.Base {
14254
14288
  /**
14255
14289
  * @internal
14256
14290
  */
14257
14291
  static getClient(layout) {
14258
- return __classPrivateFieldGet$5(layout, _Layout_layoutClient, "f").getValue();
14292
+ return __classPrivateFieldGet$6(layout, _Layout_layoutClient, "f").getValue();
14259
14293
  }
14260
14294
  /**
14261
14295
  * @internal
@@ -14269,7 +14303,7 @@ class Layout extends base_1$7.Base {
14269
14303
  * Lazily constructed {@link LayoutEntitiesClient} bound to this platform's client and identity
14270
14304
  * The client is for {@link LayoutEntitiesController}
14271
14305
  */
14272
- _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)));
14273
14307
  /**
14274
14308
  * Replaces a Platform window's layout with a new layout.
14275
14309
  *
@@ -14478,7 +14512,7 @@ class Layout extends base_1$7.Base {
14478
14512
  this.wire.sendAction('layout-get-root-item').catch(() => {
14479
14513
  // don't expose
14480
14514
  });
14481
- const client = await __classPrivateFieldGet$5(this, _Layout_layoutClient, "f").getValue();
14515
+ const client = await __classPrivateFieldGet$6(this, _Layout_layoutClient, "f").getValue();
14482
14516
  const root = await client.getRoot('layoutName' in this.identity ? this.identity : undefined);
14483
14517
  return layout_entities_1.LayoutNode.getEntity(root, client);
14484
14518
  }
@@ -14496,7 +14530,7 @@ class Layout extends base_1$7.Base {
14496
14530
  this.wire.sendAction('layout-get-stack-by-view').catch(() => {
14497
14531
  // don't expose
14498
14532
  });
14499
- const client = await __classPrivateFieldGet$5(this, _Layout_layoutClient, "f").getValue();
14533
+ const client = await __classPrivateFieldGet$6(this, _Layout_layoutClient, "f").getValue();
14500
14534
  const stack = await client.getStackByView(identity);
14501
14535
  if (!stack) {
14502
14536
  throw new Error(`No stack found for view: ${identity.uuid}/${identity.name}`);
@@ -14516,7 +14550,7 @@ class Layout extends base_1$7.Base {
14516
14550
  this.wire.sendAction('layout-add-view').catch((e) => {
14517
14551
  // don't expose
14518
14552
  });
14519
- 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', {
14520
14554
  viewOptions,
14521
14555
  location,
14522
14556
  targetView
@@ -14534,7 +14568,7 @@ class Layout extends base_1$7.Base {
14534
14568
  this.wire.sendAction('layout-close-view').catch((e) => {
14535
14569
  // don't expose
14536
14570
  });
14537
- 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 });
14538
14572
  }
14539
14573
  }
14540
14574
  Instance$1.Layout = Layout;
@@ -14548,12 +14582,12 @@ async function _Layout_forwardLayoutAction(action, payload) {
14548
14582
  return client.dispatch(action, { target: this.identity, opts: payload });
14549
14583
  };
14550
14584
 
14551
- var __classPrivateFieldGet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14585
+ var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14552
14586
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14553
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");
14554
14588
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
14555
14589
  };
14556
- 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) {
14557
14591
  if (kind === "m") throw new TypeError("Private method is not writable");
14558
14592
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14559
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");
@@ -14562,13 +14596,13 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
14562
14596
  var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getLayoutManagerSpy, _LayoutModule_getSafeLayoutManager;
14563
14597
  Object.defineProperty(Factory$2, "__esModule", { value: true });
14564
14598
  Factory$2.LayoutModule = void 0;
14565
- const base_1$6 = base;
14599
+ const base_1$7 = base;
14566
14600
  const Instance_1$2 = Instance$1;
14567
14601
  const layout_constants_1 = layout_constants;
14568
14602
  /**
14569
14603
  * Static namespace for OpenFin API methods that interact with the {@link Layout} class, available under `fin.Platform.Layout`.
14570
14604
  */
14571
- class LayoutModule extends base_1$6.Base {
14605
+ class LayoutModule extends base_1$7.Base {
14572
14606
  constructor() {
14573
14607
  super(...arguments);
14574
14608
  _LayoutModule_instances.add(this);
@@ -14619,23 +14653,23 @@ class LayoutModule extends base_1$6.Base {
14619
14653
  if (!this.wire.environment.layoutAllowedInContext(this.fin)) {
14620
14654
  throw new Error('Layout.init can only be called from a Window context.');
14621
14655
  }
14622
- if (__classPrivateFieldGet$4(this, _LayoutModule_layoutInitializationAttempted, "f")) {
14656
+ if (__classPrivateFieldGet$5(this, _LayoutModule_layoutInitializationAttempted, "f")) {
14623
14657
  throw new Error('Layout.init was already called, please use Layout.create to add additional layouts.');
14624
14658
  }
14625
14659
  if (this.wire.environment.type === 'openfin') {
14626
14660
  // preload the client
14627
14661
  await this.fin.Platform.getCurrentSync().getClient();
14628
14662
  }
14629
- __classPrivateFieldSet$4(this, _LayoutModule_layoutInitializationAttempted, true, "f");
14663
+ __classPrivateFieldSet$5(this, _LayoutModule_layoutInitializationAttempted, true, "f");
14630
14664
  // TODO: rename to createLayoutManager
14631
- __classPrivateFieldSet$4(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
14632
- 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);
14633
14667
  const meIdentity = { name: this.fin.me.name, uuid: this.fin.me.uuid };
14634
14668
  if (!options.layoutManagerOverride) {
14635
14669
  // CORE-1081 to be removed when we actually delete the `layoutManager` prop
14636
14670
  // in single-layout case, we return the undocumented layoutManager type
14637
14671
  const layoutIdentity = { layoutName: layout_constants_1.DEFAULT_LAYOUT_KEY, ...meIdentity };
14638
- return __classPrivateFieldGet$4(this, _LayoutModule_getLayoutManagerSpy, "f").call(this, layoutIdentity);
14672
+ return __classPrivateFieldGet$5(this, _LayoutModule_getLayoutManagerSpy, "f").call(this, layoutIdentity);
14639
14673
  }
14640
14674
  return this.wrapSync(meIdentity);
14641
14675
  };
@@ -14664,13 +14698,13 @@ class LayoutModule extends base_1$6.Base {
14664
14698
  * @returns
14665
14699
  */
14666
14700
  this.getCurrentLayoutManagerSync = () => {
14667
- 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()`);
14668
14702
  };
14669
14703
  this.create = async (options) => {
14670
- 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);
14671
14705
  };
14672
14706
  this.destroy = async (layoutIdentity) => {
14673
- 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);
14674
14708
  };
14675
14709
  }
14676
14710
  /**
@@ -14811,10 +14845,10 @@ class LayoutModule extends base_1$6.Base {
14811
14845
  }
14812
14846
  Factory$2.LayoutModule = LayoutModule;
14813
14847
  _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getLayoutManagerSpy = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_getSafeLayoutManager = function _LayoutModule_getSafeLayoutManager(method) {
14814
- if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
14848
+ if (!__classPrivateFieldGet$5(this, _LayoutModule_layoutManager, "f")) {
14815
14849
  throw new Error(`You must call init before using the API ${method}`);
14816
14850
  }
14817
- return __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f");
14851
+ return __classPrivateFieldGet$5(this, _LayoutModule_layoutManager, "f");
14818
14852
  };
14819
14853
 
14820
14854
  (function (exports) {
@@ -14851,13 +14885,13 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layou
14851
14885
 
14852
14886
  Object.defineProperty(Factory$3, "__esModule", { value: true });
14853
14887
  Factory$3.PlatformModule = void 0;
14854
- const base_1$5 = base;
14888
+ const base_1$6 = base;
14855
14889
  const Instance_1$1 = Instance$2;
14856
14890
  const index_1$1 = layout;
14857
14891
  /**
14858
14892
  * Static namespace for OpenFin API methods that interact with the {@link Platform} class, available under `fin.Platform`.
14859
14893
  */
14860
- class PlatformModule extends base_1$5.Base {
14894
+ class PlatformModule extends base_1$6.Base {
14861
14895
  /**
14862
14896
  * @internal
14863
14897
  */
@@ -15176,27 +15210,27 @@ var InteropClient$1 = {};
15176
15210
 
15177
15211
  var SessionContextGroupClient$1 = {};
15178
15212
 
15179
- 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) {
15180
15214
  if (kind === "m") throw new TypeError("Private method is not writable");
15181
15215
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
15182
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");
15183
15217
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
15184
15218
  };
15185
- var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15219
+ var __classPrivateFieldGet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15186
15220
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
15187
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");
15188
15222
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15189
15223
  };
15190
15224
  var _SessionContextGroupClient_clientPromise;
15191
15225
  Object.defineProperty(SessionContextGroupClient$1, "__esModule", { value: true });
15192
- const base_1$4 = base;
15226
+ const base_1$5 = base;
15193
15227
  const utils_1$6 = utils$3;
15194
- class SessionContextGroupClient extends base_1$4.Base {
15228
+ class SessionContextGroupClient extends base_1$5.Base {
15195
15229
  constructor(wire, client, id) {
15196
15230
  super(wire);
15197
15231
  _SessionContextGroupClient_clientPromise.set(this, void 0);
15198
15232
  this.id = id;
15199
- __classPrivateFieldSet$3(this, _SessionContextGroupClient_clientPromise, client, "f");
15233
+ __classPrivateFieldSet$4(this, _SessionContextGroupClient_clientPromise, client, "f");
15200
15234
  }
15201
15235
  /**
15202
15236
  * Sets a context for the session context group.
@@ -15208,7 +15242,7 @@ class SessionContextGroupClient extends base_1$4.Base {
15208
15242
  this.wire.sendAction('interop-session-context-group-set-context').catch((e) => {
15209
15243
  // don't expose, analytics-only call
15210
15244
  });
15211
- const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
15245
+ const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
15212
15246
  return client.dispatch(`sessionContextGroup:setContext-${this.id}`, {
15213
15247
  sessionContextGroupId: this.id,
15214
15248
  context
@@ -15218,7 +15252,7 @@ class SessionContextGroupClient extends base_1$4.Base {
15218
15252
  this.wire.sendAction('interop-session-context-group-get-context').catch((e) => {
15219
15253
  // don't expose, analytics-only call
15220
15254
  });
15221
- const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
15255
+ const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
15222
15256
  return client.dispatch(`sessionContextGroup:getContext-${this.id}`, {
15223
15257
  sessionContextGroupId: this.id,
15224
15258
  type
@@ -15231,7 +15265,7 @@ class SessionContextGroupClient extends base_1$4.Base {
15231
15265
  if (typeof contextHandler !== 'function') {
15232
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.");
15233
15267
  }
15234
- const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
15268
+ const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
15235
15269
  let handlerId;
15236
15270
  if (contextType) {
15237
15271
  handlerId = `sessionContextHandler:invoke-${this.id}-${contextType}-${(0, utils_1$6.generateId)()}`;
@@ -15244,7 +15278,7 @@ class SessionContextGroupClient extends base_1$4.Base {
15244
15278
  return { unsubscribe: await this.createUnsubscribeCb(handlerId) };
15245
15279
  }
15246
15280
  async createUnsubscribeCb(handlerId) {
15247
- const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
15281
+ const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
15248
15282
  return async () => {
15249
15283
  client.remove(handlerId);
15250
15284
  await client.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`, { handlerId });
@@ -15262,13 +15296,13 @@ class SessionContextGroupClient extends base_1$4.Base {
15262
15296
  SessionContextGroupClient$1.default = SessionContextGroupClient;
15263
15297
  _SessionContextGroupClient_clientPromise = new WeakMap();
15264
15298
 
15265
- 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) {
15266
15300
  if (kind === "m") throw new TypeError("Private method is not writable");
15267
15301
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
15268
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");
15269
15303
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
15270
15304
  };
15271
- var __classPrivateFieldGet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15305
+ var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15272
15306
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
15273
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");
15274
15308
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -15279,7 +15313,7 @@ var __importDefault$3 = (commonjsGlobal && commonjsGlobal.__importDefault) || fu
15279
15313
  var _InteropClient_clientPromise, _InteropClient_sessionContextGroups, _InteropClient_fdc3Factory;
15280
15314
  Object.defineProperty(InteropClient$1, "__esModule", { value: true });
15281
15315
  InteropClient$1.InteropClient = void 0;
15282
- const base_1$3 = base;
15316
+ const base_1$4 = base;
15283
15317
  const SessionContextGroupClient_1 = __importDefault$3(SessionContextGroupClient$1);
15284
15318
  const utils_1$5 = utils$3;
15285
15319
  /**
@@ -15331,7 +15365,7 @@ const utils_1$5 = utils$3;
15331
15365
  * * {@link InteropClient#getAllClientsInContextGroup getAllClientsInContextGroup(contextGroupId)}
15332
15366
  *
15333
15367
  */
15334
- class InteropClient extends base_1$3.Base {
15368
+ class InteropClient extends base_1$4.Base {
15335
15369
  /**
15336
15370
  * @internal
15337
15371
  */
@@ -15340,9 +15374,9 @@ class InteropClient extends base_1$3.Base {
15340
15374
  _InteropClient_clientPromise.set(this, void 0);
15341
15375
  _InteropClient_sessionContextGroups.set(this, void 0);
15342
15376
  _InteropClient_fdc3Factory.set(this, void 0);
15343
- __classPrivateFieldSet$2(this, _InteropClient_sessionContextGroups, new Map(), "f");
15344
- __classPrivateFieldSet$2(this, _InteropClient_clientPromise, clientPromise, "f");
15345
- __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");
15346
15380
  }
15347
15381
  /*
15348
15382
  Client APIs
@@ -15370,7 +15404,7 @@ class InteropClient extends base_1$3.Base {
15370
15404
  this.wire.sendAction('interop-client-set-context').catch((e) => {
15371
15405
  // don't expose, analytics-only call
15372
15406
  });
15373
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15407
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15374
15408
  return client.dispatch('setContext', { context });
15375
15409
  }
15376
15410
  /**
@@ -15437,7 +15471,7 @@ class InteropClient extends base_1$3.Base {
15437
15471
  if (typeof handler !== 'function') {
15438
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.");
15439
15473
  }
15440
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15474
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15441
15475
  let handlerId;
15442
15476
  if (contextType) {
15443
15477
  handlerId = `invokeContextHandler-${contextType}-${(0, utils_1$5.generateId)()}`;
@@ -15477,7 +15511,7 @@ class InteropClient extends base_1$3.Base {
15477
15511
  this.wire.sendAction('interop-client-get-context-groups').catch((e) => {
15478
15512
  // don't expose, analytics-only call
15479
15513
  });
15480
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15514
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15481
15515
  return client.dispatch('getContextGroups');
15482
15516
  }
15483
15517
  /**
@@ -15508,7 +15542,7 @@ class InteropClient extends base_1$3.Base {
15508
15542
  this.wire.sendAction('interop-client-join-context-group').catch((e) => {
15509
15543
  // don't expose, analytics-only call
15510
15544
  });
15511
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15545
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15512
15546
  if (!contextGroupId) {
15513
15547
  throw new Error('No contextGroupId specified for joinContextGroup.');
15514
15548
  }
@@ -15537,7 +15571,7 @@ class InteropClient extends base_1$3.Base {
15537
15571
  this.wire.sendAction('interop-client-remove-from-context-group').catch((e) => {
15538
15572
  // don't expose, analytics-only call
15539
15573
  });
15540
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15574
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15541
15575
  return client.dispatch('removeFromContextGroup', { target });
15542
15576
  }
15543
15577
  /**
@@ -15560,7 +15594,7 @@ class InteropClient extends base_1$3.Base {
15560
15594
  this.wire.sendAction('interop-client-get-all-clients-in-context-group').catch((e) => {
15561
15595
  // don't expose, analytics-only call
15562
15596
  });
15563
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15597
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15564
15598
  if (!contextGroupId) {
15565
15599
  throw new Error('No contextGroupId specified for getAllClientsInContextGroup.');
15566
15600
  }
@@ -15585,7 +15619,7 @@ class InteropClient extends base_1$3.Base {
15585
15619
  this.wire.sendAction('interop-client-get-info-for-context-group').catch((e) => {
15586
15620
  // don't expose, analytics-only call
15587
15621
  });
15588
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15622
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15589
15623
  if (!contextGroupId) {
15590
15624
  throw new Error('No contextGroupId specified for getInfoForContextGroup.');
15591
15625
  }
@@ -15613,7 +15647,7 @@ class InteropClient extends base_1$3.Base {
15613
15647
  this.wire.sendAction('interop-client-fire-intent').catch((e) => {
15614
15648
  // don't expose, this is only for api analytics purposes
15615
15649
  });
15616
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15650
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15617
15651
  return client.dispatch('fireIntent', intent);
15618
15652
  }
15619
15653
  /**
@@ -15640,7 +15674,7 @@ class InteropClient extends base_1$3.Base {
15640
15674
  this.wire.sendAction('interop-client-register-intent-handler').catch((e) => {
15641
15675
  // don't expose, this is only for api analytics purposes
15642
15676
  });
15643
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15677
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15644
15678
  const handlerId = `intent-handler-${intentName}`;
15645
15679
  const wrappedHandler = (0, utils_1$5.wrapIntentHandler)(handler, handlerId);
15646
15680
  try {
@@ -15678,7 +15712,7 @@ class InteropClient extends base_1$3.Base {
15678
15712
  this.wire.sendAction('interop-client-get-current-context').catch((e) => {
15679
15713
  // don't expose, analytics-only call
15680
15714
  });
15681
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15715
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15682
15716
  return client.dispatch('getCurrentContext', { contextType });
15683
15717
  }
15684
15718
  /**
@@ -15698,7 +15732,7 @@ class InteropClient extends base_1$3.Base {
15698
15732
  this.wire.sendAction('interop-client-get-info-for-intent').catch((e) => {
15699
15733
  // don't expose, analytics-only call
15700
15734
  });
15701
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15735
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15702
15736
  return client.dispatch('getInfoForIntent', options);
15703
15737
  }
15704
15738
  /**
@@ -15729,7 +15763,7 @@ class InteropClient extends base_1$3.Base {
15729
15763
  this.wire.sendAction('interop-client-get-info-for-intents-by-context').catch((e) => {
15730
15764
  // don't expose, analytics-only call
15731
15765
  });
15732
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15766
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15733
15767
  return client.dispatch('getInfoForIntentsByContext', context);
15734
15768
  }
15735
15769
  /**
@@ -15761,7 +15795,7 @@ class InteropClient extends base_1$3.Base {
15761
15795
  this.wire.sendAction('interop-client-fire-intent-for-context').catch((e) => {
15762
15796
  // don't expose, analytics-only call
15763
15797
  });
15764
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15798
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15765
15799
  return client.dispatch('fireIntentForContext', context);
15766
15800
  }
15767
15801
  /**
@@ -15798,19 +15832,19 @@ class InteropClient extends base_1$3.Base {
15798
15832
  */
15799
15833
  async joinSessionContextGroup(sessionContextGroupId) {
15800
15834
  try {
15801
- const currentSessionContextGroup = __classPrivateFieldGet$2(this, _InteropClient_sessionContextGroups, "f").get(sessionContextGroupId);
15835
+ const currentSessionContextGroup = __classPrivateFieldGet$3(this, _InteropClient_sessionContextGroups, "f").get(sessionContextGroupId);
15802
15836
  if (currentSessionContextGroup) {
15803
15837
  return currentSessionContextGroup.getUserInstance();
15804
15838
  }
15805
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15839
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15806
15840
  const { hasConflict } = await client.dispatch('sessionContextGroup:createIfNeeded', {
15807
15841
  sessionContextGroupId
15808
15842
  });
15809
15843
  if (hasConflict) {
15810
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.`);
15811
15845
  }
15812
- const newSessionContextGroup = new SessionContextGroupClient_1.default(this.wire, __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
15813
- __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);
15814
15848
  return newSessionContextGroup.getUserInstance();
15815
15849
  }
15816
15850
  catch (error) {
@@ -15837,14 +15871,14 @@ class InteropClient extends base_1$3.Base {
15837
15871
  this.wire.sendAction('interop-client-add-ondisconnection-listener').catch((e) => {
15838
15872
  // don't expose, analytics-only call
15839
15873
  });
15840
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15874
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15841
15875
  return client.onDisconnection((event) => {
15842
15876
  const { uuid } = event;
15843
15877
  listener({ type: 'interop-broker', topic: 'disconnected', brokerName: uuid });
15844
15878
  });
15845
15879
  }
15846
15880
  getFDC3Sync(version) {
15847
- 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);
15848
15882
  }
15849
15883
  async getFDC3(version) {
15850
15884
  return this.getFDC3Sync(version);
@@ -15855,7 +15889,7 @@ class InteropClient extends base_1$3.Base {
15855
15889
  * Used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
15856
15890
  */
15857
15891
  static async ferryFdc3Call(interopClient, action, payload) {
15858
- const client = await __classPrivateFieldGet$2(interopClient, _InteropClient_clientPromise, "f");
15892
+ const client = await __classPrivateFieldGet$3(interopClient, _InteropClient_clientPromise, "f");
15859
15893
  return client.dispatch(action, payload || null);
15860
15894
  }
15861
15895
  }
@@ -16233,12 +16267,12 @@ PrivateChannelClient$1.PrivateChannelClient = PrivateChannelClient;
16233
16267
  exports.getIntentResolution = getIntentResolution;
16234
16268
  } (utils$2));
16235
16269
 
16236
- var __classPrivateFieldGet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16270
+ var __classPrivateFieldGet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16237
16271
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
16238
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");
16239
16273
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
16240
16274
  };
16241
- 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) {
16242
16276
  if (kind === "m") throw new TypeError("Private method is not writable");
16243
16277
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
16244
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");
@@ -16256,7 +16290,7 @@ const InteropClient_1$2 = InteropClient$1;
16256
16290
  const isEqual_1 = __importDefault$2(require$$3);
16257
16291
  class FDC3ModuleBase {
16258
16292
  get client() {
16259
- return __classPrivateFieldGet$1(this, _FDC3ModuleBase_producer, "f").call(this);
16293
+ return __classPrivateFieldGet$2(this, _FDC3ModuleBase_producer, "f").call(this);
16260
16294
  }
16261
16295
  get fin() {
16262
16296
  return this.wire.getFin();
@@ -16265,7 +16299,7 @@ class FDC3ModuleBase {
16265
16299
  constructor(producer, wire) {
16266
16300
  this.wire = wire;
16267
16301
  _FDC3ModuleBase_producer.set(this, void 0);
16268
- __classPrivateFieldSet$1(this, _FDC3ModuleBase_producer, producer, "f");
16302
+ __classPrivateFieldSet$2(this, _FDC3ModuleBase_producer, producer, "f");
16269
16303
  }
16270
16304
  /**
16271
16305
  * Broadcasts a context for the channel of the current entity.
@@ -17046,7 +17080,7 @@ Object.defineProperty(Factory$1, "__esModule", { value: true });
17046
17080
  Factory$1.InteropModule = void 0;
17047
17081
  const cloneDeep_1 = __importDefault$1(require$$0$1);
17048
17082
  const inaccessibleObject_1 = inaccessibleObject;
17049
- const base_1$2 = base;
17083
+ const base_1$3 = base;
17050
17084
  const InteropBroker_1 = InteropBroker$1;
17051
17085
  const InteropClient_1 = InteropClient$1;
17052
17086
  const overrideCheck_1 = overrideCheck$1;
@@ -17058,7 +17092,7 @@ const BrokerParamAccessError = 'You have attempted to use or modify InteropBroke
17058
17092
  * Manages creation of Interop Brokers and Interop Clients. These APIs are called under-the-hood in Platforms.
17059
17093
  *
17060
17094
  */
17061
- class InteropModule extends base_1$2.Base {
17095
+ class InteropModule extends base_1$3.Base {
17062
17096
  /**
17063
17097
  * Initializes an Interop Broker. This is called under-the-hood for Platforms.
17064
17098
  *
@@ -17182,13 +17216,13 @@ const channelPrefix = 'snapshot-source-provider-';
17182
17216
  const getSnapshotSourceChannelName = (id) => `${channelPrefix}${id.uuid}`;
17183
17217
  utils.getSnapshotSourceChannelName = getSnapshotSourceChannelName;
17184
17218
 
17185
- var __classPrivateFieldSet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
17219
+ var __classPrivateFieldSet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
17186
17220
  if (kind === "m") throw new TypeError("Private method is not writable");
17187
17221
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
17188
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");
17189
17223
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
17190
17224
  };
17191
- var __classPrivateFieldGet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17225
+ var __classPrivateFieldGet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17192
17226
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
17193
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");
17194
17228
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -17197,7 +17231,7 @@ var _SnapshotSource_identity, _SnapshotSource_getConnection, _SnapshotSource_get
17197
17231
  Object.defineProperty(Instance, "__esModule", { value: true });
17198
17232
  Instance.SnapshotSource = void 0;
17199
17233
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
17200
- const base_1$1 = base;
17234
+ const base_1$2 = base;
17201
17235
  const utils_1$1 = utils;
17202
17236
  const connectionMap = new Map();
17203
17237
  /**
@@ -17206,7 +17240,7 @@ const connectionMap = new Map();
17206
17240
  * @typeParam Snapshot Implementation-defined shape of an application snapshot. Allows
17207
17241
  * custom snapshot implementations for legacy applications to define their own snapshot format.
17208
17242
  */
17209
- class SnapshotSource extends base_1$1.Base {
17243
+ class SnapshotSource extends base_1$2.Base {
17210
17244
  /**
17211
17245
  * @internal
17212
17246
  */
@@ -17220,26 +17254,26 @@ class SnapshotSource extends base_1$1.Base {
17220
17254
  return connectionMap.get(this.identity.uuid);
17221
17255
  });
17222
17256
  _SnapshotSource_getClient.set(this, () => {
17223
- if (!__classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise) {
17224
- __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);
17225
17259
  }
17226
- return __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise;
17260
+ return __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise;
17227
17261
  });
17228
17262
  _SnapshotSource_startConnection.set(this, async () => {
17229
17263
  const channelName = (0, utils_1$1.getSnapshotSourceChannelName)(this.identity);
17230
17264
  try {
17231
- if (!__classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).eventFired) {
17232
- 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);
17233
17267
  }
17234
17268
  const client = await this.fin.InterApplicationBus.Channel.connect(channelName, { wait: false });
17235
17269
  client.onDisconnection(() => {
17236
- __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
17237
- __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;
17238
17272
  });
17239
17273
  return client;
17240
17274
  }
17241
17275
  catch (e) {
17242
- __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
17276
+ __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
17243
17277
  throw new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.");
17244
17278
  }
17245
17279
  });
@@ -17251,7 +17285,7 @@ class SnapshotSource extends base_1$1.Base {
17251
17285
  resolve = y;
17252
17286
  reject = n;
17253
17287
  });
17254
- __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).eventFired = eventFired;
17288
+ __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired = eventFired;
17255
17289
  const listener = async (e) => {
17256
17290
  try {
17257
17291
  if (e.channelName === channelName) {
@@ -17265,10 +17299,10 @@ class SnapshotSource extends base_1$1.Base {
17265
17299
  };
17266
17300
  await this.fin.InterApplicationBus.Channel.on('connected', listener);
17267
17301
  });
17268
- __classPrivateFieldSet(this, _SnapshotSource_identity, id, "f");
17302
+ __classPrivateFieldSet$1(this, _SnapshotSource_identity, id, "f");
17269
17303
  }
17270
17304
  get identity() {
17271
- return __classPrivateFieldGet(this, _SnapshotSource_identity, "f");
17305
+ return __classPrivateFieldGet$1(this, _SnapshotSource_identity, "f");
17272
17306
  }
17273
17307
  /**
17274
17308
  * Method to determine if the SnapshotSource has been initialized.
@@ -17304,11 +17338,11 @@ class SnapshotSource extends base_1$1.Base {
17304
17338
  // eslint-disable-next-line no-async-promise-executor
17305
17339
  try {
17306
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?
17307
- await __classPrivateFieldGet(this, _SnapshotSource_getClient, "f").call(this);
17341
+ await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
17308
17342
  }
17309
17343
  catch (e) {
17310
17344
  // it was not running.
17311
- await __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).eventFired;
17345
+ await __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired;
17312
17346
  }
17313
17347
  }
17314
17348
  /**
@@ -17319,7 +17353,7 @@ class SnapshotSource extends base_1$1.Base {
17319
17353
  this.wire.sendAction('snapshot-source-get-snapshot').catch((e) => {
17320
17354
  // don't expose, analytics-only call
17321
17355
  });
17322
- const client = await __classPrivateFieldGet(this, _SnapshotSource_getClient, "f").call(this);
17356
+ const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
17323
17357
  const response = (await client.dispatch('get-snapshot'));
17324
17358
  return (await response).snapshot;
17325
17359
  }
@@ -17331,7 +17365,7 @@ class SnapshotSource extends base_1$1.Base {
17331
17365
  this.wire.sendAction('snapshot-source-apply-snapshot').catch((e) => {
17332
17366
  // don't expose, analytics-only call
17333
17367
  });
17334
- const client = await __classPrivateFieldGet(this, _SnapshotSource_getClient, "f").call(this);
17368
+ const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
17335
17369
  return client.dispatch('apply-snapshot', { snapshot });
17336
17370
  }
17337
17371
  }
@@ -17340,13 +17374,13 @@ _SnapshotSource_identity = new WeakMap(), _SnapshotSource_getConnection = new We
17340
17374
 
17341
17375
  Object.defineProperty(Factory, "__esModule", { value: true });
17342
17376
  Factory.SnapshotSourceModule = void 0;
17343
- const base_1 = base;
17377
+ const base_1$1 = base;
17344
17378
  const Instance_1 = Instance;
17345
17379
  const utils_1 = utils;
17346
17380
  /**
17347
17381
  * Static namespace for OpenFin API methods that interact with the {@link SnapshotSource} class, available under `fin.SnapshotSource`.
17348
17382
  */
17349
- class SnapshotSourceModule extends base_1.Base {
17383
+ class SnapshotSourceModule extends base_1$1.Base {
17350
17384
  /**
17351
17385
  * Initializes a SnapshotSource with the getSnapshot and applySnapshot methods defined.
17352
17386
  *
@@ -17452,6 +17486,114 @@ Factory.SnapshotSourceModule = SnapshotSourceModule;
17452
17486
  __exportStar(Instance, exports);
17453
17487
  } (snapshotSource));
17454
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
+
17455
17597
  Object.defineProperty(fin$1, "__esModule", { value: true });
17456
17598
  var Fin_1 = fin$1.Fin = void 0;
17457
17599
  const events_1 = require$$0;
@@ -17469,6 +17611,7 @@ const index_10 = platform;
17469
17611
  const me_1 = me;
17470
17612
  const interop_1 = interop;
17471
17613
  const snapshot_source_1 = snapshotSource;
17614
+ const notification_manager_1 = notificationManager;
17472
17615
  /**
17473
17616
  * @internal
17474
17617
  */
@@ -17491,6 +17634,7 @@ class Fin extends events_1.EventEmitter {
17491
17634
  this.View = new index_9.ViewModule(wire);
17492
17635
  this.Interop = new interop_1.InteropModule(wire);
17493
17636
  this.SnapshotSource = new snapshot_source_1.SnapshotSourceModule(wire);
17637
+ this.NotificationManager = new notification_manager_1.NotificationManagerModule(wire);
17494
17638
  wire.registerFin(this);
17495
17639
  this.me = (0, me_1.getMe)(wire);
17496
17640
  // Handle disconnect events