@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 +604 -400
- package/dist/index.umd.cjs +1 -1
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -1,54 +1,57 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
const
|
|
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: `${
|
|
7
|
-
Created: `${
|
|
8
|
-
Destroy: `${
|
|
6
|
+
Create: `${c}create`,
|
|
7
|
+
Created: `${c}created`,
|
|
8
|
+
Destroy: `${c}destroy`,
|
|
9
9
|
// BackendComponentClient
|
|
10
|
-
BackendComponentClientCreate: `${
|
|
11
|
-
BackendComponentClientDestroy: `${
|
|
12
|
-
BackendComponentClientCall: `${
|
|
13
|
-
BackendComponentClientCallResult: `${
|
|
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: `${
|
|
16
|
-
LoggingDataClientDestroy: `${
|
|
17
|
-
LoggingDataClientQuery: `${
|
|
18
|
-
LoggingDataClientQueryResult: `${
|
|
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: `${
|
|
21
|
-
ResourceDataClientDestroy: `${
|
|
22
|
-
ResourceDataClientQuery: `${
|
|
23
|
-
ResourceDataClientQueryResult: `${
|
|
24
|
-
ResourceDataClientRender: `${
|
|
25
|
-
ResourceDataClientRenderResult: `${
|
|
26
|
-
ResourceDataClientUpdate: `${
|
|
27
|
-
ResourceDataClientUpdated: `${
|
|
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: `${
|
|
30
|
-
OpenActionBottomSheetResult: `${
|
|
32
|
+
OpenActionBottomSheet: `${c}openactionbottomsheet`,
|
|
33
|
+
OpenActionBottomSheetResult: `${c}openactionbottomsheetresult`,
|
|
31
34
|
// Dialogs
|
|
32
|
-
OpenAlertDialog: `${
|
|
33
|
-
OpenAlertDialogResult: `${
|
|
34
|
-
OpenConfirmDialog: `${
|
|
35
|
-
OpenConfirmDialogResult: `${
|
|
36
|
-
OpenFormDialog: `${
|
|
37
|
-
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: `${
|
|
40
|
-
ToggleVpn: `${
|
|
41
|
-
VpnClientStatusChange: `${
|
|
42
|
+
ShowVpnStatusDetails: `${c}showvpnstatusdetails`,
|
|
43
|
+
ToggleVpn: `${c}togglevpn`,
|
|
44
|
+
VpnClientStatusChange: `${c}vpnclientstatuschange`,
|
|
42
45
|
// Miscellaneous
|
|
43
|
-
NavigateByUrl: `${
|
|
44
|
-
SetTimeRange: `${
|
|
45
|
-
TimeRangeChange: `${
|
|
46
|
+
NavigateByUrl: `${c}navigatebyurl`,
|
|
47
|
+
SetTimeRange: `${c}settimerange`,
|
|
48
|
+
TimeRangeChange: `${c}timerangechange`
|
|
46
49
|
};
|
|
47
|
-
function
|
|
48
|
-
return window.addEventListener("message",
|
|
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:
|
|
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:
|
|
62
|
+
type: o.VpnClientStatusChange,
|
|
60
63
|
payload: r
|
|
61
64
|
},
|
|
62
65
|
"*"
|
|
63
66
|
);
|
|
64
67
|
}, {
|
|
65
68
|
destroy() {
|
|
66
|
-
window.removeEventListener("message",
|
|
69
|
+
window.removeEventListener("message", a, !1);
|
|
67
70
|
}
|
|
68
71
|
};
|
|
69
|
-
function
|
|
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
|
|
83
|
-
if (
|
|
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
|
|
88
|
+
case o.Create:
|
|
86
89
|
t.contentWindow.postMessage(
|
|
87
90
|
{
|
|
88
|
-
type:
|
|
89
|
-
payload:
|
|
91
|
+
type: o.Created,
|
|
92
|
+
payload: n(e)
|
|
90
93
|
},
|
|
91
94
|
"*"
|
|
92
95
|
);
|
|
93
96
|
break;
|
|
94
|
-
case
|
|
97
|
+
case o.Destroy:
|
|
95
98
|
e.destroy();
|
|
96
99
|
break;
|
|
97
|
-
case
|
|
98
|
-
const { clientId:
|
|
99
|
-
|
|
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
|
|
103
|
-
const { clientId:
|
|
104
|
-
|
|
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
|
|
108
|
-
const { clientId:
|
|
109
|
-
let
|
|
110
|
-
|
|
111
|
-
|
|
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:
|
|
114
|
-
payload: { callId:
|
|
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
|
|
122
|
-
const { clientId:
|
|
123
|
-
|
|
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
|
|
127
|
-
const { clientId:
|
|
128
|
-
|
|
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
|
|
132
|
-
const { clientId:
|
|
133
|
-
let d =
|
|
134
|
-
d && !d._destroyed && d.query(
|
|
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:
|
|
138
|
-
payload: { queryId:
|
|
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
|
|
146
|
-
const { clientId:
|
|
147
|
-
|
|
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
|
|
151
|
-
const { clientId:
|
|
152
|
-
|
|
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
|
|
156
|
-
const { clientId:
|
|
157
|
-
let d =
|
|
158
|
-
d && !d._destroyed && d.query(
|
|
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:
|
|
162
|
-
payload: { queryId:
|
|
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
|
|
170
|
-
const { clientId:
|
|
171
|
-
let d =
|
|
172
|
-
d && !d._destroyed && d.render(
|
|
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:
|
|
176
|
-
payload: { queryId:
|
|
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
|
|
184
|
-
const { clientId:
|
|
185
|
-
let d =
|
|
186
|
-
d && !d._destroyed && d.update(
|
|
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:
|
|
190
|
-
payload: { updateId:
|
|
192
|
+
type: o.ResourceDataClientUpdated,
|
|
193
|
+
payload: { updateId: l }
|
|
191
194
|
},
|
|
192
195
|
"*"
|
|
193
196
|
);
|
|
194
197
|
});
|
|
195
198
|
break;
|
|
196
199
|
}
|
|
197
|
-
case
|
|
198
|
-
e.openActionBottomSheet(r.data.payload.options).then((
|
|
199
|
-
t.contentWindow.postMessage({ type:
|
|
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
|
|
203
|
-
|
|
204
|
-
|
|
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
|
|
208
|
-
e.
|
|
209
|
-
t.contentWindow.postMessage({ type:
|
|
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
|
|
213
|
-
e.
|
|
214
|
-
t.contentWindow.postMessage({ type:
|
|
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
|
|
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
|
|
238
|
+
case o.ToggleVpn:
|
|
221
239
|
e.toggleVpn(r.data.payload.agentId);
|
|
222
240
|
break;
|
|
223
|
-
case
|
|
241
|
+
case o.NavigateByUrl:
|
|
224
242
|
e.navigateByUrl(r.data.payload.url);
|
|
225
243
|
break;
|
|
226
|
-
case
|
|
244
|
+
case o.SetTimeRange:
|
|
227
245
|
e.setTimeRange(r.data.payload.timeRange);
|
|
228
246
|
break;
|
|
229
247
|
}
|
|
230
248
|
}
|
|
231
249
|
}
|
|
232
|
-
class
|
|
233
|
-
constructor(e,
|
|
234
|
-
this.query = e, this.variable =
|
|
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
|
|
241
|
-
const
|
|
242
|
-
var
|
|
243
|
-
const
|
|
244
|
-
var
|
|
245
|
-
const
|
|
246
|
-
var
|
|
247
|
-
function
|
|
248
|
-
var e =
|
|
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[
|
|
251
|
-
var
|
|
268
|
+
t[_] = void 0;
|
|
269
|
+
var a = !0;
|
|
252
270
|
} catch {
|
|
253
271
|
}
|
|
254
|
-
var r =
|
|
255
|
-
return
|
|
272
|
+
var r = le.call(t);
|
|
273
|
+
return a && (e ? t[_] = n : delete t[_]), r;
|
|
256
274
|
}
|
|
257
|
-
var
|
|
258
|
-
function
|
|
259
|
-
return
|
|
275
|
+
var de = Object.prototype, ue = de.toString;
|
|
276
|
+
function pe(t) {
|
|
277
|
+
return ue.call(t);
|
|
260
278
|
}
|
|
261
|
-
var
|
|
262
|
-
function
|
|
263
|
-
return t == null ? t === void 0 ?
|
|
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
|
|
283
|
+
function z(t) {
|
|
266
284
|
var e = typeof t;
|
|
267
285
|
return t != null && (e == "object" || e == "function");
|
|
268
286
|
}
|
|
269
|
-
var
|
|
270
|
-
function
|
|
271
|
-
if (!
|
|
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 =
|
|
274
|
-
return e ==
|
|
291
|
+
var e = fe(t);
|
|
292
|
+
return e == me || e == we || e == he || e == Ce;
|
|
275
293
|
}
|
|
276
|
-
var
|
|
277
|
-
const
|
|
278
|
-
var
|
|
279
|
-
var t = /[^.]+$/.exec(
|
|
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
|
|
283
|
-
return !!
|
|
300
|
+
function Re(t) {
|
|
301
|
+
return !!B && B in t;
|
|
284
302
|
}
|
|
285
|
-
var
|
|
286
|
-
function
|
|
303
|
+
var be = Function.prototype, ve = be.toString;
|
|
304
|
+
function Se(t) {
|
|
287
305
|
if (t != null) {
|
|
288
306
|
try {
|
|
289
|
-
return
|
|
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
|
|
300
|
-
"^" +
|
|
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
|
|
303
|
-
if (!
|
|
320
|
+
function qe(t) {
|
|
321
|
+
if (!z(t) || Re(t))
|
|
304
322
|
return !1;
|
|
305
|
-
var e =
|
|
306
|
-
return e.test(
|
|
323
|
+
var e = _e(t) ? Te : Ie;
|
|
324
|
+
return e.test(Se(t));
|
|
307
325
|
}
|
|
308
|
-
function
|
|
326
|
+
function Ae(t, e) {
|
|
309
327
|
return t == null ? void 0 : t[e];
|
|
310
328
|
}
|
|
311
|
-
function
|
|
312
|
-
var
|
|
313
|
-
return
|
|
329
|
+
function W(t, e) {
|
|
330
|
+
var n = Ae(t, e);
|
|
331
|
+
return qe(n) ? n : void 0;
|
|
314
332
|
}
|
|
315
|
-
function
|
|
333
|
+
function Ue(t, e) {
|
|
316
334
|
return t === e || t !== t && e !== e;
|
|
317
335
|
}
|
|
318
|
-
var
|
|
319
|
-
const
|
|
320
|
-
function
|
|
321
|
-
this.__data__ =
|
|
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
|
|
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
|
|
328
|
-
function
|
|
345
|
+
var ke = "__lodash_hash_undefined__", Fe = Object.prototype, Pe = Fe.hasOwnProperty;
|
|
346
|
+
function Ve(t) {
|
|
329
347
|
var e = this.__data__;
|
|
330
|
-
if (
|
|
331
|
-
var
|
|
332
|
-
return
|
|
348
|
+
if (D) {
|
|
349
|
+
var n = e[t];
|
|
350
|
+
return n === ke ? void 0 : n;
|
|
333
351
|
}
|
|
334
|
-
return
|
|
352
|
+
return Pe.call(e, t) ? e[t] : void 0;
|
|
335
353
|
}
|
|
336
|
-
var
|
|
337
|
-
function
|
|
354
|
+
var He = Object.prototype, ze = He.hasOwnProperty;
|
|
355
|
+
function We(t) {
|
|
338
356
|
var e = this.__data__;
|
|
339
|
-
return
|
|
340
|
-
}
|
|
341
|
-
var
|
|
342
|
-
function
|
|
343
|
-
var
|
|
344
|
-
return this.size += this.has(t) ? 0 : 1,
|
|
345
|
-
}
|
|
346
|
-
function
|
|
347
|
-
var e = -1,
|
|
348
|
-
for (this.clear(); ++e <
|
|
349
|
-
var
|
|
350
|
-
this.set(
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
function
|
|
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
|
|
362
|
-
for (var
|
|
363
|
-
if (
|
|
364
|
-
return
|
|
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
|
|
368
|
-
function
|
|
369
|
-
var e = this.__data__,
|
|
370
|
-
if (
|
|
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
|
|
373
|
-
return
|
|
374
|
-
}
|
|
375
|
-
function
|
|
376
|
-
var e = this.__data__,
|
|
377
|
-
return
|
|
378
|
-
}
|
|
379
|
-
function
|
|
380
|
-
return
|
|
381
|
-
}
|
|
382
|
-
function
|
|
383
|
-
var
|
|
384
|
-
return
|
|
385
|
-
}
|
|
386
|
-
function
|
|
387
|
-
var e = -1,
|
|
388
|
-
for (this.clear(); ++e <
|
|
389
|
-
var
|
|
390
|
-
this.set(
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
var
|
|
399
|
-
const
|
|
400
|
-
function
|
|
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
|
|
403
|
-
map: new (
|
|
404
|
-
string: new
|
|
420
|
+
hash: new m(),
|
|
421
|
+
map: new (nt || C)(),
|
|
422
|
+
string: new m()
|
|
405
423
|
};
|
|
406
424
|
}
|
|
407
|
-
function
|
|
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
|
|
412
|
-
var
|
|
413
|
-
return
|
|
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
|
|
416
|
-
var e =
|
|
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
|
|
420
|
-
return
|
|
437
|
+
function st(t) {
|
|
438
|
+
return I(this, t).get(t);
|
|
421
439
|
}
|
|
422
|
-
function
|
|
423
|
-
return
|
|
440
|
+
function it(t) {
|
|
441
|
+
return I(this, t).has(t);
|
|
424
442
|
}
|
|
425
|
-
function
|
|
426
|
-
var
|
|
427
|
-
return
|
|
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
|
|
430
|
-
var e = -1,
|
|
431
|
-
for (this.clear(); ++e <
|
|
432
|
-
var
|
|
433
|
-
this.set(
|
|
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
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
var
|
|
442
|
-
function
|
|
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(
|
|
445
|
-
var
|
|
446
|
-
var
|
|
447
|
-
if (
|
|
448
|
-
return
|
|
449
|
-
var
|
|
450
|
-
return
|
|
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
|
|
470
|
+
return n.cache = new (A.Cache || w)(), n;
|
|
453
471
|
}
|
|
454
|
-
|
|
455
|
-
const
|
|
456
|
-
class
|
|
457
|
-
constructor(e,
|
|
458
|
-
this.locale = e, this.queryRef =
|
|
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,
|
|
468
|
-
return
|
|
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 =
|
|
488
|
+
getDecimals(e = dt) {
|
|
471
489
|
return this.decimals ?? this.queryRef.query.decimals ?? e;
|
|
472
490
|
}
|
|
473
491
|
getFactor() {
|
|
474
|
-
var e,
|
|
475
|
-
return this.factor ?? this.queryRef.query.factor ?? ((
|
|
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,
|
|
479
|
-
return this.unit ?? this.queryRef.query.unit ?? ((
|
|
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
|
|
496
|
-
const e = this.locale ?? void 0,
|
|
497
|
-
const
|
|
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(
|
|
500
|
-
maximumFractionDigits: Math.floor(
|
|
517
|
+
minimumFractionDigits: Math.floor(l),
|
|
518
|
+
maximumFractionDigits: Math.floor(l)
|
|
501
519
|
};
|
|
502
|
-
return `${new Intl.NumberFormat(
|
|
520
|
+
return `${new Intl.NumberFormat(d, g).format(i)}${p ? " " + p : ""}`;
|
|
503
521
|
});
|
|
504
|
-
return this.rawValue === null ? "" : this.queryRef.query.postAggr === "count" ?
|
|
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
|
-
) : ((
|
|
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
|
|
530
|
+
class ut extends $ {
|
|
513
531
|
getFactor() {
|
|
514
|
-
return this.factor ?? this.queryRef.query.factor ??
|
|
532
|
+
return this.factor ?? this.queryRef.query.factor ?? Q;
|
|
515
533
|
}
|
|
516
534
|
getUnit() {
|
|
517
|
-
return this.unit ?? this.queryRef.query.unit ??
|
|
535
|
+
return this.unit ?? this.queryRef.query.unit ?? G;
|
|
518
536
|
}
|
|
519
537
|
}
|
|
520
|
-
function
|
|
521
|
-
return t.map(({ queryRef:
|
|
522
|
-
const
|
|
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:
|
|
525
|
-
time:
|
|
526
|
-
value:
|
|
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
|
|
728
|
+
class Dt {
|
|
536
729
|
constructor(e) {
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
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
|
|
747
|
+
case o.TimeRangeChange:
|
|
555
748
|
this.ontimerangechange && this.ontimerangechange(...e.data.payload);
|
|
556
749
|
break;
|
|
557
|
-
case
|
|
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:
|
|
759
|
+
type: o.BackendComponentClientCreate,
|
|
567
760
|
payload: { clientId: e }
|
|
568
761
|
},
|
|
569
762
|
"*"
|
|
570
|
-
), new
|
|
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:
|
|
769
|
+
type: o.LoggingDataClientCreate,
|
|
577
770
|
payload: { clientId: e }
|
|
578
771
|
},
|
|
579
772
|
"*"
|
|
580
|
-
), new
|
|
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:
|
|
782
|
+
type: o.ResourceDataClientCreate,
|
|
590
783
|
payload: { clientId: e }
|
|
591
784
|
},
|
|
592
785
|
"*"
|
|
593
|
-
), new
|
|
786
|
+
), new vt(e);
|
|
594
787
|
}
|
|
595
788
|
createTooltip() {
|
|
596
789
|
throw new h();
|
|
597
790
|
}
|
|
598
791
|
destroy() {
|
|
599
|
-
window.parent.postMessage({ type:
|
|
792
|
+
window.parent.postMessage({ type: o.Destroy }, "*"), window.removeEventListener("message", this._messageHandler, !1), this.destroyed = !0;
|
|
600
793
|
}
|
|
601
|
-
getApiUrl(e,
|
|
602
|
-
const
|
|
603
|
-
if (!
|
|
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
|
|
606
|
-
if (r.includes(`{${
|
|
607
|
-
return r.replace(`{${
|
|
608
|
-
const
|
|
609
|
-
return
|
|
610
|
-
},
|
|
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:
|
|
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",
|
|
618
|
-
function
|
|
619
|
-
|
|
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((
|
|
625
|
-
window.addEventListener("message",
|
|
626
|
-
function
|
|
627
|
-
r.source === window.parent && r.data.type ===
|
|
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((
|
|
633
|
-
window.addEventListener("message",
|
|
634
|
-
function
|
|
635
|
-
r.source === window.parent && r.data.type ===
|
|
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((
|
|
641
|
-
window.addEventListener("message",
|
|
642
|
-
function
|
|
643
|
-
r.source === window.parent && r.data.type ===
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|
882
|
+
class Rt {
|
|
679
883
|
constructor(e) {
|
|
680
884
|
this.id = e;
|
|
681
885
|
}
|
|
682
|
-
call(e,
|
|
683
|
-
return new Promise((
|
|
886
|
+
call(e, n) {
|
|
887
|
+
return new Promise((a) => {
|
|
684
888
|
const r = crypto.randomUUID();
|
|
685
|
-
window.addEventListener("message",
|
|
686
|
-
type:
|
|
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:
|
|
895
|
+
functionArguments: n
|
|
692
896
|
}
|
|
693
897
|
});
|
|
694
|
-
function
|
|
695
|
-
|
|
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:
|
|
906
|
+
type: o.BackendComponentClientDestroy,
|
|
703
907
|
payload: { clientId: this.id }
|
|
704
908
|
},
|
|
705
909
|
"*"
|
|
706
910
|
);
|
|
707
911
|
}
|
|
708
912
|
}
|
|
709
|
-
class
|
|
913
|
+
class bt {
|
|
710
914
|
constructor(e) {
|
|
711
915
|
this.id = e;
|
|
712
916
|
}
|
|
713
|
-
query(e,
|
|
714
|
-
const
|
|
917
|
+
query(e, n) {
|
|
918
|
+
const a = crypto.randomUUID();
|
|
715
919
|
return window.addEventListener("message", r, !1), window.parent.postMessage(
|
|
716
920
|
{
|
|
717
|
-
type:
|
|
718
|
-
payload: { clientId: this.id, queryId:
|
|
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(
|
|
725
|
-
if (
|
|
726
|
-
const { results:
|
|
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
|
|
730
|
-
|
|
933
|
+
const i = u.map((l) => k(l));
|
|
934
|
+
n(i);
|
|
731
935
|
} else
|
|
732
936
|
throw new h();
|
|
733
937
|
else {
|
|
734
|
-
const
|
|
735
|
-
|
|
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:
|
|
947
|
+
type: o.LoggingDataClientDestroy,
|
|
744
948
|
payload: { clientId: this.id }
|
|
745
949
|
},
|
|
746
950
|
"*"
|
|
747
951
|
);
|
|
748
952
|
}
|
|
749
953
|
}
|
|
750
|
-
class
|
|
954
|
+
class vt {
|
|
751
955
|
constructor(e) {
|
|
752
956
|
this.id = e;
|
|
753
957
|
}
|
|
754
|
-
query(e,
|
|
755
|
-
const
|
|
958
|
+
query(e, n) {
|
|
959
|
+
const a = crypto.randomUUID();
|
|
756
960
|
return window.addEventListener("message", r, !1), window.parent.postMessage(
|
|
757
961
|
{
|
|
758
|
-
type:
|
|
759
|
-
payload: { clientId: this.id, queryId:
|
|
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(
|
|
766
|
-
|
|
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((
|
|
771
|
-
const
|
|
974
|
+
return new Promise((n) => {
|
|
975
|
+
const a = crypto.randomUUID();
|
|
772
976
|
window.addEventListener("message", r, !1), window.parent.postMessage(
|
|
773
977
|
{
|
|
774
|
-
type:
|
|
775
|
-
payload: { clientId: this.id, updateId:
|
|
978
|
+
type: o.ResourceDataClientUpdate,
|
|
979
|
+
payload: { clientId: this.id, updateId: a, update: e }
|
|
776
980
|
},
|
|
777
981
|
"*"
|
|
778
982
|
);
|
|
779
|
-
function r(
|
|
780
|
-
|
|
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,
|
|
785
|
-
const
|
|
988
|
+
render(e, n) {
|
|
989
|
+
const a = crypto.randomUUID();
|
|
786
990
|
return window.addEventListener("message", r, !1), window.parent.postMessage(
|
|
787
991
|
{
|
|
788
|
-
type:
|
|
789
|
-
payload: { clientId: this.id, queryId:
|
|
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(
|
|
796
|
-
|
|
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:
|
|
1006
|
+
type: o.ResourceDataClientDestroy,
|
|
803
1007
|
payload: { clientId: this.id }
|
|
804
1008
|
},
|
|
805
1009
|
"*"
|
|
806
1010
|
);
|
|
807
1011
|
}
|
|
808
1012
|
}
|
|
809
|
-
function
|
|
1013
|
+
function T(t) {
|
|
810
1014
|
const e = !!(t && t.migrateInputs);
|
|
811
|
-
return !e &&
|
|
1015
|
+
return !e && T.__cache__ ? Promise.resolve(T.__cache__) : new Promise((n) => {
|
|
812
1016
|
window.addEventListener(
|
|
813
1017
|
"message",
|
|
814
|
-
function
|
|
815
|
-
if (r.source === window.parent && r.data && r.data.type ===
|
|
816
|
-
let
|
|
817
|
-
e && (
|
|
818
|
-
const
|
|
819
|
-
|
|
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:
|
|
1027
|
+
), window.parent.postMessage({ type: o.Create }, "*");
|
|
824
1028
|
});
|
|
825
1029
|
}
|
|
826
1030
|
export {
|
|
827
|
-
|
|
828
|
-
|
|
1031
|
+
Mt as connect,
|
|
1032
|
+
T as getComponentContext
|
|
829
1033
|
};
|