react-semaphor 0.1.397 → 0.1.398
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/data-app-sdk/index.cjs +20 -5
- package/dist/data-app-sdk/index.js +1180 -1084
- package/package.json +1 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { toSemaphorInputSnapshots as
|
|
2
|
-
import { jsxs as p, Fragment as
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { a as
|
|
1
|
+
import { toSemaphorInputSnapshots as Pr, toSemaphorInputBinding as zr, toSemaphorActiveInputSnapshots as X, toSemaphorMatrixIntent as Fr, toSemaphorSqlIntent as Mr, toSemaphorInputOptionsIntent as jr, toSemaphorRecordsIntent as Hr, toSemaphorAnalysisQueryOptions as Vr, toSemaphorAnalysisIntent as Qr, toSemaphorMetricIntent as Ur, hasSemaphorInputValue as ue, normalizeSemaphorInputOptions as gr, toSemaphorInputSpec as mr } from "../data-app-sdk-adapters/index.js";
|
|
2
|
+
import { jsxs as p, Fragment as yr, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as Ie, useContext as Q, useState as F, useRef as E, useEffect as B, useMemo as I, Fragment as Gr, useId as hr, useCallback as O, useReducer as Jr } from "react";
|
|
4
|
+
import { a as Yr, m as Xr } from "../chunks/source-identity-y0VSSreA.js";
|
|
5
5
|
import "../chunks/analyze-result-contract-C9Gv2_qW.js";
|
|
6
|
-
import { M as
|
|
7
|
-
import { X as
|
|
8
|
-
import { b as
|
|
9
|
-
function
|
|
6
|
+
import { M as Zr, a as et, S as rt, E as tt, C as nt } from "../chunks/search-BHsQIWBV.js";
|
|
7
|
+
import { X as it, C as ot, j as st } from "../chunks/x-CXDkqdur.js";
|
|
8
|
+
import { b as at } from "../chunks/validators-4EGCWWga.js";
|
|
9
|
+
function me(e, r, t = {}) {
|
|
10
10
|
return {
|
|
11
11
|
...t,
|
|
12
12
|
name: e,
|
|
13
13
|
role: r
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function Mi(e) {
|
|
17
17
|
return e;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function ji(e) {
|
|
20
20
|
return e;
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const Hi = {
|
|
23
23
|
source: {
|
|
24
24
|
semantic(e) {
|
|
25
25
|
return {
|
|
@@ -36,16 +36,16 @@ const ji = {
|
|
|
36
36
|
},
|
|
37
37
|
field: {
|
|
38
38
|
measure(e, r) {
|
|
39
|
-
return
|
|
39
|
+
return me(e, "measure", r);
|
|
40
40
|
},
|
|
41
41
|
dimension(e, r) {
|
|
42
|
-
return
|
|
42
|
+
return me(e, "dimension", r);
|
|
43
43
|
},
|
|
44
44
|
date(e, r) {
|
|
45
|
-
return
|
|
45
|
+
return me(e, "date", r);
|
|
46
46
|
},
|
|
47
47
|
id(e, r) {
|
|
48
|
-
return
|
|
48
|
+
return me(e, "id", r);
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
filter(e) {
|
|
@@ -57,7 +57,7 @@ const ji = {
|
|
|
57
57
|
bindInput(e, r) {
|
|
58
58
|
return {
|
|
59
59
|
toAnalyticsInput() {
|
|
60
|
-
const [t] =
|
|
60
|
+
const [t] = Pr([e]), n = zr({
|
|
61
61
|
...r,
|
|
62
62
|
inputId: r.inputId || t.inputId
|
|
63
63
|
});
|
|
@@ -129,13 +129,13 @@ const ji = {
|
|
|
129
129
|
queryKind: "matrix"
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
-
},
|
|
132
|
+
}, ce = 10, _e = 8;
|
|
133
133
|
function dt(e) {
|
|
134
134
|
const r = e == null ? void 0 : e.result;
|
|
135
135
|
if (r)
|
|
136
136
|
switch (r.kind) {
|
|
137
137
|
case "records":
|
|
138
|
-
return
|
|
138
|
+
return de({
|
|
139
139
|
title: "Records",
|
|
140
140
|
rowNoun: "rows",
|
|
141
141
|
records: r.records,
|
|
@@ -143,7 +143,7 @@ function dt(e) {
|
|
|
143
143
|
rowCount: r.rowCount
|
|
144
144
|
});
|
|
145
145
|
case "sql":
|
|
146
|
-
return
|
|
146
|
+
return de({
|
|
147
147
|
title: "SQL Rows",
|
|
148
148
|
rowNoun: "rows",
|
|
149
149
|
records: r.records,
|
|
@@ -151,10 +151,10 @@ function dt(e) {
|
|
|
151
151
|
rowCount: r.rowCount
|
|
152
152
|
});
|
|
153
153
|
case "inputOptions":
|
|
154
|
-
return
|
|
154
|
+
return de({
|
|
155
155
|
title: "Options",
|
|
156
156
|
rowNoun: "options",
|
|
157
|
-
records: r.options.slice(0,
|
|
157
|
+
records: r.options.slice(0, ce).map((t) => {
|
|
158
158
|
var n;
|
|
159
159
|
return {
|
|
160
160
|
label: t.label,
|
|
@@ -182,7 +182,7 @@ function dt(e) {
|
|
|
182
182
|
},
|
|
183
183
|
{ metric: "delta", value: r.comparison.delta },
|
|
184
184
|
{ metric: "deltaPercent", value: r.comparison.deltaPercent }
|
|
185
|
-
),
|
|
185
|
+
), de({
|
|
186
186
|
title: "Metric",
|
|
187
187
|
rowNoun: "values",
|
|
188
188
|
records: t,
|
|
@@ -194,10 +194,10 @@ function dt(e) {
|
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
196
|
case "matrix":
|
|
197
|
-
return
|
|
197
|
+
return de({
|
|
198
198
|
title: "Matrix Cells",
|
|
199
199
|
rowNoun: "cells",
|
|
200
|
-
records: r.cells.slice(0,
|
|
200
|
+
records: r.cells.slice(0, ce).map((t) => {
|
|
201
201
|
const n = r.nodesById[t.rowId], i = t.columnId ? r.nodesById[t.columnId] : void 0, o = r.measuresById[t.measureId];
|
|
202
202
|
return {
|
|
203
203
|
row: (n == null ? void 0 : n.label) || t.rowId,
|
|
@@ -217,101 +217,101 @@ function dt(e) {
|
|
|
217
217
|
rowCount: r.rowCount ?? r.cells.length
|
|
218
218
|
});
|
|
219
219
|
default:
|
|
220
|
-
return
|
|
220
|
+
return ut(r);
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function de({
|
|
224
224
|
title: e,
|
|
225
225
|
rowNoun: r,
|
|
226
226
|
records: t,
|
|
227
227
|
columns: n,
|
|
228
228
|
rowCount: i
|
|
229
229
|
}) {
|
|
230
|
-
const o =
|
|
230
|
+
const o = lt(n, t);
|
|
231
231
|
if (!o.length)
|
|
232
232
|
return;
|
|
233
|
-
const u = i ?? t.length, f = t.slice(0,
|
|
233
|
+
const u = i ?? t.length, f = t.slice(0, ce);
|
|
234
234
|
return {
|
|
235
235
|
title: e,
|
|
236
|
-
summary: `${
|
|
237
|
-
columns: o.slice(0,
|
|
236
|
+
summary: `${ft(u)} ${r}`,
|
|
237
|
+
columns: o.slice(0, _e),
|
|
238
238
|
rows: f,
|
|
239
239
|
truncatedRows: u > f.length,
|
|
240
|
-
truncatedColumns: o.length >
|
|
240
|
+
truncatedColumns: o.length > _e
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function lt(e, r) {
|
|
244
244
|
if (e != null && e.length)
|
|
245
245
|
return e.filter((n) => n.key).map((n) => ({
|
|
246
246
|
key: n.key,
|
|
247
247
|
label: n.label || n.key
|
|
248
248
|
}));
|
|
249
249
|
const t = /* @__PURE__ */ new Set();
|
|
250
|
-
return r.slice(0,
|
|
250
|
+
return r.slice(0, ce).forEach((n) => {
|
|
251
251
|
Object.keys(n).forEach((i) => t.add(i));
|
|
252
252
|
}), [...t].map((n) => ({ key: n, label: n }));
|
|
253
253
|
}
|
|
254
|
+
function ut(e) {
|
|
255
|
+
throw new Error(`Unhandled Semaphor result kind: ${br(e)}`);
|
|
256
|
+
}
|
|
254
257
|
function ct(e) {
|
|
255
|
-
|
|
258
|
+
return e === null ? "null" : e === void 0 ? "" : typeof e == "string" ? tr(e) : typeof e == "number" || typeof e == "boolean" ? String(e) : tr(br(e));
|
|
256
259
|
}
|
|
257
260
|
function ft(e) {
|
|
258
|
-
return e === null ? "null" : e === void 0 ? "" : typeof e == "string" ? nr(e) : typeof e == "number" || typeof e == "boolean" ? String(e) : nr(vr(e));
|
|
259
|
-
}
|
|
260
|
-
function pt(e) {
|
|
261
261
|
return typeof e == "number" ? e.toLocaleString() : "-";
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function br(e) {
|
|
264
264
|
return JSON.stringify(e, null, 2) ?? "undefined";
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function tr(e) {
|
|
267
267
|
return e.length > 80 ? `${e.slice(0, 77)}...` : e;
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function xe(e) {
|
|
270
270
|
return e.viewTitle || e.queryLabel || e.viewId || e.queryId;
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function pt(e) {
|
|
273
273
|
if (e.label)
|
|
274
274
|
return e.label;
|
|
275
275
|
if (e.queryKind !== "inputOptions")
|
|
276
276
|
return;
|
|
277
277
|
const t = e.labelField.label || e.valueField.label || e.labelField.name || e.valueField.name || e.inputId;
|
|
278
|
-
return `${
|
|
278
|
+
return `${gt(t)} Options`;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function gt(e) {
|
|
281
281
|
return (e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").replace(/\bfilter\b/gi, " ").replace(/\boptions?\b/gi, " ").replace(/\bid\b/gi, " ").replace(/\s+/g, " ").trim() || e).split(" ").filter(Boolean).map((n) => n === n.toUpperCase() && n.length > 1 ? n : `${n.slice(0, 1).toUpperCase()}${n.slice(1)}`).join(" ");
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function Me(e) {
|
|
284
284
|
return e.flatMap((r) => {
|
|
285
|
-
var
|
|
286
|
-
const t = r.latestAttempt, n = t == null ? void 0 : t.executionResult, i =
|
|
287
|
-
(
|
|
288
|
-
), o =
|
|
289
|
-
(
|
|
290
|
-
), u =
|
|
291
|
-
(
|
|
292
|
-
), f =
|
|
285
|
+
var y, m, v, g;
|
|
286
|
+
const t = r.latestAttempt, n = t == null ? void 0 : t.executionResult, i = Ce(
|
|
287
|
+
(y = n == null ? void 0 : n.validation) == null ? void 0 : y.warnings
|
|
288
|
+
), o = Ce(
|
|
289
|
+
(m = n == null ? void 0 : n.validation) == null ? void 0 : m.errors
|
|
290
|
+
), u = bt(
|
|
291
|
+
(v = n == null ? void 0 : n.coverage) == null ? void 0 : v.missingObligations
|
|
292
|
+
), f = Ce(
|
|
293
293
|
(g = n == null ? void 0 : n.coverage) == null ? void 0 : g.warnings
|
|
294
|
-
),
|
|
295
|
-
(t == null ? void 0 : t.status) === "error" &&
|
|
294
|
+
), d = [], c = xe(r);
|
|
295
|
+
(t == null ? void 0 : t.status) === "error" && d.push({
|
|
296
296
|
trace: r,
|
|
297
297
|
tone: "error",
|
|
298
298
|
title: c,
|
|
299
299
|
message: t.errorMessage || "Query attempt failed."
|
|
300
300
|
});
|
|
301
|
-
for (const
|
|
302
|
-
|
|
303
|
-
for (const
|
|
304
|
-
|
|
305
|
-
for (const
|
|
306
|
-
|
|
307
|
-
for (const
|
|
308
|
-
|
|
309
|
-
for (const
|
|
310
|
-
|
|
311
|
-
return
|
|
301
|
+
for (const h of r.clientWarnings)
|
|
302
|
+
d.push({ trace: r, tone: "warning", title: c, message: h });
|
|
303
|
+
for (const h of i)
|
|
304
|
+
d.push({ trace: r, tone: "warning", title: c, ...h });
|
|
305
|
+
for (const h of o)
|
|
306
|
+
d.push({ trace: r, tone: "error", title: c, ...h });
|
|
307
|
+
for (const h of u)
|
|
308
|
+
d.push({ trace: r, tone: "warning", title: c, message: h });
|
|
309
|
+
for (const h of f)
|
|
310
|
+
d.push({ trace: r, tone: "warning", title: c, ...h });
|
|
311
|
+
return d;
|
|
312
312
|
});
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function mt(e) {
|
|
315
315
|
return {
|
|
316
316
|
traceId: e.trace.traceId,
|
|
317
317
|
queryId: e.trace.queryId,
|
|
@@ -325,11 +325,11 @@ function yt(e) {
|
|
|
325
325
|
path: e.path
|
|
326
326
|
};
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function yt(e, r) {
|
|
329
329
|
return e.filter((t) => t.trace.traceId === r.traceId).length;
|
|
330
330
|
}
|
|
331
|
-
function
|
|
332
|
-
const r =
|
|
331
|
+
function ht(e) {
|
|
332
|
+
const r = Me(e), t = e.filter(
|
|
333
333
|
(u) => {
|
|
334
334
|
var f;
|
|
335
335
|
return ((f = u.latestAttempt) == null ? void 0 : f.status) === "error";
|
|
@@ -350,15 +350,15 @@ function bt(e) {
|
|
|
350
350
|
severity: t || i ? "error" : o ? "warning" : n ? "loading" : "ok"
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function bt(e) {
|
|
354
354
|
return Array.isArray(e) ? e.filter((r) => typeof r == "string") : [];
|
|
355
355
|
}
|
|
356
|
-
function
|
|
357
|
-
return Array.isArray(e) ? e.map(
|
|
356
|
+
function Ce(e) {
|
|
357
|
+
return Array.isArray(e) ? e.map(vt).filter(
|
|
358
358
|
(r) => !!r
|
|
359
359
|
) : [];
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function vt(e) {
|
|
362
362
|
if (typeof e == "string")
|
|
363
363
|
return { message: e };
|
|
364
364
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
@@ -373,10 +373,10 @@ function St(e) {
|
|
|
373
373
|
...i ? { path: i } : {}
|
|
374
374
|
} : n ? { message: n, code: n } : void 0;
|
|
375
375
|
}
|
|
376
|
-
function
|
|
376
|
+
function St(e) {
|
|
377
377
|
if (!e.enabled)
|
|
378
378
|
return e;
|
|
379
|
-
const r = e.queries.map(
|
|
379
|
+
const r = e.queries.map(vr);
|
|
380
380
|
return {
|
|
381
381
|
enabled: e.enabled,
|
|
382
382
|
queries: r,
|
|
@@ -385,28 +385,28 @@ function wt(e) {
|
|
|
385
385
|
getQueries: (t) => r.filter((n) => n.queryId === t)
|
|
386
386
|
};
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
return e ?
|
|
388
|
+
function nr(e) {
|
|
389
|
+
return e ? vr(e) : void 0;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function vr(e) {
|
|
392
392
|
var r;
|
|
393
393
|
return (r = e == null ? void 0 : e.latestAttempt) != null && r.executionResult ? {
|
|
394
394
|
...e,
|
|
395
395
|
latestAttempt: {
|
|
396
396
|
...e.latestAttempt,
|
|
397
|
-
executionResult:
|
|
397
|
+
executionResult: wt(
|
|
398
398
|
e.latestAttempt.executionResult
|
|
399
399
|
)
|
|
400
400
|
}
|
|
401
401
|
} : e;
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function wt(e) {
|
|
404
404
|
const {
|
|
405
405
|
compiledQuery: r,
|
|
406
406
|
intent: t,
|
|
407
407
|
result: n,
|
|
408
408
|
...i
|
|
409
|
-
} = e, o =
|
|
409
|
+
} = e, o = It(
|
|
410
410
|
i.metadata
|
|
411
411
|
);
|
|
412
412
|
return {
|
|
@@ -414,7 +414,7 @@ function It(e) {
|
|
|
414
414
|
...o ? { metadata: o } : {}
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function It(e) {
|
|
418
418
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
419
419
|
return e;
|
|
420
420
|
const r = e.dataAppDebug;
|
|
@@ -426,7 +426,7 @@ function xt(e) {
|
|
|
426
426
|
dataAppDebug: n
|
|
427
427
|
};
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function xt(e) {
|
|
430
430
|
return e === "relative" ? {
|
|
431
431
|
position: "relative",
|
|
432
432
|
top: "auto",
|
|
@@ -440,7 +440,7 @@ function qt(e) {
|
|
|
440
440
|
left: e.endsWith("left") ? 20 : "auto"
|
|
441
441
|
};
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function qt(e) {
|
|
444
444
|
return e === "error" ? {
|
|
445
445
|
borderColor: "var(--sd-error-border)",
|
|
446
446
|
background: "var(--sd-error-bg)",
|
|
@@ -459,7 +459,7 @@ function At(e) {
|
|
|
459
459
|
color: "var(--sd-success-fg)"
|
|
460
460
|
};
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function Tt(e) {
|
|
463
463
|
return e === "right" ? {
|
|
464
464
|
top: 16,
|
|
465
465
|
right: 16,
|
|
@@ -478,23 +478,23 @@ function Ct(e) {
|
|
|
478
478
|
borderRadius: 6
|
|
479
479
|
};
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function At(e) {
|
|
482
482
|
return e === "right" ? {
|
|
483
483
|
gridTemplateColumns: "minmax(210px, 280px) minmax(0, 1fr)"
|
|
484
484
|
} : {
|
|
485
485
|
gridTemplateColumns: "minmax(260px, 340px) minmax(0, 1fr)"
|
|
486
486
|
};
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function Ct(e) {
|
|
489
489
|
return {
|
|
490
490
|
borderRight: "1px solid var(--sd-border)",
|
|
491
491
|
borderBottom: 0
|
|
492
492
|
};
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function Sr(e) {
|
|
495
495
|
return e === "error" ? { background: "var(--sd-error-dot)" } : e === "success" ? { background: "var(--sd-success-dot)" } : e === "loading" ? { background: "var(--sd-loading-dot)" } : { background: "var(--sd-idle-dot)" };
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function kt(e) {
|
|
498
498
|
return e === "error" ? {
|
|
499
499
|
borderColor: "var(--sd-error-border)",
|
|
500
500
|
color: "var(--sd-error-fg)"
|
|
@@ -509,8 +509,8 @@ function Et(e) {
|
|
|
509
509
|
color: "var(--sd-fg-muted)"
|
|
510
510
|
};
|
|
511
511
|
}
|
|
512
|
-
const
|
|
513
|
-
.${
|
|
512
|
+
const ir = "semaphor-devtools-stylesheet", R = "semaphor-devtools", Et = `
|
|
513
|
+
.${R} {
|
|
514
514
|
--sd-bg: #ffffff;
|
|
515
515
|
--sd-bg-muted: #fafafa;
|
|
516
516
|
--sd-bg-raised: #ffffff;
|
|
@@ -559,7 +559,7 @@ const or = "semaphor-devtools-stylesheet", P = "semaphor-devtools", Rt = `
|
|
|
559
559
|
}
|
|
560
560
|
|
|
561
561
|
@media (prefers-color-scheme: dark) {
|
|
562
|
-
.${
|
|
562
|
+
.${R} {
|
|
563
563
|
--sd-bg: #09090b;
|
|
564
564
|
--sd-bg-muted: #18181b;
|
|
565
565
|
--sd-bg-raised: #18181b;
|
|
@@ -603,27 +603,42 @@ const or = "semaphor-devtools-stylesheet", P = "semaphor-devtools", Rt = `
|
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
|
|
606
|
-
.${
|
|
606
|
+
.${R}-source {
|
|
607
607
|
display: -webkit-box;
|
|
608
608
|
-webkit-line-clamp: 2;
|
|
609
609
|
-webkit-box-orient: vertical;
|
|
610
610
|
overflow: hidden;
|
|
611
611
|
word-break: break-all;
|
|
612
612
|
}
|
|
613
|
+
|
|
614
|
+
.${R}-field-row {
|
|
615
|
+
transition: background-color 0.1s ease;
|
|
616
|
+
}
|
|
617
|
+
.${R}-field-row:hover {
|
|
618
|
+
background-color: var(--sd-bg-muted);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
.${R}-tab {
|
|
622
|
+
color: var(--sd-fg-muted);
|
|
623
|
+
transition: color 0.1s ease;
|
|
624
|
+
}
|
|
625
|
+
.${R}-tab:hover {
|
|
626
|
+
color: var(--sd-fg);
|
|
627
|
+
}
|
|
613
628
|
`;
|
|
614
|
-
function
|
|
615
|
-
if (typeof document > "u" || document.getElementById(
|
|
629
|
+
function wr() {
|
|
630
|
+
if (typeof document > "u" || document.getElementById(ir))
|
|
616
631
|
return;
|
|
617
632
|
const e = document.createElement("style");
|
|
618
|
-
e.id =
|
|
633
|
+
e.id = ir, e.textContent = Et, document.head.appendChild(e);
|
|
619
634
|
}
|
|
620
|
-
const
|
|
635
|
+
const ye = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif', W = "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace", ke = {
|
|
621
636
|
color: "var(--sd-fg-muted)",
|
|
622
637
|
fontSize: 10,
|
|
623
638
|
fontWeight: 600,
|
|
624
639
|
textTransform: "uppercase",
|
|
625
640
|
letterSpacing: "0.08em"
|
|
626
|
-
},
|
|
641
|
+
}, s = {
|
|
627
642
|
launcher: {
|
|
628
643
|
position: "fixed",
|
|
629
644
|
bottom: 20,
|
|
@@ -638,7 +653,7 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
638
653
|
borderStyle: "solid",
|
|
639
654
|
borderRadius: 6,
|
|
640
655
|
boxShadow: "var(--sd-shadow)",
|
|
641
|
-
font: `600 12px/1.2 ${
|
|
656
|
+
font: `600 12px/1.2 ${ye}`,
|
|
642
657
|
cursor: "pointer"
|
|
643
658
|
},
|
|
644
659
|
launcherText: {
|
|
@@ -683,7 +698,7 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
683
698
|
background: "var(--sd-bg)",
|
|
684
699
|
color: "var(--sd-fg)",
|
|
685
700
|
boxShadow: "var(--sd-shadow)",
|
|
686
|
-
font: `13px/1.4 ${
|
|
701
|
+
font: `13px/1.4 ${ye}`
|
|
687
702
|
},
|
|
688
703
|
panelFullscreen: {
|
|
689
704
|
top: 0,
|
|
@@ -752,7 +767,7 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
752
767
|
outline: 0,
|
|
753
768
|
background: "transparent",
|
|
754
769
|
color: "var(--sd-fg)",
|
|
755
|
-
font: `12px/1.4 ${
|
|
770
|
+
font: `12px/1.4 ${ye}`
|
|
756
771
|
},
|
|
757
772
|
issueSummary: {
|
|
758
773
|
margin: "0 10px 10px",
|
|
@@ -775,7 +790,7 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
775
790
|
background: "transparent",
|
|
776
791
|
color: "inherit",
|
|
777
792
|
cursor: "pointer",
|
|
778
|
-
...
|
|
793
|
+
...ke
|
|
779
794
|
},
|
|
780
795
|
issueSummaryHeaderLabel: {
|
|
781
796
|
display: "inline-flex",
|
|
@@ -882,7 +897,7 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
882
897
|
alignItems: "center",
|
|
883
898
|
justifyContent: "space-between",
|
|
884
899
|
padding: "4px 6px 3px",
|
|
885
|
-
...
|
|
900
|
+
...ke
|
|
886
901
|
},
|
|
887
902
|
queryGroupCount: {
|
|
888
903
|
color: "var(--sd-fg-subtle)",
|
|
@@ -945,7 +960,7 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
945
960
|
borderRadius: 3,
|
|
946
961
|
background: "var(--sd-bg-accent)",
|
|
947
962
|
color: "var(--sd-fg-muted)",
|
|
948
|
-
fontFamily:
|
|
963
|
+
fontFamily: W,
|
|
949
964
|
fontSize: 9,
|
|
950
965
|
fontWeight: 600,
|
|
951
966
|
textTransform: "uppercase",
|
|
@@ -1023,7 +1038,7 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1023
1038
|
borderRadius: 3,
|
|
1024
1039
|
background: "var(--sd-bg-accent)",
|
|
1025
1040
|
color: "var(--sd-fg-muted)",
|
|
1026
|
-
fontFamily:
|
|
1041
|
+
fontFamily: W,
|
|
1027
1042
|
fontSize: 10,
|
|
1028
1043
|
fontWeight: 600,
|
|
1029
1044
|
textTransform: "uppercase",
|
|
@@ -1064,7 +1079,7 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1064
1079
|
color: "var(--sd-fg)"
|
|
1065
1080
|
},
|
|
1066
1081
|
sourcePillLabel: {
|
|
1067
|
-
fontFamily:
|
|
1082
|
+
fontFamily: W,
|
|
1068
1083
|
fontSize: 11,
|
|
1069
1084
|
color: "var(--sd-fg)"
|
|
1070
1085
|
},
|
|
@@ -1076,27 +1091,24 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1076
1091
|
borderRadius: 3,
|
|
1077
1092
|
background: "var(--sd-bg-accent)",
|
|
1078
1093
|
color: "var(--sd-fg-subtle)",
|
|
1079
|
-
fontFamily:
|
|
1094
|
+
fontFamily: W,
|
|
1080
1095
|
fontSize: 9,
|
|
1081
1096
|
textTransform: "uppercase",
|
|
1082
1097
|
letterSpacing: "0.06em"
|
|
1083
1098
|
},
|
|
1084
1099
|
fieldChipList: {
|
|
1085
1100
|
display: "grid",
|
|
1086
|
-
gap:
|
|
1087
|
-
paddingTop:
|
|
1101
|
+
gap: 0,
|
|
1102
|
+
paddingTop: 2
|
|
1088
1103
|
},
|
|
1089
1104
|
fieldChip: {
|
|
1090
1105
|
display: "flex",
|
|
1091
1106
|
alignItems: "center",
|
|
1092
1107
|
gap: 8,
|
|
1093
1108
|
minWidth: 0,
|
|
1094
|
-
padding: "6px
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
borderColor: "var(--sd-border)",
|
|
1098
|
-
borderRadius: 5,
|
|
1099
|
-
background: "var(--sd-bg)"
|
|
1109
|
+
padding: "5px 6px",
|
|
1110
|
+
margin: "0 -6px",
|
|
1111
|
+
borderRadius: 4
|
|
1100
1112
|
},
|
|
1101
1113
|
fieldGlyph: {
|
|
1102
1114
|
display: "inline-flex",
|
|
@@ -1108,7 +1120,7 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1108
1120
|
borderWidth: 1,
|
|
1109
1121
|
borderStyle: "solid",
|
|
1110
1122
|
borderRadius: 4,
|
|
1111
|
-
fontFamily:
|
|
1123
|
+
fontFamily: W,
|
|
1112
1124
|
fontSize: 11,
|
|
1113
1125
|
fontWeight: 700,
|
|
1114
1126
|
lineHeight: 1
|
|
@@ -1121,7 +1133,7 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1121
1133
|
borderRadius: 3,
|
|
1122
1134
|
background: "var(--sd-bg-accent)",
|
|
1123
1135
|
color: "var(--sd-fg)",
|
|
1124
|
-
fontFamily:
|
|
1136
|
+
fontFamily: W,
|
|
1125
1137
|
fontSize: 10,
|
|
1126
1138
|
fontWeight: 600,
|
|
1127
1139
|
letterSpacing: "0.04em"
|
|
@@ -1138,7 +1150,7 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1138
1150
|
},
|
|
1139
1151
|
fieldChipMeta: {
|
|
1140
1152
|
flex: "0 0 auto",
|
|
1141
|
-
fontFamily:
|
|
1153
|
+
fontFamily: W,
|
|
1142
1154
|
fontSize: 10,
|
|
1143
1155
|
color: "var(--sd-fg-subtle)"
|
|
1144
1156
|
},
|
|
@@ -1153,15 +1165,37 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1153
1165
|
sqlBindParam: {
|
|
1154
1166
|
color: "var(--sd-sql-bind)"
|
|
1155
1167
|
},
|
|
1156
|
-
|
|
1168
|
+
traceTabs: {
|
|
1157
1169
|
marginTop: 16
|
|
1158
1170
|
},
|
|
1159
|
-
|
|
1171
|
+
traceTabBar: {
|
|
1172
|
+
display: "flex",
|
|
1173
|
+
gap: 2,
|
|
1174
|
+
borderBottom: "1px solid var(--sd-border)",
|
|
1175
|
+
overflowX: "auto",
|
|
1176
|
+
scrollbarWidth: "none"
|
|
1177
|
+
},
|
|
1178
|
+
traceTab: {
|
|
1179
|
+
flex: "0 0 auto",
|
|
1180
|
+
appearance: "none",
|
|
1181
|
+
border: "none",
|
|
1182
|
+
background: "transparent",
|
|
1160
1183
|
cursor: "pointer",
|
|
1161
|
-
|
|
1184
|
+
padding: "6px 9px",
|
|
1185
|
+
marginBottom: -1,
|
|
1186
|
+
fontSize: 10,
|
|
1187
|
+
fontWeight: 600,
|
|
1188
|
+
textTransform: "uppercase",
|
|
1189
|
+
letterSpacing: "0.07em",
|
|
1190
|
+
borderBottom: "2px solid transparent",
|
|
1191
|
+
whiteSpace: "nowrap"
|
|
1192
|
+
},
|
|
1193
|
+
traceTabActive: {
|
|
1194
|
+
color: "var(--sd-fg)",
|
|
1195
|
+
borderBottom: "2px solid var(--sd-fg)"
|
|
1162
1196
|
},
|
|
1163
|
-
|
|
1164
|
-
|
|
1197
|
+
traceTabPanel: {
|
|
1198
|
+
paddingTop: 12
|
|
1165
1199
|
},
|
|
1166
1200
|
alertCard: {
|
|
1167
1201
|
marginTop: 12,
|
|
@@ -1197,7 +1231,7 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1197
1231
|
},
|
|
1198
1232
|
recipe: {
|
|
1199
1233
|
display: "grid",
|
|
1200
|
-
gap:
|
|
1234
|
+
gap: 16
|
|
1201
1235
|
},
|
|
1202
1236
|
traceLineage: {
|
|
1203
1237
|
display: "grid",
|
|
@@ -1212,8 +1246,7 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1212
1246
|
alignItems: "baseline",
|
|
1213
1247
|
justifyContent: "space-between",
|
|
1214
1248
|
gap: 8,
|
|
1215
|
-
paddingBottom:
|
|
1216
|
-
borderBottom: "1px solid var(--sd-border-soft)"
|
|
1249
|
+
paddingBottom: 2
|
|
1217
1250
|
},
|
|
1218
1251
|
recipeGroupTitle: {
|
|
1219
1252
|
color: "var(--sd-fg-muted)",
|
|
@@ -1324,7 +1357,7 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1324
1357
|
textOverflow: "ellipsis",
|
|
1325
1358
|
whiteSpace: "nowrap",
|
|
1326
1359
|
color: "var(--sd-fg-subtle)",
|
|
1327
|
-
fontFamily:
|
|
1360
|
+
fontFamily: W,
|
|
1328
1361
|
fontSize: 10,
|
|
1329
1362
|
fontWeight: 600
|
|
1330
1363
|
},
|
|
@@ -1337,7 +1370,7 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1337
1370
|
borderRadius: 3,
|
|
1338
1371
|
background: "var(--sd-bg-accent)",
|
|
1339
1372
|
color: "var(--sd-fg-muted)",
|
|
1340
|
-
fontFamily:
|
|
1373
|
+
fontFamily: W,
|
|
1341
1374
|
fontSize: 10,
|
|
1342
1375
|
textTransform: "uppercase",
|
|
1343
1376
|
letterSpacing: "0.06em"
|
|
@@ -1444,7 +1477,7 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1444
1477
|
padding: "6px 8px",
|
|
1445
1478
|
borderBottom: "1px solid var(--sd-border-soft)",
|
|
1446
1479
|
color: "var(--sd-fg)",
|
|
1447
|
-
fontFamily:
|
|
1480
|
+
fontFamily: W,
|
|
1448
1481
|
fontSize: 11,
|
|
1449
1482
|
overflow: "hidden",
|
|
1450
1483
|
textOverflow: "ellipsis",
|
|
@@ -1466,7 +1499,7 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1466
1499
|
gap: 5
|
|
1467
1500
|
},
|
|
1468
1501
|
codeBlockLabel: {
|
|
1469
|
-
...
|
|
1502
|
+
...ke
|
|
1470
1503
|
},
|
|
1471
1504
|
codeBlock: {
|
|
1472
1505
|
maxHeight: 260,
|
|
@@ -1477,7 +1510,7 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1477
1510
|
borderRadius: 5,
|
|
1478
1511
|
background: "var(--sd-bg-muted)",
|
|
1479
1512
|
color: "var(--sd-fg)",
|
|
1480
|
-
fontFamily:
|
|
1513
|
+
fontFamily: W,
|
|
1481
1514
|
fontSize: 11,
|
|
1482
1515
|
lineHeight: 1.5,
|
|
1483
1516
|
whiteSpace: "pre-wrap"
|
|
@@ -1499,7 +1532,7 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1499
1532
|
borderStyle: "solid",
|
|
1500
1533
|
borderRadius: 5,
|
|
1501
1534
|
background: "var(--sd-bg)",
|
|
1502
|
-
font: `600 11px/1 ${
|
|
1535
|
+
font: `600 11px/1 ${ye}`,
|
|
1503
1536
|
cursor: "pointer"
|
|
1504
1537
|
},
|
|
1505
1538
|
inspectButtonText: {
|
|
@@ -1507,161 +1540,161 @@ const he = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe
|
|
|
1507
1540
|
textOverflow: "ellipsis",
|
|
1508
1541
|
whiteSpace: "nowrap"
|
|
1509
1542
|
}
|
|
1510
|
-
},
|
|
1543
|
+
}, Ee = 10, Re = 100, Rt = 25, Lt = 500, Ir = {
|
|
1511
1544
|
enabled: !1,
|
|
1512
1545
|
queries: [],
|
|
1513
1546
|
issues: [],
|
|
1514
1547
|
getQuery: () => {
|
|
1515
1548
|
},
|
|
1516
1549
|
getQueries: () => []
|
|
1517
|
-
},
|
|
1550
|
+
}, je = Ie(null), He = Ie(null), Ve = Ie(
|
|
1518
1551
|
void 0
|
|
1519
|
-
),
|
|
1552
|
+
), V = [];
|
|
1520
1553
|
function $t({
|
|
1521
1554
|
debug: e,
|
|
1522
1555
|
children: r
|
|
1523
1556
|
}) {
|
|
1524
|
-
const t = I(() =>
|
|
1557
|
+
const t = I(() => On(e), [e]), [n, i] = Jr(
|
|
1525
1558
|
Cn,
|
|
1526
1559
|
t,
|
|
1527
|
-
|
|
1528
|
-
), o =
|
|
1529
|
-
o.current = n,
|
|
1560
|
+
Rr
|
|
1561
|
+
), o = E(n), u = hr(), [f, d] = F({ open: !1 });
|
|
1562
|
+
o.current = n, B(() => {
|
|
1530
1563
|
i({ type: "config", config: t });
|
|
1531
|
-
}, [t]),
|
|
1564
|
+
}, [t]), B(() => {
|
|
1532
1565
|
if (!n.enabled || !n.exposeWindowBridge || typeof window > "u")
|
|
1533
1566
|
return;
|
|
1534
|
-
const
|
|
1535
|
-
return
|
|
1567
|
+
const h = Dn(() => o.current);
|
|
1568
|
+
return Dt({
|
|
1536
1569
|
ownerId: u,
|
|
1537
|
-
bridge:
|
|
1570
|
+
bridge: h
|
|
1538
1571
|
}), () => {
|
|
1539
|
-
|
|
1572
|
+
Ot(u);
|
|
1540
1573
|
};
|
|
1541
1574
|
}, [u, n.enabled, n.exposeWindowBridge]);
|
|
1542
|
-
const c = I(() => ({ state: n, dispatch: i }), [n]),
|
|
1543
|
-
|
|
1544
|
-
}, []),
|
|
1545
|
-
|
|
1546
|
-
}, []),
|
|
1547
|
-
|
|
1575
|
+
const c = I(() => ({ state: n, dispatch: i }), [n]), y = O((h) => {
|
|
1576
|
+
d({ open: !0, focus: h });
|
|
1577
|
+
}, []), m = O(() => {
|
|
1578
|
+
d((h) => ({ ...h, open: !1 }));
|
|
1579
|
+
}, []), v = O((h) => {
|
|
1580
|
+
d({ open: !0, focus: h });
|
|
1548
1581
|
}, []), g = I(
|
|
1549
1582
|
() => ({
|
|
1550
1583
|
open: f.open,
|
|
1551
1584
|
focus: f.focus,
|
|
1552
|
-
openDevtools:
|
|
1553
|
-
closeDevtools:
|
|
1554
|
-
focusTrace:
|
|
1585
|
+
openDevtools: y,
|
|
1586
|
+
closeDevtools: m,
|
|
1587
|
+
focusTrace: v
|
|
1555
1588
|
}),
|
|
1556
1589
|
[
|
|
1557
|
-
h,
|
|
1558
|
-
S,
|
|
1559
1590
|
m,
|
|
1591
|
+
v,
|
|
1592
|
+
y,
|
|
1560
1593
|
f.focus,
|
|
1561
1594
|
f.open
|
|
1562
1595
|
]
|
|
1563
1596
|
);
|
|
1564
|
-
return /* @__PURE__ */
|
|
1597
|
+
return /* @__PURE__ */ a(je.Provider, { value: c, children: /* @__PURE__ */ a(He.Provider, { value: g, children: r }) });
|
|
1565
1598
|
}
|
|
1566
|
-
function
|
|
1567
|
-
const r =
|
|
1599
|
+
function Dt(e) {
|
|
1600
|
+
const r = V.findIndex(
|
|
1568
1601
|
(t) => t.ownerId === e.ownerId
|
|
1569
1602
|
);
|
|
1570
|
-
r >= 0 &&
|
|
1603
|
+
r >= 0 && V.splice(r, 1), V.push(e), xr();
|
|
1571
1604
|
}
|
|
1572
|
-
function
|
|
1573
|
-
const r =
|
|
1605
|
+
function Ot(e) {
|
|
1606
|
+
const r = V.findIndex(
|
|
1574
1607
|
(t) => t.ownerId === e
|
|
1575
1608
|
);
|
|
1576
|
-
r >= 0 &&
|
|
1609
|
+
r >= 0 && V.splice(r, 1), xr();
|
|
1577
1610
|
}
|
|
1578
|
-
function
|
|
1611
|
+
function xr() {
|
|
1579
1612
|
if (typeof window > "u")
|
|
1580
1613
|
return;
|
|
1581
|
-
const e =
|
|
1614
|
+
const e = V[V.length - 1];
|
|
1582
1615
|
e ? window.__SEMAPHOR_DEVTOOLS__ = e.bridge : delete window.__SEMAPHOR_DEVTOOLS__;
|
|
1583
1616
|
}
|
|
1584
|
-
function
|
|
1617
|
+
function Vi({
|
|
1585
1618
|
id: e,
|
|
1586
1619
|
title: r,
|
|
1587
1620
|
children: t
|
|
1588
1621
|
}) {
|
|
1589
1622
|
const n = I(() => ({ id: e, title: r }), [e, r]);
|
|
1590
|
-
return /* @__PURE__ */
|
|
1623
|
+
return /* @__PURE__ */ a(Ve.Provider, { value: n, children: t });
|
|
1591
1624
|
}
|
|
1592
|
-
function
|
|
1625
|
+
function Bt({
|
|
1593
1626
|
buttonPosition: e = "bottom-right",
|
|
1594
1627
|
initialIsOpen: r = !1,
|
|
1595
1628
|
panelPosition: t = "right",
|
|
1596
1629
|
className: n,
|
|
1597
1630
|
style: i
|
|
1598
1631
|
} = {}) {
|
|
1599
|
-
const o =
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
}, []),
|
|
1632
|
+
const o = qr(), u = Q(He), [f, d] = F(""), [c, y] = F(!1), m = E(null), v = E(null), g = u == null ? void 0 : u.openDevtools, h = u == null ? void 0 : u.closeDevtools, T = (u == null ? void 0 : u.open) === !0;
|
|
1633
|
+
B(() => {
|
|
1634
|
+
wr();
|
|
1635
|
+
}, []), B(() => {
|
|
1603
1636
|
r && o.enabled && (g == null || g());
|
|
1604
|
-
}, [r, o.enabled, g]),
|
|
1605
|
-
if (!
|
|
1637
|
+
}, [r, o.enabled, g]), B(() => {
|
|
1638
|
+
if (!T || !h)
|
|
1606
1639
|
return;
|
|
1607
|
-
const
|
|
1608
|
-
var x,
|
|
1609
|
-
const
|
|
1610
|
-
|
|
1640
|
+
const S = (w) => {
|
|
1641
|
+
var x, D;
|
|
1642
|
+
const L = w.target;
|
|
1643
|
+
L instanceof Node && ((x = m.current) != null && x.contains(L) || (D = v.current) != null && D.contains(L) || h());
|
|
1611
1644
|
};
|
|
1612
|
-
return document.addEventListener("pointerdown",
|
|
1613
|
-
document.removeEventListener("pointerdown",
|
|
1645
|
+
return document.addEventListener("pointerdown", S, !0), document.addEventListener("mousedown", S, !0), document.addEventListener("click", S, !0), () => {
|
|
1646
|
+
document.removeEventListener("pointerdown", S, !0), document.removeEventListener("mousedown", S, !0), document.removeEventListener("click", S, !0);
|
|
1614
1647
|
};
|
|
1615
|
-
}, [
|
|
1616
|
-
const
|
|
1617
|
-
() =>
|
|
1648
|
+
}, [h, T]);
|
|
1649
|
+
const l = I(
|
|
1650
|
+
() => ht(o.queries),
|
|
1618
1651
|
[o.queries]
|
|
1619
|
-
),
|
|
1620
|
-
() =>
|
|
1652
|
+
), b = I(
|
|
1653
|
+
() => Me(o.queries),
|
|
1621
1654
|
[o.queries]
|
|
1622
|
-
),
|
|
1623
|
-
() =>
|
|
1655
|
+
), K = tn(l), A = I(
|
|
1656
|
+
() => nn(o.queries, f),
|
|
1624
1657
|
[o.queries, f]
|
|
1625
|
-
),
|
|
1626
|
-
() =>
|
|
1658
|
+
), N = I(
|
|
1659
|
+
() => on(A),
|
|
1627
1660
|
[A]
|
|
1628
|
-
),
|
|
1629
|
-
() =>
|
|
1661
|
+
), $ = I(
|
|
1662
|
+
() => Tr(A, u == null ? void 0 : u.focus) || A[0],
|
|
1630
1663
|
[A, u == null ? void 0 : u.focus]
|
|
1631
1664
|
);
|
|
1632
|
-
return !o.enabled || !u ? null : /* @__PURE__ */ p(
|
|
1665
|
+
return !o.enabled || !u ? null : /* @__PURE__ */ p(yr, { children: [
|
|
1633
1666
|
/* @__PURE__ */ p(
|
|
1634
1667
|
"button",
|
|
1635
1668
|
{
|
|
1636
|
-
ref:
|
|
1669
|
+
ref: m,
|
|
1637
1670
|
type: "button",
|
|
1638
1671
|
"aria-label": "Open Semaphor Inspector",
|
|
1639
|
-
title:
|
|
1640
|
-
className: n ? `${
|
|
1672
|
+
title: K,
|
|
1673
|
+
className: n ? `${R} ${n}` : R,
|
|
1641
1674
|
style: {
|
|
1642
|
-
...
|
|
1643
|
-
...
|
|
1644
|
-
...
|
|
1675
|
+
...s.launcher,
|
|
1676
|
+
...xt(e),
|
|
1677
|
+
...qt(l.severity),
|
|
1645
1678
|
...i
|
|
1646
1679
|
},
|
|
1647
1680
|
onClick: () => {
|
|
1648
1681
|
var w;
|
|
1649
|
-
const
|
|
1682
|
+
const S = (w = b[0]) == null ? void 0 : w.trace;
|
|
1650
1683
|
u.openDevtools(
|
|
1651
|
-
|
|
1652
|
-
traceId:
|
|
1653
|
-
queryId:
|
|
1654
|
-
viewId:
|
|
1684
|
+
S ? {
|
|
1685
|
+
traceId: S.traceId,
|
|
1686
|
+
queryId: S.queryId,
|
|
1687
|
+
viewId: S.viewId
|
|
1655
1688
|
} : void 0
|
|
1656
1689
|
);
|
|
1657
1690
|
},
|
|
1658
1691
|
children: [
|
|
1659
|
-
/* @__PURE__ */
|
|
1660
|
-
/* @__PURE__ */
|
|
1661
|
-
|
|
1662
|
-
|
|
1692
|
+
/* @__PURE__ */ a(Wt, {}),
|
|
1693
|
+
/* @__PURE__ */ a("span", { style: s.launcherText, children: l.total }),
|
|
1694
|
+
l.issueCount > 0 ? /* @__PURE__ */ p("span", { style: s.launcherIssueCount, children: [
|
|
1695
|
+
l.issueCount,
|
|
1663
1696
|
" issue",
|
|
1664
|
-
|
|
1697
|
+
l.issueCount === 1 ? "" : "s"
|
|
1665
1698
|
] }) : null
|
|
1666
1699
|
]
|
|
1667
1700
|
}
|
|
@@ -1669,80 +1702,80 @@ function Kt({
|
|
|
1669
1702
|
u.open ? /* @__PURE__ */ p(
|
|
1670
1703
|
"div",
|
|
1671
1704
|
{
|
|
1672
|
-
ref:
|
|
1705
|
+
ref: v,
|
|
1673
1706
|
role: "dialog",
|
|
1674
1707
|
"aria-label": "Semaphor Inspector",
|
|
1675
1708
|
"aria-modal": "false",
|
|
1676
|
-
className:
|
|
1709
|
+
className: R,
|
|
1677
1710
|
style: {
|
|
1678
|
-
...
|
|
1679
|
-
...
|
|
1680
|
-
...c ?
|
|
1711
|
+
...s.panel,
|
|
1712
|
+
...Tt(t),
|
|
1713
|
+
...c ? s.panelFullscreen : null
|
|
1681
1714
|
},
|
|
1682
1715
|
children: [
|
|
1683
|
-
/* @__PURE__ */ p("div", { style:
|
|
1684
|
-
/* @__PURE__ */ p("div", { style:
|
|
1685
|
-
/* @__PURE__ */
|
|
1686
|
-
/* @__PURE__ */ p("div", { style:
|
|
1687
|
-
|
|
1716
|
+
/* @__PURE__ */ p("div", { style: s.panelHeader, children: [
|
|
1717
|
+
/* @__PURE__ */ p("div", { style: s.panelTitleBlock, children: [
|
|
1718
|
+
/* @__PURE__ */ a("div", { style: s.panelTitle, children: "Semaphor Inspector" }),
|
|
1719
|
+
/* @__PURE__ */ p("div", { style: s.panelSubtitle, children: [
|
|
1720
|
+
l.total,
|
|
1688
1721
|
" queries · ",
|
|
1689
|
-
|
|
1722
|
+
l.loading,
|
|
1690
1723
|
" loading ·",
|
|
1691
1724
|
" ",
|
|
1692
|
-
|
|
1725
|
+
l.failed,
|
|
1693
1726
|
" failed · ",
|
|
1694
|
-
|
|
1727
|
+
l.errorCount,
|
|
1695
1728
|
" errors ·",
|
|
1696
1729
|
" ",
|
|
1697
|
-
|
|
1730
|
+
l.warningCount,
|
|
1698
1731
|
" warnings"
|
|
1699
1732
|
] })
|
|
1700
1733
|
] }),
|
|
1701
|
-
/* @__PURE__ */ p("div", { style:
|
|
1702
|
-
/* @__PURE__ */
|
|
1734
|
+
/* @__PURE__ */ p("div", { style: s.panelActions, children: [
|
|
1735
|
+
/* @__PURE__ */ a(
|
|
1703
1736
|
"button",
|
|
1704
1737
|
{
|
|
1705
1738
|
type: "button",
|
|
1706
1739
|
"aria-label": c ? "Exit fullscreen Semaphor Inspector" : "Enter fullscreen Semaphor Inspector",
|
|
1707
1740
|
title: c ? "Exit fullscreen Semaphor Inspector" : "Enter fullscreen Semaphor Inspector",
|
|
1708
|
-
style:
|
|
1709
|
-
onClick: () =>
|
|
1710
|
-
children: c ? /* @__PURE__ */
|
|
1741
|
+
style: s.iconButton,
|
|
1742
|
+
onClick: () => y((S) => !S),
|
|
1743
|
+
children: c ? /* @__PURE__ */ a(Zr, { size: 15 }) : /* @__PURE__ */ a(et, { size: 15 })
|
|
1711
1744
|
}
|
|
1712
1745
|
),
|
|
1713
|
-
/* @__PURE__ */
|
|
1746
|
+
/* @__PURE__ */ a(
|
|
1714
1747
|
"button",
|
|
1715
1748
|
{
|
|
1716
1749
|
type: "button",
|
|
1717
1750
|
"aria-label": "Close Semaphor Inspector",
|
|
1718
|
-
style:
|
|
1751
|
+
style: s.iconButton,
|
|
1719
1752
|
onClick: u.closeDevtools,
|
|
1720
|
-
children: /* @__PURE__ */
|
|
1753
|
+
children: /* @__PURE__ */ a(it, { size: 15 })
|
|
1721
1754
|
}
|
|
1722
1755
|
)
|
|
1723
1756
|
] })
|
|
1724
1757
|
] }),
|
|
1725
|
-
/* @__PURE__ */ p("label", { style:
|
|
1726
|
-
/* @__PURE__ */
|
|
1727
|
-
/* @__PURE__ */
|
|
1758
|
+
/* @__PURE__ */ p("label", { style: s.searchBox, children: [
|
|
1759
|
+
/* @__PURE__ */ a(rt, { size: 14 }),
|
|
1760
|
+
/* @__PURE__ */ a(
|
|
1728
1761
|
"input",
|
|
1729
1762
|
{
|
|
1730
1763
|
"aria-label": "Search Semaphor traces",
|
|
1731
1764
|
value: f,
|
|
1732
|
-
onChange: (
|
|
1765
|
+
onChange: (S) => d(S.currentTarget.value),
|
|
1733
1766
|
placeholder: "Search traces",
|
|
1734
|
-
style:
|
|
1767
|
+
style: s.searchInput
|
|
1735
1768
|
}
|
|
1736
1769
|
)
|
|
1737
1770
|
] }),
|
|
1738
|
-
|
|
1739
|
-
|
|
1771
|
+
b.length ? /* @__PURE__ */ a(
|
|
1772
|
+
zt,
|
|
1740
1773
|
{
|
|
1741
|
-
issues:
|
|
1742
|
-
onSelect: (
|
|
1743
|
-
traceId:
|
|
1744
|
-
queryId:
|
|
1745
|
-
viewId:
|
|
1774
|
+
issues: b,
|
|
1775
|
+
onSelect: (S) => u.focusTrace({
|
|
1776
|
+
traceId: S.traceId,
|
|
1777
|
+
queryId: S.queryId,
|
|
1778
|
+
viewId: S.viewId
|
|
1746
1779
|
})
|
|
1747
1780
|
}
|
|
1748
1781
|
) : null,
|
|
@@ -1750,34 +1783,34 @@ function Kt({
|
|
|
1750
1783
|
"div",
|
|
1751
1784
|
{
|
|
1752
1785
|
style: {
|
|
1753
|
-
...
|
|
1754
|
-
...
|
|
1786
|
+
...s.panelBody,
|
|
1787
|
+
...At(t)
|
|
1755
1788
|
},
|
|
1756
1789
|
children: [
|
|
1757
|
-
/* @__PURE__ */
|
|
1790
|
+
/* @__PURE__ */ a(
|
|
1758
1791
|
"div",
|
|
1759
1792
|
{
|
|
1760
1793
|
style: {
|
|
1761
|
-
...
|
|
1762
|
-
...
|
|
1794
|
+
...s.queryList,
|
|
1795
|
+
...Ct()
|
|
1763
1796
|
},
|
|
1764
1797
|
"aria-label": "Registered queries",
|
|
1765
|
-
children: A.length ?
|
|
1766
|
-
/* @__PURE__ */ p("div", { style:
|
|
1767
|
-
/* @__PURE__ */
|
|
1768
|
-
/* @__PURE__ */
|
|
1798
|
+
children: A.length ? N.map((S) => /* @__PURE__ */ p("div", { style: s.queryGroup, children: [
|
|
1799
|
+
/* @__PURE__ */ p("div", { style: s.queryGroupHeader, children: [
|
|
1800
|
+
/* @__PURE__ */ a("span", { children: S.title }),
|
|
1801
|
+
/* @__PURE__ */ a("span", { style: s.queryGroupCount, children: S.traces.length })
|
|
1769
1802
|
] }),
|
|
1770
|
-
|
|
1771
|
-
var
|
|
1772
|
-
const
|
|
1803
|
+
S.traces.length ? S.traces.map((w) => {
|
|
1804
|
+
var ne;
|
|
1805
|
+
const L = an(w, $), x = xe(w), D = kr(w), pe = Er(w), re = ln(w, x, pe), te = re.join(" · "), C = Ar(D), M = yt(b, w);
|
|
1773
1806
|
return /* @__PURE__ */ p(
|
|
1774
1807
|
"button",
|
|
1775
1808
|
{
|
|
1776
1809
|
type: "button",
|
|
1777
|
-
title: `${x} · ${
|
|
1810
|
+
title: `${x} · ${D} · ${te}`,
|
|
1778
1811
|
style: {
|
|
1779
|
-
...
|
|
1780
|
-
...
|
|
1812
|
+
...s.queryListItem,
|
|
1813
|
+
...L ? s.queryListItemSelected : null
|
|
1781
1814
|
},
|
|
1782
1815
|
onClick: () => u.focusTrace({
|
|
1783
1816
|
traceId: w.traceId,
|
|
@@ -1785,42 +1818,42 @@ function Kt({
|
|
|
1785
1818
|
viewId: w.viewId
|
|
1786
1819
|
}),
|
|
1787
1820
|
children: [
|
|
1788
|
-
/* @__PURE__ */ p("span", { style:
|
|
1789
|
-
/* @__PURE__ */
|
|
1790
|
-
/* @__PURE__ */
|
|
1791
|
-
/* @__PURE__ */
|
|
1821
|
+
/* @__PURE__ */ p("span", { style: s.queryListItemHeader, children: [
|
|
1822
|
+
/* @__PURE__ */ a(Ft, { status: (ne = w.latestAttempt) == null ? void 0 : ne.status }),
|
|
1823
|
+
/* @__PURE__ */ a("span", { style: s.queryListTitle, title: x, children: x }),
|
|
1824
|
+
/* @__PURE__ */ a(
|
|
1792
1825
|
"span",
|
|
1793
1826
|
{
|
|
1794
1827
|
style: {
|
|
1795
|
-
...
|
|
1796
|
-
...
|
|
1828
|
+
...s.queryListKindChip,
|
|
1829
|
+
...Cr(C)
|
|
1797
1830
|
},
|
|
1798
|
-
children:
|
|
1831
|
+
children: D
|
|
1799
1832
|
}
|
|
1800
1833
|
),
|
|
1801
|
-
|
|
1834
|
+
M > 0 ? /* @__PURE__ */ a("span", { style: s.queryListIssueBadge, children: M }) : null
|
|
1802
1835
|
] }),
|
|
1803
|
-
/* @__PURE__ */
|
|
1836
|
+
/* @__PURE__ */ a(
|
|
1804
1837
|
"span",
|
|
1805
1838
|
{
|
|
1806
|
-
className: `${
|
|
1807
|
-
style:
|
|
1808
|
-
title:
|
|
1809
|
-
children:
|
|
1810
|
-
|
|
1811
|
-
/* @__PURE__ */
|
|
1812
|
-
] }, `${
|
|
1839
|
+
className: `${R}-source`,
|
|
1840
|
+
style: s.queryListSource,
|
|
1841
|
+
title: te,
|
|
1842
|
+
children: re.map((ie, oe) => /* @__PURE__ */ p(Gr, { children: [
|
|
1843
|
+
oe > 0 ? /* @__PURE__ */ a("span", { style: s.queryListSubtitleSep, children: " · " }) : null,
|
|
1844
|
+
/* @__PURE__ */ a("span", { children: ie })
|
|
1845
|
+
] }, `${ie}:${oe}`))
|
|
1813
1846
|
}
|
|
1814
1847
|
)
|
|
1815
1848
|
]
|
|
1816
1849
|
},
|
|
1817
|
-
|
|
1850
|
+
Ne(w)
|
|
1818
1851
|
);
|
|
1819
|
-
}) : /* @__PURE__ */
|
|
1820
|
-
] },
|
|
1852
|
+
}) : /* @__PURE__ */ a("div", { style: s.queryGroupEmpty, children: "No input traces" })
|
|
1853
|
+
] }, S.title)) : /* @__PURE__ */ a("div", { style: s.emptyState, children: "No matching traces" })
|
|
1821
1854
|
}
|
|
1822
1855
|
),
|
|
1823
|
-
/* @__PURE__ */
|
|
1856
|
+
/* @__PURE__ */ a(_t, { trace: $ })
|
|
1824
1857
|
]
|
|
1825
1858
|
}
|
|
1826
1859
|
)
|
|
@@ -1829,42 +1862,42 @@ function Kt({
|
|
|
1829
1862
|
) : null
|
|
1830
1863
|
] });
|
|
1831
1864
|
}
|
|
1832
|
-
function
|
|
1865
|
+
function Qi({
|
|
1833
1866
|
queryId: e,
|
|
1834
1867
|
viewId: r,
|
|
1835
1868
|
label: t,
|
|
1836
1869
|
className: n,
|
|
1837
1870
|
style: i
|
|
1838
1871
|
} = {}) {
|
|
1839
|
-
var
|
|
1840
|
-
const o =
|
|
1841
|
-
|
|
1842
|
-
|
|
1872
|
+
var m, v;
|
|
1873
|
+
const o = qr(), u = Q(He), f = Q(Ve);
|
|
1874
|
+
B(() => {
|
|
1875
|
+
wr();
|
|
1843
1876
|
}, []);
|
|
1844
|
-
const
|
|
1845
|
-
() =>
|
|
1877
|
+
const d = r || (f == null ? void 0 : f.id), c = I(
|
|
1878
|
+
() => sn(o.queries, {
|
|
1846
1879
|
queryId: e,
|
|
1847
|
-
viewId:
|
|
1880
|
+
viewId: d
|
|
1848
1881
|
}),
|
|
1849
1882
|
[
|
|
1850
1883
|
o.queries,
|
|
1851
1884
|
e,
|
|
1852
|
-
|
|
1885
|
+
d
|
|
1853
1886
|
]
|
|
1854
1887
|
);
|
|
1855
1888
|
if (!o.enabled || !u || !c)
|
|
1856
1889
|
return null;
|
|
1857
|
-
const
|
|
1890
|
+
const y = t || `Inspect ${un(c, !!e)}`;
|
|
1858
1891
|
return /* @__PURE__ */ p(
|
|
1859
1892
|
"button",
|
|
1860
1893
|
{
|
|
1861
1894
|
type: "button",
|
|
1862
|
-
"aria-label":
|
|
1863
|
-
title:
|
|
1864
|
-
className: n ? `${
|
|
1895
|
+
"aria-label": y,
|
|
1896
|
+
title: y,
|
|
1897
|
+
className: n ? `${R} ${n}` : R,
|
|
1865
1898
|
style: {
|
|
1866
|
-
...
|
|
1867
|
-
...
|
|
1899
|
+
...s.inspectButton,
|
|
1900
|
+
...kt((m = c.latestAttempt) == null ? void 0 : m.status),
|
|
1868
1901
|
...i
|
|
1869
1902
|
},
|
|
1870
1903
|
onClick: () => u.openDevtools({
|
|
@@ -1873,17 +1906,17 @@ function Vi({
|
|
|
1873
1906
|
viewId: c.viewId
|
|
1874
1907
|
}),
|
|
1875
1908
|
children: [
|
|
1876
|
-
/* @__PURE__ */
|
|
1877
|
-
/* @__PURE__ */
|
|
1909
|
+
/* @__PURE__ */ a(tt, { size: 13 }),
|
|
1910
|
+
/* @__PURE__ */ a("span", { style: s.inspectButtonText, children: ((v = c.latestAttempt) == null ? void 0 : v.status) || "idle" })
|
|
1878
1911
|
]
|
|
1879
1912
|
}
|
|
1880
1913
|
);
|
|
1881
1914
|
}
|
|
1882
|
-
function
|
|
1883
|
-
const e =
|
|
1884
|
-
return !e || !e.state.enabled ?
|
|
1915
|
+
function qr() {
|
|
1916
|
+
const e = Q(je);
|
|
1917
|
+
return !e || !e.state.enabled ? Ir : le(e.state);
|
|
1885
1918
|
}
|
|
1886
|
-
function
|
|
1919
|
+
function Kt({
|
|
1887
1920
|
spec: e,
|
|
1888
1921
|
queryKind: r,
|
|
1889
1922
|
queryKey: t,
|
|
@@ -1891,167 +1924,167 @@ function Wt({
|
|
|
1891
1924
|
activeInputs: i,
|
|
1892
1925
|
debug: o
|
|
1893
1926
|
}) {
|
|
1894
|
-
const u =
|
|
1927
|
+
const u = Q(je), f = Q(Ve), d = !!(u != null && u.state.enabled), c = u == null ? void 0 : u.dispatch, y = Kn(e), m = pt(e), v = I(
|
|
1895
1928
|
() => JSON.stringify(e),
|
|
1896
1929
|
[e]
|
|
1897
1930
|
), g = I(
|
|
1898
1931
|
() => JSON.stringify(i || []),
|
|
1899
1932
|
[i]
|
|
1900
|
-
),
|
|
1933
|
+
), h = I(
|
|
1901
1934
|
() => JSON.stringify(n || null),
|
|
1902
1935
|
[n]
|
|
1903
|
-
),
|
|
1904
|
-
|
|
1905
|
-
const x =
|
|
1906
|
-
() =>
|
|
1907
|
-
[t,
|
|
1908
|
-
),
|
|
1936
|
+
), T = E(e), l = E(v), b = E(n), K = E(h), A = E(i), N = E(g), $ = Bn(o), S = JSON.stringify($ || []), w = E($), L = E(S);
|
|
1937
|
+
l.current !== v && (l.current = v, T.current = e), K.current !== h && (K.current = h, b.current = n), N.current !== g && (N.current = g, A.current = i), L.current !== S && (L.current = S, w.current = $);
|
|
1938
|
+
const x = T.current, D = b.current, pe = A.current, re = w.current, te = hr(), C = I(
|
|
1939
|
+
() => y || `query_${Dr(t)}`,
|
|
1940
|
+
[t, y]
|
|
1941
|
+
), M = (o == null ? void 0 : o.viewId) || (f == null ? void 0 : f.id), ne = (o == null ? void 0 : o.viewTitle) || (o == null ? void 0 : o.title) || (f == null ? void 0 : f.title), ie = o == null ? void 0 : o.visualType, oe = o == null ? void 0 : o.sectionTitle, j = I(
|
|
1909
1942
|
() => [
|
|
1910
|
-
|
|
1943
|
+
M || "unscoped-view",
|
|
1911
1944
|
C,
|
|
1912
|
-
|
|
1945
|
+
te
|
|
1913
1946
|
].join("::"),
|
|
1914
|
-
[C,
|
|
1915
|
-
),
|
|
1947
|
+
[C, te, M]
|
|
1948
|
+
), Ye = I(
|
|
1916
1949
|
() => ({
|
|
1917
|
-
traceKey:
|
|
1950
|
+
traceKey: j,
|
|
1918
1951
|
spec: x,
|
|
1919
1952
|
queryId: C,
|
|
1920
|
-
queryLabel:
|
|
1953
|
+
queryLabel: m,
|
|
1921
1954
|
queryKind: r,
|
|
1922
|
-
builder:
|
|
1923
|
-
viewId:
|
|
1924
|
-
viewTitle:
|
|
1925
|
-
visualType:
|
|
1926
|
-
sectionTitle:
|
|
1927
|
-
sourceHints:
|
|
1928
|
-
intent:
|
|
1929
|
-
activeInputs:
|
|
1930
|
-
clientWarnings:
|
|
1955
|
+
builder: Wn(r),
|
|
1956
|
+
viewId: M,
|
|
1957
|
+
viewTitle: ne,
|
|
1958
|
+
visualType: ie,
|
|
1959
|
+
sectionTitle: oe,
|
|
1960
|
+
sourceHints: re,
|
|
1961
|
+
intent: D,
|
|
1962
|
+
activeInputs: pe,
|
|
1963
|
+
clientWarnings: y ? [] : ["Query spec is missing an explicit id; using an opaque internal id."]
|
|
1931
1964
|
}),
|
|
1932
1965
|
[
|
|
1933
1966
|
C,
|
|
1934
1967
|
r,
|
|
1968
|
+
y,
|
|
1935
1969
|
m,
|
|
1936
|
-
h,
|
|
1937
1970
|
x,
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
ae,
|
|
1942
|
-
V,
|
|
1943
|
-
H,
|
|
1971
|
+
pe,
|
|
1972
|
+
D,
|
|
1973
|
+
re,
|
|
1944
1974
|
oe,
|
|
1945
|
-
|
|
1975
|
+
j,
|
|
1976
|
+
M,
|
|
1977
|
+
ne,
|
|
1978
|
+
ie
|
|
1946
1979
|
]
|
|
1947
1980
|
);
|
|
1948
|
-
|
|
1949
|
-
if (!(!
|
|
1950
|
-
return c({ type: "register", descriptor:
|
|
1951
|
-
c({ type: "unregister", traceKey:
|
|
1981
|
+
B(() => {
|
|
1982
|
+
if (!(!d || !c))
|
|
1983
|
+
return c({ type: "register", descriptor: Ye }), () => {
|
|
1984
|
+
c({ type: "unregister", traceKey: j });
|
|
1952
1985
|
};
|
|
1953
|
-
}, [
|
|
1954
|
-
const
|
|
1955
|
-
(k,
|
|
1956
|
-
!
|
|
1986
|
+
}, [Ye, c, d, j]);
|
|
1987
|
+
const P = O(
|
|
1988
|
+
(k, U) => {
|
|
1989
|
+
!d || !c || c({ type: "event", traceKey: j, event: k, latestAttempt: U });
|
|
1957
1990
|
},
|
|
1958
|
-
[c,
|
|
1959
|
-
),
|
|
1960
|
-
|
|
1991
|
+
[c, d, j]
|
|
1992
|
+
), Xe = O(() => {
|
|
1993
|
+
P(
|
|
1961
1994
|
{
|
|
1962
1995
|
type: "query_started",
|
|
1963
1996
|
queryId: C,
|
|
1964
|
-
at:
|
|
1997
|
+
at: be()
|
|
1965
1998
|
},
|
|
1966
1999
|
{ status: "loading" }
|
|
1967
2000
|
);
|
|
1968
|
-
}, [
|
|
1969
|
-
(k,
|
|
1970
|
-
const
|
|
1971
|
-
|
|
2001
|
+
}, [P, C]), Ze = O(
|
|
2002
|
+
(k, U) => {
|
|
2003
|
+
const se = cr(k), ae = Hn(k), Nr = Vn(k);
|
|
2004
|
+
P(
|
|
1972
2005
|
{
|
|
1973
2006
|
type: "query_succeeded",
|
|
1974
2007
|
queryId: C,
|
|
1975
|
-
requestId:
|
|
1976
|
-
at:
|
|
1977
|
-
rowCount:
|
|
1978
|
-
durationMs:
|
|
2008
|
+
requestId: se,
|
|
2009
|
+
at: be(),
|
|
2010
|
+
rowCount: ae,
|
|
2011
|
+
durationMs: U
|
|
1979
2012
|
},
|
|
1980
2013
|
{
|
|
1981
|
-
requestId:
|
|
2014
|
+
requestId: se,
|
|
1982
2015
|
status: "success",
|
|
1983
|
-
durationMs:
|
|
1984
|
-
rowCount:
|
|
1985
|
-
columnCount:
|
|
1986
|
-
executionResult:
|
|
2016
|
+
durationMs: U,
|
|
2017
|
+
rowCount: ae,
|
|
2018
|
+
columnCount: Nr,
|
|
2019
|
+
executionResult: ur(k)
|
|
1987
2020
|
}
|
|
1988
2021
|
);
|
|
1989
2022
|
},
|
|
1990
|
-
[
|
|
1991
|
-
),
|
|
1992
|
-
(k,
|
|
1993
|
-
const
|
|
1994
|
-
|
|
2023
|
+
[P, C]
|
|
2024
|
+
), ge = O(
|
|
2025
|
+
(k, U) => {
|
|
2026
|
+
const se = cr(k), ae = k instanceof Error ? k.message : String(k);
|
|
2027
|
+
P(
|
|
1995
2028
|
{
|
|
1996
2029
|
type: "query_failed",
|
|
1997
2030
|
queryId: C,
|
|
1998
|
-
requestId:
|
|
1999
|
-
at:
|
|
2000
|
-
errorMessage:
|
|
2031
|
+
requestId: se,
|
|
2032
|
+
at: be(),
|
|
2033
|
+
errorMessage: ae
|
|
2001
2034
|
},
|
|
2002
2035
|
{
|
|
2003
|
-
requestId:
|
|
2036
|
+
requestId: se,
|
|
2004
2037
|
status: "error",
|
|
2005
|
-
durationMs:
|
|
2006
|
-
errorMessage:
|
|
2007
|
-
executionResult:
|
|
2038
|
+
durationMs: U,
|
|
2039
|
+
errorMessage: ae,
|
|
2040
|
+
executionResult: ur(k)
|
|
2008
2041
|
}
|
|
2009
2042
|
);
|
|
2010
2043
|
},
|
|
2011
|
-
[
|
|
2012
|
-
),
|
|
2044
|
+
[P, C]
|
|
2045
|
+
), er = O(
|
|
2013
2046
|
(k) => {
|
|
2014
|
-
|
|
2047
|
+
P(
|
|
2015
2048
|
{
|
|
2016
2049
|
type: "query_ignored_stale",
|
|
2017
2050
|
queryId: C,
|
|
2018
|
-
at:
|
|
2051
|
+
at: be(),
|
|
2019
2052
|
reason: k
|
|
2020
2053
|
}
|
|
2021
2054
|
);
|
|
2022
2055
|
},
|
|
2023
|
-
[
|
|
2024
|
-
),
|
|
2056
|
+
[P, C]
|
|
2057
|
+
), rr = O(
|
|
2025
2058
|
(k) => {
|
|
2026
|
-
|
|
2059
|
+
ge(k, 0);
|
|
2027
2060
|
},
|
|
2028
|
-
[
|
|
2029
|
-
),
|
|
2061
|
+
[ge]
|
|
2062
|
+
), Ae = d ? u == null ? void 0 : u.state.entries[j] : void 0;
|
|
2030
2063
|
return I(
|
|
2031
2064
|
() => ({
|
|
2032
|
-
enabled:
|
|
2065
|
+
enabled: d,
|
|
2033
2066
|
queryId: C,
|
|
2034
|
-
trace:
|
|
2035
|
-
start:
|
|
2036
|
-
success:
|
|
2037
|
-
failure:
|
|
2038
|
-
ignored:
|
|
2039
|
-
validationFailure:
|
|
2067
|
+
trace: Ae ? ve(Ae) : void 0,
|
|
2068
|
+
start: Xe,
|
|
2069
|
+
success: Ze,
|
|
2070
|
+
failure: ge,
|
|
2071
|
+
ignored: er,
|
|
2072
|
+
validationFailure: rr
|
|
2040
2073
|
}),
|
|
2041
2074
|
[
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2075
|
+
d,
|
|
2076
|
+
ge,
|
|
2077
|
+
er,
|
|
2045
2078
|
C,
|
|
2079
|
+
Xe,
|
|
2046
2080
|
Ze,
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
tr
|
|
2081
|
+
Ae,
|
|
2082
|
+
rr
|
|
2050
2083
|
]
|
|
2051
2084
|
);
|
|
2052
2085
|
}
|
|
2053
|
-
function
|
|
2054
|
-
return /* @__PURE__ */
|
|
2086
|
+
function Wt() {
|
|
2087
|
+
return /* @__PURE__ */ a("span", { style: s.logoMark, "aria-hidden": !0, children: /* @__PURE__ */ p(
|
|
2055
2088
|
"svg",
|
|
2056
2089
|
{
|
|
2057
2090
|
viewBox: "0 0 100 100",
|
|
@@ -2060,277 +2093,332 @@ function _t() {
|
|
|
2060
2093
|
height: "16",
|
|
2061
2094
|
focusable: "false",
|
|
2062
2095
|
children: [
|
|
2063
|
-
/* @__PURE__ */
|
|
2064
|
-
/* @__PURE__ */
|
|
2065
|
-
/* @__PURE__ */
|
|
2066
|
-
/* @__PURE__ */
|
|
2096
|
+
/* @__PURE__ */ a("rect", { x: "20", y: "15", width: "60", height: "12", rx: "6", fill: "currentColor" }),
|
|
2097
|
+
/* @__PURE__ */ a("rect", { x: "20", y: "35", width: "40", height: "12", rx: "6", fill: "currentColor" }),
|
|
2098
|
+
/* @__PURE__ */ a("rect", { x: "40", y: "55", width: "40", height: "12", rx: "6", fill: "currentColor" }),
|
|
2099
|
+
/* @__PURE__ */ a("rect", { x: "20", y: "75", width: "60", height: "12", rx: "6", fill: "currentColor" })
|
|
2067
2100
|
]
|
|
2068
2101
|
}
|
|
2069
2102
|
) });
|
|
2070
2103
|
}
|
|
2071
|
-
function
|
|
2104
|
+
function _t({
|
|
2072
2105
|
trace: e
|
|
2073
2106
|
}) {
|
|
2074
|
-
var
|
|
2107
|
+
var $, S, w, L, x;
|
|
2075
2108
|
if (!e)
|
|
2076
|
-
return /* @__PURE__ */
|
|
2109
|
+
return /* @__PURE__ */ a("div", { style: s.detailsPane, children: /* @__PURE__ */ a("div", { style: s.emptyState, children: "No traces registered yet" }) });
|
|
2077
2110
|
const r = e.latestAttempt, t = r == null ? void 0 : r.executionResult, n = $e(
|
|
2078
|
-
(
|
|
2079
|
-
), i = $e((
|
|
2111
|
+
($ = t == null ? void 0 : t.validation) == null ? void 0 : $.warnings
|
|
2112
|
+
), i = $e((S = t == null ? void 0 : t.validation) == null ? void 0 : S.errors), o = xn(
|
|
2080
2113
|
(w = t == null ? void 0 : t.coverage) == null ? void 0 : w.missingObligations
|
|
2081
2114
|
), u = $e(
|
|
2082
|
-
(
|
|
2083
|
-
), f = t == null ? void 0 : t.compiledQuery,
|
|
2115
|
+
(L = t == null ? void 0 : t.coverage) == null ? void 0 : L.warnings
|
|
2116
|
+
), f = t == null ? void 0 : t.compiledQuery, d = An(t), c = ((x = e.server) == null ? void 0 : x.compiledSql) || d.compiledSql, y = dt(t), m = [
|
|
2084
2117
|
...r != null && r.errorMessage ? [r.errorMessage] : [],
|
|
2085
2118
|
...i
|
|
2086
|
-
],
|
|
2119
|
+
], v = [
|
|
2087
2120
|
...e.clientWarnings,
|
|
2088
2121
|
...n,
|
|
2089
2122
|
...o,
|
|
2090
2123
|
...u
|
|
2091
|
-
], g = e.inputsApplied.length > 0,
|
|
2092
|
-
return /* @__PURE__ */ p("div", { style:
|
|
2093
|
-
/* @__PURE__ */ p("div", { style:
|
|
2094
|
-
/* @__PURE__ */ p("div", { style:
|
|
2095
|
-
/* @__PURE__ */
|
|
2124
|
+
], g = e.inputsApplied.length > 0, h = !!(f || c), T = pn(e), l = hn(r == null ? void 0 : r.rowCount), b = bn(r == null ? void 0 : r.durationMs), K = e.sourceRefs.length, A = kr(e), N = Ar(A);
|
|
2125
|
+
return /* @__PURE__ */ p("div", { style: s.detailsPane, children: [
|
|
2126
|
+
/* @__PURE__ */ p("div", { style: s.detailsHeader, children: [
|
|
2127
|
+
/* @__PURE__ */ p("div", { style: s.detailsHeaderTopRow, children: [
|
|
2128
|
+
/* @__PURE__ */ a(
|
|
2096
2129
|
"span",
|
|
2097
2130
|
{
|
|
2098
2131
|
"aria-hidden": !0,
|
|
2099
2132
|
style: {
|
|
2100
|
-
...
|
|
2101
|
-
...
|
|
2133
|
+
...s.detailsHeaderStatusDot,
|
|
2134
|
+
...Sr(r == null ? void 0 : r.status)
|
|
2102
2135
|
}
|
|
2103
2136
|
}
|
|
2104
2137
|
),
|
|
2105
|
-
/* @__PURE__ */
|
|
2106
|
-
/* @__PURE__ */
|
|
2138
|
+
/* @__PURE__ */ a("span", { style: s.detailsTitle, children: xe(e) }),
|
|
2139
|
+
/* @__PURE__ */ a(
|
|
2107
2140
|
"span",
|
|
2108
2141
|
{
|
|
2109
2142
|
style: {
|
|
2110
|
-
...
|
|
2111
|
-
...
|
|
2143
|
+
...s.detailsKindChip,
|
|
2144
|
+
...Cr(N)
|
|
2112
2145
|
},
|
|
2113
2146
|
children: A
|
|
2114
2147
|
}
|
|
2115
2148
|
)
|
|
2116
2149
|
] }),
|
|
2117
|
-
/* @__PURE__ */ p("div", { style:
|
|
2118
|
-
/* @__PURE__ */
|
|
2119
|
-
/* @__PURE__ */
|
|
2120
|
-
/* @__PURE__ */ p("span", { style:
|
|
2121
|
-
|
|
2150
|
+
/* @__PURE__ */ p("div", { style: s.metaStrip, children: [
|
|
2151
|
+
/* @__PURE__ */ a("span", { style: s.metaStripItem, children: T }),
|
|
2152
|
+
/* @__PURE__ */ a("span", { style: s.metaStripDot, children: "·" }),
|
|
2153
|
+
/* @__PURE__ */ p("span", { style: s.metaStripItem, children: [
|
|
2154
|
+
l,
|
|
2122
2155
|
" rows"
|
|
2123
2156
|
] }),
|
|
2124
|
-
/* @__PURE__ */
|
|
2125
|
-
/* @__PURE__ */
|
|
2126
|
-
|
|
2127
|
-
/* @__PURE__ */
|
|
2128
|
-
/* @__PURE__ */
|
|
2157
|
+
/* @__PURE__ */ a("span", { style: s.metaStripDot, children: "·" }),
|
|
2158
|
+
/* @__PURE__ */ a("span", { style: s.metaStripItem, children: b }),
|
|
2159
|
+
K > 0 ? /* @__PURE__ */ p(yr, { children: [
|
|
2160
|
+
/* @__PURE__ */ a("span", { style: s.metaStripDot, children: "·" }),
|
|
2161
|
+
/* @__PURE__ */ a("span", { style: s.metaStripItem, children: K === 1 ? "1 source" : `${K} sources` })
|
|
2129
2162
|
] }) : null
|
|
2130
2163
|
] })
|
|
2131
2164
|
] }),
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
/* @__PURE__ */
|
|
2135
|
-
/* @__PURE__ */
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
m ? /* @__PURE__ */ s(ee, { title: "Returned Data", defaultOpen: !0, children: /* @__PURE__ */ s(Yt, { preview: m }) }) : null,
|
|
2139
|
-
b ? /* @__PURE__ */ s(ee, { title: "Compiled Query", defaultOpen: !0, children: /* @__PURE__ */ s(
|
|
2140
|
-
Xt,
|
|
2165
|
+
m.length ? /* @__PURE__ */ a(or, { tone: "error", title: "Error", items: m }) : null,
|
|
2166
|
+
v.length ? /* @__PURE__ */ a(or, { tone: "warning", title: "Warnings", items: v }) : null,
|
|
2167
|
+
/* @__PURE__ */ a(Mt, { trace: e }),
|
|
2168
|
+
g ? /* @__PURE__ */ a(Yt, { inputs: e.inputsApplied }) : null,
|
|
2169
|
+
/* @__PURE__ */ a(
|
|
2170
|
+
Nt,
|
|
2141
2171
|
{
|
|
2172
|
+
trace: e,
|
|
2173
|
+
resultPreview: y,
|
|
2142
2174
|
compiledQuery: f,
|
|
2143
|
-
compiledSql: c
|
|
2175
|
+
compiledSql: c,
|
|
2176
|
+
hasCompiled: h
|
|
2144
2177
|
}
|
|
2145
|
-
)
|
|
2146
|
-
|
|
2147
|
-
|
|
2178
|
+
)
|
|
2179
|
+
] });
|
|
2180
|
+
}
|
|
2181
|
+
function Nt({
|
|
2182
|
+
trace: e,
|
|
2183
|
+
resultPreview: r,
|
|
2184
|
+
compiledQuery: t,
|
|
2185
|
+
compiledSql: n,
|
|
2186
|
+
hasCompiled: i
|
|
2187
|
+
}) {
|
|
2188
|
+
var h, T;
|
|
2189
|
+
const o = [];
|
|
2190
|
+
r && o.push({
|
|
2191
|
+
id: "returned",
|
|
2192
|
+
label: "Returned",
|
|
2193
|
+
render: () => /* @__PURE__ */ a(Xt, { preview: r })
|
|
2194
|
+
}), i && o.push({
|
|
2195
|
+
id: "compiled",
|
|
2196
|
+
label: "Compiled",
|
|
2197
|
+
render: () => /* @__PURE__ */ a(
|
|
2198
|
+
Zt,
|
|
2148
2199
|
{
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2200
|
+
compiledQuery: t,
|
|
2201
|
+
compiledSql: n
|
|
2202
|
+
}
|
|
2203
|
+
)
|
|
2204
|
+
}), (e.sourceRefs.length || e.fieldRefs.length) && o.push({
|
|
2205
|
+
id: "lineage",
|
|
2206
|
+
label: "Sources",
|
|
2207
|
+
render: () => /* @__PURE__ */ a(Vt, { trace: e })
|
|
2208
|
+
}), (h = e.sourceHints) != null && h.length && o.push({
|
|
2209
|
+
id: "hints",
|
|
2210
|
+
label: "Hints",
|
|
2211
|
+
render: () => /* @__PURE__ */ a(Qt, { hints: e.sourceHints ?? [] })
|
|
2212
|
+
}), o.push({
|
|
2213
|
+
id: "lifecycle",
|
|
2214
|
+
label: "Lifecycle",
|
|
2215
|
+
render: () => /* @__PURE__ */ a(Pt, { trace: e })
|
|
2216
|
+
}), o.push({
|
|
2217
|
+
id: "raw",
|
|
2218
|
+
label: "Raw",
|
|
2219
|
+
render: () => /* @__PURE__ */ a("pre", { style: s.codeBlock, children: vn(e) })
|
|
2220
|
+
});
|
|
2221
|
+
const u = (T = o[0]) == null ? void 0 : T.id, f = e.traceId || `${e.viewId ?? ""}:${e.queryId}`, [d, c] = F(u), y = E(f), m = E(!1), v = o.map((l) => l.id).join("|");
|
|
2222
|
+
B(() => {
|
|
2223
|
+
if (y.current !== f) {
|
|
2224
|
+
y.current = f, m.current = !1, c(u);
|
|
2225
|
+
return;
|
|
2226
|
+
}
|
|
2227
|
+
if (!(d ? v.split("|").includes(d) : !1)) {
|
|
2228
|
+
m.current = !1, c(u);
|
|
2229
|
+
return;
|
|
2230
|
+
}
|
|
2231
|
+
!m.current && d !== u && c(u);
|
|
2232
|
+
}, [d, u, v, f]);
|
|
2233
|
+
const g = o.find((l) => l.id === d) ?? o[0];
|
|
2234
|
+
return /* @__PURE__ */ p("div", { style: s.traceTabs, children: [
|
|
2235
|
+
/* @__PURE__ */ a("div", { style: s.traceTabBar, role: "tablist", "aria-label": "Trace details", children: o.map((l) => {
|
|
2236
|
+
const b = l.id === g.id;
|
|
2237
|
+
return /* @__PURE__ */ a(
|
|
2238
|
+
"button",
|
|
2239
|
+
{
|
|
2240
|
+
type: "button",
|
|
2241
|
+
role: "tab",
|
|
2242
|
+
"aria-selected": b,
|
|
2243
|
+
className: `${R}-tab`,
|
|
2244
|
+
style: {
|
|
2245
|
+
...s.traceTab,
|
|
2246
|
+
...b ? s.traceTabActive : null
|
|
2247
|
+
},
|
|
2248
|
+
onClick: () => {
|
|
2249
|
+
m.current = !0, c(l.id);
|
|
2250
|
+
},
|
|
2251
|
+
children: l.label
|
|
2252
|
+
},
|
|
2253
|
+
l.id
|
|
2254
|
+
);
|
|
2255
|
+
}) }),
|
|
2256
|
+
/* @__PURE__ */ a("div", { style: s.traceTabPanel, role: "tabpanel", children: g.render() })
|
|
2158
2257
|
] });
|
|
2159
2258
|
}
|
|
2160
|
-
function
|
|
2259
|
+
function Pt({
|
|
2260
|
+
trace: e
|
|
2261
|
+
}) {
|
|
2262
|
+
return e.recentEvents.length ? /* @__PURE__ */ a("div", { style: s.eventList, children: e.recentEvents.slice(-5).map((r, t) => /* @__PURE__ */ p("div", { style: s.eventRow, children: [
|
|
2263
|
+
/* @__PURE__ */ a("span", { style: s.eventType, children: Sn(r) }),
|
|
2264
|
+
/* @__PURE__ */ a("span", { style: s.eventMeta, children: wn(r) })
|
|
2265
|
+
] }, `${r.type}:${r.at}:${t}`)) }) : /* @__PURE__ */ a("div", { style: s.mutedText, children: "No attempts recorded" });
|
|
2266
|
+
}
|
|
2267
|
+
function or({
|
|
2161
2268
|
tone: e,
|
|
2162
2269
|
title: r,
|
|
2163
2270
|
items: t
|
|
2164
2271
|
}) {
|
|
2165
|
-
const n = e === "error" ?
|
|
2166
|
-
return /* @__PURE__ */ p("div", { style: { ...
|
|
2167
|
-
/* @__PURE__ */
|
|
2168
|
-
t.length > 1 ? /* @__PURE__ */
|
|
2272
|
+
const n = e === "error" ? s.alertCardError : s.alertCardWarning;
|
|
2273
|
+
return /* @__PURE__ */ p("div", { style: { ...s.alertCard, ...n }, children: [
|
|
2274
|
+
/* @__PURE__ */ a("div", { style: s.alertCardTitle, children: r }),
|
|
2275
|
+
t.length > 1 ? /* @__PURE__ */ a("ul", { style: s.alertCardList, children: t.map((i, o) => /* @__PURE__ */ a("li", { children: i }, `${e}-${o}`)) }) : /* @__PURE__ */ a("div", { children: t[0] })
|
|
2169
2276
|
] });
|
|
2170
2277
|
}
|
|
2171
|
-
function
|
|
2278
|
+
function zt({
|
|
2172
2279
|
issues: e,
|
|
2173
2280
|
onSelect: r
|
|
2174
2281
|
}) {
|
|
2175
|
-
const [t, n] =
|
|
2282
|
+
const [t, n] = F(!1), i = e.slice(0, 6), o = e.length - i.length, u = e.filter((c) => c.tone === "error").length, f = e.length - u, d = [
|
|
2176
2283
|
u ? `${u} error${u === 1 ? "" : "s"}` : "",
|
|
2177
2284
|
f ? `${f} warning${f === 1 ? "" : "s"}` : ""
|
|
2178
2285
|
].filter(Boolean);
|
|
2179
|
-
return /* @__PURE__ */ p("section", { style:
|
|
2286
|
+
return /* @__PURE__ */ p("section", { style: s.issueSummary, "aria-label": "Semaphor trace issues", children: [
|
|
2180
2287
|
/* @__PURE__ */ p(
|
|
2181
2288
|
"button",
|
|
2182
2289
|
{
|
|
2183
2290
|
type: "button",
|
|
2184
2291
|
"aria-expanded": t,
|
|
2185
|
-
style:
|
|
2292
|
+
style: s.issueSummaryToggle,
|
|
2186
2293
|
onClick: () => n((c) => !c),
|
|
2187
2294
|
children: [
|
|
2188
|
-
/* @__PURE__ */ p("span", { style:
|
|
2189
|
-
t ? /* @__PURE__ */
|
|
2190
|
-
/* @__PURE__ */
|
|
2295
|
+
/* @__PURE__ */ p("span", { style: s.issueSummaryHeaderLabel, children: [
|
|
2296
|
+
t ? /* @__PURE__ */ a(ot, { size: 13 }) : /* @__PURE__ */ a(nt, { size: 13 }),
|
|
2297
|
+
/* @__PURE__ */ a("span", { children: "Issues" })
|
|
2191
2298
|
] }),
|
|
2192
|
-
/* @__PURE__ */
|
|
2299
|
+
/* @__PURE__ */ a("span", { style: s.issueSummaryCount, children: e.length })
|
|
2193
2300
|
]
|
|
2194
2301
|
}
|
|
2195
2302
|
),
|
|
2196
|
-
t ? /* @__PURE__ */ p("div", { style:
|
|
2197
|
-
i.map((c,
|
|
2303
|
+
t ? /* @__PURE__ */ p("div", { style: s.issueSummaryList, children: [
|
|
2304
|
+
i.map((c, y) => /* @__PURE__ */ p(
|
|
2198
2305
|
"button",
|
|
2199
2306
|
{
|
|
2200
2307
|
type: "button",
|
|
2201
2308
|
title: `${c.title}: ${c.message}`,
|
|
2202
|
-
style:
|
|
2309
|
+
style: s.issueSummaryItem,
|
|
2203
2310
|
onClick: () => r(c.trace),
|
|
2204
2311
|
children: [
|
|
2205
|
-
/* @__PURE__ */
|
|
2312
|
+
/* @__PURE__ */ a(
|
|
2206
2313
|
"span",
|
|
2207
2314
|
{
|
|
2208
2315
|
style: {
|
|
2209
|
-
...
|
|
2210
|
-
...c.tone === "error" ?
|
|
2316
|
+
...s.issueSummaryBadge,
|
|
2317
|
+
...c.tone === "error" ? s.issueSummaryBadgeError : s.issueSummaryBadgeWarning
|
|
2211
2318
|
},
|
|
2212
2319
|
children: c.tone === "error" ? "Error" : "Warning"
|
|
2213
2320
|
}
|
|
2214
2321
|
),
|
|
2215
|
-
/* @__PURE__ */ p("span", { style:
|
|
2216
|
-
/* @__PURE__ */
|
|
2217
|
-
/* @__PURE__ */
|
|
2322
|
+
/* @__PURE__ */ p("span", { style: s.issueSummaryText, children: [
|
|
2323
|
+
/* @__PURE__ */ a("span", { style: s.issueSummaryTitle, children: c.title }),
|
|
2324
|
+
/* @__PURE__ */ a("span", { style: s.issueSummaryMessage, children: c.message })
|
|
2218
2325
|
] })
|
|
2219
2326
|
]
|
|
2220
2327
|
},
|
|
2221
|
-
`${c.trace.traceId}:${c.title}:${
|
|
2328
|
+
`${c.trace.traceId}:${c.title}:${y}`
|
|
2222
2329
|
)),
|
|
2223
|
-
o > 0 ? /* @__PURE__ */ p("div", { style:
|
|
2330
|
+
o > 0 ? /* @__PURE__ */ p("div", { style: s.issueSummaryMore, children: [
|
|
2224
2331
|
o,
|
|
2225
2332
|
" more issue",
|
|
2226
2333
|
o === 1 ? "" : "s",
|
|
2227
2334
|
" in traces"
|
|
2228
2335
|
] }) : null
|
|
2229
|
-
] }) : /* @__PURE__ */ p("div", { style:
|
|
2230
|
-
|
|
2336
|
+
] }) : /* @__PURE__ */ p("div", { style: s.issueSummaryCollapsed, children: [
|
|
2337
|
+
d.join(" · "),
|
|
2231
2338
|
" across traces"
|
|
2232
2339
|
] })
|
|
2233
2340
|
] });
|
|
2234
2341
|
}
|
|
2235
|
-
function
|
|
2342
|
+
function Ft({
|
|
2236
2343
|
status: e
|
|
2237
2344
|
}) {
|
|
2238
|
-
return /* @__PURE__ */
|
|
2345
|
+
return /* @__PURE__ */ a(
|
|
2239
2346
|
"span",
|
|
2240
2347
|
{
|
|
2241
2348
|
"aria-hidden": !0,
|
|
2242
2349
|
style: {
|
|
2243
|
-
...
|
|
2244
|
-
...
|
|
2350
|
+
...s.statusDot,
|
|
2351
|
+
...Sr(e)
|
|
2245
2352
|
}
|
|
2246
2353
|
}
|
|
2247
2354
|
);
|
|
2248
2355
|
}
|
|
2249
|
-
function
|
|
2250
|
-
title: e,
|
|
2251
|
-
children: r,
|
|
2252
|
-
defaultOpen: t = !1
|
|
2253
|
-
}) {
|
|
2254
|
-
const [n, i] = M(t);
|
|
2255
|
-
return /* @__PURE__ */ p(
|
|
2256
|
-
"details",
|
|
2257
|
-
{
|
|
2258
|
-
style: a.disclosure,
|
|
2259
|
-
open: n,
|
|
2260
|
-
onToggle: (o) => i(o.currentTarget.open),
|
|
2261
|
-
children: [
|
|
2262
|
-
/* @__PURE__ */ s("summary", { style: a.disclosureSummary, children: e }),
|
|
2263
|
-
/* @__PURE__ */ s("div", { style: a.disclosureBody, children: r })
|
|
2264
|
-
]
|
|
2265
|
-
}
|
|
2266
|
-
);
|
|
2267
|
-
}
|
|
2268
|
-
function Ft({
|
|
2356
|
+
function Mt({
|
|
2269
2357
|
trace: e
|
|
2270
2358
|
}) {
|
|
2271
2359
|
var i;
|
|
2272
|
-
const r = (i = e.projectionFieldRefs) != null && i.length ? e.projectionFieldRefs : e.fieldRefs, t = e.inputFieldRefs || [], n =
|
|
2273
|
-
return /* @__PURE__ */ p("div", { style:
|
|
2274
|
-
/* @__PURE__ */
|
|
2275
|
-
/* @__PURE__ */
|
|
2276
|
-
/* @__PURE__ */
|
|
2277
|
-
/* @__PURE__ */
|
|
2278
|
-
|
|
2360
|
+
const r = (i = e.projectionFieldRefs) != null && i.length ? e.projectionFieldRefs : e.fieldRefs, t = e.inputFieldRefs || [], n = fn(r);
|
|
2361
|
+
return /* @__PURE__ */ p("div", { style: s.recipe, children: [
|
|
2362
|
+
/* @__PURE__ */ a(jt, { sources: e.sourceRefs }),
|
|
2363
|
+
/* @__PURE__ */ a(H, { title: "Measures", fields: n.measures }),
|
|
2364
|
+
/* @__PURE__ */ a(H, { title: "Time fields", fields: n.timeFields }),
|
|
2365
|
+
/* @__PURE__ */ a(
|
|
2366
|
+
H,
|
|
2279
2367
|
{
|
|
2280
2368
|
title: "Dimensions",
|
|
2281
2369
|
fields: n.dimensions,
|
|
2282
2370
|
emptyText: "No dimensions selected"
|
|
2283
2371
|
}
|
|
2284
2372
|
),
|
|
2285
|
-
/* @__PURE__ */
|
|
2286
|
-
/* @__PURE__ */
|
|
2287
|
-
/* @__PURE__ */
|
|
2373
|
+
/* @__PURE__ */ a(H, { title: "Identifiers", fields: n.identifiers }),
|
|
2374
|
+
/* @__PURE__ */ a(H, { title: "Other fields", fields: n.other }),
|
|
2375
|
+
/* @__PURE__ */ a(H, { title: "Input bindings", fields: t })
|
|
2288
2376
|
] });
|
|
2289
2377
|
}
|
|
2290
|
-
function
|
|
2378
|
+
function jt({
|
|
2291
2379
|
sources: e
|
|
2292
2380
|
}) {
|
|
2293
|
-
return e.length ? /* @__PURE__ */ p("div", { style:
|
|
2294
|
-
/* @__PURE__ */ p("div", { style:
|
|
2295
|
-
/* @__PURE__ */
|
|
2296
|
-
/* @__PURE__ */
|
|
2381
|
+
return e.length ? /* @__PURE__ */ p("div", { style: s.recipeGroup, children: [
|
|
2382
|
+
/* @__PURE__ */ p("div", { style: s.recipeGroupHeader, children: [
|
|
2383
|
+
/* @__PURE__ */ a("span", { style: s.recipeGroupTitle, children: "From" }),
|
|
2384
|
+
/* @__PURE__ */ a("span", { style: s.recipeGroupCount, children: e.length })
|
|
2297
2385
|
] }),
|
|
2298
|
-
/* @__PURE__ */
|
|
2299
|
-
|
|
2386
|
+
/* @__PURE__ */ a("div", { style: s.sourcePillRow, children: e.map((r, t) => /* @__PURE__ */ a(
|
|
2387
|
+
Ht,
|
|
2300
2388
|
{
|
|
2301
2389
|
source: r
|
|
2302
2390
|
},
|
|
2303
|
-
`${
|
|
2391
|
+
`${z(r)}:${t}`
|
|
2304
2392
|
)) })
|
|
2305
2393
|
] }) : null;
|
|
2306
2394
|
}
|
|
2307
|
-
function
|
|
2308
|
-
const r =
|
|
2309
|
-
return /* @__PURE__ */ p("span", { style:
|
|
2310
|
-
/* @__PURE__ */
|
|
2311
|
-
/* @__PURE__ */
|
|
2395
|
+
function Ht({ source: e }) {
|
|
2396
|
+
const r = z(e);
|
|
2397
|
+
return /* @__PURE__ */ p("span", { style: s.sourcePill, title: r, children: [
|
|
2398
|
+
/* @__PURE__ */ a("span", { style: s.sourcePillLabel, children: r }),
|
|
2399
|
+
/* @__PURE__ */ a("span", { style: s.sourcePillRole, children: e.kind })
|
|
2312
2400
|
] });
|
|
2313
2401
|
}
|
|
2314
|
-
function
|
|
2402
|
+
function Vt({
|
|
2315
2403
|
trace: e
|
|
2316
2404
|
}) {
|
|
2317
|
-
return
|
|
2318
|
-
/* @__PURE__ */
|
|
2319
|
-
/* @__PURE__ */
|
|
2320
|
-
|
|
2405
|
+
return /* @__PURE__ */ p("div", { style: s.traceLineage, children: [
|
|
2406
|
+
/* @__PURE__ */ a(Ut, { sources: e.sourceRefs }),
|
|
2407
|
+
/* @__PURE__ */ a(
|
|
2408
|
+
H,
|
|
2321
2409
|
{
|
|
2322
2410
|
title: "All field refs",
|
|
2323
2411
|
fields: e.fieldRefs,
|
|
2324
2412
|
emptyText: "No field refs captured"
|
|
2325
2413
|
}
|
|
2326
2414
|
)
|
|
2327
|
-
] })
|
|
2415
|
+
] });
|
|
2328
2416
|
}
|
|
2329
|
-
function
|
|
2417
|
+
function Qt({
|
|
2330
2418
|
hints: e
|
|
2331
2419
|
}) {
|
|
2332
|
-
return /* @__PURE__ */
|
|
2333
|
-
const n =
|
|
2420
|
+
return /* @__PURE__ */ a("div", { style: s.recipeFieldList, children: e.map((r, t) => {
|
|
2421
|
+
const n = yn(r), i = r.component || r.exportName || n || "Source hint", o = [
|
|
2334
2422
|
r.exportName && r.exportName !== i ? r.exportName : void 0,
|
|
2335
2423
|
n,
|
|
2336
2424
|
r.note
|
|
@@ -2338,74 +2426,82 @@ function Vt({
|
|
|
2338
2426
|
return /* @__PURE__ */ p(
|
|
2339
2427
|
"div",
|
|
2340
2428
|
{
|
|
2341
|
-
style:
|
|
2429
|
+
style: s.recipeFieldRow,
|
|
2342
2430
|
title: o || i,
|
|
2343
2431
|
children: [
|
|
2344
|
-
/* @__PURE__ */
|
|
2345
|
-
o ? /* @__PURE__ */
|
|
2432
|
+
/* @__PURE__ */ a("span", { style: s.recipeFieldName, children: i }),
|
|
2433
|
+
o ? /* @__PURE__ */ a("span", { style: s.recipeFieldMeta, children: o }) : null
|
|
2346
2434
|
]
|
|
2347
2435
|
},
|
|
2348
2436
|
`${i}:${n}:${t}`
|
|
2349
2437
|
);
|
|
2350
|
-
}) })
|
|
2438
|
+
}) });
|
|
2351
2439
|
}
|
|
2352
|
-
function
|
|
2440
|
+
function Ut({
|
|
2353
2441
|
sources: e
|
|
2354
2442
|
}) {
|
|
2355
|
-
return /* @__PURE__ */ p("div", { style:
|
|
2356
|
-
/* @__PURE__ */ p("div", { style:
|
|
2357
|
-
/* @__PURE__ */
|
|
2358
|
-
/* @__PURE__ */
|
|
2443
|
+
return /* @__PURE__ */ p("div", { style: s.recipeGroup, children: [
|
|
2444
|
+
/* @__PURE__ */ p("div", { style: s.recipeGroupHeader, children: [
|
|
2445
|
+
/* @__PURE__ */ a("span", { style: s.recipeGroupTitle, children: "Sources" }),
|
|
2446
|
+
/* @__PURE__ */ a("span", { style: s.recipeGroupCount, children: e.length })
|
|
2359
2447
|
] }),
|
|
2360
|
-
e.length ? /* @__PURE__ */
|
|
2448
|
+
e.length ? /* @__PURE__ */ a("div", { style: s.recipeFieldList, children: e.map((r, t) => /* @__PURE__ */ p(
|
|
2361
2449
|
"div",
|
|
2362
2450
|
{
|
|
2363
|
-
style:
|
|
2364
|
-
title:
|
|
2451
|
+
style: s.recipeFieldRow,
|
|
2452
|
+
title: z(r),
|
|
2365
2453
|
children: [
|
|
2366
|
-
/* @__PURE__ */
|
|
2367
|
-
/* @__PURE__ */
|
|
2454
|
+
/* @__PURE__ */ a("span", { style: s.recipeFieldName, children: z(r) }),
|
|
2455
|
+
/* @__PURE__ */ a("span", { style: s.recipeFieldMeta, children: r.kind })
|
|
2368
2456
|
]
|
|
2369
2457
|
},
|
|
2370
|
-
`${
|
|
2371
|
-
)) }) : /* @__PURE__ */
|
|
2458
|
+
`${z(r)}:${t}`
|
|
2459
|
+
)) }) : /* @__PURE__ */ a("div", { style: s.recipeEmptyText, children: "No sources captured" })
|
|
2372
2460
|
] });
|
|
2373
2461
|
}
|
|
2374
|
-
function
|
|
2462
|
+
function H({
|
|
2375
2463
|
title: e,
|
|
2376
2464
|
fields: r,
|
|
2377
2465
|
emptyText: t
|
|
2378
2466
|
}) {
|
|
2379
|
-
return !r.length && !t ? null : /* @__PURE__ */ p("div", { style:
|
|
2380
|
-
/* @__PURE__ */ p("div", { style:
|
|
2381
|
-
/* @__PURE__ */
|
|
2382
|
-
/* @__PURE__ */
|
|
2467
|
+
return !r.length && !t ? null : /* @__PURE__ */ p("div", { style: s.recipeGroup, children: [
|
|
2468
|
+
/* @__PURE__ */ p("div", { style: s.recipeGroupHeader, children: [
|
|
2469
|
+
/* @__PURE__ */ a("span", { style: s.recipeGroupTitle, children: e }),
|
|
2470
|
+
/* @__PURE__ */ a("span", { style: s.recipeGroupCount, children: r.length })
|
|
2383
2471
|
] }),
|
|
2384
|
-
r.length ? /* @__PURE__ */
|
|
2385
|
-
|
|
2472
|
+
r.length ? /* @__PURE__ */ a("div", { style: s.fieldChipList, children: r.map((n, i) => /* @__PURE__ */ a(
|
|
2473
|
+
Gt,
|
|
2386
2474
|
{
|
|
2387
2475
|
field: n,
|
|
2388
2476
|
groupTitle: e
|
|
2389
2477
|
},
|
|
2390
|
-
`${
|
|
2391
|
-
)) }) : /* @__PURE__ */
|
|
2478
|
+
`${Qe(n)}:${i}`
|
|
2479
|
+
)) }) : /* @__PURE__ */ a("div", { style: s.recipeEmptyText, children: t })
|
|
2392
2480
|
] });
|
|
2393
2481
|
}
|
|
2394
|
-
function
|
|
2482
|
+
function Gt({
|
|
2395
2483
|
field: e,
|
|
2396
2484
|
groupTitle: r
|
|
2397
2485
|
}) {
|
|
2398
|
-
const t =
|
|
2399
|
-
return /* @__PURE__ */ p(
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2486
|
+
const t = gn(e), n = e.label || e.name, i = e.dataType && e.dataType !== "unknown" ? e.dataType : void 0, o = e.source ? z(e.source) : void 0, u = [t, i, o].filter(Boolean).join(" · "), f = Jt(e, r);
|
|
2487
|
+
return /* @__PURE__ */ p(
|
|
2488
|
+
"div",
|
|
2489
|
+
{
|
|
2490
|
+
className: `${R}-field-row`,
|
|
2491
|
+
style: s.fieldChip,
|
|
2492
|
+
title: u,
|
|
2493
|
+
children: [
|
|
2494
|
+
/* @__PURE__ */ a("span", { style: { ...s.fieldGlyph, ...f.style }, children: f.text }),
|
|
2495
|
+
e.aggregate ? /* @__PURE__ */ a("span", { style: s.fieldAggBadge, children: e.aggregate }) : null,
|
|
2496
|
+
/* @__PURE__ */ a("span", { style: s.fieldChipName, children: n }),
|
|
2497
|
+
i ? /* @__PURE__ */ a("span", { style: s.fieldChipMeta, children: i }) : null,
|
|
2498
|
+
i && o ? /* @__PURE__ */ a("span", { style: s.fieldChipMetaDot, children: "·" }) : null,
|
|
2499
|
+
o ? /* @__PURE__ */ a("span", { style: s.fieldChipMeta, children: o }) : null
|
|
2500
|
+
]
|
|
2501
|
+
}
|
|
2502
|
+
);
|
|
2407
2503
|
}
|
|
2408
|
-
function
|
|
2504
|
+
function Jt(e, r) {
|
|
2409
2505
|
const t = e.dataType, n = e.role;
|
|
2410
2506
|
return !!e.aggregate || n === "measure" || r === "Measures" ? {
|
|
2411
2507
|
text: "Σ",
|
|
@@ -2444,29 +2540,29 @@ function Gt(e, r) {
|
|
|
2444
2540
|
}
|
|
2445
2541
|
};
|
|
2446
2542
|
}
|
|
2447
|
-
function
|
|
2543
|
+
function Yt({
|
|
2448
2544
|
inputs: e
|
|
2449
2545
|
}) {
|
|
2450
|
-
return /* @__PURE__ */ p("div", { style:
|
|
2451
|
-
/* @__PURE__ */ p("div", { style:
|
|
2452
|
-
/* @__PURE__ */
|
|
2453
|
-
/* @__PURE__ */
|
|
2546
|
+
return /* @__PURE__ */ p("div", { style: s.inputsAppliedBlock, children: [
|
|
2547
|
+
/* @__PURE__ */ p("div", { style: s.inputsAppliedHeader, children: [
|
|
2548
|
+
/* @__PURE__ */ a("span", { style: s.inputsAppliedTitle, children: "Active Inputs" }),
|
|
2549
|
+
/* @__PURE__ */ a("span", { style: s.inputsAppliedCount, children: e.length })
|
|
2454
2550
|
] }),
|
|
2455
|
-
/* @__PURE__ */
|
|
2456
|
-
const t =
|
|
2551
|
+
/* @__PURE__ */ a("div", { style: s.inputRecipeList, children: e.map((r) => {
|
|
2552
|
+
const t = mn(r);
|
|
2457
2553
|
return /* @__PURE__ */ p(
|
|
2458
2554
|
"div",
|
|
2459
2555
|
{
|
|
2460
|
-
style:
|
|
2556
|
+
style: s.inputRecipeRow,
|
|
2461
2557
|
title: t.title,
|
|
2462
2558
|
children: [
|
|
2463
|
-
/* @__PURE__ */ p("div", { style:
|
|
2464
|
-
/* @__PURE__ */
|
|
2465
|
-
t.showId ? /* @__PURE__ */
|
|
2466
|
-
t.operator ? /* @__PURE__ */
|
|
2467
|
-
/* @__PURE__ */
|
|
2559
|
+
/* @__PURE__ */ p("div", { style: s.inputRecipeHeader, children: [
|
|
2560
|
+
/* @__PURE__ */ a("span", { style: s.inputRecipeLabel, title: t.title, children: t.label }),
|
|
2561
|
+
t.showId ? /* @__PURE__ */ a("span", { style: s.inputRecipeId, title: r.inputId, children: r.inputId }) : null,
|
|
2562
|
+
t.operator ? /* @__PURE__ */ a("span", { style: s.inputOperatorBadge, children: t.operator }) : null,
|
|
2563
|
+
/* @__PURE__ */ a("span", { style: s.inputValuePreview, title: t.value, children: t.value })
|
|
2468
2564
|
] }),
|
|
2469
|
-
t.binding ? /* @__PURE__ */
|
|
2565
|
+
t.binding ? /* @__PURE__ */ a("div", { style: s.inputRecipeBinding, title: t.binding, children: t.binding }) : null
|
|
2470
2566
|
]
|
|
2471
2567
|
},
|
|
2472
2568
|
r.inputId
|
|
@@ -2474,70 +2570,70 @@ function Jt({
|
|
|
2474
2570
|
}) })
|
|
2475
2571
|
] });
|
|
2476
2572
|
}
|
|
2477
|
-
function
|
|
2573
|
+
function Xt({
|
|
2478
2574
|
preview: e
|
|
2479
2575
|
}) {
|
|
2480
|
-
return /* @__PURE__ */ p("div", { style:
|
|
2481
|
-
/* @__PURE__ */ p("div", { style:
|
|
2482
|
-
/* @__PURE__ */
|
|
2483
|
-
/* @__PURE__ */
|
|
2576
|
+
return /* @__PURE__ */ p("div", { style: s.resultPreview, children: [
|
|
2577
|
+
/* @__PURE__ */ p("div", { style: s.resultPreviewHeader, children: [
|
|
2578
|
+
/* @__PURE__ */ a("span", { style: s.resultPreviewTitle, children: e.title }),
|
|
2579
|
+
/* @__PURE__ */ a("span", { style: s.resultPreviewSummary, children: e.summary })
|
|
2484
2580
|
] }),
|
|
2485
|
-
/* @__PURE__ */
|
|
2486
|
-
/* @__PURE__ */
|
|
2487
|
-
/* @__PURE__ */
|
|
2581
|
+
/* @__PURE__ */ a("div", { style: s.resultPreviewScroller, children: /* @__PURE__ */ p("table", { style: s.resultPreviewTable, children: [
|
|
2582
|
+
/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ a("tr", { children: e.columns.map((r) => /* @__PURE__ */ a("th", { style: s.resultPreviewTh, children: r.label }, r.key)) }) }),
|
|
2583
|
+
/* @__PURE__ */ a("tbody", { children: e.rows.length ? e.rows.map((r, t) => /* @__PURE__ */ a("tr", { children: e.columns.map((n) => /* @__PURE__ */ a("td", { style: s.resultPreviewTd, children: ct(r[n.key]) }, n.key)) }, t)) : /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a(
|
|
2488
2584
|
"td",
|
|
2489
2585
|
{
|
|
2490
2586
|
colSpan: e.columns.length,
|
|
2491
|
-
style:
|
|
2587
|
+
style: s.resultPreviewEmptyCell,
|
|
2492
2588
|
children: "No rows returned"
|
|
2493
2589
|
}
|
|
2494
2590
|
) }) })
|
|
2495
2591
|
] }) }),
|
|
2496
|
-
e.truncatedRows || e.truncatedColumns ? /* @__PURE__ */ p("div", { style:
|
|
2592
|
+
e.truncatedRows || e.truncatedColumns ? /* @__PURE__ */ p("div", { style: s.resultPreviewFootnote, children: [
|
|
2497
2593
|
"Showing first ",
|
|
2498
|
-
|
|
2594
|
+
ce,
|
|
2499
2595
|
" rows and first",
|
|
2500
2596
|
" ",
|
|
2501
|
-
|
|
2597
|
+
_e,
|
|
2502
2598
|
" columns."
|
|
2503
2599
|
] }) : null
|
|
2504
2600
|
] });
|
|
2505
2601
|
}
|
|
2506
|
-
function
|
|
2602
|
+
function Zt({
|
|
2507
2603
|
compiledQuery: e,
|
|
2508
2604
|
compiledSql: r
|
|
2509
2605
|
}) {
|
|
2510
|
-
return (e == null ? void 0 : e.kind) === "sql" ? /* @__PURE__ */ p("div", { style:
|
|
2511
|
-
/* @__PURE__ */
|
|
2512
|
-
e.pythonCode ? /* @__PURE__ */
|
|
2513
|
-
e.parameters ? /* @__PURE__ */
|
|
2514
|
-
|
|
2606
|
+
return (e == null ? void 0 : e.kind) === "sql" ? /* @__PURE__ */ p("div", { style: s.compiledQuery, children: [
|
|
2607
|
+
/* @__PURE__ */ a(sr, { label: "SQL", value: e.sql }),
|
|
2608
|
+
e.pythonCode ? /* @__PURE__ */ a(Le, { label: "Python", value: e.pythonCode }) : null,
|
|
2609
|
+
e.parameters ? /* @__PURE__ */ a(
|
|
2610
|
+
Le,
|
|
2515
2611
|
{
|
|
2516
2612
|
label: "Parameters",
|
|
2517
|
-
value:
|
|
2613
|
+
value: Pe(e.parameters)
|
|
2518
2614
|
}
|
|
2519
2615
|
) : null
|
|
2520
|
-
] }) : r ? /* @__PURE__ */
|
|
2616
|
+
] }) : r ? /* @__PURE__ */ a(sr, { label: "SQL", value: r }) : /* @__PURE__ */ a(Le, { label: "Compiled Query", value: Pe(e) });
|
|
2521
2617
|
}
|
|
2522
|
-
function
|
|
2618
|
+
function Le({
|
|
2523
2619
|
label: e,
|
|
2524
2620
|
value: r
|
|
2525
2621
|
}) {
|
|
2526
|
-
return /* @__PURE__ */ p("div", { style:
|
|
2527
|
-
/* @__PURE__ */
|
|
2528
|
-
/* @__PURE__ */
|
|
2622
|
+
return /* @__PURE__ */ p("div", { style: s.codeBlockGroup, children: [
|
|
2623
|
+
/* @__PURE__ */ a("div", { style: s.codeBlockLabel, children: e }),
|
|
2624
|
+
/* @__PURE__ */ a("pre", { style: s.codeBlock, children: r })
|
|
2529
2625
|
] });
|
|
2530
2626
|
}
|
|
2531
|
-
function
|
|
2627
|
+
function sr({
|
|
2532
2628
|
label: e,
|
|
2533
2629
|
value: r
|
|
2534
2630
|
}) {
|
|
2535
|
-
return /* @__PURE__ */ p("div", { style:
|
|
2536
|
-
/* @__PURE__ */
|
|
2537
|
-
/* @__PURE__ */
|
|
2631
|
+
return /* @__PURE__ */ p("div", { style: s.codeBlockGroup, children: [
|
|
2632
|
+
/* @__PURE__ */ a("div", { style: s.codeBlockLabel, children: e }),
|
|
2633
|
+
/* @__PURE__ */ a("pre", { style: s.codeBlock, children: rn(r) })
|
|
2538
2634
|
] });
|
|
2539
2635
|
}
|
|
2540
|
-
const
|
|
2636
|
+
const en = /* @__PURE__ */ new Set([
|
|
2541
2637
|
"SELECT",
|
|
2542
2638
|
"FROM",
|
|
2543
2639
|
"JOIN",
|
|
@@ -2575,14 +2671,14 @@ const Zt = /* @__PURE__ */ new Set([
|
|
|
2575
2671
|
"ALL",
|
|
2576
2672
|
"WITH"
|
|
2577
2673
|
]);
|
|
2578
|
-
function
|
|
2674
|
+
function rn(e) {
|
|
2579
2675
|
return e.split(/(\s+|,|\(|\))/).map((t, n) => {
|
|
2580
2676
|
if (!t) return null;
|
|
2581
2677
|
const i = t.toUpperCase();
|
|
2582
|
-
return
|
|
2678
|
+
return en.has(i) ? /* @__PURE__ */ a("span", { style: s.sqlKeyword, children: t }, n) : t.startsWith("$") || t.startsWith(":") || t.startsWith("?") ? /* @__PURE__ */ a("span", { style: s.sqlBindParam, children: t }, n) : /* @__PURE__ */ a("span", { children: t }, n);
|
|
2583
2679
|
});
|
|
2584
2680
|
}
|
|
2585
|
-
function
|
|
2681
|
+
function tn(e) {
|
|
2586
2682
|
return [
|
|
2587
2683
|
`${e.total} ${e.total === 1 ? "trace" : "traces"}`,
|
|
2588
2684
|
`${e.loading} loading`,
|
|
@@ -2591,7 +2687,7 @@ function rn(e) {
|
|
|
2591
2687
|
`${e.warningCount} warning${e.warningCount === 1 ? "" : "s"}`
|
|
2592
2688
|
].join(" · ");
|
|
2593
2689
|
}
|
|
2594
|
-
function
|
|
2690
|
+
function nn(e, r) {
|
|
2595
2691
|
const t = r.trim().toLowerCase();
|
|
2596
2692
|
return t ? e.filter(
|
|
2597
2693
|
(n) => [
|
|
@@ -2603,36 +2699,36 @@ function tn(e, r) {
|
|
|
2603
2699
|
n.sectionTitle,
|
|
2604
2700
|
n.builder,
|
|
2605
2701
|
n.queryKind,
|
|
2606
|
-
|
|
2702
|
+
Er(n)
|
|
2607
2703
|
].filter(Boolean).join(" ").toLowerCase().includes(t)
|
|
2608
2704
|
) : e;
|
|
2609
2705
|
}
|
|
2610
|
-
function
|
|
2611
|
-
const r = e.filter((i) => i.queryKind === "inputOptions"), t = new Set(r.map(
|
|
2706
|
+
function on(e) {
|
|
2707
|
+
const r = e.filter((i) => i.queryKind === "inputOptions"), t = new Set(r.map(Ne));
|
|
2612
2708
|
return [
|
|
2613
|
-
{ title: "Views", traces: e.filter((i) => !t.has(
|
|
2709
|
+
{ title: "Views", traces: e.filter((i) => !t.has(Ne(i))) },
|
|
2614
2710
|
{ title: "Inputs", traces: r }
|
|
2615
2711
|
];
|
|
2616
2712
|
}
|
|
2617
|
-
function
|
|
2713
|
+
function Tr(e, r) {
|
|
2618
2714
|
if (!(!(r != null && r.traceId) && !(r != null && r.queryId) && !(r != null && r.viewId)))
|
|
2619
2715
|
return r.traceId ? e.find((t) => t.traceId === r.traceId) : e.find((t) => !(r.queryId && t.queryId !== r.queryId || r.viewId && t.viewId !== r.viewId));
|
|
2620
2716
|
}
|
|
2621
|
-
function
|
|
2717
|
+
function sn(e, r) {
|
|
2622
2718
|
if (r.queryId)
|
|
2623
|
-
return
|
|
2719
|
+
return Tr(e, r);
|
|
2624
2720
|
if (!r.viewId)
|
|
2625
2721
|
return;
|
|
2626
2722
|
const t = e.filter((n) => n.viewId === r.viewId);
|
|
2627
2723
|
return t.length === 1 ? t[0] : void 0;
|
|
2628
2724
|
}
|
|
2629
|
-
function
|
|
2725
|
+
function an(e, r) {
|
|
2630
2726
|
return !!(e && r && e.traceId === r.traceId);
|
|
2631
2727
|
}
|
|
2632
|
-
function
|
|
2728
|
+
function Ne(e) {
|
|
2633
2729
|
return e.traceId;
|
|
2634
2730
|
}
|
|
2635
|
-
function
|
|
2731
|
+
function dn(e) {
|
|
2636
2732
|
switch (e) {
|
|
2637
2733
|
case "metric":
|
|
2638
2734
|
return "metric";
|
|
@@ -2647,14 +2743,14 @@ function an(e) {
|
|
|
2647
2743
|
case "sql":
|
|
2648
2744
|
return "sql";
|
|
2649
2745
|
default:
|
|
2650
|
-
return
|
|
2746
|
+
return qe(e);
|
|
2651
2747
|
}
|
|
2652
2748
|
}
|
|
2653
|
-
function
|
|
2749
|
+
function Ar(e) {
|
|
2654
2750
|
const r = e.trim().toLowerCase();
|
|
2655
2751
|
return r === "metric" || r === "kpi" ? "metric" : r === "records" || r === "table" ? "records" : r === "matrix" || r === "pivot" ? "matrix" : r === "analysis" ? "analysis" : r === "inputs" || r === "input options" ? "inputs" : r === "sql" ? "sql" : "default";
|
|
2656
2752
|
}
|
|
2657
|
-
function
|
|
2753
|
+
function Cr(e) {
|
|
2658
2754
|
switch (e) {
|
|
2659
2755
|
case "metric":
|
|
2660
2756
|
return {
|
|
@@ -2690,21 +2786,21 @@ function ln(e, r, t) {
|
|
|
2690
2786
|
const n = [];
|
|
2691
2787
|
return e.queryLabel && e.queryLabel !== r && n.push(e.queryLabel), e.queryId && e.queryId !== r && e.queryId !== e.queryLabel ? n.push(e.queryId) : e.viewId && e.viewId !== r && e.viewId !== e.queryLabel && n.push(e.viewId), n.push(t), n;
|
|
2692
2788
|
}
|
|
2693
|
-
function
|
|
2694
|
-
return
|
|
2789
|
+
function kr(e) {
|
|
2790
|
+
return cn(e.visualType) || dn(e.queryKind);
|
|
2695
2791
|
}
|
|
2696
|
-
function
|
|
2697
|
-
return r ? e.queryLabel || e.queryId :
|
|
2792
|
+
function un(e, r) {
|
|
2793
|
+
return r ? e.queryLabel || e.queryId : xe(e);
|
|
2698
2794
|
}
|
|
2699
|
-
function
|
|
2795
|
+
function cn(e) {
|
|
2700
2796
|
if (e)
|
|
2701
2797
|
return e.replace(/[_-]+/g, " ").replace(/\b\w/g, (r) => r.toUpperCase());
|
|
2702
2798
|
}
|
|
2703
|
-
function
|
|
2704
|
-
const r = e.sourceRefs.map(
|
|
2799
|
+
function Er(e) {
|
|
2800
|
+
const r = e.sourceRefs.map(z);
|
|
2705
2801
|
return r.length ? r.length === 1 ? r[0] : `${r[0]} + ${r.length - 1} more` : "No source";
|
|
2706
2802
|
}
|
|
2707
|
-
function
|
|
2803
|
+
function fn(e) {
|
|
2708
2804
|
return e.reduce(
|
|
2709
2805
|
(r, t) => (t.role === "measure" ? r.measures.push(t) : t.role === "date" ? r.timeFields.push(t) : t.role === "dimension" ? r.dimensions.push(t) : t.role === "id" ? r.identifiers.push(t) : r.other.push(t), r),
|
|
2710
2806
|
{
|
|
@@ -2716,7 +2812,7 @@ function cn(e) {
|
|
|
2716
2812
|
}
|
|
2717
2813
|
);
|
|
2718
2814
|
}
|
|
2719
|
-
function
|
|
2815
|
+
function pn(e) {
|
|
2720
2816
|
var r, t;
|
|
2721
2817
|
if (e.queryKind === "records" && ((r = e.projectionFieldRefs) != null && r.length) && e.projectionFieldRefs.every((n) => n.role === "measure") && ((t = e.latestAttempt) == null ? void 0 : t.rowCount) === 1)
|
|
2722
2818
|
return "KPI query";
|
|
@@ -2734,15 +2830,15 @@ function fn(e) {
|
|
|
2734
2830
|
case "sql":
|
|
2735
2831
|
return "SQL query";
|
|
2736
2832
|
default:
|
|
2737
|
-
return
|
|
2833
|
+
return qe(e.queryKind);
|
|
2738
2834
|
}
|
|
2739
2835
|
}
|
|
2740
|
-
function
|
|
2836
|
+
function gn(e) {
|
|
2741
2837
|
return [e.aggregate, e.label || e.name].filter(Boolean).join(" ");
|
|
2742
2838
|
}
|
|
2743
|
-
function
|
|
2744
|
-
var f,
|
|
2745
|
-
const r = e.valuePreview || "redacted", t = e.inputLabel || e.inputId, n = ((f = e.fieldRef) == null ? void 0 : f.label) || ((
|
|
2839
|
+
function mn(e) {
|
|
2840
|
+
var f, d, c;
|
|
2841
|
+
const r = e.valuePreview || "redacted", t = e.inputLabel || e.inputId, n = ((f = e.fieldRef) == null ? void 0 : f.label) || ((d = e.fieldRef) == null ? void 0 : d.name), i = (c = e.fieldRef) != null && c.source ? z(e.fieldRef.source) : void 0, o = [n ? `on ${n}` : void 0, i].filter(Boolean).join(" · "), u = [
|
|
2746
2842
|
t,
|
|
2747
2843
|
e.inputId,
|
|
2748
2844
|
e.operator,
|
|
@@ -2758,29 +2854,29 @@ function gn(e) {
|
|
|
2758
2854
|
title: u
|
|
2759
2855
|
};
|
|
2760
2856
|
}
|
|
2761
|
-
function
|
|
2857
|
+
function z(e) {
|
|
2762
2858
|
return e.kind === "semantic" ? e.datasetName || e.datasetId || e.domainId : e.kind === "physical" ? [
|
|
2763
2859
|
e.schemaName,
|
|
2764
2860
|
e.tableName
|
|
2765
2861
|
].filter(Boolean).join(".") || e.tableName : e.connectionId ? `SQL ${e.connectionId}` : "SQL source";
|
|
2766
2862
|
}
|
|
2767
|
-
function
|
|
2863
|
+
function yn(e) {
|
|
2768
2864
|
if (e.file)
|
|
2769
2865
|
return e.line && e.column ? `${e.file}:${e.line}:${e.column}` : e.line ? `${e.file}:${e.line}` : e.file;
|
|
2770
2866
|
}
|
|
2771
|
-
function
|
|
2867
|
+
function hn(e) {
|
|
2772
2868
|
return typeof e == "number" ? e.toLocaleString() : "-";
|
|
2773
2869
|
}
|
|
2774
|
-
function
|
|
2870
|
+
function bn(e) {
|
|
2775
2871
|
return typeof e == "number" ? `${Math.round(e)}ms` : "-";
|
|
2776
2872
|
}
|
|
2777
|
-
function
|
|
2778
|
-
return
|
|
2873
|
+
function vn(e) {
|
|
2874
|
+
return Pe(e);
|
|
2779
2875
|
}
|
|
2780
|
-
function
|
|
2876
|
+
function Pe(e) {
|
|
2781
2877
|
return JSON.stringify(e, null, 2) ?? "undefined";
|
|
2782
2878
|
}
|
|
2783
|
-
function
|
|
2879
|
+
function Sn(e) {
|
|
2784
2880
|
switch (e.type) {
|
|
2785
2881
|
case "query_started":
|
|
2786
2882
|
return "Started";
|
|
@@ -2793,10 +2889,10 @@ function vn(e) {
|
|
|
2793
2889
|
case "input_changed":
|
|
2794
2890
|
return "Input changed";
|
|
2795
2891
|
default:
|
|
2796
|
-
return
|
|
2892
|
+
return In(e);
|
|
2797
2893
|
}
|
|
2798
2894
|
}
|
|
2799
|
-
function
|
|
2895
|
+
function wn(e) {
|
|
2800
2896
|
return [
|
|
2801
2897
|
e.at,
|
|
2802
2898
|
"durationMs" in e && typeof e.durationMs == "number" ? `${Math.round(e.durationMs)}ms` : void 0,
|
|
@@ -2805,20 +2901,20 @@ function Sn(e) {
|
|
|
2805
2901
|
"errorMessage" in e ? e.errorMessage : void 0
|
|
2806
2902
|
].filter(Boolean).join(" - ");
|
|
2807
2903
|
}
|
|
2808
|
-
function
|
|
2904
|
+
function In(e) {
|
|
2809
2905
|
throw new Error(`Unsupported Semaphor trace event: ${JSON.stringify(e)}`);
|
|
2810
2906
|
}
|
|
2811
|
-
function
|
|
2907
|
+
function xn(e) {
|
|
2812
2908
|
return Array.isArray(e) ? e.filter((r) => typeof r == "string") : [];
|
|
2813
2909
|
}
|
|
2814
2910
|
function $e(e) {
|
|
2815
|
-
return Array.isArray(e) ? e.map((r) =>
|
|
2911
|
+
return Array.isArray(e) ? e.map((r) => qn(r)).filter((r) => !!r) : [];
|
|
2816
2912
|
}
|
|
2817
|
-
function
|
|
2913
|
+
function qn(e) {
|
|
2818
2914
|
var r;
|
|
2819
|
-
return (r =
|
|
2915
|
+
return (r = Tn(e)) == null ? void 0 : r.message;
|
|
2820
2916
|
}
|
|
2821
|
-
function
|
|
2917
|
+
function Tn(e) {
|
|
2822
2918
|
if (typeof e == "string")
|
|
2823
2919
|
return { message: e };
|
|
2824
2920
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
@@ -2837,7 +2933,7 @@ function An(e) {
|
|
|
2837
2933
|
queryHash: typeof (t == null ? void 0 : t.queryHash) == "string" ? t.queryHash : void 0
|
|
2838
2934
|
};
|
|
2839
2935
|
}
|
|
2840
|
-
function
|
|
2936
|
+
function Rr(e) {
|
|
2841
2937
|
return {
|
|
2842
2938
|
...e,
|
|
2843
2939
|
order: [],
|
|
@@ -2850,24 +2946,24 @@ function Cn(e, r) {
|
|
|
2850
2946
|
return r.config.enabled ? {
|
|
2851
2947
|
...e,
|
|
2852
2948
|
...r.config
|
|
2853
|
-
} :
|
|
2949
|
+
} : Rr(r.config);
|
|
2854
2950
|
if (!e.enabled)
|
|
2855
2951
|
return e;
|
|
2856
2952
|
switch (r.type) {
|
|
2857
2953
|
case "register":
|
|
2858
|
-
return
|
|
2954
|
+
return Ln(kn(e, r.descriptor));
|
|
2859
2955
|
case "unregister":
|
|
2860
|
-
return
|
|
2956
|
+
return En(e, r.traceKey);
|
|
2861
2957
|
case "event":
|
|
2862
|
-
return
|
|
2958
|
+
return Rn(e, r);
|
|
2863
2959
|
default:
|
|
2864
2960
|
return e;
|
|
2865
2961
|
}
|
|
2866
2962
|
}
|
|
2867
2963
|
function kn(e, r) {
|
|
2868
|
-
const t = e.entries[r.traceKey], n = t ? e.sequence : e.sequence + 1, i =
|
|
2869
|
-
...t ||
|
|
2870
|
-
...
|
|
2964
|
+
const t = e.entries[r.traceKey], n = t ? e.sequence : e.sequence + 1, i = Ue(), o = {
|
|
2965
|
+
...t || $n(r),
|
|
2966
|
+
...Lr(r),
|
|
2871
2967
|
traceKey: r.traceKey,
|
|
2872
2968
|
latestAttempt: (t == null ? void 0 : t.latestAttempt) || { status: "idle" },
|
|
2873
2969
|
recentEvents: (t == null ? void 0 : t.recentEvents) || [],
|
|
@@ -2885,7 +2981,7 @@ function kn(e, r) {
|
|
|
2885
2981
|
}
|
|
2886
2982
|
};
|
|
2887
2983
|
}
|
|
2888
|
-
function
|
|
2984
|
+
function En(e, r) {
|
|
2889
2985
|
const t = e.entries[r];
|
|
2890
2986
|
return t ? {
|
|
2891
2987
|
...e,
|
|
@@ -2898,11 +2994,11 @@ function Tn(e, r) {
|
|
|
2898
2994
|
}
|
|
2899
2995
|
} : e;
|
|
2900
2996
|
}
|
|
2901
|
-
function
|
|
2997
|
+
function Rn(e, r) {
|
|
2902
2998
|
const t = e.entries[r.traceKey];
|
|
2903
2999
|
if (!t)
|
|
2904
3000
|
return e;
|
|
2905
|
-
const n =
|
|
3001
|
+
const n = Ue(), i = [
|
|
2906
3002
|
...t.recentEvents,
|
|
2907
3003
|
r.event
|
|
2908
3004
|
].slice(-e.maxEventsPerQuery);
|
|
@@ -2922,7 +3018,7 @@ function En(e, r) {
|
|
|
2922
3018
|
}
|
|
2923
3019
|
};
|
|
2924
3020
|
}
|
|
2925
|
-
function
|
|
3021
|
+
function Ln(e) {
|
|
2926
3022
|
if (e.order.length <= e.maxQueries)
|
|
2927
3023
|
return e;
|
|
2928
3024
|
const r = e.order.map((i) => e.entries[i]).filter((i) => !!i).sort((i, o) => i.mounted !== o.mounted ? i.mounted ? 1 : -1 : i.lastEventAt - o.lastEventAt), t = e.order.length - e.maxQueries, n = new Set(
|
|
@@ -2936,10 +3032,10 @@ function Rn(e) {
|
|
|
2936
3032
|
)
|
|
2937
3033
|
} : e;
|
|
2938
3034
|
}
|
|
2939
|
-
function
|
|
2940
|
-
const r =
|
|
3035
|
+
function $n(e) {
|
|
3036
|
+
const r = Ue();
|
|
2941
3037
|
return {
|
|
2942
|
-
...
|
|
3038
|
+
...Lr(e),
|
|
2943
3039
|
traceKey: e.traceKey,
|
|
2944
3040
|
latestAttempt: { status: "idle" },
|
|
2945
3041
|
recentEvents: [],
|
|
@@ -2948,14 +3044,14 @@ function Ln(e) {
|
|
|
2948
3044
|
lastEventAt: r
|
|
2949
3045
|
};
|
|
2950
3046
|
}
|
|
2951
|
-
function
|
|
3047
|
+
function Lr(e) {
|
|
2952
3048
|
var n;
|
|
2953
|
-
const r =
|
|
3049
|
+
const r = zn(e.spec), t = Fn(
|
|
2954
3050
|
e.spec,
|
|
2955
3051
|
e.activeInputs
|
|
2956
3052
|
);
|
|
2957
3053
|
return {
|
|
2958
|
-
traceId:
|
|
3054
|
+
traceId: Dr(e.traceKey),
|
|
2959
3055
|
viewId: e.viewId,
|
|
2960
3056
|
viewTitle: e.viewTitle,
|
|
2961
3057
|
visualType: e.visualType,
|
|
@@ -2964,23 +3060,23 @@ function Dr(e) {
|
|
|
2964
3060
|
queryLabel: e.queryLabel,
|
|
2965
3061
|
queryKind: e.queryKind,
|
|
2966
3062
|
builder: e.builder,
|
|
2967
|
-
sourceRefs:
|
|
3063
|
+
sourceRefs: Pn(e.intent),
|
|
2968
3064
|
sourceHints: (n = e.sourceHints) != null && n.length ? e.sourceHints : void 0,
|
|
2969
3065
|
projectionFieldRefs: r,
|
|
2970
3066
|
inputFieldRefs: t,
|
|
2971
|
-
fieldRefs:
|
|
3067
|
+
fieldRefs: Mn(e.intent),
|
|
2972
3068
|
inputsApplied: (e.activeInputs || []).map((i) => ({
|
|
2973
3069
|
inputId: i.inputId,
|
|
2974
3070
|
inputLabel: i.label,
|
|
2975
3071
|
fieldRef: i.field,
|
|
2976
3072
|
operator: i.operator,
|
|
2977
|
-
valuePreview:
|
|
3073
|
+
valuePreview: _n(i)
|
|
2978
3074
|
})),
|
|
2979
3075
|
recentEvents: [],
|
|
2980
3076
|
clientWarnings: e.clientWarnings
|
|
2981
3077
|
};
|
|
2982
3078
|
}
|
|
2983
|
-
function
|
|
3079
|
+
function ve(e) {
|
|
2984
3080
|
const {
|
|
2985
3081
|
traceKey: r,
|
|
2986
3082
|
mounted: t,
|
|
@@ -2990,10 +3086,10 @@ function we(e) {
|
|
|
2990
3086
|
} = e;
|
|
2991
3087
|
return o;
|
|
2992
3088
|
}
|
|
2993
|
-
function
|
|
3089
|
+
function le(e) {
|
|
2994
3090
|
if (!e.enabled)
|
|
2995
|
-
return
|
|
2996
|
-
const r = e.order.map((n) => e.entries[n]).filter((n) => !!n).map(
|
|
3091
|
+
return Ir;
|
|
3092
|
+
const r = e.order.map((n) => e.entries[n]).filter((n) => !!n).map(ve), t = Me(r).map(mt);
|
|
2997
3093
|
return {
|
|
2998
3094
|
enabled: !0,
|
|
2999
3095
|
queries: r,
|
|
@@ -3002,77 +3098,77 @@ function ce(e) {
|
|
|
3002
3098
|
const i = Object.values(e.entries).find(
|
|
3003
3099
|
(o) => o.queryId === n
|
|
3004
3100
|
);
|
|
3005
|
-
return i ?
|
|
3101
|
+
return i ? ve(i) : void 0;
|
|
3006
3102
|
},
|
|
3007
|
-
getQueries: (n) => Object.values(e.entries).filter((i) => i.queryId === n).map(
|
|
3103
|
+
getQueries: (n) => Object.values(e.entries).filter((i) => i.queryId === n).map(ve)
|
|
3008
3104
|
};
|
|
3009
3105
|
}
|
|
3010
3106
|
function Dn(e) {
|
|
3011
3107
|
return {
|
|
3012
|
-
snapshot: () =>
|
|
3013
|
-
getQuery: (r) =>
|
|
3014
|
-
getQueries: (r) =>
|
|
3015
|
-
getIssues: () =>
|
|
3108
|
+
snapshot: () => St(le(e())),
|
|
3109
|
+
getQuery: (r) => nr(le(e()).getQuery(r)),
|
|
3110
|
+
getQueries: (r) => le(e()).getQueries(r).map((t) => nr(t)).filter((t) => !!t),
|
|
3111
|
+
getIssues: () => le(e()).issues
|
|
3016
3112
|
};
|
|
3017
3113
|
}
|
|
3018
|
-
function
|
|
3114
|
+
function On(e) {
|
|
3019
3115
|
return e === void 0 || e === !1 ? {
|
|
3020
3116
|
enabled: !1,
|
|
3021
3117
|
exposeWindowBridge: !1,
|
|
3022
|
-
maxEventsPerQuery:
|
|
3023
|
-
maxQueries:
|
|
3118
|
+
maxEventsPerQuery: Ee,
|
|
3119
|
+
maxQueries: Re
|
|
3024
3120
|
} : e === !0 ? {
|
|
3025
3121
|
enabled: !0,
|
|
3026
3122
|
exposeWindowBridge: !1,
|
|
3027
|
-
maxEventsPerQuery:
|
|
3028
|
-
maxQueries:
|
|
3123
|
+
maxEventsPerQuery: Ee,
|
|
3124
|
+
maxQueries: Re
|
|
3029
3125
|
} : {
|
|
3030
3126
|
enabled: e.enabled !== !1,
|
|
3031
3127
|
exposeWindowBridge: e.exposeWindowBridge === !0,
|
|
3032
3128
|
maxEventsPerQuery: dr(
|
|
3033
3129
|
e.maxEventsPerQuery,
|
|
3034
|
-
|
|
3035
|
-
|
|
3130
|
+
Ee,
|
|
3131
|
+
Rt
|
|
3036
3132
|
),
|
|
3037
3133
|
maxQueries: dr(
|
|
3038
3134
|
e.maxQueries,
|
|
3039
|
-
|
|
3040
|
-
|
|
3135
|
+
Re,
|
|
3136
|
+
Lt
|
|
3041
3137
|
)
|
|
3042
3138
|
};
|
|
3043
3139
|
}
|
|
3044
|
-
function
|
|
3140
|
+
function Bn(e) {
|
|
3045
3141
|
const t = [
|
|
3046
3142
|
e == null ? void 0 : e.sourceHint,
|
|
3047
3143
|
...(e == null ? void 0 : e.sourceHints) || []
|
|
3048
3144
|
].filter((n) => !!n).map((n) => ({
|
|
3049
|
-
file:
|
|
3050
|
-
line:
|
|
3051
|
-
column:
|
|
3052
|
-
exportName:
|
|
3053
|
-
component:
|
|
3054
|
-
note:
|
|
3145
|
+
file: he(n.file),
|
|
3146
|
+
line: ar(n.line),
|
|
3147
|
+
column: ar(n.column),
|
|
3148
|
+
exportName: he(n.exportName),
|
|
3149
|
+
component: he(n.component),
|
|
3150
|
+
note: he(n.note)
|
|
3055
3151
|
})).filter(
|
|
3056
3152
|
(n) => !!(n.file || n.line || n.column || n.exportName || n.component || n.note)
|
|
3057
3153
|
);
|
|
3058
3154
|
return t.length ? t : void 0;
|
|
3059
3155
|
}
|
|
3060
|
-
function
|
|
3156
|
+
function he(e) {
|
|
3061
3157
|
if (typeof e != "string")
|
|
3062
3158
|
return;
|
|
3063
3159
|
const r = e.trim();
|
|
3064
3160
|
return r || void 0;
|
|
3065
3161
|
}
|
|
3066
|
-
function
|
|
3162
|
+
function ar(e) {
|
|
3067
3163
|
return typeof e == "number" && Number.isInteger(e) && e > 0 ? e : void 0;
|
|
3068
3164
|
}
|
|
3069
3165
|
function dr(e, r, t) {
|
|
3070
3166
|
return e === void 0 || !Number.isFinite(e) || !Number.isInteger(e) || e <= 0 ? r : Math.min(e, t);
|
|
3071
3167
|
}
|
|
3072
|
-
function
|
|
3168
|
+
function Kn(e) {
|
|
3073
3169
|
return typeof e.id == "string" && e.id.trim() ? e.id : void 0;
|
|
3074
3170
|
}
|
|
3075
|
-
function
|
|
3171
|
+
function Wn(e) {
|
|
3076
3172
|
switch (e) {
|
|
3077
3173
|
case "metric":
|
|
3078
3174
|
return "semaphor.metric";
|
|
@@ -3087,14 +3183,14 @@ function Kn(e) {
|
|
|
3087
3183
|
case "sql":
|
|
3088
3184
|
return "semaphor.sql";
|
|
3089
3185
|
default:
|
|
3090
|
-
return
|
|
3186
|
+
return qe(e);
|
|
3091
3187
|
}
|
|
3092
3188
|
}
|
|
3093
|
-
function
|
|
3189
|
+
function qe(e) {
|
|
3094
3190
|
throw new Error(`Unsupported Semaphor query kind: ${JSON.stringify(e)}`);
|
|
3095
3191
|
}
|
|
3096
|
-
function
|
|
3097
|
-
if (
|
|
3192
|
+
function _n(e) {
|
|
3193
|
+
if (Nn(e))
|
|
3098
3194
|
return;
|
|
3099
3195
|
const r = e.value;
|
|
3100
3196
|
if (r !== void 0) {
|
|
@@ -3104,17 +3200,17 @@ function Wn(e) {
|
|
|
3104
3200
|
).map((n) => String(n));
|
|
3105
3201
|
if (t.length === r.length && t.length > 0) {
|
|
3106
3202
|
const n = t.slice(0, 3).join(", "), i = t.length > 3 ? `, +${t.length - 3} more` : "";
|
|
3107
|
-
return
|
|
3203
|
+
return lr(`${n}${i}`);
|
|
3108
3204
|
}
|
|
3109
3205
|
return `${r.length} selected`;
|
|
3110
3206
|
}
|
|
3111
|
-
return typeof r == "number" || typeof r == "boolean" ? String(r) : typeof r == "string" ?
|
|
3207
|
+
return typeof r == "number" || typeof r == "boolean" ? String(r) : typeof r == "string" ? lr(r) : r && typeof r == "object" ? `object(${Object.keys(r).slice(0, 5).join(",")})` : String(r);
|
|
3112
3208
|
}
|
|
3113
3209
|
}
|
|
3114
|
-
function
|
|
3210
|
+
function lr(e) {
|
|
3115
3211
|
return e.length > 80 ? `${e.slice(0, 77)}...` : e;
|
|
3116
3212
|
}
|
|
3117
|
-
function
|
|
3213
|
+
function Nn(e) {
|
|
3118
3214
|
var t;
|
|
3119
3215
|
const r = [
|
|
3120
3216
|
e.inputId,
|
|
@@ -3125,54 +3221,54 @@ function _n(e) {
|
|
|
3125
3221
|
(n) => r.includes(n)
|
|
3126
3222
|
);
|
|
3127
3223
|
}
|
|
3128
|
-
function
|
|
3224
|
+
function Pn(e) {
|
|
3129
3225
|
const r = [];
|
|
3130
|
-
return
|
|
3131
|
-
|
|
3132
|
-
}),
|
|
3226
|
+
return we(e, (t) => {
|
|
3227
|
+
jn(t) && r.push(t);
|
|
3228
|
+
}), Xr(r);
|
|
3133
3229
|
}
|
|
3134
|
-
function
|
|
3230
|
+
function zn(e) {
|
|
3135
3231
|
switch (e.queryKind) {
|
|
3136
3232
|
case "metric":
|
|
3137
3233
|
case "analysis":
|
|
3138
|
-
return
|
|
3234
|
+
return Y([
|
|
3139
3235
|
...e.measures || [],
|
|
3140
3236
|
e.primaryMeasure,
|
|
3141
3237
|
e.dateField,
|
|
3142
3238
|
...e.dimensions || []
|
|
3143
3239
|
]);
|
|
3144
3240
|
case "records":
|
|
3145
|
-
return
|
|
3241
|
+
return Y(e.fields || []);
|
|
3146
3242
|
case "inputOptions":
|
|
3147
|
-
return
|
|
3243
|
+
return Y([
|
|
3148
3244
|
e.labelField,
|
|
3149
3245
|
e.valueField,
|
|
3150
3246
|
e.searchField,
|
|
3151
3247
|
...e.disambiguationFields || []
|
|
3152
3248
|
]);
|
|
3153
3249
|
case "sql":
|
|
3154
|
-
return
|
|
3250
|
+
return Y(e.fields || []);
|
|
3155
3251
|
case "matrix":
|
|
3156
|
-
return
|
|
3157
|
-
...(e.rows || []).map(
|
|
3158
|
-
...(e.columns || []).map(
|
|
3159
|
-
...(e.values || []).map(
|
|
3252
|
+
return Y([
|
|
3253
|
+
...(e.rows || []).map(De),
|
|
3254
|
+
...(e.columns || []).map(De),
|
|
3255
|
+
...(e.values || []).map(De)
|
|
3160
3256
|
]);
|
|
3161
3257
|
default:
|
|
3162
|
-
return
|
|
3258
|
+
return qe(e);
|
|
3163
3259
|
}
|
|
3164
3260
|
}
|
|
3165
|
-
function
|
|
3261
|
+
function Fn(e, r) {
|
|
3166
3262
|
const t = [
|
|
3167
3263
|
...(e.inputs || []).map($r),
|
|
3168
3264
|
...(r || []).map((n) => n.field)
|
|
3169
3265
|
];
|
|
3170
|
-
return
|
|
3266
|
+
return Y(t);
|
|
3171
3267
|
}
|
|
3172
|
-
function
|
|
3268
|
+
function Y(e) {
|
|
3173
3269
|
const r = /* @__PURE__ */ new Map();
|
|
3174
3270
|
return e.forEach((t) => {
|
|
3175
|
-
t &&
|
|
3271
|
+
t && fe(t) && r.set(Qe(t), t);
|
|
3176
3272
|
}), [...r.values()];
|
|
3177
3273
|
}
|
|
3178
3274
|
function $r(e) {
|
|
@@ -3184,82 +3280,82 @@ function $r(e) {
|
|
|
3184
3280
|
return $r(n);
|
|
3185
3281
|
}
|
|
3186
3282
|
const t = e.field;
|
|
3187
|
-
return
|
|
3283
|
+
return fe(t) ? t : void 0;
|
|
3188
3284
|
}
|
|
3189
|
-
function
|
|
3190
|
-
if (
|
|
3285
|
+
function De(e) {
|
|
3286
|
+
if (fe(e))
|
|
3191
3287
|
return e;
|
|
3192
3288
|
if (!e || typeof e != "object")
|
|
3193
3289
|
return;
|
|
3194
3290
|
const r = e.field;
|
|
3195
|
-
return
|
|
3291
|
+
return fe(r) ? r : void 0;
|
|
3196
3292
|
}
|
|
3197
|
-
function
|
|
3293
|
+
function Mn(e) {
|
|
3198
3294
|
const r = /* @__PURE__ */ new Map();
|
|
3199
|
-
return
|
|
3200
|
-
|
|
3295
|
+
return we(e, (t) => {
|
|
3296
|
+
fe(t) && r.set(Qe(t), t);
|
|
3201
3297
|
}), [...r.values()];
|
|
3202
3298
|
}
|
|
3203
|
-
function
|
|
3299
|
+
function we(e, r) {
|
|
3204
3300
|
if (!(!e || typeof e != "object")) {
|
|
3205
3301
|
if (r(e), Array.isArray(e)) {
|
|
3206
|
-
e.forEach((t) =>
|
|
3302
|
+
e.forEach((t) => we(t, r));
|
|
3207
3303
|
return;
|
|
3208
3304
|
}
|
|
3209
3305
|
Object.values(e).forEach(
|
|
3210
|
-
(t) =>
|
|
3306
|
+
(t) => we(t, r)
|
|
3211
3307
|
);
|
|
3212
3308
|
}
|
|
3213
3309
|
}
|
|
3214
|
-
function
|
|
3310
|
+
function jn(e) {
|
|
3215
3311
|
if (!e || typeof e != "object")
|
|
3216
3312
|
return !1;
|
|
3217
3313
|
const r = e;
|
|
3218
3314
|
return r.kind === "semantic" ? typeof r.domainId == "string" && typeof r.datasetName == "string" : r.kind === "physical" ? typeof r.connectionId == "string" && typeof r.tableName == "string" : r.kind === "sql" ? typeof r.connectionId == "string" : !1;
|
|
3219
3315
|
}
|
|
3220
|
-
function
|
|
3316
|
+
function fe(e) {
|
|
3221
3317
|
if (!e || typeof e != "object")
|
|
3222
3318
|
return !1;
|
|
3223
3319
|
const r = e;
|
|
3224
3320
|
return typeof r.name == "string" && (r.source !== void 0 || r.role !== void 0 || r.dataType !== void 0 || r.aggregate !== void 0);
|
|
3225
3321
|
}
|
|
3226
|
-
function
|
|
3322
|
+
function Qe(e) {
|
|
3227
3323
|
return [
|
|
3228
3324
|
e.name,
|
|
3229
3325
|
e.role,
|
|
3230
3326
|
e.aggregate,
|
|
3231
|
-
e.source ?
|
|
3327
|
+
e.source ? Yr(e.source) : ""
|
|
3232
3328
|
].join(":");
|
|
3233
3329
|
}
|
|
3234
|
-
function
|
|
3330
|
+
function Hn(e) {
|
|
3235
3331
|
const r = e;
|
|
3236
3332
|
return typeof (r == null ? void 0 : r.rowCount) == "number" ? r.rowCount : Array.isArray(r == null ? void 0 : r.records) ? r.records.length : void 0;
|
|
3237
3333
|
}
|
|
3238
|
-
function
|
|
3334
|
+
function Vn(e) {
|
|
3239
3335
|
const r = e;
|
|
3240
3336
|
return Array.isArray(r == null ? void 0 : r.columns) ? r.columns.length : void 0;
|
|
3241
3337
|
}
|
|
3242
|
-
function
|
|
3338
|
+
function ur(e) {
|
|
3243
3339
|
const r = e;
|
|
3244
3340
|
return r == null ? void 0 : r.executionResult;
|
|
3245
3341
|
}
|
|
3246
|
-
function
|
|
3342
|
+
function cr(e) {
|
|
3247
3343
|
const r = e;
|
|
3248
3344
|
return typeof (r == null ? void 0 : r.requestId) == "string" ? r.requestId : void 0;
|
|
3249
3345
|
}
|
|
3250
|
-
function
|
|
3346
|
+
function Dr(e) {
|
|
3251
3347
|
let r = 2166136261;
|
|
3252
3348
|
for (let t = 0; t < e.length; t += 1)
|
|
3253
3349
|
r ^= e.charCodeAt(t), r = Math.imul(r, 16777619);
|
|
3254
3350
|
return (r >>> 0).toString(36);
|
|
3255
3351
|
}
|
|
3256
|
-
function
|
|
3352
|
+
function be() {
|
|
3257
3353
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
3258
3354
|
}
|
|
3259
|
-
function
|
|
3355
|
+
function Ue() {
|
|
3260
3356
|
return typeof performance < "u" && performance.now ? performance.now() : Date.now();
|
|
3261
3357
|
}
|
|
3262
|
-
const
|
|
3358
|
+
const Qn = [
|
|
3263
3359
|
"primary",
|
|
3264
3360
|
"comparisons",
|
|
3265
3361
|
"contributors",
|
|
@@ -3273,7 +3369,7 @@ const Vn = [
|
|
|
3273
3369
|
"largestPositiveChanges",
|
|
3274
3370
|
"largestNegativeDrivers",
|
|
3275
3371
|
"largestPositiveDrivers"
|
|
3276
|
-
],
|
|
3372
|
+
], Un = [
|
|
3277
3373
|
"primary",
|
|
3278
3374
|
"records",
|
|
3279
3375
|
"periodChanges",
|
|
@@ -3288,12 +3384,12 @@ const Vn = [
|
|
|
3288
3384
|
"largestNegativeDrivers",
|
|
3289
3385
|
"largestPositiveDrivers"
|
|
3290
3386
|
];
|
|
3291
|
-
function
|
|
3387
|
+
function Or(e) {
|
|
3292
3388
|
if (!e)
|
|
3293
3389
|
return {};
|
|
3294
|
-
const r =
|
|
3295
|
-
|
|
3296
|
-
|
|
3390
|
+
const r = ei(e.executionResult), t = Gn(e, r), n = Xn(t), i = Br(
|
|
3391
|
+
Je(e.analysisWarnings),
|
|
3392
|
+
ni(t)
|
|
3297
3393
|
);
|
|
3298
3394
|
return {
|
|
3299
3395
|
...e,
|
|
@@ -3306,19 +3402,19 @@ function Br(e) {
|
|
|
3306
3402
|
} : {}
|
|
3307
3403
|
};
|
|
3308
3404
|
}
|
|
3309
|
-
function
|
|
3310
|
-
const t =
|
|
3311
|
-
for (const i of
|
|
3405
|
+
function Gn(e, r) {
|
|
3406
|
+
const t = Jn(e.resultSets);
|
|
3407
|
+
for (const i of Qn) {
|
|
3312
3408
|
if (t[i])
|
|
3313
3409
|
continue;
|
|
3314
|
-
const o =
|
|
3410
|
+
const o = ri(e[i]);
|
|
3315
3411
|
if (!o.length)
|
|
3316
3412
|
continue;
|
|
3317
|
-
const u = r.length ? r :
|
|
3413
|
+
const u = r.length ? r : ti(o);
|
|
3318
3414
|
t[i] = {
|
|
3319
3415
|
id: i,
|
|
3320
3416
|
role: i,
|
|
3321
|
-
...
|
|
3417
|
+
...Ge({
|
|
3322
3418
|
records: o,
|
|
3323
3419
|
columns: u,
|
|
3324
3420
|
resultSetKey: i
|
|
@@ -3327,20 +3423,20 @@ function Un(e, r) {
|
|
|
3327
3423
|
rowCount: o.length
|
|
3328
3424
|
};
|
|
3329
3425
|
}
|
|
3330
|
-
const n =
|
|
3426
|
+
const n = Zn(e.executionResult);
|
|
3331
3427
|
return n && n.records.length > 0 && !t.records && (t.records = n), t;
|
|
3332
3428
|
}
|
|
3333
|
-
function
|
|
3429
|
+
function Jn(e) {
|
|
3334
3430
|
return Object.fromEntries(
|
|
3335
3431
|
Object.entries(e || {}).map(([r, t]) => [
|
|
3336
3432
|
r,
|
|
3337
|
-
|
|
3433
|
+
Yn(t, r)
|
|
3338
3434
|
])
|
|
3339
3435
|
);
|
|
3340
3436
|
}
|
|
3341
|
-
function
|
|
3437
|
+
function Yn(e, r = e.id || e.role || "resultSet") {
|
|
3342
3438
|
var n;
|
|
3343
|
-
const t =
|
|
3439
|
+
const t = Ge({
|
|
3344
3440
|
records: e.records || [],
|
|
3345
3441
|
columns: e.columns || [],
|
|
3346
3442
|
resultSetKey: r
|
|
@@ -3349,28 +3445,28 @@ function Jn(e, r = e.id || e.role || "resultSet") {
|
|
|
3349
3445
|
...e,
|
|
3350
3446
|
...t,
|
|
3351
3447
|
...e.warnings || t.warnings ? {
|
|
3352
|
-
warnings:
|
|
3353
|
-
|
|
3448
|
+
warnings: Br(
|
|
3449
|
+
Je(e.warnings),
|
|
3354
3450
|
t.warnings
|
|
3355
3451
|
)
|
|
3356
3452
|
} : {},
|
|
3357
3453
|
rowCount: e.rowCount ?? ((n = e.records) == null ? void 0 : n.length) ?? 0
|
|
3358
3454
|
};
|
|
3359
3455
|
}
|
|
3360
|
-
function
|
|
3456
|
+
function Xn(e) {
|
|
3361
3457
|
var r;
|
|
3362
|
-
for (const t of
|
|
3458
|
+
for (const t of Un)
|
|
3363
3459
|
if ((r = e[t]) != null && r.records.length)
|
|
3364
3460
|
return e[t];
|
|
3365
3461
|
return Object.values(e).find((t) => t.records.length) || Object.values(e)[0];
|
|
3366
3462
|
}
|
|
3367
|
-
function
|
|
3463
|
+
function Zn(e) {
|
|
3368
3464
|
const r = e == null ? void 0 : e.result;
|
|
3369
3465
|
if (!(!r || r.kind !== "records" && r.kind !== "sql"))
|
|
3370
3466
|
return {
|
|
3371
3467
|
id: "records",
|
|
3372
3468
|
role: "records",
|
|
3373
|
-
...
|
|
3469
|
+
...Ge({
|
|
3374
3470
|
records: r.records,
|
|
3375
3471
|
columns: r.columns,
|
|
3376
3472
|
resultSetKey: "records"
|
|
@@ -3379,16 +3475,16 @@ function Xn(e) {
|
|
|
3379
3475
|
rowCount: r.rowCount ?? r.records.length
|
|
3380
3476
|
};
|
|
3381
3477
|
}
|
|
3382
|
-
function
|
|
3478
|
+
function ei(e) {
|
|
3383
3479
|
const r = e == null ? void 0 : e.result;
|
|
3384
3480
|
return !r || r.kind !== "records" && r.kind !== "sql" ? [] : r.columns;
|
|
3385
3481
|
}
|
|
3386
|
-
function
|
|
3482
|
+
function ri(e) {
|
|
3387
3483
|
return Array.isArray(e) ? e.filter(
|
|
3388
3484
|
(r) => !!(r && typeof r == "object" && !Array.isArray(r))
|
|
3389
3485
|
) : [];
|
|
3390
3486
|
}
|
|
3391
|
-
function
|
|
3487
|
+
function Ge({
|
|
3392
3488
|
records: e,
|
|
3393
3489
|
columns: r,
|
|
3394
3490
|
resultSetKey: t
|
|
@@ -3399,9 +3495,9 @@ function Je({
|
|
|
3399
3495
|
return {
|
|
3400
3496
|
records: e.map((o, u) => {
|
|
3401
3497
|
const f = {};
|
|
3402
|
-
return r.forEach((
|
|
3403
|
-
if (Object.prototype.hasOwnProperty.call(o,
|
|
3404
|
-
f[
|
|
3498
|
+
return r.forEach((d) => {
|
|
3499
|
+
if (Object.prototype.hasOwnProperty.call(o, d.key)) {
|
|
3500
|
+
f[d.key] = o[d.key];
|
|
3405
3501
|
return;
|
|
3406
3502
|
}
|
|
3407
3503
|
n.push({
|
|
@@ -3409,18 +3505,18 @@ function Je({
|
|
|
3409
3505
|
severity: "warning",
|
|
3410
3506
|
resultSetKey: t,
|
|
3411
3507
|
rowIndex: u,
|
|
3412
|
-
columnKey:
|
|
3413
|
-
...
|
|
3414
|
-
...
|
|
3508
|
+
columnKey: d.key,
|
|
3509
|
+
...d.name ? { columnName: d.name } : {},
|
|
3510
|
+
...d.label ? { columnLabel: d.label } : {},
|
|
3415
3511
|
availableKeys: Object.keys(o),
|
|
3416
|
-
message: `Analysis result set "${t}" row ${u} is missing column key "${
|
|
3512
|
+
message: `Analysis result set "${t}" row ${u} is missing column key "${d.key}". Rows must expose values by column.key; labels and column names are display metadata only.`
|
|
3417
3513
|
});
|
|
3418
3514
|
}), f;
|
|
3419
3515
|
}),
|
|
3420
3516
|
...n.length ? { warnings: n } : {}
|
|
3421
3517
|
};
|
|
3422
3518
|
}
|
|
3423
|
-
function
|
|
3519
|
+
function ti(e) {
|
|
3424
3520
|
return Array.from(
|
|
3425
3521
|
new Set(e.flatMap((t) => Object.keys(t)))
|
|
3426
3522
|
).map((t) => ({
|
|
@@ -3429,46 +3525,46 @@ function ri(e) {
|
|
|
3429
3525
|
label: t
|
|
3430
3526
|
}));
|
|
3431
3527
|
}
|
|
3432
|
-
function
|
|
3528
|
+
function ni(e) {
|
|
3433
3529
|
return Object.values(e).flatMap(
|
|
3434
|
-
(r) =>
|
|
3530
|
+
(r) => Je(r.warnings)
|
|
3435
3531
|
);
|
|
3436
3532
|
}
|
|
3437
|
-
function
|
|
3438
|
-
return Array.isArray(e) ? e.filter(
|
|
3533
|
+
function Je(e) {
|
|
3534
|
+
return Array.isArray(e) ? e.filter(ii) : [];
|
|
3439
3535
|
}
|
|
3440
|
-
function
|
|
3536
|
+
function ii(e) {
|
|
3441
3537
|
return !!(e && typeof e == "object" && !Array.isArray(e));
|
|
3442
3538
|
}
|
|
3443
|
-
function
|
|
3539
|
+
function Br(...e) {
|
|
3444
3540
|
const r = /* @__PURE__ */ new Set(), t = [];
|
|
3445
3541
|
for (const n of e.flatMap((i) => i || [])) {
|
|
3446
|
-
const i =
|
|
3542
|
+
const i = oi(n);
|
|
3447
3543
|
r.has(i) || (r.add(i), t.push(n));
|
|
3448
3544
|
}
|
|
3449
3545
|
return t;
|
|
3450
3546
|
}
|
|
3451
|
-
function
|
|
3547
|
+
function oi(e) {
|
|
3452
3548
|
return e.code === "missing_analysis_result_key" ? [
|
|
3453
3549
|
e.code,
|
|
3454
3550
|
e.resultSetKey,
|
|
3455
3551
|
e.rowIndex,
|
|
3456
3552
|
e.columnKey
|
|
3457
|
-
].join(":") :
|
|
3553
|
+
].join(":") : ze(e);
|
|
3458
3554
|
}
|
|
3459
|
-
function
|
|
3555
|
+
function ze(e) {
|
|
3460
3556
|
if (!e || typeof e != "object")
|
|
3461
3557
|
return JSON.stringify(e);
|
|
3462
3558
|
if (Array.isArray(e))
|
|
3463
|
-
return `[${e.map((t) =>
|
|
3559
|
+
return `[${e.map((t) => ze(t)).join(",")}]`;
|
|
3464
3560
|
const r = e;
|
|
3465
|
-
return `{${Object.keys(r).sort().map((t) => `${JSON.stringify(t)}:${
|
|
3561
|
+
return `{${Object.keys(r).sort().map((t) => `${JSON.stringify(t)}:${ze(r[t])}`).join(",")}}`;
|
|
3466
3562
|
}
|
|
3467
|
-
const
|
|
3468
|
-
function
|
|
3469
|
-
const r =
|
|
3563
|
+
const Oe = { value: null }, Be = {}, si = { records: [] }, Ke = { options: [] }, ai = { records: [] }, We = {};
|
|
3564
|
+
function di(e) {
|
|
3565
|
+
const r = X(e.inputs), t = Vr(e);
|
|
3470
3566
|
try {
|
|
3471
|
-
const n =
|
|
3567
|
+
const n = Qr(e), i = ee(n, "analysis");
|
|
3472
3568
|
return i ? {
|
|
3473
3569
|
error: i,
|
|
3474
3570
|
activeInputs: r,
|
|
@@ -3479,17 +3575,17 @@ function ai(e) {
|
|
|
3479
3575
|
i,
|
|
3480
3576
|
t
|
|
3481
3577
|
),
|
|
3482
|
-
idleData:
|
|
3578
|
+
idleData: Be
|
|
3483
3579
|
} : {
|
|
3484
3580
|
intent: n,
|
|
3485
3581
|
error: null,
|
|
3486
3582
|
activeInputs: r,
|
|
3487
3583
|
analysisOptions: t,
|
|
3488
3584
|
queryKey: q(n, r, void 0, t),
|
|
3489
|
-
idleData:
|
|
3585
|
+
idleData: Be
|
|
3490
3586
|
};
|
|
3491
3587
|
} catch (n) {
|
|
3492
|
-
const i =
|
|
3588
|
+
const i = Z(n, "analysis");
|
|
3493
3589
|
return {
|
|
3494
3590
|
error: i,
|
|
3495
3591
|
activeInputs: r,
|
|
@@ -3500,40 +3596,40 @@ function ai(e) {
|
|
|
3500
3596
|
i,
|
|
3501
3597
|
t
|
|
3502
3598
|
),
|
|
3503
|
-
idleData:
|
|
3599
|
+
idleData: Be
|
|
3504
3600
|
};
|
|
3505
3601
|
}
|
|
3506
3602
|
}
|
|
3507
3603
|
function li(e) {
|
|
3508
|
-
const r =
|
|
3604
|
+
const r = X(e.inputs);
|
|
3509
3605
|
try {
|
|
3510
|
-
const t =
|
|
3606
|
+
const t = Ur(e), n = ee(t);
|
|
3511
3607
|
return n ? {
|
|
3512
3608
|
error: n,
|
|
3513
3609
|
activeInputs: r,
|
|
3514
3610
|
queryKey: q(void 0, r, n),
|
|
3515
|
-
idleData:
|
|
3611
|
+
idleData: Oe
|
|
3516
3612
|
} : {
|
|
3517
3613
|
intent: t,
|
|
3518
3614
|
error: null,
|
|
3519
3615
|
activeInputs: r,
|
|
3520
3616
|
queryKey: q(t, r),
|
|
3521
|
-
idleData:
|
|
3617
|
+
idleData: Oe
|
|
3522
3618
|
};
|
|
3523
3619
|
} catch (t) {
|
|
3524
|
-
const n =
|
|
3620
|
+
const n = Z(t, "metric");
|
|
3525
3621
|
return {
|
|
3526
3622
|
error: n,
|
|
3527
3623
|
activeInputs: r,
|
|
3528
3624
|
queryKey: q(void 0, r, n),
|
|
3529
|
-
idleData:
|
|
3625
|
+
idleData: Oe
|
|
3530
3626
|
};
|
|
3531
3627
|
}
|
|
3532
3628
|
}
|
|
3533
|
-
function
|
|
3534
|
-
const r =
|
|
3629
|
+
function ui(e) {
|
|
3630
|
+
const r = X(e.inputs), t = si;
|
|
3535
3631
|
try {
|
|
3536
|
-
const n =
|
|
3632
|
+
const n = Hr(e), i = ee(n);
|
|
3537
3633
|
return i ? {
|
|
3538
3634
|
error: i,
|
|
3539
3635
|
activeInputs: r,
|
|
@@ -3547,7 +3643,7 @@ function di(e) {
|
|
|
3547
3643
|
idleData: t
|
|
3548
3644
|
};
|
|
3549
3645
|
} catch (n) {
|
|
3550
|
-
const i =
|
|
3646
|
+
const i = Z(n, "records");
|
|
3551
3647
|
return {
|
|
3552
3648
|
error: i,
|
|
3553
3649
|
activeInputs: r,
|
|
@@ -3556,36 +3652,36 @@ function di(e) {
|
|
|
3556
3652
|
};
|
|
3557
3653
|
}
|
|
3558
3654
|
}
|
|
3559
|
-
function
|
|
3560
|
-
const r =
|
|
3655
|
+
function ci(e) {
|
|
3656
|
+
const r = X(e.inputs);
|
|
3561
3657
|
try {
|
|
3562
|
-
const t =
|
|
3658
|
+
const t = jr(e), n = ee(t);
|
|
3563
3659
|
return n ? {
|
|
3564
3660
|
error: n,
|
|
3565
3661
|
activeInputs: r,
|
|
3566
3662
|
queryKey: q(void 0, r, n),
|
|
3567
|
-
idleData:
|
|
3663
|
+
idleData: Ke
|
|
3568
3664
|
} : {
|
|
3569
3665
|
intent: t,
|
|
3570
3666
|
error: null,
|
|
3571
3667
|
activeInputs: r,
|
|
3572
3668
|
queryKey: q(t, r),
|
|
3573
|
-
idleData:
|
|
3669
|
+
idleData: Ke
|
|
3574
3670
|
};
|
|
3575
3671
|
} catch (t) {
|
|
3576
|
-
const n =
|
|
3672
|
+
const n = Z(t, "inputOptions");
|
|
3577
3673
|
return {
|
|
3578
3674
|
error: n,
|
|
3579
3675
|
activeInputs: r,
|
|
3580
3676
|
queryKey: q(void 0, r, n),
|
|
3581
|
-
idleData:
|
|
3677
|
+
idleData: Ke
|
|
3582
3678
|
};
|
|
3583
3679
|
}
|
|
3584
3680
|
}
|
|
3585
|
-
function
|
|
3586
|
-
const r =
|
|
3681
|
+
function fi(e) {
|
|
3682
|
+
const r = X(e.inputs), t = ai;
|
|
3587
3683
|
try {
|
|
3588
|
-
const n =
|
|
3684
|
+
const n = Mr(e), i = ee(n);
|
|
3589
3685
|
return i ? {
|
|
3590
3686
|
error: i,
|
|
3591
3687
|
activeInputs: r,
|
|
@@ -3599,7 +3695,7 @@ function ci(e) {
|
|
|
3599
3695
|
idleData: t
|
|
3600
3696
|
};
|
|
3601
3697
|
} catch (n) {
|
|
3602
|
-
const i =
|
|
3698
|
+
const i = Z(n, "sql");
|
|
3603
3699
|
return {
|
|
3604
3700
|
error: i,
|
|
3605
3701
|
activeInputs: r,
|
|
@@ -3608,37 +3704,37 @@ function ci(e) {
|
|
|
3608
3704
|
};
|
|
3609
3705
|
}
|
|
3610
3706
|
}
|
|
3611
|
-
function
|
|
3612
|
-
const r =
|
|
3707
|
+
function pi(e) {
|
|
3708
|
+
const r = X(e.inputs);
|
|
3613
3709
|
try {
|
|
3614
|
-
const t =
|
|
3710
|
+
const t = Fr(e), n = ee(t);
|
|
3615
3711
|
return n ? {
|
|
3616
3712
|
error: n,
|
|
3617
3713
|
activeInputs: r,
|
|
3618
3714
|
queryKey: q(void 0, r, n),
|
|
3619
|
-
idleData:
|
|
3715
|
+
idleData: We
|
|
3620
3716
|
} : {
|
|
3621
3717
|
intent: t,
|
|
3622
3718
|
error: null,
|
|
3623
3719
|
activeInputs: r,
|
|
3624
3720
|
queryKey: q(t, r),
|
|
3625
|
-
idleData:
|
|
3721
|
+
idleData: We
|
|
3626
3722
|
};
|
|
3627
3723
|
} catch (t) {
|
|
3628
|
-
const n =
|
|
3724
|
+
const n = Z(t, "matrix");
|
|
3629
3725
|
return {
|
|
3630
3726
|
error: n,
|
|
3631
3727
|
activeInputs: r,
|
|
3632
3728
|
queryKey: q(void 0, r, n),
|
|
3633
|
-
idleData:
|
|
3729
|
+
idleData: We
|
|
3634
3730
|
};
|
|
3635
3731
|
}
|
|
3636
3732
|
}
|
|
3637
|
-
function
|
|
3733
|
+
function Fe(e) {
|
|
3638
3734
|
var o;
|
|
3639
|
-
if (
|
|
3735
|
+
if (gi(e))
|
|
3640
3736
|
return e;
|
|
3641
|
-
const r = e instanceof Error ? e : void 0, t = e, n = t == null ? void 0 : t.executionResult, i =
|
|
3737
|
+
const r = e instanceof Error ? e : void 0, t = e, n = t == null ? void 0 : t.executionResult, i = Te(
|
|
3642
3738
|
(r == null ? void 0 : r.message) ?? String(e),
|
|
3643
3739
|
{
|
|
3644
3740
|
requestId: typeof (t == null ? void 0 : t.requestId) == "string" ? t.requestId : void 0,
|
|
@@ -3650,8 +3746,8 @@ function Me(e) {
|
|
|
3650
3746
|
);
|
|
3651
3747
|
return i.name = (r == null ? void 0 : r.name) || i.name, i.stack = r == null ? void 0 : r.stack, i;
|
|
3652
3748
|
}
|
|
3653
|
-
function
|
|
3654
|
-
const t =
|
|
3749
|
+
function Z(e, r) {
|
|
3750
|
+
const t = Fe(e);
|
|
3655
3751
|
if (t.executionResult || t.validation)
|
|
3656
3752
|
return t;
|
|
3657
3753
|
const n = {
|
|
@@ -3671,39 +3767,39 @@ function te(e, r) {
|
|
|
3671
3767
|
recommendedNextStep: "Update the Data App query spec to satisfy the SDK builder contract."
|
|
3672
3768
|
}
|
|
3673
3769
|
]
|
|
3674
|
-
}, i =
|
|
3770
|
+
}, i = Kr(
|
|
3675
3771
|
void 0,
|
|
3676
3772
|
r,
|
|
3677
3773
|
n
|
|
3678
|
-
), o =
|
|
3774
|
+
), o = Te(t.message, {
|
|
3679
3775
|
executionResult: i,
|
|
3680
3776
|
validation: n,
|
|
3681
3777
|
validationIssues: n.errors
|
|
3682
3778
|
});
|
|
3683
3779
|
return o.stack = t.stack, o;
|
|
3684
3780
|
}
|
|
3685
|
-
function
|
|
3781
|
+
function Te(e, r = {}) {
|
|
3686
3782
|
var i, o, u;
|
|
3687
3783
|
const t = new Error(e);
|
|
3688
3784
|
t.name = "SemaphorDataAppQueryError", t.kind = "data_app_query_error", r.requestId && (t.requestId = r.requestId), r.details !== void 0 && (t.details = r.details), r.executionResult !== void 0 && (t.executionResult = r.executionResult), r.validation !== void 0 && (t.validation = r.validation);
|
|
3689
3785
|
const n = r.validationIssues ?? ((i = r.validation) == null ? void 0 : i.errors) ?? ((u = (o = r.executionResult) == null ? void 0 : o.validation) == null ? void 0 : u.errors);
|
|
3690
3786
|
return n !== void 0 && (t.validationIssues = n), t;
|
|
3691
3787
|
}
|
|
3692
|
-
function
|
|
3788
|
+
function gi(e) {
|
|
3693
3789
|
return e instanceof Error && e.kind === "data_app_query_error";
|
|
3694
3790
|
}
|
|
3695
|
-
function
|
|
3696
|
-
const t =
|
|
3791
|
+
function ee(e, r = e.kind) {
|
|
3792
|
+
const t = at(e);
|
|
3697
3793
|
if (t.ok)
|
|
3698
3794
|
return null;
|
|
3699
3795
|
const n = t.errors.map(
|
|
3700
3796
|
(o) => o.path ? `${o.code} at ${o.path}: ${o.message}` : `${o.code}: ${o.message}`
|
|
3701
|
-
).join("; "), i =
|
|
3797
|
+
).join("; "), i = Kr(
|
|
3702
3798
|
e,
|
|
3703
3799
|
r,
|
|
3704
3800
|
t
|
|
3705
3801
|
);
|
|
3706
|
-
return
|
|
3802
|
+
return Te(
|
|
3707
3803
|
`Invalid Semaphor analytics intent. ${n}`,
|
|
3708
3804
|
{
|
|
3709
3805
|
executionResult: i,
|
|
@@ -3712,7 +3808,7 @@ function ne(e, r = e.kind) {
|
|
|
3712
3808
|
}
|
|
3713
3809
|
);
|
|
3714
3810
|
}
|
|
3715
|
-
function
|
|
3811
|
+
function Kr(e, r, t) {
|
|
3716
3812
|
return {
|
|
3717
3813
|
...e != null && e.id ? { intentId: e.id } : {},
|
|
3718
3814
|
...e ? { intent: e } : {},
|
|
@@ -3759,26 +3855,26 @@ function q(e, r, t, n) {
|
|
|
3759
3855
|
error: t == null ? void 0 : t.message
|
|
3760
3856
|
});
|
|
3761
3857
|
}
|
|
3762
|
-
function
|
|
3858
|
+
function mi() {
|
|
3763
3859
|
return {
|
|
3764
|
-
executeAnalysis: (e, r, t) =>
|
|
3860
|
+
executeAnalysis: (e, r, t) => G(
|
|
3765
3861
|
e,
|
|
3766
3862
|
r,
|
|
3767
3863
|
t ?? {}
|
|
3768
|
-
).then(
|
|
3769
|
-
executeMetric: (e, r) =>
|
|
3770
|
-
executeRecords: (e, r) =>
|
|
3771
|
-
executeInputOptions: (e, r) =>
|
|
3772
|
-
executeSql: (e, r) =>
|
|
3773
|
-
executeMatrix: (e, r) =>
|
|
3864
|
+
).then(Or),
|
|
3865
|
+
executeMetric: (e, r) => G(e, r),
|
|
3866
|
+
executeRecords: (e, r) => G(e, r),
|
|
3867
|
+
executeInputOptions: (e, r) => G(e, r),
|
|
3868
|
+
executeSql: (e, r) => G(e, r),
|
|
3869
|
+
executeMatrix: (e, r) => G(e, r)
|
|
3774
3870
|
};
|
|
3775
3871
|
}
|
|
3776
|
-
async function
|
|
3872
|
+
async function G(e, r, t) {
|
|
3777
3873
|
if (!r.token)
|
|
3778
3874
|
throw new Error(
|
|
3779
3875
|
"SemaphorDataAppProvider needs a token to execute queries."
|
|
3780
3876
|
);
|
|
3781
|
-
const n =
|
|
3877
|
+
const n = xi(r), i = bi(e, n);
|
|
3782
3878
|
let o;
|
|
3783
3879
|
try {
|
|
3784
3880
|
o = await fetch(n, {
|
|
@@ -3792,7 +3888,7 @@ async function Y(e, r, t) {
|
|
|
3792
3888
|
activeInputs: r.activeInputs,
|
|
3793
3889
|
...t ? { analysisOptions: t } : {},
|
|
3794
3890
|
resultShape: e.kind,
|
|
3795
|
-
...
|
|
3891
|
+
...hi(r) ? { debug: { responseDetail: "debug" } } : {}
|
|
3796
3892
|
})
|
|
3797
3893
|
});
|
|
3798
3894
|
} catch (f) {
|
|
@@ -3800,37 +3896,37 @@ async function Y(e, r, t) {
|
|
|
3800
3896
|
`${i}: ${f instanceof Error ? f.message : String(f)}`
|
|
3801
3897
|
);
|
|
3802
3898
|
}
|
|
3803
|
-
const u = await
|
|
3899
|
+
const u = await wi(o);
|
|
3804
3900
|
if (!o.ok || u.error)
|
|
3805
|
-
throw
|
|
3901
|
+
throw yi(
|
|
3806
3902
|
`${i}: ${u.error || `Semaphor Data App execution failed with status ${o.status}.`}`,
|
|
3807
3903
|
u
|
|
3808
3904
|
);
|
|
3809
3905
|
return u;
|
|
3810
3906
|
}
|
|
3811
|
-
function
|
|
3907
|
+
function yi(e, r) {
|
|
3812
3908
|
var t;
|
|
3813
|
-
return
|
|
3909
|
+
return Te(e, {
|
|
3814
3910
|
requestId: r.requestId,
|
|
3815
3911
|
details: r.details,
|
|
3816
3912
|
executionResult: r.executionResult,
|
|
3817
3913
|
validation: (t = r.executionResult) == null ? void 0 : t.validation
|
|
3818
3914
|
});
|
|
3819
3915
|
}
|
|
3820
|
-
function
|
|
3916
|
+
function hi(e) {
|
|
3821
3917
|
const r = e.debug;
|
|
3822
3918
|
return r ? r === !0 ? !0 : r.enabled !== !1 && r.requestServerDebug !== !1 : !1;
|
|
3823
3919
|
}
|
|
3824
|
-
function
|
|
3920
|
+
function bi(e, r) {
|
|
3825
3921
|
return [
|
|
3826
3922
|
`Semaphor ${e.kind} query`,
|
|
3827
3923
|
e.id ? `id=${e.id}` : void 0,
|
|
3828
3924
|
e.label ? `label=${e.label}` : void 0,
|
|
3829
|
-
|
|
3830
|
-
`endpoint=${
|
|
3925
|
+
vi(e),
|
|
3926
|
+
`endpoint=${Si(r)}`
|
|
3831
3927
|
].filter((t) => !!t).join(" ");
|
|
3832
3928
|
}
|
|
3833
|
-
function
|
|
3929
|
+
function vi(e) {
|
|
3834
3930
|
const r = "source" in e ? e.source : void 0;
|
|
3835
3931
|
if (!(!r || typeof r != "object")) {
|
|
3836
3932
|
if (r.kind === "semantic")
|
|
@@ -3849,7 +3945,7 @@ function bi(e) {
|
|
|
3849
3945
|
return r.connectionId ? `source=${r.connectionId}` : void 0;
|
|
3850
3946
|
}
|
|
3851
3947
|
}
|
|
3852
|
-
function
|
|
3948
|
+
function Si(e) {
|
|
3853
3949
|
if (!e)
|
|
3854
3950
|
return "/api/v1/data-app/execute";
|
|
3855
3951
|
try {
|
|
@@ -3858,7 +3954,7 @@ function vi(e) {
|
|
|
3858
3954
|
return e;
|
|
3859
3955
|
}
|
|
3860
3956
|
}
|
|
3861
|
-
async function
|
|
3957
|
+
async function wi(e) {
|
|
3862
3958
|
const r = await e.text().catch(() => "");
|
|
3863
3959
|
if (!r.trim())
|
|
3864
3960
|
return e.ok ? {
|
|
@@ -3871,82 +3967,82 @@ async function Si(e) {
|
|
|
3871
3967
|
error: "Semaphor Data App execution returned invalid JSON.",
|
|
3872
3968
|
details: r
|
|
3873
3969
|
} : {
|
|
3874
|
-
error:
|
|
3970
|
+
error: Ii(e, r),
|
|
3875
3971
|
details: r
|
|
3876
3972
|
};
|
|
3877
3973
|
}
|
|
3878
3974
|
}
|
|
3879
|
-
function
|
|
3975
|
+
function Ii(e, r) {
|
|
3880
3976
|
const t = e.statusText ? ` ${e.statusText}` : "", n = r.replace(/\s+/g, " ").trim();
|
|
3881
3977
|
return n ? `Semaphor Data App execution failed with status ${e.status}${t}: ${n.slice(0, 240)}` : `Semaphor Data App execution failed with status ${e.status}${t}.`;
|
|
3882
3978
|
}
|
|
3883
|
-
function
|
|
3884
|
-
const r =
|
|
3979
|
+
function xi(e) {
|
|
3980
|
+
const r = qi(e).replace(/\/+$/, "");
|
|
3885
3981
|
return r ? r.endsWith("/api") ? `${r}/v1/data-app/execute` : `${r}/api/v1/data-app/execute` : "/api/v1/data-app/execute";
|
|
3886
3982
|
}
|
|
3887
|
-
function
|
|
3983
|
+
function qi(e) {
|
|
3888
3984
|
if (e.apiBaseUrl)
|
|
3889
3985
|
return e.apiBaseUrl;
|
|
3890
3986
|
if (!e.token)
|
|
3891
3987
|
return "";
|
|
3892
3988
|
try {
|
|
3893
|
-
return
|
|
3989
|
+
return st(e.token).apiServiceUrl || "";
|
|
3894
3990
|
} catch {
|
|
3895
3991
|
return "";
|
|
3896
3992
|
}
|
|
3897
3993
|
}
|
|
3898
|
-
const
|
|
3899
|
-
function
|
|
3994
|
+
const Wr = Ie({});
|
|
3995
|
+
function Ti() {
|
|
3900
3996
|
if (!(typeof window > "u"))
|
|
3901
3997
|
return window.__SEMAPHOR_DATA_APP_RUNTIME__;
|
|
3902
3998
|
}
|
|
3903
3999
|
function Ai() {
|
|
3904
|
-
return
|
|
4000
|
+
return Q(Wr);
|
|
3905
4001
|
}
|
|
3906
|
-
function
|
|
3907
|
-
const [r, t] =
|
|
3908
|
-
() =>
|
|
4002
|
+
function Ui(e) {
|
|
4003
|
+
const [r, t] = F(e.defaultValue), n = Object.prototype.hasOwnProperty.call(e, "value"), i = n ? e.value : r, o = I(
|
|
4004
|
+
() => gr(e.options),
|
|
3909
4005
|
[e.options]
|
|
3910
|
-
), u =
|
|
3911
|
-
(
|
|
3912
|
-
var
|
|
3913
|
-
const c =
|
|
3914
|
-
(
|
|
4006
|
+
), u = O(
|
|
4007
|
+
(d) => {
|
|
4008
|
+
var y;
|
|
4009
|
+
const c = d;
|
|
4010
|
+
(y = e.onValueChange) == null || y.call(e, c), n || t(c);
|
|
3915
4011
|
},
|
|
3916
4012
|
[n, e]
|
|
3917
|
-
), f =
|
|
4013
|
+
), f = O(() => u(void 0), [u]);
|
|
3918
4014
|
return I(() => {
|
|
3919
|
-
const
|
|
4015
|
+
const d = mr(e);
|
|
3920
4016
|
return {
|
|
3921
4017
|
id: e.id,
|
|
3922
4018
|
kind: e.kind,
|
|
3923
4019
|
label: e.label,
|
|
3924
|
-
field:
|
|
3925
|
-
operator:
|
|
3926
|
-
relationshipHint:
|
|
4020
|
+
field: d.field,
|
|
4021
|
+
operator: d.operator,
|
|
4022
|
+
relationshipHint: d.relationshipHint,
|
|
3927
4023
|
controlRole: e.kind === "control" ? e.role : void 0,
|
|
3928
4024
|
value: i,
|
|
3929
4025
|
options: o,
|
|
3930
|
-
isActive:
|
|
4026
|
+
isActive: ue(i),
|
|
3931
4027
|
setValue: u,
|
|
3932
4028
|
clear: f,
|
|
3933
4029
|
toAnalyticsInput: () => ({
|
|
3934
|
-
inputId:
|
|
3935
|
-
field:
|
|
4030
|
+
inputId: d.inputId,
|
|
4031
|
+
field: d.field,
|
|
3936
4032
|
kind: e.kind,
|
|
3937
4033
|
label: e.label,
|
|
3938
4034
|
value: i,
|
|
3939
|
-
isActive:
|
|
3940
|
-
operator:
|
|
3941
|
-
relationshipHint:
|
|
4035
|
+
isActive: ue(i),
|
|
4036
|
+
operator: d.operator,
|
|
4037
|
+
relationshipHint: d.relationshipHint,
|
|
3942
4038
|
controlRole: e.kind === "control" ? e.role : void 0
|
|
3943
4039
|
})
|
|
3944
4040
|
};
|
|
3945
4041
|
}, [f, o, u, e, i]);
|
|
3946
4042
|
}
|
|
3947
|
-
function
|
|
3948
|
-
const [r, t] =
|
|
3949
|
-
return
|
|
4043
|
+
function Gi(e) {
|
|
4044
|
+
const [r, t] = F(() => Di(e));
|
|
4045
|
+
return B(() => {
|
|
3950
4046
|
t((n) => {
|
|
3951
4047
|
let i = n;
|
|
3952
4048
|
for (const o of e)
|
|
@@ -3958,13 +4054,13 @@ function Ui(e) {
|
|
|
3958
4054
|
const i = Object.prototype.hasOwnProperty.call(
|
|
3959
4055
|
n,
|
|
3960
4056
|
"value"
|
|
3961
|
-
), o = i ? n.value : r[n.id], u =
|
|
3962
|
-
var
|
|
3963
|
-
(
|
|
3964
|
-
...
|
|
3965
|
-
[n.id]:
|
|
4057
|
+
), o = i ? n.value : r[n.id], u = gr(n.options), f = (y) => {
|
|
4058
|
+
var m;
|
|
4059
|
+
(m = n.onValueChange) == null || m.call(n, y), i || t((v) => ({
|
|
4060
|
+
...v,
|
|
4061
|
+
[n.id]: y
|
|
3966
4062
|
}));
|
|
3967
|
-
},
|
|
4063
|
+
}, d = () => f(void 0), c = mr(n);
|
|
3968
4064
|
return {
|
|
3969
4065
|
id: n.id,
|
|
3970
4066
|
kind: n.kind,
|
|
@@ -3975,16 +4071,16 @@ function Ui(e) {
|
|
|
3975
4071
|
controlRole: n.kind === "control" ? n.role : void 0,
|
|
3976
4072
|
value: o,
|
|
3977
4073
|
options: u,
|
|
3978
|
-
isActive:
|
|
4074
|
+
isActive: ue(o),
|
|
3979
4075
|
setValue: f,
|
|
3980
|
-
clear:
|
|
4076
|
+
clear: d,
|
|
3981
4077
|
toAnalyticsInput: () => ({
|
|
3982
4078
|
inputId: c.inputId,
|
|
3983
4079
|
field: c.field,
|
|
3984
4080
|
kind: n.kind,
|
|
3985
4081
|
label: n.label,
|
|
3986
4082
|
value: o,
|
|
3987
|
-
isActive:
|
|
4083
|
+
isActive: ue(o),
|
|
3988
4084
|
operator: c.operator,
|
|
3989
4085
|
relationshipHint: c.relationshipHint,
|
|
3990
4086
|
controlRole: n.kind === "control" ? n.role : void 0
|
|
@@ -3994,29 +4090,29 @@ function Ui(e) {
|
|
|
3994
4090
|
[e, r]
|
|
3995
4091
|
);
|
|
3996
4092
|
}
|
|
3997
|
-
function
|
|
4093
|
+
function Ji(e, r) {
|
|
3998
4094
|
const t = (r == null ? void 0 : r.status) === "success" ? r.options : void 0, n = I(() => ki(t), [t]);
|
|
3999
|
-
|
|
4095
|
+
B(() => {
|
|
4000
4096
|
Ci(e.value, t) || e.clear();
|
|
4001
4097
|
}, [e, n, r == null ? void 0 : r.status, t]);
|
|
4002
4098
|
}
|
|
4003
4099
|
function Ci(e, r) {
|
|
4004
|
-
if (!
|
|
4100
|
+
if (!ue(e) || r === void 0)
|
|
4005
4101
|
return !0;
|
|
4006
4102
|
const t = new Set(
|
|
4007
|
-
r.map((i) =>
|
|
4103
|
+
r.map((i) => fr(i.value))
|
|
4008
4104
|
);
|
|
4009
4105
|
return (Array.isArray(e) ? e : [e]).every(
|
|
4010
|
-
(i) => t.has(
|
|
4106
|
+
(i) => t.has(fr(i))
|
|
4011
4107
|
);
|
|
4012
4108
|
}
|
|
4013
4109
|
function ki(e) {
|
|
4014
4110
|
return JSON.stringify((e || []).map((r) => r.value));
|
|
4015
4111
|
}
|
|
4016
|
-
function
|
|
4112
|
+
function fr(e) {
|
|
4017
4113
|
return `${typeof e}:${String(e)}`;
|
|
4018
4114
|
}
|
|
4019
|
-
function
|
|
4115
|
+
function Yi(e, r = {}) {
|
|
4020
4116
|
const t = I(
|
|
4021
4117
|
() => r.inputs ? {
|
|
4022
4118
|
...e,
|
|
@@ -4033,39 +4129,39 @@ function Ji(e, r = {}) {
|
|
|
4033
4129
|
case "analysis":
|
|
4034
4130
|
return {
|
|
4035
4131
|
queryKind: t.queryKind,
|
|
4036
|
-
request:
|
|
4132
|
+
request: di(t)
|
|
4037
4133
|
};
|
|
4038
4134
|
case "records":
|
|
4039
4135
|
return {
|
|
4040
4136
|
queryKind: t.queryKind,
|
|
4041
|
-
request:
|
|
4137
|
+
request: ui(t)
|
|
4042
4138
|
};
|
|
4043
4139
|
case "inputOptions":
|
|
4044
4140
|
return {
|
|
4045
4141
|
queryKind: t.queryKind,
|
|
4046
|
-
request:
|
|
4142
|
+
request: ci(t)
|
|
4047
4143
|
};
|
|
4048
4144
|
case "sql":
|
|
4049
4145
|
return {
|
|
4050
4146
|
queryKind: t.queryKind,
|
|
4051
|
-
request:
|
|
4147
|
+
request: fi(t)
|
|
4052
4148
|
};
|
|
4053
4149
|
case "matrix":
|
|
4054
4150
|
return {
|
|
4055
4151
|
queryKind: t.queryKind,
|
|
4056
|
-
request:
|
|
4152
|
+
request: pi(t)
|
|
4057
4153
|
};
|
|
4058
4154
|
default:
|
|
4059
|
-
return
|
|
4155
|
+
return Se(t);
|
|
4060
4156
|
}
|
|
4061
|
-
}, [t]), i =
|
|
4157
|
+
}, [t]), i = Kt({
|
|
4062
4158
|
spec: t,
|
|
4063
4159
|
queryKind: n.queryKind,
|
|
4064
4160
|
queryKey: n.request.queryKey,
|
|
4065
4161
|
intent: n.request.intent,
|
|
4066
4162
|
activeInputs: n.request.activeInputs,
|
|
4067
4163
|
debug: r.debug
|
|
4068
|
-
}), o =
|
|
4164
|
+
}), o = E(null), u = I(
|
|
4069
4165
|
() => ({
|
|
4070
4166
|
start: i.start,
|
|
4071
4167
|
success: i.success,
|
|
@@ -4078,204 +4174,204 @@ function Ji(e, r = {}) {
|
|
|
4078
4174
|
i.start,
|
|
4079
4175
|
i.success
|
|
4080
4176
|
]
|
|
4081
|
-
), f =
|
|
4082
|
-
(
|
|
4083
|
-
var
|
|
4084
|
-
const
|
|
4085
|
-
if (
|
|
4177
|
+
), f = O(
|
|
4178
|
+
(l) => {
|
|
4179
|
+
var K, A, N, $, S, w, L, x, D;
|
|
4180
|
+
const b = n.request;
|
|
4181
|
+
if (b.intent)
|
|
4086
4182
|
switch (n.queryKind) {
|
|
4087
4183
|
case "metric":
|
|
4088
|
-
return (
|
|
4089
|
-
|
|
4090
|
-
|
|
4184
|
+
return (K = l.executor) == null ? void 0 : K.executeMetric(
|
|
4185
|
+
b.intent,
|
|
4186
|
+
l
|
|
4091
4187
|
);
|
|
4092
4188
|
case "analysis":
|
|
4093
|
-
return (
|
|
4189
|
+
return (N = (A = l.executor) == null ? void 0 : A.executeAnalysis) == null ? void 0 : N.call(
|
|
4094
4190
|
A,
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4191
|
+
b.intent,
|
|
4192
|
+
l,
|
|
4193
|
+
b.analysisOptions
|
|
4098
4194
|
);
|
|
4099
4195
|
case "records":
|
|
4100
|
-
return (
|
|
4101
|
-
|
|
4102
|
-
|
|
4196
|
+
return ($ = l.executor) == null ? void 0 : $.executeRecords(
|
|
4197
|
+
b.intent,
|
|
4198
|
+
l
|
|
4103
4199
|
);
|
|
4104
4200
|
case "inputOptions":
|
|
4105
|
-
return (
|
|
4106
|
-
|
|
4107
|
-
|
|
4201
|
+
return (S = l.executor) == null ? void 0 : S.executeInputOptions(
|
|
4202
|
+
b.intent,
|
|
4203
|
+
l
|
|
4108
4204
|
);
|
|
4109
4205
|
case "sql":
|
|
4110
|
-
return (
|
|
4206
|
+
return (L = (w = l.executor) == null ? void 0 : w.executeSql) == null ? void 0 : L.call(
|
|
4111
4207
|
w,
|
|
4112
|
-
|
|
4113
|
-
|
|
4208
|
+
b.intent,
|
|
4209
|
+
l
|
|
4114
4210
|
);
|
|
4115
4211
|
case "matrix":
|
|
4116
|
-
return (
|
|
4212
|
+
return (D = (x = l.executor) == null ? void 0 : x.executeMatrix) == null ? void 0 : D.call(
|
|
4117
4213
|
x,
|
|
4118
|
-
|
|
4119
|
-
|
|
4214
|
+
b.intent,
|
|
4215
|
+
l
|
|
4120
4216
|
);
|
|
4121
4217
|
default:
|
|
4122
|
-
return
|
|
4218
|
+
return Se(n);
|
|
4123
4219
|
}
|
|
4124
4220
|
},
|
|
4125
4221
|
[n]
|
|
4126
|
-
),
|
|
4222
|
+
), d = $i(
|
|
4127
4223
|
n.request.queryKey,
|
|
4128
4224
|
f,
|
|
4129
4225
|
n.request.idleData,
|
|
4130
4226
|
n.request.activeInputs,
|
|
4131
4227
|
u
|
|
4132
|
-
), c = i.queryId,
|
|
4133
|
-
|
|
4134
|
-
const
|
|
4135
|
-
if (!
|
|
4228
|
+
), c = i.queryId, y = i.validationFailure;
|
|
4229
|
+
B(() => {
|
|
4230
|
+
const l = n.request.error;
|
|
4231
|
+
if (!l) {
|
|
4136
4232
|
o.current = null;
|
|
4137
4233
|
return;
|
|
4138
4234
|
}
|
|
4139
|
-
const
|
|
4140
|
-
o.current !==
|
|
4235
|
+
const b = `${c}:${l.message}`;
|
|
4236
|
+
o.current !== b && (o.current = b, y(l));
|
|
4141
4237
|
}, [
|
|
4142
4238
|
n.request.error,
|
|
4143
4239
|
n.request.queryKey,
|
|
4144
4240
|
c,
|
|
4145
|
-
|
|
4241
|
+
y
|
|
4146
4242
|
]);
|
|
4147
|
-
const
|
|
4243
|
+
const m = n.request.error ? n.request.idleData : d.data, v = n.request.error ? "error" : d.status, g = !n.request.error && d.status === "loading", h = n.request.error || d.error, T = i.trace;
|
|
4148
4244
|
switch (n.queryKind) {
|
|
4149
4245
|
case "metric": {
|
|
4150
|
-
const
|
|
4246
|
+
const l = m, b = J({
|
|
4151
4247
|
queryKind: n.queryKind,
|
|
4152
|
-
status:
|
|
4248
|
+
status: v,
|
|
4153
4249
|
isLoading: g,
|
|
4154
|
-
error:
|
|
4155
|
-
trace:
|
|
4156
|
-
payload:
|
|
4250
|
+
error: h,
|
|
4251
|
+
trace: T,
|
|
4252
|
+
payload: l,
|
|
4157
4253
|
activeInputs: n.request.activeInputs,
|
|
4158
|
-
isStale:
|
|
4254
|
+
isStale: d.isStale
|
|
4159
4255
|
});
|
|
4160
4256
|
return {
|
|
4161
4257
|
id: t.id,
|
|
4162
4258
|
intent: n.request.intent,
|
|
4163
|
-
value: (
|
|
4164
|
-
measures:
|
|
4165
|
-
comparisonValue:
|
|
4166
|
-
delta:
|
|
4167
|
-
deltaPercent:
|
|
4168
|
-
records:
|
|
4169
|
-
...
|
|
4259
|
+
value: (l == null ? void 0 : l.value) ?? null,
|
|
4260
|
+
measures: l == null ? void 0 : l.measures,
|
|
4261
|
+
comparisonValue: l == null ? void 0 : l.comparisonValue,
|
|
4262
|
+
delta: l == null ? void 0 : l.delta,
|
|
4263
|
+
deltaPercent: l == null ? void 0 : l.deltaPercent,
|
|
4264
|
+
records: l == null ? void 0 : l.records,
|
|
4265
|
+
...b
|
|
4170
4266
|
};
|
|
4171
4267
|
}
|
|
4172
4268
|
case "analysis": {
|
|
4173
|
-
const
|
|
4269
|
+
const l = Or(m), b = J({
|
|
4174
4270
|
queryKind: n.queryKind,
|
|
4175
|
-
status:
|
|
4271
|
+
status: v,
|
|
4176
4272
|
isLoading: g,
|
|
4177
|
-
error:
|
|
4178
|
-
trace:
|
|
4179
|
-
payload:
|
|
4273
|
+
error: h,
|
|
4274
|
+
trace: T,
|
|
4275
|
+
payload: l,
|
|
4180
4276
|
activeInputs: n.request.activeInputs,
|
|
4181
|
-
isStale:
|
|
4277
|
+
isStale: d.isStale
|
|
4182
4278
|
});
|
|
4183
4279
|
return {
|
|
4184
4280
|
id: t.id,
|
|
4185
4281
|
intent: n.request.intent,
|
|
4186
|
-
...
|
|
4187
|
-
...
|
|
4282
|
+
...l || {},
|
|
4283
|
+
...b
|
|
4188
4284
|
};
|
|
4189
4285
|
}
|
|
4190
4286
|
case "records": {
|
|
4191
|
-
const
|
|
4287
|
+
const l = m, b = J({
|
|
4192
4288
|
queryKind: n.queryKind,
|
|
4193
|
-
status:
|
|
4289
|
+
status: v,
|
|
4194
4290
|
isLoading: g,
|
|
4195
|
-
error:
|
|
4196
|
-
trace:
|
|
4197
|
-
payload:
|
|
4291
|
+
error: h,
|
|
4292
|
+
trace: T,
|
|
4293
|
+
payload: l,
|
|
4198
4294
|
activeInputs: n.request.activeInputs,
|
|
4199
|
-
isStale:
|
|
4295
|
+
isStale: d.isStale
|
|
4200
4296
|
});
|
|
4201
4297
|
return {
|
|
4202
4298
|
id: t.id,
|
|
4203
4299
|
intent: n.request.intent,
|
|
4204
|
-
records: (
|
|
4205
|
-
columns:
|
|
4206
|
-
rowCount:
|
|
4207
|
-
pagination:
|
|
4208
|
-
...
|
|
4300
|
+
records: (l == null ? void 0 : l.records) || [],
|
|
4301
|
+
columns: l == null ? void 0 : l.columns,
|
|
4302
|
+
rowCount: l == null ? void 0 : l.rowCount,
|
|
4303
|
+
pagination: l == null ? void 0 : l.pagination,
|
|
4304
|
+
...b
|
|
4209
4305
|
};
|
|
4210
4306
|
}
|
|
4211
4307
|
case "inputOptions": {
|
|
4212
|
-
const
|
|
4308
|
+
const l = m, b = J({
|
|
4213
4309
|
queryKind: n.queryKind,
|
|
4214
|
-
status:
|
|
4310
|
+
status: v,
|
|
4215
4311
|
isLoading: g,
|
|
4216
|
-
error:
|
|
4217
|
-
trace:
|
|
4218
|
-
payload:
|
|
4312
|
+
error: h,
|
|
4313
|
+
trace: T,
|
|
4314
|
+
payload: l,
|
|
4219
4315
|
activeInputs: n.request.activeInputs,
|
|
4220
|
-
isStale:
|
|
4316
|
+
isStale: d.isStale
|
|
4221
4317
|
});
|
|
4222
4318
|
return {
|
|
4223
4319
|
id: t.id,
|
|
4224
4320
|
intent: n.request.intent,
|
|
4225
|
-
options: (
|
|
4226
|
-
...
|
|
4321
|
+
options: (l == null ? void 0 : l.options) || [],
|
|
4322
|
+
...b
|
|
4227
4323
|
};
|
|
4228
4324
|
}
|
|
4229
4325
|
case "sql": {
|
|
4230
|
-
const
|
|
4326
|
+
const l = m, b = J({
|
|
4231
4327
|
queryKind: n.queryKind,
|
|
4232
|
-
status:
|
|
4328
|
+
status: v,
|
|
4233
4329
|
isLoading: g,
|
|
4234
|
-
error:
|
|
4235
|
-
trace:
|
|
4236
|
-
payload:
|
|
4330
|
+
error: h,
|
|
4331
|
+
trace: T,
|
|
4332
|
+
payload: l,
|
|
4237
4333
|
activeInputs: n.request.activeInputs,
|
|
4238
|
-
isStale:
|
|
4334
|
+
isStale: d.isStale
|
|
4239
4335
|
});
|
|
4240
4336
|
return {
|
|
4241
4337
|
id: t.id,
|
|
4242
4338
|
intent: n.request.intent,
|
|
4243
|
-
records: (
|
|
4244
|
-
columns:
|
|
4245
|
-
rowCount:
|
|
4246
|
-
pagination:
|
|
4247
|
-
output:
|
|
4248
|
-
rowLimitExceeded:
|
|
4249
|
-
...
|
|
4339
|
+
records: (l == null ? void 0 : l.records) || [],
|
|
4340
|
+
columns: l == null ? void 0 : l.columns,
|
|
4341
|
+
rowCount: l == null ? void 0 : l.rowCount,
|
|
4342
|
+
pagination: l == null ? void 0 : l.pagination,
|
|
4343
|
+
output: l == null ? void 0 : l.output,
|
|
4344
|
+
rowLimitExceeded: l == null ? void 0 : l.rowLimitExceeded,
|
|
4345
|
+
...b
|
|
4250
4346
|
};
|
|
4251
4347
|
}
|
|
4252
4348
|
case "matrix": {
|
|
4253
|
-
const
|
|
4349
|
+
const l = m, b = J({
|
|
4254
4350
|
queryKind: n.queryKind,
|
|
4255
|
-
status:
|
|
4351
|
+
status: v,
|
|
4256
4352
|
isLoading: g,
|
|
4257
|
-
error:
|
|
4258
|
-
trace:
|
|
4259
|
-
payload:
|
|
4353
|
+
error: h,
|
|
4354
|
+
trace: T,
|
|
4355
|
+
payload: l,
|
|
4260
4356
|
activeInputs: n.request.activeInputs,
|
|
4261
|
-
isStale:
|
|
4357
|
+
isStale: d.isStale
|
|
4262
4358
|
});
|
|
4263
4359
|
return {
|
|
4264
4360
|
id: t.id,
|
|
4265
4361
|
intent: n.request.intent,
|
|
4266
|
-
matrixResult:
|
|
4267
|
-
grid:
|
|
4268
|
-
expansion:
|
|
4269
|
-
...
|
|
4362
|
+
matrixResult: l == null ? void 0 : l.matrixResult,
|
|
4363
|
+
grid: l == null ? void 0 : l.grid,
|
|
4364
|
+
expansion: l == null ? void 0 : l.expansion,
|
|
4365
|
+
...b
|
|
4270
4366
|
};
|
|
4271
4367
|
}
|
|
4272
4368
|
default:
|
|
4273
|
-
return
|
|
4369
|
+
return Se(n);
|
|
4274
4370
|
}
|
|
4275
4371
|
}
|
|
4276
|
-
function
|
|
4372
|
+
function J(e) {
|
|
4277
4373
|
var o, u, f;
|
|
4278
|
-
const r =
|
|
4374
|
+
const r = Ei(e.payload) ?? ((o = e.error) == null ? void 0 : o.executionResult), t = ((u = e.error) == null ? void 0 : u.validation) ?? (r == null ? void 0 : r.validation), n = r == null ? void 0 : r.coverage, i = r == null ? void 0 : r.diagnosticFeedback;
|
|
4279
4375
|
return {
|
|
4280
4376
|
status: e.status,
|
|
4281
4377
|
executionStatus: r == null ? void 0 : r.status,
|
|
@@ -4284,10 +4380,10 @@ function X(e) {
|
|
|
4284
4380
|
coverage: n,
|
|
4285
4381
|
diagnosticFeedback: i,
|
|
4286
4382
|
isLoading: e.isLoading,
|
|
4287
|
-
isEmpty:
|
|
4288
|
-
isPartial:
|
|
4383
|
+
isEmpty: Li(e.queryKind, e.payload, e.status),
|
|
4384
|
+
isPartial: Ri(e.payload, r),
|
|
4289
4385
|
isFiltered: !!((f = e.activeInputs) != null && f.some(
|
|
4290
|
-
(
|
|
4386
|
+
(d) => d.kind === "filter" && d.isActive
|
|
4291
4387
|
)),
|
|
4292
4388
|
isStale: e.isStale,
|
|
4293
4389
|
isValidated: !!t,
|
|
@@ -4295,64 +4391,64 @@ function X(e) {
|
|
|
4295
4391
|
trace: e.trace
|
|
4296
4392
|
};
|
|
4297
4393
|
}
|
|
4298
|
-
function
|
|
4394
|
+
function Ei(e) {
|
|
4299
4395
|
const r = e;
|
|
4300
4396
|
return r == null ? void 0 : r.executionResult;
|
|
4301
4397
|
}
|
|
4302
|
-
function
|
|
4398
|
+
function Ri(e, r) {
|
|
4303
4399
|
var n, i;
|
|
4304
4400
|
const t = !!(e != null && e.rowLimitExceeded);
|
|
4305
4401
|
return !!((r == null ? void 0 : r.status) === "partial" || ((n = r == null ? void 0 : r.diagnosticFeedback) == null ? void 0 : n.status) === "partial" || (r == null ? void 0 : r.status) !== "failed" && ((i = r == null ? void 0 : r.coverage) != null && i.missingObligations.length) || t);
|
|
4306
4402
|
}
|
|
4307
|
-
function
|
|
4403
|
+
function Li(e, r, t) {
|
|
4308
4404
|
var n, i, o, u, f;
|
|
4309
4405
|
if (t !== "success")
|
|
4310
4406
|
return !1;
|
|
4311
4407
|
switch (e) {
|
|
4312
4408
|
case "metric": {
|
|
4313
|
-
const
|
|
4314
|
-
return (
|
|
4409
|
+
const d = r;
|
|
4410
|
+
return (d == null ? void 0 : d.value) == null && !_(d == null ? void 0 : d.records);
|
|
4315
4411
|
}
|
|
4316
4412
|
case "analysis": {
|
|
4317
|
-
const
|
|
4318
|
-
return
|
|
4319
|
-
(c) =>
|
|
4413
|
+
const d = r;
|
|
4414
|
+
return d ? !d.answerSummary && !_(d.records) && !_(d.changes) && !_(d.drivers) && !_(d.largestNegativeChanges) && !_(d.largestPositiveChanges) && !_(d.largestNegativeDrivers) && !_(d.largestPositiveDrivers) && !Object.values(d.resultSets || {}).some(
|
|
4415
|
+
(c) => _(c.records)
|
|
4320
4416
|
) : !0;
|
|
4321
4417
|
}
|
|
4322
4418
|
case "records": {
|
|
4323
|
-
const
|
|
4324
|
-
return !
|
|
4419
|
+
const d = r;
|
|
4420
|
+
return !_(d == null ? void 0 : d.records);
|
|
4325
4421
|
}
|
|
4326
4422
|
case "sql": {
|
|
4327
|
-
const
|
|
4328
|
-
return !
|
|
4423
|
+
const d = r;
|
|
4424
|
+
return !_(d == null ? void 0 : d.records) && (d == null ? void 0 : d.output) === void 0;
|
|
4329
4425
|
}
|
|
4330
4426
|
case "inputOptions": {
|
|
4331
|
-
const
|
|
4332
|
-
return !((n =
|
|
4427
|
+
const d = r;
|
|
4428
|
+
return !((n = d == null ? void 0 : d.options) != null && n.length);
|
|
4333
4429
|
}
|
|
4334
4430
|
case "matrix": {
|
|
4335
|
-
const
|
|
4336
|
-
return !((o = (i =
|
|
4431
|
+
const d = r;
|
|
4432
|
+
return !((o = (i = d == null ? void 0 : d.matrixResult) == null ? void 0 : i.cells) != null && o.length) && !((f = (u = d == null ? void 0 : d.grid) == null ? void 0 : u.cells) != null && f.length);
|
|
4337
4433
|
}
|
|
4338
4434
|
default:
|
|
4339
|
-
return
|
|
4435
|
+
return Se(e);
|
|
4340
4436
|
}
|
|
4341
4437
|
}
|
|
4342
|
-
function
|
|
4438
|
+
function _(e) {
|
|
4343
4439
|
return Array.isArray(e) && e.length > 0;
|
|
4344
4440
|
}
|
|
4345
|
-
function
|
|
4346
|
-
const o = Ai(), u =
|
|
4441
|
+
function $i(e, r, t, n, i) {
|
|
4442
|
+
const o = Ai(), u = E(r), f = E(n), [d, c] = F({
|
|
4347
4443
|
status: "idle",
|
|
4348
4444
|
data: t,
|
|
4349
4445
|
error: null,
|
|
4350
4446
|
isStale: !1
|
|
4351
4447
|
});
|
|
4352
|
-
return u.current = r, f.current = n,
|
|
4353
|
-
let
|
|
4448
|
+
return u.current = r, f.current = n, B(() => {
|
|
4449
|
+
let y;
|
|
4354
4450
|
try {
|
|
4355
|
-
|
|
4451
|
+
y = u.current({
|
|
4356
4452
|
...o,
|
|
4357
4453
|
activeInputs: f.current
|
|
4358
4454
|
});
|
|
@@ -4360,54 +4456,54 @@ function Li(e, r, t, n, i) {
|
|
|
4360
4456
|
i == null || i.failure(g, 0), c({
|
|
4361
4457
|
status: "error",
|
|
4362
4458
|
data: t,
|
|
4363
|
-
error:
|
|
4459
|
+
error: Fe(g),
|
|
4364
4460
|
isStale: !1
|
|
4365
4461
|
});
|
|
4366
4462
|
return;
|
|
4367
4463
|
}
|
|
4368
|
-
if (!
|
|
4464
|
+
if (!y) {
|
|
4369
4465
|
c({ status: "idle", data: t, error: null, isStale: !1 });
|
|
4370
4466
|
return;
|
|
4371
4467
|
}
|
|
4372
|
-
let
|
|
4373
|
-
const
|
|
4468
|
+
let m = !1;
|
|
4469
|
+
const v = _r();
|
|
4374
4470
|
return i == null || i.start(), c((g) => ({
|
|
4375
4471
|
status: "loading",
|
|
4376
4472
|
data: g.data,
|
|
4377
4473
|
error: null,
|
|
4378
4474
|
isStale: g.isStale || g.status === "success"
|
|
4379
|
-
})),
|
|
4380
|
-
|
|
4475
|
+
})), y.then((g) => {
|
|
4476
|
+
m ? i == null || i.ignored("superseded") : (i == null || i.success(g, pr(v)), c({ status: "success", data: g, error: null, isStale: !1 }));
|
|
4381
4477
|
}).catch((g) => {
|
|
4382
|
-
|
|
4478
|
+
m ? i == null || i.ignored("superseded") : (i == null || i.failure(g, pr(v)), c({
|
|
4383
4479
|
status: "error",
|
|
4384
4480
|
data: t,
|
|
4385
|
-
error:
|
|
4481
|
+
error: Fe(g),
|
|
4386
4482
|
isStale: !1
|
|
4387
4483
|
}));
|
|
4388
4484
|
}), () => {
|
|
4389
|
-
|
|
4485
|
+
m = !0;
|
|
4390
4486
|
};
|
|
4391
|
-
}, [t, e, o, i]),
|
|
4487
|
+
}, [t, e, o, i]), d;
|
|
4392
4488
|
}
|
|
4393
|
-
function
|
|
4489
|
+
function _r() {
|
|
4394
4490
|
return typeof performance < "u" && performance.now ? performance.now() : Date.now();
|
|
4395
4491
|
}
|
|
4396
|
-
function
|
|
4397
|
-
return Math.max(0, Math.round(
|
|
4492
|
+
function pr(e) {
|
|
4493
|
+
return Math.max(0, Math.round(_r() - e));
|
|
4398
4494
|
}
|
|
4399
4495
|
function Di(e) {
|
|
4400
4496
|
return Object.fromEntries(
|
|
4401
4497
|
e.filter((r) => r.defaultValue !== void 0).map((r) => [r.id, r.defaultValue])
|
|
4402
4498
|
);
|
|
4403
4499
|
}
|
|
4404
|
-
function
|
|
4500
|
+
function Se(e) {
|
|
4405
4501
|
throw new Error(`Unsupported Semaphor query kind: ${JSON.stringify(e)}`);
|
|
4406
4502
|
}
|
|
4407
|
-
function
|
|
4503
|
+
function Oi(e) {
|
|
4408
4504
|
return !e || typeof e == "boolean" || e.enabled === !1 ? null : e.autoRenderDevtools === !0 ? {} : e.autoRenderDevtools ? e.autoRenderDevtools : null;
|
|
4409
4505
|
}
|
|
4410
|
-
function
|
|
4506
|
+
function Xi({
|
|
4411
4507
|
token: e,
|
|
4412
4508
|
apiBaseUrl: r,
|
|
4413
4509
|
executor: t,
|
|
@@ -4415,33 +4511,33 @@ function Yi({
|
|
|
4415
4511
|
children: i
|
|
4416
4512
|
}) {
|
|
4417
4513
|
var g;
|
|
4418
|
-
const o =
|
|
4514
|
+
const o = Ti(), u = ((g = o == null ? void 0 : o.authToken) == null ? void 0 : g.accessToken) || e, f = (o == null ? void 0 : o.dataApiBaseUrl) || (o == null ? void 0 : o.apiBaseUrl) || r, d = (o == null ? void 0 : o.debug) ?? n, c = Oi(d), y = I(() => mi(), []), m = t || y, v = I(
|
|
4419
4515
|
() => ({
|
|
4420
4516
|
token: u,
|
|
4421
4517
|
apiBaseUrl: f,
|
|
4422
|
-
executor:
|
|
4423
|
-
debug:
|
|
4518
|
+
executor: m,
|
|
4519
|
+
debug: d
|
|
4424
4520
|
}),
|
|
4425
|
-
[f,
|
|
4521
|
+
[f, d, m, u]
|
|
4426
4522
|
);
|
|
4427
|
-
return /* @__PURE__ */
|
|
4523
|
+
return /* @__PURE__ */ a($t, { debug: d, children: /* @__PURE__ */ p(Wr.Provider, { value: v, children: [
|
|
4428
4524
|
i,
|
|
4429
|
-
c ? /* @__PURE__ */
|
|
4525
|
+
c ? /* @__PURE__ */ a(Bt, { ...c }) : null
|
|
4430
4526
|
] }) });
|
|
4431
4527
|
}
|
|
4432
4528
|
export {
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4529
|
+
Xi as SemaphorDataAppProvider,
|
|
4530
|
+
Bt as SemaphorDevtools,
|
|
4531
|
+
Qi as SemaphorDevtoolsInspectButton,
|
|
4532
|
+
Vi as SemaphorViewBoundary,
|
|
4533
|
+
mi as createSemaphorQueryExecutor,
|
|
4534
|
+
Mi as defineSemaphorDataApp,
|
|
4535
|
+
ji as defineSemaphorInput,
|
|
4440
4536
|
Ci as isSemaphorInputValueValidForOptions,
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4537
|
+
Hi as semaphor,
|
|
4538
|
+
Ji as useClearInvalidSemaphorInputValue,
|
|
4539
|
+
qr as useSemaphorDevtools,
|
|
4540
|
+
Ui as useSemaphorInput,
|
|
4541
|
+
Gi as useSemaphorInputs,
|
|
4542
|
+
Yi as useSemaphorQuery
|
|
4447
4543
|
};
|