@openfin/remote-adapter 42.100.91 → 42.100.94

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 +429 -282
  2. package/package.json +2 -2
@@ -49,13 +49,13 @@ async function promiseMapSerial(arr, func) {
49
49
  }
50
50
  promises.promiseMapSerial = promiseMapSerial;
51
51
 
52
- var __classPrivateFieldSet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
52
+ var __classPrivateFieldSet$h = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
53
53
  if (kind === "m") throw new TypeError("Private method is not writable");
54
54
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
55
55
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
56
56
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
57
57
  };
58
- var __classPrivateFieldGet$h = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
58
+ var __classPrivateFieldGet$i = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
59
59
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
60
60
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
61
61
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -140,7 +140,7 @@ class EmitterBase extends Base {
140
140
  this.emit = (eventType, payload, ...args) => {
141
141
  return this.hasEmitter() ? this.getOrCreateEmitter().emit(eventType, payload, ...args) : false;
142
142
  };
143
- this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
143
+ this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
144
144
  /**
145
145
  * Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
146
146
  * `once` subscription.
@@ -150,14 +150,14 @@ class EmitterBase extends Base {
150
150
  * which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
151
151
  */
152
152
  this.cleanUpRemovedListener = (eventType, listener) => {
153
- const deregister = __classPrivateFieldGet$h(this, _EmitterBase_deregisterOnceListeners, "f").get(listener);
153
+ const deregister = __classPrivateFieldGet$i(this, _EmitterBase_deregisterOnceListeners, "f").get(listener);
154
154
  if (deregister) {
155
- const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
155
+ const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
156
156
  emitter.removeListener(eventType, deregister);
157
157
  }
158
158
  };
159
159
  this.getOrCreateEmitter = () => {
160
- const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
160
+ const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
161
161
  if (!emitter.listeners('removeListener').includes(this.cleanUpRemovedListener)) {
162
162
  emitter.on('removeListener', this.cleanUpRemovedListener);
163
163
  }
@@ -199,8 +199,8 @@ class EmitterBase extends Base {
199
199
  // This will only be reached if unsubscribe from event that does not exist but do not want to error here
200
200
  return Promise.resolve();
201
201
  };
202
- __classPrivateFieldSet$g(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
203
- __classPrivateFieldSet$g(this, _EmitterBase_deregisterOnceListeners, new WeakMap(), "f");
202
+ __classPrivateFieldSet$h(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
203
+ __classPrivateFieldSet$h(this, _EmitterBase_deregisterOnceListeners, new WeakMap(), "f");
204
204
  this.listeners = (event) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(event) : [];
205
205
  }
206
206
  /**
@@ -229,7 +229,7 @@ class EmitterBase extends Base {
229
229
  */
230
230
  async once(eventType, listener, options) {
231
231
  const deregister = () => this.deregisterEventListener(eventType);
232
- __classPrivateFieldGet$h(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
232
+ __classPrivateFieldGet$i(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
233
233
  await this.registerEventListener(eventType, options, (emitter) => {
234
234
  emitter.once(eventType, deregister);
235
235
  emitter.once(eventType, listener);
@@ -260,7 +260,7 @@ class EmitterBase extends Base {
260
260
  */
261
261
  async prependOnceListener(eventType, listener, options) {
262
262
  const deregister = () => this.deregisterEventListener(eventType);
263
- __classPrivateFieldGet$h(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
263
+ __classPrivateFieldGet$i(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
264
264
  await this.registerEventListener(eventType, options, (emitter) => {
265
265
  emitter.prependOnceListener(eventType, listener);
266
266
  emitter.once(eventType, deregister);
@@ -320,7 +320,7 @@ class EmitterBase extends Base {
320
320
  }
321
321
  deleteEmitterIfNothingRegistered(emitter) {
322
322
  if (emitter.eventNames().every((type) => type === 'removeListener')) {
323
- this.wire.eventAggregator.delete(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
323
+ this.wire.eventAggregator.delete(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
324
324
  }
325
325
  }
326
326
  }
@@ -851,13 +851,13 @@ class AsyncRetryableLazy {
851
851
  }
852
852
  lazy.AsyncRetryableLazy = AsyncRetryableLazy;
853
853
 
854
- var __classPrivateFieldSet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
854
+ var __classPrivateFieldSet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
855
855
  if (kind === "m") throw new TypeError("Private method is not writable");
856
856
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
857
857
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
858
858
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
859
859
  };
860
- var __classPrivateFieldGet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
860
+ var __classPrivateFieldGet$h = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
861
861
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
862
862
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
863
863
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -868,12 +868,12 @@ var __importDefault$6 = (commonjsGlobal && commonjsGlobal.__importDefault) || fu
868
868
  var _InteropBroker_fdc3Info, _InteropBroker_contextGroups, _InteropBroker_providerPromise;
869
869
  Object.defineProperty(InteropBroker$1, "__esModule", { value: true });
870
870
  InteropBroker$1.InteropBroker = void 0;
871
- const base_1$m = base;
871
+ const base_1$n = base;
872
872
  const SessionContextGroupBroker_1 = __importDefault$6(SessionContextGroupBroker$1);
873
873
  const utils_1$7 = utils$3;
874
874
  const isEqual_1$1 = __importDefault$6(require$$3);
875
875
  const PrivateChannelProvider_1 = PrivateChannelProvider$1;
876
- const lazy_1$2 = lazy;
876
+ const lazy_1$3 = lazy;
877
877
  const defaultContextGroups = [
878
878
  {
879
879
  id: 'green',
@@ -1037,7 +1037,7 @@ const defaultContextGroups = [
1037
1037
  * ---
1038
1038
  *
1039
1039
  */
1040
- class InteropBroker extends base_1$m.Base {
1040
+ class InteropBroker extends base_1$n.Base {
1041
1041
  /**
1042
1042
  * @internal
1043
1043
  */
@@ -1048,19 +1048,19 @@ class InteropBroker extends base_1$m.Base {
1048
1048
  _InteropBroker_contextGroups.set(this, void 0);
1049
1049
  _InteropBroker_providerPromise.set(this, void 0);
1050
1050
  this.getProvider = () => {
1051
- return __classPrivateFieldGet$g(this, _InteropBroker_providerPromise, "f").getValue();
1051
+ return __classPrivateFieldGet$h(this, _InteropBroker_providerPromise, "f").getValue();
1052
1052
  };
1053
1053
  this.interopClients = new Map();
1054
1054
  this.contextGroupsById = new Map();
1055
- __classPrivateFieldSet$f(this, _InteropBroker_contextGroups, options.contextGroups ?? [...defaultContextGroups], "f");
1056
- __classPrivateFieldSet$f(this, _InteropBroker_fdc3Info, options.fdc3Info, "f");
1055
+ __classPrivateFieldSet$g(this, _InteropBroker_contextGroups, options.contextGroups ?? [...defaultContextGroups], "f");
1056
+ __classPrivateFieldSet$g(this, _InteropBroker_fdc3Info, options.fdc3Info, "f");
1057
1057
  if (options?.logging) {
1058
1058
  this.logging = options.logging;
1059
1059
  }
1060
1060
  this.intentClientMap = new Map();
1061
1061
  this.lastContextMap = new Map();
1062
1062
  this.sessionContextGroupMap = new Map();
1063
- __classPrivateFieldSet$f(this, _InteropBroker_providerPromise, new lazy_1$2.Lazy(createProvider), "f");
1063
+ __classPrivateFieldSet$g(this, _InteropBroker_providerPromise, new lazy_1$3.Lazy(createProvider), "f");
1064
1064
  this.setContextGroupMap();
1065
1065
  this.setupChannelProvider();
1066
1066
  }
@@ -1328,7 +1328,7 @@ class InteropBroker extends base_1$m.Base {
1328
1328
  // don't expose, analytics-only call
1329
1329
  });
1330
1330
  // Create copy for immutability
1331
- return __classPrivateFieldGet$g(this, _InteropBroker_contextGroups, "f").map((contextGroup) => {
1331
+ return __classPrivateFieldGet$h(this, _InteropBroker_contextGroups, "f").map((contextGroup) => {
1332
1332
  return { ...contextGroup };
1333
1333
  });
1334
1334
  }
@@ -1739,7 +1739,7 @@ class InteropBroker extends base_1$m.Base {
1739
1739
  const { fdc3Version } = payload;
1740
1740
  return {
1741
1741
  fdc3Version,
1742
- ...__classPrivateFieldGet$g(this, _InteropBroker_fdc3Info, "f"),
1742
+ ...__classPrivateFieldGet$h(this, _InteropBroker_fdc3Info, "f"),
1743
1743
  optionalFeatures: {
1744
1744
  OriginatingAppMetadata: false,
1745
1745
  UserChannelMembershipAPIs: true
@@ -2748,8 +2748,8 @@ var main = {};
2748
2748
 
2749
2749
  Object.defineProperty(main, "__esModule", { value: true });
2750
2750
  main.WebContents = void 0;
2751
- const base_1$l = base;
2752
- class WebContents extends base_1$l.EmitterBase {
2751
+ const base_1$m = base;
2752
+ class WebContents extends base_1$m.EmitterBase {
2753
2753
  /**
2754
2754
  * @param identity The identity of the {@link OpenFin.WebContentsEvents WebContents}.
2755
2755
  * @param entityType The type of the {@link OpenFin.WebContentsEvents WebContents}.
@@ -5131,6 +5131,37 @@ function requireInstance$1 () {
5131
5131
  getAllFrames() {
5132
5132
  return this.wire.sendAction('get-all-frames', this.identity).then(({ payload }) => payload.data);
5133
5133
  }
5134
+ /**
5135
+ * Activates the current window and focuses the child entity if it exists. If this does
5136
+ * not succeed - say the child does not belong to this window, or the identity does not exist -
5137
+ * it will return false.
5138
+ *
5139
+ * @example
5140
+ * ```js
5141
+ * const win = fin.Window.wrapSync({ uuid: 'myApp', name: 'myOtherWindow' });
5142
+ *
5143
+ * win.getCurrentViews()
5144
+ * .then(([view1]) => {
5145
+ * return win.activateAndFocus(view1.identity);
5146
+ * })
5147
+ * .then(success => {
5148
+ * if (success) {
5149
+ * console.log('Window activated and child focused');
5150
+ * } else {
5151
+ * console.log('Window activation failed, focus state unchanged');
5152
+ * }
5153
+ * })
5154
+ * .catch(console.error);
5155
+ * ```
5156
+ */
5157
+ activateAndFocus(childIdentityToFocus) {
5158
+ return this.wire
5159
+ .sendAction('activate-window-and-focus', {
5160
+ winIdentity: this.identity,
5161
+ focusIdentity: childIdentityToFocus
5162
+ })
5163
+ .then(({ payload }) => payload.data);
5164
+ }
5134
5165
  /**
5135
5166
  * Gets the current bounds (top, bottom, right, left, width, height) of the window.
5136
5167
  *
@@ -7078,7 +7109,7 @@ var Instance$4 = {};
7078
7109
  Object.defineProperty(Instance$4, "__esModule", { value: true });
7079
7110
  Instance$4._Frame = void 0;
7080
7111
  /* eslint-disable import/prefer-default-export */
7081
- const base_1$k = base;
7112
+ const base_1$l = base;
7082
7113
  /**
7083
7114
  * An iframe represents an embedded HTML page within a parent HTML page. Because this embedded page
7084
7115
  * has its own DOM and global JS context (which may or may not be linked to that of the parent depending
@@ -7099,7 +7130,7 @@ const base_1$k = base;
7099
7130
  * The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
7100
7131
  * (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
7101
7132
  */
7102
- class _Frame extends base_1$k.EmitterBase {
7133
+ class _Frame extends base_1$l.EmitterBase {
7103
7134
  /**
7104
7135
  * @internal
7105
7136
  */
@@ -7145,13 +7176,13 @@ Instance$4._Frame = _Frame;
7145
7176
 
7146
7177
  Object.defineProperty(Factory$5, "__esModule", { value: true });
7147
7178
  Factory$5._FrameModule = void 0;
7148
- const base_1$j = base;
7179
+ const base_1$k = base;
7149
7180
  const validate_1$3 = validate;
7150
7181
  const Instance_1$4 = Instance$4;
7151
7182
  /**
7152
7183
  * Static namespace for OpenFin API methods that interact with the {@link _Frame} class, available under `fin.Frame`.
7153
7184
  */
7154
- class _FrameModule extends base_1$j.Base {
7185
+ class _FrameModule extends base_1$k.Base {
7155
7186
  /**
7156
7187
  * Asynchronously returns an API handle for the given Frame identity.
7157
7188
  *
@@ -7277,7 +7308,7 @@ var Instance$3 = {};
7277
7308
  Object.defineProperty(Instance$3, "__esModule", { value: true });
7278
7309
  Instance$3.ExternalApplication = void 0;
7279
7310
  /* eslint-disable import/prefer-default-export */
7280
- const base_1$i = base;
7311
+ const base_1$j = base;
7281
7312
  /**
7282
7313
  * An ExternalApplication object representing native language adapter connections to the runtime. Allows
7283
7314
  * the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
@@ -7288,7 +7319,7 @@ const base_1$i = base;
7288
7319
  * - Processes started via `System.launchExternalApplication`
7289
7320
  * - Processes monitored via `System.monitorExternalProcess`
7290
7321
  */
7291
- class ExternalApplication extends base_1$i.EmitterBase {
7322
+ class ExternalApplication extends base_1$j.EmitterBase {
7292
7323
  /**
7293
7324
  * @internal
7294
7325
  */
@@ -7316,12 +7347,12 @@ Instance$3.ExternalApplication = ExternalApplication;
7316
7347
 
7317
7348
  Object.defineProperty(Factory$4, "__esModule", { value: true });
7318
7349
  Factory$4.ExternalApplicationModule = void 0;
7319
- const base_1$h = base;
7350
+ const base_1$i = base;
7320
7351
  const Instance_1$3 = Instance$3;
7321
7352
  /**
7322
7353
  * Static namespace for OpenFin API methods that interact with the {@link ExternalApplication} class, available under `fin.ExternalApplication`.
7323
7354
  */
7324
- class ExternalApplicationModule extends base_1$h.Base {
7355
+ class ExternalApplicationModule extends base_1$i.Base {
7325
7356
  /**
7326
7357
  * Asynchronously returns an External Application object that represents an external application.
7327
7358
  * <br>It is possible to wrap a process that does not yet exist, (for example, to listen for startup-related events)
@@ -7549,13 +7580,13 @@ function errorToPOJO(error) {
7549
7580
  }
7550
7581
  errors.errorToPOJO = errorToPOJO;
7551
7582
 
7552
- var __classPrivateFieldSet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7583
+ var __classPrivateFieldSet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7553
7584
  if (kind === "m") throw new TypeError("Private method is not writable");
7554
7585
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
7555
7586
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
7556
7587
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7557
7588
  };
7558
- var __classPrivateFieldGet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7589
+ var __classPrivateFieldGet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7559
7590
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
7560
7591
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
7561
7592
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -7583,19 +7614,19 @@ class Transport extends events_1$5.EventEmitter {
7583
7614
  // Typing as unknown to avoid circular dependency, should not be used directly.
7584
7615
  _Transport_fin.set(this, void 0);
7585
7616
  this.connectSync = () => {
7586
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7617
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7587
7618
  wire.connectSync();
7588
7619
  };
7589
7620
  // This function is only used in our tests.
7590
7621
  this.getPort = () => {
7591
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7622
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7592
7623
  return wire.getPort();
7593
7624
  };
7594
- __classPrivateFieldSet$e(this, _Transport_wire, factory(this.onmessage.bind(this)), "f");
7625
+ __classPrivateFieldSet$f(this, _Transport_wire, factory(this.onmessage.bind(this)), "f");
7595
7626
  this.environment = environment;
7596
- this.sendRaw = __classPrivateFieldGet$f(this, _Transport_wire, "f").send.bind(__classPrivateFieldGet$f(this, _Transport_wire, "f"));
7627
+ this.sendRaw = __classPrivateFieldGet$g(this, _Transport_wire, "f").send.bind(__classPrivateFieldGet$g(this, _Transport_wire, "f"));
7597
7628
  this.registerMessageHandler(this.handleMessage.bind(this));
7598
- __classPrivateFieldGet$f(this, _Transport_wire, "f").on('disconnected', () => {
7629
+ __classPrivateFieldGet$g(this, _Transport_wire, "f").on('disconnected', () => {
7599
7630
  for (const [, { handleNack }] of this.wireListeners) {
7600
7631
  handleNack({ reason: 'Remote connection has closed' });
7601
7632
  }
@@ -7607,24 +7638,24 @@ class Transport extends events_1$5.EventEmitter {
7607
7638
  this.me = (0, me_1$1.getBaseMe)(entityType, uuid, name);
7608
7639
  }
7609
7640
  getFin() {
7610
- if (!__classPrivateFieldGet$f(this, _Transport_fin, "f")) {
7641
+ if (!__classPrivateFieldGet$g(this, _Transport_fin, "f")) {
7611
7642
  throw new Error('No Fin object registered for this transport');
7612
7643
  }
7613
- return __classPrivateFieldGet$f(this, _Transport_fin, "f");
7644
+ return __classPrivateFieldGet$g(this, _Transport_fin, "f");
7614
7645
  }
7615
7646
  registerFin(_fin) {
7616
- if (__classPrivateFieldGet$f(this, _Transport_fin, "f")) {
7647
+ if (__classPrivateFieldGet$g(this, _Transport_fin, "f")) {
7617
7648
  throw new Error('Fin object has already been registered for this transport');
7618
7649
  }
7619
- __classPrivateFieldSet$e(this, _Transport_fin, _fin, "f");
7650
+ __classPrivateFieldSet$f(this, _Transport_fin, _fin, "f");
7620
7651
  }
7621
7652
  shutdown() {
7622
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7653
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7623
7654
  return wire.shutdown();
7624
7655
  }
7625
7656
  async connect(config) {
7626
7657
  if ((0, wire_1.isConfigWithReceiver)(config)) {
7627
- await __classPrivateFieldGet$f(this, _Transport_wire, "f").connect(config.receiver);
7658
+ await __classPrivateFieldGet$g(this, _Transport_wire, "f").connect(config.receiver);
7628
7659
  return this.authorize(config);
7629
7660
  }
7630
7661
  if ((0, wire_1.isRemoteConfig)(config)) {
@@ -7640,13 +7671,13 @@ class Transport extends events_1$5.EventEmitter {
7640
7671
  return undefined;
7641
7672
  }
7642
7673
  async connectRemote(config) {
7643
- await __classPrivateFieldGet$f(this, _Transport_wire, "f").connect(new (this.environment.getWsConstructor())(config.address));
7674
+ await __classPrivateFieldGet$g(this, _Transport_wire, "f").connect(new (this.environment.getWsConstructor())(config.address));
7644
7675
  return this.authorize(config);
7645
7676
  }
7646
7677
  async connectByPort(config) {
7647
7678
  const { address, uuid } = config;
7648
7679
  const reqAuthPayload = { ...config, type: 'file-token' };
7649
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7680
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7650
7681
  await wire.connect(new (this.environment.getWsConstructor())(config.address));
7651
7682
  const requestExtAuthRet = await this.sendAction('request-external-authorization', {
7652
7683
  uuid,
@@ -7682,7 +7713,7 @@ class Transport extends events_1$5.EventEmitter {
7682
7713
  payload,
7683
7714
  messageId
7684
7715
  };
7685
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7716
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7686
7717
  this.addWireListener(messageId, resolve, (payload) => this.nackHandler(payload, reject, callSites), uncorrelated);
7687
7718
  return wire.send(msg).catch(reject);
7688
7719
  });
@@ -7704,7 +7735,7 @@ class Transport extends events_1$5.EventEmitter {
7704
7735
  const resolver = (data) => {
7705
7736
  resolve(data.payload);
7706
7737
  };
7707
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7738
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7708
7739
  return wire
7709
7740
  .send(origData)
7710
7741
  .then(() => this.addWireListener(id, resolver, (payload) => this.nackHandler(payload, reject), false))
@@ -7860,7 +7891,7 @@ var system = {};
7860
7891
  */
7861
7892
  Object.defineProperty(system, "__esModule", { value: true });
7862
7893
  system.System = void 0;
7863
- const base_1$g = base;
7894
+ const base_1$h = base;
7864
7895
  const transport_errors_1$4 = transportErrors;
7865
7896
  const window_1 = requireWindow();
7866
7897
  const events_1$3 = require$$0;
@@ -7870,7 +7901,7 @@ const events_1$3 = require$$0;
7870
7901
  * clearing the cache and exiting the runtime as well as listen to {@link OpenFin.SystemEvents system events}.
7871
7902
  *
7872
7903
  */
7873
- class System extends base_1$g.EmitterBase {
7904
+ class System extends base_1$h.EmitterBase {
7874
7905
  /**
7875
7906
  * @internal
7876
7907
  */
@@ -9760,6 +9791,12 @@ class System extends base_1$g.EmitterBase {
9760
9791
  async serveAsset(options) {
9761
9792
  return (await this.wire.sendAction('serve-asset', { options })).payload.data;
9762
9793
  }
9794
+ /**
9795
+ * Launches the Log Uploader. Full documentation can be found [here](https://resources.here.io/docs/core/develop/debug/log-uploader/).
9796
+ */
9797
+ async launchLogUploader(options) {
9798
+ return (await this.wire.sendAction('launch-log-uploader', { options })).payload.data;
9799
+ }
9763
9800
  }
9764
9801
  system.System = System;
9765
9802
 
@@ -10181,12 +10218,12 @@ class ChannelError extends Error {
10181
10218
  }
10182
10219
  channelError.ChannelError = ChannelError;
10183
10220
 
10184
- var __classPrivateFieldGet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10221
+ var __classPrivateFieldGet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10185
10222
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10186
10223
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10187
10224
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10188
10225
  };
10189
- var __classPrivateFieldSet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10226
+ var __classPrivateFieldSet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10190
10227
  if (kind === "m") throw new TypeError("Private method is not writable");
10191
10228
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10192
10229
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -10230,7 +10267,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
10230
10267
  static closeChannelByEndpointId(id) {
10231
10268
  const channel = channelClientsByEndpointId.get(id);
10232
10269
  if (channel) {
10233
- __classPrivateFieldGet$e(channel, _ChannelClient_close, "f").call(channel);
10270
+ __classPrivateFieldGet$f(channel, _ChannelClient_close, "f").call(channel);
10234
10271
  }
10235
10272
  }
10236
10273
  /**
@@ -10241,7 +10278,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
10241
10278
  for (const channelClient of channelClientsByEndpointId.values()) {
10242
10279
  if (channelClient.providerIdentity.channelId === eventPayload.channelId) {
10243
10280
  channelClient.disconnectListener(eventPayload);
10244
- __classPrivateFieldGet$e(channelClient, _ChannelClient_close, "f").call(channelClient);
10281
+ __classPrivateFieldGet$f(channelClient, _ChannelClient_close, "f").call(channelClient);
10245
10282
  }
10246
10283
  }
10247
10284
  }
@@ -10256,12 +10293,12 @@ class ChannelClient extends channel_1$1.ChannelBase {
10256
10293
  this.processAction = (action, payload, senderIdentity) => super.processAction(action, payload, senderIdentity);
10257
10294
  _ChannelClient_close.set(this, () => {
10258
10295
  channelClientsByEndpointId.delete(this.endpointId);
10259
- __classPrivateFieldGet$e(this, _ChannelClient_strategy, "f").close();
10296
+ __classPrivateFieldGet$f(this, _ChannelClient_strategy, "f").close();
10260
10297
  });
10261
- __classPrivateFieldSet$d(this, _ChannelClient_protectedObj, new channel_1$1.ProtectedItems(routingInfo, close), "f");
10298
+ __classPrivateFieldSet$e(this, _ChannelClient_protectedObj, new channel_1$1.ProtectedItems(routingInfo, close), "f");
10262
10299
  this.disconnectListener = () => undefined;
10263
10300
  this.endpointId = routingInfo.endpointId;
10264
- __classPrivateFieldSet$d(this, _ChannelClient_strategy, strategy, "f");
10301
+ __classPrivateFieldSet$e(this, _ChannelClient_strategy, strategy, "f");
10265
10302
  channelClientsByEndpointId.set(this.endpointId, this);
10266
10303
  strategy.receive(this.processAction);
10267
10304
  }
@@ -10269,7 +10306,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
10269
10306
  * a read-only provider identity
10270
10307
  */
10271
10308
  get providerIdentity() {
10272
- const protectedObj = __classPrivateFieldGet$e(this, _ChannelClient_protectedObj, "f");
10309
+ const protectedObj = __classPrivateFieldGet$f(this, _ChannelClient_protectedObj, "f");
10273
10310
  return protectedObj.providerIdentity;
10274
10311
  }
10275
10312
  /**
@@ -10298,9 +10335,9 @@ class ChannelClient extends channel_1$1.ChannelBase {
10298
10335
  * ```
10299
10336
  */
10300
10337
  async dispatch(action, payload) {
10301
- if (__classPrivateFieldGet$e(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
10338
+ if (__classPrivateFieldGet$f(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
10302
10339
  const callSites = transport_errors_1$1.RuntimeError.getCallSite();
10303
- return __classPrivateFieldGet$e(this, _ChannelClient_strategy, "f").send(this.providerIdentity.channelId, action, payload).catch((e) => {
10340
+ return __classPrivateFieldGet$f(this, _ChannelClient_strategy, "f").send(this.providerIdentity.channelId, action, payload).catch((e) => {
10304
10341
  throw new channel_error_1$1.ChannelError(e, action, payload, callSites);
10305
10342
  });
10306
10343
  }
@@ -10352,10 +10389,10 @@ class ChannelClient extends channel_1$1.ChannelBase {
10352
10389
  */
10353
10390
  async disconnect() {
10354
10391
  await this.sendDisconnectAction();
10355
- __classPrivateFieldGet$e(this, _ChannelClient_close, "f").call(this);
10392
+ __classPrivateFieldGet$f(this, _ChannelClient_close, "f").call(this);
10356
10393
  }
10357
10394
  async sendDisconnectAction() {
10358
- const protectedObj = __classPrivateFieldGet$e(this, _ChannelClient_protectedObj, "f");
10395
+ const protectedObj = __classPrivateFieldGet$f(this, _ChannelClient_protectedObj, "f");
10359
10396
  await protectedObj.close();
10360
10397
  }
10361
10398
  /**
@@ -10388,13 +10425,13 @@ exhaustive.exhaustiveCheck = exhaustiveCheck;
10388
10425
 
10389
10426
  var strategy$3 = {};
10390
10427
 
10391
- var __classPrivateFieldSet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10428
+ var __classPrivateFieldSet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10392
10429
  if (kind === "m") throw new TypeError("Private method is not writable");
10393
10430
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10394
10431
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
10395
10432
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
10396
10433
  };
10397
- var __classPrivateFieldGet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10434
+ var __classPrivateFieldGet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10398
10435
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10399
10436
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10400
10437
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -10419,7 +10456,7 @@ class ClassicStrategy {
10419
10456
  // connection problems occur
10420
10457
  _ClassicStrategy_pendingMessagesByEndpointId.set(this, new Map());
10421
10458
  this.send = async (endpointId, action, payload) => {
10422
- const to = __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10459
+ const to = __classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10423
10460
  if (!to) {
10424
10461
  throw new Error(`Could not locate routing info for endpoint ${endpointId}`);
10425
10462
  }
@@ -10431,13 +10468,13 @@ class ClassicStrategy {
10431
10468
  }
10432
10469
  delete cleanId.isLocalEndpointId;
10433
10470
  // grab the promise before awaiting it to save in our pending messages map
10434
- const p = __classPrivateFieldGet$d(this, _ClassicStrategy_wire, "f").sendAction('send-channel-message', {
10471
+ const p = __classPrivateFieldGet$e(this, _ClassicStrategy_wire, "f").sendAction('send-channel-message', {
10435
10472
  ...cleanId,
10436
10473
  providerIdentity: this.providerIdentity,
10437
10474
  action,
10438
10475
  payload
10439
10476
  });
10440
- __classPrivateFieldGet$d(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
10477
+ __classPrivateFieldGet$e(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
10441
10478
  const raw = await p
10442
10479
  .catch((error) => {
10443
10480
  if ('cause' in error) {
@@ -10447,16 +10484,16 @@ class ClassicStrategy {
10447
10484
  })
10448
10485
  .finally(() => {
10449
10486
  // clean up the pending promise
10450
- __classPrivateFieldGet$d(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
10487
+ __classPrivateFieldGet$e(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
10451
10488
  });
10452
10489
  return raw.payload.data.result;
10453
10490
  };
10454
10491
  this.close = async () => {
10455
10492
  this.messageReceiver.removeEndpoint(this.providerIdentity.channelId, this.endpointId);
10456
- [...__classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
10457
- __classPrivateFieldSet$c(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
10493
+ [...__classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
10494
+ __classPrivateFieldSet$d(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
10458
10495
  };
10459
- __classPrivateFieldSet$c(this, _ClassicStrategy_wire, wire, "f");
10496
+ __classPrivateFieldSet$d(this, _ClassicStrategy_wire, wire, "f");
10460
10497
  }
10461
10498
  onEndpointDisconnect(endpointId, listener) {
10462
10499
  // Never fires for 'classic'.
@@ -10465,20 +10502,20 @@ class ClassicStrategy {
10465
10502
  this.messageReceiver.addEndpoint(listener, this.providerIdentity.channelId, this.endpointId);
10466
10503
  }
10467
10504
  async closeEndpoint(endpointId) {
10468
- const id = __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10469
- __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
10470
- const pendingSet = __classPrivateFieldGet$d(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId);
10505
+ const id = __classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10506
+ __classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
10507
+ const pendingSet = __classPrivateFieldGet$e(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId);
10471
10508
  pendingSet?.forEach((p) => {
10472
10509
  const errorMsg = `Channel connection with identity uuid: ${id?.uuid} / name: ${id?.name} / endpointId: ${endpointId} no longer connected.`;
10473
10510
  p.cancel(new Error(errorMsg));
10474
10511
  });
10475
10512
  }
10476
10513
  isEndpointConnected(endpointId) {
10477
- return __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").has(endpointId);
10514
+ return __classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").has(endpointId);
10478
10515
  }
10479
10516
  addEndpoint(endpointId, payload) {
10480
- __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").set(endpointId, payload.endpointIdentity);
10481
- __classPrivateFieldGet$d(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").set(endpointId, new Set());
10517
+ __classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").set(endpointId, payload.endpointIdentity);
10518
+ __classPrivateFieldGet$e(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").set(endpointId, new Set());
10482
10519
  }
10483
10520
  isValidEndpointPayload(payload) {
10484
10521
  return (typeof payload?.endpointIdentity?.endpointId === 'string' ||
@@ -10494,12 +10531,12 @@ var strategy$2 = {};
10494
10531
 
10495
10532
  var endpoint = {};
10496
10533
 
10497
- var __classPrivateFieldGet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10534
+ var __classPrivateFieldGet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10498
10535
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10499
10536
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10500
10537
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10501
10538
  };
10502
- var __classPrivateFieldSet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10539
+ var __classPrivateFieldSet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10503
10540
  if (kind === "m") throw new TypeError("Private method is not writable");
10504
10541
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10505
10542
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -10534,8 +10571,8 @@ class RTCEndpoint {
10534
10571
  if (this.rtc.rtcClient.connectionState !== 'connected') {
10535
10572
  this.rtc.rtcClient.removeEventListener('connectionstatechange', this.connectionStateChangeHandler);
10536
10573
  this.close();
10537
- if (__classPrivateFieldGet$c(this, _RTCEndpoint_disconnectListener, "f")) {
10538
- __classPrivateFieldGet$c(this, _RTCEndpoint_disconnectListener, "f").call(this);
10574
+ if (__classPrivateFieldGet$d(this, _RTCEndpoint_disconnectListener, "f")) {
10575
+ __classPrivateFieldGet$d(this, _RTCEndpoint_disconnectListener, "f").call(this);
10539
10576
  }
10540
10577
  }
10541
10578
  };
@@ -10583,9 +10620,9 @@ class RTCEndpoint {
10583
10620
  data = new TextDecoder().decode(e.data);
10584
10621
  }
10585
10622
  const { messageId, action, payload } = JSON.parse(data);
10586
- if (__classPrivateFieldGet$c(this, _RTCEndpoint_processAction, "f")) {
10623
+ if (__classPrivateFieldGet$d(this, _RTCEndpoint_processAction, "f")) {
10587
10624
  try {
10588
- const res = await __classPrivateFieldGet$c(this, _RTCEndpoint_processAction, "f").call(this, action, payload, endpointIdentity);
10625
+ const res = await __classPrivateFieldGet$d(this, _RTCEndpoint_processAction, "f").call(this, action, payload, endpointIdentity);
10589
10626
  this.rtc.channels.response.send(JSON.stringify({
10590
10627
  messageId,
10591
10628
  payload: res,
@@ -10619,25 +10656,25 @@ class RTCEndpoint {
10619
10656
  datachannel.onclose = (e) => {
10620
10657
  [...this.responseMap.values()].forEach((promise) => promise.reject(new Error('RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.')));
10621
10658
  this.close();
10622
- if (__classPrivateFieldGet$c(this, _RTCEndpoint_disconnectListener, "f")) {
10623
- __classPrivateFieldGet$c(this, _RTCEndpoint_disconnectListener, "f").call(this);
10659
+ if (__classPrivateFieldGet$d(this, _RTCEndpoint_disconnectListener, "f")) {
10660
+ __classPrivateFieldGet$d(this, _RTCEndpoint_disconnectListener, "f").call(this);
10624
10661
  }
10625
10662
  };
10626
10663
  });
10627
10664
  }
10628
10665
  onDisconnect(listener) {
10629
- if (!__classPrivateFieldGet$c(this, _RTCEndpoint_disconnectListener, "f")) {
10630
- __classPrivateFieldSet$b(this, _RTCEndpoint_disconnectListener, listener, "f");
10666
+ if (!__classPrivateFieldGet$d(this, _RTCEndpoint_disconnectListener, "f")) {
10667
+ __classPrivateFieldSet$c(this, _RTCEndpoint_disconnectListener, listener, "f");
10631
10668
  }
10632
10669
  else {
10633
10670
  throw new Error('RTCEndpoint disconnectListener cannot be set twice.');
10634
10671
  }
10635
10672
  }
10636
10673
  receive(listener) {
10637
- if (__classPrivateFieldGet$c(this, _RTCEndpoint_processAction, "f")) {
10674
+ if (__classPrivateFieldGet$d(this, _RTCEndpoint_processAction, "f")) {
10638
10675
  throw new Error('You have already set a listener for this RTC Endpoint.');
10639
10676
  }
10640
- __classPrivateFieldSet$b(this, _RTCEndpoint_processAction, listener, "f");
10677
+ __classPrivateFieldSet$c(this, _RTCEndpoint_processAction, listener, "f");
10641
10678
  }
10642
10679
  get connected() {
10643
10680
  return this.rtc.rtcClient.connectionState === 'connected';
@@ -10648,12 +10685,12 @@ _RTCEndpoint_processAction = new WeakMap(), _RTCEndpoint_disconnectListener = ne
10648
10685
 
10649
10686
  var strategy$1 = {};
10650
10687
 
10651
- var __classPrivateFieldGet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10688
+ var __classPrivateFieldGet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10652
10689
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10653
10690
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10654
10691
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10655
10692
  };
10656
- var __classPrivateFieldSet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10693
+ var __classPrivateFieldSet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10657
10694
  if (kind === "m") throw new TypeError("Private method is not writable");
10658
10695
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10659
10696
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -10674,11 +10711,11 @@ class EndpointStrategy {
10674
10711
  return this.getEndpointById(endpointId).send(action, payload);
10675
10712
  };
10676
10713
  this.close = async () => {
10677
- if (__classPrivateFieldGet$b(this, _EndpointStrategy_connected, "f")) {
10678
- __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
10679
- __classPrivateFieldSet$a(this, _EndpointStrategy_endpointMap, new Map(), "f");
10714
+ if (__classPrivateFieldGet$c(this, _EndpointStrategy_connected, "f")) {
10715
+ __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
10716
+ __classPrivateFieldSet$b(this, _EndpointStrategy_endpointMap, new Map(), "f");
10680
10717
  }
10681
- __classPrivateFieldSet$a(this, _EndpointStrategy_connected, false, "f");
10718
+ __classPrivateFieldSet$b(this, _EndpointStrategy_connected, false, "f");
10682
10719
  };
10683
10720
  this.isValidEndpointPayload = validateEndpoint;
10684
10721
  }
@@ -10686,39 +10723,39 @@ class EndpointStrategy {
10686
10723
  this.getEndpointById(endpointId).onDisconnect(listener);
10687
10724
  }
10688
10725
  receive(listener) {
10689
- if (__classPrivateFieldGet$b(this, _EndpointStrategy_processAction, "f")) {
10726
+ if (__classPrivateFieldGet$c(this, _EndpointStrategy_processAction, "f")) {
10690
10727
  throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);
10691
10728
  }
10692
- __classPrivateFieldSet$a(this, _EndpointStrategy_processAction, listener, "f");
10729
+ __classPrivateFieldSet$b(this, _EndpointStrategy_processAction, listener, "f");
10693
10730
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
10694
- __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.receive(__classPrivateFieldGet$b(this, _EndpointStrategy_processAction, "f")));
10731
+ __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.receive(__classPrivateFieldGet$c(this, _EndpointStrategy_processAction, "f")));
10695
10732
  }
10696
10733
  getEndpointById(endpointId) {
10697
- const endpoint = __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").get(endpointId);
10734
+ const endpoint = __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").get(endpointId);
10698
10735
  if (!endpoint) {
10699
10736
  throw new Error(`Client with endpoint id ${endpointId} is not connected`);
10700
10737
  }
10701
10738
  return endpoint;
10702
10739
  }
10703
10740
  get connected() {
10704
- return __classPrivateFieldGet$b(this, _EndpointStrategy_connected, "f");
10741
+ return __classPrivateFieldGet$c(this, _EndpointStrategy_connected, "f");
10705
10742
  }
10706
10743
  isEndpointConnected(endpointId) {
10707
- return __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").has(endpointId);
10744
+ return __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").has(endpointId);
10708
10745
  }
10709
10746
  addEndpoint(endpointId, payload) {
10710
- if (!__classPrivateFieldGet$b(this, _EndpointStrategy_connected, "f")) {
10747
+ if (!__classPrivateFieldGet$c(this, _EndpointStrategy_connected, "f")) {
10711
10748
  console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);
10712
10749
  return;
10713
10750
  }
10714
10751
  const clientStrat = new this.EndpointType(payload);
10715
- if (__classPrivateFieldGet$b(this, _EndpointStrategy_processAction, "f")) {
10716
- clientStrat.receive(__classPrivateFieldGet$b(this, _EndpointStrategy_processAction, "f"));
10752
+ if (__classPrivateFieldGet$c(this, _EndpointStrategy_processAction, "f")) {
10753
+ clientStrat.receive(__classPrivateFieldGet$c(this, _EndpointStrategy_processAction, "f"));
10717
10754
  }
10718
- __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").set(endpointId, clientStrat);
10755
+ __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").set(endpointId, clientStrat);
10719
10756
  }
10720
10757
  async closeEndpoint(endpointId) {
10721
- __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").delete(endpointId);
10758
+ __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").delete(endpointId);
10722
10759
  }
10723
10760
  }
10724
10761
  strategy$1.EndpointStrategy = EndpointStrategy;
@@ -10745,11 +10782,11 @@ var iceManager = {};
10745
10782
 
10746
10783
  Object.defineProperty(iceManager, "__esModule", { value: true });
10747
10784
  iceManager.RTCICEManager = void 0;
10748
- const base_1$f = base;
10785
+ const base_1$g = base;
10749
10786
  /*
10750
10787
  Singleton that facilitates Offer and Answer exchange required for establishing RTC connections.
10751
10788
  */
10752
- class RTCICEManager extends base_1$f.EmitterBase {
10789
+ class RTCICEManager extends base_1$g.EmitterBase {
10753
10790
  constructor(wire) {
10754
10791
  super(wire, 'channel');
10755
10792
  this.ensureChannelOpened = (channel) => {
@@ -10900,12 +10937,12 @@ function runtimeUuidMeetsMinimumRuntimeVersion(runtimeUuid, minVersion) {
10900
10937
  }
10901
10938
  runtimeVersioning.runtimeUuidMeetsMinimumRuntimeVersion = runtimeUuidMeetsMinimumRuntimeVersion;
10902
10939
 
10903
- var __classPrivateFieldGet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10940
+ var __classPrivateFieldGet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10904
10941
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10905
10942
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10906
10943
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10907
10944
  };
10908
- var __classPrivateFieldSet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10945
+ var __classPrivateFieldSet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10909
10946
  if (kind === "m") throw new TypeError("Private method is not writable");
10910
10947
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10911
10948
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -10949,19 +10986,19 @@ class ChannelProvider extends channel_1.ChannelBase {
10949
10986
  * a read-only array containing all the identities of connecting clients.
10950
10987
  */
10951
10988
  get connections() {
10952
- return [...__classPrivateFieldGet$a(this, _ChannelProvider_connections, "f")];
10989
+ return [...__classPrivateFieldGet$b(this, _ChannelProvider_connections, "f")];
10953
10990
  }
10954
10991
  static handleClientDisconnection(channel, payload) {
10955
10992
  if (payload?.endpointId) {
10956
10993
  const { uuid, name, endpointId, isLocalEndpointId } = payload;
10957
- __classPrivateFieldGet$a(channel, _ChannelProvider_removeEndpoint, "f").call(channel, { uuid, name, endpointId, isLocalEndpointId });
10994
+ __classPrivateFieldGet$b(channel, _ChannelProvider_removeEndpoint, "f").call(channel, { uuid, name, endpointId, isLocalEndpointId });
10958
10995
  }
10959
10996
  else {
10960
10997
  // this is here to support older runtimes that did not have endpointId
10961
10998
  const multipleRemoves = channel.connections.filter((identity) => {
10962
10999
  return identity.uuid === payload.uuid && identity.name === payload.name;
10963
11000
  });
10964
- multipleRemoves.forEach(__classPrivateFieldGet$a(channel, _ChannelProvider_removeEndpoint, "f"));
11001
+ multipleRemoves.forEach(__classPrivateFieldGet$b(channel, _ChannelProvider_removeEndpoint, "f"));
10965
11002
  }
10966
11003
  channel.disconnectListener(payload);
10967
11004
  }
@@ -10978,8 +11015,8 @@ class ChannelProvider extends channel_1.ChannelBase {
10978
11015
  _ChannelProvider_strategy.set(this, void 0);
10979
11016
  _ChannelProvider_removeEndpoint.set(this, (identity) => {
10980
11017
  const remainingConnections = this.connections.filter((clientIdentity) => clientIdentity.endpointId !== identity.endpointId);
10981
- __classPrivateFieldGet$a(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
10982
- __classPrivateFieldSet$9(this, _ChannelProvider_connections, remainingConnections, "f");
11018
+ __classPrivateFieldGet$b(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
11019
+ __classPrivateFieldSet$a(this, _ChannelProvider_connections, remainingConnections, "f");
10983
11020
  });
10984
11021
  // Must be bound.
10985
11022
  this.processAction = async (action, payload, senderIdentity) => {
@@ -10993,17 +11030,17 @@ class ChannelProvider extends channel_1.ChannelBase {
10993
11030
  return super.processAction(action, payload, senderIdentity);
10994
11031
  };
10995
11032
  _ChannelProvider_close.set(this, () => {
10996
- __classPrivateFieldGet$a(this, _ChannelProvider_strategy, "f").close();
11033
+ __classPrivateFieldGet$b(this, _ChannelProvider_strategy, "f").close();
10997
11034
  const remove = ChannelProvider.removalMap.get(this);
10998
11035
  if (remove) {
10999
11036
  remove();
11000
11037
  }
11001
11038
  });
11002
- __classPrivateFieldSet$9(this, _ChannelProvider_protectedObj, new channel_1.ProtectedItems(providerIdentity, close), "f");
11039
+ __classPrivateFieldSet$a(this, _ChannelProvider_protectedObj, new channel_1.ProtectedItems(providerIdentity, close), "f");
11003
11040
  this.connectListener = () => undefined;
11004
11041
  this.disconnectListener = () => undefined;
11005
- __classPrivateFieldSet$9(this, _ChannelProvider_connections, [], "f");
11006
- __classPrivateFieldSet$9(this, _ChannelProvider_strategy, strategy, "f");
11042
+ __classPrivateFieldSet$a(this, _ChannelProvider_connections, [], "f");
11043
+ __classPrivateFieldSet$a(this, _ChannelProvider_strategy, strategy, "f");
11007
11044
  strategy.receive(this.processAction);
11008
11045
  }
11009
11046
  /**
@@ -11034,16 +11071,16 @@ class ChannelProvider extends channel_1.ChannelBase {
11034
11071
  */
11035
11072
  dispatch(to, action, payload) {
11036
11073
  const endpointId = to.endpointId ?? this.getEndpointIdForOpenFinId(to, action);
11037
- if (endpointId && __classPrivateFieldGet$a(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
11074
+ if (endpointId && __classPrivateFieldGet$b(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
11038
11075
  const callSites = transport_errors_1.RuntimeError.getCallSite();
11039
- return __classPrivateFieldGet$a(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload).catch((e) => {
11076
+ return __classPrivateFieldGet$b(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload).catch((e) => {
11040
11077
  throw new channel_error_1.ChannelError(e, action, payload, callSites);
11041
11078
  });
11042
11079
  }
11043
11080
  return Promise.reject(new Error(`Client connection with identity uuid: ${to.uuid} / name: ${to.name} / endpointId: ${endpointId} no longer connected.`));
11044
11081
  }
11045
11082
  async processConnection(senderId, payload) {
11046
- __classPrivateFieldGet$a(this, _ChannelProvider_connections, "f").push(senderId);
11083
+ __classPrivateFieldGet$b(this, _ChannelProvider_connections, "f").push(senderId);
11047
11084
  return this.connectListener(senderId, payload);
11048
11085
  }
11049
11086
  /**
@@ -11066,7 +11103,7 @@ class ChannelProvider extends channel_1.ChannelBase {
11066
11103
  * ```
11067
11104
  */
11068
11105
  publish(action, payload) {
11069
- return this.connections.map((to) => __classPrivateFieldGet$a(this, _ChannelProvider_strategy, "f").send(to.endpointId, action, payload));
11106
+ return this.connections.map((to) => __classPrivateFieldGet$b(this, _ChannelProvider_strategy, "f").send(to.endpointId, action, payload));
11070
11107
  }
11071
11108
  /**
11072
11109
  * Register a listener that is called on every new client connection.
@@ -11140,11 +11177,11 @@ class ChannelProvider extends channel_1.ChannelBase {
11140
11177
  * ```
11141
11178
  */
11142
11179
  async destroy() {
11143
- const protectedObj = __classPrivateFieldGet$a(this, _ChannelProvider_protectedObj, "f");
11180
+ const protectedObj = __classPrivateFieldGet$b(this, _ChannelProvider_protectedObj, "f");
11144
11181
  protectedObj.providerIdentity;
11145
- __classPrivateFieldSet$9(this, _ChannelProvider_connections, [], "f");
11182
+ __classPrivateFieldSet$a(this, _ChannelProvider_connections, [], "f");
11146
11183
  await protectedObj.close();
11147
- __classPrivateFieldGet$a(this, _ChannelProvider_close, "f").call(this);
11184
+ __classPrivateFieldGet$b(this, _ChannelProvider_close, "f").call(this);
11148
11185
  }
11149
11186
  /**
11150
11187
  * Returns an array with info on every Client connected to the Provider
@@ -11214,7 +11251,7 @@ class ChannelProvider extends channel_1.ChannelBase {
11214
11251
  getEndpointIdForOpenFinId(clientIdentity, action) {
11215
11252
  const matchingConnections = this.connections.filter((c) => c.name === clientIdentity.name && c.uuid === clientIdentity.uuid);
11216
11253
  if (matchingConnections.length >= 2) {
11217
- const protectedObj = __classPrivateFieldGet$a(this, _ChannelProvider_protectedObj, "f");
11254
+ const protectedObj = __classPrivateFieldGet$b(this, _ChannelProvider_protectedObj, "f");
11218
11255
  const { uuid, name } = clientIdentity;
11219
11256
  const providerUuid = protectedObj?.providerIdentity.uuid;
11220
11257
  const providerName = protectedObj?.providerIdentity.name;
@@ -11250,14 +11287,14 @@ var messageReceiver = {};
11250
11287
  Object.defineProperty(messageReceiver, "__esModule", { value: true });
11251
11288
  messageReceiver.MessageReceiver = void 0;
11252
11289
  const client_1$1 = client;
11253
- const base_1$e = base;
11290
+ const base_1$f = base;
11254
11291
  const errors_1 = errors;
11255
11292
  /*
11256
11293
  This is a singleton (per fin object) tasked with routing messages coming off the ipc to the correct endpoint.
11257
11294
  It needs to be a singleton because there can only be one per wire. It tracks both clients and providers' processAction passed in via the strategy.
11258
11295
  If functionality is not about receiving messages, it does not belong here.
11259
11296
  */
11260
- class MessageReceiver extends base_1$e.Base {
11297
+ class MessageReceiver extends base_1$f.Base {
11261
11298
  constructor(wire) {
11262
11299
  super(wire);
11263
11300
  this.onmessage = (msg) => {
@@ -11426,13 +11463,13 @@ class CombinedStrategy {
11426
11463
  }
11427
11464
  strategy.default = CombinedStrategy;
11428
11465
 
11429
- var __classPrivateFieldSet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11466
+ var __classPrivateFieldSet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11430
11467
  if (kind === "m") throw new TypeError("Private method is not writable");
11431
11468
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
11432
11469
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
11433
11470
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11434
11471
  };
11435
- var __classPrivateFieldGet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11472
+ var __classPrivateFieldGet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11436
11473
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
11437
11474
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11438
11475
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -11444,7 +11481,7 @@ var _ConnectionManager_messageReceiver, _ConnectionManager_rtcConnectionManager;
11444
11481
  Object.defineProperty(connectionManager, "__esModule", { value: true });
11445
11482
  connectionManager.ConnectionManager = void 0;
11446
11483
  const exhaustive_1 = exhaustive;
11447
- const base_1$d = base;
11484
+ const base_1$e = base;
11448
11485
  const strategy_1 = strategy$3;
11449
11486
  const strategy_2 = strategy$2;
11450
11487
  const ice_manager_1 = iceManager;
@@ -11452,7 +11489,7 @@ const provider_1$1 = provider;
11452
11489
  const message_receiver_1 = messageReceiver;
11453
11490
  const protocol_manager_1 = protocolManager;
11454
11491
  const strategy_3 = __importDefault$4(strategy);
11455
- class ConnectionManager extends base_1$d.Base {
11492
+ class ConnectionManager extends base_1$e.Base {
11456
11493
  static getProtocolOptionsFromStrings(protocols) {
11457
11494
  return protocols.map((protocol) => {
11458
11495
  switch (protocol) {
@@ -11481,8 +11518,8 @@ class ConnectionManager extends base_1$d.Base {
11481
11518
  };
11482
11519
  this.providerMap = new Map();
11483
11520
  this.protocolManager = new protocol_manager_1.ProtocolManager(this.wire.environment.type === 'node' ? ['classic'] : ['rtc', 'classic']);
11484
- __classPrivateFieldSet$8(this, _ConnectionManager_messageReceiver, new message_receiver_1.MessageReceiver(wire), "f");
11485
- __classPrivateFieldSet$8(this, _ConnectionManager_rtcConnectionManager, new ice_manager_1.RTCICEManager(wire), "f");
11521
+ __classPrivateFieldSet$9(this, _ConnectionManager_messageReceiver, new message_receiver_1.MessageReceiver(wire), "f");
11522
+ __classPrivateFieldSet$9(this, _ConnectionManager_rtcConnectionManager, new ice_manager_1.RTCICEManager(wire), "f");
11486
11523
  wire.registerMessageHandler(this.onmessage.bind(this));
11487
11524
  }
11488
11525
  createProvider(options, providerIdentity) {
@@ -11493,7 +11530,7 @@ class ConnectionManager extends base_1$d.Base {
11493
11530
  case 'rtc':
11494
11531
  return new strategy_2.RTCStrategy();
11495
11532
  case 'classic':
11496
- return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$9(this, _ConnectionManager_messageReceiver, "f"),
11533
+ return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$a(this, _ConnectionManager_messageReceiver, "f"),
11497
11534
  // Providers do not have an endpointId, use channelId as endpointId in the strategy.
11498
11535
  providerIdentity.channelId, providerIdentity);
11499
11536
  default:
@@ -11529,7 +11566,7 @@ class ConnectionManager extends base_1$d.Base {
11529
11566
  const supportedProtocols = await Promise.all(protocols.map(async (type) => {
11530
11567
  switch (type) {
11531
11568
  case 'rtc': {
11532
- const { rtcClient, channels, offer, rtcConnectionId, channelsOpened } = await __classPrivateFieldGet$9(this, _ConnectionManager_rtcConnectionManager, "f").startClientOffer();
11569
+ const { rtcClient, channels, offer, rtcConnectionId, channelsOpened } = await __classPrivateFieldGet$a(this, _ConnectionManager_rtcConnectionManager, "f").startClientOffer();
11533
11570
  rtcPacket = { rtcClient, channels, channelsOpened };
11534
11571
  return {
11535
11572
  type: 'rtc',
@@ -11556,18 +11593,18 @@ class ConnectionManager extends base_1$d.Base {
11556
11593
  routingInfo.endpointId = this.wire.environment.getNextMessageId();
11557
11594
  // For New Clients connecting to Old Providers. To prevent multi-dispatching and publishing, we delete previously-connected
11558
11595
  // clients that are in the same context as the newly-connected client.
11559
- __classPrivateFieldGet$9(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
11596
+ __classPrivateFieldGet$a(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
11560
11597
  }
11561
11598
  const answer = routingInfo.answer ?? {
11562
11599
  supportedProtocols: [{ type: 'classic', version: 1 }]
11563
11600
  };
11564
11601
  const createStrategyFromAnswer = async (protocol) => {
11565
11602
  if (protocol.type === 'rtc' && rtcPacket) {
11566
- await __classPrivateFieldGet$9(this, _ConnectionManager_rtcConnectionManager, "f").finishClientOffer(rtcPacket.rtcClient, protocol.payload.answer, rtcPacket.channelsOpened);
11603
+ await __classPrivateFieldGet$a(this, _ConnectionManager_rtcConnectionManager, "f").finishClientOffer(rtcPacket.rtcClient, protocol.payload.answer, rtcPacket.channelsOpened);
11567
11604
  return new strategy_2.RTCStrategy();
11568
11605
  }
11569
11606
  if (protocol.type === 'classic') {
11570
- return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$9(this, _ConnectionManager_messageReceiver, "f"), routingInfo.endpointId, routingInfo);
11607
+ return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$a(this, _ConnectionManager_messageReceiver, "f"), routingInfo.endpointId, routingInfo);
11571
11608
  }
11572
11609
  return null;
11573
11610
  };
@@ -11635,7 +11672,7 @@ class ConnectionManager extends base_1$d.Base {
11635
11672
  clientAnswer = await overlappingProtocols.reduce(async (accumP, protocolToUse) => {
11636
11673
  const answer = await accumP;
11637
11674
  if (protocolToUse.type === 'rtc') {
11638
- const { answer: rtcAnswer, rtcClient, channels } = await __classPrivateFieldGet$9(this, _ConnectionManager_rtcConnectionManager, "f").createProviderAnswer(protocolToUse.payload.rtcConnectionId, protocolToUse.payload.offer);
11675
+ const { answer: rtcAnswer, rtcClient, channels } = await __classPrivateFieldGet$a(this, _ConnectionManager_rtcConnectionManager, "f").createProviderAnswer(protocolToUse.payload.rtcConnectionId, protocolToUse.payload.offer);
11639
11676
  answer.supportedProtocols.push({
11640
11677
  type: 'rtc',
11641
11678
  version: strategy_2.RTCInfo.version,
@@ -11683,13 +11720,13 @@ _ConnectionManager_messageReceiver = new WeakMap(), _ConnectionManager_rtcConnec
11683
11720
  *
11684
11721
  * @packageDocumentation
11685
11722
  */
11686
- var __classPrivateFieldSet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11723
+ var __classPrivateFieldSet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11687
11724
  if (kind === "m") throw new TypeError("Private method is not writable");
11688
11725
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
11689
11726
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
11690
11727
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11691
11728
  };
11692
- var __classPrivateFieldGet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11729
+ var __classPrivateFieldGet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11693
11730
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
11694
11731
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11695
11732
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -11699,8 +11736,8 @@ Object.defineProperty(channel$1, "__esModule", { value: true });
11699
11736
  channel$1.Channel = void 0;
11700
11737
  /* eslint-disable no-console */
11701
11738
  const events_1$2 = require$$0;
11702
- const lazy_1$1 = lazy;
11703
- const base_1$c = base;
11739
+ const lazy_1$2 = lazy;
11740
+ const base_1$d = base;
11704
11741
  const client_1 = client;
11705
11742
  const connection_manager_1 = connectionManager;
11706
11743
  const provider_1 = provider;
@@ -11731,7 +11768,7 @@ function retryDelay(count) {
11731
11768
  * * {@link Channel.onChannelConnect onChannelConnect(listener)}
11732
11769
  * * {@link Channel.onChannelDisconnect onChannelDisconnect(listener)}
11733
11770
  */
11734
- class Channel extends base_1$c.EmitterBase {
11771
+ class Channel extends base_1$d.EmitterBase {
11735
11772
  /**
11736
11773
  * @internal
11737
11774
  */
@@ -11740,17 +11777,17 @@ class Channel extends base_1$c.EmitterBase {
11740
11777
  _Channel_connectionManager.set(this, void 0);
11741
11778
  _Channel_internalEmitter.set(this, new events_1$2.EventEmitter());
11742
11779
  // OpenFin API has not been injected at construction time, *must* wait for API to be ready.
11743
- _Channel_readyToConnect.set(this, new lazy_1$1.AsyncRetryableLazy(async () => {
11780
+ _Channel_readyToConnect.set(this, new lazy_1$2.AsyncRetryableLazy(async () => {
11744
11781
  await Promise.all([
11745
11782
  this.on('disconnected', (eventPayload) => {
11746
11783
  client_1.ChannelClient.handleProviderDisconnect(eventPayload);
11747
11784
  }),
11748
11785
  this.on('connected', (...args) => {
11749
- __classPrivateFieldGet$8(this, _Channel_internalEmitter, "f").emit('connected', ...args);
11786
+ __classPrivateFieldGet$9(this, _Channel_internalEmitter, "f").emit('connected', ...args);
11750
11787
  })
11751
11788
  ]).catch(() => new Error('error setting up channel connection listeners'));
11752
11789
  }));
11753
- __classPrivateFieldSet$7(this, _Channel_connectionManager, new connection_manager_1.ConnectionManager(wire), "f");
11790
+ __classPrivateFieldSet$8(this, _Channel_connectionManager, new connection_manager_1.ConnectionManager(wire), "f");
11754
11791
  }
11755
11792
  /**
11756
11793
  *
@@ -11825,7 +11862,7 @@ class Channel extends base_1$c.EmitterBase {
11825
11862
  resolve(true);
11826
11863
  }
11827
11864
  };
11828
- __classPrivateFieldGet$8(this, _Channel_internalEmitter, "f").on('connected', connectedListener);
11865
+ __classPrivateFieldGet$9(this, _Channel_internalEmitter, "f").on('connected', connectedListener);
11829
11866
  });
11830
11867
  try {
11831
11868
  if (retryInfo.count > 0) {
@@ -11857,7 +11894,7 @@ class Channel extends base_1$c.EmitterBase {
11857
11894
  finally {
11858
11895
  retryInfo.count += 1;
11859
11896
  // in case of other errors, remove our listener
11860
- __classPrivateFieldGet$8(this, _Channel_internalEmitter, "f").removeListener('connected', connectedListener);
11897
+ __classPrivateFieldGet$9(this, _Channel_internalEmitter, "f").removeListener('connected', connectedListener);
11861
11898
  }
11862
11899
  } while (shouldWait); // If we're waiting we retry the above loop
11863
11900
  // Should wait was false, no channel was found.
@@ -11916,12 +11953,12 @@ class Channel extends base_1$c.EmitterBase {
11916
11953
  async connect(channelName, options = {}) {
11917
11954
  // Make sure we don't connect before listeners are set up
11918
11955
  // This also errors if we're not in OpenFin, ensuring we don't run unnecessary code
11919
- await __classPrivateFieldGet$8(this, _Channel_readyToConnect, "f").getValue();
11956
+ await __classPrivateFieldGet$9(this, _Channel_readyToConnect, "f").getValue();
11920
11957
  if (!channelName || typeof channelName !== 'string') {
11921
11958
  throw new Error('Please provide a channelName string to connect to a channel.');
11922
11959
  }
11923
11960
  const opts = { wait: true, ...this.wire.environment.getDefaultChannelOptions().connect, ...options };
11924
- const { offer, rtc: rtcPacket } = await __classPrivateFieldGet$8(this, _Channel_connectionManager, "f").createClientOffer(opts);
11961
+ const { offer, rtc: rtcPacket } = await __classPrivateFieldGet$9(this, _Channel_connectionManager, "f").createClientOffer(opts);
11925
11962
  let connectionUrl;
11926
11963
  if (this.fin.me.isFrame || this.fin.me.isView || this.fin.me.isWindow) {
11927
11964
  connectionUrl = (await this.fin.me.getInfo()).url;
@@ -11933,7 +11970,7 @@ class Channel extends base_1$c.EmitterBase {
11933
11970
  connectionUrl
11934
11971
  };
11935
11972
  const routingInfo = await this.safeConnect(channelName, opts.wait, connectPayload);
11936
- const strategy = await __classPrivateFieldGet$8(this, _Channel_connectionManager, "f").createClientStrategy(rtcPacket, routingInfo);
11973
+ const strategy = await __classPrivateFieldGet$9(this, _Channel_connectionManager, "f").createClientStrategy(rtcPacket, routingInfo);
11937
11974
  const channel = new client_1.ChannelClient(routingInfo, () => client_1.ChannelClient.wireClose(this.wire, routingInfo, routingInfo.endpointId), strategy);
11938
11975
  // It is the client's responsibility to handle endpoint disconnection to the provider.
11939
11976
  // If the endpoint dies, the client will force a disconnection through the core.
@@ -12002,7 +12039,7 @@ class Channel extends base_1$c.EmitterBase {
12002
12039
  throw new Error('Please provide a channelName to create a channel');
12003
12040
  }
12004
12041
  const { payload: { data: providerIdentity } } = await this.wire.sendAction('create-channel', { channelName });
12005
- const channel = __classPrivateFieldGet$8(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
12042
+ const channel = __classPrivateFieldGet$9(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
12006
12043
  // TODO: fix typing (internal)
12007
12044
  // @ts-expect-error
12008
12045
  this.on('client-disconnected', (eventPayload) => {
@@ -12026,7 +12063,7 @@ interappbus.InterAppPayload = interappbus.InterApplicationBus = void 0;
12026
12063
  * @packageDocumentation
12027
12064
  */
12028
12065
  const events_1$1 = require$$0;
12029
- const base_1$b = base;
12066
+ const base_1$c = base;
12030
12067
  const ref_counter_1 = refCounter;
12031
12068
  const index_1$2 = channel$1;
12032
12069
  const validate_1$2 = validate;
@@ -12034,7 +12071,7 @@ const validate_1$2 = validate;
12034
12071
  * A messaging bus that allows for pub/sub messaging between different applications.
12035
12072
  *
12036
12073
  */
12037
- class InterApplicationBus extends base_1$b.Base {
12074
+ class InterApplicationBus extends base_1$c.Base {
12038
12075
  /**
12039
12076
  * @internal
12040
12077
  */
@@ -12240,12 +12277,12 @@ var clipboard = {};
12240
12277
  */
12241
12278
  Object.defineProperty(clipboard, "__esModule", { value: true });
12242
12279
  clipboard.Clipboard = void 0;
12243
- const base_1$a = base;
12280
+ const base_1$b = base;
12244
12281
  /**
12245
12282
  * The Clipboard API allows reading and writing to the clipboard in multiple formats.
12246
12283
  *
12247
12284
  */
12248
- class Clipboard extends base_1$a.Base {
12285
+ class Clipboard extends base_1$b.Base {
12249
12286
  /**
12250
12287
  * Writes data into the clipboard as plain text
12251
12288
  * @param writeObj The object for writing data into the clipboard
@@ -12429,12 +12466,12 @@ var globalHotkey = {};
12429
12466
 
12430
12467
  Object.defineProperty(globalHotkey, "__esModule", { value: true });
12431
12468
  globalHotkey.GlobalHotkey = void 0;
12432
- const base_1$9 = base;
12469
+ const base_1$a = base;
12433
12470
  /**
12434
12471
  * The GlobalHotkey module can register/unregister a global hotkeys.
12435
12472
  *
12436
12473
  */
12437
- class GlobalHotkey extends base_1$9.EmitterBase {
12474
+ class GlobalHotkey extends base_1$a.EmitterBase {
12438
12475
  /**
12439
12476
  * @internal
12440
12477
  */
@@ -12568,13 +12605,13 @@ var Factory$3 = {};
12568
12605
 
12569
12606
  var Instance$2 = {};
12570
12607
 
12571
- var __classPrivateFieldSet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12608
+ var __classPrivateFieldSet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12572
12609
  if (kind === "m") throw new TypeError("Private method is not writable");
12573
12610
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
12574
12611
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
12575
12612
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12576
12613
  };
12577
- var __classPrivateFieldGet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12614
+ var __classPrivateFieldGet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12578
12615
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
12579
12616
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
12580
12617
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -12583,14 +12620,14 @@ var _Platform_channelName, _Platform_connectToProvider;
12583
12620
  Object.defineProperty(Instance$2, "__esModule", { value: true });
12584
12621
  Instance$2.Platform = void 0;
12585
12622
  /* eslint-disable import/prefer-default-export, no-undef */
12586
- const base_1$8 = base;
12623
+ const base_1$9 = base;
12587
12624
  const validate_1$1 = validate;
12588
12625
  /** Manages the life cycle of windows and views in the application.
12589
12626
  *
12590
12627
  * Enables taking snapshots of itself and applying them to restore a previous configuration
12591
12628
  * as well as listen to {@link OpenFin.PlatformEvents platform events}.
12592
12629
  */
12593
- class Platform extends base_1$8.EmitterBase {
12630
+ class Platform extends base_1$9.EmitterBase {
12594
12631
  /**
12595
12632
  * @internal
12596
12633
  */
@@ -12611,24 +12648,24 @@ class Platform extends base_1$8.EmitterBase {
12611
12648
  this.wire.sendAction('platform-get-client', this.identity).catch((e) => {
12612
12649
  // don't expose
12613
12650
  });
12614
- if (!Platform.clientMap.has(__classPrivateFieldGet$7(this, _Platform_channelName, "f"))) {
12615
- const clientPromise = __classPrivateFieldGet$7(this, _Platform_connectToProvider, "f").call(this);
12616
- Platform.clientMap.set(__classPrivateFieldGet$7(this, _Platform_channelName, "f"), clientPromise);
12651
+ if (!Platform.clientMap.has(__classPrivateFieldGet$8(this, _Platform_channelName, "f"))) {
12652
+ const clientPromise = __classPrivateFieldGet$8(this, _Platform_connectToProvider, "f").call(this);
12653
+ Platform.clientMap.set(__classPrivateFieldGet$8(this, _Platform_channelName, "f"), clientPromise);
12617
12654
  }
12618
12655
  // we set it above
12619
12656
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
12620
- return Platform.clientMap.get(__classPrivateFieldGet$7(this, _Platform_channelName, "f"));
12657
+ return Platform.clientMap.get(__classPrivateFieldGet$8(this, _Platform_channelName, "f"));
12621
12658
  };
12622
12659
  _Platform_connectToProvider.set(this, async () => {
12623
12660
  try {
12624
- const client = await this._channel.connect(__classPrivateFieldGet$7(this, _Platform_channelName, "f"), { wait: false });
12661
+ const client = await this._channel.connect(__classPrivateFieldGet$8(this, _Platform_channelName, "f"), { wait: false });
12625
12662
  client.onDisconnection(() => {
12626
- Platform.clientMap.delete(__classPrivateFieldGet$7(this, _Platform_channelName, "f"));
12663
+ Platform.clientMap.delete(__classPrivateFieldGet$8(this, _Platform_channelName, "f"));
12627
12664
  });
12628
12665
  return client;
12629
12666
  }
12630
12667
  catch (e) {
12631
- Platform.clientMap.delete(__classPrivateFieldGet$7(this, _Platform_channelName, "f"));
12668
+ Platform.clientMap.delete(__classPrivateFieldGet$8(this, _Platform_channelName, "f"));
12632
12669
  throw new Error('The targeted Platform is not currently running. Listen for application-started event for the given Uuid.');
12633
12670
  }
12634
12671
  });
@@ -12641,7 +12678,7 @@ class Platform extends base_1$8.EmitterBase {
12641
12678
  if (errorMsg) {
12642
12679
  throw new Error(errorMsg);
12643
12680
  }
12644
- __classPrivateFieldSet$6(this, _Platform_channelName, channelName, "f");
12681
+ __classPrivateFieldSet$7(this, _Platform_channelName, channelName, "f");
12645
12682
  this._channel = this.fin.InterApplicationBus.Channel;
12646
12683
  this.identity = { uuid: identity.uuid };
12647
12684
  this.Layout = this.fin.Platform.Layout;
@@ -13697,13 +13734,13 @@ const createRelayedDispatch = (client, target, relayId, relayErrorMsg) => async
13697
13734
  };
13698
13735
  channelApiRelay.createRelayedDispatch = createRelayedDispatch;
13699
13736
 
13700
- var __classPrivateFieldSet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13737
+ var __classPrivateFieldSet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13701
13738
  if (kind === "m") throw new TypeError("Private method is not writable");
13702
13739
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
13703
13740
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
13704
13741
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
13705
13742
  };
13706
- var __classPrivateFieldGet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13743
+ var __classPrivateFieldGet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13707
13744
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13708
13745
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
13709
13746
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -13757,7 +13794,7 @@ class LayoutNode {
13757
13794
  * console.log(`The parent ColumnOrRow is root: ${parentIsRoot}`);
13758
13795
  * ```
13759
13796
  */
13760
- this.isRoot = () => __classPrivateFieldGet$6(this, _LayoutNode_client, "f").isRoot(this.entityId);
13797
+ this.isRoot = () => __classPrivateFieldGet$7(this, _LayoutNode_client, "f").isRoot(this.entityId);
13761
13798
  /**
13762
13799
  * Checks if the TabStack or ColumnOrRow exists
13763
13800
  *
@@ -13777,7 +13814,7 @@ class LayoutNode {
13777
13814
  * console.log(`The entity exists: ${exists}`);
13778
13815
  * ```
13779
13816
  */
13780
- this.exists = () => __classPrivateFieldGet$6(this, _LayoutNode_client, "f").exists(this.entityId);
13817
+ this.exists = () => __classPrivateFieldGet$7(this, _LayoutNode_client, "f").exists(this.entityId);
13781
13818
  /**
13782
13819
  * Retrieves the parent of the TabStack or ColumnOrRow
13783
13820
  *
@@ -13798,11 +13835,11 @@ class LayoutNode {
13798
13835
  * ```
13799
13836
  */
13800
13837
  this.getParent = async () => {
13801
- const parent = await __classPrivateFieldGet$6(this, _LayoutNode_client, "f").getParent(this.entityId);
13838
+ const parent = await __classPrivateFieldGet$7(this, _LayoutNode_client, "f").getParent(this.entityId);
13802
13839
  if (!parent) {
13803
13840
  return undefined;
13804
13841
  }
13805
- return LayoutNode.getEntity(parent, __classPrivateFieldGet$6(this, _LayoutNode_client, "f"));
13842
+ return LayoutNode.getEntity(parent, __classPrivateFieldGet$7(this, _LayoutNode_client, "f"));
13806
13843
  };
13807
13844
  /**
13808
13845
  * Creates a new TabStack adjacent to the given TabStack or ColumnOrRow. Inputs can be new views to create, or existing views.
@@ -13853,8 +13890,8 @@ class LayoutNode {
13853
13890
  * @experimental
13854
13891
  */
13855
13892
  this.createAdjacentStack = async (views, options) => {
13856
- const entityId = await __classPrivateFieldGet$6(this, _LayoutNode_client, "f").createAdjacentStack(this.entityId, views, options);
13857
- return LayoutNode.getEntity({ entityId, type: 'stack' }, __classPrivateFieldGet$6(this, _LayoutNode_client, "f"));
13893
+ const entityId = await __classPrivateFieldGet$7(this, _LayoutNode_client, "f").createAdjacentStack(this.entityId, views, options);
13894
+ return LayoutNode.getEntity({ entityId, type: 'stack' }, __classPrivateFieldGet$7(this, _LayoutNode_client, "f"));
13858
13895
  };
13859
13896
  /**
13860
13897
  * Retrieves the adjacent TabStacks of the given TabStack or ColumnOrRow.
@@ -13882,16 +13919,16 @@ class LayoutNode {
13882
13919
  * @experimental
13883
13920
  */
13884
13921
  this.getAdjacentStacks = async (edge) => {
13885
- const adjacentStacks = await __classPrivateFieldGet$6(this, _LayoutNode_client, "f").getAdjacentStacks({
13922
+ const adjacentStacks = await __classPrivateFieldGet$7(this, _LayoutNode_client, "f").getAdjacentStacks({
13886
13923
  targetId: this.entityId,
13887
13924
  edge
13888
13925
  });
13889
13926
  return adjacentStacks.map((stack) => LayoutNode.getEntity({
13890
13927
  type: 'stack',
13891
13928
  entityId: stack.entityId
13892
- }, __classPrivateFieldGet$6(this, _LayoutNode_client, "f")));
13929
+ }, __classPrivateFieldGet$7(this, _LayoutNode_client, "f")));
13893
13930
  };
13894
- __classPrivateFieldSet$5(this, _LayoutNode_client, client, "f");
13931
+ __classPrivateFieldSet$6(this, _LayoutNode_client, client, "f");
13895
13932
  this.entityId = entityId;
13896
13933
  }
13897
13934
  }
@@ -13964,7 +14001,7 @@ class TabStack extends LayoutNode {
13964
14001
  * ```
13965
14002
  * @experimental
13966
14003
  */
13967
- this.getViews = () => __classPrivateFieldGet$6(this, _TabStack_client, "f").getStackViews(this.entityId);
14004
+ this.getViews = () => __classPrivateFieldGet$7(this, _TabStack_client, "f").getStackViews(this.entityId);
13968
14005
  /**
13969
14006
  * Adds or creates a view in this {@link TabStack}.
13970
14007
  *
@@ -13994,7 +14031,7 @@ class TabStack extends LayoutNode {
13994
14031
  * ```
13995
14032
  * @experimental
13996
14033
  */
13997
- this.addView = async (view, options = { index: 0 }) => __classPrivateFieldGet$6(this, _TabStack_client, "f").addViewToStack(this.entityId, view, options);
14034
+ this.addView = async (view, options = { index: 0 }) => __classPrivateFieldGet$7(this, _TabStack_client, "f").addViewToStack(this.entityId, view, options);
13998
14035
  /**
13999
14036
  * Removes a view from this {@link TabStack}.
14000
14037
  *
@@ -14024,7 +14061,7 @@ class TabStack extends LayoutNode {
14024
14061
  * ```
14025
14062
  */
14026
14063
  this.removeView = async (view) => {
14027
- await __classPrivateFieldGet$6(this, _TabStack_client, "f").removeViewFromStack(this.entityId, view);
14064
+ await __classPrivateFieldGet$7(this, _TabStack_client, "f").removeViewFromStack(this.entityId, view);
14028
14065
  };
14029
14066
  /**
14030
14067
  * Sets the active view of the {@link TabStack} without focusing it.
@@ -14048,9 +14085,9 @@ class TabStack extends LayoutNode {
14048
14085
  * @experimental
14049
14086
  */
14050
14087
  this.setActiveView = async (view) => {
14051
- await __classPrivateFieldGet$6(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
14088
+ await __classPrivateFieldGet$7(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
14052
14089
  };
14053
- __classPrivateFieldSet$5(this, _TabStack_client, client, "f");
14090
+ __classPrivateFieldSet$6(this, _TabStack_client, client, "f");
14054
14091
  }
14055
14092
  }
14056
14093
  layoutEntities.TabStack = TabStack;
@@ -14089,10 +14126,10 @@ class ColumnOrRow extends LayoutNode {
14089
14126
  * ```
14090
14127
  */
14091
14128
  this.getContent = async () => {
14092
- const contentItemEntities = await __classPrivateFieldGet$6(this, _ColumnOrRow_client, "f").getContent(this.entityId);
14093
- return contentItemEntities.map((entity) => LayoutNode.getEntity(entity, __classPrivateFieldGet$6(this, _ColumnOrRow_client, "f")));
14129
+ const contentItemEntities = await __classPrivateFieldGet$7(this, _ColumnOrRow_client, "f").getContent(this.entityId);
14130
+ return contentItemEntities.map((entity) => LayoutNode.getEntity(entity, __classPrivateFieldGet$7(this, _ColumnOrRow_client, "f")));
14094
14131
  };
14095
- __classPrivateFieldSet$5(this, _ColumnOrRow_client, client, "f");
14132
+ __classPrivateFieldSet$6(this, _ColumnOrRow_client, client, "f");
14096
14133
  this.type = type;
14097
14134
  }
14098
14135
  }
@@ -14107,7 +14144,7 @@ layout_constants.LAYOUT_CONTROLLER_ID = 'layout-entities';
14107
14144
  // TODO: eventually export this somehow
14108
14145
  layout_constants.DEFAULT_LAYOUT_KEY = '__default__';
14109
14146
 
14110
- var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14147
+ var __classPrivateFieldGet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14111
14148
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14112
14149
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14113
14150
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -14115,9 +14152,9 @@ var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateF
14115
14152
  var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
14116
14153
  Object.defineProperty(Instance$1, "__esModule", { value: true });
14117
14154
  Instance$1.Layout = void 0;
14118
- const lazy_1 = lazy;
14155
+ const lazy_1$1 = lazy;
14119
14156
  const validate_1 = validate;
14120
- const base_1$7 = base;
14157
+ const base_1$8 = base;
14121
14158
  const common_utils_1$1 = commonUtils;
14122
14159
  const layout_entities_1 = layoutEntities;
14123
14160
  const layout_constants_1$1 = layout_constants;
@@ -14253,12 +14290,12 @@ const layout_constants_1$1 = layout_constants;
14253
14290
  * }
14254
14291
  * ```
14255
14292
  */
14256
- class Layout extends base_1$7.Base {
14293
+ class Layout extends base_1$8.Base {
14257
14294
  /**
14258
14295
  * @internal
14259
14296
  */
14260
14297
  static getClient(layout) {
14261
- return __classPrivateFieldGet$5(layout, _Layout_layoutClient, "f").getValue();
14298
+ return __classPrivateFieldGet$6(layout, _Layout_layoutClient, "f").getValue();
14262
14299
  }
14263
14300
  /**
14264
14301
  * @internal
@@ -14272,7 +14309,7 @@ class Layout extends base_1$7.Base {
14272
14309
  * Lazily constructed {@link LayoutEntitiesClient} bound to this platform's client and identity
14273
14310
  * The client is for {@link LayoutEntitiesController}
14274
14311
  */
14275
- _Layout_layoutClient.set(this, new lazy_1.Lazy(async () => layout_entities_1.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(), layout_constants_1$1.LAYOUT_CONTROLLER_ID, this.identity)));
14312
+ _Layout_layoutClient.set(this, new lazy_1$1.Lazy(async () => layout_entities_1.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(), layout_constants_1$1.LAYOUT_CONTROLLER_ID, this.identity)));
14276
14313
  /**
14277
14314
  * Replaces a Platform window's layout with a new layout.
14278
14315
  *
@@ -14481,7 +14518,7 @@ class Layout extends base_1$7.Base {
14481
14518
  this.wire.sendAction('layout-get-root-item').catch(() => {
14482
14519
  // don't expose
14483
14520
  });
14484
- const client = await __classPrivateFieldGet$5(this, _Layout_layoutClient, "f").getValue();
14521
+ const client = await __classPrivateFieldGet$6(this, _Layout_layoutClient, "f").getValue();
14485
14522
  const root = await client.getRoot('layoutName' in this.identity ? this.identity : undefined);
14486
14523
  return layout_entities_1.LayoutNode.getEntity(root, client);
14487
14524
  }
@@ -14499,7 +14536,7 @@ class Layout extends base_1$7.Base {
14499
14536
  this.wire.sendAction('layout-get-stack-by-view').catch(() => {
14500
14537
  // don't expose
14501
14538
  });
14502
- const client = await __classPrivateFieldGet$5(this, _Layout_layoutClient, "f").getValue();
14539
+ const client = await __classPrivateFieldGet$6(this, _Layout_layoutClient, "f").getValue();
14503
14540
  const stack = await client.getStackByView(identity);
14504
14541
  if (!stack) {
14505
14542
  throw new Error(`No stack found for view: ${identity.uuid}/${identity.name}`);
@@ -14519,7 +14556,7 @@ class Layout extends base_1$7.Base {
14519
14556
  this.wire.sendAction('layout-add-view').catch((e) => {
14520
14557
  // don't expose
14521
14558
  });
14522
- const { identity } = await __classPrivateFieldGet$5(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-add-view', {
14559
+ const { identity } = await __classPrivateFieldGet$6(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-add-view', {
14523
14560
  viewOptions,
14524
14561
  location,
14525
14562
  targetView
@@ -14537,7 +14574,7 @@ class Layout extends base_1$7.Base {
14537
14574
  this.wire.sendAction('layout-close-view').catch((e) => {
14538
14575
  // don't expose
14539
14576
  });
14540
- await __classPrivateFieldGet$5(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
14577
+ await __classPrivateFieldGet$6(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
14541
14578
  }
14542
14579
  }
14543
14580
  Instance$1.Layout = Layout;
@@ -14551,12 +14588,12 @@ async function _Layout_forwardLayoutAction(action, payload) {
14551
14588
  return client.dispatch(action, { target: this.identity, opts: payload });
14552
14589
  };
14553
14590
 
14554
- var __classPrivateFieldGet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14591
+ var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14555
14592
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14556
14593
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14557
14594
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
14558
14595
  };
14559
- var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14596
+ var __classPrivateFieldSet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14560
14597
  if (kind === "m") throw new TypeError("Private method is not writable");
14561
14598
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14562
14599
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -14565,13 +14602,13 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
14565
14602
  var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getLayoutManagerSpy, _LayoutModule_getSafeLayoutManager;
14566
14603
  Object.defineProperty(Factory$2, "__esModule", { value: true });
14567
14604
  Factory$2.LayoutModule = void 0;
14568
- const base_1$6 = base;
14605
+ const base_1$7 = base;
14569
14606
  const Instance_1$2 = Instance$1;
14570
14607
  const layout_constants_1 = layout_constants;
14571
14608
  /**
14572
14609
  * Static namespace for OpenFin API methods that interact with the {@link Layout} class, available under `fin.Platform.Layout`.
14573
14610
  */
14574
- class LayoutModule extends base_1$6.Base {
14611
+ class LayoutModule extends base_1$7.Base {
14575
14612
  constructor() {
14576
14613
  super(...arguments);
14577
14614
  _LayoutModule_instances.add(this);
@@ -14622,23 +14659,23 @@ class LayoutModule extends base_1$6.Base {
14622
14659
  if (!this.wire.environment.layoutAllowedInContext(this.fin)) {
14623
14660
  throw new Error('Layout.init can only be called from a Window context.');
14624
14661
  }
14625
- if (__classPrivateFieldGet$4(this, _LayoutModule_layoutInitializationAttempted, "f")) {
14662
+ if (__classPrivateFieldGet$5(this, _LayoutModule_layoutInitializationAttempted, "f")) {
14626
14663
  throw new Error('Layout.init was already called, please use Layout.create to add additional layouts.');
14627
14664
  }
14628
14665
  if (this.wire.environment.type === 'openfin') {
14629
14666
  // preload the client
14630
14667
  await this.fin.Platform.getCurrentSync().getClient();
14631
14668
  }
14632
- __classPrivateFieldSet$4(this, _LayoutModule_layoutInitializationAttempted, true, "f");
14669
+ __classPrivateFieldSet$5(this, _LayoutModule_layoutInitializationAttempted, true, "f");
14633
14670
  // TODO: rename to createLayoutManager
14634
- __classPrivateFieldSet$4(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
14635
- await this.wire.environment.applyLayoutSnapshot(this.fin, __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), options);
14671
+ __classPrivateFieldSet$5(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
14672
+ await this.wire.environment.applyLayoutSnapshot(this.fin, __classPrivateFieldGet$5(this, _LayoutModule_layoutManager, "f"), options);
14636
14673
  const meIdentity = { name: this.fin.me.name, uuid: this.fin.me.uuid };
14637
14674
  if (!options.layoutManagerOverride) {
14638
14675
  // CORE-1081 to be removed when we actually delete the `layoutManager` prop
14639
14676
  // in single-layout case, we return the undocumented layoutManager type
14640
14677
  const layoutIdentity = { layoutName: layout_constants_1.DEFAULT_LAYOUT_KEY, ...meIdentity };
14641
- return __classPrivateFieldGet$4(this, _LayoutModule_getLayoutManagerSpy, "f").call(this, layoutIdentity);
14678
+ return __classPrivateFieldGet$5(this, _LayoutModule_getLayoutManagerSpy, "f").call(this, layoutIdentity);
14642
14679
  }
14643
14680
  return this.wrapSync(meIdentity);
14644
14681
  };
@@ -14667,13 +14704,13 @@ class LayoutModule extends base_1$6.Base {
14667
14704
  * @returns
14668
14705
  */
14669
14706
  this.getCurrentLayoutManagerSync = () => {
14670
- return __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
14707
+ return __classPrivateFieldGet$5(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
14671
14708
  };
14672
14709
  this.create = async (options) => {
14673
- return this.wire.environment.createLayout(__classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.create()`), options);
14710
+ return this.wire.environment.createLayout(__classPrivateFieldGet$5(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.create()`), options);
14674
14711
  };
14675
14712
  this.destroy = async (layoutIdentity) => {
14676
- return this.wire.environment.destroyLayout(__classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.destroy()`), layoutIdentity);
14713
+ return this.wire.environment.destroyLayout(__classPrivateFieldGet$5(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.destroy()`), layoutIdentity);
14677
14714
  };
14678
14715
  }
14679
14716
  /**
@@ -14814,10 +14851,10 @@ class LayoutModule extends base_1$6.Base {
14814
14851
  }
14815
14852
  Factory$2.LayoutModule = LayoutModule;
14816
14853
  _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getLayoutManagerSpy = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_getSafeLayoutManager = function _LayoutModule_getSafeLayoutManager(method) {
14817
- if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
14854
+ if (!__classPrivateFieldGet$5(this, _LayoutModule_layoutManager, "f")) {
14818
14855
  throw new Error(`You must call init before using the API ${method}`);
14819
14856
  }
14820
- return __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f");
14857
+ return __classPrivateFieldGet$5(this, _LayoutModule_layoutManager, "f");
14821
14858
  };
14822
14859
 
14823
14860
  (function (exports) {
@@ -14854,13 +14891,13 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layou
14854
14891
 
14855
14892
  Object.defineProperty(Factory$3, "__esModule", { value: true });
14856
14893
  Factory$3.PlatformModule = void 0;
14857
- const base_1$5 = base;
14894
+ const base_1$6 = base;
14858
14895
  const Instance_1$1 = Instance$2;
14859
14896
  const index_1$1 = layout;
14860
14897
  /**
14861
14898
  * Static namespace for OpenFin API methods that interact with the {@link Platform} class, available under `fin.Platform`.
14862
14899
  */
14863
- class PlatformModule extends base_1$5.Base {
14900
+ class PlatformModule extends base_1$6.Base {
14864
14901
  /**
14865
14902
  * @internal
14866
14903
  */
@@ -15179,27 +15216,27 @@ var InteropClient$1 = {};
15179
15216
 
15180
15217
  var SessionContextGroupClient$1 = {};
15181
15218
 
15182
- var __classPrivateFieldSet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
15219
+ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
15183
15220
  if (kind === "m") throw new TypeError("Private method is not writable");
15184
15221
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
15185
15222
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
15186
15223
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
15187
15224
  };
15188
- var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15225
+ var __classPrivateFieldGet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15189
15226
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
15190
15227
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
15191
15228
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15192
15229
  };
15193
15230
  var _SessionContextGroupClient_clientPromise;
15194
15231
  Object.defineProperty(SessionContextGroupClient$1, "__esModule", { value: true });
15195
- const base_1$4 = base;
15232
+ const base_1$5 = base;
15196
15233
  const utils_1$6 = utils$3;
15197
- class SessionContextGroupClient extends base_1$4.Base {
15234
+ class SessionContextGroupClient extends base_1$5.Base {
15198
15235
  constructor(wire, client, id) {
15199
15236
  super(wire);
15200
15237
  _SessionContextGroupClient_clientPromise.set(this, void 0);
15201
15238
  this.id = id;
15202
- __classPrivateFieldSet$3(this, _SessionContextGroupClient_clientPromise, client, "f");
15239
+ __classPrivateFieldSet$4(this, _SessionContextGroupClient_clientPromise, client, "f");
15203
15240
  }
15204
15241
  /**
15205
15242
  * Sets a context for the session context group.
@@ -15211,7 +15248,7 @@ class SessionContextGroupClient extends base_1$4.Base {
15211
15248
  this.wire.sendAction('interop-session-context-group-set-context').catch((e) => {
15212
15249
  // don't expose, analytics-only call
15213
15250
  });
15214
- const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
15251
+ const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
15215
15252
  return client.dispatch(`sessionContextGroup:setContext-${this.id}`, {
15216
15253
  sessionContextGroupId: this.id,
15217
15254
  context
@@ -15221,7 +15258,7 @@ class SessionContextGroupClient extends base_1$4.Base {
15221
15258
  this.wire.sendAction('interop-session-context-group-get-context').catch((e) => {
15222
15259
  // don't expose, analytics-only call
15223
15260
  });
15224
- const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
15261
+ const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
15225
15262
  return client.dispatch(`sessionContextGroup:getContext-${this.id}`, {
15226
15263
  sessionContextGroupId: this.id,
15227
15264
  type
@@ -15234,7 +15271,7 @@ class SessionContextGroupClient extends base_1$4.Base {
15234
15271
  if (typeof contextHandler !== 'function') {
15235
15272
  throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");
15236
15273
  }
15237
- const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
15274
+ const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
15238
15275
  let handlerId;
15239
15276
  if (contextType) {
15240
15277
  handlerId = `sessionContextHandler:invoke-${this.id}-${contextType}-${(0, utils_1$6.generateId)()}`;
@@ -15247,7 +15284,7 @@ class SessionContextGroupClient extends base_1$4.Base {
15247
15284
  return { unsubscribe: await this.createUnsubscribeCb(handlerId) };
15248
15285
  }
15249
15286
  async createUnsubscribeCb(handlerId) {
15250
- const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
15287
+ const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
15251
15288
  return async () => {
15252
15289
  client.remove(handlerId);
15253
15290
  await client.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`, { handlerId });
@@ -15265,13 +15302,13 @@ class SessionContextGroupClient extends base_1$4.Base {
15265
15302
  SessionContextGroupClient$1.default = SessionContextGroupClient;
15266
15303
  _SessionContextGroupClient_clientPromise = new WeakMap();
15267
15304
 
15268
- var __classPrivateFieldSet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
15305
+ var __classPrivateFieldSet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
15269
15306
  if (kind === "m") throw new TypeError("Private method is not writable");
15270
15307
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
15271
15308
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
15272
15309
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
15273
15310
  };
15274
- var __classPrivateFieldGet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15311
+ var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15275
15312
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
15276
15313
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
15277
15314
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -15282,7 +15319,7 @@ var __importDefault$3 = (commonjsGlobal && commonjsGlobal.__importDefault) || fu
15282
15319
  var _InteropClient_clientPromise, _InteropClient_sessionContextGroups, _InteropClient_fdc3Factory;
15283
15320
  Object.defineProperty(InteropClient$1, "__esModule", { value: true });
15284
15321
  InteropClient$1.InteropClient = void 0;
15285
- const base_1$3 = base;
15322
+ const base_1$4 = base;
15286
15323
  const SessionContextGroupClient_1 = __importDefault$3(SessionContextGroupClient$1);
15287
15324
  const utils_1$5 = utils$3;
15288
15325
  /**
@@ -15334,7 +15371,7 @@ const utils_1$5 = utils$3;
15334
15371
  * * {@link InteropClient#getAllClientsInContextGroup getAllClientsInContextGroup(contextGroupId)}
15335
15372
  *
15336
15373
  */
15337
- class InteropClient extends base_1$3.Base {
15374
+ class InteropClient extends base_1$4.Base {
15338
15375
  /**
15339
15376
  * @internal
15340
15377
  */
@@ -15343,9 +15380,9 @@ class InteropClient extends base_1$3.Base {
15343
15380
  _InteropClient_clientPromise.set(this, void 0);
15344
15381
  _InteropClient_sessionContextGroups.set(this, void 0);
15345
15382
  _InteropClient_fdc3Factory.set(this, void 0);
15346
- __classPrivateFieldSet$2(this, _InteropClient_sessionContextGroups, new Map(), "f");
15347
- __classPrivateFieldSet$2(this, _InteropClient_clientPromise, clientPromise, "f");
15348
- __classPrivateFieldSet$2(this, _InteropClient_fdc3Factory, fdc3Factory, "f");
15383
+ __classPrivateFieldSet$3(this, _InteropClient_sessionContextGroups, new Map(), "f");
15384
+ __classPrivateFieldSet$3(this, _InteropClient_clientPromise, clientPromise, "f");
15385
+ __classPrivateFieldSet$3(this, _InteropClient_fdc3Factory, fdc3Factory, "f");
15349
15386
  }
15350
15387
  /*
15351
15388
  Client APIs
@@ -15373,7 +15410,7 @@ class InteropClient extends base_1$3.Base {
15373
15410
  this.wire.sendAction('interop-client-set-context').catch((e) => {
15374
15411
  // don't expose, analytics-only call
15375
15412
  });
15376
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15413
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15377
15414
  return client.dispatch('setContext', { context });
15378
15415
  }
15379
15416
  /**
@@ -15440,7 +15477,7 @@ class InteropClient extends base_1$3.Base {
15440
15477
  if (typeof handler !== 'function') {
15441
15478
  throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");
15442
15479
  }
15443
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15480
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15444
15481
  let handlerId;
15445
15482
  if (contextType) {
15446
15483
  handlerId = `invokeContextHandler-${contextType}-${(0, utils_1$5.generateId)()}`;
@@ -15480,7 +15517,7 @@ class InteropClient extends base_1$3.Base {
15480
15517
  this.wire.sendAction('interop-client-get-context-groups').catch((e) => {
15481
15518
  // don't expose, analytics-only call
15482
15519
  });
15483
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15520
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15484
15521
  return client.dispatch('getContextGroups');
15485
15522
  }
15486
15523
  /**
@@ -15511,7 +15548,7 @@ class InteropClient extends base_1$3.Base {
15511
15548
  this.wire.sendAction('interop-client-join-context-group').catch((e) => {
15512
15549
  // don't expose, analytics-only call
15513
15550
  });
15514
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15551
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15515
15552
  if (!contextGroupId) {
15516
15553
  throw new Error('No contextGroupId specified for joinContextGroup.');
15517
15554
  }
@@ -15540,7 +15577,7 @@ class InteropClient extends base_1$3.Base {
15540
15577
  this.wire.sendAction('interop-client-remove-from-context-group').catch((e) => {
15541
15578
  // don't expose, analytics-only call
15542
15579
  });
15543
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15580
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15544
15581
  return client.dispatch('removeFromContextGroup', { target });
15545
15582
  }
15546
15583
  /**
@@ -15563,7 +15600,7 @@ class InteropClient extends base_1$3.Base {
15563
15600
  this.wire.sendAction('interop-client-get-all-clients-in-context-group').catch((e) => {
15564
15601
  // don't expose, analytics-only call
15565
15602
  });
15566
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15603
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15567
15604
  if (!contextGroupId) {
15568
15605
  throw new Error('No contextGroupId specified for getAllClientsInContextGroup.');
15569
15606
  }
@@ -15588,7 +15625,7 @@ class InteropClient extends base_1$3.Base {
15588
15625
  this.wire.sendAction('interop-client-get-info-for-context-group').catch((e) => {
15589
15626
  // don't expose, analytics-only call
15590
15627
  });
15591
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15628
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15592
15629
  if (!contextGroupId) {
15593
15630
  throw new Error('No contextGroupId specified for getInfoForContextGroup.');
15594
15631
  }
@@ -15616,7 +15653,7 @@ class InteropClient extends base_1$3.Base {
15616
15653
  this.wire.sendAction('interop-client-fire-intent').catch((e) => {
15617
15654
  // don't expose, this is only for api analytics purposes
15618
15655
  });
15619
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15656
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15620
15657
  return client.dispatch('fireIntent', intent);
15621
15658
  }
15622
15659
  /**
@@ -15643,7 +15680,7 @@ class InteropClient extends base_1$3.Base {
15643
15680
  this.wire.sendAction('interop-client-register-intent-handler').catch((e) => {
15644
15681
  // don't expose, this is only for api analytics purposes
15645
15682
  });
15646
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15683
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15647
15684
  const handlerId = `intent-handler-${intentName}`;
15648
15685
  const wrappedHandler = (0, utils_1$5.wrapIntentHandler)(handler, handlerId);
15649
15686
  try {
@@ -15681,7 +15718,7 @@ class InteropClient extends base_1$3.Base {
15681
15718
  this.wire.sendAction('interop-client-get-current-context').catch((e) => {
15682
15719
  // don't expose, analytics-only call
15683
15720
  });
15684
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15721
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15685
15722
  return client.dispatch('getCurrentContext', { contextType });
15686
15723
  }
15687
15724
  /**
@@ -15701,7 +15738,7 @@ class InteropClient extends base_1$3.Base {
15701
15738
  this.wire.sendAction('interop-client-get-info-for-intent').catch((e) => {
15702
15739
  // don't expose, analytics-only call
15703
15740
  });
15704
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15741
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15705
15742
  return client.dispatch('getInfoForIntent', options);
15706
15743
  }
15707
15744
  /**
@@ -15732,7 +15769,7 @@ class InteropClient extends base_1$3.Base {
15732
15769
  this.wire.sendAction('interop-client-get-info-for-intents-by-context').catch((e) => {
15733
15770
  // don't expose, analytics-only call
15734
15771
  });
15735
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15772
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15736
15773
  return client.dispatch('getInfoForIntentsByContext', context);
15737
15774
  }
15738
15775
  /**
@@ -15764,7 +15801,7 @@ class InteropClient extends base_1$3.Base {
15764
15801
  this.wire.sendAction('interop-client-fire-intent-for-context').catch((e) => {
15765
15802
  // don't expose, analytics-only call
15766
15803
  });
15767
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15804
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15768
15805
  return client.dispatch('fireIntentForContext', context);
15769
15806
  }
15770
15807
  /**
@@ -15801,19 +15838,19 @@ class InteropClient extends base_1$3.Base {
15801
15838
  */
15802
15839
  async joinSessionContextGroup(sessionContextGroupId) {
15803
15840
  try {
15804
- const currentSessionContextGroup = __classPrivateFieldGet$2(this, _InteropClient_sessionContextGroups, "f").get(sessionContextGroupId);
15841
+ const currentSessionContextGroup = __classPrivateFieldGet$3(this, _InteropClient_sessionContextGroups, "f").get(sessionContextGroupId);
15805
15842
  if (currentSessionContextGroup) {
15806
15843
  return currentSessionContextGroup.getUserInstance();
15807
15844
  }
15808
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15845
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15809
15846
  const { hasConflict } = await client.dispatch('sessionContextGroup:createIfNeeded', {
15810
15847
  sessionContextGroupId
15811
15848
  });
15812
15849
  if (hasConflict) {
15813
15850
  console.warn(`A (non-session) context group with the name "${sessionContextGroupId}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);
15814
15851
  }
15815
- const newSessionContextGroup = new SessionContextGroupClient_1.default(this.wire, __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
15816
- __classPrivateFieldGet$2(this, _InteropClient_sessionContextGroups, "f").set(sessionContextGroupId, newSessionContextGroup);
15852
+ const newSessionContextGroup = new SessionContextGroupClient_1.default(this.wire, __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
15853
+ __classPrivateFieldGet$3(this, _InteropClient_sessionContextGroups, "f").set(sessionContextGroupId, newSessionContextGroup);
15817
15854
  return newSessionContextGroup.getUserInstance();
15818
15855
  }
15819
15856
  catch (error) {
@@ -15840,14 +15877,14 @@ class InteropClient extends base_1$3.Base {
15840
15877
  this.wire.sendAction('interop-client-add-ondisconnection-listener').catch((e) => {
15841
15878
  // don't expose, analytics-only call
15842
15879
  });
15843
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15880
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15844
15881
  return client.onDisconnection((event) => {
15845
15882
  const { uuid } = event;
15846
15883
  listener({ type: 'interop-broker', topic: 'disconnected', brokerName: uuid });
15847
15884
  });
15848
15885
  }
15849
15886
  getFDC3Sync(version) {
15850
- return __classPrivateFieldGet$2(this, _InteropClient_fdc3Factory, "f").call(this, version, this, this.wire);
15887
+ return __classPrivateFieldGet$3(this, _InteropClient_fdc3Factory, "f").call(this, version, this, this.wire);
15851
15888
  }
15852
15889
  async getFDC3(version) {
15853
15890
  return this.getFDC3Sync(version);
@@ -15858,7 +15895,7 @@ class InteropClient extends base_1$3.Base {
15858
15895
  * Used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
15859
15896
  */
15860
15897
  static async ferryFdc3Call(interopClient, action, payload) {
15861
- const client = await __classPrivateFieldGet$2(interopClient, _InteropClient_clientPromise, "f");
15898
+ const client = await __classPrivateFieldGet$3(interopClient, _InteropClient_clientPromise, "f");
15862
15899
  return client.dispatch(action, payload || null);
15863
15900
  }
15864
15901
  }
@@ -16236,12 +16273,12 @@ PrivateChannelClient$1.PrivateChannelClient = PrivateChannelClient;
16236
16273
  exports.getIntentResolution = getIntentResolution;
16237
16274
  } (utils$2));
16238
16275
 
16239
- var __classPrivateFieldGet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16276
+ var __classPrivateFieldGet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16240
16277
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
16241
16278
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
16242
16279
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
16243
16280
  };
16244
- var __classPrivateFieldSet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16281
+ var __classPrivateFieldSet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16245
16282
  if (kind === "m") throw new TypeError("Private method is not writable");
16246
16283
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
16247
16284
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -16259,7 +16296,7 @@ const InteropClient_1$2 = InteropClient$1;
16259
16296
  const isEqual_1 = __importDefault$2(require$$3);
16260
16297
  class FDC3ModuleBase {
16261
16298
  get client() {
16262
- return __classPrivateFieldGet$1(this, _FDC3ModuleBase_producer, "f").call(this);
16299
+ return __classPrivateFieldGet$2(this, _FDC3ModuleBase_producer, "f").call(this);
16263
16300
  }
16264
16301
  get fin() {
16265
16302
  return this.wire.getFin();
@@ -16268,7 +16305,7 @@ class FDC3ModuleBase {
16268
16305
  constructor(producer, wire) {
16269
16306
  this.wire = wire;
16270
16307
  _FDC3ModuleBase_producer.set(this, void 0);
16271
- __classPrivateFieldSet$1(this, _FDC3ModuleBase_producer, producer, "f");
16308
+ __classPrivateFieldSet$2(this, _FDC3ModuleBase_producer, producer, "f");
16272
16309
  }
16273
16310
  /**
16274
16311
  * Broadcasts a context for the channel of the current entity.
@@ -17049,7 +17086,7 @@ Object.defineProperty(Factory$1, "__esModule", { value: true });
17049
17086
  Factory$1.InteropModule = void 0;
17050
17087
  const cloneDeep_1 = __importDefault$1(require$$0$1);
17051
17088
  const inaccessibleObject_1 = inaccessibleObject;
17052
- const base_1$2 = base;
17089
+ const base_1$3 = base;
17053
17090
  const InteropBroker_1 = InteropBroker$1;
17054
17091
  const InteropClient_1 = InteropClient$1;
17055
17092
  const overrideCheck_1 = overrideCheck$1;
@@ -17061,7 +17098,7 @@ const BrokerParamAccessError = 'You have attempted to use or modify InteropBroke
17061
17098
  * Manages creation of Interop Brokers and Interop Clients. These APIs are called under-the-hood in Platforms.
17062
17099
  *
17063
17100
  */
17064
- class InteropModule extends base_1$2.Base {
17101
+ class InteropModule extends base_1$3.Base {
17065
17102
  /**
17066
17103
  * Initializes an Interop Broker. This is called under-the-hood for Platforms.
17067
17104
  *
@@ -17185,13 +17222,13 @@ const channelPrefix = 'snapshot-source-provider-';
17185
17222
  const getSnapshotSourceChannelName = (id) => `${channelPrefix}${id.uuid}`;
17186
17223
  utils.getSnapshotSourceChannelName = getSnapshotSourceChannelName;
17187
17224
 
17188
- var __classPrivateFieldSet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
17225
+ var __classPrivateFieldSet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
17189
17226
  if (kind === "m") throw new TypeError("Private method is not writable");
17190
17227
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
17191
17228
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
17192
17229
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
17193
17230
  };
17194
- var __classPrivateFieldGet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17231
+ var __classPrivateFieldGet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17195
17232
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
17196
17233
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
17197
17234
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -17200,7 +17237,7 @@ var _SnapshotSource_identity, _SnapshotSource_getConnection, _SnapshotSource_get
17200
17237
  Object.defineProperty(Instance, "__esModule", { value: true });
17201
17238
  Instance.SnapshotSource = void 0;
17202
17239
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
17203
- const base_1$1 = base;
17240
+ const base_1$2 = base;
17204
17241
  const utils_1$1 = utils;
17205
17242
  const connectionMap = new Map();
17206
17243
  /**
@@ -17209,7 +17246,7 @@ const connectionMap = new Map();
17209
17246
  * @typeParam Snapshot Implementation-defined shape of an application snapshot. Allows
17210
17247
  * custom snapshot implementations for legacy applications to define their own snapshot format.
17211
17248
  */
17212
- class SnapshotSource extends base_1$1.Base {
17249
+ class SnapshotSource extends base_1$2.Base {
17213
17250
  /**
17214
17251
  * @internal
17215
17252
  */
@@ -17223,26 +17260,26 @@ class SnapshotSource extends base_1$1.Base {
17223
17260
  return connectionMap.get(this.identity.uuid);
17224
17261
  });
17225
17262
  _SnapshotSource_getClient.set(this, () => {
17226
- if (!__classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise) {
17227
- __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = __classPrivateFieldGet(this, _SnapshotSource_startConnection, "f").call(this);
17263
+ if (!__classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise) {
17264
+ __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = __classPrivateFieldGet$1(this, _SnapshotSource_startConnection, "f").call(this);
17228
17265
  }
17229
- return __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise;
17266
+ return __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise;
17230
17267
  });
17231
17268
  _SnapshotSource_startConnection.set(this, async () => {
17232
17269
  const channelName = (0, utils_1$1.getSnapshotSourceChannelName)(this.identity);
17233
17270
  try {
17234
- if (!__classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).eventFired) {
17235
- await __classPrivateFieldGet(this, _SnapshotSource_setUpConnectionListener, "f").call(this);
17271
+ if (!__classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired) {
17272
+ await __classPrivateFieldGet$1(this, _SnapshotSource_setUpConnectionListener, "f").call(this);
17236
17273
  }
17237
17274
  const client = await this.fin.InterApplicationBus.Channel.connect(channelName, { wait: false });
17238
17275
  client.onDisconnection(() => {
17239
- __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
17240
- __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).eventFired = null;
17276
+ __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
17277
+ __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired = null;
17241
17278
  });
17242
17279
  return client;
17243
17280
  }
17244
17281
  catch (e) {
17245
- __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
17282
+ __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
17246
17283
  throw new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.");
17247
17284
  }
17248
17285
  });
@@ -17254,7 +17291,7 @@ class SnapshotSource extends base_1$1.Base {
17254
17291
  resolve = y;
17255
17292
  reject = n;
17256
17293
  });
17257
- __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).eventFired = eventFired;
17294
+ __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired = eventFired;
17258
17295
  const listener = async (e) => {
17259
17296
  try {
17260
17297
  if (e.channelName === channelName) {
@@ -17268,10 +17305,10 @@ class SnapshotSource extends base_1$1.Base {
17268
17305
  };
17269
17306
  await this.fin.InterApplicationBus.Channel.on('connected', listener);
17270
17307
  });
17271
- __classPrivateFieldSet(this, _SnapshotSource_identity, id, "f");
17308
+ __classPrivateFieldSet$1(this, _SnapshotSource_identity, id, "f");
17272
17309
  }
17273
17310
  get identity() {
17274
- return __classPrivateFieldGet(this, _SnapshotSource_identity, "f");
17311
+ return __classPrivateFieldGet$1(this, _SnapshotSource_identity, "f");
17275
17312
  }
17276
17313
  /**
17277
17314
  * Method to determine if the SnapshotSource has been initialized.
@@ -17307,11 +17344,11 @@ class SnapshotSource extends base_1$1.Base {
17307
17344
  // eslint-disable-next-line no-async-promise-executor
17308
17345
  try {
17309
17346
  // If getClient was already called before this, do we have a timing issue where the channel might have been created but we missed the event but this still fails?
17310
- await __classPrivateFieldGet(this, _SnapshotSource_getClient, "f").call(this);
17347
+ await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
17311
17348
  }
17312
17349
  catch (e) {
17313
17350
  // it was not running.
17314
- await __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).eventFired;
17351
+ await __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired;
17315
17352
  }
17316
17353
  }
17317
17354
  /**
@@ -17322,7 +17359,7 @@ class SnapshotSource extends base_1$1.Base {
17322
17359
  this.wire.sendAction('snapshot-source-get-snapshot').catch((e) => {
17323
17360
  // don't expose, analytics-only call
17324
17361
  });
17325
- const client = await __classPrivateFieldGet(this, _SnapshotSource_getClient, "f").call(this);
17362
+ const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
17326
17363
  const response = (await client.dispatch('get-snapshot'));
17327
17364
  return (await response).snapshot;
17328
17365
  }
@@ -17334,7 +17371,7 @@ class SnapshotSource extends base_1$1.Base {
17334
17371
  this.wire.sendAction('snapshot-source-apply-snapshot').catch((e) => {
17335
17372
  // don't expose, analytics-only call
17336
17373
  });
17337
- const client = await __classPrivateFieldGet(this, _SnapshotSource_getClient, "f").call(this);
17374
+ const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
17338
17375
  return client.dispatch('apply-snapshot', { snapshot });
17339
17376
  }
17340
17377
  }
@@ -17343,13 +17380,13 @@ _SnapshotSource_identity = new WeakMap(), _SnapshotSource_getConnection = new We
17343
17380
 
17344
17381
  Object.defineProperty(Factory, "__esModule", { value: true });
17345
17382
  Factory.SnapshotSourceModule = void 0;
17346
- const base_1 = base;
17383
+ const base_1$1 = base;
17347
17384
  const Instance_1 = Instance;
17348
17385
  const utils_1 = utils;
17349
17386
  /**
17350
17387
  * Static namespace for OpenFin API methods that interact with the {@link SnapshotSource} class, available under `fin.SnapshotSource`.
17351
17388
  */
17352
- class SnapshotSourceModule extends base_1.Base {
17389
+ class SnapshotSourceModule extends base_1$1.Base {
17353
17390
  /**
17354
17391
  * Initializes a SnapshotSource with the getSnapshot and applySnapshot methods defined.
17355
17392
  *
@@ -17455,6 +17492,114 @@ Factory.SnapshotSourceModule = SnapshotSourceModule;
17455
17492
  __exportStar(Instance, exports);
17456
17493
  } (snapshotSource));
17457
17494
 
17495
+ var notificationManager = {};
17496
+
17497
+ var factory = {};
17498
+
17499
+ var instance = {};
17500
+
17501
+ var __classPrivateFieldSet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
17502
+ if (kind === "m") throw new TypeError("Private method is not writable");
17503
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
17504
+ 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");
17505
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
17506
+ };
17507
+ var __classPrivateFieldGet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17508
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
17509
+ 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");
17510
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
17511
+ };
17512
+ var _NotificationManagerInstance_wire, _NotificationManagerInstance_handler, _NotificationManagerInstance_id, _NotificationManagerInstance_isReceivingNotifications;
17513
+ Object.defineProperty(instance, "__esModule", { value: true });
17514
+ instance.NotificationManagerInstance = void 0;
17515
+ const lazy_1 = lazy;
17516
+ class NotificationManagerInstance {
17517
+ constructor(wire, id) {
17518
+ _NotificationManagerInstance_wire.set(this, void 0);
17519
+ _NotificationManagerInstance_handler.set(this, void 0);
17520
+ _NotificationManagerInstance_id.set(this, void 0);
17521
+ _NotificationManagerInstance_isReceivingNotifications.set(this, new lazy_1.Lazy(async () => {
17522
+ await __classPrivateFieldGet(this, _NotificationManagerInstance_wire, "f").registerMessageHandler((message) => {
17523
+ if (message.action === 'notification-created' && message.payload.managerId === __classPrivateFieldGet(this, _NotificationManagerInstance_id, "f")) {
17524
+ const { notificationId, properties, documentUrl: url, notificationIcon: icon, badge, image } = message.payload;
17525
+ try {
17526
+ __classPrivateFieldGet(this, _NotificationManagerInstance_handler, "f")?.call(this, {
17527
+ properties,
17528
+ images: {
17529
+ image,
17530
+ icon,
17531
+ badge
17532
+ },
17533
+ url,
17534
+ notificationId
17535
+ });
17536
+ }
17537
+ catch (error) {
17538
+ console.error('Failed to handle notification', error);
17539
+ }
17540
+ return true;
17541
+ }
17542
+ return false;
17543
+ });
17544
+ return true;
17545
+ }));
17546
+ this.setNotificationHandler = async (handler) => {
17547
+ await __classPrivateFieldGet(this, _NotificationManagerInstance_isReceivingNotifications, "f").getValue();
17548
+ __classPrivateFieldSet(this, _NotificationManagerInstance_handler, handler, "f");
17549
+ };
17550
+ this.destroy = async () => {
17551
+ await __classPrivateFieldGet(this, _NotificationManagerInstance_wire, "f").sendAction('destroy-notification-manager', { managerId: __classPrivateFieldGet(this, _NotificationManagerInstance_id, "f") });
17552
+ };
17553
+ this.dispatch = async (event) => {
17554
+ const { notificationId, type } = event;
17555
+ await __classPrivateFieldGet(this, _NotificationManagerInstance_wire, "f").sendAction('dispatch-notification-event', {
17556
+ notificationId,
17557
+ type
17558
+ });
17559
+ };
17560
+ __classPrivateFieldSet(this, _NotificationManagerInstance_wire, wire, "f");
17561
+ __classPrivateFieldSet(this, _NotificationManagerInstance_id, id, "f");
17562
+ }
17563
+ }
17564
+ instance.NotificationManagerInstance = NotificationManagerInstance;
17565
+ _NotificationManagerInstance_wire = new WeakMap(), _NotificationManagerInstance_handler = new WeakMap(), _NotificationManagerInstance_id = new WeakMap(), _NotificationManagerInstance_isReceivingNotifications = new WeakMap();
17566
+
17567
+ Object.defineProperty(factory, "__esModule", { value: true });
17568
+ factory.NotificationManagerModule = void 0;
17569
+ const base_1 = base;
17570
+ const instance_1 = instance;
17571
+ class NotificationManagerModule extends base_1.Base {
17572
+ constructor() {
17573
+ super(...arguments);
17574
+ this.init = async () => {
17575
+ const { payload: { data: { managerId } } } = await this.wire.sendAction('init-notification-manager');
17576
+ const manager = new instance_1.NotificationManagerInstance(this.wire, managerId);
17577
+ return manager;
17578
+ };
17579
+ }
17580
+ }
17581
+ factory.NotificationManagerModule = NotificationManagerModule;
17582
+
17583
+ (function (exports) {
17584
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
17585
+ if (k2 === undefined) k2 = k;
17586
+ var desc = Object.getOwnPropertyDescriptor(m, k);
17587
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17588
+ desc = { enumerable: true, get: function() { return m[k]; } };
17589
+ }
17590
+ Object.defineProperty(o, k2, desc);
17591
+ }) : (function(o, m, k, k2) {
17592
+ if (k2 === undefined) k2 = k;
17593
+ o[k2] = m[k];
17594
+ }));
17595
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
17596
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17597
+ };
17598
+ Object.defineProperty(exports, "__esModule", { value: true });
17599
+ __exportStar(factory, exports);
17600
+ __exportStar(instance, exports);
17601
+ } (notificationManager));
17602
+
17458
17603
  Object.defineProperty(fin$1, "__esModule", { value: true });
17459
17604
  var Fin_1 = fin$1.Fin = void 0;
17460
17605
  const events_1 = require$$0;
@@ -17472,6 +17617,7 @@ const index_10 = platform;
17472
17617
  const me_1 = me;
17473
17618
  const interop_1 = interop;
17474
17619
  const snapshot_source_1 = snapshotSource;
17620
+ const notification_manager_1 = notificationManager;
17475
17621
  /**
17476
17622
  * @internal
17477
17623
  */
@@ -17494,6 +17640,7 @@ class Fin extends events_1.EventEmitter {
17494
17640
  this.View = new index_9.ViewModule(wire);
17495
17641
  this.Interop = new interop_1.InteropModule(wire);
17496
17642
  this.SnapshotSource = new snapshot_source_1.SnapshotSourceModule(wire);
17643
+ this.NotificationManager = new notification_manager_1.NotificationManagerModule(wire);
17497
17644
  wire.registerFin(this);
17498
17645
  this.me = (0, me_1.getMe)(wire);
17499
17646
  // Handle disconnect events