@ixon-cdk/iframe-adapter 1.11.0 → 1.12.0-next.0

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.
package/dist/index.js CHANGED
@@ -1,54 +1,57 @@
1
- var k = Object.defineProperty;
2
- var B = (t, e, a) => e in t ? k(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a;
3
- var u = (t, e, a) => (B(t, typeof e != "symbol" ? e + "" : e, a), a);
4
- const l = "cdk:cmpctx:", s = {
1
+ var Z = Object.defineProperty;
2
+ var ee = (t, e, n) => e in t ? Z(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var y = (t, e, n) => (ee(t, typeof e != "symbol" ? e + "" : e, n), n);
4
+ const c = "cdk:cmpctx:", o = {
5
5
  // Lifecycle
6
- Create: `${l}create`,
7
- Created: `${l}created`,
8
- Destroy: `${l}destroy`,
6
+ Create: `${c}create`,
7
+ Created: `${c}created`,
8
+ Destroy: `${c}destroy`,
9
9
  // BackendComponentClient
10
- BackendComponentClientCreate: `${l}bcc:create`,
11
- BackendComponentClientDestroy: `${l}bcc:destroy`,
12
- BackendComponentClientCall: `${l}bcc:call`,
13
- BackendComponentClientCallResult: `${l}bcc:callresult`,
10
+ BackendComponentClientCreate: `${c}bcc:create`,
11
+ BackendComponentClientDestroy: `${c}bcc:destroy`,
12
+ BackendComponentClientCall: `${c}bcc:call`,
13
+ BackendComponentClientCallResult: `${c}bcc:callresult`,
14
14
  // LoggingDataClient
15
- LoggingDataClientCreate: `${l}ldc:create`,
16
- LoggingDataClientDestroy: `${l}ldc:destroy`,
17
- LoggingDataClientQuery: `${l}ldc:query`,
18
- LoggingDataClientQueryResult: `${l}ldc:queryresult`,
15
+ LoggingDataClientCreate: `${c}ldc:create`,
16
+ LoggingDataClientDestroy: `${c}ldc:destroy`,
17
+ LoggingDataClientQuery: `${c}ldc:query`,
18
+ LoggingDataClientQueryResult: `${c}ldc:queryresult`,
19
19
  // ResourceDataClient
20
- ResourceDataClientCreate: `${l}rdc:create`,
21
- ResourceDataClientDestroy: `${l}rdc:destroy`,
22
- ResourceDataClientQuery: `${l}rdc:query`,
23
- ResourceDataClientQueryResult: `${l}rdc:queryresult`,
24
- ResourceDataClientRender: `${l}rdc:render`,
25
- ResourceDataClientRenderResult: `${l}rdc:renderresult`,
26
- ResourceDataClientUpdate: `${l}rdc:update`,
27
- ResourceDataClientUpdated: `${l}rdc:updated`,
20
+ ResourceDataClientCreate: `${c}rdc:create`,
21
+ ResourceDataClientDestroy: `${c}rdc:destroy`,
22
+ ResourceDataClientQuery: `${c}rdc:query`,
23
+ ResourceDataClientQueryResult: `${c}rdc:queryresult`,
24
+ ResourceDataClientRender: `${c}rdc:render`,
25
+ ResourceDataClientRenderResult: `${c}rdc:renderresult`,
26
+ ResourceDataClientUpdate: `${c}rdc:update`,
27
+ ResourceDataClientUpdated: `${c}rdc:updated`,
28
+ // ActionMenu
29
+ OpenActionMenu: `${c}openactionmenu`,
30
+ OpenActionMenuResult: `${c}openactionmenuresult`,
28
31
  // ActionBottomSheet
29
- OpenActionBottomSheet: `${l}openactionbottomsheet`,
30
- OpenActionBottomSheetResult: `${l}openactionbottomsheetresult`,
32
+ OpenActionBottomSheet: `${c}openactionbottomsheet`,
33
+ OpenActionBottomSheetResult: `${c}openactionbottomsheetresult`,
31
34
  // Dialogs
32
- OpenAlertDialog: `${l}openalertdialog`,
33
- OpenAlertDialogResult: `${l}openalertdialogresult`,
34
- OpenConfirmDialog: `${l}openconfirmdialog`,
35
- OpenConfirmDialogResult: `${l}openconfirmdialogresult`,
36
- OpenFormDialog: `${l}openformdialog`,
37
- OpenFormDialogResult: `${l}openformdialogresult`,
35
+ OpenAlertDialog: `${c}openalertdialog`,
36
+ OpenAlertDialogResult: `${c}openalertdialogresult`,
37
+ OpenConfirmDialog: `${c}openconfirmdialog`,
38
+ OpenConfirmDialogResult: `${c}openconfirmdialogresult`,
39
+ OpenFormDialog: `${c}openformdialog`,
40
+ OpenFormDialogResult: `${c}openformdialogresult`,
38
41
  // VPN
39
- ShowVpnStatusDetails: `${l}showvpnstatusdetails`,
40
- ToggleVpn: `${l}togglevpn`,
41
- VpnClientStatusChange: `${l}vpnclientstatuschange`,
42
+ ShowVpnStatusDetails: `${c}showvpnstatusdetails`,
43
+ ToggleVpn: `${c}togglevpn`,
44
+ VpnClientStatusChange: `${c}vpnclientstatuschange`,
42
45
  // Miscellaneous
43
- NavigateByUrl: `${l}navigatebyurl`,
44
- SetTimeRange: `${l}settimerange`,
45
- TimeRangeChange: `${l}timerangechange`
46
+ NavigateByUrl: `${c}navigatebyurl`,
47
+ SetTimeRange: `${c}settimerange`,
48
+ TimeRangeChange: `${c}timerangechange`
46
49
  };
47
- function at({ iframe: t, context: e }) {
48
- return window.addEventListener("message", n, !1), e.ontimerangechange = (...r) => {
50
+ function Mt({ iframe: t, context: e }) {
51
+ return window.addEventListener("message", a, !1), e.ontimerangechange = (...r) => {
49
52
  t.contentWindow && t.contentWindow.postMessage(
50
53
  {
51
- type: s.TimeRangeChange,
54
+ type: o.TimeRangeChange,
52
55
  payload: r
53
56
  },
54
57
  "*"
@@ -56,17 +59,17 @@ function at({ iframe: t, context: e }) {
56
59
  }, e.onvpnclientstatuschange = (...r) => {
57
60
  t.contentWindow && t.contentWindow.postMessage(
58
61
  {
59
- type: s.VpnClientStatusChange,
62
+ type: o.VpnClientStatusChange,
60
63
  payload: r
61
64
  },
62
65
  "*"
63
66
  );
64
67
  }, {
65
68
  destroy() {
66
- window.removeEventListener("message", n, !1);
69
+ window.removeEventListener("message", a, !1);
67
70
  }
68
71
  };
69
- function a(r) {
72
+ function n(r) {
70
73
  return {
71
74
  _apiLinkEntries: [...r._getApiLinks().entries()],
72
75
  appData: r.appData,
@@ -79,214 +82,229 @@ function at({ iframe: t, context: e }) {
79
82
  vpnClientStatus: r.vpnClientStatus
80
83
  };
81
84
  }
82
- function n(r) {
83
- if (n._clients = n._clients || /* @__PURE__ */ new Map([]), r.source === t.contentWindow)
85
+ function a(r) {
86
+ if (a._clients = a._clients || /* @__PURE__ */ new Map([]), r.source === t.contentWindow)
84
87
  switch (r.data.type) {
85
- case s.Create:
88
+ case o.Create:
86
89
  t.contentWindow.postMessage(
87
90
  {
88
- type: s.Created,
89
- payload: a(e)
91
+ type: o.Created,
92
+ payload: n(e)
90
93
  },
91
94
  "*"
92
95
  );
93
96
  break;
94
- case s.Destroy:
97
+ case o.Destroy:
95
98
  e.destroy();
96
99
  break;
97
- case s.BackendComponentClientCreate: {
98
- const { clientId: o } = r.data.payload, i = e.createBackendComponentClient(o);
99
- n._clients.set(o, i);
100
+ case o.BackendComponentClientCreate: {
101
+ const { clientId: i } = r.data.payload, l = e.createBackendComponentClient(i);
102
+ a._clients.set(i, l);
100
103
  break;
101
104
  }
102
- case s.BackendComponentClientDestroy: {
103
- const { clientId: o } = r.data.payload;
104
- n._clients.has(o) && (n._clients.get(o).destroy(), n._clients.delete(o));
105
+ case o.BackendComponentClientDestroy: {
106
+ const { clientId: i } = r.data.payload;
107
+ a._clients.has(i) && (a._clients.get(i).destroy(), a._clients.delete(i));
105
108
  break;
106
109
  }
107
- case s.BackendComponentClientCall: {
108
- const { clientId: o, callId: i, functionName: c, functionArguments: d } = r.data.payload;
109
- let p = n._clients.get(o);
110
- p && !p._destroyed && p.call(c, d).then((b) => {
111
- p && !p.destroyed && t.contentWindow.postMessage(
110
+ case o.BackendComponentClientCall: {
111
+ const { clientId: i, callId: l, functionName: p, functionArguments: d } = r.data.payload;
112
+ let g = a._clients.get(i);
113
+ g && !g._destroyed && g.call(p, d).then((N) => {
114
+ g && !g.destroyed && t.contentWindow.postMessage(
112
115
  {
113
- type: s.BackendComponentClientCallResult,
114
- payload: { callId: i, result: b }
116
+ type: o.BackendComponentClientCallResult,
117
+ payload: { callId: l, result: N }
115
118
  },
116
119
  "*"
117
120
  );
118
121
  });
119
122
  break;
120
123
  }
121
- case s.LoggingDataClientCreate: {
122
- const { clientId: o } = r.data.payload, i = e.createLoggingDataClient(o);
123
- n._clients.set(o, i);
124
+ case o.LoggingDataClientCreate: {
125
+ const { clientId: i } = r.data.payload, l = e.createLoggingDataClient(i);
126
+ a._clients.set(i, l);
124
127
  break;
125
128
  }
126
- case s.LoggingDataClientDestroy: {
127
- const { clientId: o } = r.data.payload;
128
- n._clients.has(o) && (n._clients.get(o).destroy(), n._clients.delete(o));
129
+ case o.LoggingDataClientDestroy: {
130
+ const { clientId: i } = r.data.payload;
131
+ a._clients.has(i) && (a._clients.get(i).destroy(), a._clients.delete(i));
129
132
  break;
130
133
  }
131
- case s.LoggingDataClientQuery: {
132
- const { clientId: o, queryId: i, query: c } = r.data.payload;
133
- let d = n._clients.get(o);
134
- d && !d._destroyed && d.query(c, (p) => {
134
+ case o.LoggingDataClientQuery: {
135
+ const { clientId: i, queryId: l, query: p } = r.data.payload;
136
+ let d = a._clients.get(i);
137
+ d && !d._destroyed && d.query(p, (g) => {
135
138
  d._destroyed || t.contentWindow.postMessage(
136
139
  {
137
- type: s.LoggingDataClientQueryResult,
138
- payload: { queryId: i, results: p }
140
+ type: o.LoggingDataClientQueryResult,
141
+ payload: { queryId: l, results: g }
139
142
  },
140
143
  "*"
141
144
  );
142
145
  });
143
146
  break;
144
147
  }
145
- case s.ResourceDataClientCreate: {
146
- const { clientId: o } = r.data.payload, i = e.createResourceDataClient(o);
147
- n._clients.set(o, i);
148
+ case o.ResourceDataClientCreate: {
149
+ const { clientId: i } = r.data.payload, l = e.createResourceDataClient(i);
150
+ a._clients.set(i, l);
148
151
  break;
149
152
  }
150
- case s.ResourceDataClientDestroy: {
151
- const { clientId: o } = r.data.payload;
152
- n._clients.has(o) && (n._clients.get(o).destroy(), n._clients.delete(o));
153
+ case o.ResourceDataClientDestroy: {
154
+ const { clientId: i } = r.data.payload;
155
+ a._clients.has(i) && (a._clients.get(i).destroy(), a._clients.delete(i));
153
156
  break;
154
157
  }
155
- case s.ResourceDataClientQuery: {
156
- const { clientId: o, queryId: i, query: c } = r.data.payload;
157
- let d = n._clients.get(o);
158
- d && !d._destroyed && d.query(c, (p) => {
158
+ case o.ResourceDataClientQuery: {
159
+ const { clientId: i, queryId: l, query: p } = r.data.payload;
160
+ let d = a._clients.get(i);
161
+ d && !d._destroyed && d.query(p, (g) => {
159
162
  d._destroyed || t.contentWindow.postMessage(
160
163
  {
161
- type: s.ResourceDataClientQueryResult,
162
- payload: { queryId: i, results: p }
164
+ type: o.ResourceDataClientQueryResult,
165
+ payload: { queryId: l, results: g }
163
166
  },
164
167
  "*"
165
168
  );
166
169
  });
167
170
  break;
168
171
  }
169
- case s.ResourceDataClientRender: {
170
- const { clientId: o, queryId: i, query: c } = r.data.payload;
171
- let d = n._clients.get(o);
172
- d && !d._destroyed && d.render(c, (p) => {
172
+ case o.ResourceDataClientRender: {
173
+ const { clientId: i, queryId: l, query: p } = r.data.payload;
174
+ let d = a._clients.get(i);
175
+ d && !d._destroyed && d.render(p, (g) => {
173
176
  d._destroyed || t.contentWindow.postMessage(
174
177
  {
175
- type: s.ResourceDataClientRenderResult,
176
- payload: { queryId: i, results: p }
178
+ type: o.ResourceDataClientRenderResult,
179
+ payload: { queryId: l, results: g }
177
180
  },
178
181
  "*"
179
182
  );
180
183
  });
181
184
  break;
182
185
  }
183
- case s.ResourceDataClientUpdate: {
184
- const { clientId: o, updateId: i, update: c } = r.data.payload;
185
- let d = n._clients.get(o);
186
- d && !d._destroyed && d.update(c).then(() => {
186
+ case o.ResourceDataClientUpdate: {
187
+ const { clientId: i, updateId: l, update: p } = r.data.payload;
188
+ let d = a._clients.get(i);
189
+ d && !d._destroyed && d.update(p).then(() => {
187
190
  d && !d._destroyed && t.contentWindow.postMessage(
188
191
  {
189
- type: s.ResourceDataClientUpdated,
190
- payload: { updateId: i }
192
+ type: o.ResourceDataClientUpdated,
193
+ payload: { updateId: l }
191
194
  },
192
195
  "*"
193
196
  );
194
197
  });
195
198
  break;
196
199
  }
197
- case s.OpenActionBottomSheet:
198
- e.openActionBottomSheet(r.data.payload.options).then((o) => {
199
- t.contentWindow.postMessage({ type: s.OpenActionBottomSheetResult, payload: { result: o } }, "*");
200
+ case o.OpenActionBottomSheet:
201
+ e.openActionBottomSheet(r.data.payload.options).then((i) => {
202
+ t.contentWindow.postMessage({ type: o.OpenActionBottomSheetResult, payload: { result: i } }, "*");
200
203
  });
201
204
  break;
202
- case s.OpenAlertDialog:
203
- e.openAlertDialog(r.data.payload.options).then((o) => {
204
- t.contentWindow.postMessage({ type: s.OpenAlertDialogResult, payload: { result: o } }, "*");
205
+ case o.OpenActionMenu:
206
+ const s = t.contentDocument.querySelector(r.data.payload.selector), u = {
207
+ getBoundingClientRect: () => {
208
+ const i = t.getBoundingClientRect(), l = s.getBoundingClientRect();
209
+ return {
210
+ ...JSON.parse(JSON.stringify(l)),
211
+ top: i.top + l.top,
212
+ x: i.x + l.x
213
+ };
214
+ }
215
+ };
216
+ e.openActionMenu(u, r.data.payload.options).then((i) => {
217
+ t.contentWindow.postMessage({ type: o.OpenActionMenuResult, payload: { result: i } }, "*");
205
218
  });
206
219
  break;
207
- case s.OpenConfirmDialog:
208
- e.openConfirmDialog(r.data.payload.options).then((o) => {
209
- t.contentWindow.postMessage({ type: s.OpenConfirmDialogResult, payload: { result: o } }, "*");
220
+ case o.OpenAlertDialog:
221
+ e.openAlertDialog(r.data.payload.options).then((i) => {
222
+ t.contentWindow.postMessage({ type: o.OpenAlertDialogResult, payload: { result: i } }, "*");
210
223
  });
211
224
  break;
212
- case s.OpenFormDialog:
213
- e.openFormDialog(r.data.payload.options).then((o) => {
214
- t.contentWindow.postMessage({ type: s.OpenFormDialogResult, payload: { result: o } }, "*");
225
+ case o.OpenConfirmDialog:
226
+ e.openConfirmDialog(r.data.payload.options).then((i) => {
227
+ t.contentWindow.postMessage({ type: o.OpenConfirmDialogResult, payload: { result: i } }, "*");
215
228
  });
216
229
  break;
217
- case s.ShowVpnStatusDetails:
230
+ case o.OpenFormDialog:
231
+ e.openFormDialog(r.data.payload.options).then((i) => {
232
+ t.contentWindow.postMessage({ type: o.OpenFormDialogResult, payload: { result: i } }, "*");
233
+ });
234
+ break;
235
+ case o.ShowVpnStatusDetails:
218
236
  e.showVpnStatusDetails(r.data.payload.agentId);
219
237
  break;
220
- case s.ToggleVpn:
238
+ case o.ToggleVpn:
221
239
  e.toggleVpn(r.data.payload.agentId);
222
240
  break;
223
- case s.NavigateByUrl:
241
+ case o.NavigateByUrl:
224
242
  e.navigateByUrl(r.data.payload.url);
225
243
  break;
226
- case s.SetTimeRange:
244
+ case o.SetTimeRange:
227
245
  e.setTimeRange(r.data.payload.timeRange);
228
246
  break;
229
247
  }
230
248
  }
231
249
  }
232
- class F {
233
- constructor(e, a, n, r) {
234
- this.query = e, this.variable = a, this.tag = n, this._onCancel = r, Object.freeze(this);
250
+ class te {
251
+ constructor(e, n, a, r) {
252
+ this.query = e, this.variable = n, this.tag = a, this._onCancel = r, Object.freeze(this);
235
253
  }
236
254
  cancel() {
237
255
  this._onCancel && this._onCancel();
238
256
  }
239
257
  }
240
- var V = typeof global == "object" && global && global.Object === Object && global;
241
- const P = V;
242
- var H = typeof self == "object" && self && self.Object === Object && self, N = P || H || Function("return this")();
243
- const $ = N;
244
- var W = $.Symbol;
245
- const _ = W;
246
- var E = Object.prototype, Q = E.hasOwnProperty, z = E.toString, w = _ ? _.toStringTag : void 0;
247
- function G(t) {
248
- var e = Q.call(t, w), a = t[w];
258
+ var ne = typeof global == "object" && global && global.Object === Object && global;
259
+ const ae = ne;
260
+ var re = typeof self == "object" && self && self.Object === Object && self, oe = ae || re || Function("return this")();
261
+ const q = oe;
262
+ var se = q.Symbol;
263
+ const S = se;
264
+ var H = Object.prototype, ie = H.hasOwnProperty, le = H.toString, _ = S ? S.toStringTag : void 0;
265
+ function ce(t) {
266
+ var e = ie.call(t, _), n = t[_];
249
267
  try {
250
- t[w] = void 0;
251
- var n = !0;
268
+ t[_] = void 0;
269
+ var a = !0;
252
270
  } catch {
253
271
  }
254
- var r = z.call(t);
255
- return n && (e ? t[w] = a : delete t[w]), r;
272
+ var r = le.call(t);
273
+ return a && (e ? t[_] = n : delete t[_]), r;
256
274
  }
257
- var J = Object.prototype, K = J.toString;
258
- function X(t) {
259
- return K.call(t);
275
+ var de = Object.prototype, ue = de.toString;
276
+ function pe(t) {
277
+ return ue.call(t);
260
278
  }
261
- var Y = "[object Null]", Z = "[object Undefined]", O = _ ? _.toStringTag : void 0;
262
- function x(t) {
263
- return t == null ? t === void 0 ? Z : Y : O && O in Object(t) ? G(t) : X(t);
279
+ var ge = "[object Null]", ye = "[object Undefined]", j = S ? S.toStringTag : void 0;
280
+ function fe(t) {
281
+ return t == null ? t === void 0 ? ye : ge : j && j in Object(t) ? ce(t) : pe(t);
264
282
  }
265
- function U(t) {
283
+ function z(t) {
266
284
  var e = typeof t;
267
285
  return t != null && (e == "object" || e == "function");
268
286
  }
269
- var ee = "[object AsyncFunction]", te = "[object Function]", ae = "[object GeneratorFunction]", ne = "[object Proxy]";
270
- function re(t) {
271
- if (!U(t))
287
+ var he = "[object AsyncFunction]", me = "[object Function]", we = "[object GeneratorFunction]", Ce = "[object Proxy]";
288
+ function _e(t) {
289
+ if (!z(t))
272
290
  return !1;
273
- var e = x(t);
274
- return e == te || e == ae || e == ee || e == ne;
291
+ var e = fe(t);
292
+ return e == me || e == we || e == he || e == Ce;
275
293
  }
276
- var oe = $["__core-js_shared__"];
277
- const I = oe;
278
- var L = function() {
279
- var t = /[^.]+$/.exec(I && I.keys && I.keys.IE_PROTO || "");
294
+ var De = q["__core-js_shared__"];
295
+ const E = De;
296
+ var B = function() {
297
+ var t = /[^.]+$/.exec(E && E.keys && E.keys.IE_PROTO || "");
280
298
  return t ? "Symbol(src)_1." + t : "";
281
299
  }();
282
- function se(t) {
283
- return !!L && L in t;
300
+ function Re(t) {
301
+ return !!B && B in t;
284
302
  }
285
- var ie = Function.prototype, le = ie.toString;
286
- function de(t) {
303
+ var be = Function.prototype, ve = be.toString;
304
+ function Se(t) {
287
305
  if (t != null) {
288
306
  try {
289
- return le.call(t);
307
+ return ve.call(t);
290
308
  } catch {
291
309
  }
292
310
  try {
@@ -296,166 +314,166 @@ function de(t) {
296
314
  }
297
315
  return "";
298
316
  }
299
- var ce = /[\\^$.*+?()[\]{}|]/g, pe = /^\[object .+?Constructor\]$/, ue = Function.prototype, ge = Object.prototype, ye = ue.toString, he = ge.hasOwnProperty, fe = RegExp(
300
- "^" + ye.call(he).replace(ce, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
317
+ var Me = /[\\^$.*+?()[\]{}|]/g, Ie = /^\[object .+?Constructor\]$/, $e = Function.prototype, Oe = Object.prototype, Ee = $e.toString, Le = Oe.hasOwnProperty, Te = RegExp(
318
+ "^" + Ee.call(Le).replace(Me, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
301
319
  );
302
- function we(t) {
303
- if (!U(t) || se(t))
320
+ function qe(t) {
321
+ if (!z(t) || Re(t))
304
322
  return !1;
305
- var e = re(t) ? fe : pe;
306
- return e.test(de(t));
323
+ var e = _e(t) ? Te : Ie;
324
+ return e.test(Se(t));
307
325
  }
308
- function me(t, e) {
326
+ function Ae(t, e) {
309
327
  return t == null ? void 0 : t[e];
310
328
  }
311
- function q(t, e) {
312
- var a = me(t, e);
313
- return we(a) ? a : void 0;
329
+ function W(t, e) {
330
+ var n = Ae(t, e);
331
+ return qe(n) ? n : void 0;
314
332
  }
315
- function _e(t, e) {
333
+ function Ue(t, e) {
316
334
  return t === e || t !== t && e !== e;
317
335
  }
318
- var Ce = q(Object, "create");
319
- const m = Ce;
320
- function De() {
321
- this.__data__ = m ? m(null) : {}, this.size = 0;
336
+ var Ne = W(Object, "create");
337
+ const D = Ne;
338
+ function je() {
339
+ this.__data__ = D ? D(null) : {}, this.size = 0;
322
340
  }
323
- function Re(t) {
341
+ function Be(t) {
324
342
  var e = this.has(t) && delete this.__data__[t];
325
343
  return this.size -= e ? 1 : 0, e;
326
344
  }
327
- var be = "__lodash_hash_undefined__", Ie = Object.prototype, ve = Ie.hasOwnProperty;
328
- function $e(t) {
345
+ var ke = "__lodash_hash_undefined__", Fe = Object.prototype, Pe = Fe.hasOwnProperty;
346
+ function Ve(t) {
329
347
  var e = this.__data__;
330
- if (m) {
331
- var a = e[t];
332
- return a === be ? void 0 : a;
348
+ if (D) {
349
+ var n = e[t];
350
+ return n === ke ? void 0 : n;
333
351
  }
334
- return ve.call(e, t) ? e[t] : void 0;
352
+ return Pe.call(e, t) ? e[t] : void 0;
335
353
  }
336
- var Se = Object.prototype, Oe = Se.hasOwnProperty;
337
- function Le(t) {
354
+ var He = Object.prototype, ze = He.hasOwnProperty;
355
+ function We(t) {
338
356
  var e = this.__data__;
339
- return m ? e[t] !== void 0 : Oe.call(e, t);
340
- }
341
- var Me = "__lodash_hash_undefined__";
342
- function Ee(t, e) {
343
- var a = this.__data__;
344
- return this.size += this.has(t) ? 0 : 1, a[t] = m && e === void 0 ? Me : e, this;
345
- }
346
- function g(t) {
347
- var e = -1, a = t == null ? 0 : t.length;
348
- for (this.clear(); ++e < a; ) {
349
- var n = t[e];
350
- this.set(n[0], n[1]);
351
- }
352
- }
353
- g.prototype.clear = De;
354
- g.prototype.delete = Re;
355
- g.prototype.get = $e;
356
- g.prototype.has = Le;
357
- g.prototype.set = Ee;
358
- function Ue() {
357
+ return D ? e[t] !== void 0 : ze.call(e, t);
358
+ }
359
+ var Qe = "__lodash_hash_undefined__";
360
+ function Ge(t, e) {
361
+ var n = this.__data__;
362
+ return this.size += this.has(t) ? 0 : 1, n[t] = D && e === void 0 ? Qe : e, this;
363
+ }
364
+ function m(t) {
365
+ var e = -1, n = t == null ? 0 : t.length;
366
+ for (this.clear(); ++e < n; ) {
367
+ var a = t[e];
368
+ this.set(a[0], a[1]);
369
+ }
370
+ }
371
+ m.prototype.clear = je;
372
+ m.prototype.delete = Be;
373
+ m.prototype.get = Ve;
374
+ m.prototype.has = We;
375
+ m.prototype.set = Ge;
376
+ function Je() {
359
377
  this.__data__ = [], this.size = 0;
360
378
  }
361
- function C(t, e) {
362
- for (var a = t.length; a--; )
363
- if (_e(t[a][0], e))
364
- return a;
379
+ function M(t, e) {
380
+ for (var n = t.length; n--; )
381
+ if (Ue(t[n][0], e))
382
+ return n;
365
383
  return -1;
366
384
  }
367
- var qe = Array.prototype, Te = qe.splice;
368
- function Ae(t) {
369
- var e = this.__data__, a = C(e, t);
370
- if (a < 0)
385
+ var Ke = Array.prototype, xe = Ke.splice;
386
+ function Xe(t) {
387
+ var e = this.__data__, n = M(e, t);
388
+ if (n < 0)
371
389
  return !1;
372
- var n = e.length - 1;
373
- return a == n ? e.pop() : Te.call(e, a, 1), --this.size, !0;
374
- }
375
- function je(t) {
376
- var e = this.__data__, a = C(e, t);
377
- return a < 0 ? void 0 : e[a][1];
378
- }
379
- function ke(t) {
380
- return C(this.__data__, t) > -1;
381
- }
382
- function Be(t, e) {
383
- var a = this.__data__, n = C(a, t);
384
- return n < 0 ? (++this.size, a.push([t, e])) : a[n][1] = e, this;
385
- }
386
- function f(t) {
387
- var e = -1, a = t == null ? 0 : t.length;
388
- for (this.clear(); ++e < a; ) {
389
- var n = t[e];
390
- this.set(n[0], n[1]);
391
- }
392
- }
393
- f.prototype.clear = Ue;
394
- f.prototype.delete = Ae;
395
- f.prototype.get = je;
396
- f.prototype.has = ke;
397
- f.prototype.set = Be;
398
- var Fe = q($, "Map");
399
- const Ve = Fe;
400
- function Pe() {
390
+ var a = e.length - 1;
391
+ return n == a ? e.pop() : xe.call(e, n, 1), --this.size, !0;
392
+ }
393
+ function Ye(t) {
394
+ var e = this.__data__, n = M(e, t);
395
+ return n < 0 ? void 0 : e[n][1];
396
+ }
397
+ function Ze(t) {
398
+ return M(this.__data__, t) > -1;
399
+ }
400
+ function et(t, e) {
401
+ var n = this.__data__, a = M(n, t);
402
+ return a < 0 ? (++this.size, n.push([t, e])) : n[a][1] = e, this;
403
+ }
404
+ function C(t) {
405
+ var e = -1, n = t == null ? 0 : t.length;
406
+ for (this.clear(); ++e < n; ) {
407
+ var a = t[e];
408
+ this.set(a[0], a[1]);
409
+ }
410
+ }
411
+ C.prototype.clear = Je;
412
+ C.prototype.delete = Xe;
413
+ C.prototype.get = Ye;
414
+ C.prototype.has = Ze;
415
+ C.prototype.set = et;
416
+ var tt = W(q, "Map");
417
+ const nt = tt;
418
+ function at() {
401
419
  this.size = 0, this.__data__ = {
402
- hash: new g(),
403
- map: new (Ve || f)(),
404
- string: new g()
420
+ hash: new m(),
421
+ map: new (nt || C)(),
422
+ string: new m()
405
423
  };
406
424
  }
407
- function He(t) {
425
+ function rt(t) {
408
426
  var e = typeof t;
409
427
  return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
410
428
  }
411
- function D(t, e) {
412
- var a = t.__data__;
413
- return He(e) ? a[typeof e == "string" ? "string" : "hash"] : a.map;
429
+ function I(t, e) {
430
+ var n = t.__data__;
431
+ return rt(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
414
432
  }
415
- function Ne(t) {
416
- var e = D(this, t).delete(t);
433
+ function ot(t) {
434
+ var e = I(this, t).delete(t);
417
435
  return this.size -= e ? 1 : 0, e;
418
436
  }
419
- function We(t) {
420
- return D(this, t).get(t);
437
+ function st(t) {
438
+ return I(this, t).get(t);
421
439
  }
422
- function Qe(t) {
423
- return D(this, t).has(t);
440
+ function it(t) {
441
+ return I(this, t).has(t);
424
442
  }
425
- function ze(t, e) {
426
- var a = D(this, t), n = a.size;
427
- return a.set(t, e), this.size += a.size == n ? 0 : 1, this;
443
+ function lt(t, e) {
444
+ var n = I(this, t), a = n.size;
445
+ return n.set(t, e), this.size += n.size == a ? 0 : 1, this;
428
446
  }
429
- function y(t) {
430
- var e = -1, a = t == null ? 0 : t.length;
431
- for (this.clear(); ++e < a; ) {
432
- var n = t[e];
433
- this.set(n[0], n[1]);
447
+ function w(t) {
448
+ var e = -1, n = t == null ? 0 : t.length;
449
+ for (this.clear(); ++e < n; ) {
450
+ var a = t[e];
451
+ this.set(a[0], a[1]);
434
452
  }
435
453
  }
436
- y.prototype.clear = Pe;
437
- y.prototype.delete = Ne;
438
- y.prototype.get = We;
439
- y.prototype.has = Qe;
440
- y.prototype.set = ze;
441
- var Ge = "Expected a function";
442
- function S(t, e) {
454
+ w.prototype.clear = at;
455
+ w.prototype.delete = ot;
456
+ w.prototype.get = st;
457
+ w.prototype.has = it;
458
+ w.prototype.set = lt;
459
+ var ct = "Expected a function";
460
+ function A(t, e) {
443
461
  if (typeof t != "function" || e != null && typeof e != "function")
444
- throw new TypeError(Ge);
445
- var a = function() {
446
- var n = arguments, r = e ? e.apply(this, n) : n[0], o = a.cache;
447
- if (o.has(r))
448
- return o.get(r);
449
- var i = t.apply(this, n);
450
- return a.cache = o.set(r, i) || o, i;
462
+ throw new TypeError(ct);
463
+ var n = function() {
464
+ var a = arguments, r = e ? e.apply(this, a) : a[0], s = n.cache;
465
+ if (s.has(r))
466
+ return s.get(r);
467
+ var u = t.apply(this, a);
468
+ return n.cache = s.set(r, u) || s, u;
451
469
  };
452
- return a.cache = new (S.Cache || y)(), a;
470
+ return n.cache = new (A.Cache || w)(), n;
453
471
  }
454
- S.Cache = y;
455
- const Je = 2, T = 1, A = "";
456
- class R {
457
- constructor(e, a, n) {
458
- this.locale = e, this.queryRef = a, this.rawValue = n;
472
+ A.Cache = w;
473
+ const dt = 2, Q = 1, G = "";
474
+ class $ {
475
+ constructor(e, n, a) {
476
+ this.locale = e, this.queryRef = n, this.rawValue = a;
459
477
  }
460
478
  /**
461
479
  * Creates a LoggingDataValue.
@@ -464,19 +482,19 @@ class R {
464
482
  * @param queryRef a reference to the query that produced this value
465
483
  * @param rawValue the raw value
466
484
  */
467
- static create(e, a, n) {
468
- return a.query.postAggr === "count" ? new Ke(e, a, n) : new R(e, a, n);
485
+ static create(e, n, a) {
486
+ return n.query.postAggr === "count" ? new ut(e, n, a) : new $(e, n, a);
469
487
  }
470
- getDecimals(e = Je) {
488
+ getDecimals(e = dt) {
471
489
  return this.decimals ?? this.queryRef.query.decimals ?? e;
472
490
  }
473
491
  getFactor() {
474
- var e, a, n;
475
- return this.factor ?? this.queryRef.query.factor ?? ((a = (e = this.queryRef.tag) == null ? void 0 : e.variable) != null && a.factor ? parseFloat(this.queryRef.tag.variable.factor) : null) ?? ((n = this.queryRef.variable) != null && n.factor ? parseFloat(this.queryRef.variable.factor) : null) ?? T;
492
+ var e, n, a;
493
+ return this.factor ?? this.queryRef.query.factor ?? ((n = (e = this.queryRef.tag) == null ? void 0 : e.variable) != null && n.factor ? parseFloat(this.queryRef.tag.variable.factor) : null) ?? ((a = this.queryRef.variable) != null && a.factor ? parseFloat(this.queryRef.variable.factor) : null) ?? Q;
476
494
  }
477
495
  getUnit() {
478
- var e, a, n;
479
- return this.unit ?? this.queryRef.query.unit ?? ((a = (e = this.queryRef.tag) == null ? void 0 : e.variable) == null ? void 0 : a.unit) ?? ((n = this.queryRef.variable) == null ? void 0 : n.unit) ?? A;
496
+ var e, n, a;
497
+ return this.unit ?? this.queryRef.query.unit ?? ((n = (e = this.queryRef.tag) == null ? void 0 : e.variable) == null ? void 0 : n.unit) ?? ((a = this.queryRef.variable) == null ? void 0 : a.unit) ?? G;
480
498
  }
481
499
  setDecimals(e) {
482
500
  this.decimals = e;
@@ -492,69 +510,244 @@ class R {
492
510
  return this.rawValue;
493
511
  }
494
512
  toString() {
495
- var n, r, o, i;
496
- const e = this.locale ?? void 0, a = S((c, d, p, b) => {
497
- const j = {
513
+ var a, r, s, u;
514
+ const e = this.locale ?? void 0, n = A((i, l, p, d) => {
515
+ const g = {
498
516
  style: "decimal",
499
- minimumFractionDigits: Math.floor(d),
500
- maximumFractionDigits: Math.floor(d)
517
+ minimumFractionDigits: Math.floor(l),
518
+ maximumFractionDigits: Math.floor(l)
501
519
  };
502
- return `${new Intl.NumberFormat(b, j).format(c)}${p ? " " + p : ""}`;
520
+ return `${new Intl.NumberFormat(d, g).format(i)}${p ? " " + p : ""}`;
503
521
  });
504
- return this.rawValue === null ? "" : this.queryRef.query.postAggr === "count" ? a(this.rawValue, this.getDecimals(0), this.unit ?? this.queryRef.query.unit, e) : ((n = this.queryRef.variable) == null ? void 0 : n.type) === "str" ? this.rawValue : ((r = this.queryRef.variable) == null ? void 0 : r.type) === "bool" ? this.rawValue ? "True" : "False" : ((o = this.queryRef.variable) == null ? void 0 : o.type) === "int" ? a(
522
+ return this.rawValue === null ? "" : this.queryRef.query.postAggr === "count" ? n(this.rawValue, this.getDecimals(0), this.unit ?? this.queryRef.query.unit, e) : ((a = this.queryRef.variable) == null ? void 0 : a.type) === "str" ? this.rawValue : ((r = this.queryRef.variable) == null ? void 0 : r.type) === "bool" ? this.rawValue ? "True" : "False" : ((s = this.queryRef.variable) == null ? void 0 : s.type) === "int" ? n(
505
523
  this.rawValue,
506
524
  Number.isInteger(this.getFactor()) ? this.getDecimals(0) : this.getDecimals(),
507
525
  this.getUnit(),
508
526
  e
509
- ) : ((i = this.queryRef.variable) == null ? void 0 : i.type) === "float" ? a(this.rawValue, this.getDecimals(), this.getUnit(), e) : String(this.getValue());
527
+ ) : ((u = this.queryRef.variable) == null ? void 0 : u.type) === "float" ? n(this.rawValue, this.getDecimals(), this.getUnit(), e) : String(this.getValue());
510
528
  }
511
529
  }
512
- class Ke extends R {
530
+ class ut extends $ {
513
531
  getFactor() {
514
- return this.factor ?? this.queryRef.query.factor ?? T;
532
+ return this.factor ?? this.queryRef.query.factor ?? Q;
515
533
  }
516
534
  getUnit() {
517
- return this.unit ?? this.queryRef.query.unit ?? A;
535
+ return this.unit ?? this.queryRef.query.unit ?? G;
518
536
  }
519
537
  }
520
- function M(t) {
521
- return t.map(({ queryRef: a, time: n, value: r }) => {
522
- const o = new F(a.query, a.variable, a.tag), i = R.create(r.locale, o, r.rawValue);
538
+ function k(t) {
539
+ return t.map(({ queryRef: n, time: a, value: r }) => {
540
+ const s = new te(n.query, n.variable, n.tag), u = $.create(r.locale, s, r.rawValue);
523
541
  return {
524
- queryRef: o,
525
- time: n,
526
- value: i
542
+ queryRef: s,
543
+ time: a,
544
+ value: u
527
545
  };
528
546
  });
529
547
  }
548
+ let f, U, J;
549
+ function pt(t, e) {
550
+ if (J = /* @__PURE__ */ new Date(), t.nodeType !== Node.ELEMENT_NODE)
551
+ throw new Error("Can't generate CSS selector for non-element node type.");
552
+ if (t.tagName.toLowerCase() === "html")
553
+ return "html";
554
+ const n = {
555
+ root: document.body,
556
+ idName: (r) => !0,
557
+ className: (r) => !0,
558
+ tagName: (r) => !0,
559
+ attr: (r, s) => !1,
560
+ seedMinLength: 1,
561
+ optimizedMinLength: 2,
562
+ threshold: 1e3,
563
+ maxNumberOfTries: 1e4,
564
+ timeoutMs: void 0
565
+ };
566
+ f = { ...n, ...e }, U = gt(f.root, n);
567
+ let a = R(t, "all", () => R(t, "two", () => R(t, "one", () => R(t, "none"))));
568
+ if (a) {
569
+ const r = X(Y(a, t));
570
+ return r.length > 0 && (a = r[0]), O(a);
571
+ } else
572
+ throw new Error("Selector was not found.");
573
+ }
574
+ function gt(t, e) {
575
+ return t.nodeType === Node.DOCUMENT_NODE ? t : t === e.root ? t.ownerDocument : t;
576
+ }
577
+ function R(t, e, n) {
578
+ let a = null, r = [], s = t, u = 0;
579
+ for (; s; ) {
580
+ const i = (/* @__PURE__ */ new Date()).getTime() - J.getTime();
581
+ if (f.timeoutMs !== void 0 && i > f.timeoutMs)
582
+ throw new Error(`Timeout: Can't find a unique selector after ${i}ms`);
583
+ let l = v(yt(s)) || v(...ft(s)) || v(...ht(s)) || v(mt(s)) || [V()];
584
+ const p = wt(s);
585
+ if (e == "all")
586
+ p && (l = l.concat(l.filter(L).map((d) => b(d, p))));
587
+ else if (e == "two")
588
+ l = l.slice(0, 1), p && (l = l.concat(l.filter(L).map((d) => b(d, p))));
589
+ else if (e == "one") {
590
+ const [d] = l = l.slice(0, 1);
591
+ p && L(d) && (l = [b(d, p)]);
592
+ } else
593
+ e == "none" && (l = [V()], p && (l = [b(l[0], p)]));
594
+ for (let d of l)
595
+ d.level = u;
596
+ if (r.push(l), r.length >= f.seedMinLength && (a = F(r, n), a))
597
+ break;
598
+ s = s.parentElement, u++;
599
+ }
600
+ return a || (a = F(r, n)), !a && n ? n() : a;
601
+ }
602
+ function F(t, e) {
603
+ const n = X(x(t));
604
+ if (n.length > f.threshold)
605
+ return e ? e() : null;
606
+ for (let a of n)
607
+ if (K(a))
608
+ return a;
609
+ return null;
610
+ }
611
+ function O(t) {
612
+ let e = t[0], n = e.name;
613
+ for (let a = 1; a < t.length; a++) {
614
+ const r = t[a].level || 0;
615
+ e.level === r - 1 ? n = `${t[a].name} > ${n}` : n = `${t[a].name} ${n}`, e = t[a];
616
+ }
617
+ return n;
618
+ }
619
+ function P(t) {
620
+ return t.map((e) => e.penalty).reduce((e, n) => e + n, 0);
621
+ }
622
+ function K(t) {
623
+ const e = O(t);
624
+ switch (U.querySelectorAll(e).length) {
625
+ case 0:
626
+ throw new Error(`Can't select any node with this selector: ${e}`);
627
+ case 1:
628
+ return !0;
629
+ default:
630
+ return !1;
631
+ }
632
+ }
633
+ function yt(t) {
634
+ const e = t.getAttribute("id");
635
+ return e && f.idName(e) ? {
636
+ name: "#" + CSS.escape(e),
637
+ penalty: 0
638
+ } : null;
639
+ }
640
+ function ft(t) {
641
+ return Array.from(t.attributes).filter((n) => f.attr(n.name, n.value)).map((n) => ({
642
+ name: `[${CSS.escape(n.name)}="${CSS.escape(n.value)}"]`,
643
+ penalty: 0.5
644
+ }));
645
+ }
646
+ function ht(t) {
647
+ return Array.from(t.classList).filter(f.className).map((n) => ({
648
+ name: "." + CSS.escape(n),
649
+ penalty: 1
650
+ }));
651
+ }
652
+ function mt(t) {
653
+ const e = t.tagName.toLowerCase();
654
+ return f.tagName(e) ? {
655
+ name: e,
656
+ penalty: 2
657
+ } : null;
658
+ }
659
+ function V() {
660
+ return {
661
+ name: "*",
662
+ penalty: 3
663
+ };
664
+ }
665
+ function wt(t) {
666
+ const e = t.parentNode;
667
+ if (!e)
668
+ return null;
669
+ let n = e.firstChild;
670
+ if (!n)
671
+ return null;
672
+ let a = 0;
673
+ for (; n && (n.nodeType === Node.ELEMENT_NODE && a++, n !== t); )
674
+ n = n.nextSibling;
675
+ return a;
676
+ }
677
+ function b(t, e) {
678
+ return {
679
+ name: t.name + `:nth-child(${e})`,
680
+ penalty: t.penalty + 1
681
+ };
682
+ }
683
+ function L(t) {
684
+ return t.name !== "html" && !t.name.startsWith("#");
685
+ }
686
+ function v(...t) {
687
+ const e = t.filter(Ct);
688
+ return e.length > 0 ? e : null;
689
+ }
690
+ function Ct(t) {
691
+ return t != null;
692
+ }
693
+ function* x(t, e = []) {
694
+ if (t.length > 0)
695
+ for (let n of t[0])
696
+ yield* x(t.slice(1, t.length), e.concat(n));
697
+ else
698
+ yield e;
699
+ }
700
+ function X(t) {
701
+ return [...t].sort((e, n) => P(e) - P(n));
702
+ }
703
+ function* Y(t, e, n = {
704
+ counter: 0,
705
+ visited: /* @__PURE__ */ new Map()
706
+ }) {
707
+ if (t.length > 2 && t.length > f.optimizedMinLength)
708
+ for (let a = 1; a < t.length - 1; a++) {
709
+ if (n.counter > f.maxNumberOfTries)
710
+ return;
711
+ n.counter += 1;
712
+ const r = [...t];
713
+ r.splice(a, 1);
714
+ const s = O(r);
715
+ if (n.visited.has(s))
716
+ return;
717
+ K(r) && _t(r, e) && (yield r, n.visited.set(s, !0), yield* Y(r, e, n));
718
+ }
719
+ }
720
+ function _t(t, e) {
721
+ return U.querySelector(O(t)) === e;
722
+ }
530
723
  class h extends Error {
531
724
  constructor() {
532
725
  super("Method is not implemented"), this.name = "NotImplementedError", this.message = "Method is not implemented", this.stack = "NotImplementedError: Method is not implemented";
533
726
  }
534
727
  }
535
- class Xe {
728
+ class Dt {
536
729
  constructor(e) {
537
- u(this, "ontimerangechange", null);
538
- u(this, "onvpnclientstatuschange", null);
539
- u(this, "_getApiLinks");
540
- u(this, "appData");
541
- u(this, "componentBaseUrl");
542
- u(this, "destroyed");
543
- u(this, "mode");
544
- u(this, "inputs");
545
- u(this, "inputMap");
546
- u(this, "timeRange");
547
- u(this, "timeRangeIsAdjustable");
548
- u(this, "vpnClientStatus");
730
+ y(this, "ontimerangechange", null);
731
+ y(this, "onvpnclientstatuschange", null);
732
+ y(this, "_getApiLinks");
733
+ y(this, "appData");
734
+ y(this, "componentBaseUrl");
735
+ y(this, "destroyed");
736
+ y(this, "mode");
737
+ y(this, "inputs");
738
+ y(this, "inputMap");
739
+ y(this, "timeRange");
740
+ y(this, "timeRangeIsAdjustable");
741
+ y(this, "vpnClientStatus");
549
742
  this._getApiLinks = () => new Map(e._apiLinkEntries), this.appData = e.appData, this.componentBaseUrl = e.componentBaseUrl, this.destroyed = e.destroyed, this.mode = e.mode, this.inputs = e.inputs, this.inputMap = new Map(Object.entries(this.inputs)), this.timeRange = e.timeRange, this.timeRangeIsAdjustable = e.timeRangeIsAdjustable, this.vpnClientStatus = e.vpnClientStatus, this._messageHandler = this._messageHandler.bind(this), window.addEventListener("message", this._messageHandler, !1);
550
743
  }
551
744
  _messageHandler(e) {
552
745
  if (e.source === window.parent)
553
746
  switch (e.data.type) {
554
- case s.TimeRangeChange:
747
+ case o.TimeRangeChange:
555
748
  this.ontimerangechange && this.ontimerangechange(...e.data.payload);
556
749
  break;
557
- case s.VpnClientStatusChange:
750
+ case o.VpnClientStatusChange:
558
751
  this.onvpnclientstatuschange && this.onvpnclientstatuschange(...e.data.payload);
559
752
  break;
560
753
  }
@@ -563,21 +756,21 @@ class Xe {
563
756
  const e = crypto.randomUUID();
564
757
  return window.parent.postMessage(
565
758
  {
566
- type: s.BackendComponentClientCreate,
759
+ type: o.BackendComponentClientCreate,
567
760
  payload: { clientId: e }
568
761
  },
569
762
  "*"
570
- ), new Ye(e);
763
+ ), new Rt(e);
571
764
  }
572
765
  createLoggingDataClient() {
573
766
  const e = crypto.randomUUID();
574
767
  return window.parent.postMessage(
575
768
  {
576
- type: s.LoggingDataClientCreate,
769
+ type: o.LoggingDataClientCreate,
577
770
  payload: { clientId: e }
578
771
  },
579
772
  "*"
580
- ), new Ze(e);
773
+ ), new bt(e);
581
774
  }
582
775
  createObjectStorageClient() {
583
776
  throw new h();
@@ -586,71 +779,82 @@ class Xe {
586
779
  const e = crypto.randomUUID();
587
780
  return window.parent.postMessage(
588
781
  {
589
- type: s.ResourceDataClientCreate,
782
+ type: o.ResourceDataClientCreate,
590
783
  payload: { clientId: e }
591
784
  },
592
785
  "*"
593
- ), new xe(e);
786
+ ), new vt(e);
594
787
  }
595
788
  createTooltip() {
596
789
  throw new h();
597
790
  }
598
791
  destroy() {
599
- window.parent.postMessage({ type: s.Destroy }, "*"), window.removeEventListener("message", this._messageHandler, !1), this.destroyed = !0;
792
+ window.parent.postMessage({ type: o.Destroy }, "*"), window.removeEventListener("message", this._messageHandler, !1), this.destroyed = !0;
600
793
  }
601
- getApiUrl(e, a) {
602
- const n = this._getApiLinks().get(e);
603
- if (!n)
794
+ getApiUrl(e, n) {
795
+ const a = this._getApiLinks().get(e);
796
+ if (!a)
604
797
  throw new Error("IxApiError: entry not found");
605
- return a ? Object.keys(a).sort().reduce((r, o) => {
606
- if (r.includes(`{${o}}`))
607
- return r.replace(`{${o}}`, a[o]);
608
- const i = new URL(r);
609
- return i.searchParams.set(o, a[o]), decodeURIComponent(i.href);
610
- }, n.href) : n.href;
798
+ return n ? Object.keys(n).sort().reduce((r, s) => {
799
+ if (r.includes(`{${s}}`))
800
+ return r.replace(`{${s}}`, n[s]);
801
+ const u = new URL(r);
802
+ return u.searchParams.set(s, n[s]), decodeURIComponent(u.href);
803
+ }, a.href) : a.href;
611
804
  }
612
805
  navigateByUrl(e) {
613
- window.parent.postMessage({ type: s.NavigateByUrl, payload: { url: e } }, "*");
806
+ window.parent.postMessage({ type: o.NavigateByUrl, payload: { url: e } }, "*");
614
807
  }
615
808
  openActionBottomSheet(e) {
809
+ return new Promise((n) => {
810
+ window.addEventListener("message", a, !1), window.parent.postMessage({ type: o.OpenActionBottomSheet, payload: { options: e } }, "*");
811
+ function a(r) {
812
+ r.source === window.parent && r.data.type === o.OpenActionBottomSheetResult && (window.removeEventListener("message", a, !1), n(r.data.payload.result));
813
+ }
814
+ });
815
+ }
816
+ openActionMenu(e, n) {
616
817
  return new Promise((a) => {
617
- window.addEventListener("message", n, !1), window.parent.postMessage({ type: s.OpenActionBottomSheet, payload: { options: e } }, "*");
618
- function n(r) {
619
- r.source === window.parent && r.data.type === s.OpenActionBottomSheetResult && (window.removeEventListener("message", n, !1), a(r.data.payload.result));
818
+ window.addEventListener("message", r, !1), window.parent.postMessage({ type: o.OpenActionMenu, payload: { selector: pt(e), options: n } }, "*");
819
+ function r(s) {
820
+ s.source === window.parent && s.data.type === o.OpenActionMenuResult && (window.removeEventListener("message", r, !1), a(s.data.payload.result));
620
821
  }
621
822
  });
622
823
  }
623
824
  openAlertDialog(e) {
624
- return new Promise((a) => {
625
- window.addEventListener("message", n, !1), window.parent.postMessage({ type: s.OpenAlertDialog, payload: { options: e } }, "*");
626
- function n(r) {
627
- r.source === window.parent && r.data.type === s.OpenAlertDialogResult && (window.removeEventListener("message", n, !1), a(r.data.payload.result));
825
+ return new Promise((n) => {
826
+ window.addEventListener("message", a, !1), window.parent.postMessage({ type: o.OpenAlertDialog, payload: { options: e } }, "*");
827
+ function a(r) {
828
+ r.source === window.parent && r.data.type === o.OpenAlertDialogResult && (window.removeEventListener("message", a, !1), n(r.data.payload.result));
628
829
  }
629
830
  });
630
831
  }
631
832
  openConfirmDialog(e) {
632
- return new Promise((a) => {
633
- window.addEventListener("message", n, !1), window.parent.postMessage({ type: s.OpenConfirmDialog, payload: { options: e } }, "*");
634
- function n(r) {
635
- r.source === window.parent && r.data.type === s.OpenConfirmDialogResult && (window.removeEventListener("message", n, !1), a(r.data.payload.result));
833
+ return new Promise((n) => {
834
+ window.addEventListener("message", a, !1), window.parent.postMessage({ type: o.OpenConfirmDialog, payload: { options: e } }, "*");
835
+ function a(r) {
836
+ r.source === window.parent && r.data.type === o.OpenConfirmDialogResult && (window.removeEventListener("message", a, !1), n(r.data.payload.result));
636
837
  }
637
838
  });
638
839
  }
639
840
  openFormDialog(e) {
640
- return new Promise((a) => {
641
- window.addEventListener("message", n, !1), window.parent.postMessage({ type: s.OpenFormDialog, payload: { options: e } }, "*");
642
- function n(r) {
643
- r.source === window.parent && r.data.type === s.OpenFormDialogResult && (window.removeEventListener("message", n, !1), a(r.data.payload.result));
841
+ return new Promise((n) => {
842
+ window.addEventListener("message", a, !1), window.parent.postMessage({ type: o.OpenFormDialog, payload: { options: e } }, "*");
843
+ function a(r) {
844
+ r.source === window.parent && r.data.type === o.OpenFormDialogResult && (window.removeEventListener("message", a, !1), n(r.data.payload.result));
644
845
  }
645
846
  });
646
847
  }
848
+ sanitizeHtml() {
849
+ throw new h();
850
+ }
647
851
  saveAsFile() {
648
852
  throw new h();
649
853
  }
650
854
  setTimeRange(e) {
651
855
  window.parent.postMessage(
652
856
  {
653
- type: s.SetTimeRange,
857
+ type: o.SetTimeRange,
654
858
  payload: { timeRange: e }
655
859
  },
656
860
  "*"
@@ -659,7 +863,7 @@ class Xe {
659
863
  showVpnStatusDetails(e) {
660
864
  window.parent.postMessage(
661
865
  {
662
- type: s.ShowVpnStatusDetails,
866
+ type: o.ShowVpnStatusDetails,
663
867
  payload: { agentId: e }
664
868
  },
665
869
  "*"
@@ -669,70 +873,70 @@ class Xe {
669
873
  throw new h();
670
874
  }
671
875
  toggleVpn(e) {
672
- window.parent.postMessage({ type: s.ToggleVpn, payload: { agentId: e } }, "*");
876
+ window.parent.postMessage({ type: o.ToggleVpn, payload: { agentId: e } }, "*");
673
877
  }
674
878
  translate() {
675
879
  throw new h();
676
880
  }
677
881
  }
678
- class Ye {
882
+ class Rt {
679
883
  constructor(e) {
680
884
  this.id = e;
681
885
  }
682
- call(e, a) {
683
- return new Promise((n) => {
886
+ call(e, n) {
887
+ return new Promise((a) => {
684
888
  const r = crypto.randomUUID();
685
- window.addEventListener("message", o, !1), window.parent.postMessage({
686
- type: s.BackendComponentClientCall,
889
+ window.addEventListener("message", s, !1), window.parent.postMessage({
890
+ type: o.BackendComponentClientCall,
687
891
  payload: {
688
892
  clientId: this.id,
689
893
  callId: r,
690
894
  functionName: e,
691
- functionArguments: a
895
+ functionArguments: n
692
896
  }
693
897
  });
694
- function o(i) {
695
- i.source === window.parent && i.data.type === s.BackendComponentClientCallResult && i.data.payload.callId === r && (window.removeEventListener("message", o, !1), n(i.data.payload.result));
898
+ function s(u) {
899
+ u.source === window.parent && u.data.type === o.BackendComponentClientCallResult && u.data.payload.callId === r && (window.removeEventListener("message", s, !1), a(u.data.payload.result));
696
900
  }
697
901
  });
698
902
  }
699
903
  destroy() {
700
904
  window.parent.postMessage(
701
905
  {
702
- type: s.BackendComponentClientDestroy,
906
+ type: o.BackendComponentClientDestroy,
703
907
  payload: { clientId: this.id }
704
908
  },
705
909
  "*"
706
910
  );
707
911
  }
708
912
  }
709
- class Ze {
913
+ class bt {
710
914
  constructor(e) {
711
915
  this.id = e;
712
916
  }
713
- query(e, a) {
714
- const n = crypto.randomUUID();
917
+ query(e, n) {
918
+ const a = crypto.randomUUID();
715
919
  return window.addEventListener("message", r, !1), window.parent.postMessage(
716
920
  {
717
- type: s.LoggingDataClientQuery,
718
- payload: { clientId: this.id, queryId: n, query: e }
921
+ type: o.LoggingDataClientQuery,
922
+ payload: { clientId: this.id, queryId: a, query: e }
719
923
  },
720
924
  "*"
721
925
  ), () => {
722
926
  window.removeEventListener("message", r, !1);
723
927
  };
724
- function r(o) {
725
- if (o.source === window.parent && o.data.type === s.LoggingDataClientQueryResult && o.data.payload.queryId === n) {
726
- const { results: i } = o.data.payload;
928
+ function r(s) {
929
+ if (s.source === window.parent && s.data.type === o.LoggingDataClientQueryResult && s.data.payload.queryId === a) {
930
+ const { results: u } = s.data.payload;
727
931
  if (e.length)
728
932
  if (!e.queries || e.format !== "csv") {
729
- const c = i.map((d) => M(d));
730
- a(c);
933
+ const i = u.map((l) => k(l));
934
+ n(i);
731
935
  } else
732
936
  throw new h();
733
937
  else {
734
- const c = M(i);
735
- a(c);
938
+ const i = k(u);
939
+ n(i);
736
940
  }
737
941
  }
738
942
  }
@@ -740,90 +944,90 @@ class Ze {
740
944
  destroy() {
741
945
  window.parent.postMessage(
742
946
  {
743
- type: s.LoggingDataClientDestroy,
947
+ type: o.LoggingDataClientDestroy,
744
948
  payload: { clientId: this.id }
745
949
  },
746
950
  "*"
747
951
  );
748
952
  }
749
953
  }
750
- class xe {
954
+ class vt {
751
955
  constructor(e) {
752
956
  this.id = e;
753
957
  }
754
- query(e, a) {
755
- const n = crypto.randomUUID();
958
+ query(e, n) {
959
+ const a = crypto.randomUUID();
756
960
  return window.addEventListener("message", r, !1), window.parent.postMessage(
757
961
  {
758
- type: s.ResourceDataClientQuery,
759
- payload: { clientId: this.id, queryId: n, query: e }
962
+ type: o.ResourceDataClientQuery,
963
+ payload: { clientId: this.id, queryId: a, query: e }
760
964
  },
761
965
  "*"
762
966
  ), () => {
763
967
  window.removeEventListener("message", r, !1);
764
968
  };
765
- function r(o) {
766
- o.source === window.parent && o.data.type === s.ResourceDataClientQueryResult && o.data.payload.queryId === n && a(o.data.payload.results);
969
+ function r(s) {
970
+ s.source === window.parent && s.data.type === o.ResourceDataClientQueryResult && s.data.payload.queryId === a && n(s.data.payload.results);
767
971
  }
768
972
  }
769
973
  update(e) {
770
- return new Promise((a) => {
771
- const n = crypto.randomUUID();
974
+ return new Promise((n) => {
975
+ const a = crypto.randomUUID();
772
976
  window.addEventListener("message", r, !1), window.parent.postMessage(
773
977
  {
774
- type: s.ResourceDataClientUpdate,
775
- payload: { clientId: this.id, updateId: n, update: e }
978
+ type: o.ResourceDataClientUpdate,
979
+ payload: { clientId: this.id, updateId: a, update: e }
776
980
  },
777
981
  "*"
778
982
  );
779
- function r(o) {
780
- o.source === window.parent && o.data.type === s.ResourceDataClientUpdated && o.data.payload.updateId === n && (window.removeEventListener("message", r, !1), a());
983
+ function r(s) {
984
+ s.source === window.parent && s.data.type === o.ResourceDataClientUpdated && s.data.payload.updateId === a && (window.removeEventListener("message", r, !1), n());
781
985
  }
782
986
  });
783
987
  }
784
- render(e, a) {
785
- const n = crypto.randomUUID();
988
+ render(e, n) {
989
+ const a = crypto.randomUUID();
786
990
  return window.addEventListener("message", r, !1), window.parent.postMessage(
787
991
  {
788
- type: s.ResourceDataClientRender,
789
- payload: { clientId: this.id, queryId: n, query: e }
992
+ type: o.ResourceDataClientRender,
993
+ payload: { clientId: this.id, queryId: a, query: e }
790
994
  },
791
995
  "*"
792
996
  ), () => {
793
997
  window.removeEventListener("message", r, !1);
794
998
  };
795
- function r(o) {
796
- o.source === window.parent && o.data.type === s.ResourceDataClientRenderResult && o.data.payload.queryId === n && a(o.data.payload.results);
999
+ function r(s) {
1000
+ s.source === window.parent && s.data.type === o.ResourceDataClientRenderResult && s.data.payload.queryId === a && n(s.data.payload.results);
797
1001
  }
798
1002
  }
799
1003
  destroy() {
800
1004
  window.parent.postMessage(
801
1005
  {
802
- type: s.ResourceDataClientDestroy,
1006
+ type: o.ResourceDataClientDestroy,
803
1007
  payload: { clientId: this.id }
804
1008
  },
805
1009
  "*"
806
1010
  );
807
1011
  }
808
1012
  }
809
- function v(t) {
1013
+ function T(t) {
810
1014
  const e = !!(t && t.migrateInputs);
811
- return !e && v.__cache__ ? Promise.resolve(v.__cache__) : new Promise((a) => {
1015
+ return !e && T.__cache__ ? Promise.resolve(T.__cache__) : new Promise((n) => {
812
1016
  window.addEventListener(
813
1017
  "message",
814
- function n(r) {
815
- if (r.source === window.parent && r.data && r.data.type === s.Created) {
816
- let o = r.data.payload;
817
- e && (o.inputs = t.migrateInputs(o.inputs, null));
818
- const i = new Xe(o);
819
- a(i), e || (v.__cache__ = i), window.removeEventListener("message", n, !1);
1018
+ function a(r) {
1019
+ if (r.source === window.parent && r.data && r.data.type === o.Created) {
1020
+ let s = r.data.payload;
1021
+ e && (s.inputs = t.migrateInputs(s.inputs, null));
1022
+ const u = new Dt(s);
1023
+ n(u), e || (T.__cache__ = u), window.removeEventListener("message", a, !1);
820
1024
  }
821
1025
  },
822
1026
  !1
823
- ), window.parent.postMessage({ type: s.Create }, "*");
1027
+ ), window.parent.postMessage({ type: o.Create }, "*");
824
1028
  });
825
1029
  }
826
1030
  export {
827
- at as connect,
828
- v as getComponentContext
1031
+ Mt as connect,
1032
+ T as getComponentContext
829
1033
  };