@openfin/remote-adapter 43.100.32 → 43.100.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/out/remote-adapter.js +398 -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}.
@@ -7109,7 +7109,7 @@ var Instance$4 = {};
7109
7109
  Object.defineProperty(Instance$4, "__esModule", { value: true });
7110
7110
  Instance$4._Frame = void 0;
7111
7111
  /* eslint-disable import/prefer-default-export */
7112
- const base_1$k = base;
7112
+ const base_1$l = base;
7113
7113
  /**
7114
7114
  * An iframe represents an embedded HTML page within a parent HTML page. Because this embedded page
7115
7115
  * has its own DOM and global JS context (which may or may not be linked to that of the parent depending
@@ -7130,7 +7130,7 @@ const base_1$k = base;
7130
7130
  * The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
7131
7131
  * (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
7132
7132
  */
7133
- class _Frame extends base_1$k.EmitterBase {
7133
+ class _Frame extends base_1$l.EmitterBase {
7134
7134
  /**
7135
7135
  * @internal
7136
7136
  */
@@ -7176,13 +7176,13 @@ Instance$4._Frame = _Frame;
7176
7176
 
7177
7177
  Object.defineProperty(Factory$5, "__esModule", { value: true });
7178
7178
  Factory$5._FrameModule = void 0;
7179
- const base_1$j = base;
7179
+ const base_1$k = base;
7180
7180
  const validate_1$3 = validate;
7181
7181
  const Instance_1$4 = Instance$4;
7182
7182
  /**
7183
7183
  * Static namespace for OpenFin API methods that interact with the {@link _Frame} class, available under `fin.Frame`.
7184
7184
  */
7185
- class _FrameModule extends base_1$j.Base {
7185
+ class _FrameModule extends base_1$k.Base {
7186
7186
  /**
7187
7187
  * Asynchronously returns an API handle for the given Frame identity.
7188
7188
  *
@@ -7308,7 +7308,7 @@ var Instance$3 = {};
7308
7308
  Object.defineProperty(Instance$3, "__esModule", { value: true });
7309
7309
  Instance$3.ExternalApplication = void 0;
7310
7310
  /* eslint-disable import/prefer-default-export */
7311
- const base_1$i = base;
7311
+ const base_1$j = base;
7312
7312
  /**
7313
7313
  * An ExternalApplication object representing native language adapter connections to the runtime. Allows
7314
7314
  * the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
@@ -7319,7 +7319,7 @@ const base_1$i = base;
7319
7319
  * - Processes started via `System.launchExternalApplication`
7320
7320
  * - Processes monitored via `System.monitorExternalProcess`
7321
7321
  */
7322
- class ExternalApplication extends base_1$i.EmitterBase {
7322
+ class ExternalApplication extends base_1$j.EmitterBase {
7323
7323
  /**
7324
7324
  * @internal
7325
7325
  */
@@ -7347,12 +7347,12 @@ Instance$3.ExternalApplication = ExternalApplication;
7347
7347
 
7348
7348
  Object.defineProperty(Factory$4, "__esModule", { value: true });
7349
7349
  Factory$4.ExternalApplicationModule = void 0;
7350
- const base_1$h = base;
7350
+ const base_1$i = base;
7351
7351
  const Instance_1$3 = Instance$3;
7352
7352
  /**
7353
7353
  * Static namespace for OpenFin API methods that interact with the {@link ExternalApplication} class, available under `fin.ExternalApplication`.
7354
7354
  */
7355
- class ExternalApplicationModule extends base_1$h.Base {
7355
+ class ExternalApplicationModule extends base_1$i.Base {
7356
7356
  /**
7357
7357
  * Asynchronously returns an External Application object that represents an external application.
7358
7358
  * <br>It is possible to wrap a process that does not yet exist, (for example, to listen for startup-related events)
@@ -7580,13 +7580,13 @@ function errorToPOJO(error) {
7580
7580
  }
7581
7581
  errors.errorToPOJO = errorToPOJO;
7582
7582
 
7583
- 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) {
7584
7584
  if (kind === "m") throw new TypeError("Private method is not writable");
7585
7585
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
7586
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");
7587
7587
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7588
7588
  };
7589
- var __classPrivateFieldGet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7589
+ var __classPrivateFieldGet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7590
7590
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
7591
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");
7592
7592
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -7614,19 +7614,19 @@ class Transport extends events_1$5.EventEmitter {
7614
7614
  // Typing as unknown to avoid circular dependency, should not be used directly.
7615
7615
  _Transport_fin.set(this, void 0);
7616
7616
  this.connectSync = () => {
7617
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7617
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7618
7618
  wire.connectSync();
7619
7619
  };
7620
7620
  // This function is only used in our tests.
7621
7621
  this.getPort = () => {
7622
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7622
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7623
7623
  return wire.getPort();
7624
7624
  };
7625
- __classPrivateFieldSet$e(this, _Transport_wire, factory(this.onmessage.bind(this)), "f");
7625
+ __classPrivateFieldSet$f(this, _Transport_wire, factory(this.onmessage.bind(this)), "f");
7626
7626
  this.environment = environment;
7627
- 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"));
7628
7628
  this.registerMessageHandler(this.handleMessage.bind(this));
7629
- __classPrivateFieldGet$f(this, _Transport_wire, "f").on('disconnected', () => {
7629
+ __classPrivateFieldGet$g(this, _Transport_wire, "f").on('disconnected', () => {
7630
7630
  for (const [, { handleNack }] of this.wireListeners) {
7631
7631
  handleNack({ reason: 'Remote connection has closed' });
7632
7632
  }
@@ -7638,24 +7638,24 @@ class Transport extends events_1$5.EventEmitter {
7638
7638
  this.me = (0, me_1$1.getBaseMe)(entityType, uuid, name);
7639
7639
  }
7640
7640
  getFin() {
7641
- if (!__classPrivateFieldGet$f(this, _Transport_fin, "f")) {
7641
+ if (!__classPrivateFieldGet$g(this, _Transport_fin, "f")) {
7642
7642
  throw new Error('No Fin object registered for this transport');
7643
7643
  }
7644
- return __classPrivateFieldGet$f(this, _Transport_fin, "f");
7644
+ return __classPrivateFieldGet$g(this, _Transport_fin, "f");
7645
7645
  }
7646
7646
  registerFin(_fin) {
7647
- if (__classPrivateFieldGet$f(this, _Transport_fin, "f")) {
7647
+ if (__classPrivateFieldGet$g(this, _Transport_fin, "f")) {
7648
7648
  throw new Error('Fin object has already been registered for this transport');
7649
7649
  }
7650
- __classPrivateFieldSet$e(this, _Transport_fin, _fin, "f");
7650
+ __classPrivateFieldSet$f(this, _Transport_fin, _fin, "f");
7651
7651
  }
7652
7652
  shutdown() {
7653
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7653
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7654
7654
  return wire.shutdown();
7655
7655
  }
7656
7656
  async connect(config) {
7657
7657
  if ((0, wire_1.isConfigWithReceiver)(config)) {
7658
- await __classPrivateFieldGet$f(this, _Transport_wire, "f").connect(config.receiver);
7658
+ await __classPrivateFieldGet$g(this, _Transport_wire, "f").connect(config.receiver);
7659
7659
  return this.authorize(config);
7660
7660
  }
7661
7661
  if ((0, wire_1.isRemoteConfig)(config)) {
@@ -7671,13 +7671,13 @@ class Transport extends events_1$5.EventEmitter {
7671
7671
  return undefined;
7672
7672
  }
7673
7673
  async connectRemote(config) {
7674
- 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));
7675
7675
  return this.authorize(config);
7676
7676
  }
7677
7677
  async connectByPort(config) {
7678
7678
  const { address, uuid } = config;
7679
7679
  const reqAuthPayload = { ...config, type: 'file-token' };
7680
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7680
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7681
7681
  await wire.connect(new (this.environment.getWsConstructor())(config.address));
7682
7682
  const requestExtAuthRet = await this.sendAction('request-external-authorization', {
7683
7683
  uuid,
@@ -7713,7 +7713,7 @@ class Transport extends events_1$5.EventEmitter {
7713
7713
  payload,
7714
7714
  messageId
7715
7715
  };
7716
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7716
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7717
7717
  this.addWireListener(messageId, resolve, (payload) => this.nackHandler(payload, reject, callSites), uncorrelated);
7718
7718
  return wire.send(msg).catch(reject);
7719
7719
  });
@@ -7735,7 +7735,7 @@ class Transport extends events_1$5.EventEmitter {
7735
7735
  const resolver = (data) => {
7736
7736
  resolve(data.payload);
7737
7737
  };
7738
- const wire = __classPrivateFieldGet$f(this, _Transport_wire, "f");
7738
+ const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
7739
7739
  return wire
7740
7740
  .send(origData)
7741
7741
  .then(() => this.addWireListener(id, resolver, (payload) => this.nackHandler(payload, reject), false))
@@ -7891,7 +7891,7 @@ var system = {};
7891
7891
  */
7892
7892
  Object.defineProperty(system, "__esModule", { value: true });
7893
7893
  system.System = void 0;
7894
- const base_1$g = base;
7894
+ const base_1$h = base;
7895
7895
  const transport_errors_1$4 = transportErrors;
7896
7896
  const window_1 = requireWindow();
7897
7897
  const events_1$3 = require$$0;
@@ -7901,7 +7901,7 @@ const events_1$3 = require$$0;
7901
7901
  * clearing the cache and exiting the runtime as well as listen to {@link OpenFin.SystemEvents system events}.
7902
7902
  *
7903
7903
  */
7904
- class System extends base_1$g.EmitterBase {
7904
+ class System extends base_1$h.EmitterBase {
7905
7905
  /**
7906
7906
  * @internal
7907
7907
  */
@@ -9791,6 +9791,12 @@ class System extends base_1$g.EmitterBase {
9791
9791
  async serveAsset(options) {
9792
9792
  return (await this.wire.sendAction('serve-asset', { options })).payload.data;
9793
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
+ }
9794
9800
  }
9795
9801
  system.System = System;
9796
9802
 
@@ -10212,12 +10218,12 @@ class ChannelError extends Error {
10212
10218
  }
10213
10219
  channelError.ChannelError = ChannelError;
10214
10220
 
10215
- var __classPrivateFieldGet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10221
+ var __classPrivateFieldGet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10216
10222
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10217
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");
10218
10224
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10219
10225
  };
10220
- 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) {
10221
10227
  if (kind === "m") throw new TypeError("Private method is not writable");
10222
10228
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10223
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");
@@ -10261,7 +10267,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
10261
10267
  static closeChannelByEndpointId(id) {
10262
10268
  const channel = channelClientsByEndpointId.get(id);
10263
10269
  if (channel) {
10264
- __classPrivateFieldGet$e(channel, _ChannelClient_close, "f").call(channel);
10270
+ __classPrivateFieldGet$f(channel, _ChannelClient_close, "f").call(channel);
10265
10271
  }
10266
10272
  }
10267
10273
  /**
@@ -10272,7 +10278,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
10272
10278
  for (const channelClient of channelClientsByEndpointId.values()) {
10273
10279
  if (channelClient.providerIdentity.channelId === eventPayload.channelId) {
10274
10280
  channelClient.disconnectListener(eventPayload);
10275
- __classPrivateFieldGet$e(channelClient, _ChannelClient_close, "f").call(channelClient);
10281
+ __classPrivateFieldGet$f(channelClient, _ChannelClient_close, "f").call(channelClient);
10276
10282
  }
10277
10283
  }
10278
10284
  }
@@ -10287,12 +10293,12 @@ class ChannelClient extends channel_1$1.ChannelBase {
10287
10293
  this.processAction = (action, payload, senderIdentity) => super.processAction(action, payload, senderIdentity);
10288
10294
  _ChannelClient_close.set(this, () => {
10289
10295
  channelClientsByEndpointId.delete(this.endpointId);
10290
- __classPrivateFieldGet$e(this, _ChannelClient_strategy, "f").close();
10296
+ __classPrivateFieldGet$f(this, _ChannelClient_strategy, "f").close();
10291
10297
  });
10292
- __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");
10293
10299
  this.disconnectListener = () => undefined;
10294
10300
  this.endpointId = routingInfo.endpointId;
10295
- __classPrivateFieldSet$d(this, _ChannelClient_strategy, strategy, "f");
10301
+ __classPrivateFieldSet$e(this, _ChannelClient_strategy, strategy, "f");
10296
10302
  channelClientsByEndpointId.set(this.endpointId, this);
10297
10303
  strategy.receive(this.processAction);
10298
10304
  }
@@ -10300,7 +10306,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
10300
10306
  * a read-only provider identity
10301
10307
  */
10302
10308
  get providerIdentity() {
10303
- const protectedObj = __classPrivateFieldGet$e(this, _ChannelClient_protectedObj, "f");
10309
+ const protectedObj = __classPrivateFieldGet$f(this, _ChannelClient_protectedObj, "f");
10304
10310
  return protectedObj.providerIdentity;
10305
10311
  }
10306
10312
  /**
@@ -10329,9 +10335,9 @@ class ChannelClient extends channel_1$1.ChannelBase {
10329
10335
  * ```
10330
10336
  */
10331
10337
  async dispatch(action, payload) {
10332
- if (__classPrivateFieldGet$e(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
10338
+ if (__classPrivateFieldGet$f(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
10333
10339
  const callSites = transport_errors_1$1.RuntimeError.getCallSite();
10334
- 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) => {
10335
10341
  throw new channel_error_1$1.ChannelError(e, action, payload, callSites);
10336
10342
  });
10337
10343
  }
@@ -10383,10 +10389,10 @@ class ChannelClient extends channel_1$1.ChannelBase {
10383
10389
  */
10384
10390
  async disconnect() {
10385
10391
  await this.sendDisconnectAction();
10386
- __classPrivateFieldGet$e(this, _ChannelClient_close, "f").call(this);
10392
+ __classPrivateFieldGet$f(this, _ChannelClient_close, "f").call(this);
10387
10393
  }
10388
10394
  async sendDisconnectAction() {
10389
- const protectedObj = __classPrivateFieldGet$e(this, _ChannelClient_protectedObj, "f");
10395
+ const protectedObj = __classPrivateFieldGet$f(this, _ChannelClient_protectedObj, "f");
10390
10396
  await protectedObj.close();
10391
10397
  }
10392
10398
  /**
@@ -10419,13 +10425,13 @@ exhaustive.exhaustiveCheck = exhaustiveCheck;
10419
10425
 
10420
10426
  var strategy$3 = {};
10421
10427
 
10422
- 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) {
10423
10429
  if (kind === "m") throw new TypeError("Private method is not writable");
10424
10430
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10425
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");
10426
10432
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
10427
10433
  };
10428
- var __classPrivateFieldGet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10434
+ var __classPrivateFieldGet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10429
10435
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10430
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");
10431
10437
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -10450,7 +10456,7 @@ class ClassicStrategy {
10450
10456
  // connection problems occur
10451
10457
  _ClassicStrategy_pendingMessagesByEndpointId.set(this, new Map());
10452
10458
  this.send = async (endpointId, action, payload) => {
10453
- const to = __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10459
+ const to = __classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10454
10460
  if (!to) {
10455
10461
  throw new Error(`Could not locate routing info for endpoint ${endpointId}`);
10456
10462
  }
@@ -10462,13 +10468,13 @@ class ClassicStrategy {
10462
10468
  }
10463
10469
  delete cleanId.isLocalEndpointId;
10464
10470
  // grab the promise before awaiting it to save in our pending messages map
10465
- 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', {
10466
10472
  ...cleanId,
10467
10473
  providerIdentity: this.providerIdentity,
10468
10474
  action,
10469
10475
  payload
10470
10476
  });
10471
- __classPrivateFieldGet$d(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
10477
+ __classPrivateFieldGet$e(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
10472
10478
  const raw = await p
10473
10479
  .catch((error) => {
10474
10480
  if ('cause' in error) {
@@ -10478,16 +10484,16 @@ class ClassicStrategy {
10478
10484
  })
10479
10485
  .finally(() => {
10480
10486
  // clean up the pending promise
10481
- __classPrivateFieldGet$d(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
10487
+ __classPrivateFieldGet$e(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
10482
10488
  });
10483
10489
  return raw.payload.data.result;
10484
10490
  };
10485
10491
  this.close = async () => {
10486
10492
  this.messageReceiver.removeEndpoint(this.providerIdentity.channelId, this.endpointId);
10487
- [...__classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
10488
- __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");
10489
10495
  };
10490
- __classPrivateFieldSet$c(this, _ClassicStrategy_wire, wire, "f");
10496
+ __classPrivateFieldSet$d(this, _ClassicStrategy_wire, wire, "f");
10491
10497
  }
10492
10498
  onEndpointDisconnect(endpointId, listener) {
10493
10499
  // Never fires for 'classic'.
@@ -10496,20 +10502,20 @@ class ClassicStrategy {
10496
10502
  this.messageReceiver.addEndpoint(listener, this.providerIdentity.channelId, this.endpointId);
10497
10503
  }
10498
10504
  async closeEndpoint(endpointId) {
10499
- const id = __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
10500
- __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
10501
- 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);
10502
10508
  pendingSet?.forEach((p) => {
10503
10509
  const errorMsg = `Channel connection with identity uuid: ${id?.uuid} / name: ${id?.name} / endpointId: ${endpointId} no longer connected.`;
10504
10510
  p.cancel(new Error(errorMsg));
10505
10511
  });
10506
10512
  }
10507
10513
  isEndpointConnected(endpointId) {
10508
- return __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").has(endpointId);
10514
+ return __classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").has(endpointId);
10509
10515
  }
10510
10516
  addEndpoint(endpointId, payload) {
10511
- __classPrivateFieldGet$d(this, _ClassicStrategy_endpointIdentityMap, "f").set(endpointId, payload.endpointIdentity);
10512
- __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());
10513
10519
  }
10514
10520
  isValidEndpointPayload(payload) {
10515
10521
  return (typeof payload?.endpointIdentity?.endpointId === 'string' ||
@@ -10525,12 +10531,12 @@ var strategy$2 = {};
10525
10531
 
10526
10532
  var endpoint = {};
10527
10533
 
10528
- var __classPrivateFieldGet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10534
+ var __classPrivateFieldGet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10529
10535
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10530
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");
10531
10537
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10532
10538
  };
10533
- 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) {
10534
10540
  if (kind === "m") throw new TypeError("Private method is not writable");
10535
10541
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10536
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");
@@ -10565,8 +10571,8 @@ class RTCEndpoint {
10565
10571
  if (this.rtc.rtcClient.connectionState !== 'connected') {
10566
10572
  this.rtc.rtcClient.removeEventListener('connectionstatechange', this.connectionStateChangeHandler);
10567
10573
  this.close();
10568
- if (__classPrivateFieldGet$c(this, _RTCEndpoint_disconnectListener, "f")) {
10569
- __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);
10570
10576
  }
10571
10577
  }
10572
10578
  };
@@ -10614,9 +10620,9 @@ class RTCEndpoint {
10614
10620
  data = new TextDecoder().decode(e.data);
10615
10621
  }
10616
10622
  const { messageId, action, payload } = JSON.parse(data);
10617
- if (__classPrivateFieldGet$c(this, _RTCEndpoint_processAction, "f")) {
10623
+ if (__classPrivateFieldGet$d(this, _RTCEndpoint_processAction, "f")) {
10618
10624
  try {
10619
- 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);
10620
10626
  this.rtc.channels.response.send(JSON.stringify({
10621
10627
  messageId,
10622
10628
  payload: res,
@@ -10650,25 +10656,25 @@ class RTCEndpoint {
10650
10656
  datachannel.onclose = (e) => {
10651
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.')));
10652
10658
  this.close();
10653
- if (__classPrivateFieldGet$c(this, _RTCEndpoint_disconnectListener, "f")) {
10654
- __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);
10655
10661
  }
10656
10662
  };
10657
10663
  });
10658
10664
  }
10659
10665
  onDisconnect(listener) {
10660
- if (!__classPrivateFieldGet$c(this, _RTCEndpoint_disconnectListener, "f")) {
10661
- __classPrivateFieldSet$b(this, _RTCEndpoint_disconnectListener, listener, "f");
10666
+ if (!__classPrivateFieldGet$d(this, _RTCEndpoint_disconnectListener, "f")) {
10667
+ __classPrivateFieldSet$c(this, _RTCEndpoint_disconnectListener, listener, "f");
10662
10668
  }
10663
10669
  else {
10664
10670
  throw new Error('RTCEndpoint disconnectListener cannot be set twice.');
10665
10671
  }
10666
10672
  }
10667
10673
  receive(listener) {
10668
- if (__classPrivateFieldGet$c(this, _RTCEndpoint_processAction, "f")) {
10674
+ if (__classPrivateFieldGet$d(this, _RTCEndpoint_processAction, "f")) {
10669
10675
  throw new Error('You have already set a listener for this RTC Endpoint.');
10670
10676
  }
10671
- __classPrivateFieldSet$b(this, _RTCEndpoint_processAction, listener, "f");
10677
+ __classPrivateFieldSet$c(this, _RTCEndpoint_processAction, listener, "f");
10672
10678
  }
10673
10679
  get connected() {
10674
10680
  return this.rtc.rtcClient.connectionState === 'connected';
@@ -10679,12 +10685,12 @@ _RTCEndpoint_processAction = new WeakMap(), _RTCEndpoint_disconnectListener = ne
10679
10685
 
10680
10686
  var strategy$1 = {};
10681
10687
 
10682
- var __classPrivateFieldGet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10688
+ var __classPrivateFieldGet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10683
10689
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10684
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");
10685
10691
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10686
10692
  };
10687
- 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) {
10688
10694
  if (kind === "m") throw new TypeError("Private method is not writable");
10689
10695
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10690
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");
@@ -10705,11 +10711,11 @@ class EndpointStrategy {
10705
10711
  return this.getEndpointById(endpointId).send(action, payload);
10706
10712
  };
10707
10713
  this.close = async () => {
10708
- if (__classPrivateFieldGet$b(this, _EndpointStrategy_connected, "f")) {
10709
- __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
10710
- __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");
10711
10717
  }
10712
- __classPrivateFieldSet$a(this, _EndpointStrategy_connected, false, "f");
10718
+ __classPrivateFieldSet$b(this, _EndpointStrategy_connected, false, "f");
10713
10719
  };
10714
10720
  this.isValidEndpointPayload = validateEndpoint;
10715
10721
  }
@@ -10717,39 +10723,39 @@ class EndpointStrategy {
10717
10723
  this.getEndpointById(endpointId).onDisconnect(listener);
10718
10724
  }
10719
10725
  receive(listener) {
10720
- if (__classPrivateFieldGet$b(this, _EndpointStrategy_processAction, "f")) {
10726
+ if (__classPrivateFieldGet$c(this, _EndpointStrategy_processAction, "f")) {
10721
10727
  throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);
10722
10728
  }
10723
- __classPrivateFieldSet$a(this, _EndpointStrategy_processAction, listener, "f");
10729
+ __classPrivateFieldSet$b(this, _EndpointStrategy_processAction, listener, "f");
10724
10730
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
10725
- __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")));
10726
10732
  }
10727
10733
  getEndpointById(endpointId) {
10728
- const endpoint = __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").get(endpointId);
10734
+ const endpoint = __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").get(endpointId);
10729
10735
  if (!endpoint) {
10730
10736
  throw new Error(`Client with endpoint id ${endpointId} is not connected`);
10731
10737
  }
10732
10738
  return endpoint;
10733
10739
  }
10734
10740
  get connected() {
10735
- return __classPrivateFieldGet$b(this, _EndpointStrategy_connected, "f");
10741
+ return __classPrivateFieldGet$c(this, _EndpointStrategy_connected, "f");
10736
10742
  }
10737
10743
  isEndpointConnected(endpointId) {
10738
- return __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").has(endpointId);
10744
+ return __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").has(endpointId);
10739
10745
  }
10740
10746
  addEndpoint(endpointId, payload) {
10741
- if (!__classPrivateFieldGet$b(this, _EndpointStrategy_connected, "f")) {
10747
+ if (!__classPrivateFieldGet$c(this, _EndpointStrategy_connected, "f")) {
10742
10748
  console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);
10743
10749
  return;
10744
10750
  }
10745
10751
  const clientStrat = new this.EndpointType(payload);
10746
- if (__classPrivateFieldGet$b(this, _EndpointStrategy_processAction, "f")) {
10747
- 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"));
10748
10754
  }
10749
- __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").set(endpointId, clientStrat);
10755
+ __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").set(endpointId, clientStrat);
10750
10756
  }
10751
10757
  async closeEndpoint(endpointId) {
10752
- __classPrivateFieldGet$b(this, _EndpointStrategy_endpointMap, "f").delete(endpointId);
10758
+ __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").delete(endpointId);
10753
10759
  }
10754
10760
  }
10755
10761
  strategy$1.EndpointStrategy = EndpointStrategy;
@@ -10776,11 +10782,11 @@ var iceManager = {};
10776
10782
 
10777
10783
  Object.defineProperty(iceManager, "__esModule", { value: true });
10778
10784
  iceManager.RTCICEManager = void 0;
10779
- const base_1$f = base;
10785
+ const base_1$g = base;
10780
10786
  /*
10781
10787
  Singleton that facilitates Offer and Answer exchange required for establishing RTC connections.
10782
10788
  */
10783
- class RTCICEManager extends base_1$f.EmitterBase {
10789
+ class RTCICEManager extends base_1$g.EmitterBase {
10784
10790
  constructor(wire) {
10785
10791
  super(wire, 'channel');
10786
10792
  this.ensureChannelOpened = (channel) => {
@@ -10931,12 +10937,12 @@ function runtimeUuidMeetsMinimumRuntimeVersion(runtimeUuid, minVersion) {
10931
10937
  }
10932
10938
  runtimeVersioning.runtimeUuidMeetsMinimumRuntimeVersion = runtimeUuidMeetsMinimumRuntimeVersion;
10933
10939
 
10934
- var __classPrivateFieldGet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10940
+ var __classPrivateFieldGet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10935
10941
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10936
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");
10937
10943
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
10938
10944
  };
10939
- 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) {
10940
10946
  if (kind === "m") throw new TypeError("Private method is not writable");
10941
10947
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10942
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");
@@ -10980,19 +10986,19 @@ class ChannelProvider extends channel_1.ChannelBase {
10980
10986
  * a read-only array containing all the identities of connecting clients.
10981
10987
  */
10982
10988
  get connections() {
10983
- return [...__classPrivateFieldGet$a(this, _ChannelProvider_connections, "f")];
10989
+ return [...__classPrivateFieldGet$b(this, _ChannelProvider_connections, "f")];
10984
10990
  }
10985
10991
  static handleClientDisconnection(channel, payload) {
10986
10992
  if (payload?.endpointId) {
10987
10993
  const { uuid, name, endpointId, isLocalEndpointId } = payload;
10988
- __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 });
10989
10995
  }
10990
10996
  else {
10991
10997
  // this is here to support older runtimes that did not have endpointId
10992
10998
  const multipleRemoves = channel.connections.filter((identity) => {
10993
10999
  return identity.uuid === payload.uuid && identity.name === payload.name;
10994
11000
  });
10995
- multipleRemoves.forEach(__classPrivateFieldGet$a(channel, _ChannelProvider_removeEndpoint, "f"));
11001
+ multipleRemoves.forEach(__classPrivateFieldGet$b(channel, _ChannelProvider_removeEndpoint, "f"));
10996
11002
  }
10997
11003
  channel.disconnectListener(payload);
10998
11004
  }
@@ -11009,8 +11015,8 @@ class ChannelProvider extends channel_1.ChannelBase {
11009
11015
  _ChannelProvider_strategy.set(this, void 0);
11010
11016
  _ChannelProvider_removeEndpoint.set(this, (identity) => {
11011
11017
  const remainingConnections = this.connections.filter((clientIdentity) => clientIdentity.endpointId !== identity.endpointId);
11012
- __classPrivateFieldGet$a(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
11013
- __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");
11014
11020
  });
11015
11021
  // Must be bound.
11016
11022
  this.processAction = async (action, payload, senderIdentity) => {
@@ -11024,17 +11030,17 @@ class ChannelProvider extends channel_1.ChannelBase {
11024
11030
  return super.processAction(action, payload, senderIdentity);
11025
11031
  };
11026
11032
  _ChannelProvider_close.set(this, () => {
11027
- __classPrivateFieldGet$a(this, _ChannelProvider_strategy, "f").close();
11033
+ __classPrivateFieldGet$b(this, _ChannelProvider_strategy, "f").close();
11028
11034
  const remove = ChannelProvider.removalMap.get(this);
11029
11035
  if (remove) {
11030
11036
  remove();
11031
11037
  }
11032
11038
  });
11033
- __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");
11034
11040
  this.connectListener = () => undefined;
11035
11041
  this.disconnectListener = () => undefined;
11036
- __classPrivateFieldSet$9(this, _ChannelProvider_connections, [], "f");
11037
- __classPrivateFieldSet$9(this, _ChannelProvider_strategy, strategy, "f");
11042
+ __classPrivateFieldSet$a(this, _ChannelProvider_connections, [], "f");
11043
+ __classPrivateFieldSet$a(this, _ChannelProvider_strategy, strategy, "f");
11038
11044
  strategy.receive(this.processAction);
11039
11045
  }
11040
11046
  /**
@@ -11065,16 +11071,16 @@ class ChannelProvider extends channel_1.ChannelBase {
11065
11071
  */
11066
11072
  dispatch(to, action, payload) {
11067
11073
  const endpointId = to.endpointId ?? this.getEndpointIdForOpenFinId(to, action);
11068
- if (endpointId && __classPrivateFieldGet$a(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
11074
+ if (endpointId && __classPrivateFieldGet$b(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
11069
11075
  const callSites = transport_errors_1.RuntimeError.getCallSite();
11070
- 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) => {
11071
11077
  throw new channel_error_1.ChannelError(e, action, payload, callSites);
11072
11078
  });
11073
11079
  }
11074
11080
  return Promise.reject(new Error(`Client connection with identity uuid: ${to.uuid} / name: ${to.name} / endpointId: ${endpointId} no longer connected.`));
11075
11081
  }
11076
11082
  async processConnection(senderId, payload) {
11077
- __classPrivateFieldGet$a(this, _ChannelProvider_connections, "f").push(senderId);
11083
+ __classPrivateFieldGet$b(this, _ChannelProvider_connections, "f").push(senderId);
11078
11084
  return this.connectListener(senderId, payload);
11079
11085
  }
11080
11086
  /**
@@ -11097,7 +11103,7 @@ class ChannelProvider extends channel_1.ChannelBase {
11097
11103
  * ```
11098
11104
  */
11099
11105
  publish(action, payload) {
11100
- 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));
11101
11107
  }
11102
11108
  /**
11103
11109
  * Register a listener that is called on every new client connection.
@@ -11171,11 +11177,11 @@ class ChannelProvider extends channel_1.ChannelBase {
11171
11177
  * ```
11172
11178
  */
11173
11179
  async destroy() {
11174
- const protectedObj = __classPrivateFieldGet$a(this, _ChannelProvider_protectedObj, "f");
11180
+ const protectedObj = __classPrivateFieldGet$b(this, _ChannelProvider_protectedObj, "f");
11175
11181
  protectedObj.providerIdentity;
11176
- __classPrivateFieldSet$9(this, _ChannelProvider_connections, [], "f");
11182
+ __classPrivateFieldSet$a(this, _ChannelProvider_connections, [], "f");
11177
11183
  await protectedObj.close();
11178
- __classPrivateFieldGet$a(this, _ChannelProvider_close, "f").call(this);
11184
+ __classPrivateFieldGet$b(this, _ChannelProvider_close, "f").call(this);
11179
11185
  }
11180
11186
  /**
11181
11187
  * Returns an array with info on every Client connected to the Provider
@@ -11245,7 +11251,7 @@ class ChannelProvider extends channel_1.ChannelBase {
11245
11251
  getEndpointIdForOpenFinId(clientIdentity, action) {
11246
11252
  const matchingConnections = this.connections.filter((c) => c.name === clientIdentity.name && c.uuid === clientIdentity.uuid);
11247
11253
  if (matchingConnections.length >= 2) {
11248
- const protectedObj = __classPrivateFieldGet$a(this, _ChannelProvider_protectedObj, "f");
11254
+ const protectedObj = __classPrivateFieldGet$b(this, _ChannelProvider_protectedObj, "f");
11249
11255
  const { uuid, name } = clientIdentity;
11250
11256
  const providerUuid = protectedObj?.providerIdentity.uuid;
11251
11257
  const providerName = protectedObj?.providerIdentity.name;
@@ -11281,14 +11287,14 @@ var messageReceiver = {};
11281
11287
  Object.defineProperty(messageReceiver, "__esModule", { value: true });
11282
11288
  messageReceiver.MessageReceiver = void 0;
11283
11289
  const client_1$1 = client;
11284
- const base_1$e = base;
11290
+ const base_1$f = base;
11285
11291
  const errors_1 = errors;
11286
11292
  /*
11287
11293
  This is a singleton (per fin object) tasked with routing messages coming off the ipc to the correct endpoint.
11288
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.
11289
11295
  If functionality is not about receiving messages, it does not belong here.
11290
11296
  */
11291
- class MessageReceiver extends base_1$e.Base {
11297
+ class MessageReceiver extends base_1$f.Base {
11292
11298
  constructor(wire) {
11293
11299
  super(wire);
11294
11300
  this.onmessage = (msg) => {
@@ -11457,13 +11463,13 @@ class CombinedStrategy {
11457
11463
  }
11458
11464
  strategy.default = CombinedStrategy;
11459
11465
 
11460
- 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) {
11461
11467
  if (kind === "m") throw new TypeError("Private method is not writable");
11462
11468
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
11463
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");
11464
11470
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11465
11471
  };
11466
- var __classPrivateFieldGet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11472
+ var __classPrivateFieldGet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11467
11473
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
11468
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");
11469
11475
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -11475,7 +11481,7 @@ var _ConnectionManager_messageReceiver, _ConnectionManager_rtcConnectionManager;
11475
11481
  Object.defineProperty(connectionManager, "__esModule", { value: true });
11476
11482
  connectionManager.ConnectionManager = void 0;
11477
11483
  const exhaustive_1 = exhaustive;
11478
- const base_1$d = base;
11484
+ const base_1$e = base;
11479
11485
  const strategy_1 = strategy$3;
11480
11486
  const strategy_2 = strategy$2;
11481
11487
  const ice_manager_1 = iceManager;
@@ -11483,7 +11489,7 @@ const provider_1$1 = provider;
11483
11489
  const message_receiver_1 = messageReceiver;
11484
11490
  const protocol_manager_1 = protocolManager;
11485
11491
  const strategy_3 = __importDefault$4(strategy);
11486
- class ConnectionManager extends base_1$d.Base {
11492
+ class ConnectionManager extends base_1$e.Base {
11487
11493
  static getProtocolOptionsFromStrings(protocols) {
11488
11494
  return protocols.map((protocol) => {
11489
11495
  switch (protocol) {
@@ -11512,8 +11518,8 @@ class ConnectionManager extends base_1$d.Base {
11512
11518
  };
11513
11519
  this.providerMap = new Map();
11514
11520
  this.protocolManager = new protocol_manager_1.ProtocolManager(this.wire.environment.type === 'node' ? ['classic'] : ['rtc', 'classic']);
11515
- __classPrivateFieldSet$8(this, _ConnectionManager_messageReceiver, new message_receiver_1.MessageReceiver(wire), "f");
11516
- __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");
11517
11523
  wire.registerMessageHandler(this.onmessage.bind(this));
11518
11524
  }
11519
11525
  createProvider(options, providerIdentity) {
@@ -11524,7 +11530,7 @@ class ConnectionManager extends base_1$d.Base {
11524
11530
  case 'rtc':
11525
11531
  return new strategy_2.RTCStrategy();
11526
11532
  case 'classic':
11527
- 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"),
11528
11534
  // Providers do not have an endpointId, use channelId as endpointId in the strategy.
11529
11535
  providerIdentity.channelId, providerIdentity);
11530
11536
  default:
@@ -11560,7 +11566,7 @@ class ConnectionManager extends base_1$d.Base {
11560
11566
  const supportedProtocols = await Promise.all(protocols.map(async (type) => {
11561
11567
  switch (type) {
11562
11568
  case 'rtc': {
11563
- 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();
11564
11570
  rtcPacket = { rtcClient, channels, channelsOpened };
11565
11571
  return {
11566
11572
  type: 'rtc',
@@ -11587,18 +11593,18 @@ class ConnectionManager extends base_1$d.Base {
11587
11593
  routingInfo.endpointId = this.wire.environment.getNextMessageId();
11588
11594
  // For New Clients connecting to Old Providers. To prevent multi-dispatching and publishing, we delete previously-connected
11589
11595
  // clients that are in the same context as the newly-connected client.
11590
- __classPrivateFieldGet$9(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
11596
+ __classPrivateFieldGet$a(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
11591
11597
  }
11592
11598
  const answer = routingInfo.answer ?? {
11593
11599
  supportedProtocols: [{ type: 'classic', version: 1 }]
11594
11600
  };
11595
11601
  const createStrategyFromAnswer = async (protocol) => {
11596
11602
  if (protocol.type === 'rtc' && rtcPacket) {
11597
- 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);
11598
11604
  return new strategy_2.RTCStrategy();
11599
11605
  }
11600
11606
  if (protocol.type === 'classic') {
11601
- 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);
11602
11608
  }
11603
11609
  return null;
11604
11610
  };
@@ -11666,7 +11672,7 @@ class ConnectionManager extends base_1$d.Base {
11666
11672
  clientAnswer = await overlappingProtocols.reduce(async (accumP, protocolToUse) => {
11667
11673
  const answer = await accumP;
11668
11674
  if (protocolToUse.type === 'rtc') {
11669
- 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);
11670
11676
  answer.supportedProtocols.push({
11671
11677
  type: 'rtc',
11672
11678
  version: strategy_2.RTCInfo.version,
@@ -11714,13 +11720,13 @@ _ConnectionManager_messageReceiver = new WeakMap(), _ConnectionManager_rtcConnec
11714
11720
  *
11715
11721
  * @packageDocumentation
11716
11722
  */
11717
- 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) {
11718
11724
  if (kind === "m") throw new TypeError("Private method is not writable");
11719
11725
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
11720
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");
11721
11727
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11722
11728
  };
11723
- var __classPrivateFieldGet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11729
+ var __classPrivateFieldGet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11724
11730
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
11725
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");
11726
11732
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -11730,8 +11736,8 @@ Object.defineProperty(channel$1, "__esModule", { value: true });
11730
11736
  channel$1.Channel = void 0;
11731
11737
  /* eslint-disable no-console */
11732
11738
  const events_1$2 = require$$0;
11733
- const lazy_1$1 = lazy;
11734
- const base_1$c = base;
11739
+ const lazy_1$2 = lazy;
11740
+ const base_1$d = base;
11735
11741
  const client_1 = client;
11736
11742
  const connection_manager_1 = connectionManager;
11737
11743
  const provider_1 = provider;
@@ -11762,7 +11768,7 @@ function retryDelay(count) {
11762
11768
  * * {@link Channel.onChannelConnect onChannelConnect(listener)}
11763
11769
  * * {@link Channel.onChannelDisconnect onChannelDisconnect(listener)}
11764
11770
  */
11765
- class Channel extends base_1$c.EmitterBase {
11771
+ class Channel extends base_1$d.EmitterBase {
11766
11772
  /**
11767
11773
  * @internal
11768
11774
  */
@@ -11771,17 +11777,17 @@ class Channel extends base_1$c.EmitterBase {
11771
11777
  _Channel_connectionManager.set(this, void 0);
11772
11778
  _Channel_internalEmitter.set(this, new events_1$2.EventEmitter());
11773
11779
  // OpenFin API has not been injected at construction time, *must* wait for API to be ready.
11774
- _Channel_readyToConnect.set(this, new lazy_1$1.AsyncRetryableLazy(async () => {
11780
+ _Channel_readyToConnect.set(this, new lazy_1$2.AsyncRetryableLazy(async () => {
11775
11781
  await Promise.all([
11776
11782
  this.on('disconnected', (eventPayload) => {
11777
11783
  client_1.ChannelClient.handleProviderDisconnect(eventPayload);
11778
11784
  }),
11779
11785
  this.on('connected', (...args) => {
11780
- __classPrivateFieldGet$8(this, _Channel_internalEmitter, "f").emit('connected', ...args);
11786
+ __classPrivateFieldGet$9(this, _Channel_internalEmitter, "f").emit('connected', ...args);
11781
11787
  })
11782
11788
  ]).catch(() => new Error('error setting up channel connection listeners'));
11783
11789
  }));
11784
- __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");
11785
11791
  }
11786
11792
  /**
11787
11793
  *
@@ -11856,7 +11862,7 @@ class Channel extends base_1$c.EmitterBase {
11856
11862
  resolve(true);
11857
11863
  }
11858
11864
  };
11859
- __classPrivateFieldGet$8(this, _Channel_internalEmitter, "f").on('connected', connectedListener);
11865
+ __classPrivateFieldGet$9(this, _Channel_internalEmitter, "f").on('connected', connectedListener);
11860
11866
  });
11861
11867
  try {
11862
11868
  if (retryInfo.count > 0) {
@@ -11888,7 +11894,7 @@ class Channel extends base_1$c.EmitterBase {
11888
11894
  finally {
11889
11895
  retryInfo.count += 1;
11890
11896
  // in case of other errors, remove our listener
11891
- __classPrivateFieldGet$8(this, _Channel_internalEmitter, "f").removeListener('connected', connectedListener);
11897
+ __classPrivateFieldGet$9(this, _Channel_internalEmitter, "f").removeListener('connected', connectedListener);
11892
11898
  }
11893
11899
  } while (shouldWait); // If we're waiting we retry the above loop
11894
11900
  // Should wait was false, no channel was found.
@@ -11947,12 +11953,12 @@ class Channel extends base_1$c.EmitterBase {
11947
11953
  async connect(channelName, options = {}) {
11948
11954
  // Make sure we don't connect before listeners are set up
11949
11955
  // This also errors if we're not in OpenFin, ensuring we don't run unnecessary code
11950
- await __classPrivateFieldGet$8(this, _Channel_readyToConnect, "f").getValue();
11956
+ await __classPrivateFieldGet$9(this, _Channel_readyToConnect, "f").getValue();
11951
11957
  if (!channelName || typeof channelName !== 'string') {
11952
11958
  throw new Error('Please provide a channelName string to connect to a channel.');
11953
11959
  }
11954
11960
  const opts = { wait: true, ...this.wire.environment.getDefaultChannelOptions().connect, ...options };
11955
- 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);
11956
11962
  let connectionUrl;
11957
11963
  if (this.fin.me.isFrame || this.fin.me.isView || this.fin.me.isWindow) {
11958
11964
  connectionUrl = (await this.fin.me.getInfo()).url;
@@ -11964,7 +11970,7 @@ class Channel extends base_1$c.EmitterBase {
11964
11970
  connectionUrl
11965
11971
  };
11966
11972
  const routingInfo = await this.safeConnect(channelName, opts.wait, connectPayload);
11967
- 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);
11968
11974
  const channel = new client_1.ChannelClient(routingInfo, () => client_1.ChannelClient.wireClose(this.wire, routingInfo, routingInfo.endpointId), strategy);
11969
11975
  // It is the client's responsibility to handle endpoint disconnection to the provider.
11970
11976
  // If the endpoint dies, the client will force a disconnection through the core.
@@ -12033,7 +12039,7 @@ class Channel extends base_1$c.EmitterBase {
12033
12039
  throw new Error('Please provide a channelName to create a channel');
12034
12040
  }
12035
12041
  const { payload: { data: providerIdentity } } = await this.wire.sendAction('create-channel', { channelName });
12036
- const channel = __classPrivateFieldGet$8(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
12042
+ const channel = __classPrivateFieldGet$9(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
12037
12043
  // TODO: fix typing (internal)
12038
12044
  // @ts-expect-error
12039
12045
  this.on('client-disconnected', (eventPayload) => {
@@ -12057,7 +12063,7 @@ interappbus.InterAppPayload = interappbus.InterApplicationBus = void 0;
12057
12063
  * @packageDocumentation
12058
12064
  */
12059
12065
  const events_1$1 = require$$0;
12060
- const base_1$b = base;
12066
+ const base_1$c = base;
12061
12067
  const ref_counter_1 = refCounter;
12062
12068
  const index_1$2 = channel$1;
12063
12069
  const validate_1$2 = validate;
@@ -12065,7 +12071,7 @@ const validate_1$2 = validate;
12065
12071
  * A messaging bus that allows for pub/sub messaging between different applications.
12066
12072
  *
12067
12073
  */
12068
- class InterApplicationBus extends base_1$b.Base {
12074
+ class InterApplicationBus extends base_1$c.Base {
12069
12075
  /**
12070
12076
  * @internal
12071
12077
  */
@@ -12271,12 +12277,12 @@ var clipboard = {};
12271
12277
  */
12272
12278
  Object.defineProperty(clipboard, "__esModule", { value: true });
12273
12279
  clipboard.Clipboard = void 0;
12274
- const base_1$a = base;
12280
+ const base_1$b = base;
12275
12281
  /**
12276
12282
  * The Clipboard API allows reading and writing to the clipboard in multiple formats.
12277
12283
  *
12278
12284
  */
12279
- class Clipboard extends base_1$a.Base {
12285
+ class Clipboard extends base_1$b.Base {
12280
12286
  /**
12281
12287
  * Writes data into the clipboard as plain text
12282
12288
  * @param writeObj The object for writing data into the clipboard
@@ -12460,12 +12466,12 @@ var globalHotkey = {};
12460
12466
 
12461
12467
  Object.defineProperty(globalHotkey, "__esModule", { value: true });
12462
12468
  globalHotkey.GlobalHotkey = void 0;
12463
- const base_1$9 = base;
12469
+ const base_1$a = base;
12464
12470
  /**
12465
12471
  * The GlobalHotkey module can register/unregister a global hotkeys.
12466
12472
  *
12467
12473
  */
12468
- class GlobalHotkey extends base_1$9.EmitterBase {
12474
+ class GlobalHotkey extends base_1$a.EmitterBase {
12469
12475
  /**
12470
12476
  * @internal
12471
12477
  */
@@ -12599,13 +12605,13 @@ var Factory$3 = {};
12599
12605
 
12600
12606
  var Instance$2 = {};
12601
12607
 
12602
- 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) {
12603
12609
  if (kind === "m") throw new TypeError("Private method is not writable");
12604
12610
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
12605
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");
12606
12612
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12607
12613
  };
12608
- var __classPrivateFieldGet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12614
+ var __classPrivateFieldGet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12609
12615
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
12610
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");
12611
12617
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -12614,14 +12620,14 @@ var _Platform_channelName, _Platform_connectToProvider;
12614
12620
  Object.defineProperty(Instance$2, "__esModule", { value: true });
12615
12621
  Instance$2.Platform = void 0;
12616
12622
  /* eslint-disable import/prefer-default-export, no-undef */
12617
- const base_1$8 = base;
12623
+ const base_1$9 = base;
12618
12624
  const validate_1$1 = validate;
12619
12625
  /** Manages the life cycle of windows and views in the application.
12620
12626
  *
12621
12627
  * Enables taking snapshots of itself and applying them to restore a previous configuration
12622
12628
  * as well as listen to {@link OpenFin.PlatformEvents platform events}.
12623
12629
  */
12624
- class Platform extends base_1$8.EmitterBase {
12630
+ class Platform extends base_1$9.EmitterBase {
12625
12631
  /**
12626
12632
  * @internal
12627
12633
  */
@@ -12642,24 +12648,24 @@ class Platform extends base_1$8.EmitterBase {
12642
12648
  this.wire.sendAction('platform-get-client', this.identity).catch((e) => {
12643
12649
  // don't expose
12644
12650
  });
12645
- if (!Platform.clientMap.has(__classPrivateFieldGet$7(this, _Platform_channelName, "f"))) {
12646
- const clientPromise = __classPrivateFieldGet$7(this, _Platform_connectToProvider, "f").call(this);
12647
- 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);
12648
12654
  }
12649
12655
  // we set it above
12650
12656
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
12651
- return Platform.clientMap.get(__classPrivateFieldGet$7(this, _Platform_channelName, "f"));
12657
+ return Platform.clientMap.get(__classPrivateFieldGet$8(this, _Platform_channelName, "f"));
12652
12658
  };
12653
12659
  _Platform_connectToProvider.set(this, async () => {
12654
12660
  try {
12655
- 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 });
12656
12662
  client.onDisconnection(() => {
12657
- Platform.clientMap.delete(__classPrivateFieldGet$7(this, _Platform_channelName, "f"));
12663
+ Platform.clientMap.delete(__classPrivateFieldGet$8(this, _Platform_channelName, "f"));
12658
12664
  });
12659
12665
  return client;
12660
12666
  }
12661
12667
  catch (e) {
12662
- Platform.clientMap.delete(__classPrivateFieldGet$7(this, _Platform_channelName, "f"));
12668
+ Platform.clientMap.delete(__classPrivateFieldGet$8(this, _Platform_channelName, "f"));
12663
12669
  throw new Error('The targeted Platform is not currently running. Listen for application-started event for the given Uuid.');
12664
12670
  }
12665
12671
  });
@@ -12672,7 +12678,7 @@ class Platform extends base_1$8.EmitterBase {
12672
12678
  if (errorMsg) {
12673
12679
  throw new Error(errorMsg);
12674
12680
  }
12675
- __classPrivateFieldSet$6(this, _Platform_channelName, channelName, "f");
12681
+ __classPrivateFieldSet$7(this, _Platform_channelName, channelName, "f");
12676
12682
  this._channel = this.fin.InterApplicationBus.Channel;
12677
12683
  this.identity = { uuid: identity.uuid };
12678
12684
  this.Layout = this.fin.Platform.Layout;
@@ -13728,13 +13734,13 @@ const createRelayedDispatch = (client, target, relayId, relayErrorMsg) => async
13728
13734
  };
13729
13735
  channelApiRelay.createRelayedDispatch = createRelayedDispatch;
13730
13736
 
13731
- 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) {
13732
13738
  if (kind === "m") throw new TypeError("Private method is not writable");
13733
13739
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
13734
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");
13735
13741
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
13736
13742
  };
13737
- var __classPrivateFieldGet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13743
+ var __classPrivateFieldGet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
13738
13744
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13739
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");
13740
13746
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -13788,7 +13794,7 @@ class LayoutNode {
13788
13794
  * console.log(`The parent ColumnOrRow is root: ${parentIsRoot}`);
13789
13795
  * ```
13790
13796
  */
13791
- this.isRoot = () => __classPrivateFieldGet$6(this, _LayoutNode_client, "f").isRoot(this.entityId);
13797
+ this.isRoot = () => __classPrivateFieldGet$7(this, _LayoutNode_client, "f").isRoot(this.entityId);
13792
13798
  /**
13793
13799
  * Checks if the TabStack or ColumnOrRow exists
13794
13800
  *
@@ -13808,7 +13814,7 @@ class LayoutNode {
13808
13814
  * console.log(`The entity exists: ${exists}`);
13809
13815
  * ```
13810
13816
  */
13811
- this.exists = () => __classPrivateFieldGet$6(this, _LayoutNode_client, "f").exists(this.entityId);
13817
+ this.exists = () => __classPrivateFieldGet$7(this, _LayoutNode_client, "f").exists(this.entityId);
13812
13818
  /**
13813
13819
  * Retrieves the parent of the TabStack or ColumnOrRow
13814
13820
  *
@@ -13829,11 +13835,11 @@ class LayoutNode {
13829
13835
  * ```
13830
13836
  */
13831
13837
  this.getParent = async () => {
13832
- 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);
13833
13839
  if (!parent) {
13834
13840
  return undefined;
13835
13841
  }
13836
- return LayoutNode.getEntity(parent, __classPrivateFieldGet$6(this, _LayoutNode_client, "f"));
13842
+ return LayoutNode.getEntity(parent, __classPrivateFieldGet$7(this, _LayoutNode_client, "f"));
13837
13843
  };
13838
13844
  /**
13839
13845
  * Creates a new TabStack adjacent to the given TabStack or ColumnOrRow. Inputs can be new views to create, or existing views.
@@ -13884,8 +13890,8 @@ class LayoutNode {
13884
13890
  * @experimental
13885
13891
  */
13886
13892
  this.createAdjacentStack = async (views, options) => {
13887
- const entityId = await __classPrivateFieldGet$6(this, _LayoutNode_client, "f").createAdjacentStack(this.entityId, views, options);
13888
- 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"));
13889
13895
  };
13890
13896
  /**
13891
13897
  * Retrieves the adjacent TabStacks of the given TabStack or ColumnOrRow.
@@ -13913,16 +13919,16 @@ class LayoutNode {
13913
13919
  * @experimental
13914
13920
  */
13915
13921
  this.getAdjacentStacks = async (edge) => {
13916
- const adjacentStacks = await __classPrivateFieldGet$6(this, _LayoutNode_client, "f").getAdjacentStacks({
13922
+ const adjacentStacks = await __classPrivateFieldGet$7(this, _LayoutNode_client, "f").getAdjacentStacks({
13917
13923
  targetId: this.entityId,
13918
13924
  edge
13919
13925
  });
13920
13926
  return adjacentStacks.map((stack) => LayoutNode.getEntity({
13921
13927
  type: 'stack',
13922
13928
  entityId: stack.entityId
13923
- }, __classPrivateFieldGet$6(this, _LayoutNode_client, "f")));
13929
+ }, __classPrivateFieldGet$7(this, _LayoutNode_client, "f")));
13924
13930
  };
13925
- __classPrivateFieldSet$5(this, _LayoutNode_client, client, "f");
13931
+ __classPrivateFieldSet$6(this, _LayoutNode_client, client, "f");
13926
13932
  this.entityId = entityId;
13927
13933
  }
13928
13934
  }
@@ -13995,7 +14001,7 @@ class TabStack extends LayoutNode {
13995
14001
  * ```
13996
14002
  * @experimental
13997
14003
  */
13998
- this.getViews = () => __classPrivateFieldGet$6(this, _TabStack_client, "f").getStackViews(this.entityId);
14004
+ this.getViews = () => __classPrivateFieldGet$7(this, _TabStack_client, "f").getStackViews(this.entityId);
13999
14005
  /**
14000
14006
  * Adds or creates a view in this {@link TabStack}.
14001
14007
  *
@@ -14025,7 +14031,7 @@ class TabStack extends LayoutNode {
14025
14031
  * ```
14026
14032
  * @experimental
14027
14033
  */
14028
- 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);
14029
14035
  /**
14030
14036
  * Removes a view from this {@link TabStack}.
14031
14037
  *
@@ -14055,7 +14061,7 @@ class TabStack extends LayoutNode {
14055
14061
  * ```
14056
14062
  */
14057
14063
  this.removeView = async (view) => {
14058
- await __classPrivateFieldGet$6(this, _TabStack_client, "f").removeViewFromStack(this.entityId, view);
14064
+ await __classPrivateFieldGet$7(this, _TabStack_client, "f").removeViewFromStack(this.entityId, view);
14059
14065
  };
14060
14066
  /**
14061
14067
  * Sets the active view of the {@link TabStack} without focusing it.
@@ -14079,9 +14085,9 @@ class TabStack extends LayoutNode {
14079
14085
  * @experimental
14080
14086
  */
14081
14087
  this.setActiveView = async (view) => {
14082
- await __classPrivateFieldGet$6(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
14088
+ await __classPrivateFieldGet$7(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
14083
14089
  };
14084
- __classPrivateFieldSet$5(this, _TabStack_client, client, "f");
14090
+ __classPrivateFieldSet$6(this, _TabStack_client, client, "f");
14085
14091
  }
14086
14092
  }
14087
14093
  layoutEntities.TabStack = TabStack;
@@ -14120,10 +14126,10 @@ class ColumnOrRow extends LayoutNode {
14120
14126
  * ```
14121
14127
  */
14122
14128
  this.getContent = async () => {
14123
- const contentItemEntities = await __classPrivateFieldGet$6(this, _ColumnOrRow_client, "f").getContent(this.entityId);
14124
- 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")));
14125
14131
  };
14126
- __classPrivateFieldSet$5(this, _ColumnOrRow_client, client, "f");
14132
+ __classPrivateFieldSet$6(this, _ColumnOrRow_client, client, "f");
14127
14133
  this.type = type;
14128
14134
  }
14129
14135
  }
@@ -14138,7 +14144,7 @@ layout_constants.LAYOUT_CONTROLLER_ID = 'layout-entities';
14138
14144
  // TODO: eventually export this somehow
14139
14145
  layout_constants.DEFAULT_LAYOUT_KEY = '__default__';
14140
14146
 
14141
- var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14147
+ var __classPrivateFieldGet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14142
14148
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14143
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");
14144
14150
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -14146,9 +14152,9 @@ var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateF
14146
14152
  var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
14147
14153
  Object.defineProperty(Instance$1, "__esModule", { value: true });
14148
14154
  Instance$1.Layout = void 0;
14149
- const lazy_1 = lazy;
14155
+ const lazy_1$1 = lazy;
14150
14156
  const validate_1 = validate;
14151
- const base_1$7 = base;
14157
+ const base_1$8 = base;
14152
14158
  const common_utils_1$1 = commonUtils;
14153
14159
  const layout_entities_1 = layoutEntities;
14154
14160
  const layout_constants_1$1 = layout_constants;
@@ -14284,12 +14290,12 @@ const layout_constants_1$1 = layout_constants;
14284
14290
  * }
14285
14291
  * ```
14286
14292
  */
14287
- class Layout extends base_1$7.Base {
14293
+ class Layout extends base_1$8.Base {
14288
14294
  /**
14289
14295
  * @internal
14290
14296
  */
14291
14297
  static getClient(layout) {
14292
- return __classPrivateFieldGet$5(layout, _Layout_layoutClient, "f").getValue();
14298
+ return __classPrivateFieldGet$6(layout, _Layout_layoutClient, "f").getValue();
14293
14299
  }
14294
14300
  /**
14295
14301
  * @internal
@@ -14303,7 +14309,7 @@ class Layout extends base_1$7.Base {
14303
14309
  * Lazily constructed {@link LayoutEntitiesClient} bound to this platform's client and identity
14304
14310
  * The client is for {@link LayoutEntitiesController}
14305
14311
  */
14306
- _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)));
14307
14313
  /**
14308
14314
  * Replaces a Platform window's layout with a new layout.
14309
14315
  *
@@ -14512,7 +14518,7 @@ class Layout extends base_1$7.Base {
14512
14518
  this.wire.sendAction('layout-get-root-item').catch(() => {
14513
14519
  // don't expose
14514
14520
  });
14515
- const client = await __classPrivateFieldGet$5(this, _Layout_layoutClient, "f").getValue();
14521
+ const client = await __classPrivateFieldGet$6(this, _Layout_layoutClient, "f").getValue();
14516
14522
  const root = await client.getRoot('layoutName' in this.identity ? this.identity : undefined);
14517
14523
  return layout_entities_1.LayoutNode.getEntity(root, client);
14518
14524
  }
@@ -14530,7 +14536,7 @@ class Layout extends base_1$7.Base {
14530
14536
  this.wire.sendAction('layout-get-stack-by-view').catch(() => {
14531
14537
  // don't expose
14532
14538
  });
14533
- const client = await __classPrivateFieldGet$5(this, _Layout_layoutClient, "f").getValue();
14539
+ const client = await __classPrivateFieldGet$6(this, _Layout_layoutClient, "f").getValue();
14534
14540
  const stack = await client.getStackByView(identity);
14535
14541
  if (!stack) {
14536
14542
  throw new Error(`No stack found for view: ${identity.uuid}/${identity.name}`);
@@ -14550,7 +14556,7 @@ class Layout extends base_1$7.Base {
14550
14556
  this.wire.sendAction('layout-add-view').catch((e) => {
14551
14557
  // don't expose
14552
14558
  });
14553
- 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', {
14554
14560
  viewOptions,
14555
14561
  location,
14556
14562
  targetView
@@ -14568,7 +14574,7 @@ class Layout extends base_1$7.Base {
14568
14574
  this.wire.sendAction('layout-close-view').catch((e) => {
14569
14575
  // don't expose
14570
14576
  });
14571
- 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 });
14572
14578
  }
14573
14579
  }
14574
14580
  Instance$1.Layout = Layout;
@@ -14582,12 +14588,12 @@ async function _Layout_forwardLayoutAction(action, payload) {
14582
14588
  return client.dispatch(action, { target: this.identity, opts: payload });
14583
14589
  };
14584
14590
 
14585
- var __classPrivateFieldGet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14591
+ var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14586
14592
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
14587
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");
14588
14594
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
14589
14595
  };
14590
- 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) {
14591
14597
  if (kind === "m") throw new TypeError("Private method is not writable");
14592
14598
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14593
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");
@@ -14596,13 +14602,13 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
14596
14602
  var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getLayoutManagerSpy, _LayoutModule_getSafeLayoutManager;
14597
14603
  Object.defineProperty(Factory$2, "__esModule", { value: true });
14598
14604
  Factory$2.LayoutModule = void 0;
14599
- const base_1$6 = base;
14605
+ const base_1$7 = base;
14600
14606
  const Instance_1$2 = Instance$1;
14601
14607
  const layout_constants_1 = layout_constants;
14602
14608
  /**
14603
14609
  * Static namespace for OpenFin API methods that interact with the {@link Layout} class, available under `fin.Platform.Layout`.
14604
14610
  */
14605
- class LayoutModule extends base_1$6.Base {
14611
+ class LayoutModule extends base_1$7.Base {
14606
14612
  constructor() {
14607
14613
  super(...arguments);
14608
14614
  _LayoutModule_instances.add(this);
@@ -14653,23 +14659,23 @@ class LayoutModule extends base_1$6.Base {
14653
14659
  if (!this.wire.environment.layoutAllowedInContext(this.fin)) {
14654
14660
  throw new Error('Layout.init can only be called from a Window context.');
14655
14661
  }
14656
- if (__classPrivateFieldGet$4(this, _LayoutModule_layoutInitializationAttempted, "f")) {
14662
+ if (__classPrivateFieldGet$5(this, _LayoutModule_layoutInitializationAttempted, "f")) {
14657
14663
  throw new Error('Layout.init was already called, please use Layout.create to add additional layouts.');
14658
14664
  }
14659
14665
  if (this.wire.environment.type === 'openfin') {
14660
14666
  // preload the client
14661
14667
  await this.fin.Platform.getCurrentSync().getClient();
14662
14668
  }
14663
- __classPrivateFieldSet$4(this, _LayoutModule_layoutInitializationAttempted, true, "f");
14669
+ __classPrivateFieldSet$5(this, _LayoutModule_layoutInitializationAttempted, true, "f");
14664
14670
  // TODO: rename to createLayoutManager
14665
- __classPrivateFieldSet$4(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
14666
- 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);
14667
14673
  const meIdentity = { name: this.fin.me.name, uuid: this.fin.me.uuid };
14668
14674
  if (!options.layoutManagerOverride) {
14669
14675
  // CORE-1081 to be removed when we actually delete the `layoutManager` prop
14670
14676
  // in single-layout case, we return the undocumented layoutManager type
14671
14677
  const layoutIdentity = { layoutName: layout_constants_1.DEFAULT_LAYOUT_KEY, ...meIdentity };
14672
- return __classPrivateFieldGet$4(this, _LayoutModule_getLayoutManagerSpy, "f").call(this, layoutIdentity);
14678
+ return __classPrivateFieldGet$5(this, _LayoutModule_getLayoutManagerSpy, "f").call(this, layoutIdentity);
14673
14679
  }
14674
14680
  return this.wrapSync(meIdentity);
14675
14681
  };
@@ -14698,13 +14704,13 @@ class LayoutModule extends base_1$6.Base {
14698
14704
  * @returns
14699
14705
  */
14700
14706
  this.getCurrentLayoutManagerSync = () => {
14701
- 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()`);
14702
14708
  };
14703
14709
  this.create = async (options) => {
14704
- 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);
14705
14711
  };
14706
14712
  this.destroy = async (layoutIdentity) => {
14707
- 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);
14708
14714
  };
14709
14715
  }
14710
14716
  /**
@@ -14845,10 +14851,10 @@ class LayoutModule extends base_1$6.Base {
14845
14851
  }
14846
14852
  Factory$2.LayoutModule = LayoutModule;
14847
14853
  _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getLayoutManagerSpy = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_getSafeLayoutManager = function _LayoutModule_getSafeLayoutManager(method) {
14848
- if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
14854
+ if (!__classPrivateFieldGet$5(this, _LayoutModule_layoutManager, "f")) {
14849
14855
  throw new Error(`You must call init before using the API ${method}`);
14850
14856
  }
14851
- return __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f");
14857
+ return __classPrivateFieldGet$5(this, _LayoutModule_layoutManager, "f");
14852
14858
  };
14853
14859
 
14854
14860
  (function (exports) {
@@ -14885,13 +14891,13 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layou
14885
14891
 
14886
14892
  Object.defineProperty(Factory$3, "__esModule", { value: true });
14887
14893
  Factory$3.PlatformModule = void 0;
14888
- const base_1$5 = base;
14894
+ const base_1$6 = base;
14889
14895
  const Instance_1$1 = Instance$2;
14890
14896
  const index_1$1 = layout;
14891
14897
  /**
14892
14898
  * Static namespace for OpenFin API methods that interact with the {@link Platform} class, available under `fin.Platform`.
14893
14899
  */
14894
- class PlatformModule extends base_1$5.Base {
14900
+ class PlatformModule extends base_1$6.Base {
14895
14901
  /**
14896
14902
  * @internal
14897
14903
  */
@@ -15210,27 +15216,27 @@ var InteropClient$1 = {};
15210
15216
 
15211
15217
  var SessionContextGroupClient$1 = {};
15212
15218
 
15213
- 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) {
15214
15220
  if (kind === "m") throw new TypeError("Private method is not writable");
15215
15221
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
15216
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");
15217
15223
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
15218
15224
  };
15219
- var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15225
+ var __classPrivateFieldGet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15220
15226
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
15221
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");
15222
15228
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15223
15229
  };
15224
15230
  var _SessionContextGroupClient_clientPromise;
15225
15231
  Object.defineProperty(SessionContextGroupClient$1, "__esModule", { value: true });
15226
- const base_1$4 = base;
15232
+ const base_1$5 = base;
15227
15233
  const utils_1$6 = utils$3;
15228
- class SessionContextGroupClient extends base_1$4.Base {
15234
+ class SessionContextGroupClient extends base_1$5.Base {
15229
15235
  constructor(wire, client, id) {
15230
15236
  super(wire);
15231
15237
  _SessionContextGroupClient_clientPromise.set(this, void 0);
15232
15238
  this.id = id;
15233
- __classPrivateFieldSet$3(this, _SessionContextGroupClient_clientPromise, client, "f");
15239
+ __classPrivateFieldSet$4(this, _SessionContextGroupClient_clientPromise, client, "f");
15234
15240
  }
15235
15241
  /**
15236
15242
  * Sets a context for the session context group.
@@ -15242,7 +15248,7 @@ class SessionContextGroupClient extends base_1$4.Base {
15242
15248
  this.wire.sendAction('interop-session-context-group-set-context').catch((e) => {
15243
15249
  // don't expose, analytics-only call
15244
15250
  });
15245
- const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
15251
+ const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
15246
15252
  return client.dispatch(`sessionContextGroup:setContext-${this.id}`, {
15247
15253
  sessionContextGroupId: this.id,
15248
15254
  context
@@ -15252,7 +15258,7 @@ class SessionContextGroupClient extends base_1$4.Base {
15252
15258
  this.wire.sendAction('interop-session-context-group-get-context').catch((e) => {
15253
15259
  // don't expose, analytics-only call
15254
15260
  });
15255
- const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
15261
+ const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
15256
15262
  return client.dispatch(`sessionContextGroup:getContext-${this.id}`, {
15257
15263
  sessionContextGroupId: this.id,
15258
15264
  type
@@ -15265,7 +15271,7 @@ class SessionContextGroupClient extends base_1$4.Base {
15265
15271
  if (typeof contextHandler !== 'function') {
15266
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.");
15267
15273
  }
15268
- const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
15274
+ const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
15269
15275
  let handlerId;
15270
15276
  if (contextType) {
15271
15277
  handlerId = `sessionContextHandler:invoke-${this.id}-${contextType}-${(0, utils_1$6.generateId)()}`;
@@ -15278,7 +15284,7 @@ class SessionContextGroupClient extends base_1$4.Base {
15278
15284
  return { unsubscribe: await this.createUnsubscribeCb(handlerId) };
15279
15285
  }
15280
15286
  async createUnsubscribeCb(handlerId) {
15281
- const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
15287
+ const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
15282
15288
  return async () => {
15283
15289
  client.remove(handlerId);
15284
15290
  await client.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`, { handlerId });
@@ -15296,13 +15302,13 @@ class SessionContextGroupClient extends base_1$4.Base {
15296
15302
  SessionContextGroupClient$1.default = SessionContextGroupClient;
15297
15303
  _SessionContextGroupClient_clientPromise = new WeakMap();
15298
15304
 
15299
- 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) {
15300
15306
  if (kind === "m") throw new TypeError("Private method is not writable");
15301
15307
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
15302
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");
15303
15309
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
15304
15310
  };
15305
- var __classPrivateFieldGet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15311
+ var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15306
15312
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
15307
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");
15308
15314
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -15313,7 +15319,7 @@ var __importDefault$3 = (commonjsGlobal && commonjsGlobal.__importDefault) || fu
15313
15319
  var _InteropClient_clientPromise, _InteropClient_sessionContextGroups, _InteropClient_fdc3Factory;
15314
15320
  Object.defineProperty(InteropClient$1, "__esModule", { value: true });
15315
15321
  InteropClient$1.InteropClient = void 0;
15316
- const base_1$3 = base;
15322
+ const base_1$4 = base;
15317
15323
  const SessionContextGroupClient_1 = __importDefault$3(SessionContextGroupClient$1);
15318
15324
  const utils_1$5 = utils$3;
15319
15325
  /**
@@ -15365,7 +15371,7 @@ const utils_1$5 = utils$3;
15365
15371
  * * {@link InteropClient#getAllClientsInContextGroup getAllClientsInContextGroup(contextGroupId)}
15366
15372
  *
15367
15373
  */
15368
- class InteropClient extends base_1$3.Base {
15374
+ class InteropClient extends base_1$4.Base {
15369
15375
  /**
15370
15376
  * @internal
15371
15377
  */
@@ -15374,9 +15380,9 @@ class InteropClient extends base_1$3.Base {
15374
15380
  _InteropClient_clientPromise.set(this, void 0);
15375
15381
  _InteropClient_sessionContextGroups.set(this, void 0);
15376
15382
  _InteropClient_fdc3Factory.set(this, void 0);
15377
- __classPrivateFieldSet$2(this, _InteropClient_sessionContextGroups, new Map(), "f");
15378
- __classPrivateFieldSet$2(this, _InteropClient_clientPromise, clientPromise, "f");
15379
- __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");
15380
15386
  }
15381
15387
  /*
15382
15388
  Client APIs
@@ -15404,7 +15410,7 @@ class InteropClient extends base_1$3.Base {
15404
15410
  this.wire.sendAction('interop-client-set-context').catch((e) => {
15405
15411
  // don't expose, analytics-only call
15406
15412
  });
15407
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15413
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15408
15414
  return client.dispatch('setContext', { context });
15409
15415
  }
15410
15416
  /**
@@ -15471,7 +15477,7 @@ class InteropClient extends base_1$3.Base {
15471
15477
  if (typeof handler !== 'function') {
15472
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.");
15473
15479
  }
15474
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15480
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15475
15481
  let handlerId;
15476
15482
  if (contextType) {
15477
15483
  handlerId = `invokeContextHandler-${contextType}-${(0, utils_1$5.generateId)()}`;
@@ -15511,7 +15517,7 @@ class InteropClient extends base_1$3.Base {
15511
15517
  this.wire.sendAction('interop-client-get-context-groups').catch((e) => {
15512
15518
  // don't expose, analytics-only call
15513
15519
  });
15514
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15520
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15515
15521
  return client.dispatch('getContextGroups');
15516
15522
  }
15517
15523
  /**
@@ -15542,7 +15548,7 @@ class InteropClient extends base_1$3.Base {
15542
15548
  this.wire.sendAction('interop-client-join-context-group').catch((e) => {
15543
15549
  // don't expose, analytics-only call
15544
15550
  });
15545
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15551
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15546
15552
  if (!contextGroupId) {
15547
15553
  throw new Error('No contextGroupId specified for joinContextGroup.');
15548
15554
  }
@@ -15571,7 +15577,7 @@ class InteropClient extends base_1$3.Base {
15571
15577
  this.wire.sendAction('interop-client-remove-from-context-group').catch((e) => {
15572
15578
  // don't expose, analytics-only call
15573
15579
  });
15574
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15580
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15575
15581
  return client.dispatch('removeFromContextGroup', { target });
15576
15582
  }
15577
15583
  /**
@@ -15594,7 +15600,7 @@ class InteropClient extends base_1$3.Base {
15594
15600
  this.wire.sendAction('interop-client-get-all-clients-in-context-group').catch((e) => {
15595
15601
  // don't expose, analytics-only call
15596
15602
  });
15597
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15603
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15598
15604
  if (!contextGroupId) {
15599
15605
  throw new Error('No contextGroupId specified for getAllClientsInContextGroup.');
15600
15606
  }
@@ -15619,7 +15625,7 @@ class InteropClient extends base_1$3.Base {
15619
15625
  this.wire.sendAction('interop-client-get-info-for-context-group').catch((e) => {
15620
15626
  // don't expose, analytics-only call
15621
15627
  });
15622
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15628
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15623
15629
  if (!contextGroupId) {
15624
15630
  throw new Error('No contextGroupId specified for getInfoForContextGroup.');
15625
15631
  }
@@ -15647,7 +15653,7 @@ class InteropClient extends base_1$3.Base {
15647
15653
  this.wire.sendAction('interop-client-fire-intent').catch((e) => {
15648
15654
  // don't expose, this is only for api analytics purposes
15649
15655
  });
15650
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15656
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15651
15657
  return client.dispatch('fireIntent', intent);
15652
15658
  }
15653
15659
  /**
@@ -15674,7 +15680,7 @@ class InteropClient extends base_1$3.Base {
15674
15680
  this.wire.sendAction('interop-client-register-intent-handler').catch((e) => {
15675
15681
  // don't expose, this is only for api analytics purposes
15676
15682
  });
15677
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15683
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15678
15684
  const handlerId = `intent-handler-${intentName}`;
15679
15685
  const wrappedHandler = (0, utils_1$5.wrapIntentHandler)(handler, handlerId);
15680
15686
  try {
@@ -15712,7 +15718,7 @@ class InteropClient extends base_1$3.Base {
15712
15718
  this.wire.sendAction('interop-client-get-current-context').catch((e) => {
15713
15719
  // don't expose, analytics-only call
15714
15720
  });
15715
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15721
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15716
15722
  return client.dispatch('getCurrentContext', { contextType });
15717
15723
  }
15718
15724
  /**
@@ -15732,7 +15738,7 @@ class InteropClient extends base_1$3.Base {
15732
15738
  this.wire.sendAction('interop-client-get-info-for-intent').catch((e) => {
15733
15739
  // don't expose, analytics-only call
15734
15740
  });
15735
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15741
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15736
15742
  return client.dispatch('getInfoForIntent', options);
15737
15743
  }
15738
15744
  /**
@@ -15763,7 +15769,7 @@ class InteropClient extends base_1$3.Base {
15763
15769
  this.wire.sendAction('interop-client-get-info-for-intents-by-context').catch((e) => {
15764
15770
  // don't expose, analytics-only call
15765
15771
  });
15766
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15772
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15767
15773
  return client.dispatch('getInfoForIntentsByContext', context);
15768
15774
  }
15769
15775
  /**
@@ -15795,7 +15801,7 @@ class InteropClient extends base_1$3.Base {
15795
15801
  this.wire.sendAction('interop-client-fire-intent-for-context').catch((e) => {
15796
15802
  // don't expose, analytics-only call
15797
15803
  });
15798
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15804
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15799
15805
  return client.dispatch('fireIntentForContext', context);
15800
15806
  }
15801
15807
  /**
@@ -15832,19 +15838,19 @@ class InteropClient extends base_1$3.Base {
15832
15838
  */
15833
15839
  async joinSessionContextGroup(sessionContextGroupId) {
15834
15840
  try {
15835
- const currentSessionContextGroup = __classPrivateFieldGet$2(this, _InteropClient_sessionContextGroups, "f").get(sessionContextGroupId);
15841
+ const currentSessionContextGroup = __classPrivateFieldGet$3(this, _InteropClient_sessionContextGroups, "f").get(sessionContextGroupId);
15836
15842
  if (currentSessionContextGroup) {
15837
15843
  return currentSessionContextGroup.getUserInstance();
15838
15844
  }
15839
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15845
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15840
15846
  const { hasConflict } = await client.dispatch('sessionContextGroup:createIfNeeded', {
15841
15847
  sessionContextGroupId
15842
15848
  });
15843
15849
  if (hasConflict) {
15844
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.`);
15845
15851
  }
15846
- const newSessionContextGroup = new SessionContextGroupClient_1.default(this.wire, __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
15847
- __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);
15848
15854
  return newSessionContextGroup.getUserInstance();
15849
15855
  }
15850
15856
  catch (error) {
@@ -15871,14 +15877,14 @@ class InteropClient extends base_1$3.Base {
15871
15877
  this.wire.sendAction('interop-client-add-ondisconnection-listener').catch((e) => {
15872
15878
  // don't expose, analytics-only call
15873
15879
  });
15874
- const client = await __classPrivateFieldGet$2(this, _InteropClient_clientPromise, "f");
15880
+ const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
15875
15881
  return client.onDisconnection((event) => {
15876
15882
  const { uuid } = event;
15877
15883
  listener({ type: 'interop-broker', topic: 'disconnected', brokerName: uuid });
15878
15884
  });
15879
15885
  }
15880
15886
  getFDC3Sync(version) {
15881
- 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);
15882
15888
  }
15883
15889
  async getFDC3(version) {
15884
15890
  return this.getFDC3Sync(version);
@@ -15889,7 +15895,7 @@ class InteropClient extends base_1$3.Base {
15889
15895
  * Used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
15890
15896
  */
15891
15897
  static async ferryFdc3Call(interopClient, action, payload) {
15892
- const client = await __classPrivateFieldGet$2(interopClient, _InteropClient_clientPromise, "f");
15898
+ const client = await __classPrivateFieldGet$3(interopClient, _InteropClient_clientPromise, "f");
15893
15899
  return client.dispatch(action, payload || null);
15894
15900
  }
15895
15901
  }
@@ -16267,12 +16273,12 @@ PrivateChannelClient$1.PrivateChannelClient = PrivateChannelClient;
16267
16273
  exports.getIntentResolution = getIntentResolution;
16268
16274
  } (utils$2));
16269
16275
 
16270
- var __classPrivateFieldGet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16276
+ var __classPrivateFieldGet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
16271
16277
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
16272
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");
16273
16279
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
16274
16280
  };
16275
- 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) {
16276
16282
  if (kind === "m") throw new TypeError("Private method is not writable");
16277
16283
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
16278
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");
@@ -16290,7 +16296,7 @@ const InteropClient_1$2 = InteropClient$1;
16290
16296
  const isEqual_1 = __importDefault$2(require$$3);
16291
16297
  class FDC3ModuleBase {
16292
16298
  get client() {
16293
- return __classPrivateFieldGet$1(this, _FDC3ModuleBase_producer, "f").call(this);
16299
+ return __classPrivateFieldGet$2(this, _FDC3ModuleBase_producer, "f").call(this);
16294
16300
  }
16295
16301
  get fin() {
16296
16302
  return this.wire.getFin();
@@ -16299,7 +16305,7 @@ class FDC3ModuleBase {
16299
16305
  constructor(producer, wire) {
16300
16306
  this.wire = wire;
16301
16307
  _FDC3ModuleBase_producer.set(this, void 0);
16302
- __classPrivateFieldSet$1(this, _FDC3ModuleBase_producer, producer, "f");
16308
+ __classPrivateFieldSet$2(this, _FDC3ModuleBase_producer, producer, "f");
16303
16309
  }
16304
16310
  /**
16305
16311
  * Broadcasts a context for the channel of the current entity.
@@ -17080,7 +17086,7 @@ Object.defineProperty(Factory$1, "__esModule", { value: true });
17080
17086
  Factory$1.InteropModule = void 0;
17081
17087
  const cloneDeep_1 = __importDefault$1(require$$0$1);
17082
17088
  const inaccessibleObject_1 = inaccessibleObject;
17083
- const base_1$2 = base;
17089
+ const base_1$3 = base;
17084
17090
  const InteropBroker_1 = InteropBroker$1;
17085
17091
  const InteropClient_1 = InteropClient$1;
17086
17092
  const overrideCheck_1 = overrideCheck$1;
@@ -17092,7 +17098,7 @@ const BrokerParamAccessError = 'You have attempted to use or modify InteropBroke
17092
17098
  * Manages creation of Interop Brokers and Interop Clients. These APIs are called under-the-hood in Platforms.
17093
17099
  *
17094
17100
  */
17095
- class InteropModule extends base_1$2.Base {
17101
+ class InteropModule extends base_1$3.Base {
17096
17102
  /**
17097
17103
  * Initializes an Interop Broker. This is called under-the-hood for Platforms.
17098
17104
  *
@@ -17216,13 +17222,13 @@ const channelPrefix = 'snapshot-source-provider-';
17216
17222
  const getSnapshotSourceChannelName = (id) => `${channelPrefix}${id.uuid}`;
17217
17223
  utils.getSnapshotSourceChannelName = getSnapshotSourceChannelName;
17218
17224
 
17219
- var __classPrivateFieldSet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
17225
+ var __classPrivateFieldSet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
17220
17226
  if (kind === "m") throw new TypeError("Private method is not writable");
17221
17227
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
17222
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");
17223
17229
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
17224
17230
  };
17225
- var __classPrivateFieldGet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17231
+ var __classPrivateFieldGet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17226
17232
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
17227
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");
17228
17234
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
@@ -17231,7 +17237,7 @@ var _SnapshotSource_identity, _SnapshotSource_getConnection, _SnapshotSource_get
17231
17237
  Object.defineProperty(Instance, "__esModule", { value: true });
17232
17238
  Instance.SnapshotSource = void 0;
17233
17239
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
17234
- const base_1$1 = base;
17240
+ const base_1$2 = base;
17235
17241
  const utils_1$1 = utils;
17236
17242
  const connectionMap = new Map();
17237
17243
  /**
@@ -17240,7 +17246,7 @@ const connectionMap = new Map();
17240
17246
  * @typeParam Snapshot Implementation-defined shape of an application snapshot. Allows
17241
17247
  * custom snapshot implementations for legacy applications to define their own snapshot format.
17242
17248
  */
17243
- class SnapshotSource extends base_1$1.Base {
17249
+ class SnapshotSource extends base_1$2.Base {
17244
17250
  /**
17245
17251
  * @internal
17246
17252
  */
@@ -17254,26 +17260,26 @@ class SnapshotSource extends base_1$1.Base {
17254
17260
  return connectionMap.get(this.identity.uuid);
17255
17261
  });
17256
17262
  _SnapshotSource_getClient.set(this, () => {
17257
- if (!__classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise) {
17258
- __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);
17259
17265
  }
17260
- return __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise;
17266
+ return __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise;
17261
17267
  });
17262
17268
  _SnapshotSource_startConnection.set(this, async () => {
17263
17269
  const channelName = (0, utils_1$1.getSnapshotSourceChannelName)(this.identity);
17264
17270
  try {
17265
- if (!__classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).eventFired) {
17266
- 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);
17267
17273
  }
17268
17274
  const client = await this.fin.InterApplicationBus.Channel.connect(channelName, { wait: false });
17269
17275
  client.onDisconnection(() => {
17270
- __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
17271
- __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;
17272
17278
  });
17273
17279
  return client;
17274
17280
  }
17275
17281
  catch (e) {
17276
- __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
17282
+ __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
17277
17283
  throw new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.");
17278
17284
  }
17279
17285
  });
@@ -17285,7 +17291,7 @@ class SnapshotSource extends base_1$1.Base {
17285
17291
  resolve = y;
17286
17292
  reject = n;
17287
17293
  });
17288
- __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).eventFired = eventFired;
17294
+ __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired = eventFired;
17289
17295
  const listener = async (e) => {
17290
17296
  try {
17291
17297
  if (e.channelName === channelName) {
@@ -17299,10 +17305,10 @@ class SnapshotSource extends base_1$1.Base {
17299
17305
  };
17300
17306
  await this.fin.InterApplicationBus.Channel.on('connected', listener);
17301
17307
  });
17302
- __classPrivateFieldSet(this, _SnapshotSource_identity, id, "f");
17308
+ __classPrivateFieldSet$1(this, _SnapshotSource_identity, id, "f");
17303
17309
  }
17304
17310
  get identity() {
17305
- return __classPrivateFieldGet(this, _SnapshotSource_identity, "f");
17311
+ return __classPrivateFieldGet$1(this, _SnapshotSource_identity, "f");
17306
17312
  }
17307
17313
  /**
17308
17314
  * Method to determine if the SnapshotSource has been initialized.
@@ -17338,11 +17344,11 @@ class SnapshotSource extends base_1$1.Base {
17338
17344
  // eslint-disable-next-line no-async-promise-executor
17339
17345
  try {
17340
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?
17341
- await __classPrivateFieldGet(this, _SnapshotSource_getClient, "f").call(this);
17347
+ await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
17342
17348
  }
17343
17349
  catch (e) {
17344
17350
  // it was not running.
17345
- await __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).eventFired;
17351
+ await __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired;
17346
17352
  }
17347
17353
  }
17348
17354
  /**
@@ -17353,7 +17359,7 @@ class SnapshotSource extends base_1$1.Base {
17353
17359
  this.wire.sendAction('snapshot-source-get-snapshot').catch((e) => {
17354
17360
  // don't expose, analytics-only call
17355
17361
  });
17356
- const client = await __classPrivateFieldGet(this, _SnapshotSource_getClient, "f").call(this);
17362
+ const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
17357
17363
  const response = (await client.dispatch('get-snapshot'));
17358
17364
  return (await response).snapshot;
17359
17365
  }
@@ -17365,7 +17371,7 @@ class SnapshotSource extends base_1$1.Base {
17365
17371
  this.wire.sendAction('snapshot-source-apply-snapshot').catch((e) => {
17366
17372
  // don't expose, analytics-only call
17367
17373
  });
17368
- const client = await __classPrivateFieldGet(this, _SnapshotSource_getClient, "f").call(this);
17374
+ const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
17369
17375
  return client.dispatch('apply-snapshot', { snapshot });
17370
17376
  }
17371
17377
  }
@@ -17374,13 +17380,13 @@ _SnapshotSource_identity = new WeakMap(), _SnapshotSource_getConnection = new We
17374
17380
 
17375
17381
  Object.defineProperty(Factory, "__esModule", { value: true });
17376
17382
  Factory.SnapshotSourceModule = void 0;
17377
- const base_1 = base;
17383
+ const base_1$1 = base;
17378
17384
  const Instance_1 = Instance;
17379
17385
  const utils_1 = utils;
17380
17386
  /**
17381
17387
  * Static namespace for OpenFin API methods that interact with the {@link SnapshotSource} class, available under `fin.SnapshotSource`.
17382
17388
  */
17383
- class SnapshotSourceModule extends base_1.Base {
17389
+ class SnapshotSourceModule extends base_1$1.Base {
17384
17390
  /**
17385
17391
  * Initializes a SnapshotSource with the getSnapshot and applySnapshot methods defined.
17386
17392
  *
@@ -17486,6 +17492,114 @@ Factory.SnapshotSourceModule = SnapshotSourceModule;
17486
17492
  __exportStar(Instance, exports);
17487
17493
  } (snapshotSource));
17488
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
+
17489
17603
  Object.defineProperty(fin$1, "__esModule", { value: true });
17490
17604
  var Fin_1 = fin$1.Fin = void 0;
17491
17605
  const events_1 = require$$0;
@@ -17503,6 +17617,7 @@ const index_10 = platform;
17503
17617
  const me_1 = me;
17504
17618
  const interop_1 = interop;
17505
17619
  const snapshot_source_1 = snapshotSource;
17620
+ const notification_manager_1 = notificationManager;
17506
17621
  /**
17507
17622
  * @internal
17508
17623
  */
@@ -17525,6 +17640,7 @@ class Fin extends events_1.EventEmitter {
17525
17640
  this.View = new index_9.ViewModule(wire);
17526
17641
  this.Interop = new interop_1.InteropModule(wire);
17527
17642
  this.SnapshotSource = new snapshot_source_1.SnapshotSourceModule(wire);
17643
+ this.NotificationManager = new notification_manager_1.NotificationManagerModule(wire);
17528
17644
  wire.registerFin(this);
17529
17645
  this.me = (0, me_1.getMe)(wire);
17530
17646
  // Handle disconnect events