@voltro/devtools 0.83.0 → 0.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +717 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +1260 -1037
- package/dist/styles.css +45 -10
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Component as e, createContext as t, useCallback as n, useContext as r, useEffect as i, useId as a, useLayoutEffect as o, useMemo as s, useRef as c, useState as l, useSyncExternalStore as u } from "react";
|
|
2
2
|
import { addSink as d } from "@voltro/logger";
|
|
3
3
|
import { getRouteSnapshot as f, getStatuses as p, subscribeConsoleCalls as m, subscribeRouteSnapshot as h, subscribeStatuses as g, useAppUpdate as _, useInstallPrompt as v, useOfflineStatus as y } from "@voltro/web";
|
|
4
|
-
import { clearStoreHistory as b, definedStores as x, getMutations as S, readPairing as C, storeHistory as w, subscribeMutations as T, subscribeStoreHistory as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { createPortal as
|
|
4
|
+
import { clearStoreHistory as b, definedStores as x, getMutations as S, readPairing as C, storeHistory as w, subscribeMutations as T, subscribeStoreHistory as ee, travelToStoreState as E, useConnectionStatus as D, useFrameworkRuntimes as O, usePlatform as k, useShellExtension as te, useWorkflow as A } from "@voltro/client";
|
|
5
|
+
import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
6
|
+
import { createPortal as ne } from "react-dom";
|
|
7
7
|
//#region src/consoleBridge.ts
|
|
8
|
-
var
|
|
8
|
+
var P = (e) => e === "warn" || e === "error", F = (e) => {
|
|
9
9
|
if (typeof e == "string") return e;
|
|
10
10
|
if (e instanceof Error) return `${e.name}: ${e.message}`;
|
|
11
11
|
if (e === void 0) return "undefined";
|
|
@@ -39,7 +39,7 @@ var ne = (e) => e === "warn" || e === "error", F = (e) => {
|
|
|
39
39
|
fields: {},
|
|
40
40
|
...r === void 0 ? {} : { cause: r }
|
|
41
41
|
};
|
|
42
|
-
}, R = Symbol.for("voltro.devtools.consoleBridge"),
|
|
42
|
+
}, R = Symbol.for("voltro.devtools.consoleBridge"), z = (e, t = m) => {
|
|
43
43
|
let n = globalThis, r = n[R];
|
|
44
44
|
if (r !== void 0) return r;
|
|
45
45
|
let i = [], a = !1, o = () => {
|
|
@@ -60,7 +60,7 @@ var ne = (e) => e === "warn" || e === "error", F = (e) => {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}, l = t((e) => {
|
|
63
|
-
if (
|
|
63
|
+
if (P(e.level)) try {
|
|
64
64
|
s(I(e.level, e.args, new Date(e.ts)));
|
|
65
65
|
} catch {}
|
|
66
66
|
}), u = (t) => {
|
|
@@ -76,23 +76,23 @@ var ne = (e) => e === "warn" || e === "error", F = (e) => {
|
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
return n[R] = p, p;
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
for (let e of
|
|
79
|
+
}, B = 500, re = [], V = /* @__PURE__ */ new Set(), ie = [], ae = () => {
|
|
80
|
+
ie = re.slice();
|
|
81
|
+
}, oe = () => {
|
|
82
|
+
ae();
|
|
83
|
+
for (let e of V) try {
|
|
84
84
|
e();
|
|
85
85
|
} catch {}
|
|
86
|
-
},
|
|
86
|
+
}, se = typeof window < "u" ? z(ce) : null;
|
|
87
87
|
d((e) => {
|
|
88
|
-
|
|
88
|
+
se?.noteLoggerRecord(e), ce(e);
|
|
89
89
|
});
|
|
90
|
-
function
|
|
91
|
-
|
|
90
|
+
function ce(e) {
|
|
91
|
+
re.unshift(e), re.length > B && (re.length = B), oe();
|
|
92
92
|
}
|
|
93
|
-
var
|
|
94
|
-
|
|
95
|
-
}),
|
|
93
|
+
var le = () => ie, ue = (e) => (V.add(e), () => {
|
|
94
|
+
V.delete(e);
|
|
95
|
+
}), H = (e) => ({ className: t }) => /* @__PURE__ */ M("svg", {
|
|
96
96
|
viewBox: "0 0 24 24",
|
|
97
97
|
fill: "none",
|
|
98
98
|
stroke: "currentColor",
|
|
@@ -102,217 +102,221 @@ var ue = () => ae, de = (e) => (B.add(e), () => {
|
|
|
102
102
|
className: t ?? "vdt:w-4 vdt:h-4",
|
|
103
103
|
"aria-hidden": "true",
|
|
104
104
|
children: e
|
|
105
|
-
}),
|
|
105
|
+
}), de = ({ className: e }) => {
|
|
106
106
|
let t = a(), n = `vdtBoltFront-${t}`, r = `vdtBoltBack-${t}`;
|
|
107
|
-
return /* @__PURE__ */
|
|
107
|
+
return /* @__PURE__ */ N("svg", {
|
|
108
108
|
viewBox: "0 0 48 48",
|
|
109
109
|
fill: "none",
|
|
110
110
|
className: e,
|
|
111
111
|
"aria-hidden": "true",
|
|
112
112
|
children: [
|
|
113
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ N("defs", { children: [/* @__PURE__ */ N("linearGradient", {
|
|
114
114
|
id: n,
|
|
115
115
|
x1: "13",
|
|
116
116
|
y1: "5",
|
|
117
117
|
x2: "33",
|
|
118
118
|
y2: "43",
|
|
119
119
|
gradientUnits: "userSpaceOnUse",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ M("stop", { stopColor: "#C4A6FF" }), /* @__PURE__ */ M("stop", {
|
|
121
121
|
offset: "1",
|
|
122
122
|
stopColor: "#9D5BFF"
|
|
123
123
|
})]
|
|
124
|
-
}), /* @__PURE__ */
|
|
124
|
+
}), /* @__PURE__ */ N("linearGradient", {
|
|
125
125
|
id: r,
|
|
126
126
|
x1: "22",
|
|
127
127
|
y1: "5",
|
|
128
128
|
x2: "35",
|
|
129
129
|
y2: "43",
|
|
130
130
|
gradientUnits: "userSpaceOnUse",
|
|
131
|
-
children: [/* @__PURE__ */
|
|
131
|
+
children: [/* @__PURE__ */ M("stop", { stopColor: "#9D5BFF" }), /* @__PURE__ */ M("stop", {
|
|
132
132
|
offset: "1",
|
|
133
133
|
stopColor: "#7C3AED"
|
|
134
134
|
})]
|
|
135
135
|
})] }),
|
|
136
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ M("path", {
|
|
137
137
|
d: "M28 5 13 27 22 26 20 43Z",
|
|
138
138
|
fill: `url(#${n})`
|
|
139
139
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ M("path", {
|
|
141
141
|
d: "M28 5 20 43 35 21 26 22Z",
|
|
142
142
|
fill: `url(#${r})`
|
|
143
143
|
})
|
|
144
144
|
]
|
|
145
145
|
});
|
|
146
|
-
},
|
|
146
|
+
}, fe = H(/* @__PURE__ */ M("polyline", { points: "6 9 12 15 18 9" })), pe = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("line", {
|
|
147
147
|
x1: "18",
|
|
148
148
|
y1: "6",
|
|
149
149
|
x2: "6",
|
|
150
150
|
y2: "18"
|
|
151
|
-
}), /* @__PURE__ */
|
|
151
|
+
}), /* @__PURE__ */ M("line", {
|
|
152
152
|
x1: "6",
|
|
153
153
|
y1: "6",
|
|
154
154
|
x2: "18",
|
|
155
155
|
y2: "18"
|
|
156
|
-
})] })),
|
|
157
|
-
/* @__PURE__ */
|
|
156
|
+
})] })), me = H(/* @__PURE__ */ M("polyline", { points: "22 12 18 12 15 21 9 3 6 12 2 12" })), he = H(/* @__PURE__ */ N(j, { children: [
|
|
157
|
+
/* @__PURE__ */ M("ellipse", {
|
|
158
158
|
cx: "12",
|
|
159
159
|
cy: "5",
|
|
160
160
|
rx: "9",
|
|
161
161
|
ry: "3"
|
|
162
162
|
}),
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
] })),
|
|
163
|
+
/* @__PURE__ */ M("path", { d: "M3 5 v6 c0 1.66 4 3 9 3 s9 -1.34 9 -3 V5" }),
|
|
164
|
+
/* @__PURE__ */ M("path", { d: "M3 11 v6 c0 1.66 4 3 9 3 s9 -1.34 9 -3 v-6" })
|
|
165
|
+
] })), ge = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("circle", {
|
|
166
166
|
cx: "12",
|
|
167
167
|
cy: "12",
|
|
168
168
|
r: "10"
|
|
169
|
-
}), /* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
] })),
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
] })),
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
] })),
|
|
184
|
-
/* @__PURE__ */
|
|
169
|
+
}), /* @__PURE__ */ M("polygon", { points: "16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76" })] })), _e = H(/* @__PURE__ */ N(j, { children: [
|
|
170
|
+
/* @__PURE__ */ M("path", { d: "M12 22 v-5" }),
|
|
171
|
+
/* @__PURE__ */ M("path", { d: "M9 8 V2" }),
|
|
172
|
+
/* @__PURE__ */ M("path", { d: "M15 8 V2" }),
|
|
173
|
+
/* @__PURE__ */ M("path", { d: "M18 8 v4 a6 6 0 0 1 -12 0 V8 z" })
|
|
174
|
+
] })), ve = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("polyline", { points: "17 11 12 6 7 11" }), /* @__PURE__ */ M("polyline", { points: "17 17 12 22 7 17" })] })), ye = H(/* @__PURE__ */ N(j, { children: [
|
|
175
|
+
/* @__PURE__ */ M("polyline", { points: "3 6 5 6 21 6" }),
|
|
176
|
+
/* @__PURE__ */ M("path", { d: "M19 6 l-1 14 c-.05 1.1 -.96 2 -2 2 H8 c-1.04 0 -1.95 -.9 -2 -2 L5 6" }),
|
|
177
|
+
/* @__PURE__ */ M("path", { d: "M10 11 v6" }),
|
|
178
|
+
/* @__PURE__ */ M("path", { d: "M14 11 v6" })
|
|
179
|
+
] })), be = H(/* @__PURE__ */ N(j, { children: [
|
|
180
|
+
/* @__PURE__ */ M("path", { d: "M18 16.98 h-5.99 c-1.1 0 -1.95 .94 -2.48 1.9 A4 4 0 0 1 2 17 c0 -1.42 .76 -2.66 1.9 -3.34" }),
|
|
181
|
+
/* @__PURE__ */ M("path", { d: "M6 17 l3.13 -5.78 c.53 -.97 .43 -2.22 -.26 -3.07 A4 4 0 1 1 17 7" }),
|
|
182
|
+
/* @__PURE__ */ M("path", { d: "M16 6.78 a4 4 0 1 1 5 6.31 c-.84 .6 -1.36 1.59 -1.36 2.61" })
|
|
183
|
+
] })), xe = H(/* @__PURE__ */ N(j, { children: [
|
|
184
|
+
/* @__PURE__ */ M("rect", {
|
|
185
185
|
x: "3",
|
|
186
186
|
y: "3",
|
|
187
187
|
width: "6",
|
|
188
188
|
height: "6",
|
|
189
189
|
rx: "1"
|
|
190
190
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ M("rect", {
|
|
192
192
|
x: "15",
|
|
193
193
|
y: "15",
|
|
194
194
|
width: "6",
|
|
195
195
|
height: "6",
|
|
196
196
|
rx: "1"
|
|
197
197
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
] })),
|
|
201
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ M("path", { d: "M9 6h3a3 3 0 0 1 3 3v3" }),
|
|
199
|
+
/* @__PURE__ */ M("path", { d: "M15 18h-3a3 3 0 0 1-3-3v-3" })
|
|
200
|
+
] })), Se = H(/* @__PURE__ */ N(j, { children: [
|
|
201
|
+
/* @__PURE__ */ M("line", {
|
|
202
202
|
x1: "6",
|
|
203
203
|
y1: "3",
|
|
204
204
|
x2: "6",
|
|
205
205
|
y2: "15"
|
|
206
206
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ M("circle", {
|
|
208
208
|
cx: "18",
|
|
209
209
|
cy: "6",
|
|
210
210
|
r: "3"
|
|
211
211
|
}),
|
|
212
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ M("circle", {
|
|
213
213
|
cx: "6",
|
|
214
214
|
cy: "18",
|
|
215
215
|
r: "3"
|
|
216
216
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
218
|
-
] })),
|
|
217
|
+
/* @__PURE__ */ M("path", { d: "M18 9 a9 9 0 0 1 -9 9" })
|
|
218
|
+
] })), Ce = H(/* @__PURE__ */ M("path", { d: "m13 2-9 12h7l-1 8 10-12h-7l1-8z" })), we = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("circle", {
|
|
219
219
|
cx: "11",
|
|
220
220
|
cy: "11",
|
|
221
221
|
r: "7"
|
|
222
|
-
}), /* @__PURE__ */
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
/* @__PURE__ */
|
|
222
|
+
}), /* @__PURE__ */ M("path", { d: "m20 20-3.5-3.5" })] })), Te = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("path", { d: "M4 12h12M12 6l6 6-6 6" }), /* @__PURE__ */ M("path", { d: "M4 4v16" })] })), Ee = H(/* @__PURE__ */ N(j, { children: [
|
|
223
|
+
/* @__PURE__ */ M("path", { d: "M4 6h16M4 12h10M4 18h6" }),
|
|
224
|
+
/* @__PURE__ */ M("circle", {
|
|
225
225
|
cx: "18",
|
|
226
226
|
cy: "17",
|
|
227
227
|
r: "3"
|
|
228
228
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
-
] })),
|
|
229
|
+
/* @__PURE__ */ M("path", { d: "m20.5 19.5 2 2" })
|
|
230
|
+
] })), De = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("path", { d: "M5 4h14v16H5z" }), /* @__PURE__ */ M("path", { d: "M8 8h8M8 12h8M8 16h5" })] })), Oe = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("rect", {
|
|
231
231
|
x: "3",
|
|
232
232
|
y: "4",
|
|
233
233
|
width: "18",
|
|
234
234
|
height: "12",
|
|
235
235
|
rx: "2"
|
|
236
|
-
}), /* @__PURE__ */
|
|
236
|
+
}), /* @__PURE__ */ M("path", { d: "M8 20h8M12 16v4" })] })), ke = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("rect", {
|
|
237
237
|
x: "3",
|
|
238
238
|
y: "4",
|
|
239
239
|
width: "18",
|
|
240
240
|
height: "16",
|
|
241
241
|
rx: "2"
|
|
242
|
-
}), /* @__PURE__ */
|
|
242
|
+
}), /* @__PURE__ */ M("path", { d: "M3 14h18" })] })), Ae = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("rect", {
|
|
243
243
|
x: "3",
|
|
244
244
|
y: "4",
|
|
245
245
|
width: "18",
|
|
246
246
|
height: "16",
|
|
247
247
|
rx: "2"
|
|
248
|
-
}), /* @__PURE__ */
|
|
248
|
+
}), /* @__PURE__ */ M("path", { d: "M3 10h18" })] })), je = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("rect", {
|
|
249
249
|
x: "3",
|
|
250
250
|
y: "4",
|
|
251
251
|
width: "18",
|
|
252
252
|
height: "16",
|
|
253
253
|
rx: "2"
|
|
254
|
-
}), /* @__PURE__ */
|
|
254
|
+
}), /* @__PURE__ */ M("path", { d: "M9 4v16" })] })), Me = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("rect", {
|
|
255
255
|
x: "3",
|
|
256
256
|
y: "4",
|
|
257
257
|
width: "18",
|
|
258
258
|
height: "16",
|
|
259
259
|
rx: "2"
|
|
260
|
-
}), /* @__PURE__ */
|
|
260
|
+
}), /* @__PURE__ */ M("path", { d: "M15 4v16" })] })), Ne = H(/* @__PURE__ */ N(j, { children: [
|
|
261
|
+
/* @__PURE__ */ M("path", { d: "M14 4h6v6" }),
|
|
262
|
+
/* @__PURE__ */ M("path", { d: "M20 4l-8 8" }),
|
|
263
|
+
/* @__PURE__ */ M("path", { d: "M18 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4" })
|
|
264
|
+
] })), Pe = H(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("rect", {
|
|
261
265
|
x: "7",
|
|
262
266
|
y: "8",
|
|
263
267
|
width: "14",
|
|
264
268
|
height: "12",
|
|
265
269
|
rx: "2"
|
|
266
|
-
}), /* @__PURE__ */
|
|
267
|
-
/* @__PURE__ */
|
|
270
|
+
}), /* @__PURE__ */ M("path", { d: "M3 14V6a2 2 0 0 1 2-2h8" })] })), Fe = H(/* @__PURE__ */ N(j, { children: [
|
|
271
|
+
/* @__PURE__ */ M("circle", {
|
|
268
272
|
cx: "9",
|
|
269
273
|
cy: "6",
|
|
270
274
|
r: "1",
|
|
271
275
|
fill: "currentColor"
|
|
272
276
|
}),
|
|
273
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ M("circle", {
|
|
274
278
|
cx: "15",
|
|
275
279
|
cy: "6",
|
|
276
280
|
r: "1",
|
|
277
281
|
fill: "currentColor"
|
|
278
282
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ M("circle", {
|
|
280
284
|
cx: "9",
|
|
281
285
|
cy: "12",
|
|
282
286
|
r: "1",
|
|
283
287
|
fill: "currentColor"
|
|
284
288
|
}),
|
|
285
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ M("circle", {
|
|
286
290
|
cx: "15",
|
|
287
291
|
cy: "12",
|
|
288
292
|
r: "1",
|
|
289
293
|
fill: "currentColor"
|
|
290
294
|
}),
|
|
291
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ M("circle", {
|
|
292
296
|
cx: "9",
|
|
293
297
|
cy: "18",
|
|
294
298
|
r: "1",
|
|
295
299
|
fill: "currentColor"
|
|
296
300
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ M("circle", {
|
|
298
302
|
cx: "15",
|
|
299
303
|
cy: "18",
|
|
300
304
|
r: "1",
|
|
301
305
|
fill: "currentColor"
|
|
302
306
|
})
|
|
303
|
-
] })), Ie = ({ className: e }) => /* @__PURE__ */
|
|
307
|
+
] })), Ie = ({ className: e }) => /* @__PURE__ */ N("svg", {
|
|
304
308
|
viewBox: "0 0 24 24",
|
|
305
309
|
fill: "none",
|
|
306
310
|
className: e,
|
|
307
311
|
"aria-hidden": "true",
|
|
308
|
-
children: [/* @__PURE__ */
|
|
312
|
+
children: [/* @__PURE__ */ M("circle", {
|
|
309
313
|
cx: "12",
|
|
310
314
|
cy: "12",
|
|
311
315
|
r: "9",
|
|
312
316
|
stroke: "currentColor",
|
|
313
317
|
strokeOpacity: "0.2",
|
|
314
318
|
strokeWidth: "2.5"
|
|
315
|
-
}), /* @__PURE__ */
|
|
319
|
+
}), /* @__PURE__ */ M("path", {
|
|
316
320
|
d: "M21 12 a9 9 0 0 0 -9 -9",
|
|
317
321
|
stroke: "currentColor",
|
|
318
322
|
strokeWidth: "2.5",
|
|
@@ -324,7 +328,7 @@ var ue = () => ae, de = (e) => (B.add(e), () => {
|
|
|
324
328
|
brandWord: "Voltro",
|
|
325
329
|
kicker: "Devtools",
|
|
326
330
|
openLabel: "Open Voltro Devtools",
|
|
327
|
-
openTitle: "Open Voltro Devtools (Alt+V)",
|
|
331
|
+
openTitle: "Open Voltro Devtools (Alt+V) · drag to move",
|
|
328
332
|
closeTitle: "Close (Alt+V)",
|
|
329
333
|
searchPlaceholder: "Search subscriptions, mutations, actions, traces, logs…",
|
|
330
334
|
searchLabel: "Search",
|
|
@@ -333,9 +337,11 @@ var ue = () => ae, de = (e) => (B.add(e), () => {
|
|
|
333
337
|
dockTop: "Dock to top",
|
|
334
338
|
dockLeft: "Dock to left",
|
|
335
339
|
dockRight: "Dock to right",
|
|
336
|
-
dockWindow: "
|
|
340
|
+
dockWindow: "Floating window",
|
|
341
|
+
dockExternal: "Own browser window",
|
|
342
|
+
externalBlocked: "The browser blocked the console window — allow pop-ups for this page, or click the capsule to try again.",
|
|
337
343
|
pushPage: "Push the page",
|
|
338
|
-
pushPageHint: "
|
|
344
|
+
pushPageHint: "Lays the page out beside the console, dialogs included. 100vw and media queries still see the full window.",
|
|
339
345
|
resizeLabel: "Resize",
|
|
340
346
|
moveTitle: "Drag to move",
|
|
341
347
|
scopeAll: "All",
|
|
@@ -539,7 +545,7 @@ var ue = () => ae, de = (e) => (B.add(e), () => {
|
|
|
539
545
|
collapse: "collapse",
|
|
540
546
|
expand: "expand",
|
|
541
547
|
noLoaderTitle: "No loader data for this route.",
|
|
542
|
-
noLoaderHint: (e) => /* @__PURE__ */
|
|
548
|
+
noLoaderHint: (e) => /* @__PURE__ */ N(j, { children: [
|
|
543
549
|
"Pages with an exported `loader` see their resolved data here. UI-only apps (no ",
|
|
544
550
|
e,
|
|
545
551
|
") don't surface loader state at all."
|
|
@@ -561,7 +567,7 @@ var ue = () => ae, de = (e) => (B.add(e), () => {
|
|
|
561
567
|
noApi: "No API connected. Traces appear once a `useMutation` / `useSubscription` call runs.",
|
|
562
568
|
noneCaptured: (e) => `${e} — no traces captured yet. Trigger an action.`,
|
|
563
569
|
proxiedTitle: "Traces aren't fetchable from this browser — the API is reached over a proxied socket, so there's no direct inspect origin for this panel.",
|
|
564
|
-
proxiedHint: (e) => /* @__PURE__ */
|
|
570
|
+
proxiedHint: (e) => /* @__PURE__ */ N(j, { children: [
|
|
565
571
|
"They're still recorded server-side. Use ",
|
|
566
572
|
e,
|
|
567
573
|
" or open the app's",
|
|
@@ -634,12 +640,12 @@ var ue = () => ae, de = (e) => (B.add(e), () => {
|
|
|
634
640
|
});
|
|
635
641
|
function Be(e) {
|
|
636
642
|
let t = r(Re), n = s(() => ze(t, e.strings), [t, e.strings]);
|
|
637
|
-
return /* @__PURE__ */
|
|
643
|
+
return /* @__PURE__ */ M(Re.Provider, {
|
|
638
644
|
value: n,
|
|
639
645
|
children: e.children
|
|
640
646
|
});
|
|
641
647
|
}
|
|
642
|
-
var
|
|
648
|
+
var U = (e) => {
|
|
643
649
|
let t = r(Re);
|
|
644
650
|
return s(() => e ? ze(t, e) : t, [t, e]);
|
|
645
651
|
}, Ve = {
|
|
@@ -651,7 +657,7 @@ var H = (e) => {
|
|
|
651
657
|
}, He = {
|
|
652
658
|
sm: "vdt:text-xs vdt:px-2 vdt:py-1 vdt:rounded-sm",
|
|
653
659
|
md: "vdt:text-sm vdt:px-3 vdt:py-1.5 vdt:rounded-md"
|
|
654
|
-
},
|
|
660
|
+
}, W = ({ variant: e = "default", size: t = "md", onClick: n, disabled: r, children: i, className: a, title: o }) => /* @__PURE__ */ M("button", {
|
|
655
661
|
onClick: n,
|
|
656
662
|
disabled: r,
|
|
657
663
|
title: o,
|
|
@@ -670,7 +676,7 @@ var H = (e) => {
|
|
|
670
676
|
danger: "vdt:bg-danger/15 vdt:text-danger vdt:border vdt:border-danger/30",
|
|
671
677
|
info: "vdt:bg-info/15 vdt:text-info vdt:border vdt:border-info/30",
|
|
672
678
|
accent: "vdt:bg-accent/15 vdt:text-accent vdt:border vdt:border-accent/30"
|
|
673
|
-
},
|
|
679
|
+
}, G = ({ tone: e = "neutral", children: t, className: n }) => /* @__PURE__ */ M("span", {
|
|
674
680
|
className: [
|
|
675
681
|
"vdt:inline-flex vdt:items-center vdt:gap-1 vdt:px-1.5 vdt:py-0.5",
|
|
676
682
|
"vdt:rounded-sm vdt:text-[10px] vdt:font-medium vdt:uppercase vdt:tracking-wider",
|
|
@@ -678,36 +684,36 @@ var H = (e) => {
|
|
|
678
684
|
n ?? ""
|
|
679
685
|
].join(" "),
|
|
680
686
|
children: t
|
|
681
|
-
}),
|
|
687
|
+
}), K = ({ children: e, className: t }) => /* @__PURE__ */ M("div", {
|
|
682
688
|
className: ["vdt:bg-background-elevated vdt:border vdt:border-border vdt:rounded-md", t ?? ""].join(" "),
|
|
683
689
|
children: e
|
|
684
|
-
}), We = ({ children: e, className: t }) => /* @__PURE__ */
|
|
690
|
+
}), We = ({ children: e, className: t }) => /* @__PURE__ */ M("div", {
|
|
685
691
|
className: ["vdt-card-body", t ?? ""].join(" "),
|
|
686
692
|
children: e
|
|
687
|
-
}),
|
|
693
|
+
}), q = ({ children: e, right: t, Icon: n }) => /* @__PURE__ */ N("div", {
|
|
688
694
|
className: "vdt:flex vdt:items-center vdt:justify-between vdt:px-3 vdt:py-2 vdt:border-b vdt:border-border",
|
|
689
|
-
children: [/* @__PURE__ */
|
|
695
|
+
children: [/* @__PURE__ */ N("div", {
|
|
690
696
|
className: "vdt:flex vdt:items-center vdt:gap-1.5",
|
|
691
|
-
children: [n ? /* @__PURE__ */
|
|
697
|
+
children: [n ? /* @__PURE__ */ M(n, { className: "vdt:w-3 vdt:h-3 vdt:text-foreground-muted" }) : null, /* @__PURE__ */ M("span", {
|
|
692
698
|
className: "vdt:text-[10px] vdt:font-semibold vdt:uppercase vdt:tracking-wider vdt:text-foreground-muted",
|
|
693
699
|
children: e
|
|
694
700
|
})]
|
|
695
701
|
}), t ?? null]
|
|
696
|
-
}),
|
|
702
|
+
}), J = ({ entries: e }) => /* @__PURE__ */ M("dl", {
|
|
697
703
|
className: "vdt:grid vdt:grid-cols-[auto_1fr] vdt:gap-x-3 vdt:gap-y-1 vdt:px-3 vdt:py-2 vdt:text-xs",
|
|
698
|
-
children: e.map((e) => /* @__PURE__ */
|
|
704
|
+
children: e.map((e) => /* @__PURE__ */ N("div", {
|
|
699
705
|
className: "vdt:contents",
|
|
700
|
-
children: [/* @__PURE__ */
|
|
706
|
+
children: [/* @__PURE__ */ M("dt", {
|
|
701
707
|
className: "vdt:text-foreground-muted vdt:font-medium",
|
|
702
708
|
children: e.key
|
|
703
|
-
}), /* @__PURE__ */
|
|
709
|
+
}), /* @__PURE__ */ M("dd", {
|
|
704
710
|
className: "vdt:font-mono vdt:text-foreground vdt:break-all",
|
|
705
711
|
children: e.value
|
|
706
712
|
})]
|
|
707
713
|
}, e.key))
|
|
708
|
-
}),
|
|
714
|
+
}), Y = ({ children: e }) => /* @__PURE__ */ M("div", {
|
|
709
715
|
className: "vdt:flex vdt:items-center vdt:justify-center vdt:py-12 vdt:px-6 vdt:text-center",
|
|
710
|
-
children: /* @__PURE__ */
|
|
716
|
+
children: /* @__PURE__ */ M("div", {
|
|
711
717
|
className: "vdt:text-xs vdt:text-foreground-subtle vdt:max-w-xs",
|
|
712
718
|
children: e
|
|
713
719
|
})
|
|
@@ -726,13 +732,13 @@ var H = (e) => {
|
|
|
726
732
|
return t(), () => clearInterval(i);
|
|
727
733
|
}, [e]), t;
|
|
728
734
|
}, Je = () => {
|
|
729
|
-
let e =
|
|
735
|
+
let e = O();
|
|
730
736
|
return e.names.map((t) => ({
|
|
731
737
|
name: t,
|
|
732
738
|
entries: e.get(t).cache.peekAll()
|
|
733
739
|
}));
|
|
734
740
|
}, Ye = () => {
|
|
735
|
-
let e =
|
|
741
|
+
let e = O();
|
|
736
742
|
return qe((e.names[0] ? e.get(e.names[0]) : null)?.cache ?? null), Je();
|
|
737
743
|
}, Xe = (e) => {
|
|
738
744
|
if (e instanceof Error) {
|
|
@@ -758,9 +764,9 @@ var H = (e) => {
|
|
|
758
764
|
}
|
|
759
765
|
} catch {}
|
|
760
766
|
return e;
|
|
761
|
-
}, Qe = ({ entry: e }) => /* @__PURE__ */
|
|
767
|
+
}, Qe = ({ entry: e }) => /* @__PURE__ */ N("div", {
|
|
762
768
|
className: "vdt:bg-background/60",
|
|
763
|
-
children: [/* @__PURE__ */
|
|
769
|
+
children: [/* @__PURE__ */ M(J, { entries: [
|
|
764
770
|
{
|
|
765
771
|
key: "tag",
|
|
766
772
|
value: e.tag ?? "—"
|
|
@@ -817,12 +823,12 @@ var H = (e) => {
|
|
|
817
823
|
key: "error",
|
|
818
824
|
value: e.snapshot.error === void 0 ? "—" : Xe(e.snapshot.error)
|
|
819
825
|
}
|
|
820
|
-
] }), /* @__PURE__ */
|
|
826
|
+
] }), /* @__PURE__ */ N("details", {
|
|
821
827
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
822
|
-
children: [/* @__PURE__ */
|
|
828
|
+
children: [/* @__PURE__ */ M("summary", {
|
|
823
829
|
className: "vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:text-foreground-muted vdt:cursor-pointer",
|
|
824
830
|
children: "Data"
|
|
825
|
-
}), /* @__PURE__ */
|
|
831
|
+
}), /* @__PURE__ */ M("pre", {
|
|
826
832
|
className: "vdt:mt-2 vdt:text-[11px] vdt:text-foreground vdt:max-h-64 vdt:overflow-auto vdt:font-mono",
|
|
827
833
|
children: (() => {
|
|
828
834
|
try {
|
|
@@ -833,15 +839,15 @@ var H = (e) => {
|
|
|
833
839
|
})()
|
|
834
840
|
})]
|
|
835
841
|
})]
|
|
836
|
-
}), $e = () => Ye().reduce((e, t) => e + t.entries.length, 0), et = (e) => e === "compiling" || e === "loading" || e === "reconnecting", tt = () => u(
|
|
837
|
-
let t =
|
|
838
|
-
return /* @__PURE__ */
|
|
842
|
+
}), $e = () => Ye().reduce((e, t) => e + t.entries.length, 0), et = (e) => e === "compiling" || e === "loading" || e === "reconnecting", tt = () => u(ue, le, le), nt = ({ name: e }) => {
|
|
843
|
+
let t = D(e).status;
|
|
844
|
+
return /* @__PURE__ */ N("span", {
|
|
839
845
|
className: "vdt-chip",
|
|
840
846
|
"data-status": t,
|
|
841
|
-
children: [/* @__PURE__ */
|
|
847
|
+
children: [/* @__PURE__ */ M("span", {
|
|
842
848
|
className: `vdt-dot vdt-dot-${t === "connected" ? "ok" : t === "recovering" ? "warn" : "err"}`,
|
|
843
849
|
"aria-hidden": "true"
|
|
844
|
-
}), /* @__PURE__ */
|
|
850
|
+
}), /* @__PURE__ */ M("b", { children: e })]
|
|
845
851
|
});
|
|
846
852
|
}, rt = 260, it = "cubic-bezier(0.2, 0.8, 0.2, 1)", at = () => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, ot = (e, t) => {
|
|
847
853
|
let r = c(null), a = c(null), s = c(null), l = c(e), u = n((e) => {
|
|
@@ -875,119 +881,185 @@ var H = (e) => {
|
|
|
875
881
|
};
|
|
876
882
|
o.addEventListener("finish", c), o.addEventListener("cancel", c);
|
|
877
883
|
}, [e]), u;
|
|
878
|
-
}, st = ({ status: e, onOpen: t, buttonRef: n }) => {
|
|
879
|
-
let
|
|
880
|
-
return /* @__PURE__ */
|
|
881
|
-
ref:
|
|
884
|
+
}, st = ({ status: e, onOpen: t, buttonRef: n, style: r, dragging: i = !1, onPointerDown: a }) => {
|
|
885
|
+
let o = U().shell, s = O(), c = $e(), l = u(T, S, S), d = tt(), f = l.filter((e) => e.status === "pending").length, p = l.filter((e) => e.status === "error").length, m = d.filter((e) => e.level === "error" || e.level === "fatal").length, h = d.filter((e) => e.level === "warn").length, g = e !== null, _ = e?.kind ?? "idle", v = e === null ? "" : et(_) ? e.label.replace(/[…\.\s]+$/, "") : e.label, y = g ? `${_}:${v}` : "chips", b = ot(y, n);
|
|
886
|
+
return /* @__PURE__ */ N("button", {
|
|
887
|
+
ref: b,
|
|
882
888
|
type: "button",
|
|
883
889
|
className: "vdt-capsule",
|
|
884
|
-
"data-busy":
|
|
885
|
-
"data-kind":
|
|
890
|
+
"data-busy": g ? "true" : "false",
|
|
891
|
+
"data-kind": _,
|
|
892
|
+
"data-dragging": i ? "true" : void 0,
|
|
893
|
+
style: r,
|
|
886
894
|
onClick: t,
|
|
887
|
-
|
|
888
|
-
|
|
895
|
+
onPointerDown: a,
|
|
896
|
+
title: o.openTitle,
|
|
897
|
+
"aria-label": o.openLabel,
|
|
889
898
|
children: [
|
|
890
|
-
/* @__PURE__ */
|
|
899
|
+
/* @__PURE__ */ M("span", {
|
|
891
900
|
className: "vdt-capsule-halo vdt-capsule-aura",
|
|
892
901
|
"aria-hidden": "true"
|
|
893
902
|
}),
|
|
894
|
-
/* @__PURE__ */
|
|
903
|
+
/* @__PURE__ */ M("span", {
|
|
895
904
|
className: "vdt-capsule-halo",
|
|
896
905
|
"aria-hidden": "true"
|
|
897
906
|
}),
|
|
898
|
-
|
|
899
|
-
|
|
907
|
+
g ? /* @__PURE__ */ M(Ie, { className: "vdt-capsule-mark vdt-spinner" }) : /* @__PURE__ */ M(de, { className: "vdt-capsule-mark" }),
|
|
908
|
+
g ? /* @__PURE__ */ N("span", {
|
|
900
909
|
className: "vdt-capsule-status",
|
|
901
|
-
children: [
|
|
910
|
+
children: [v, et(_) ? /* @__PURE__ */ N("span", {
|
|
902
911
|
className: "vdt-dots",
|
|
903
912
|
"aria-hidden": "true",
|
|
904
913
|
children: [
|
|
905
|
-
/* @__PURE__ */
|
|
906
|
-
/* @__PURE__ */
|
|
907
|
-
/* @__PURE__ */
|
|
914
|
+
/* @__PURE__ */ M("span", {}),
|
|
915
|
+
/* @__PURE__ */ M("span", {}),
|
|
916
|
+
/* @__PURE__ */ M("span", {})
|
|
908
917
|
]
|
|
909
918
|
}) : null]
|
|
910
|
-
},
|
|
919
|
+
}, y) : /* @__PURE__ */ N("span", {
|
|
911
920
|
className: "vdt-capsule-chips",
|
|
912
921
|
children: [
|
|
913
|
-
|
|
914
|
-
/* @__PURE__ */
|
|
922
|
+
s.names.map((e) => /* @__PURE__ */ M(nt, { name: e }, e)),
|
|
923
|
+
/* @__PURE__ */ N("span", {
|
|
915
924
|
className: "vdt-chip",
|
|
916
925
|
"data-chip": "live",
|
|
917
926
|
children: [
|
|
918
|
-
/* @__PURE__ */
|
|
927
|
+
/* @__PURE__ */ M("b", { children: c }),
|
|
919
928
|
" ",
|
|
920
|
-
|
|
929
|
+
o.live
|
|
921
930
|
]
|
|
922
931
|
}),
|
|
923
|
-
|
|
932
|
+
f > 0 ? /* @__PURE__ */ N("span", {
|
|
924
933
|
className: "vdt-chip vdt-chip-info",
|
|
925
934
|
"data-chip": "pending",
|
|
926
935
|
children: [
|
|
927
|
-
/* @__PURE__ */
|
|
936
|
+
/* @__PURE__ */ M("span", {
|
|
928
937
|
className: "vdt-dot vdt-dot-info",
|
|
929
938
|
"aria-hidden": "true"
|
|
930
939
|
}),
|
|
931
|
-
/* @__PURE__ */
|
|
940
|
+
/* @__PURE__ */ M("b", { children: f }),
|
|
932
941
|
" ",
|
|
933
|
-
|
|
942
|
+
o.pending
|
|
934
943
|
]
|
|
935
944
|
}) : null,
|
|
936
|
-
|
|
945
|
+
p > 0 ? /* @__PURE__ */ N("span", {
|
|
937
946
|
className: "vdt-chip vdt-chip-err",
|
|
938
947
|
"data-chip": "failed",
|
|
939
948
|
children: [
|
|
940
|
-
/* @__PURE__ */
|
|
949
|
+
/* @__PURE__ */ M("span", {
|
|
941
950
|
className: "vdt-dot vdt-dot-err",
|
|
942
951
|
"aria-hidden": "true"
|
|
943
952
|
}),
|
|
944
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ M("b", { children: p }),
|
|
945
954
|
" ",
|
|
946
|
-
|
|
955
|
+
o.failed
|
|
947
956
|
]
|
|
948
957
|
}) : null,
|
|
949
|
-
|
|
958
|
+
m > 0 ? /* @__PURE__ */ N("span", {
|
|
950
959
|
className: "vdt-chip vdt-chip-err",
|
|
951
960
|
"data-chip": "errors",
|
|
952
961
|
children: [
|
|
953
|
-
/* @__PURE__ */
|
|
962
|
+
/* @__PURE__ */ M("b", { children: m }),
|
|
954
963
|
" ",
|
|
955
|
-
|
|
964
|
+
o.errorsWord(m)
|
|
956
965
|
]
|
|
957
966
|
}) : null,
|
|
958
|
-
|
|
967
|
+
m === 0 && h > 0 ? /* @__PURE__ */ N("span", {
|
|
959
968
|
className: "vdt-chip vdt-chip-warn",
|
|
960
969
|
"data-chip": "warnings",
|
|
961
970
|
children: [
|
|
962
|
-
/* @__PURE__ */
|
|
971
|
+
/* @__PURE__ */ M("b", { children: h }),
|
|
963
972
|
" ",
|
|
964
|
-
|
|
973
|
+
o.warningsWord(h)
|
|
965
974
|
]
|
|
966
975
|
}) : null
|
|
967
976
|
]
|
|
968
977
|
})
|
|
969
978
|
]
|
|
970
979
|
});
|
|
971
|
-
}, ct =
|
|
980
|
+
}, ct = {
|
|
981
|
+
x: .5,
|
|
982
|
+
y: 1
|
|
983
|
+
}, lt = [
|
|
984
|
+
{
|
|
985
|
+
x: 0,
|
|
986
|
+
y: 0
|
|
987
|
+
},
|
|
988
|
+
{
|
|
989
|
+
x: .5,
|
|
990
|
+
y: 0
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
x: 1,
|
|
994
|
+
y: 0
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
x: 0,
|
|
998
|
+
y: .5
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
x: 1,
|
|
1002
|
+
y: .5
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
x: 0,
|
|
1006
|
+
y: 1
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
x: .5,
|
|
1010
|
+
y: 1
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
x: 1,
|
|
1014
|
+
y: 1
|
|
1015
|
+
}
|
|
1016
|
+
], ut = (e) => Math.min(1, Math.max(0, e)), dt = (e, t) => ({
|
|
1017
|
+
x: Math.max(0, t.width - 36 - e.w),
|
|
1018
|
+
y: Math.max(0, t.height - 36 - e.h)
|
|
1019
|
+
}), ft = (e, t) => e.x === t.x && e.y === t.y, pt = (e, t, n) => {
|
|
1020
|
+
let r = dt(t, n), i = null, a = 48;
|
|
1021
|
+
for (let t of lt) {
|
|
1022
|
+
let n = Math.hypot((e.x - t.x) * r.x, (e.y - t.y) * r.y);
|
|
1023
|
+
n <= a && (i = t, a = n);
|
|
1024
|
+
}
|
|
1025
|
+
return i === null ? e : {
|
|
1026
|
+
x: r.x > 0 ? i.x : e.x,
|
|
1027
|
+
y: r.y > 0 ? i.y : e.y
|
|
1028
|
+
};
|
|
1029
|
+
}, mt = (e, t, n, r, i) => {
|
|
1030
|
+
let a = dt(t, n);
|
|
1031
|
+
return pt({
|
|
1032
|
+
x: a.x > 0 ? ut((e.x * a.x + r) / a.x) : e.x,
|
|
1033
|
+
y: a.y > 0 ? ut((e.y * a.y + i) / a.y) : e.y
|
|
1034
|
+
}, t, n);
|
|
1035
|
+
}, ht = (e) => typeof e == "number" && Number.isFinite(e), gt = (e) => {
|
|
1036
|
+
if (typeof e != "object" || !e) return ct;
|
|
1037
|
+
let t = e;
|
|
1038
|
+
return {
|
|
1039
|
+
x: ht(t.x) ? ut(t.x) : ct.x,
|
|
1040
|
+
y: ht(t.y) ? ut(t.y) : ct.y
|
|
1041
|
+
};
|
|
1042
|
+
}, _t = [
|
|
972
1043
|
"bottom",
|
|
973
1044
|
"top",
|
|
974
1045
|
"left",
|
|
975
1046
|
"right",
|
|
976
|
-
"window"
|
|
977
|
-
|
|
1047
|
+
"window",
|
|
1048
|
+
"external"
|
|
1049
|
+
], vt = [
|
|
978
1050
|
"bottom",
|
|
979
1051
|
"top",
|
|
980
1052
|
"left",
|
|
981
1053
|
"right"
|
|
982
|
-
],
|
|
1054
|
+
], yt = (e) => typeof e == "string" && _t.includes(e), bt = (e) => e !== "window" && e !== "external", xt = {
|
|
983
1055
|
bottom: 240,
|
|
984
1056
|
top: 240,
|
|
985
1057
|
left: 320,
|
|
986
1058
|
right: 320
|
|
987
|
-
},
|
|
1059
|
+
}, St = {
|
|
988
1060
|
w: 480,
|
|
989
1061
|
h: 320
|
|
990
|
-
},
|
|
1062
|
+
}, Ct = 64, wt = {
|
|
991
1063
|
dock: "bottom",
|
|
992
1064
|
sizes: {
|
|
993
1065
|
bottom: 400,
|
|
@@ -1001,99 +1073,101 @@ var H = (e) => {
|
|
|
1001
1073
|
w: 860,
|
|
1002
1074
|
h: 560
|
|
1003
1075
|
},
|
|
1004
|
-
push: !1
|
|
1005
|
-
|
|
1076
|
+
push: !1,
|
|
1077
|
+
capsule: ct
|
|
1078
|
+
}, Tt = "voltro:devtools:dock", Et = (e) => typeof e == "number" && Number.isFinite(e), Dt = (e, t) => {
|
|
1006
1079
|
let n = {
|
|
1007
|
-
...
|
|
1080
|
+
...wt,
|
|
1008
1081
|
dock: t
|
|
1009
1082
|
};
|
|
1010
1083
|
if (typeof e != "object" || !e) return n;
|
|
1011
|
-
let r = e, i = typeof r.sizes == "object" && r.sizes !== null ? r.sizes : {}, a = { ...
|
|
1012
|
-
for (let e of
|
|
1084
|
+
let r = e, i = typeof r.sizes == "object" && r.sizes !== null ? r.sizes : {}, a = { ...wt.sizes };
|
|
1085
|
+
for (let e of vt) {
|
|
1013
1086
|
let t = i[e];
|
|
1014
|
-
|
|
1087
|
+
Et(t) && t >= xt[e] && (a[e] = Math.round(t));
|
|
1015
1088
|
}
|
|
1016
1089
|
let o = typeof r.window == "object" && r.window !== null ? r.window : {}, s = {
|
|
1017
|
-
x:
|
|
1018
|
-
y:
|
|
1019
|
-
w:
|
|
1020
|
-
h:
|
|
1090
|
+
x: Et(o.x) ? Math.round(o.x) : n.window.x,
|
|
1091
|
+
y: Et(o.y) ? Math.round(o.y) : n.window.y,
|
|
1092
|
+
w: Et(o.w) && o.w >= St.w ? Math.round(o.w) : n.window.w,
|
|
1093
|
+
h: Et(o.h) && o.h >= St.h ? Math.round(o.h) : n.window.h
|
|
1021
1094
|
};
|
|
1022
1095
|
return {
|
|
1023
|
-
dock:
|
|
1096
|
+
dock: yt(r.dock) ? r.dock : t,
|
|
1024
1097
|
sizes: a,
|
|
1025
1098
|
window: s,
|
|
1026
|
-
push: r.push === !0
|
|
1099
|
+
push: r.push === !0,
|
|
1100
|
+
capsule: gt(r.capsule)
|
|
1027
1101
|
};
|
|
1028
|
-
},
|
|
1102
|
+
}, Ot = (e) => {
|
|
1029
1103
|
if (typeof window > "u") return {
|
|
1030
|
-
...
|
|
1104
|
+
...wt,
|
|
1031
1105
|
dock: e
|
|
1032
1106
|
};
|
|
1033
1107
|
try {
|
|
1034
|
-
let t = window.localStorage.getItem(
|
|
1108
|
+
let t = window.localStorage.getItem(Tt);
|
|
1035
1109
|
return t === null ? {
|
|
1036
|
-
...
|
|
1110
|
+
...wt,
|
|
1037
1111
|
dock: e
|
|
1038
|
-
} :
|
|
1112
|
+
} : Dt(JSON.parse(t), e);
|
|
1039
1113
|
} catch {
|
|
1040
1114
|
return {
|
|
1041
|
-
...
|
|
1115
|
+
...wt,
|
|
1042
1116
|
dock: e
|
|
1043
1117
|
};
|
|
1044
1118
|
}
|
|
1045
|
-
},
|
|
1119
|
+
}, kt = (e) => {
|
|
1046
1120
|
if (!(typeof window > "u")) try {
|
|
1047
|
-
window.localStorage.setItem(
|
|
1121
|
+
window.localStorage.setItem(Tt, JSON.stringify(e));
|
|
1048
1122
|
} catch {}
|
|
1049
|
-
},
|
|
1123
|
+
}, At = () => typeof window > "u" ? {
|
|
1050
1124
|
width: 1440,
|
|
1051
1125
|
height: 900
|
|
1052
1126
|
} : {
|
|
1053
1127
|
width: window.innerWidth,
|
|
1054
1128
|
height: window.innerHeight
|
|
1055
|
-
},
|
|
1056
|
-
let r = e === "left" || e === "right" ? n.width : n.height, i = Math.max(
|
|
1057
|
-
return Math.round(Math.min(i, Math.max(
|
|
1058
|
-
},
|
|
1059
|
-
let n = Math.max(120, t.width - 16), r = Math.max(120, t.height - 16), i = Math.round(Math.min(Math.max(Math.min(
|
|
1129
|
+
}, jt = (e, t, n = At()) => {
|
|
1130
|
+
let r = e === "left" || e === "right" ? n.width : n.height, i = Math.max(xt[e], r - Ct);
|
|
1131
|
+
return Math.round(Math.min(i, Math.max(xt[e], t)));
|
|
1132
|
+
}, Mt = (e, t = At()) => {
|
|
1133
|
+
let n = Math.max(120, t.width - 16), r = Math.max(120, t.height - 16), i = Math.round(Math.min(Math.max(Math.min(St.w, n), e.w), n)), a = Math.round(Math.min(Math.max(Math.min(St.h, r), e.h), r));
|
|
1060
1134
|
return {
|
|
1061
1135
|
x: Math.round(Math.min(Math.max(8, e.x), Math.max(8, t.width - i - 8))),
|
|
1062
1136
|
y: Math.round(Math.min(Math.max(8, e.y), Math.max(8, t.height - a - 8))),
|
|
1063
1137
|
w: i,
|
|
1064
1138
|
h: a
|
|
1065
1139
|
};
|
|
1066
|
-
},
|
|
1140
|
+
}, Nt = (e, t) => {
|
|
1067
1141
|
let n = { ...e.sizes }, r = !1;
|
|
1068
|
-
for (let e of
|
|
1069
|
-
let i =
|
|
1142
|
+
for (let e of vt) {
|
|
1143
|
+
let i = jt(e, n[e], t);
|
|
1070
1144
|
i !== n[e] && (n[e] = i, r = !0);
|
|
1071
1145
|
}
|
|
1072
|
-
let i =
|
|
1146
|
+
let i = Mt(e.window, t), a = i.x !== e.window.x || i.y !== e.window.y || i.w !== e.window.w || i.h !== e.window.h;
|
|
1073
1147
|
return !r && !a ? e : {
|
|
1074
1148
|
...e,
|
|
1075
1149
|
sizes: n,
|
|
1076
1150
|
window: i
|
|
1077
1151
|
};
|
|
1078
|
-
},
|
|
1152
|
+
}, Pt = (e) => (window.addEventListener("resize", e), () => window.removeEventListener("resize", e)), Ft = {
|
|
1079
1153
|
width: 0,
|
|
1080
1154
|
height: 0
|
|
1081
|
-
},
|
|
1155
|
+
}, It = () => {
|
|
1082
1156
|
let e = window.innerWidth, t = window.innerHeight;
|
|
1083
|
-
return (
|
|
1157
|
+
return (Ft.width !== e || Ft.height !== t) && (Ft = {
|
|
1084
1158
|
width: e,
|
|
1085
1159
|
height: t
|
|
1086
|
-
}),
|
|
1087
|
-
},
|
|
1160
|
+
}), Ft;
|
|
1161
|
+
}, Lt = {
|
|
1088
1162
|
width: 1440,
|
|
1089
1163
|
height: 900
|
|
1090
|
-
},
|
|
1091
|
-
let [t, r] = l(() =>
|
|
1164
|
+
}, Rt = () => Lt, zt = () => u(Pt, It, Rt), Bt = (e = "bottom") => {
|
|
1165
|
+
let [t, r] = l(() => Ot(e));
|
|
1092
1166
|
i(() => {
|
|
1093
1167
|
if (typeof window > "u") return;
|
|
1094
1168
|
let t = (t) => {
|
|
1095
|
-
if (t.key ===
|
|
1096
|
-
r(
|
|
1169
|
+
if (t.key === Tt && t.newValue !== null) try {
|
|
1170
|
+
r(Dt(JSON.parse(t.newValue), e));
|
|
1097
1171
|
} catch {}
|
|
1098
1172
|
};
|
|
1099
1173
|
return window.addEventListener("storage", t), () => window.removeEventListener("storage", t);
|
|
@@ -1101,7 +1175,7 @@ var H = (e) => {
|
|
|
1101
1175
|
let a = n((e) => {
|
|
1102
1176
|
r((t) => {
|
|
1103
1177
|
let n = e(t);
|
|
1104
|
-
return
|
|
1178
|
+
return kt(n), n;
|
|
1105
1179
|
});
|
|
1106
1180
|
}, []);
|
|
1107
1181
|
return [t, {
|
|
@@ -1110,7 +1184,7 @@ var H = (e) => {
|
|
|
1110
1184
|
dock: e
|
|
1111
1185
|
}), [a]),
|
|
1112
1186
|
setEdgeSize: n((e, t) => a((n) => {
|
|
1113
|
-
let r =
|
|
1187
|
+
let r = jt(e, t);
|
|
1114
1188
|
return n.sizes[e] === r ? n : {
|
|
1115
1189
|
...n,
|
|
1116
1190
|
sizes: {
|
|
@@ -1121,14 +1195,18 @@ var H = (e) => {
|
|
|
1121
1195
|
}), [a]),
|
|
1122
1196
|
setWindowRect: n((e) => a((t) => ({
|
|
1123
1197
|
...t,
|
|
1124
|
-
window:
|
|
1198
|
+
window: Mt(e)
|
|
1125
1199
|
})), [a]),
|
|
1126
1200
|
setPush: n((e) => a((t) => t.push === e ? t : {
|
|
1127
1201
|
...t,
|
|
1128
1202
|
push: e
|
|
1203
|
+
}), [a]),
|
|
1204
|
+
setCapsule: n((e) => a((t) => ft(t.capsule, e) ? t : {
|
|
1205
|
+
...t,
|
|
1206
|
+
capsule: e
|
|
1129
1207
|
}), [a])
|
|
1130
1208
|
}];
|
|
1131
|
-
},
|
|
1209
|
+
}, Vt = (e) => {
|
|
1132
1210
|
switch (e) {
|
|
1133
1211
|
case "ArrowDown": return "bottom";
|
|
1134
1212
|
case "ArrowUp": return "top";
|
|
@@ -1136,35 +1214,37 @@ var H = (e) => {
|
|
|
1136
1214
|
case "ArrowRight": return "right";
|
|
1137
1215
|
default: return null;
|
|
1138
1216
|
}
|
|
1139
|
-
},
|
|
1140
|
-
bottom:
|
|
1141
|
-
top:
|
|
1142
|
-
left:
|
|
1143
|
-
right:
|
|
1144
|
-
window: Pe
|
|
1145
|
-
|
|
1146
|
-
|
|
1217
|
+
}, Ht = {
|
|
1218
|
+
bottom: ke,
|
|
1219
|
+
top: Ae,
|
|
1220
|
+
left: je,
|
|
1221
|
+
right: Me,
|
|
1222
|
+
window: Pe,
|
|
1223
|
+
external: Ne
|
|
1224
|
+
}, Ut = ({ dock: e, push: t, onDock: n, onPush: r }) => {
|
|
1225
|
+
let a = U().shell, [o, s] = l(!1), u = c(null), d = {
|
|
1147
1226
|
bottom: a.dockBottom,
|
|
1148
1227
|
top: a.dockTop,
|
|
1149
1228
|
left: a.dockLeft,
|
|
1150
1229
|
right: a.dockRight,
|
|
1151
|
-
window: a.dockWindow
|
|
1230
|
+
window: a.dockWindow,
|
|
1231
|
+
external: a.dockExternal
|
|
1152
1232
|
};
|
|
1153
1233
|
i(() => {
|
|
1154
1234
|
if (!o) return;
|
|
1155
|
-
let e = (e) => {
|
|
1235
|
+
let e = u.current?.ownerDocument ?? document, t = (e) => {
|
|
1156
1236
|
u.current !== null && !e.composedPath().includes(u.current) && s(!1);
|
|
1157
|
-
},
|
|
1237
|
+
}, n = (e) => {
|
|
1158
1238
|
e.key === "Escape" && s(!1);
|
|
1159
1239
|
};
|
|
1160
|
-
return
|
|
1161
|
-
|
|
1240
|
+
return e.addEventListener("mousedown", t), e.addEventListener("keydown", n), () => {
|
|
1241
|
+
e.removeEventListener("mousedown", t), e.removeEventListener("keydown", n);
|
|
1162
1242
|
};
|
|
1163
1243
|
}, [o]);
|
|
1164
1244
|
let f = c([]);
|
|
1165
1245
|
i(() => {
|
|
1166
1246
|
if (!o) return;
|
|
1167
|
-
let t =
|
|
1247
|
+
let t = _t.indexOf(e);
|
|
1168
1248
|
f.current[t === -1 ? 0 : t]?.focus();
|
|
1169
1249
|
}, [o, e]);
|
|
1170
1250
|
let p = (e) => {
|
|
@@ -1189,11 +1269,11 @@ var H = (e) => {
|
|
|
1189
1269
|
default: return;
|
|
1190
1270
|
}
|
|
1191
1271
|
e.preventDefault(), t[r]?.focus();
|
|
1192
|
-
}, m =
|
|
1193
|
-
return /* @__PURE__ */
|
|
1272
|
+
}, m = Ht[e];
|
|
1273
|
+
return /* @__PURE__ */ N("div", {
|
|
1194
1274
|
ref: u,
|
|
1195
1275
|
className: "vdt-dockmenu",
|
|
1196
|
-
children: [/* @__PURE__ */
|
|
1276
|
+
children: [/* @__PURE__ */ M("button", {
|
|
1197
1277
|
type: "button",
|
|
1198
1278
|
className: `vdt-iconbtn${o ? " vdt-iconbtn-on" : ""}`,
|
|
1199
1279
|
title: a.dockMenuTitle,
|
|
@@ -1201,17 +1281,17 @@ var H = (e) => {
|
|
|
1201
1281
|
"aria-haspopup": "menu",
|
|
1202
1282
|
"aria-expanded": o,
|
|
1203
1283
|
onClick: () => s((e) => !e),
|
|
1204
|
-
children: /* @__PURE__ */
|
|
1205
|
-
}), o ? /* @__PURE__ */
|
|
1284
|
+
children: /* @__PURE__ */ M(m, { className: "vdt:w-4 vdt:h-4" })
|
|
1285
|
+
}), o ? /* @__PURE__ */ N("div", {
|
|
1206
1286
|
role: "menu",
|
|
1207
1287
|
"aria-label": a.dockMenuTitle,
|
|
1208
1288
|
className: "vdt-dockmenu-pop",
|
|
1209
|
-
children: [/* @__PURE__ */
|
|
1289
|
+
children: [/* @__PURE__ */ M("div", {
|
|
1210
1290
|
className: "vdt-dockmenu-row",
|
|
1211
1291
|
onKeyDown: p,
|
|
1212
|
-
children:
|
|
1213
|
-
let i =
|
|
1214
|
-
return /* @__PURE__ */
|
|
1292
|
+
children: _t.map((t, r) => {
|
|
1293
|
+
let i = Ht[t], a = t === e;
|
|
1294
|
+
return /* @__PURE__ */ M("button", {
|
|
1215
1295
|
ref: (e) => {
|
|
1216
1296
|
f.current[r] = e;
|
|
1217
1297
|
},
|
|
@@ -1224,58 +1304,58 @@ var H = (e) => {
|
|
|
1224
1304
|
onClick: () => {
|
|
1225
1305
|
n(t), s(!1);
|
|
1226
1306
|
},
|
|
1227
|
-
children: /* @__PURE__ */
|
|
1307
|
+
children: /* @__PURE__ */ M(i, { className: "vdt:w-4 vdt:h-4" })
|
|
1228
1308
|
}, t);
|
|
1229
1309
|
})
|
|
1230
|
-
}), /* @__PURE__ */
|
|
1231
|
-
className: `vdt-dockmenu-push${e
|
|
1232
|
-
children: [/* @__PURE__ */
|
|
1310
|
+
}), /* @__PURE__ */ N("label", {
|
|
1311
|
+
className: `vdt-dockmenu-push${bt(e) ? "" : " vdt-dockmenu-push-off"}`,
|
|
1312
|
+
children: [/* @__PURE__ */ M("input", {
|
|
1233
1313
|
type: "checkbox",
|
|
1234
1314
|
role: "menuitemcheckbox",
|
|
1235
1315
|
"aria-checked": t,
|
|
1236
1316
|
checked: t,
|
|
1237
|
-
disabled: e
|
|
1317
|
+
disabled: !bt(e),
|
|
1238
1318
|
onChange: (e) => r(e.target.checked)
|
|
1239
|
-
}), /* @__PURE__ */
|
|
1319
|
+
}), /* @__PURE__ */ N("span", { children: [/* @__PURE__ */ M("span", {
|
|
1240
1320
|
className: "vdt-dockmenu-push-label",
|
|
1241
1321
|
children: a.pushPage
|
|
1242
|
-
}), /* @__PURE__ */
|
|
1322
|
+
}), /* @__PURE__ */ M("span", {
|
|
1243
1323
|
className: "vdt-dockmenu-push-hint",
|
|
1244
1324
|
children: a.pushPageHint
|
|
1245
1325
|
})] })]
|
|
1246
1326
|
})]
|
|
1247
1327
|
}) : null]
|
|
1248
1328
|
});
|
|
1249
|
-
},
|
|
1250
|
-
|
|
1251
|
-
for (let e of
|
|
1252
|
-
},
|
|
1329
|
+
}, Wt = 2e3, Gt = 6e4, X = /* @__PURE__ */ new Map(), Z = /* @__PURE__ */ new Map(), Kt = /* @__PURE__ */ new Set(), qt = [], Jt = () => {
|
|
1330
|
+
qt = Array.from(X.values());
|
|
1331
|
+
for (let e of Kt) e();
|
|
1332
|
+
}, Yt = (e) => {
|
|
1253
1333
|
let t = e.indexOf("/_voltro/inspect");
|
|
1254
1334
|
return t === -1 ? e : e.slice(0, t);
|
|
1255
|
-
},
|
|
1256
|
-
if (
|
|
1257
|
-
let n =
|
|
1335
|
+
}, Xt = (e) => X.get(e), Zt = (e, t = Date.now()) => {
|
|
1336
|
+
if (X.has(e)) return !1;
|
|
1337
|
+
let n = Z.get(e);
|
|
1258
1338
|
return n === void 0 || t >= n.retryAt;
|
|
1259
|
-
},
|
|
1260
|
-
|
|
1261
|
-
},
|
|
1262
|
-
let r = (
|
|
1339
|
+
}, Qt = (e) => {
|
|
1340
|
+
Z.delete(e.baseUrl), X.set(e.baseUrl, e), Jt();
|
|
1341
|
+
}, $t = (e, t, n = Date.now()) => {
|
|
1342
|
+
let r = (Z.get(e)?.count ?? 0) + 1;
|
|
1263
1343
|
if (t && r >= 3) {
|
|
1264
|
-
|
|
1344
|
+
Qt({
|
|
1265
1345
|
baseUrl: e,
|
|
1266
1346
|
status: 0
|
|
1267
1347
|
});
|
|
1268
1348
|
return;
|
|
1269
1349
|
}
|
|
1270
|
-
|
|
1350
|
+
Z.set(e, {
|
|
1271
1351
|
count: r,
|
|
1272
|
-
retryAt: n + Math.min(
|
|
1352
|
+
retryAt: n + Math.min(Gt, Wt * 2 ** r)
|
|
1273
1353
|
});
|
|
1274
|
-
},
|
|
1275
|
-
|
|
1276
|
-
},
|
|
1277
|
-
|
|
1278
|
-
},
|
|
1354
|
+
}, en = (e) => {
|
|
1355
|
+
Z.delete(e);
|
|
1356
|
+
}, tn = () => {
|
|
1357
|
+
Z.clear(), X.size !== 0 && (X.clear(), Jt());
|
|
1358
|
+
}, nn = (e) => e === 401 || e === 403, rn = async (e, t) => {
|
|
1279
1359
|
let n = await t.json().catch(() => null), r = (e) => {
|
|
1280
1360
|
let t = typeof n == "object" && n ? n[e] : void 0;
|
|
1281
1361
|
return typeof t == "string" && t !== "" ? t : void 0;
|
|
@@ -1289,16 +1369,16 @@ var H = (e) => {
|
|
|
1289
1369
|
...i ? { locked: !0 } : {},
|
|
1290
1370
|
...c === void 0 ? {} : { login: c }
|
|
1291
1371
|
};
|
|
1292
|
-
},
|
|
1293
|
-
|
|
1294
|
-
}),
|
|
1372
|
+
}, an = (e) => (Kt.add(e), () => {
|
|
1373
|
+
Kt.delete(e);
|
|
1374
|
+
}), on = () => u(an, () => qt, () => qt), sn = (e) => {
|
|
1295
1375
|
if (e.login !== void 0) try {
|
|
1296
1376
|
return new URL(e.login, new URL(e.baseUrl, window.location.href)).href;
|
|
1297
1377
|
} catch {
|
|
1298
1378
|
return;
|
|
1299
1379
|
}
|
|
1300
|
-
},
|
|
1301
|
-
let t =
|
|
1380
|
+
}, cn = ({ url: e }) => {
|
|
1381
|
+
let t = U().inspect, [n, r] = l(""), [i, a] = l(null), o = async (t) => {
|
|
1302
1382
|
t.preventDefault(), a(null);
|
|
1303
1383
|
try {
|
|
1304
1384
|
let t = await fetch(e, {
|
|
@@ -1308,7 +1388,7 @@ var H = (e) => {
|
|
|
1308
1388
|
body: JSON.stringify({ token: n })
|
|
1309
1389
|
});
|
|
1310
1390
|
if (t.ok) {
|
|
1311
|
-
r(""),
|
|
1391
|
+
r(""), tn();
|
|
1312
1392
|
return;
|
|
1313
1393
|
}
|
|
1314
1394
|
let i = await t.json().catch(() => null), o = typeof i == "object" && i && typeof i.reason == "string" ? i.reason : `HTTP ${t.status}`;
|
|
@@ -1317,53 +1397,53 @@ var H = (e) => {
|
|
|
1317
1397
|
a(e instanceof Error ? e.message : String(e));
|
|
1318
1398
|
}
|
|
1319
1399
|
};
|
|
1320
|
-
return /* @__PURE__ */
|
|
1400
|
+
return /* @__PURE__ */ N("form", {
|
|
1321
1401
|
className: "vdt-refusal-signin",
|
|
1322
1402
|
onSubmit: (e) => {
|
|
1323
1403
|
o(e);
|
|
1324
1404
|
},
|
|
1325
1405
|
children: [
|
|
1326
|
-
/* @__PURE__ */
|
|
1406
|
+
/* @__PURE__ */ N("label", { children: [/* @__PURE__ */ M("span", { children: t.tokenLabel }), /* @__PURE__ */ M("input", {
|
|
1327
1407
|
type: "password",
|
|
1328
1408
|
autoComplete: "off",
|
|
1329
1409
|
value: n,
|
|
1330
1410
|
onChange: (e) => r(e.target.value)
|
|
1331
1411
|
})] }),
|
|
1332
|
-
/* @__PURE__ */
|
|
1412
|
+
/* @__PURE__ */ M("button", {
|
|
1333
1413
|
type: "submit",
|
|
1334
1414
|
disabled: n === "",
|
|
1335
1415
|
children: t.signIn
|
|
1336
1416
|
}),
|
|
1337
|
-
i === null ? null : /* @__PURE__ */
|
|
1417
|
+
i === null ? null : /* @__PURE__ */ M("span", {
|
|
1338
1418
|
className: "vdt-refusal-failed",
|
|
1339
1419
|
children: t.signInFailed(i)
|
|
1340
1420
|
})
|
|
1341
1421
|
]
|
|
1342
1422
|
});
|
|
1343
|
-
},
|
|
1344
|
-
let e =
|
|
1423
|
+
}, ln = () => {
|
|
1424
|
+
let e = on(), t = O(), n = U().inspect;
|
|
1345
1425
|
if (e.length === 0) return null;
|
|
1346
1426
|
let r = (e) => t.names.find((n) => t.get(n).inspectBaseUrl === e) ?? e;
|
|
1347
|
-
return /* @__PURE__ */
|
|
1427
|
+
return /* @__PURE__ */ M("div", {
|
|
1348
1428
|
className: "vdt-refusals",
|
|
1349
1429
|
role: "status",
|
|
1350
1430
|
children: e.map((e) => {
|
|
1351
|
-
let t = e.locked === !0 ?
|
|
1352
|
-
return /* @__PURE__ */
|
|
1431
|
+
let t = e.locked === !0 ? sn(e) : void 0;
|
|
1432
|
+
return /* @__PURE__ */ N("div", {
|
|
1353
1433
|
className: "vdt-refusal",
|
|
1354
1434
|
children: [
|
|
1355
|
-
/* @__PURE__ */
|
|
1356
|
-
e.status === 0 ? /* @__PURE__ */
|
|
1357
|
-
e.fix === void 0 ? null : /* @__PURE__ */
|
|
1358
|
-
/* @__PURE__ */
|
|
1435
|
+
/* @__PURE__ */ M("strong", { children: e.status === 0 ? n.unreachableTitle(r(e.baseUrl)) : n.refusedTitle(r(e.baseUrl), e.status) }),
|
|
1436
|
+
e.status === 0 ? /* @__PURE__ */ M("p", { children: n.unreachableHint }) : /* @__PURE__ */ M("p", { children: [e.error, e.reason].filter((e) => e !== void 0).join(" — ") }),
|
|
1437
|
+
e.fix === void 0 ? null : /* @__PURE__ */ N("p", { children: [
|
|
1438
|
+
/* @__PURE__ */ M("span", {
|
|
1359
1439
|
className: "vdt-refusal-label",
|
|
1360
1440
|
children: n.fixLabel
|
|
1361
1441
|
}),
|
|
1362
1442
|
" ",
|
|
1363
1443
|
e.fix
|
|
1364
1444
|
] }),
|
|
1365
|
-
t === void 0 ? null : /* @__PURE__ */
|
|
1366
|
-
/* @__PURE__ */
|
|
1445
|
+
t === void 0 ? null : /* @__PURE__ */ M(cn, { url: t }),
|
|
1446
|
+
/* @__PURE__ */ M("p", {
|
|
1367
1447
|
className: "vdt-refusal-paused",
|
|
1368
1448
|
children: n.paused
|
|
1369
1449
|
})
|
|
@@ -1371,20 +1451,20 @@ var H = (e) => {
|
|
|
1371
1451
|
}, e.baseUrl);
|
|
1372
1452
|
})
|
|
1373
1453
|
});
|
|
1374
|
-
},
|
|
1375
|
-
function
|
|
1376
|
-
return /* @__PURE__ */
|
|
1454
|
+
}, un = t(null);
|
|
1455
|
+
function dn(e) {
|
|
1456
|
+
return /* @__PURE__ */ M(un.Provider, {
|
|
1377
1457
|
value: e.token,
|
|
1378
1458
|
children: e.children
|
|
1379
1459
|
});
|
|
1380
1460
|
}
|
|
1381
|
-
var
|
|
1461
|
+
var Q = () => r(un), fn = (e, t) => {
|
|
1382
1462
|
let n = { ...t ?? {} };
|
|
1383
1463
|
return e !== null && e !== "" && (n.authorization = `Bearer ${e}`), n;
|
|
1384
|
-
},
|
|
1464
|
+
}, pn = (e) => e !== void 0 && e !== "" ? e : null, mn = (e) => typeof e == "object" && !!e && "data" in e, hn = (e) => mn(e) ? e.data : null, gn = async (e, t, n) => {
|
|
1385
1465
|
let r = await fetch(e, {
|
|
1386
1466
|
method: "POST",
|
|
1387
|
-
headers:
|
|
1467
|
+
headers: fn(t, {
|
|
1388
1468
|
accept: "application/json",
|
|
1389
1469
|
"content-type": "application/json"
|
|
1390
1470
|
}),
|
|
@@ -1394,39 +1474,39 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1394
1474
|
let e = typeof i == "object" && i ? i : void 0, t = typeof e?.message == "string" ? e.message : typeof e?.error == "string" ? e.error : `HTTP ${r.status}`;
|
|
1395
1475
|
throw Error(t);
|
|
1396
1476
|
}
|
|
1397
|
-
let a =
|
|
1477
|
+
let a = hn(i);
|
|
1398
1478
|
if (a === null) throw Error("the api answered without an observation");
|
|
1399
1479
|
return a;
|
|
1400
|
-
},
|
|
1401
|
-
let n = `${e}\u0000${t ?? ""}`, r =
|
|
1480
|
+
}, _n = (e, t) => {
|
|
1481
|
+
let n = `${e}\u0000${t ?? ""}`, r = vn.get(n);
|
|
1402
1482
|
if (r !== void 0) return r;
|
|
1403
|
-
let i =
|
|
1404
|
-
|
|
1483
|
+
let i = yn(e, t).finally(() => {
|
|
1484
|
+
vn.delete(n);
|
|
1405
1485
|
});
|
|
1406
|
-
return
|
|
1407
|
-
},
|
|
1408
|
-
let n =
|
|
1409
|
-
if (!
|
|
1486
|
+
return vn.set(n, i), i;
|
|
1487
|
+
}, vn = /* @__PURE__ */ new Map(), yn = async (e, t) => {
|
|
1488
|
+
let n = Yt(e);
|
|
1489
|
+
if (!Zt(n)) return null;
|
|
1410
1490
|
let r;
|
|
1411
1491
|
try {
|
|
1412
|
-
r = await fetch(e, { headers:
|
|
1492
|
+
r = await fetch(e, { headers: fn(t, { accept: "application/json" }) });
|
|
1413
1493
|
} catch {
|
|
1414
|
-
return
|
|
1494
|
+
return $t(n, !0), null;
|
|
1415
1495
|
}
|
|
1416
|
-
if (
|
|
1417
|
-
if (!r.ok) return
|
|
1418
|
-
|
|
1496
|
+
if (nn(r.status)) return Qt(await rn(n, r)), null;
|
|
1497
|
+
if (!r.ok) return $t(n, !1), null;
|
|
1498
|
+
en(n);
|
|
1419
1499
|
try {
|
|
1420
|
-
return
|
|
1500
|
+
return hn(await r.json());
|
|
1421
1501
|
} catch {
|
|
1422
1502
|
return null;
|
|
1423
1503
|
}
|
|
1424
|
-
},
|
|
1504
|
+
}, bn = (e) => typeof document > "u" ? () => {} : (document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e)), xn = () => typeof document > "u" || !document.hidden, Sn = () => !0, $ = () => u(bn, xn, Sn), Cn = 5e3, wn = async (e, t) => {
|
|
1425
1505
|
if (e === "") return null;
|
|
1426
|
-
let n = await
|
|
1506
|
+
let n = await _n(`${e}/_voltro/inspect/subscriptions`, t);
|
|
1427
1507
|
return n !== null && Array.isArray(n.subscriptions) ? n : null;
|
|
1428
|
-
},
|
|
1429
|
-
let t =
|
|
1508
|
+
}, Tn = (e) => {
|
|
1509
|
+
let t = O(), n = $(), r = Q(), a = t.names, o = e && n, [s, c] = l(() => a.map((e) => ({
|
|
1430
1510
|
name: e,
|
|
1431
1511
|
response: null,
|
|
1432
1512
|
live: !1
|
|
@@ -1443,10 +1523,10 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1443
1523
|
if (a === "") return { teardown: () => {} };
|
|
1444
1524
|
let o = null, s = null, c, l = () => {
|
|
1445
1525
|
s !== null && clearInterval(s), s = null;
|
|
1446
|
-
}, u = () =>
|
|
1526
|
+
}, u = () => Xt(a) !== void 0, d = () => {
|
|
1447
1527
|
if (s !== null || u()) return;
|
|
1448
1528
|
let e = async () => {
|
|
1449
|
-
let e = await
|
|
1529
|
+
let e = await wn(a, r);
|
|
1450
1530
|
e !== null && n(i, {
|
|
1451
1531
|
response: e,
|
|
1452
1532
|
live: !1
|
|
@@ -1454,9 +1534,9 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1454
1534
|
};
|
|
1455
1535
|
e(), s = setInterval(() => {
|
|
1456
1536
|
e();
|
|
1457
|
-
},
|
|
1537
|
+
}, Cn);
|
|
1458
1538
|
};
|
|
1459
|
-
return
|
|
1539
|
+
return wn(a, r).then((e) => {
|
|
1460
1540
|
e !== null && n(i, { response: e }), u() && (l(), o?.close());
|
|
1461
1541
|
}), c = setTimeout(() => {
|
|
1462
1542
|
if (!(u() || e)) try {
|
|
@@ -1490,139 +1570,139 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1490
1570
|
a,
|
|
1491
1571
|
r
|
|
1492
1572
|
]), s;
|
|
1493
|
-
},
|
|
1573
|
+
}, En = (e) => {
|
|
1494
1574
|
if (typeof e != "object" || !e) return !1;
|
|
1495
1575
|
let t = e;
|
|
1496
|
-
if (Array.isArray(t.and)) return t.and.some(
|
|
1497
|
-
if (Array.isArray(t.or)) return t.or.some(
|
|
1576
|
+
if (Array.isArray(t.and)) return t.and.some(En);
|
|
1577
|
+
if (Array.isArray(t.or)) return t.or.some(En);
|
|
1498
1578
|
let n = t.op;
|
|
1499
1579
|
return n === "gt" || n === "gte" || n === "lt" || n === "lte";
|
|
1500
|
-
},
|
|
1580
|
+
}, Dn = (e) => {
|
|
1501
1581
|
if (typeof e != "object" || !e) return !1;
|
|
1502
1582
|
let t = e;
|
|
1503
|
-
if (Array.isArray(t.and)) return t.and.some(
|
|
1504
|
-
if (Array.isArray(t.or)) return t.or.some(
|
|
1583
|
+
if (Array.isArray(t.and)) return t.and.some(Dn);
|
|
1584
|
+
if (Array.isArray(t.or)) return t.or.some(Dn);
|
|
1505
1585
|
let n = t.op;
|
|
1506
1586
|
return n === "eq" || n === "in";
|
|
1507
|
-
},
|
|
1587
|
+
}, On = (e) => e.usingIndex !== void 0 && e.usingIndex.fields.every((t) => e.conjunctiveColumns.includes(t)) ? "tuple" : Dn(e.predicate) ? "column" : En(e.predicate) ? "range" : "unindexed", kn = (e) => e === "tuple" ? "success" : e === "column" ? "info" : e === "range" ? "neutral" : "warning", An = (e) => e === "tuple" ? "tuple" : e === "column" ? "column" : e === "range" ? "range" : "UNINDEXED", jn = (e) => e == null ? "null" : typeof e == "string" ? `'${e}'` : Array.isArray(e) ? `[${e.map(jn).join(", ")}]` : String(e), Mn = (e) => e.op === "isNull" ? `${e.column} IS NULL` : e.op === "isNotNull" ? `${e.column} IS NOT NULL` : `${e.column} ${e.op} ${jn(e.value)}`, Nn = (e, t = 0) => {
|
|
1508
1588
|
if (typeof e != "object" || !e) return String(e);
|
|
1509
1589
|
let n = e;
|
|
1510
|
-
if (Array.isArray(n.and)) return n.and.map((e) =>
|
|
1590
|
+
if (Array.isArray(n.and)) return n.and.map((e) => Nn(e, t + 1)).join(" AND ");
|
|
1511
1591
|
if (Array.isArray(n.or)) {
|
|
1512
|
-
let e = n.or.map((e) =>
|
|
1592
|
+
let e = n.or.map((e) => Nn(e, t + 1)).join(" OR ");
|
|
1513
1593
|
return t > 0 ? `(${e})` : e;
|
|
1514
1594
|
}
|
|
1515
|
-
return typeof n.column == "string" && typeof n.op == "string" ?
|
|
1516
|
-
},
|
|
1517
|
-
let e =
|
|
1518
|
-
return e.length === 0 ? /* @__PURE__ */
|
|
1595
|
+
return typeof n.column == "string" && typeof n.op == "string" ? Mn(n) : JSON.stringify(e);
|
|
1596
|
+
}, Pn = () => {
|
|
1597
|
+
let e = Tn(!0), t = U().indexes, n = e.filter((e) => e.response !== null).length;
|
|
1598
|
+
return e.length === 0 ? /* @__PURE__ */ M(Y, { children: t.noApis }) : n === 0 ? /* @__PURE__ */ N(Y, { children: [t.unreachableTitle, /* @__PURE__ */ M("div", {
|
|
1519
1599
|
className: "vdt:mt-1 vdt:text-foreground-subtle",
|
|
1520
1600
|
children: t.unreachableHint
|
|
1521
|
-
})] }) : /* @__PURE__ */
|
|
1601
|
+
})] }) : /* @__PURE__ */ M("div", {
|
|
1522
1602
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
1523
|
-
children: e.map(({ name: e, response: n, live: r }) => n === null ? /* @__PURE__ */
|
|
1524
|
-
Icon:
|
|
1603
|
+
children: e.map(({ name: e, response: n, live: r }) => n === null ? /* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, {
|
|
1604
|
+
Icon: me,
|
|
1525
1605
|
children: e
|
|
1526
|
-
}), /* @__PURE__ */
|
|
1606
|
+
}), /* @__PURE__ */ M(We, {
|
|
1527
1607
|
className: "vdt:text-xs vdt:text-foreground-subtle",
|
|
1528
1608
|
children: t.offline
|
|
1529
|
-
})] }, e) : /* @__PURE__ */
|
|
1609
|
+
})] }, e) : /* @__PURE__ */ M(Fn, {
|
|
1530
1610
|
apiName: e,
|
|
1531
1611
|
response: n,
|
|
1532
1612
|
live: r
|
|
1533
1613
|
}, e))
|
|
1534
1614
|
});
|
|
1535
|
-
},
|
|
1536
|
-
let r =
|
|
1537
|
-
return /* @__PURE__ */
|
|
1538
|
-
/* @__PURE__ */
|
|
1539
|
-
Icon:
|
|
1540
|
-
right: /* @__PURE__ */
|
|
1615
|
+
}, Fn = ({ apiName: e, response: t, live: n }) => {
|
|
1616
|
+
let r = U().indexes, i = [...t.subscriptions].sort((e, t) => t.subscriberCount - e.subscriberCount);
|
|
1617
|
+
return /* @__PURE__ */ N(K, { children: [
|
|
1618
|
+
/* @__PURE__ */ M(q, {
|
|
1619
|
+
Icon: me,
|
|
1620
|
+
right: /* @__PURE__ */ N("div", {
|
|
1541
1621
|
className: "vdt:flex vdt:items-center vdt:gap-1",
|
|
1542
|
-
children: [/* @__PURE__ */
|
|
1622
|
+
children: [/* @__PURE__ */ M(G, {
|
|
1543
1623
|
tone: "info",
|
|
1544
1624
|
children: r.subsBadge(t.subscriptions.length)
|
|
1545
|
-
}), /* @__PURE__ */
|
|
1625
|
+
}), /* @__PURE__ */ M(G, {
|
|
1546
1626
|
tone: n ? "success" : "neutral",
|
|
1547
1627
|
children: n ? r.live : r.poll
|
|
1548
1628
|
})]
|
|
1549
1629
|
}),
|
|
1550
1630
|
children: e
|
|
1551
1631
|
}),
|
|
1552
|
-
t.matcherStats.length > 0 && /* @__PURE__ */
|
|
1632
|
+
t.matcherStats.length > 0 && /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("div", {
|
|
1553
1633
|
className: "vdt:text-[11px] vdt:uppercase vdt:tracking-wide vdt:text-foreground-subtle vdt:mt-3 vdt:mb-1",
|
|
1554
1634
|
children: r.tables
|
|
1555
|
-
}), /* @__PURE__ */
|
|
1635
|
+
}), /* @__PURE__ */ M("div", {
|
|
1556
1636
|
className: "vdt:flex vdt:flex-col vdt:gap-1",
|
|
1557
|
-
children: t.matcherStats.map((e) => /* @__PURE__ */
|
|
1637
|
+
children: t.matcherStats.map((e) => /* @__PURE__ */ N("div", {
|
|
1558
1638
|
className: "vdt:flex vdt:items-baseline vdt:gap-3 vdt:text-xs",
|
|
1559
1639
|
children: [
|
|
1560
|
-
/* @__PURE__ */
|
|
1640
|
+
/* @__PURE__ */ M("span", {
|
|
1561
1641
|
className: "vdt:font-mono vdt:text-foreground",
|
|
1562
1642
|
children: e.tableName
|
|
1563
1643
|
}),
|
|
1564
|
-
/* @__PURE__ */
|
|
1644
|
+
/* @__PURE__ */ N("span", {
|
|
1565
1645
|
className: "vdt:text-foreground-subtle",
|
|
1566
1646
|
children: [e.tupleRouted + e.columnBucketed + e.rangeBucketed + e.unindexedFallback, " subs"]
|
|
1567
1647
|
}),
|
|
1568
|
-
e.tupleRouted > 0 && /* @__PURE__ */
|
|
1648
|
+
e.tupleRouted > 0 && /* @__PURE__ */ M(G, {
|
|
1569
1649
|
tone: "success",
|
|
1570
1650
|
children: `${e.tupleRouted} tuple`
|
|
1571
1651
|
}),
|
|
1572
|
-
e.columnBucketed > 0 && /* @__PURE__ */
|
|
1652
|
+
e.columnBucketed > 0 && /* @__PURE__ */ M(G, {
|
|
1573
1653
|
tone: "info",
|
|
1574
1654
|
children: `${e.columnBucketed} column`
|
|
1575
1655
|
}),
|
|
1576
|
-
e.rangeBucketed > 0 && /* @__PURE__ */
|
|
1656
|
+
e.rangeBucketed > 0 && /* @__PURE__ */ M(G, {
|
|
1577
1657
|
tone: "neutral",
|
|
1578
1658
|
children: `${e.rangeBucketed} range`
|
|
1579
1659
|
}),
|
|
1580
|
-
e.unindexedFallback > 0 && /* @__PURE__ */
|
|
1660
|
+
e.unindexedFallback > 0 && /* @__PURE__ */ M(G, {
|
|
1581
1661
|
tone: "warning",
|
|
1582
1662
|
children: `${e.unindexedFallback} unindexed`
|
|
1583
1663
|
}),
|
|
1584
|
-
e.distinctTupleKeys > 0 && /* @__PURE__ */
|
|
1664
|
+
e.distinctTupleKeys > 0 && /* @__PURE__ */ N("span", {
|
|
1585
1665
|
className: "vdt:text-foreground-subtle",
|
|
1586
1666
|
children: [e.distinctTupleKeys, " tuple keys"]
|
|
1587
1667
|
})
|
|
1588
1668
|
]
|
|
1589
1669
|
}, e.tableName))
|
|
1590
1670
|
})] }),
|
|
1591
|
-
i.length > 0 && /* @__PURE__ */
|
|
1671
|
+
i.length > 0 && /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("div", {
|
|
1592
1672
|
className: "vdt:text-[11px] vdt:uppercase vdt:tracking-wide vdt:text-foreground-subtle vdt:mt-3 vdt:mb-1",
|
|
1593
1673
|
children: r.subscriptionsSection
|
|
1594
|
-
}), /* @__PURE__ */
|
|
1674
|
+
}), /* @__PURE__ */ M("div", {
|
|
1595
1675
|
className: "vdt:flex vdt:flex-col vdt:gap-2",
|
|
1596
|
-
children: i.map((e) => /* @__PURE__ */
|
|
1676
|
+
children: i.map((e) => /* @__PURE__ */ M(In, { sub: e }, e.fingerprint))
|
|
1597
1677
|
})] })
|
|
1598
1678
|
] });
|
|
1599
|
-
},
|
|
1600
|
-
let t =
|
|
1601
|
-
return /* @__PURE__ */
|
|
1679
|
+
}, In = ({ sub: e }) => {
|
|
1680
|
+
let t = U().indexes, n = On(e);
|
|
1681
|
+
return /* @__PURE__ */ N("div", {
|
|
1602
1682
|
className: "vdt:flex vdt:flex-col vdt:gap-0.5 vdt:px-2 vdt:py-1 vdt:rounded-sm vdt:bg-muted/40",
|
|
1603
|
-
children: [/* @__PURE__ */
|
|
1683
|
+
children: [/* @__PURE__ */ N("div", {
|
|
1604
1684
|
className: "vdt:flex vdt:items-baseline vdt:gap-2 vdt:text-xs",
|
|
1605
1685
|
children: [
|
|
1606
|
-
/* @__PURE__ */
|
|
1686
|
+
/* @__PURE__ */ M("span", {
|
|
1607
1687
|
className: "vdt:font-mono vdt:text-foreground",
|
|
1608
1688
|
children: e.table
|
|
1609
1689
|
}),
|
|
1610
|
-
/* @__PURE__ */
|
|
1611
|
-
tone:
|
|
1612
|
-
children:
|
|
1690
|
+
/* @__PURE__ */ M(G, {
|
|
1691
|
+
tone: kn(n),
|
|
1692
|
+
children: An(n)
|
|
1613
1693
|
}),
|
|
1614
|
-
e.usingIndex && /* @__PURE__ */
|
|
1694
|
+
e.usingIndex && /* @__PURE__ */ N("span", {
|
|
1615
1695
|
className: "vdt:text-foreground-subtle",
|
|
1616
1696
|
children: [
|
|
1617
1697
|
t.via,
|
|
1618
1698
|
" ",
|
|
1619
|
-
/* @__PURE__ */
|
|
1699
|
+
/* @__PURE__ */ M("span", {
|
|
1620
1700
|
className: "vdt:font-mono",
|
|
1621
1701
|
children: e.usingIndex.name
|
|
1622
1702
|
})
|
|
1623
1703
|
]
|
|
1624
1704
|
}),
|
|
1625
|
-
/* @__PURE__ */
|
|
1705
|
+
/* @__PURE__ */ N("span", {
|
|
1626
1706
|
className: "vdt:text-foreground-subtle vdt:ml-auto",
|
|
1627
1707
|
children: [
|
|
1628
1708
|
e.subscriberCount,
|
|
@@ -1631,34 +1711,34 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1631
1711
|
]
|
|
1632
1712
|
})
|
|
1633
1713
|
]
|
|
1634
|
-
}), /* @__PURE__ */
|
|
1714
|
+
}), /* @__PURE__ */ M("div", {
|
|
1635
1715
|
className: "vdt:text-[11px] vdt:font-mono vdt:text-foreground-subtle vdt:break-all",
|
|
1636
|
-
children:
|
|
1716
|
+
children: Nn(e.predicate)
|
|
1637
1717
|
})]
|
|
1638
1718
|
});
|
|
1639
|
-
},
|
|
1640
|
-
let t =
|
|
1719
|
+
}, Ln = (e) => {
|
|
1720
|
+
let t = Tn(e), n = 0;
|
|
1641
1721
|
for (let e of t) n += e.response?.subscriptions.length ?? 0;
|
|
1642
1722
|
return n;
|
|
1643
|
-
},
|
|
1723
|
+
}, Rn = {
|
|
1644
1724
|
outgoing: [],
|
|
1645
1725
|
incoming: [],
|
|
1646
1726
|
targets: [],
|
|
1647
1727
|
deliveries: []
|
|
1648
|
-
},
|
|
1728
|
+
}, zn = 4e3, Bn = async (e, t) => {
|
|
1649
1729
|
if (e === "") return null;
|
|
1650
|
-
let n = await
|
|
1730
|
+
let n = await _n(`${e}/_voltro/inspect/webhooks`, t);
|
|
1651
1731
|
return n !== null && Array.isArray(n.outgoing) && Array.isArray(n.incoming) ? n : null;
|
|
1652
|
-
},
|
|
1653
|
-
let n = $(), r =
|
|
1732
|
+
}, Vn = (e, t = !0) => {
|
|
1733
|
+
let n = $(), r = Q(), a = t && n && e !== "", [o, s] = l(Rn);
|
|
1654
1734
|
return i(() => {
|
|
1655
1735
|
if (!a) return;
|
|
1656
1736
|
let t = !1, n = async () => {
|
|
1657
|
-
let n = await
|
|
1737
|
+
let n = await Bn(e, r);
|
|
1658
1738
|
t || n === null || s(n);
|
|
1659
1739
|
};
|
|
1660
1740
|
n();
|
|
1661
|
-
let i = setInterval(n,
|
|
1741
|
+
let i = setInterval(n, zn);
|
|
1662
1742
|
return () => {
|
|
1663
1743
|
t = !0, clearInterval(i);
|
|
1664
1744
|
};
|
|
@@ -1667,17 +1747,17 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1667
1747
|
a,
|
|
1668
1748
|
r
|
|
1669
1749
|
]), o;
|
|
1670
|
-
},
|
|
1750
|
+
}, Hn = {
|
|
1671
1751
|
pending: "neutral",
|
|
1672
1752
|
inFlight: "info",
|
|
1673
1753
|
succeeded: "success",
|
|
1674
1754
|
failed: "danger",
|
|
1675
1755
|
retryScheduled: "warning"
|
|
1676
|
-
},
|
|
1756
|
+
}, Un = (e) => {
|
|
1677
1757
|
let t = new Date(e), n = (e) => e < 10 ? `0${e}` : String(e);
|
|
1678
1758
|
return `${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`;
|
|
1679
|
-
},
|
|
1680
|
-
let t =
|
|
1759
|
+
}, Wn = (e) => {
|
|
1760
|
+
let t = O(), n = $(), r = Q(), a = t.names.join(","), [o, s] = l(0), c = e && n;
|
|
1681
1761
|
return i(() => {
|
|
1682
1762
|
if (!c) {
|
|
1683
1763
|
s(0);
|
|
@@ -1689,11 +1769,11 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1689
1769
|
return;
|
|
1690
1770
|
}
|
|
1691
1771
|
let n = !1, i = async () => {
|
|
1692
|
-
let t = await Promise.all(e.map((e) =>
|
|
1772
|
+
let t = await Promise.all(e.map((e) => Bn(e, r)));
|
|
1693
1773
|
n || s(t.reduce((e, t) => e + (t === null ? 0 : t.outgoing.length + t.incoming.length + t.targets.length), 0));
|
|
1694
1774
|
};
|
|
1695
1775
|
i();
|
|
1696
|
-
let o = setInterval(i,
|
|
1776
|
+
let o = setInterval(i, zn);
|
|
1697
1777
|
return () => {
|
|
1698
1778
|
n = !0, clearInterval(o);
|
|
1699
1779
|
};
|
|
@@ -1703,33 +1783,33 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1703
1783
|
c,
|
|
1704
1784
|
r
|
|
1705
1785
|
]), o;
|
|
1706
|
-
},
|
|
1707
|
-
let n =
|
|
1708
|
-
return n.outgoing.length + n.incoming.length + n.targets.length + n.deliveries.length > 0 ? /* @__PURE__ */
|
|
1786
|
+
}, Gn = ({ apiName: e, baseUrl: t }) => {
|
|
1787
|
+
let n = Vn(t), r = U().webhooks;
|
|
1788
|
+
return n.outgoing.length + n.incoming.length + n.targets.length + n.deliveries.length > 0 ? /* @__PURE__ */ M("div", {
|
|
1709
1789
|
className: "vdt:space-y-4",
|
|
1710
|
-
children: /* @__PURE__ */
|
|
1711
|
-
Icon:
|
|
1790
|
+
children: /* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, {
|
|
1791
|
+
Icon: be,
|
|
1712
1792
|
children: e
|
|
1713
|
-
}), /* @__PURE__ */
|
|
1714
|
-
n.outgoing.length > 0 ? /* @__PURE__ */
|
|
1793
|
+
}), /* @__PURE__ */ N(We, { children: [
|
|
1794
|
+
n.outgoing.length > 0 ? /* @__PURE__ */ N("div", {
|
|
1715
1795
|
className: "vdt:mb-4",
|
|
1716
|
-
children: [/* @__PURE__ */
|
|
1796
|
+
children: [/* @__PURE__ */ M("div", {
|
|
1717
1797
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
1718
1798
|
children: r.outgoing(n.outgoing.length)
|
|
1719
|
-
}), /* @__PURE__ */
|
|
1799
|
+
}), /* @__PURE__ */ M("div", {
|
|
1720
1800
|
className: "vdt:space-y-1",
|
|
1721
|
-
children: n.outgoing.map((e) => /* @__PURE__ */
|
|
1801
|
+
children: n.outgoing.map((e) => /* @__PURE__ */ N("div", {
|
|
1722
1802
|
className: "vdt-record-row vdt:text-sm",
|
|
1723
1803
|
children: [
|
|
1724
|
-
/* @__PURE__ */
|
|
1804
|
+
/* @__PURE__ */ M("code", {
|
|
1725
1805
|
className: "vdt:text-foreground vdt:font-mono",
|
|
1726
1806
|
children: e.id
|
|
1727
1807
|
}),
|
|
1728
|
-
/* @__PURE__ */
|
|
1808
|
+
/* @__PURE__ */ N(G, {
|
|
1729
1809
|
tone: "neutral",
|
|
1730
1810
|
children: ["v", e.version]
|
|
1731
1811
|
}),
|
|
1732
|
-
e.description ? /* @__PURE__ */
|
|
1812
|
+
e.description ? /* @__PURE__ */ M("span", {
|
|
1733
1813
|
className: "vdt-record-description vdt:text-foreground-muted vdt:text-xs",
|
|
1734
1814
|
children: e.description
|
|
1735
1815
|
}) : null
|
|
@@ -1737,28 +1817,28 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1737
1817
|
}, e.id))
|
|
1738
1818
|
})]
|
|
1739
1819
|
}) : null,
|
|
1740
|
-
n.incoming.length > 0 ? /* @__PURE__ */
|
|
1820
|
+
n.incoming.length > 0 ? /* @__PURE__ */ N("div", {
|
|
1741
1821
|
className: "vdt:mb-4",
|
|
1742
|
-
children: [/* @__PURE__ */
|
|
1822
|
+
children: [/* @__PURE__ */ M("div", {
|
|
1743
1823
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
1744
1824
|
children: r.incoming(n.incoming.length)
|
|
1745
|
-
}), /* @__PURE__ */
|
|
1825
|
+
}), /* @__PURE__ */ M("div", {
|
|
1746
1826
|
className: "vdt:space-y-1",
|
|
1747
|
-
children: n.incoming.map((e) => /* @__PURE__ */
|
|
1827
|
+
children: n.incoming.map((e) => /* @__PURE__ */ N("div", {
|
|
1748
1828
|
className: "vdt-record-row vdt:text-sm",
|
|
1749
1829
|
children: [
|
|
1750
|
-
/* @__PURE__ */
|
|
1830
|
+
/* @__PURE__ */ M("code", {
|
|
1751
1831
|
className: "vdt:text-foreground vdt:font-mono",
|
|
1752
1832
|
children: e.path
|
|
1753
1833
|
}),
|
|
1754
|
-
e.provider ? /* @__PURE__ */
|
|
1834
|
+
e.provider ? /* @__PURE__ */ M(G, {
|
|
1755
1835
|
tone: "info",
|
|
1756
1836
|
children: e.provider
|
|
1757
1837
|
}) : null,
|
|
1758
|
-
e.signatureConfigured ? /* @__PURE__ */
|
|
1838
|
+
e.signatureConfigured ? /* @__PURE__ */ M(G, {
|
|
1759
1839
|
tone: "success",
|
|
1760
1840
|
children: r.signed
|
|
1761
|
-
}) : /* @__PURE__ */
|
|
1841
|
+
}) : /* @__PURE__ */ M(G, {
|
|
1762
1842
|
tone: "warning",
|
|
1763
1843
|
children: r.unsigned
|
|
1764
1844
|
})
|
|
@@ -1766,41 +1846,41 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1766
1846
|
}, e.id))
|
|
1767
1847
|
})]
|
|
1768
1848
|
}) : null,
|
|
1769
|
-
n.targets.length > 0 ? /* @__PURE__ */
|
|
1849
|
+
n.targets.length > 0 ? /* @__PURE__ */ N("div", {
|
|
1770
1850
|
className: "vdt:mb-4",
|
|
1771
|
-
children: [/* @__PURE__ */
|
|
1851
|
+
children: [/* @__PURE__ */ M("div", {
|
|
1772
1852
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
1773
1853
|
children: r.targets(n.targets.length)
|
|
1774
|
-
}), /* @__PURE__ */
|
|
1854
|
+
}), /* @__PURE__ */ M("div", {
|
|
1775
1855
|
className: "vdt:space-y-1",
|
|
1776
1856
|
children: n.targets.map((e) => {
|
|
1777
1857
|
let t = n.outgoing.find((t) => t.id === e.event)?.version ?? e.payloadVersion, i = e.payloadVersion === t ? "current" : e.payloadVersion < t ? "behind" : "ahead";
|
|
1778
|
-
return /* @__PURE__ */
|
|
1858
|
+
return /* @__PURE__ */ N("div", {
|
|
1779
1859
|
className: "vdt-record-row vdt:text-sm",
|
|
1780
1860
|
children: [
|
|
1781
|
-
/* @__PURE__ */
|
|
1861
|
+
/* @__PURE__ */ M("code", {
|
|
1782
1862
|
className: "vdt:text-foreground vdt:font-mono",
|
|
1783
1863
|
children: e.event
|
|
1784
1864
|
}),
|
|
1785
|
-
/* @__PURE__ */
|
|
1865
|
+
/* @__PURE__ */ M("span", {
|
|
1786
1866
|
className: "vdt:text-foreground-muted",
|
|
1787
1867
|
children: "→"
|
|
1788
1868
|
}),
|
|
1789
|
-
/* @__PURE__ */
|
|
1869
|
+
/* @__PURE__ */ M("span", {
|
|
1790
1870
|
className: "vdt:text-foreground vdt:text-xs vdt:truncate vdt:max-w-72",
|
|
1791
1871
|
children: e.url
|
|
1792
1872
|
}),
|
|
1793
|
-
e.active ? /* @__PURE__ */
|
|
1873
|
+
e.active ? /* @__PURE__ */ M(G, {
|
|
1794
1874
|
tone: "success",
|
|
1795
1875
|
children: r.active
|
|
1796
|
-
}) : /* @__PURE__ */
|
|
1876
|
+
}) : /* @__PURE__ */ M(G, {
|
|
1797
1877
|
tone: "warning",
|
|
1798
1878
|
children: r.paused
|
|
1799
1879
|
}),
|
|
1800
|
-
i === "current" ? /* @__PURE__ */
|
|
1880
|
+
i === "current" ? /* @__PURE__ */ N(G, {
|
|
1801
1881
|
tone: "neutral",
|
|
1802
1882
|
children: ["v", e.payloadVersion]
|
|
1803
|
-
}) : i === "behind" ? /* @__PURE__ */
|
|
1883
|
+
}) : i === "behind" ? /* @__PURE__ */ N(G, {
|
|
1804
1884
|
tone: "warning",
|
|
1805
1885
|
children: [
|
|
1806
1886
|
"v",
|
|
@@ -1808,7 +1888,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1808
1888
|
" ← current v",
|
|
1809
1889
|
t
|
|
1810
1890
|
]
|
|
1811
|
-
}) : /* @__PURE__ */
|
|
1891
|
+
}) : /* @__PURE__ */ N(G, {
|
|
1812
1892
|
tone: "danger",
|
|
1813
1893
|
children: [
|
|
1814
1894
|
"v",
|
|
@@ -1822,39 +1902,39 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1822
1902
|
})
|
|
1823
1903
|
})]
|
|
1824
1904
|
}) : null,
|
|
1825
|
-
n.deliveries.length > 0 ? /* @__PURE__ */
|
|
1905
|
+
n.deliveries.length > 0 ? /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("div", {
|
|
1826
1906
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
1827
1907
|
children: r.deliveries(n.deliveries.length)
|
|
1828
|
-
}), /* @__PURE__ */
|
|
1908
|
+
}), /* @__PURE__ */ M("div", {
|
|
1829
1909
|
className: "vdt:space-y-0.5 vdt:font-mono vdt:text-xs",
|
|
1830
|
-
children: n.deliveries.map((e) => /* @__PURE__ */
|
|
1910
|
+
children: n.deliveries.map((e) => /* @__PURE__ */ N("div", {
|
|
1831
1911
|
className: "vdt:flex vdt:items-center vdt:gap-2",
|
|
1832
1912
|
children: [
|
|
1833
|
-
/* @__PURE__ */
|
|
1913
|
+
/* @__PURE__ */ M("span", {
|
|
1834
1914
|
className: "vdt:text-foreground-subtle",
|
|
1835
|
-
children:
|
|
1915
|
+
children: Un(e.scheduledAt)
|
|
1836
1916
|
}),
|
|
1837
|
-
/* @__PURE__ */
|
|
1917
|
+
/* @__PURE__ */ M("span", {
|
|
1838
1918
|
className: "vdt:text-foreground vdt:min-w-32 vdt:truncate",
|
|
1839
1919
|
children: e.event
|
|
1840
1920
|
}),
|
|
1841
|
-
/* @__PURE__ */
|
|
1842
|
-
tone:
|
|
1921
|
+
/* @__PURE__ */ M(G, {
|
|
1922
|
+
tone: Hn[e.status],
|
|
1843
1923
|
children: e.status
|
|
1844
1924
|
}),
|
|
1845
|
-
e.responseStatus === null ? null : /* @__PURE__ */
|
|
1925
|
+
e.responseStatus === null ? null : /* @__PURE__ */ M("span", {
|
|
1846
1926
|
className: "vdt:text-foreground-muted",
|
|
1847
1927
|
children: e.responseStatus
|
|
1848
1928
|
}),
|
|
1849
|
-
e.latencyMs === null ? null : /* @__PURE__ */
|
|
1929
|
+
e.latencyMs === null ? null : /* @__PURE__ */ N("span", {
|
|
1850
1930
|
className: "vdt:text-foreground-subtle",
|
|
1851
1931
|
children: [e.latencyMs, "ms"]
|
|
1852
1932
|
}),
|
|
1853
|
-
/* @__PURE__ */
|
|
1933
|
+
/* @__PURE__ */ M("span", {
|
|
1854
1934
|
className: "vdt:text-foreground-subtle",
|
|
1855
1935
|
children: r.attempt(e.attempt)
|
|
1856
1936
|
}),
|
|
1857
|
-
e.errorMessage ? /* @__PURE__ */
|
|
1937
|
+
e.errorMessage ? /* @__PURE__ */ M("span", {
|
|
1858
1938
|
className: "vdt:text-danger vdt:truncate vdt:max-w-64",
|
|
1859
1939
|
children: e.errorMessage
|
|
1860
1940
|
}) : null
|
|
@@ -1863,22 +1943,22 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1863
1943
|
})] }) : null
|
|
1864
1944
|
] })] })
|
|
1865
1945
|
}) : null;
|
|
1866
|
-
},
|
|
1867
|
-
let e =
|
|
1868
|
-
return e.names.length === 0 ? /* @__PURE__ */
|
|
1946
|
+
}, Kn = () => {
|
|
1947
|
+
let e = O(), t = U().webhooks;
|
|
1948
|
+
return e.names.length === 0 ? /* @__PURE__ */ M(Y, { children: t.empty }) : /* @__PURE__ */ M("div", {
|
|
1869
1949
|
className: "vdt:space-y-4 vdt:p-3",
|
|
1870
1950
|
children: e.names.map((t) => {
|
|
1871
1951
|
let n = e.get(t);
|
|
1872
|
-
return /* @__PURE__ */
|
|
1952
|
+
return /* @__PURE__ */ M(Gn, {
|
|
1873
1953
|
apiName: t,
|
|
1874
1954
|
baseUrl: n.inspectBaseUrl
|
|
1875
1955
|
}, t);
|
|
1876
1956
|
})
|
|
1877
1957
|
});
|
|
1878
|
-
},
|
|
1958
|
+
}, qn = (e, t) => {
|
|
1879
1959
|
let n = `${e}/_voltro/inspect/stream?channels=${encodeURIComponent(t.channels.join(","))}`, r = !1, i = !1, a = 0, o, s, c = async () => {
|
|
1880
1960
|
if (r) return;
|
|
1881
|
-
if (
|
|
1961
|
+
if (Xt(e) !== void 0) {
|
|
1882
1962
|
i = !0;
|
|
1883
1963
|
return;
|
|
1884
1964
|
}
|
|
@@ -1886,10 +1966,10 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1886
1966
|
let l;
|
|
1887
1967
|
try {
|
|
1888
1968
|
let s = await fetch(n, {
|
|
1889
|
-
headers:
|
|
1969
|
+
headers: fn(t.token, { accept: "text/event-stream" }),
|
|
1890
1970
|
signal: o.signal
|
|
1891
1971
|
});
|
|
1892
|
-
if (
|
|
1972
|
+
if (nn(s.status)) throw Qt(await rn(e, s)), i = !0, Error(`inspect stream refused (HTTP ${s.status})`);
|
|
1893
1973
|
if (!s.ok || s.body === null) throw Error(`inspect stream HTTP ${s.status}`);
|
|
1894
1974
|
if (r) {
|
|
1895
1975
|
await s.body.cancel();
|
|
@@ -1934,11 +2014,11 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1934
2014
|
}, 0), { close: () => {
|
|
1935
2015
|
r = !0, clearTimeout(s), o?.abort();
|
|
1936
2016
|
} };
|
|
1937
|
-
},
|
|
2017
|
+
}, Jn = (e, t, n, r = 250) => {
|
|
1938
2018
|
let [a, o] = l(0), s = t.join(",");
|
|
1939
2019
|
return i(() => {
|
|
1940
2020
|
if (!n || e === "") return;
|
|
1941
|
-
let t = new Set(s.split(",")), i, a = !1, c =
|
|
2021
|
+
let t = new Set(s.split(",")), i, a = !1, c = qn(e, {
|
|
1942
2022
|
channels: s.split(","),
|
|
1943
2023
|
token: null,
|
|
1944
2024
|
onEvent: (e) => {
|
|
@@ -1956,7 +2036,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1956
2036
|
n,
|
|
1957
2037
|
r
|
|
1958
2038
|
]), a;
|
|
1959
|
-
},
|
|
2039
|
+
}, Yn = {
|
|
1960
2040
|
queued: "neutral",
|
|
1961
2041
|
running: "info",
|
|
1962
2042
|
succeeded: "success",
|
|
@@ -1964,36 +2044,36 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
1964
2044
|
cancelled: "warning",
|
|
1965
2045
|
paused: "accent",
|
|
1966
2046
|
suspended: "accent"
|
|
1967
|
-
},
|
|
2047
|
+
}, Xn = {
|
|
1968
2048
|
running: "info",
|
|
1969
2049
|
succeeded: "success",
|
|
1970
2050
|
failed: "danger"
|
|
1971
|
-
},
|
|
2051
|
+
}, Zn = 50, Qn = 1e4, $n = (e) => e == null ? "—" : e < 1e3 ? `${Math.round(e)}ms` : e < 6e4 ? `${(e / 1e3).toFixed(e < 1e4 ? 2 : 1)}s` : `${Math.floor(e / 6e4)}m ${Math.floor(e % 6e4 / 1e3)}s`, er = (e) => {
|
|
1972
2052
|
let t = new Date(e), n = (e) => e < 10 ? `0${e}` : String(e);
|
|
1973
2053
|
return `${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`;
|
|
1974
|
-
},
|
|
2054
|
+
}, tr = (e) => {
|
|
1975
2055
|
try {
|
|
1976
2056
|
return JSON.stringify(e, null, 2);
|
|
1977
2057
|
} catch {
|
|
1978
2058
|
return String(e);
|
|
1979
2059
|
}
|
|
1980
|
-
},
|
|
2060
|
+
}, nr = (e) => e === "running" || e === "queued", rr = (e, t) => e.durationMs ?? (nr(e.status) ? t - new Date(e.startedAt).getTime() : null), ir = (e) => {
|
|
1981
2061
|
let t = /* @__PURE__ */ new Set();
|
|
1982
2062
|
for (let n of e) {
|
|
1983
2063
|
let e = n.payload?.signalName;
|
|
1984
2064
|
typeof e == "string" && (n.eventType === "signal-awaited" && t.add(e), n.eventType === "signal-received" && t.delete(e));
|
|
1985
2065
|
}
|
|
1986
2066
|
return [...t];
|
|
1987
|
-
},
|
|
2067
|
+
}, ar = async (e, t) => {
|
|
1988
2068
|
if (e === "") return null;
|
|
1989
|
-
let n = await
|
|
2069
|
+
let n = await _n(`${e}/_voltro/inspect/workflows/runs?limit=${Zn}`, t);
|
|
1990
2070
|
return n !== null && Array.isArray(n.runs) ? n.runs : null;
|
|
1991
|
-
},
|
|
1992
|
-
let t = $(), n =
|
|
2071
|
+
}, or = (e) => {
|
|
2072
|
+
let t = $(), n = Q(), r = t && e !== "", a = Jn(e, ["workflowRuns"], r), [o, s] = l([]), [c, u] = l(!1);
|
|
1993
2073
|
return i(() => {
|
|
1994
2074
|
if (!r) return;
|
|
1995
2075
|
let t = !1, i = async () => {
|
|
1996
|
-
let r = await
|
|
2076
|
+
let r = await ar(e, n);
|
|
1997
2077
|
if (!t) {
|
|
1998
2078
|
if (r === null) {
|
|
1999
2079
|
u(!0);
|
|
@@ -2003,7 +2083,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2003
2083
|
}
|
|
2004
2084
|
};
|
|
2005
2085
|
i();
|
|
2006
|
-
let a = setInterval(i,
|
|
2086
|
+
let a = setInterval(i, Qn);
|
|
2007
2087
|
return () => {
|
|
2008
2088
|
t = !0, clearInterval(a);
|
|
2009
2089
|
};
|
|
@@ -2016,16 +2096,16 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2016
2096
|
runs: o,
|
|
2017
2097
|
failed: c
|
|
2018
2098
|
};
|
|
2019
|
-
},
|
|
2020
|
-
let n = $(), r =
|
|
2099
|
+
}, sr = (e, t) => {
|
|
2100
|
+
let n = $(), r = Q(), a = Jn(e, ["workflowSteps", "workflowEvents"], n && e !== ""), [o, s] = l([]), [c, u] = l([]);
|
|
2021
2101
|
return i(() => {
|
|
2022
2102
|
if (!n || e === "") return;
|
|
2023
2103
|
let i = !1, a = `${e}/_voltro/inspect/workflows/runs/${encodeURIComponent(t)}`, o = async () => {
|
|
2024
|
-
let [e, t] = await Promise.all([
|
|
2104
|
+
let [e, t] = await Promise.all([_n(`${a}/steps`, r), _n(`${a}/events`, r)]);
|
|
2025
2105
|
i || (e !== null && Array.isArray(e.steps) && s(e.steps), t !== null && Array.isArray(t.events) && u(t.events));
|
|
2026
2106
|
};
|
|
2027
2107
|
o();
|
|
2028
|
-
let c = setInterval(o,
|
|
2108
|
+
let c = setInterval(o, Qn);
|
|
2029
2109
|
return () => {
|
|
2030
2110
|
i = !0, clearInterval(c);
|
|
2031
2111
|
};
|
|
@@ -2039,8 +2119,8 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2039
2119
|
steps: o,
|
|
2040
2120
|
events: c
|
|
2041
2121
|
};
|
|
2042
|
-
},
|
|
2043
|
-
let t =
|
|
2122
|
+
}, cr = (e) => {
|
|
2123
|
+
let t = O(), n = $(), r = Q(), a = t.names.join(","), [o, s] = l(0), c = e && n, u = Jn(a === "" ? "" : t.get(a.split(",")[0]).inspectBaseUrl ?? "", ["workflowRuns"], c);
|
|
2044
2124
|
return i(() => {
|
|
2045
2125
|
if (!c) {
|
|
2046
2126
|
s(0);
|
|
@@ -2052,11 +2132,11 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2052
2132
|
return;
|
|
2053
2133
|
}
|
|
2054
2134
|
let n = !1, i = async () => {
|
|
2055
|
-
let t = await Promise.all(e.map((e) =>
|
|
2056
|
-
n || s(t.reduce((e, t) => e + (t === null ? 0 : t.filter((e) =>
|
|
2135
|
+
let t = await Promise.all(e.map((e) => ar(e, r)));
|
|
2136
|
+
n || s(t.reduce((e, t) => e + (t === null ? 0 : t.filter((e) => nr(e.status)).length), 0));
|
|
2057
2137
|
};
|
|
2058
2138
|
i();
|
|
2059
|
-
let o = setInterval(i,
|
|
2139
|
+
let o = setInterval(i, Qn);
|
|
2060
2140
|
return () => {
|
|
2061
2141
|
n = !0, clearInterval(o);
|
|
2062
2142
|
};
|
|
@@ -2067,87 +2147,87 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2067
2147
|
r,
|
|
2068
2148
|
u
|
|
2069
2149
|
]), o;
|
|
2070
|
-
},
|
|
2071
|
-
let e =
|
|
2072
|
-
return e.names.length === 0 ? /* @__PURE__ */
|
|
2150
|
+
}, lr = () => {
|
|
2151
|
+
let e = O(), t = U().workflows;
|
|
2152
|
+
return e.names.length === 0 ? /* @__PURE__ */ M(Y, { children: t.noApi }) : /* @__PURE__ */ M("div", {
|
|
2073
2153
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
2074
|
-
children: e.names.map((e) => /* @__PURE__ */
|
|
2154
|
+
children: e.names.map((e) => /* @__PURE__ */ M(ur, { apiName: e }, e))
|
|
2075
2155
|
});
|
|
2076
|
-
},
|
|
2077
|
-
let t =
|
|
2156
|
+
}, ur = ({ apiName: e }) => {
|
|
2157
|
+
let t = O(), n = U().workflows, r = t.get(e), a = r.inspectBaseUrl, o = s(() => Object.entries(r.descriptors).filter(([, e]) => e.kind === "workflow").map(([e]) => e).sort(), [r.descriptors]), { runs: c, failed: u } = or(a), d = c.filter((e) => nr(e.status)).length, [f, p] = l(null), [m, h] = l(() => Date.now());
|
|
2078
2158
|
return i(() => {
|
|
2079
2159
|
if (d === 0) return;
|
|
2080
2160
|
let e = setInterval(() => h(Date.now()), 1e3);
|
|
2081
2161
|
return () => clearInterval(e);
|
|
2082
|
-
}, [d]), /* @__PURE__ */
|
|
2083
|
-
/* @__PURE__ */
|
|
2084
|
-
Icon:
|
|
2085
|
-
right: d > 0 ? /* @__PURE__ */
|
|
2162
|
+
}, [d]), /* @__PURE__ */ N(K, { children: [
|
|
2163
|
+
/* @__PURE__ */ M(q, {
|
|
2164
|
+
Icon: xe,
|
|
2165
|
+
right: d > 0 ? /* @__PURE__ */ M(G, {
|
|
2086
2166
|
tone: "info",
|
|
2087
2167
|
children: n.runningBadge(d)
|
|
2088
|
-
}) : /* @__PURE__ */
|
|
2168
|
+
}) : /* @__PURE__ */ M(G, {
|
|
2089
2169
|
tone: "neutral",
|
|
2090
2170
|
children: n.runsBadge(c.length)
|
|
2091
2171
|
}),
|
|
2092
2172
|
children: e
|
|
2093
2173
|
}),
|
|
2094
|
-
/* @__PURE__ */
|
|
2174
|
+
/* @__PURE__ */ M(dr, {
|
|
2095
2175
|
apiName: e,
|
|
2096
2176
|
definitions: o,
|
|
2097
2177
|
runs: c
|
|
2098
2178
|
}),
|
|
2099
|
-
/* @__PURE__ */
|
|
2179
|
+
/* @__PURE__ */ N("div", {
|
|
2100
2180
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
2101
|
-
children: [/* @__PURE__ */
|
|
2181
|
+
children: [/* @__PURE__ */ M("div", {
|
|
2102
2182
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-1.5",
|
|
2103
2183
|
children: n.runs(c.length)
|
|
2104
|
-
}), u ? /* @__PURE__ */
|
|
2184
|
+
}), u ? /* @__PURE__ */ M("div", {
|
|
2105
2185
|
className: "vdt:text-xs vdt:text-danger",
|
|
2106
2186
|
children: n.runsUnavailable
|
|
2107
|
-
}) : c.length === 0 ? /* @__PURE__ */
|
|
2187
|
+
}) : c.length === 0 ? /* @__PURE__ */ M("div", {
|
|
2108
2188
|
className: "vdt:text-xs vdt:text-foreground-subtle",
|
|
2109
2189
|
children: o.length === 0 ? n.noDefinitions : n.noRuns
|
|
2110
|
-
}) : /* @__PURE__ */
|
|
2190
|
+
}) : /* @__PURE__ */ M("div", {
|
|
2111
2191
|
className: "vdt:flex vdt:flex-col vdt:gap-0.5",
|
|
2112
|
-
children: c.map((e) => /* @__PURE__ */
|
|
2192
|
+
children: c.map((e) => /* @__PURE__ */ N("div", {
|
|
2113
2193
|
"data-run-id": e.id,
|
|
2114
2194
|
"data-run-status": e.status,
|
|
2115
|
-
children: [/* @__PURE__ */
|
|
2195
|
+
children: [/* @__PURE__ */ N("button", {
|
|
2116
2196
|
type: "button",
|
|
2117
2197
|
"aria-expanded": f === e.id,
|
|
2118
2198
|
onClick: () => p(f === e.id ? null : e.id),
|
|
2119
2199
|
className: "vdt:w-full vdt:flex vdt:items-center vdt:gap-2 vdt:text-left vdt:text-xs vdt:px-1.5 vdt:py-1 vdt:rounded-sm vdt:hover:bg-muted",
|
|
2120
2200
|
children: [
|
|
2121
|
-
/* @__PURE__ */
|
|
2201
|
+
/* @__PURE__ */ M("span", {
|
|
2122
2202
|
className: "vdt:text-foreground-subtle vdt:w-2",
|
|
2123
2203
|
children: f === e.id ? "▾" : "▸"
|
|
2124
2204
|
}),
|
|
2125
|
-
/* @__PURE__ */
|
|
2126
|
-
tone:
|
|
2205
|
+
/* @__PURE__ */ M(G, {
|
|
2206
|
+
tone: Yn[e.status] ?? "neutral",
|
|
2127
2207
|
children: e.status
|
|
2128
2208
|
}),
|
|
2129
|
-
/* @__PURE__ */
|
|
2209
|
+
/* @__PURE__ */ M("code", {
|
|
2130
2210
|
className: "vdt:font-mono vdt:text-foreground vdt:truncate",
|
|
2131
2211
|
children: e.tag
|
|
2132
2212
|
}),
|
|
2133
|
-
e.parentExecutionId === null ? null : /* @__PURE__ */
|
|
2213
|
+
e.parentExecutionId === null ? null : /* @__PURE__ */ M(G, {
|
|
2134
2214
|
tone: "neutral",
|
|
2135
2215
|
children: n.child
|
|
2136
2216
|
}),
|
|
2137
|
-
e.errorMessage === null ? null : /* @__PURE__ */
|
|
2217
|
+
e.errorMessage === null ? null : /* @__PURE__ */ N("span", {
|
|
2138
2218
|
className: "vdt:text-danger vdt:truncate vdt:font-mono vdt:text-[11px]",
|
|
2139
2219
|
children: [e.errorTag === null ? "" : `${e.errorTag} · `, e.errorMessage]
|
|
2140
2220
|
}),
|
|
2141
|
-
/* @__PURE__ */
|
|
2221
|
+
/* @__PURE__ */ M("span", {
|
|
2142
2222
|
className: "vdt:ml-auto vdt:tabular-nums vdt:text-foreground-muted vdt:whitespace-nowrap",
|
|
2143
|
-
children:
|
|
2223
|
+
children: $n(rr(e, m))
|
|
2144
2224
|
}),
|
|
2145
|
-
/* @__PURE__ */
|
|
2225
|
+
/* @__PURE__ */ M("span", {
|
|
2146
2226
|
className: "vdt:tabular-nums vdt:text-foreground-subtle vdt:whitespace-nowrap",
|
|
2147
|
-
children:
|
|
2227
|
+
children: er(e.startedAt)
|
|
2148
2228
|
})
|
|
2149
2229
|
]
|
|
2150
|
-
}), f === e.id ? /* @__PURE__ */
|
|
2230
|
+
}), f === e.id ? /* @__PURE__ */ M(fr, {
|
|
2151
2231
|
baseUrl: a,
|
|
2152
2232
|
run: e
|
|
2153
2233
|
}) : null]
|
|
@@ -2155,19 +2235,19 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2155
2235
|
})]
|
|
2156
2236
|
})
|
|
2157
2237
|
] });
|
|
2158
|
-
},
|
|
2159
|
-
let r =
|
|
2238
|
+
}, dr = ({ apiName: e, definitions: t, runs: n }) => {
|
|
2239
|
+
let r = U().workflows, [a, o] = l(t[0] ?? "");
|
|
2160
2240
|
i(() => {
|
|
2161
2241
|
a === "" && t.length > 0 && o(t[0]);
|
|
2162
2242
|
}, [t, a]);
|
|
2163
2243
|
let c = s(() => {
|
|
2164
2244
|
let e = n.find((e) => e.tag === a);
|
|
2165
|
-
return e === void 0 ? "{}" :
|
|
2245
|
+
return e === void 0 ? "{}" : tr(e.payload);
|
|
2166
2246
|
}, [n, a]), [u, d] = l(c), [f, p] = l(!1);
|
|
2167
2247
|
i(() => {
|
|
2168
2248
|
f || d(c);
|
|
2169
2249
|
}, [c, f]);
|
|
2170
|
-
let [m, h] = l(null), g =
|
|
2250
|
+
let [m, h] = l(null), g = A(e, a === "" ? "__voltro.devtools.none" : a);
|
|
2171
2251
|
if (t.length === 0) return null;
|
|
2172
2252
|
let _ = async () => {
|
|
2173
2253
|
let e;
|
|
@@ -2194,30 +2274,30 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2194
2274
|
});
|
|
2195
2275
|
}
|
|
2196
2276
|
};
|
|
2197
|
-
return /* @__PURE__ */
|
|
2277
|
+
return /* @__PURE__ */ N("div", {
|
|
2198
2278
|
className: "vdt:px-3 vdt:py-2 vdt:flex vdt:flex-col vdt:gap-1.5",
|
|
2199
2279
|
children: [
|
|
2200
|
-
/* @__PURE__ */
|
|
2280
|
+
/* @__PURE__ */ N("div", {
|
|
2201
2281
|
className: "vdt:flex vdt:items-center vdt:gap-2",
|
|
2202
2282
|
children: [
|
|
2203
|
-
/* @__PURE__ */
|
|
2283
|
+
/* @__PURE__ */ M("span", {
|
|
2204
2284
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider",
|
|
2205
2285
|
children: r.start
|
|
2206
2286
|
}),
|
|
2207
|
-
/* @__PURE__ */
|
|
2287
|
+
/* @__PURE__ */ M("select", {
|
|
2208
2288
|
"aria-label": r.workflowLabel,
|
|
2209
2289
|
value: a,
|
|
2210
2290
|
onChange: (e) => {
|
|
2211
2291
|
o(e.target.value), p(!1), h(null);
|
|
2212
2292
|
},
|
|
2213
2293
|
className: "vdt:text-xs vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-1.5 vdt:py-0.5 vdt:text-foreground",
|
|
2214
|
-
children: t.map((e) => /* @__PURE__ */
|
|
2294
|
+
children: t.map((e) => /* @__PURE__ */ M("option", {
|
|
2215
2295
|
value: e,
|
|
2216
2296
|
children: e
|
|
2217
2297
|
}, e))
|
|
2218
2298
|
}),
|
|
2219
|
-
/* @__PURE__ */
|
|
2220
|
-
/* @__PURE__ */
|
|
2299
|
+
/* @__PURE__ */ M("span", { className: "vdt:sp" }),
|
|
2300
|
+
/* @__PURE__ */ M(W, {
|
|
2221
2301
|
onClick: () => {
|
|
2222
2302
|
_();
|
|
2223
2303
|
},
|
|
@@ -2226,7 +2306,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2226
2306
|
})
|
|
2227
2307
|
]
|
|
2228
2308
|
}),
|
|
2229
|
-
/* @__PURE__ */
|
|
2309
|
+
/* @__PURE__ */ M("textarea", {
|
|
2230
2310
|
"aria-label": r.payloadLabel,
|
|
2231
2311
|
value: u,
|
|
2232
2312
|
onChange: (e) => {
|
|
@@ -2236,19 +2316,19 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2236
2316
|
rows: Math.min(8, Math.max(2, u.split("\n").length)),
|
|
2237
2317
|
className: "vdt:w-full vdt:text-[11px] vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-2 vdt:py-1 vdt:text-foreground vdt:resize-y"
|
|
2238
2318
|
}),
|
|
2239
|
-
/* @__PURE__ */
|
|
2319
|
+
/* @__PURE__ */ M("div", {
|
|
2240
2320
|
className: "vdt:text-[10px] vdt:text-foreground-subtle",
|
|
2241
2321
|
children: r.payloadHint
|
|
2242
2322
|
}),
|
|
2243
|
-
m === null ? null : /* @__PURE__ */
|
|
2323
|
+
m === null ? null : /* @__PURE__ */ M("div", {
|
|
2244
2324
|
role: m.tone === "danger" ? "alert" : "status",
|
|
2245
2325
|
className: `vdt:text-xs ${m.tone === "danger" ? "vdt:text-danger" : "vdt:text-success"}`,
|
|
2246
2326
|
children: m.text
|
|
2247
2327
|
})
|
|
2248
2328
|
]
|
|
2249
2329
|
});
|
|
2250
|
-
},
|
|
2251
|
-
let n =
|
|
2330
|
+
}, fr = ({ baseUrl: e, run: t }) => {
|
|
2331
|
+
let n = U().workflows, r = Q(), { steps: a, events: o } = sr(e, t.id), c = s(() => ir(o), [o]), [u, d] = l(""), [f, p] = l("{}"), [m, h] = l(!1), [g, _] = l(null);
|
|
2252
2332
|
i(() => {
|
|
2253
2333
|
u === "" && c.length > 0 && d(c[0]);
|
|
2254
2334
|
}, [c, u]);
|
|
@@ -2268,7 +2348,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2268
2348
|
h(!1);
|
|
2269
2349
|
}
|
|
2270
2350
|
}, C = () => S(n.cancel, async () => {
|
|
2271
|
-
let e = await
|
|
2351
|
+
let e = await gn(`${x}/cancel`, r, {});
|
|
2272
2352
|
return n.cancelResult(typeof e.kind == "string" ? e.kind : e.cancelled === !0 ? "confirmed" : "submitted");
|
|
2273
2353
|
}), w = () => S(n.sendSignal, async () => {
|
|
2274
2354
|
let e;
|
|
@@ -2277,20 +2357,20 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2277
2357
|
} catch (e) {
|
|
2278
2358
|
throw Error(n.invalidJson(e instanceof Error ? e.message : String(e)));
|
|
2279
2359
|
}
|
|
2280
|
-
return await
|
|
2360
|
+
return await gn(`${x}/signal`, r, e === void 0 ? { signalName: u } : {
|
|
2281
2361
|
signalName: u,
|
|
2282
2362
|
payload: e
|
|
2283
2363
|
}), n.signalSent(u);
|
|
2284
2364
|
});
|
|
2285
|
-
return /* @__PURE__ */
|
|
2365
|
+
return /* @__PURE__ */ N("div", {
|
|
2286
2366
|
className: "vdt:ml-4 vdt:pl-2 vdt:border-l vdt:border-border vdt:py-1 vdt:flex vdt:flex-col vdt:gap-2 vdt:text-xs",
|
|
2287
2367
|
children: [
|
|
2288
|
-
/* @__PURE__ */
|
|
2368
|
+
/* @__PURE__ */ N("div", {
|
|
2289
2369
|
className: "vdt:grid vdt:grid-cols-1 vdt:sm:grid-cols-2 vdt:gap-2",
|
|
2290
|
-
children: [/* @__PURE__ */
|
|
2370
|
+
children: [/* @__PURE__ */ M(pr, {
|
|
2291
2371
|
label: n.payloadLabel,
|
|
2292
2372
|
value: t.payload
|
|
2293
|
-
}), /* @__PURE__ */
|
|
2373
|
+
}), /* @__PURE__ */ M(pr, {
|
|
2294
2374
|
label: t.status === "failed" ? n.error : n.output,
|
|
2295
2375
|
value: t.status === "failed" ? {
|
|
2296
2376
|
tag: t.errorTag,
|
|
@@ -2298,46 +2378,46 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2298
2378
|
} : t.output
|
|
2299
2379
|
})]
|
|
2300
2380
|
}),
|
|
2301
|
-
/* @__PURE__ */
|
|
2381
|
+
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("div", {
|
|
2302
2382
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-1",
|
|
2303
2383
|
children: n.steps(a.length)
|
|
2304
|
-
}), a.length === 0 ? /* @__PURE__ */
|
|
2384
|
+
}), a.length === 0 ? /* @__PURE__ */ M("div", {
|
|
2305
2385
|
className: "vdt:text-foreground-subtle",
|
|
2306
2386
|
children: n.noSteps
|
|
2307
|
-
}) : /* @__PURE__ */
|
|
2387
|
+
}) : /* @__PURE__ */ M("div", {
|
|
2308
2388
|
className: "vdt:flex vdt:flex-col vdt:gap-0.5",
|
|
2309
|
-
children: a.map((e) => /* @__PURE__ */
|
|
2389
|
+
children: a.map((e) => /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ N("button", {
|
|
2310
2390
|
type: "button",
|
|
2311
2391
|
onClick: () => y(v === e.id ? null : e.id),
|
|
2312
2392
|
className: "vdt:w-full vdt:flex vdt:items-center vdt:gap-2 vdt:text-left vdt:px-1 vdt:py-0.5 vdt:rounded-sm vdt:hover:bg-muted",
|
|
2313
2393
|
children: [
|
|
2314
|
-
/* @__PURE__ */
|
|
2315
|
-
tone:
|
|
2394
|
+
/* @__PURE__ */ M(G, {
|
|
2395
|
+
tone: Xn[e.status] ?? "info",
|
|
2316
2396
|
children: e.status
|
|
2317
2397
|
}),
|
|
2318
|
-
/* @__PURE__ */
|
|
2398
|
+
/* @__PURE__ */ M("code", {
|
|
2319
2399
|
className: "vdt:font-mono vdt:text-foreground",
|
|
2320
2400
|
children: e.stepName
|
|
2321
2401
|
}),
|
|
2322
|
-
e.attempt > 1 ? /* @__PURE__ */
|
|
2402
|
+
e.attempt > 1 ? /* @__PURE__ */ M("span", {
|
|
2323
2403
|
className: "vdt:text-warning",
|
|
2324
2404
|
children: n.attempt(e.attempt)
|
|
2325
2405
|
}) : null,
|
|
2326
|
-
e.errorMessage === null ? null : /* @__PURE__ */
|
|
2406
|
+
e.errorMessage === null ? null : /* @__PURE__ */ M("span", {
|
|
2327
2407
|
className: "vdt:text-danger vdt:truncate vdt:font-mono vdt:text-[11px]",
|
|
2328
2408
|
children: e.errorMessage
|
|
2329
2409
|
}),
|
|
2330
|
-
/* @__PURE__ */
|
|
2410
|
+
/* @__PURE__ */ M("span", {
|
|
2331
2411
|
className: "vdt:ml-auto vdt:tabular-nums vdt:text-foreground-muted",
|
|
2332
|
-
children:
|
|
2412
|
+
children: $n(e.durationMs)
|
|
2333
2413
|
})
|
|
2334
2414
|
]
|
|
2335
|
-
}), v === e.id ? /* @__PURE__ */
|
|
2415
|
+
}), v === e.id ? /* @__PURE__ */ N("div", {
|
|
2336
2416
|
className: "vdt:ml-3 vdt:grid vdt:grid-cols-1 vdt:sm:grid-cols-2 vdt:gap-2 vdt:py-1",
|
|
2337
|
-
children: [/* @__PURE__ */
|
|
2417
|
+
children: [/* @__PURE__ */ M(pr, {
|
|
2338
2418
|
label: n.input,
|
|
2339
2419
|
value: e.input
|
|
2340
|
-
}), /* @__PURE__ */
|
|
2420
|
+
}), /* @__PURE__ */ M(pr, {
|
|
2341
2421
|
label: e.status === "failed" ? n.error : n.output,
|
|
2342
2422
|
value: e.status === "failed" ? e.errorCause ?? {
|
|
2343
2423
|
tag: e.errorTag,
|
|
@@ -2346,50 +2426,50 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2346
2426
|
})]
|
|
2347
2427
|
}) : null] }, e.id))
|
|
2348
2428
|
})] }),
|
|
2349
|
-
o.length > 0 ? /* @__PURE__ */
|
|
2429
|
+
o.length > 0 ? /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("div", {
|
|
2350
2430
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-1",
|
|
2351
2431
|
children: n.events(o.length)
|
|
2352
|
-
}), /* @__PURE__ */
|
|
2432
|
+
}), /* @__PURE__ */ M("div", {
|
|
2353
2433
|
className: "vdt:flex vdt:flex-wrap vdt:gap-1",
|
|
2354
|
-
children: o.map((e) => /* @__PURE__ */
|
|
2355
|
-
title:
|
|
2434
|
+
children: o.map((e) => /* @__PURE__ */ N("span", {
|
|
2435
|
+
title: er(e.occurredAt),
|
|
2356
2436
|
className: "vdt:inline-flex vdt:items-center vdt:gap-1 vdt:text-[10px] vdt:font-mono vdt:text-foreground-muted vdt:border vdt:border-border vdt:rounded-sm vdt:px-1",
|
|
2357
2437
|
children: [e.eventType, e.stepName === null ? "" : ` · ${e.stepName}`]
|
|
2358
2438
|
}, e.id))
|
|
2359
2439
|
})] }) : null,
|
|
2360
|
-
/* @__PURE__ */
|
|
2440
|
+
/* @__PURE__ */ N("div", {
|
|
2361
2441
|
className: "vdt:flex vdt:flex-wrap vdt:items-center vdt:gap-2",
|
|
2362
2442
|
children: [
|
|
2363
|
-
b ? /* @__PURE__ */
|
|
2443
|
+
b ? /* @__PURE__ */ M(W, {
|
|
2364
2444
|
onClick: () => {
|
|
2365
2445
|
C();
|
|
2366
2446
|
},
|
|
2367
2447
|
disabled: m,
|
|
2368
2448
|
children: n.cancel
|
|
2369
2449
|
}) : null,
|
|
2370
|
-
c.length > 0 && t.status === "running" ? /* @__PURE__ */
|
|
2371
|
-
/* @__PURE__ */
|
|
2450
|
+
c.length > 0 && t.status === "running" ? /* @__PURE__ */ N(j, { children: [
|
|
2451
|
+
/* @__PURE__ */ M("span", {
|
|
2372
2452
|
className: "vdt:text-foreground-muted",
|
|
2373
2453
|
children: n.awaiting
|
|
2374
2454
|
}),
|
|
2375
|
-
/* @__PURE__ */
|
|
2455
|
+
/* @__PURE__ */ M("select", {
|
|
2376
2456
|
"aria-label": n.signalName,
|
|
2377
2457
|
value: u,
|
|
2378
2458
|
onChange: (e) => d(e.target.value),
|
|
2379
2459
|
className: "vdt:text-xs vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-1.5 vdt:py-0.5 vdt:text-foreground",
|
|
2380
|
-
children: c.map((e) => /* @__PURE__ */
|
|
2460
|
+
children: c.map((e) => /* @__PURE__ */ M("option", {
|
|
2381
2461
|
value: e,
|
|
2382
2462
|
children: e
|
|
2383
2463
|
}, e))
|
|
2384
2464
|
}),
|
|
2385
|
-
/* @__PURE__ */
|
|
2465
|
+
/* @__PURE__ */ M("input", {
|
|
2386
2466
|
"aria-label": n.signalPayload,
|
|
2387
2467
|
value: f,
|
|
2388
2468
|
onChange: (e) => p(e.target.value),
|
|
2389
2469
|
spellCheck: !1,
|
|
2390
2470
|
className: "vdt:text-[11px] vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-1.5 vdt:py-0.5 vdt:text-foreground vdt:min-w-32"
|
|
2391
2471
|
}),
|
|
2392
|
-
/* @__PURE__ */
|
|
2472
|
+
/* @__PURE__ */ M(W, {
|
|
2393
2473
|
onClick: () => {
|
|
2394
2474
|
w();
|
|
2395
2475
|
},
|
|
@@ -2397,7 +2477,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2397
2477
|
children: n.sendSignal
|
|
2398
2478
|
})
|
|
2399
2479
|
] }) : null,
|
|
2400
|
-
t.traceId === null ? null : /* @__PURE__ */
|
|
2480
|
+
t.traceId === null ? null : /* @__PURE__ */ N("span", {
|
|
2401
2481
|
className: "vdt:text-[10px] vdt:font-mono vdt:text-foreground-subtle",
|
|
2402
2482
|
children: [
|
|
2403
2483
|
n.trace,
|
|
@@ -2407,32 +2487,32 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2407
2487
|
})
|
|
2408
2488
|
]
|
|
2409
2489
|
}),
|
|
2410
|
-
g === null ? null : /* @__PURE__ */
|
|
2490
|
+
g === null ? null : /* @__PURE__ */ M("div", {
|
|
2411
2491
|
role: g.tone === "danger" ? "alert" : "status",
|
|
2412
2492
|
className: g.tone === "danger" ? "vdt:text-danger" : "vdt:text-success",
|
|
2413
2493
|
children: g.text
|
|
2414
2494
|
})
|
|
2415
2495
|
]
|
|
2416
2496
|
});
|
|
2417
|
-
},
|
|
2497
|
+
}, pr = ({ label: e, value: t }) => /* @__PURE__ */ N("div", {
|
|
2418
2498
|
className: "vdt:min-w-0",
|
|
2419
|
-
children: [/* @__PURE__ */
|
|
2499
|
+
children: [/* @__PURE__ */ M("div", {
|
|
2420
2500
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-0.5",
|
|
2421
2501
|
children: e
|
|
2422
|
-
}), t == null ? /* @__PURE__ */
|
|
2502
|
+
}), t == null ? /* @__PURE__ */ M("div", {
|
|
2423
2503
|
className: "vdt:text-foreground-subtle",
|
|
2424
2504
|
children: "—"
|
|
2425
|
-
}) : /* @__PURE__ */
|
|
2505
|
+
}) : /* @__PURE__ */ M("pre", {
|
|
2426
2506
|
className: "vdt:overflow-x-auto vdt:text-[11px] vdt:font-mono vdt:p-1.5 vdt:rounded-sm vdt:bg-background vdt:border vdt:border-border vdt:text-foreground vdt:whitespace-pre-wrap vdt:break-all",
|
|
2427
|
-
children:
|
|
2507
|
+
children: tr(t)
|
|
2428
2508
|
})]
|
|
2429
|
-
}),
|
|
2509
|
+
}), mr = (e) => {
|
|
2430
2510
|
try {
|
|
2431
2511
|
return JSON.stringify(e, null, 2);
|
|
2432
2512
|
} catch {
|
|
2433
2513
|
return String(e);
|
|
2434
2514
|
}
|
|
2435
|
-
},
|
|
2515
|
+
}, hr = () => u(h, f, f), gr = () => {
|
|
2436
2516
|
let [e, t] = l(() => typeof window > "u" ? "/" : window.location.pathname);
|
|
2437
2517
|
return i(() => {
|
|
2438
2518
|
if (typeof window > "u") return;
|
|
@@ -2443,49 +2523,49 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2443
2523
|
window.removeEventListener("popstate", e), clearInterval(n);
|
|
2444
2524
|
};
|
|
2445
2525
|
}, []), e;
|
|
2446
|
-
},
|
|
2447
|
-
let e =
|
|
2526
|
+
}, _r = () => {
|
|
2527
|
+
let e = hr(), t = gr(), n = U().routes, [r, i] = l(!0), a = e.pathname === "/" && Object.keys(e.params).length === 0 && e.loaderData === void 0 && t !== "/" ? t : e.pathname, o = Object.entries(e.params).map(([e, t]) => ({
|
|
2448
2528
|
key: e,
|
|
2449
2529
|
value: String(t)
|
|
2450
2530
|
}));
|
|
2451
|
-
return /* @__PURE__ */
|
|
2531
|
+
return /* @__PURE__ */ N("div", {
|
|
2452
2532
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
2453
|
-
children: [/* @__PURE__ */
|
|
2454
|
-
/* @__PURE__ */
|
|
2455
|
-
Icon:
|
|
2533
|
+
children: [/* @__PURE__ */ N(K, { children: [
|
|
2534
|
+
/* @__PURE__ */ M(q, {
|
|
2535
|
+
Icon: ge,
|
|
2456
2536
|
children: n.currentRoute
|
|
2457
2537
|
}),
|
|
2458
|
-
/* @__PURE__ */
|
|
2538
|
+
/* @__PURE__ */ M(J, { entries: [{
|
|
2459
2539
|
key: "pathname",
|
|
2460
2540
|
value: a
|
|
2461
2541
|
}, {
|
|
2462
2542
|
key: "params",
|
|
2463
2543
|
value: o.length === 0 ? "—" : ""
|
|
2464
2544
|
}] }),
|
|
2465
|
-
o.length > 0 ? /* @__PURE__ */
|
|
2545
|
+
o.length > 0 ? /* @__PURE__ */ M("div", {
|
|
2466
2546
|
className: "vdt:px-3 vdt:pb-3",
|
|
2467
|
-
children: /* @__PURE__ */
|
|
2547
|
+
children: /* @__PURE__ */ M(J, { entries: o })
|
|
2468
2548
|
}) : null
|
|
2469
|
-
] }), /* @__PURE__ */
|
|
2470
|
-
/* @__PURE__ */
|
|
2471
|
-
Icon:
|
|
2549
|
+
] }), /* @__PURE__ */ N(K, { children: [
|
|
2550
|
+
/* @__PURE__ */ M(q, {
|
|
2551
|
+
Icon: ge,
|
|
2472
2552
|
children: n.loaderData
|
|
2473
2553
|
}),
|
|
2474
|
-
/* @__PURE__ */
|
|
2554
|
+
/* @__PURE__ */ M("button", {
|
|
2475
2555
|
onClick: () => i((e) => !e),
|
|
2476
2556
|
className: "vdt:px-3 vdt:py-1.5 vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:text-foreground-muted vdt:hover:text-foreground",
|
|
2477
2557
|
children: r ? n.collapse : n.expand
|
|
2478
2558
|
}),
|
|
2479
|
-
r ? e.loaderData === void 0 ? /* @__PURE__ */
|
|
2559
|
+
r ? e.loaderData === void 0 ? /* @__PURE__ */ N(Y, { children: [n.noLoaderTitle, /* @__PURE__ */ M("div", {
|
|
2480
2560
|
className: "vdt:mt-1 vdt:text-foreground-subtle",
|
|
2481
|
-
children: n.noLoaderHint(/* @__PURE__ */
|
|
2482
|
-
})] }) : /* @__PURE__ */
|
|
2561
|
+
children: n.noLoaderHint(/* @__PURE__ */ M("code", { children: "<Router>" }))
|
|
2562
|
+
})] }) : /* @__PURE__ */ M("pre", {
|
|
2483
2563
|
className: "vdt:px-3 vdt:pb-3 vdt:text-[11px] vdt:max-h-80 vdt:overflow-auto vdt:font-mono vdt:text-foreground",
|
|
2484
|
-
children:
|
|
2564
|
+
children: mr(e.loaderData)
|
|
2485
2565
|
}) : null
|
|
2486
2566
|
] })]
|
|
2487
2567
|
});
|
|
2488
|
-
},
|
|
2568
|
+
}, vr = (e) => {
|
|
2489
2569
|
let t = 0, n = 0, r = 0, i = 0, a = 0;
|
|
2490
2570
|
for (let o of Object.values(e)) o.kind === "query" && (t += 1), o.kind === "mutation" && (n += 1), o.kind === "action" && (r += 1), o.kind === "stream" && (i += 1), o.kind === "workflow" && (a += 1);
|
|
2491
2571
|
return {
|
|
@@ -2495,23 +2575,23 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2495
2575
|
streams: i,
|
|
2496
2576
|
workflows: a
|
|
2497
2577
|
};
|
|
2498
|
-
},
|
|
2499
|
-
let e =
|
|
2500
|
-
return n.length === 0 ? /* @__PURE__ */
|
|
2578
|
+
}, yr = () => {
|
|
2579
|
+
let e = O(), t = U().runtimes, n = e.names;
|
|
2580
|
+
return n.length === 0 ? /* @__PURE__ */ N(Y, { children: [t.emptyTitle, /* @__PURE__ */ M("div", {
|
|
2501
2581
|
className: "vdt:mt-1 vdt:text-foreground-subtle",
|
|
2502
2582
|
children: t.emptyHint
|
|
2503
|
-
})] }) : /* @__PURE__ */
|
|
2583
|
+
})] }) : /* @__PURE__ */ M("div", {
|
|
2504
2584
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
2505
2585
|
children: n.map((n) => {
|
|
2506
|
-
let r = e.get(n), i =
|
|
2507
|
-
return /* @__PURE__ */
|
|
2508
|
-
Icon:
|
|
2509
|
-
right: /* @__PURE__ */
|
|
2586
|
+
let r = e.get(n), i = vr(r.descriptors);
|
|
2587
|
+
return /* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, {
|
|
2588
|
+
Icon: _e,
|
|
2589
|
+
right: /* @__PURE__ */ M(G, {
|
|
2510
2590
|
tone: "success",
|
|
2511
2591
|
children: t.live
|
|
2512
2592
|
}),
|
|
2513
2593
|
children: n
|
|
2514
|
-
}), /* @__PURE__ */
|
|
2594
|
+
}), /* @__PURE__ */ M(J, { entries: [
|
|
2515
2595
|
{
|
|
2516
2596
|
key: "queries",
|
|
2517
2597
|
value: String(i.queries)
|
|
@@ -2543,7 +2623,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2543
2623
|
] })] }, n);
|
|
2544
2624
|
})
|
|
2545
2625
|
});
|
|
2546
|
-
},
|
|
2626
|
+
}, br = (e, t) => ({
|
|
2547
2627
|
supported: t,
|
|
2548
2628
|
scope: e?.scope ?? null,
|
|
2549
2629
|
scriptUrl: e?.active?.scriptURL ?? e?.waiting?.scriptURL ?? e?.installing?.scriptURL ?? null,
|
|
@@ -2551,14 +2631,14 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2551
2631
|
waiting: e?.waiting?.state ?? null,
|
|
2552
2632
|
active: e?.active?.state ?? null,
|
|
2553
2633
|
backgroundSync: e != null && "sync" in e && e.sync !== void 0
|
|
2554
|
-
}),
|
|
2634
|
+
}), xr = (e) => e.filter((e) => e.startsWith("voltro-")).sort(), Sr = (e) => {
|
|
2555
2635
|
try {
|
|
2556
2636
|
return new URL(e).host;
|
|
2557
2637
|
} catch {
|
|
2558
2638
|
return "(unparseable endpoint)";
|
|
2559
2639
|
}
|
|
2560
|
-
},
|
|
2561
|
-
let e = typeof navigator > "u" ? void 0 : navigator, t = e?.serviceWorker !== void 0, n = t ? await e.serviceWorker.getRegistration().catch(() => void 0) : void 0, r =
|
|
2640
|
+
}, Cr = async () => {
|
|
2641
|
+
let e = typeof navigator > "u" ? void 0 : navigator, t = e?.serviceWorker !== void 0, n = t ? await e.serviceWorker.getRegistration().catch(() => void 0) : void 0, r = br(n ?? null, t), i = globalThis.caches, a = i ? xr(await i.keys().catch(() => [])) : [], o = [];
|
|
2562
2642
|
for (let e of a) {
|
|
2563
2643
|
let t = i ? await i.open(e).then((e) => e.keys()).then((e) => e.length).catch(() => 0) : 0;
|
|
2564
2644
|
o.push({
|
|
@@ -2569,7 +2649,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2569
2649
|
let s = globalThis.Notification, c = null;
|
|
2570
2650
|
if (n?.pushManager) {
|
|
2571
2651
|
let e = await n.pushManager.getSubscription().catch(() => null);
|
|
2572
|
-
c = e ?
|
|
2652
|
+
c = e ? Sr(e.endpoint) : null;
|
|
2573
2653
|
}
|
|
2574
2654
|
return {
|
|
2575
2655
|
worker: r,
|
|
@@ -2577,9 +2657,9 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2577
2657
|
pushPermission: s?.permission ?? null,
|
|
2578
2658
|
pushEndpointHost: c
|
|
2579
2659
|
};
|
|
2580
|
-
},
|
|
2581
|
-
let e =
|
|
2582
|
-
|
|
2660
|
+
}, wr = (e) => e === "activated" ? "success" : e === null ? "neutral" : "warning", Tr = () => {
|
|
2661
|
+
let e = U().pwa, t = _(), r = v(), a = y(), o = k(), [s, c] = l(null), u = n(() => {
|
|
2662
|
+
Cr().then(c);
|
|
2583
2663
|
}, []);
|
|
2584
2664
|
if (i(() => {
|
|
2585
2665
|
u();
|
|
@@ -2587,21 +2667,21 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2587
2667
|
return e?.serviceWorker?.addEventListener?.("controllerchange", u), () => {
|
|
2588
2668
|
e?.serviceWorker?.removeEventListener?.("controllerchange", u);
|
|
2589
2669
|
};
|
|
2590
|
-
}, [u]), s === null) return /* @__PURE__ */
|
|
2591
|
-
if (!s.worker.supported) return /* @__PURE__ */
|
|
2670
|
+
}, [u]), s === null) return /* @__PURE__ */ M(Y, { children: e.loading });
|
|
2671
|
+
if (!s.worker.supported) return /* @__PURE__ */ M(Y, { children: e.unsupported });
|
|
2592
2672
|
let d = s.worker;
|
|
2593
|
-
return /* @__PURE__ */
|
|
2673
|
+
return /* @__PURE__ */ N("div", {
|
|
2594
2674
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
2595
2675
|
children: [
|
|
2596
|
-
/* @__PURE__ */
|
|
2597
|
-
Icon:
|
|
2598
|
-
right: /* @__PURE__ */
|
|
2676
|
+
/* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, {
|
|
2677
|
+
Icon: _e,
|
|
2678
|
+
right: /* @__PURE__ */ M(W, {
|
|
2599
2679
|
size: "sm",
|
|
2600
2680
|
onClick: u,
|
|
2601
2681
|
children: e.refresh
|
|
2602
2682
|
}),
|
|
2603
2683
|
children: e.worker
|
|
2604
|
-
}), /* @__PURE__ */
|
|
2684
|
+
}), /* @__PURE__ */ M(J, { entries: [
|
|
2605
2685
|
{
|
|
2606
2686
|
key: e.scope,
|
|
2607
2687
|
value: d.scope ?? e.none
|
|
@@ -2612,22 +2692,22 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2612
2692
|
},
|
|
2613
2693
|
{
|
|
2614
2694
|
key: "installing",
|
|
2615
|
-
value: /* @__PURE__ */
|
|
2616
|
-
tone:
|
|
2695
|
+
value: /* @__PURE__ */ M(G, {
|
|
2696
|
+
tone: wr(d.installing),
|
|
2617
2697
|
children: d.installing ?? e.none
|
|
2618
2698
|
})
|
|
2619
2699
|
},
|
|
2620
2700
|
{
|
|
2621
2701
|
key: "waiting",
|
|
2622
|
-
value: /* @__PURE__ */
|
|
2623
|
-
tone:
|
|
2702
|
+
value: /* @__PURE__ */ M(G, {
|
|
2703
|
+
tone: wr(d.waiting),
|
|
2624
2704
|
children: d.waiting ?? e.none
|
|
2625
2705
|
})
|
|
2626
2706
|
},
|
|
2627
2707
|
{
|
|
2628
2708
|
key: "active",
|
|
2629
|
-
value: /* @__PURE__ */
|
|
2630
|
-
tone:
|
|
2709
|
+
value: /* @__PURE__ */ M(G, {
|
|
2710
|
+
tone: wr(d.active),
|
|
2631
2711
|
children: d.active ?? e.none
|
|
2632
2712
|
})
|
|
2633
2713
|
},
|
|
@@ -2636,14 +2716,14 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2636
2716
|
value: d.backgroundSync ? e.yes : e.no
|
|
2637
2717
|
}
|
|
2638
2718
|
] })] }),
|
|
2639
|
-
/* @__PURE__ */
|
|
2640
|
-
right: /* @__PURE__ */
|
|
2719
|
+
/* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, {
|
|
2720
|
+
right: /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(W, {
|
|
2641
2721
|
size: "sm",
|
|
2642
2722
|
onClick: () => {
|
|
2643
2723
|
t.check();
|
|
2644
2724
|
},
|
|
2645
2725
|
children: e.checkNow
|
|
2646
|
-
}), /* @__PURE__ */
|
|
2726
|
+
}), /* @__PURE__ */ M(W, {
|
|
2647
2727
|
size: "sm",
|
|
2648
2728
|
variant: "accent",
|
|
2649
2729
|
disabled: !t.updateAvailable,
|
|
@@ -2653,7 +2733,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2653
2733
|
children: e.forceUpdate
|
|
2654
2734
|
})] }),
|
|
2655
2735
|
children: e.update
|
|
2656
|
-
}), /* @__PURE__ */
|
|
2736
|
+
}), /* @__PURE__ */ M(J, { entries: [
|
|
2657
2737
|
{
|
|
2658
2738
|
key: e.currentBuild,
|
|
2659
2739
|
value: o.platform.appVersion ?? e.unknown
|
|
@@ -2667,15 +2747,15 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2667
2747
|
value: a.online ? e.yes : e.no
|
|
2668
2748
|
}
|
|
2669
2749
|
] })] }),
|
|
2670
|
-
/* @__PURE__ */
|
|
2750
|
+
/* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, { children: e.precache }), s.caches.length === 0 ? /* @__PURE__ */ M("div", {
|
|
2671
2751
|
className: "vdt:px-3 vdt:py-2 vdt:text-xs vdt:text-foreground-subtle",
|
|
2672
2752
|
children: e.noCaches
|
|
2673
|
-
}) : /* @__PURE__ */
|
|
2753
|
+
}) : /* @__PURE__ */ M(J, { entries: s.caches.map((t) => ({
|
|
2674
2754
|
key: t.name,
|
|
2675
2755
|
value: e.entries(t.entries)
|
|
2676
2756
|
})) })] }),
|
|
2677
|
-
/* @__PURE__ */
|
|
2678
|
-
right: r.canInstall ? /* @__PURE__ */
|
|
2757
|
+
/* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, {
|
|
2758
|
+
right: r.canInstall ? /* @__PURE__ */ M(W, {
|
|
2679
2759
|
size: "sm",
|
|
2680
2760
|
onClick: () => {
|
|
2681
2761
|
r.install();
|
|
@@ -2683,7 +2763,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2683
2763
|
children: e.install
|
|
2684
2764
|
}) : void 0,
|
|
2685
2765
|
children: e.installAndPush
|
|
2686
|
-
}), /* @__PURE__ */
|
|
2766
|
+
}), /* @__PURE__ */ M(J, { entries: [
|
|
2687
2767
|
{
|
|
2688
2768
|
key: e.installed,
|
|
2689
2769
|
value: r.installed ? e.yes : e.no
|
|
@@ -2703,8 +2783,8 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2703
2783
|
] })] })
|
|
2704
2784
|
]
|
|
2705
2785
|
});
|
|
2706
|
-
},
|
|
2707
|
-
let e =
|
|
2786
|
+
}, Er = (e) => Object.entries(e ?? {}).filter(([, e]) => e === !0).map(([e]) => e).sort(), Dr = (e) => [e.fullscreen ? "fullscreen" : e.maximized ? "maximized" : "windowed", e.focused ? "focused" : "unfocused"].join(", "), Or = () => {
|
|
2787
|
+
let e = U().desktop, t = k(), r = te("desktop"), [a, o] = l(0), [s, c] = l(null), [u, d] = l(null), f = n(() => o((e) => e + 1), []);
|
|
2708
2788
|
if (i(() => {
|
|
2709
2789
|
if (!r) return;
|
|
2710
2790
|
let e = r.window.subscribe(f), t = r.os.onThemeChange(f);
|
|
@@ -2718,23 +2798,23 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2718
2798
|
return;
|
|
2719
2799
|
}
|
|
2720
2800
|
C(e).then(d);
|
|
2721
|
-
}, [t, a]), !r) return /* @__PURE__ */
|
|
2722
|
-
let p =
|
|
2723
|
-
return /* @__PURE__ */
|
|
2801
|
+
}, [t, a]), !r) return /* @__PURE__ */ M(Y, { children: e.notDesktop });
|
|
2802
|
+
let p = Er(t.capabilities);
|
|
2803
|
+
return /* @__PURE__ */ N("div", {
|
|
2724
2804
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
2725
2805
|
children: [
|
|
2726
|
-
/* @__PURE__ */
|
|
2727
|
-
Icon:
|
|
2728
|
-
right: /* @__PURE__ */
|
|
2806
|
+
/* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, {
|
|
2807
|
+
Icon: Oe,
|
|
2808
|
+
right: /* @__PURE__ */ M(W, {
|
|
2729
2809
|
size: "sm",
|
|
2730
2810
|
onClick: f,
|
|
2731
2811
|
children: e.refresh
|
|
2732
2812
|
}),
|
|
2733
2813
|
children: e.shell
|
|
2734
|
-
}), /* @__PURE__ */
|
|
2814
|
+
}), /* @__PURE__ */ M(J, { entries: [
|
|
2735
2815
|
{
|
|
2736
2816
|
key: e.kind,
|
|
2737
|
-
value: /* @__PURE__ */
|
|
2817
|
+
value: /* @__PURE__ */ M(G, {
|
|
2738
2818
|
tone: "info",
|
|
2739
2819
|
children: r.kind
|
|
2740
2820
|
})
|
|
@@ -2749,15 +2829,15 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2749
2829
|
},
|
|
2750
2830
|
{
|
|
2751
2831
|
key: e.window,
|
|
2752
|
-
value:
|
|
2832
|
+
value: Dr(r.window.read())
|
|
2753
2833
|
},
|
|
2754
2834
|
{
|
|
2755
2835
|
key: e.appVersion,
|
|
2756
2836
|
value: t.platform.appVersion ?? e.unknown
|
|
2757
2837
|
}
|
|
2758
2838
|
] })] }),
|
|
2759
|
-
/* @__PURE__ */
|
|
2760
|
-
right: t.updates ? /* @__PURE__ */
|
|
2839
|
+
/* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, {
|
|
2840
|
+
right: t.updates ? /* @__PURE__ */ M(W, {
|
|
2761
2841
|
size: "sm",
|
|
2762
2842
|
onClick: () => {
|
|
2763
2843
|
t.updates.check().then(c);
|
|
@@ -2765,14 +2845,14 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2765
2845
|
children: e.checkNow
|
|
2766
2846
|
}) : void 0,
|
|
2767
2847
|
children: e.updater
|
|
2768
|
-
}), /* @__PURE__ */
|
|
2848
|
+
}), /* @__PURE__ */ M(J, { entries: [{
|
|
2769
2849
|
key: e.updaterPort,
|
|
2770
2850
|
value: t.updates ? e.yes : e.no
|
|
2771
2851
|
}, {
|
|
2772
2852
|
key: e.waitingVersion,
|
|
2773
2853
|
value: s?.version ?? e.none
|
|
2774
2854
|
}] })] }),
|
|
2775
|
-
/* @__PURE__ */
|
|
2855
|
+
/* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, { children: e.localStack }), /* @__PURE__ */ M(J, { entries: [
|
|
2776
2856
|
{
|
|
2777
2857
|
key: e.sidecarPort,
|
|
2778
2858
|
value: r.sidecar === void 0 ? e.no : e.yes
|
|
@@ -2786,19 +2866,19 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2786
2866
|
value: u?.name ?? e.none
|
|
2787
2867
|
}
|
|
2788
2868
|
] })] }),
|
|
2789
|
-
/* @__PURE__ */
|
|
2869
|
+
/* @__PURE__ */ N(K, { children: [/* @__PURE__ */ M(q, { children: e.capabilities }), p.length === 0 ? /* @__PURE__ */ M("div", {
|
|
2790
2870
|
className: "vdt:px-3 vdt:py-2 vdt:text-xs vdt:text-foreground-subtle",
|
|
2791
2871
|
children: e.noCapabilities
|
|
2792
|
-
}) : /* @__PURE__ */
|
|
2872
|
+
}) : /* @__PURE__ */ M("div", {
|
|
2793
2873
|
className: "vdt:flex vdt:flex-wrap vdt:gap-1 vdt:px-3 vdt:py-2",
|
|
2794
|
-
children: p.map((e) => /* @__PURE__ */
|
|
2874
|
+
children: p.map((e) => /* @__PURE__ */ M(G, {
|
|
2795
2875
|
tone: "neutral",
|
|
2796
2876
|
children: e
|
|
2797
2877
|
}, e))
|
|
2798
2878
|
})] })
|
|
2799
2879
|
]
|
|
2800
2880
|
});
|
|
2801
|
-
},
|
|
2881
|
+
}, kr = () => u(ee, w, w), Ar = (e, t = 90) => {
|
|
2802
2882
|
let n;
|
|
2803
2883
|
try {
|
|
2804
2884
|
n = JSON.stringify(e) ?? String(e);
|
|
@@ -2806,36 +2886,36 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2806
2886
|
n = String(e);
|
|
2807
2887
|
}
|
|
2808
2888
|
return n.length > t ? `${n.slice(0, t)}…` : n;
|
|
2809
|
-
},
|
|
2889
|
+
}, jr = (e, t) => typeof e != "object" || typeof t != "object" || e === null || t === null ? [] : [.../* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])].filter((n) => !Object.is(e[n], t[n])), Mr = ({ label: e, state: t }) => {
|
|
2810
2890
|
let [n, r] = l(!1);
|
|
2811
|
-
return /* @__PURE__ */
|
|
2891
|
+
return /* @__PURE__ */ N("div", {
|
|
2812
2892
|
className: "vdt:border-t vdt:border-border",
|
|
2813
|
-
children: [/* @__PURE__ */
|
|
2893
|
+
children: [/* @__PURE__ */ N("button", {
|
|
2814
2894
|
type: "button",
|
|
2815
2895
|
className: "vdt:flex vdt:w-full vdt:items-center vdt:gap-2 vdt:px-3 vdt:py-2 vdt:text-left vdt:hover:bg-muted",
|
|
2816
2896
|
onClick: () => r((e) => !e),
|
|
2817
|
-
children: [/* @__PURE__ */
|
|
2897
|
+
children: [/* @__PURE__ */ M(G, {
|
|
2818
2898
|
tone: "neutral",
|
|
2819
2899
|
children: e
|
|
2820
|
-
}), /* @__PURE__ */
|
|
2900
|
+
}), /* @__PURE__ */ M("span", {
|
|
2821
2901
|
className: "vdt:truncate vdt:font-mono vdt:text-[11px] vdt:text-foreground-muted",
|
|
2822
|
-
children:
|
|
2902
|
+
children: Ar(t)
|
|
2823
2903
|
})]
|
|
2824
|
-
}), n ? /* @__PURE__ */
|
|
2904
|
+
}), n ? /* @__PURE__ */ M(J, { entries: Object.entries(t).map(([e, t]) => ({
|
|
2825
2905
|
key: e,
|
|
2826
|
-
value:
|
|
2906
|
+
value: Ar(t, 200)
|
|
2827
2907
|
})) }) : null]
|
|
2828
2908
|
});
|
|
2829
|
-
},
|
|
2830
|
-
let e =
|
|
2831
|
-
return /* @__PURE__ */
|
|
2832
|
-
/* @__PURE__ */
|
|
2833
|
-
Icon:
|
|
2834
|
-
right: /* @__PURE__ */
|
|
2909
|
+
}, Nr = () => {
|
|
2910
|
+
let e = kr(), [t, n] = l(null), r = x(), i = t ?? e.length;
|
|
2911
|
+
return /* @__PURE__ */ N(j, { children: [
|
|
2912
|
+
/* @__PURE__ */ N(q, {
|
|
2913
|
+
Icon: he,
|
|
2914
|
+
right: /* @__PURE__ */ N(W, {
|
|
2835
2915
|
onClick: () => {
|
|
2836
2916
|
b(), n(null);
|
|
2837
2917
|
},
|
|
2838
|
-
children: [/* @__PURE__ */
|
|
2918
|
+
children: [/* @__PURE__ */ M(ye, {}), "Clear"]
|
|
2839
2919
|
}),
|
|
2840
2920
|
children: [
|
|
2841
2921
|
"Stores (",
|
|
@@ -2843,28 +2923,28 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2843
2923
|
")"
|
|
2844
2924
|
]
|
|
2845
2925
|
}),
|
|
2846
|
-
r.length === 0 ? /* @__PURE__ */
|
|
2847
|
-
/* @__PURE__ */
|
|
2848
|
-
/* @__PURE__ */
|
|
2926
|
+
r.length === 0 ? /* @__PURE__ */ M(Y, { children: "No stores defined. `defineStore(name, () => state)` in a *.store.ts file." }) : r.map((e) => /* @__PURE__ */ N(K, { children: [
|
|
2927
|
+
/* @__PURE__ */ M(q, { children: e.name }),
|
|
2928
|
+
/* @__PURE__ */ M(Mr, {
|
|
2849
2929
|
label: "global",
|
|
2850
2930
|
state: e.get()
|
|
2851
2931
|
}),
|
|
2852
|
-
e.keys().map((t) => /* @__PURE__ */
|
|
2932
|
+
e.keys().map((t) => /* @__PURE__ */ M(Mr, {
|
|
2853
2933
|
label: t,
|
|
2854
2934
|
state: e.get(t)
|
|
2855
2935
|
}, t))
|
|
2856
2936
|
] }, e.name)),
|
|
2857
|
-
/* @__PURE__ */
|
|
2858
|
-
Icon:
|
|
2859
|
-
right: /* @__PURE__ */
|
|
2937
|
+
/* @__PURE__ */ N(q, {
|
|
2938
|
+
Icon: ve,
|
|
2939
|
+
right: /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(W, {
|
|
2860
2940
|
onClick: () => {
|
|
2861
|
-
i <= 0 ||
|
|
2941
|
+
i <= 0 || E(i - 1, "before") && n(i - 1);
|
|
2862
2942
|
},
|
|
2863
2943
|
disabled: i <= 0,
|
|
2864
2944
|
children: "◀ Back"
|
|
2865
|
-
}), /* @__PURE__ */
|
|
2945
|
+
}), /* @__PURE__ */ M(W, {
|
|
2866
2946
|
onClick: () => {
|
|
2867
|
-
t === null || i >= e.length ||
|
|
2947
|
+
t === null || i >= e.length || E(i, "after") && n(i + 1);
|
|
2868
2948
|
},
|
|
2869
2949
|
disabled: t === null || i >= e.length,
|
|
2870
2950
|
children: "Forward ▶"
|
|
@@ -2876,54 +2956,54 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2876
2956
|
t === null ? "" : ` — travelled to ${i}/${e.length}`
|
|
2877
2957
|
]
|
|
2878
2958
|
}),
|
|
2879
|
-
e.length === 0 ? /* @__PURE__ */
|
|
2880
|
-
let a = e.length - 1 - r, o =
|
|
2881
|
-
return /* @__PURE__ */
|
|
2959
|
+
e.length === 0 ? /* @__PURE__ */ M(Y, { children: "No writes yet. Every `set()` lands here, labelled if you pass one." }) : [...e].reverse().map((n, r) => {
|
|
2960
|
+
let a = e.length - 1 - r, o = jr(n.prev, n.next);
|
|
2961
|
+
return /* @__PURE__ */ N(K, { children: [/* @__PURE__ */ N("div", {
|
|
2882
2962
|
className: "vdt:flex vdt:items-center vdt:gap-2 vdt:px-3 vdt:py-2",
|
|
2883
2963
|
children: [
|
|
2884
|
-
/* @__PURE__ */
|
|
2964
|
+
/* @__PURE__ */ M(G, {
|
|
2885
2965
|
tone: n.isUndo === !0 ? "warning" : "neutral",
|
|
2886
2966
|
children: n.store
|
|
2887
2967
|
}),
|
|
2888
|
-
n.key === void 0 ? null : /* @__PURE__ */
|
|
2968
|
+
n.key === void 0 ? null : /* @__PURE__ */ M(G, {
|
|
2889
2969
|
tone: "neutral",
|
|
2890
2970
|
children: n.key
|
|
2891
2971
|
}),
|
|
2892
|
-
n.label === void 0 ? null : /* @__PURE__ */
|
|
2972
|
+
n.label === void 0 ? null : /* @__PURE__ */ M("span", {
|
|
2893
2973
|
className: "vdt:truncate vdt:font-mono vdt:text-[11px] vdt:text-foreground-muted",
|
|
2894
2974
|
children: n.label
|
|
2895
2975
|
}),
|
|
2896
|
-
t !== null && a === i ? /* @__PURE__ */
|
|
2976
|
+
t !== null && a === i ? /* @__PURE__ */ M(G, {
|
|
2897
2977
|
tone: "info",
|
|
2898
2978
|
children: "here"
|
|
2899
2979
|
}) : null
|
|
2900
2980
|
]
|
|
2901
|
-
}), /* @__PURE__ */
|
|
2981
|
+
}), /* @__PURE__ */ M(J, { entries: [
|
|
2902
2982
|
{
|
|
2903
2983
|
key: "changed",
|
|
2904
2984
|
value: o.length > 0 ? o.join(", ") : "(no field diff)"
|
|
2905
2985
|
},
|
|
2906
2986
|
{
|
|
2907
2987
|
key: "before",
|
|
2908
|
-
value:
|
|
2988
|
+
value: Ar(n.prev)
|
|
2909
2989
|
},
|
|
2910
2990
|
{
|
|
2911
2991
|
key: "after",
|
|
2912
|
-
value:
|
|
2992
|
+
value: Ar(n.next)
|
|
2913
2993
|
}
|
|
2914
2994
|
] })] }, `${n.at}-${a}`);
|
|
2915
2995
|
})
|
|
2916
2996
|
] });
|
|
2917
|
-
},
|
|
2997
|
+
}, Pr = (e) => typeof e == "number" ? e < 1 ? "<1ms" : e < 1e3 ? `${Math.round(e)}ms` : `${(e / 1e3).toFixed(1)}s` : "—", Fr = (e) => {
|
|
2918
2998
|
try {
|
|
2919
2999
|
return JSON.stringify(e, null, 2);
|
|
2920
3000
|
} catch {
|
|
2921
3001
|
return String(e);
|
|
2922
3002
|
}
|
|
2923
|
-
},
|
|
3003
|
+
}, Ir = ({ mutation: e }) => /* @__PURE__ */ N("div", {
|
|
2924
3004
|
className: "vdt:bg-background/60",
|
|
2925
3005
|
children: [
|
|
2926
|
-
/* @__PURE__ */
|
|
3006
|
+
/* @__PURE__ */ M(J, { entries: [
|
|
2927
3007
|
{
|
|
2928
3008
|
key: "id",
|
|
2929
3009
|
value: e.id
|
|
@@ -2950,101 +3030,101 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
2950
3030
|
},
|
|
2951
3031
|
{
|
|
2952
3032
|
key: "duration",
|
|
2953
|
-
value:
|
|
3033
|
+
value: Pr(e.durationMs)
|
|
2954
3034
|
}
|
|
2955
3035
|
] }),
|
|
2956
|
-
/* @__PURE__ */
|
|
3036
|
+
/* @__PURE__ */ N("details", {
|
|
2957
3037
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
2958
3038
|
open: !0,
|
|
2959
|
-
children: [/* @__PURE__ */
|
|
3039
|
+
children: [/* @__PURE__ */ M("summary", {
|
|
2960
3040
|
className: "vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:text-foreground-muted vdt:cursor-pointer",
|
|
2961
3041
|
children: "Input"
|
|
2962
|
-
}), /* @__PURE__ */
|
|
3042
|
+
}), /* @__PURE__ */ M("pre", {
|
|
2963
3043
|
className: "vdt:mt-2 vdt:text-[11px] vdt:max-h-48 vdt:overflow-auto vdt:font-mono vdt:text-foreground",
|
|
2964
|
-
children:
|
|
3044
|
+
children: Fr(e.input)
|
|
2965
3045
|
})]
|
|
2966
3046
|
}),
|
|
2967
|
-
e.status === "success" ? /* @__PURE__ */
|
|
3047
|
+
e.status === "success" ? /* @__PURE__ */ N("details", {
|
|
2968
3048
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
2969
3049
|
open: !0,
|
|
2970
|
-
children: [/* @__PURE__ */
|
|
3050
|
+
children: [/* @__PURE__ */ M("summary", {
|
|
2971
3051
|
className: "vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:text-foreground-muted vdt:cursor-pointer",
|
|
2972
3052
|
children: "Output"
|
|
2973
|
-
}), /* @__PURE__ */
|
|
3053
|
+
}), /* @__PURE__ */ M("pre", {
|
|
2974
3054
|
className: "vdt:mt-2 vdt:text-[11px] vdt:max-h-48 vdt:overflow-auto vdt:font-mono vdt:text-foreground",
|
|
2975
|
-
children:
|
|
3055
|
+
children: Fr(e.output)
|
|
2976
3056
|
})]
|
|
2977
3057
|
}) : null,
|
|
2978
|
-
e.status === "error" ? /* @__PURE__ */
|
|
3058
|
+
e.status === "error" ? /* @__PURE__ */ N("details", {
|
|
2979
3059
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
2980
3060
|
open: !0,
|
|
2981
|
-
children: [/* @__PURE__ */
|
|
3061
|
+
children: [/* @__PURE__ */ M("summary", {
|
|
2982
3062
|
className: "vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:text-danger vdt:cursor-pointer",
|
|
2983
3063
|
children: "Error"
|
|
2984
|
-
}), /* @__PURE__ */
|
|
3064
|
+
}), /* @__PURE__ */ M("pre", {
|
|
2985
3065
|
className: "vdt:mt-2 vdt:text-[11px] vdt:max-h-48 vdt:overflow-auto vdt:font-mono vdt:text-danger",
|
|
2986
|
-
children: e.error instanceof Error ? `${e.error.name}: ${e.error.message}\n\n${e.error.stack ?? ""}` :
|
|
3066
|
+
children: e.error instanceof Error ? `${e.error.name}: ${e.error.message}\n\n${e.error.stack ?? ""}` : Fr(e.error)
|
|
2987
3067
|
})]
|
|
2988
3068
|
}) : null
|
|
2989
3069
|
]
|
|
2990
|
-
}),
|
|
3070
|
+
}), Lr = {
|
|
2991
3071
|
trace: "vdt:text-foreground-subtle",
|
|
2992
3072
|
debug: "vdt:text-info",
|
|
2993
3073
|
info: "vdt:text-foreground",
|
|
2994
3074
|
warn: "vdt:text-warning",
|
|
2995
3075
|
error: "vdt:text-danger",
|
|
2996
3076
|
fatal: "vdt:text-danger vdt:font-bold"
|
|
2997
|
-
},
|
|
3077
|
+
}, Rr = (e) => {
|
|
2998
3078
|
if (Object.keys(e).length === 0) return "";
|
|
2999
3079
|
try {
|
|
3000
3080
|
return JSON.stringify(e, null, 2);
|
|
3001
3081
|
} catch {
|
|
3002
3082
|
return String(e);
|
|
3003
3083
|
}
|
|
3004
|
-
},
|
|
3084
|
+
}, zr = (e) => {
|
|
3005
3085
|
let t = (e) => e < 10 ? `0${e}` : String(e);
|
|
3006
3086
|
return `${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}.${((e) => e < 100 ? e < 10 ? `00${e}` : `0${e}` : String(e))(e.getMilliseconds())}`;
|
|
3007
|
-
},
|
|
3008
|
-
let t =
|
|
3009
|
-
return /* @__PURE__ */
|
|
3087
|
+
}, Br = ({ record: e }) => {
|
|
3088
|
+
let t = Rr(e.fields);
|
|
3089
|
+
return /* @__PURE__ */ N("div", {
|
|
3010
3090
|
className: "vdt:bg-background/60 vdt:px-3 vdt:py-2 vdt:flex vdt:flex-col vdt:gap-2",
|
|
3011
3091
|
children: [
|
|
3012
|
-
/* @__PURE__ */
|
|
3092
|
+
/* @__PURE__ */ N("div", {
|
|
3013
3093
|
className: "vdt:text-[10px] vdt:font-mono vdt:text-foreground-muted",
|
|
3014
3094
|
children: [
|
|
3015
|
-
|
|
3095
|
+
zr(e.ts),
|
|
3016
3096
|
e.scope ? ` · ${e.scope}` : "",
|
|
3017
3097
|
" · ",
|
|
3018
3098
|
e.level
|
|
3019
3099
|
]
|
|
3020
3100
|
}),
|
|
3021
|
-
/* @__PURE__ */
|
|
3022
|
-
className: ["vdt:text-xs vdt:break-words",
|
|
3101
|
+
/* @__PURE__ */ M("div", {
|
|
3102
|
+
className: ["vdt:text-xs vdt:break-words", Lr[e.level]].join(" "),
|
|
3023
3103
|
children: e.message
|
|
3024
3104
|
}),
|
|
3025
|
-
e.fiberId ? /* @__PURE__ */
|
|
3105
|
+
e.fiberId ? /* @__PURE__ */ N("div", {
|
|
3026
3106
|
className: "vdt:text-[10px] vdt:font-mono vdt:text-foreground-muted",
|
|
3027
3107
|
children: ["fiber: ", e.fiberId]
|
|
3028
3108
|
}) : null,
|
|
3029
|
-
t ? /* @__PURE__ */
|
|
3109
|
+
t ? /* @__PURE__ */ M("pre", {
|
|
3030
3110
|
className: "vdt:text-[11px] vdt:max-h-48 vdt:overflow-auto vdt:font-mono vdt:text-foreground",
|
|
3031
3111
|
children: t
|
|
3032
3112
|
}) : null,
|
|
3033
|
-
e.cause === void 0 ? null : /* @__PURE__ */
|
|
3113
|
+
e.cause === void 0 ? null : /* @__PURE__ */ M("pre", {
|
|
3034
3114
|
className: "vdt:text-[11px] vdt:max-h-48 vdt:overflow-auto vdt:font-mono vdt:text-danger",
|
|
3035
3115
|
children: e.cause instanceof Error ? e.cause.stack ?? `${e.cause.name}: ${e.cause.message}` : String(e.cause)
|
|
3036
3116
|
})
|
|
3037
3117
|
]
|
|
3038
3118
|
});
|
|
3039
|
-
},
|
|
3119
|
+
}, Vr = 4e3, Hr = async (e, t, n = !1) => {
|
|
3040
3120
|
if (e === "") return null;
|
|
3041
|
-
let r = await
|
|
3121
|
+
let r = await _n(`${e}/_voltro/inspect/traces${n ? "?includeBackground=1" : ""}`, t);
|
|
3042
3122
|
return r !== null && Array.isArray(r.traces) ? r : null;
|
|
3043
|
-
},
|
|
3044
|
-
let n =
|
|
3123
|
+
}, Ur = [], Wr = (e, t = !1) => {
|
|
3124
|
+
let n = O(), r = $(), a = Q(), o = n.names.join(","), [s, c] = l(Ur), u = e && r;
|
|
3045
3125
|
return i(() => {
|
|
3046
3126
|
if (!u) {
|
|
3047
|
-
c(
|
|
3127
|
+
c(Ur);
|
|
3048
3128
|
return;
|
|
3049
3129
|
}
|
|
3050
3130
|
let e = o === "" ? [] : o.split(",").map((e) => ({
|
|
@@ -3052,11 +3132,11 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3052
3132
|
baseUrl: n.get(e).inspectBaseUrl
|
|
3053
3133
|
})).filter((e) => e.baseUrl !== "");
|
|
3054
3134
|
if (e.length === 0) {
|
|
3055
|
-
c(
|
|
3135
|
+
c(Ur);
|
|
3056
3136
|
return;
|
|
3057
3137
|
}
|
|
3058
3138
|
let r = !1, i = async () => {
|
|
3059
|
-
let n = await Promise.all(e.map((e) =>
|
|
3139
|
+
let n = await Promise.all(e.map((e) => Hr(e.baseUrl, a, t)));
|
|
3060
3140
|
if (r) return;
|
|
3061
3141
|
let i = [];
|
|
3062
3142
|
n.forEach((t, n) => {
|
|
@@ -3067,7 +3147,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3067
3147
|
}), c(i);
|
|
3068
3148
|
};
|
|
3069
3149
|
i();
|
|
3070
|
-
let s = setInterval(i,
|
|
3150
|
+
let s = setInterval(i, Vr);
|
|
3071
3151
|
return () => {
|
|
3072
3152
|
r = !0, clearInterval(s);
|
|
3073
3153
|
};
|
|
@@ -3078,7 +3158,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3078
3158
|
a,
|
|
3079
3159
|
t
|
|
3080
3160
|
]), s;
|
|
3081
|
-
},
|
|
3161
|
+
}, Gr = (e) => e < 1 ? "<1ms" : e < 1e3 ? `${Math.round(e)}ms` : `${(e / 1e3).toFixed(2)}s`, Kr = (e) => {
|
|
3082
3162
|
let t = new Map(e.map((e) => [e.spanId, e])), n = /* @__PURE__ */ new Map(), r = (e, i) => {
|
|
3083
3163
|
if (n.has(e.spanId)) return n.get(e.spanId);
|
|
3084
3164
|
if (i > 64 || e.parentSpanId === null) return n.set(e.spanId, 0), 0;
|
|
@@ -3087,94 +3167,94 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3087
3167
|
};
|
|
3088
3168
|
for (let t of e) r(t, 0);
|
|
3089
3169
|
return n;
|
|
3090
|
-
},
|
|
3170
|
+
}, qr = (e) => {
|
|
3091
3171
|
if (typeof e == "string") return e;
|
|
3092
3172
|
try {
|
|
3093
3173
|
return JSON.stringify(e, null, 2) ?? String(e);
|
|
3094
3174
|
} catch {
|
|
3095
3175
|
return String(e);
|
|
3096
3176
|
}
|
|
3097
|
-
},
|
|
3098
|
-
let t =
|
|
3099
|
-
return /* @__PURE__ */
|
|
3177
|
+
}, Jr = ({ trace: e }) => {
|
|
3178
|
+
let t = U().traces, n = Kr(e.spans), r = new Set(e.spans.map((e) => e.spanId)), i = e.spans.some((e) => e.parentSpanId !== null && !r.has(e.parentSpanId)), a = e.spans.length > 0 && e.spans.every((e) => e.name.startsWith("sql.")), o = e.durationMs > 0 ? e.durationMs : 1;
|
|
3179
|
+
return /* @__PURE__ */ N("div", {
|
|
3100
3180
|
className: "vdt-trace-detail",
|
|
3101
3181
|
children: [
|
|
3102
|
-
/* @__PURE__ */
|
|
3182
|
+
/* @__PURE__ */ N("div", {
|
|
3103
3183
|
className: "vdt-trace-summary",
|
|
3104
|
-
children: [/* @__PURE__ */
|
|
3184
|
+
children: [/* @__PURE__ */ M("span", { children: t.spans(e.spanCount) }), e.kind === "subscription" ? /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ N("span", { children: [
|
|
3105
3185
|
e.deliveryCount ?? 0,
|
|
3106
3186
|
" ",
|
|
3107
3187
|
t.delivery(e.deliveryCount ?? 0)
|
|
3108
|
-
] }), e.lastDeliveryMs === void 0 ? null : /* @__PURE__ */
|
|
3188
|
+
] }), e.lastDeliveryMs === void 0 ? null : /* @__PURE__ */ N("span", { children: [
|
|
3109
3189
|
t.lastDelivery,
|
|
3110
3190
|
": ",
|
|
3111
|
-
/* @__PURE__ */
|
|
3112
|
-
] })] }) : /* @__PURE__ */
|
|
3191
|
+
/* @__PURE__ */ M("strong", { children: Gr(e.lastDeliveryMs) })
|
|
3192
|
+
] })] }) : /* @__PURE__ */ N("span", { children: [
|
|
3113
3193
|
t.duration,
|
|
3114
3194
|
": ",
|
|
3115
|
-
/* @__PURE__ */
|
|
3195
|
+
/* @__PURE__ */ M("strong", { children: Gr(e.durationMs) })
|
|
3116
3196
|
] })]
|
|
3117
3197
|
}),
|
|
3118
|
-
/* @__PURE__ */
|
|
3198
|
+
/* @__PURE__ */ N("code", {
|
|
3119
3199
|
className: "vdt-trace-id",
|
|
3120
3200
|
children: ["trace ", e.traceId]
|
|
3121
3201
|
}),
|
|
3122
|
-
i || a ? /* @__PURE__ */
|
|
3202
|
+
i || a ? /* @__PURE__ */ M("p", {
|
|
3123
3203
|
className: "vdt-trace-context",
|
|
3124
3204
|
children: i ? t.missingParents : t.sqlWithoutCaller
|
|
3125
3205
|
}) : null,
|
|
3126
3206
|
e.spans.map((r) => {
|
|
3127
3207
|
let i = Math.min(n.get(r.spanId) ?? 0, 8), a = Math.max(0, Math.min(100, (r.startMs - e.startMs) / o * 100)), s = Math.max(0, Math.min(100 - a, Math.max(1.5, r.durationMs / o * 100))), c = Object.entries(r.attributes);
|
|
3128
|
-
return /* @__PURE__ */
|
|
3208
|
+
return /* @__PURE__ */ N("details", {
|
|
3129
3209
|
className: "vdt-trace-span",
|
|
3130
3210
|
open: r.status === "error",
|
|
3131
3211
|
"data-status": r.status,
|
|
3132
|
-
children: [/* @__PURE__ */
|
|
3212
|
+
children: [/* @__PURE__ */ N("summary", {
|
|
3133
3213
|
className: "vdt-trace-span-head",
|
|
3134
3214
|
style: { paddingLeft: 8 + i * 8 },
|
|
3135
3215
|
children: [
|
|
3136
|
-
/* @__PURE__ */
|
|
3216
|
+
/* @__PURE__ */ N("span", {
|
|
3137
3217
|
className: "vdt-trace-span-label",
|
|
3138
|
-
children: [/* @__PURE__ */
|
|
3218
|
+
children: [/* @__PURE__ */ M(fe, { className: "vdt-trace-chevron" }), /* @__PURE__ */ M("code", {
|
|
3139
3219
|
className: "vdt-trace-span-name",
|
|
3140
3220
|
children: r.name
|
|
3141
3221
|
})]
|
|
3142
3222
|
}),
|
|
3143
|
-
/* @__PURE__ */
|
|
3223
|
+
/* @__PURE__ */ M("span", {
|
|
3144
3224
|
className: "vdt-trace-span-duration",
|
|
3145
|
-
children:
|
|
3225
|
+
children: Gr(r.durationMs)
|
|
3146
3226
|
}),
|
|
3147
|
-
/* @__PURE__ */
|
|
3227
|
+
/* @__PURE__ */ M("span", {
|
|
3148
3228
|
className: "vdt-trace-span-bar",
|
|
3149
3229
|
"aria-hidden": "true",
|
|
3150
|
-
children: /* @__PURE__ */
|
|
3230
|
+
children: /* @__PURE__ */ M("span", { style: {
|
|
3151
3231
|
left: `${a}%`,
|
|
3152
3232
|
width: `${s}%`
|
|
3153
3233
|
} })
|
|
3154
3234
|
})
|
|
3155
3235
|
]
|
|
3156
|
-
}), /* @__PURE__ */
|
|
3236
|
+
}), /* @__PURE__ */ N("div", {
|
|
3157
3237
|
className: "vdt-trace-span-body",
|
|
3158
3238
|
children: [
|
|
3159
|
-
/* @__PURE__ */
|
|
3239
|
+
/* @__PURE__ */ N("div", {
|
|
3160
3240
|
className: "vdt-trace-span-meta",
|
|
3161
3241
|
children: [
|
|
3162
|
-
/* @__PURE__ */
|
|
3163
|
-
/* @__PURE__ */
|
|
3164
|
-
/* @__PURE__ */
|
|
3242
|
+
/* @__PURE__ */ M("span", { children: r.kind }),
|
|
3243
|
+
/* @__PURE__ */ M("span", { children: r.status }),
|
|
3244
|
+
/* @__PURE__ */ M("code", { children: r.spanId })
|
|
3165
3245
|
]
|
|
3166
3246
|
}),
|
|
3167
|
-
r.statusMessage ? /* @__PURE__ */
|
|
3247
|
+
r.statusMessage ? /* @__PURE__ */ M("p", {
|
|
3168
3248
|
className: "vdt-trace-span-message",
|
|
3169
3249
|
children: r.statusMessage
|
|
3170
3250
|
}) : null,
|
|
3171
|
-
c.length > 0 ? /* @__PURE__ */
|
|
3251
|
+
c.length > 0 ? /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("div", {
|
|
3172
3252
|
className: "vdt-trace-attributes-label",
|
|
3173
3253
|
children: t.attributes
|
|
3174
|
-
}), /* @__PURE__ */
|
|
3254
|
+
}), /* @__PURE__ */ M("dl", {
|
|
3175
3255
|
className: "vdt-trace-attributes",
|
|
3176
|
-
children: c.map(([e, t]) => /* @__PURE__ */
|
|
3177
|
-
})] }) : /* @__PURE__ */
|
|
3256
|
+
children: c.map(([e, t]) => /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("dt", { children: e }), /* @__PURE__ */ M("dd", { children: /* @__PURE__ */ M("pre", { children: qr(t) }) })] }, e))
|
|
3257
|
+
})] }) : /* @__PURE__ */ M("p", {
|
|
3178
3258
|
className: "vdt-trace-no-attributes",
|
|
3179
3259
|
children: t.noAttributes
|
|
3180
3260
|
})
|
|
@@ -3184,14 +3264,14 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3184
3264
|
})
|
|
3185
3265
|
]
|
|
3186
3266
|
});
|
|
3187
|
-
},
|
|
3267
|
+
}, Yr = [
|
|
3188
3268
|
"all",
|
|
3189
3269
|
"subscription",
|
|
3190
3270
|
"mutation",
|
|
3191
3271
|
"action",
|
|
3192
3272
|
"trace",
|
|
3193
3273
|
"log"
|
|
3194
|
-
],
|
|
3274
|
+
], Xr = [
|
|
3195
3275
|
"workflows",
|
|
3196
3276
|
"stores",
|
|
3197
3277
|
"indexes",
|
|
@@ -3200,28 +3280,28 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3200
3280
|
"runtimes",
|
|
3201
3281
|
"pwa",
|
|
3202
3282
|
"desktop"
|
|
3203
|
-
],
|
|
3283
|
+
], Zr = [...Yr, ...Xr], Qr = (e) => Yr.includes(e), $r = (e) => {
|
|
3204
3284
|
let t = [], n = /"([^"]*)"|(\S+)/g, r;
|
|
3205
3285
|
for (; (r = n.exec(e)) !== null;) {
|
|
3206
3286
|
let e = (r[1] ?? r[2] ?? "").toLowerCase();
|
|
3207
3287
|
e !== "" && t.push(e);
|
|
3208
3288
|
}
|
|
3209
3289
|
return t;
|
|
3210
|
-
},
|
|
3290
|
+
}, ei = (e, t) => t.every((t) => e.includes(t)), ti = {
|
|
3211
3291
|
subscription: 0,
|
|
3212
3292
|
mutation: 1,
|
|
3213
3293
|
action: 1,
|
|
3214
3294
|
trace: 1,
|
|
3215
3295
|
log: 1
|
|
3216
|
-
},
|
|
3217
|
-
let r =
|
|
3218
|
-
return [...r.length === 0 ? i : i.filter((e) =>
|
|
3219
|
-
let n = Number(
|
|
3296
|
+
}, ni = (e) => (e.source === "mutation" || e.source === "action") && e.status === "pending", ri = (e, t, n) => {
|
|
3297
|
+
let r = $r(t), i = n === "all" ? e : e.filter((e) => e.source === n);
|
|
3298
|
+
return [...r.length === 0 ? i : i.filter((e) => ei(e.haystack, r))].sort((e, t) => {
|
|
3299
|
+
let n = Number(ni(t)) - Number(ni(e));
|
|
3220
3300
|
if (n !== 0) return n;
|
|
3221
|
-
let r =
|
|
3301
|
+
let r = ti[e.source] - ti[t.source];
|
|
3222
3302
|
return r === 0 ? t.at - e.at : r;
|
|
3223
3303
|
});
|
|
3224
|
-
},
|
|
3304
|
+
}, ii = (e) => {
|
|
3225
3305
|
let t = {
|
|
3226
3306
|
subscription: 0,
|
|
3227
3307
|
mutation: 0,
|
|
@@ -3231,7 +3311,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3231
3311
|
};
|
|
3232
3312
|
for (let n of e) t[n.source]++;
|
|
3233
3313
|
return t;
|
|
3234
|
-
},
|
|
3314
|
+
}, ai = (e, t = 400) => {
|
|
3235
3315
|
let n;
|
|
3236
3316
|
try {
|
|
3237
3317
|
n = JSON.stringify(e) ?? String(e);
|
|
@@ -3239,11 +3319,11 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3239
3319
|
n = String(e);
|
|
3240
3320
|
}
|
|
3241
3321
|
return n.length > t ? n.slice(0, t) : n;
|
|
3242
|
-
},
|
|
3322
|
+
}, oi = (e, t, n) => {
|
|
3243
3323
|
if (e.length === 0) return null;
|
|
3244
3324
|
let r = t === null ? -1 : e.indexOf(t);
|
|
3245
3325
|
return r === -1 ? n === 1 ? e[0] : e[e.length - 1] : e[(r + n + e.length) % e.length];
|
|
3246
|
-
},
|
|
3326
|
+
}, si = (e) => e.recovery.phase === "stuck" || e.snapshot.error ? "err" : e.recovery.phase !== "steady" || e.snapshot.pendingPatches > 0 ? "warn" : e.snapshot.revision >= 0 ? "ok" : e.hasFiber ? "info" : "idle", ci = (e, t) => {
|
|
3247
3327
|
let n = Ze(t.key), r = [];
|
|
3248
3328
|
t.subscriberCount > 0 && r.push(`${t.subscriberCount} sub${t.subscriberCount === 1 ? "" : "s"}`), t.snapshot.revision >= 0 && r.push(`r${t.snapshot.revision}`), t.snapshot.pendingPatches > 0 && r.push(`+${t.snapshot.pendingPatches} pending`), t.evicting && r.push("evicting");
|
|
3249
3329
|
let i = t.snapshot.error ? "error" : t.recovery.phase === "steady" ? void 0 : t.recovery.phase;
|
|
@@ -3254,7 +3334,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3254
3334
|
name: n,
|
|
3255
3335
|
summary: r.join(" · "),
|
|
3256
3336
|
...i === void 0 ? {} : { status: i },
|
|
3257
|
-
tone:
|
|
3337
|
+
tone: si(t),
|
|
3258
3338
|
at: 0,
|
|
3259
3339
|
haystack: `${e} ${t.key} ${t.tag ?? ""} ${t.source ?? ""} ${i ?? ""}`.toLowerCase(),
|
|
3260
3340
|
detail: {
|
|
@@ -3263,16 +3343,16 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3263
3343
|
entry: t
|
|
3264
3344
|
}
|
|
3265
3345
|
};
|
|
3266
|
-
},
|
|
3267
|
-
let t = e.kind === "action" ? "action" : "mutation", n =
|
|
3346
|
+
}, li = (e) => e.status === "pending" ? "info" : e.status === "success" ? "ok" : "err", ui = (e) => e.status === "error" ? e.error instanceof Error && e.error.name !== "Error" ? e.error.name : "error" : e.status, di = (e) => {
|
|
3347
|
+
let t = e.kind === "action" ? "action" : "mutation", n = ai(e.input, 160), r = e.status === "error" ? e.error instanceof Error ? `${e.error.name} ${e.error.message}` : ai(e.error, 200) : "";
|
|
3268
3348
|
return {
|
|
3269
3349
|
id: `mut:${e.id}`,
|
|
3270
3350
|
source: t,
|
|
3271
3351
|
apiName: e.apiName,
|
|
3272
3352
|
name: e.tag,
|
|
3273
3353
|
summary: n,
|
|
3274
|
-
status:
|
|
3275
|
-
tone:
|
|
3354
|
+
status: ui(e),
|
|
3355
|
+
tone: li(e),
|
|
3276
3356
|
at: e.startedAt,
|
|
3277
3357
|
haystack: `${t} ${e.apiName} ${e.tag} ${e.status} ${n} ${r}`.toLowerCase(),
|
|
3278
3358
|
detail: {
|
|
@@ -3280,7 +3360,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3280
3360
|
mutation: e
|
|
3281
3361
|
}
|
|
3282
3362
|
};
|
|
3283
|
-
},
|
|
3363
|
+
}, fi = (e) => {
|
|
3284
3364
|
switch (e.level) {
|
|
3285
3365
|
case "error":
|
|
3286
3366
|
case "fatal": return "err";
|
|
@@ -3288,22 +3368,22 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3288
3368
|
case "info": return "info";
|
|
3289
3369
|
default: return "idle";
|
|
3290
3370
|
}
|
|
3291
|
-
},
|
|
3371
|
+
}, pi = (e, t) => ({
|
|
3292
3372
|
id: `log:${e.ts.getTime()}:${t}`,
|
|
3293
3373
|
source: "log",
|
|
3294
3374
|
name: e.scope ?? "log",
|
|
3295
3375
|
summary: e.message,
|
|
3296
3376
|
status: e.level,
|
|
3297
|
-
tone:
|
|
3377
|
+
tone: fi(e),
|
|
3298
3378
|
at: e.ts.getTime(),
|
|
3299
|
-
haystack: `${e.scope ?? ""} ${e.level} ${e.message} ${
|
|
3379
|
+
haystack: `${e.scope ?? ""} ${e.level} ${e.message} ${ai(e.fields, 300)}`.toLowerCase(),
|
|
3300
3380
|
detail: {
|
|
3301
3381
|
source: "log",
|
|
3302
3382
|
record: e
|
|
3303
3383
|
}
|
|
3304
|
-
}),
|
|
3384
|
+
}), mi = (e, t, n = Le.traces) => {
|
|
3305
3385
|
let r = t.spans.map((e) => e.attributes["db.operation.name"] ?? e.attributes["db.operation"]).find((e) => typeof e == "string"), i = t.spans.filter((e) => e.name !== t.rootName).slice(0, 3).map((e) => e.name).join(" → "), a = t.kind === "subscription" ? `${t.deliveryCount ?? 0} ${n.delivery(t.deliveryCount ?? 0)}` : [
|
|
3306
|
-
|
|
3386
|
+
Gr(t.durationMs),
|
|
3307
3387
|
n.spans(t.spanCount),
|
|
3308
3388
|
r ?? i
|
|
3309
3389
|
].filter(Boolean).join(" · "), o = t.spans.filter((e) => e.status === "error").map((e) => `${e.name} ${e.statusMessage ?? ""}`).join(" ");
|
|
@@ -3323,14 +3403,14 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3323
3403
|
trace: t
|
|
3324
3404
|
}
|
|
3325
3405
|
};
|
|
3326
|
-
},
|
|
3327
|
-
let n =
|
|
3406
|
+
}, hi = () => u(T, S, S), gi = () => u(ue, le, le), _i = (e, t = !1) => {
|
|
3407
|
+
let n = U().traces, r = Ye(), i = hi(), a = gi(), o = Wr(e, t);
|
|
3328
3408
|
return s(() => {
|
|
3329
3409
|
let e = [];
|
|
3330
|
-
for (let t of r) for (let n of t.entries) e.push(
|
|
3331
|
-
for (let t of i) e.push(
|
|
3332
|
-
for (let t of o) e.push(
|
|
3333
|
-
return a.forEach((t, n) => e.push(
|
|
3410
|
+
for (let t of r) for (let n of t.entries) e.push(ci(t.name, n));
|
|
3411
|
+
for (let t of i) e.push(di(t));
|
|
3412
|
+
for (let t of o) e.push(mi(t.apiName, t.trace, n));
|
|
3413
|
+
return a.forEach((t, n) => e.push(pi(t, n))), e;
|
|
3334
3414
|
}, [
|
|
3335
3415
|
r,
|
|
3336
3416
|
i,
|
|
@@ -3338,22 +3418,22 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3338
3418
|
o,
|
|
3339
3419
|
n
|
|
3340
3420
|
]);
|
|
3341
|
-
},
|
|
3421
|
+
}, vi = {
|
|
3342
3422
|
all: null,
|
|
3343
|
-
subscription:
|
|
3344
|
-
mutation:
|
|
3345
|
-
action:
|
|
3346
|
-
trace:
|
|
3347
|
-
log:
|
|
3348
|
-
workflows:
|
|
3349
|
-
stores:
|
|
3350
|
-
indexes:
|
|
3351
|
-
webhooks:
|
|
3352
|
-
routes:
|
|
3353
|
-
runtimes:
|
|
3354
|
-
pwa:
|
|
3355
|
-
desktop:
|
|
3356
|
-
},
|
|
3423
|
+
subscription: me,
|
|
3424
|
+
mutation: Te,
|
|
3425
|
+
action: Ce,
|
|
3426
|
+
trace: Se,
|
|
3427
|
+
log: De,
|
|
3428
|
+
workflows: xe,
|
|
3429
|
+
stores: he,
|
|
3430
|
+
indexes: Ee,
|
|
3431
|
+
webhooks: be,
|
|
3432
|
+
routes: ge,
|
|
3433
|
+
runtimes: Oe,
|
|
3434
|
+
pwa: Oe,
|
|
3435
|
+
desktop: Oe
|
|
3436
|
+
}, yi = typeof navigator < "u" && /Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent) ? {
|
|
3357
3437
|
search: "⌘K",
|
|
3358
3438
|
alt: "⌥",
|
|
3359
3439
|
shift: "⇧"
|
|
@@ -3361,7 +3441,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3361
3441
|
search: "Ctrl K",
|
|
3362
3442
|
alt: "Alt",
|
|
3363
3443
|
shift: "Shift"
|
|
3364
|
-
},
|
|
3444
|
+
}, bi = (e, t, n) => {
|
|
3365
3445
|
if (n.trim() !== "") return {
|
|
3366
3446
|
title: e.noResults,
|
|
3367
3447
|
hint: e.noResultsHint
|
|
@@ -3392,14 +3472,14 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3392
3472
|
hint: e.emptyAllHint
|
|
3393
3473
|
};
|
|
3394
3474
|
}
|
|
3395
|
-
},
|
|
3475
|
+
}, xi = (e) => {
|
|
3396
3476
|
let t = new Date(e), n = (e) => e < 10 ? `0${e}` : String(e);
|
|
3397
3477
|
return `${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`;
|
|
3398
|
-
},
|
|
3478
|
+
}, Si = ({ item: e, selected: t, onSelect: n }) => {
|
|
3399
3479
|
let r = c(null);
|
|
3400
3480
|
return i(() => {
|
|
3401
3481
|
t && r.current !== null && typeof r.current.scrollIntoView == "function" && r.current.scrollIntoView({ block: "nearest" });
|
|
3402
|
-
}, [t]), /* @__PURE__ */
|
|
3482
|
+
}, [t]), /* @__PURE__ */ N("button", {
|
|
3403
3483
|
ref: r,
|
|
3404
3484
|
type: "button",
|
|
3405
3485
|
role: "option",
|
|
@@ -3408,106 +3488,106 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3408
3488
|
className: `vdt-row${t ? " vdt-row-sel" : ""}`,
|
|
3409
3489
|
onClick: n,
|
|
3410
3490
|
children: [
|
|
3411
|
-
/* @__PURE__ */
|
|
3491
|
+
/* @__PURE__ */ M("span", {
|
|
3412
3492
|
className: `vdt-dot vdt-dot-${e.tone}`,
|
|
3413
3493
|
"aria-hidden": "true"
|
|
3414
3494
|
}),
|
|
3415
|
-
/* @__PURE__ */
|
|
3495
|
+
/* @__PURE__ */ M("span", {
|
|
3416
3496
|
className: "vdt-row-src",
|
|
3417
3497
|
children: e.source
|
|
3418
3498
|
}),
|
|
3419
|
-
/* @__PURE__ */
|
|
3499
|
+
/* @__PURE__ */ N("span", {
|
|
3420
3500
|
className: "vdt-row-main",
|
|
3421
|
-
children: [/* @__PURE__ */
|
|
3501
|
+
children: [/* @__PURE__ */ M("code", {
|
|
3422
3502
|
className: "vdt-row-name",
|
|
3423
3503
|
children: e.name
|
|
3424
|
-
}), /* @__PURE__ */
|
|
3504
|
+
}), /* @__PURE__ */ M("span", {
|
|
3425
3505
|
className: "vdt-row-summary",
|
|
3426
3506
|
children: e.summary
|
|
3427
3507
|
})]
|
|
3428
3508
|
}),
|
|
3429
|
-
/* @__PURE__ */
|
|
3509
|
+
/* @__PURE__ */ N("span", {
|
|
3430
3510
|
className: "vdt-row-meta",
|
|
3431
3511
|
children: [
|
|
3432
|
-
e.apiName === void 0 ? null : /* @__PURE__ */
|
|
3512
|
+
e.apiName === void 0 ? null : /* @__PURE__ */ M("span", {
|
|
3433
3513
|
className: "vdt-row-api",
|
|
3434
3514
|
children: e.apiName
|
|
3435
3515
|
}),
|
|
3436
|
-
e.status === void 0 ? null : /* @__PURE__ */
|
|
3516
|
+
e.status === void 0 ? null : /* @__PURE__ */ M("span", {
|
|
3437
3517
|
className: `vdt-tag vdt-tag-${e.tone}`,
|
|
3438
3518
|
children: e.status
|
|
3439
3519
|
}),
|
|
3440
|
-
e.at > 0 ? /* @__PURE__ */
|
|
3520
|
+
e.at > 0 ? /* @__PURE__ */ M("span", {
|
|
3441
3521
|
className: "vdt-row-time",
|
|
3442
|
-
children:
|
|
3522
|
+
children: xi(e.at)
|
|
3443
3523
|
}) : null
|
|
3444
3524
|
]
|
|
3445
3525
|
})
|
|
3446
3526
|
]
|
|
3447
3527
|
});
|
|
3448
|
-
},
|
|
3449
|
-
let n = e.detail, r =
|
|
3450
|
-
return /* @__PURE__ */
|
|
3528
|
+
}, Ci = ({ item: e, retained: t }) => {
|
|
3529
|
+
let n = e.detail, r = U().shell;
|
|
3530
|
+
return /* @__PURE__ */ N("div", {
|
|
3451
3531
|
className: "vdt-detail",
|
|
3452
|
-
children: [/* @__PURE__ */
|
|
3532
|
+
children: [/* @__PURE__ */ N("div", {
|
|
3453
3533
|
className: "vdt-detail-head",
|
|
3454
3534
|
children: [
|
|
3455
|
-
/* @__PURE__ */
|
|
3535
|
+
/* @__PURE__ */ M("span", {
|
|
3456
3536
|
className: `vdt-dot vdt-dot-${e.tone}`,
|
|
3457
3537
|
"aria-hidden": "true"
|
|
3458
3538
|
}),
|
|
3459
|
-
/* @__PURE__ */
|
|
3539
|
+
/* @__PURE__ */ M("span", {
|
|
3460
3540
|
className: "vdt-row-src",
|
|
3461
3541
|
children: e.source
|
|
3462
3542
|
}),
|
|
3463
|
-
/* @__PURE__ */
|
|
3543
|
+
/* @__PURE__ */ M("code", {
|
|
3464
3544
|
className: "vdt-detail-name",
|
|
3465
3545
|
children: e.name
|
|
3466
3546
|
}),
|
|
3467
|
-
e.status === void 0 ? null : /* @__PURE__ */
|
|
3547
|
+
e.status === void 0 ? null : /* @__PURE__ */ M("span", {
|
|
3468
3548
|
className: `vdt-tag vdt-tag-${e.tone}`,
|
|
3469
3549
|
children: e.status
|
|
3470
3550
|
}),
|
|
3471
|
-
/* @__PURE__ */
|
|
3472
|
-
e.apiName === void 0 ? null : /* @__PURE__ */
|
|
3551
|
+
/* @__PURE__ */ M("span", { className: "vdt-sp" }),
|
|
3552
|
+
e.apiName === void 0 ? null : /* @__PURE__ */ M("span", {
|
|
3473
3553
|
className: "vdt-row-api",
|
|
3474
3554
|
children: e.apiName
|
|
3475
3555
|
}),
|
|
3476
|
-
e.at > 0 ? /* @__PURE__ */
|
|
3556
|
+
e.at > 0 ? /* @__PURE__ */ M("span", {
|
|
3477
3557
|
className: "vdt-row-time",
|
|
3478
|
-
children:
|
|
3558
|
+
children: xi(e.at)
|
|
3479
3559
|
}) : null
|
|
3480
3560
|
]
|
|
3481
|
-
}), /* @__PURE__ */
|
|
3561
|
+
}), /* @__PURE__ */ N("div", {
|
|
3482
3562
|
className: "vdt-detail-body",
|
|
3483
3563
|
children: [
|
|
3484
|
-
t ? /* @__PURE__ */
|
|
3564
|
+
t ? /* @__PURE__ */ M("p", {
|
|
3485
3565
|
className: "vdt:px-3 vdt:py-2 vdt:text-xs vdt:text-foreground-muted",
|
|
3486
3566
|
role: "status",
|
|
3487
3567
|
children: r.retainedSelection
|
|
3488
3568
|
}) : null,
|
|
3489
|
-
n.source === "subscription" ? /* @__PURE__ */
|
|
3490
|
-
n.source === "mutation" || n.source === "action" ? /* @__PURE__ */
|
|
3491
|
-
n.source === "trace" ? /* @__PURE__ */
|
|
3492
|
-
n.source === "log" ? /* @__PURE__ */
|
|
3569
|
+
n.source === "subscription" ? /* @__PURE__ */ M(Qe, { entry: n.entry }) : null,
|
|
3570
|
+
n.source === "mutation" || n.source === "action" ? /* @__PURE__ */ M(Ir, { mutation: n.mutation }) : null,
|
|
3571
|
+
n.source === "trace" ? /* @__PURE__ */ M(Jr, { trace: n.trace }) : null,
|
|
3572
|
+
n.source === "log" ? /* @__PURE__ */ M(Br, { record: n.record }) : null
|
|
3493
3573
|
]
|
|
3494
3574
|
})]
|
|
3495
3575
|
});
|
|
3496
|
-
},
|
|
3497
|
-
let t =
|
|
3498
|
-
return /* @__PURE__ */
|
|
3576
|
+
}, wi = ({ name: e }) => {
|
|
3577
|
+
let t = U().shell, n = D(e).status, r = n === "connected" ? "ok" : n === "recovering" ? "warn" : "err", i = n === "connected" ? t.connected : n === "recovering" ? t.recovering : n === "degraded" ? t.degraded : t.offline;
|
|
3578
|
+
return /* @__PURE__ */ N("span", {
|
|
3499
3579
|
className: "vdt-chip",
|
|
3500
3580
|
"data-status": n,
|
|
3501
3581
|
children: [
|
|
3502
|
-
/* @__PURE__ */
|
|
3582
|
+
/* @__PURE__ */ M("span", {
|
|
3503
3583
|
className: `vdt-dot vdt-dot-${r}`,
|
|
3504
3584
|
"aria-hidden": "true"
|
|
3505
3585
|
}),
|
|
3506
|
-
/* @__PURE__ */
|
|
3507
|
-
/* @__PURE__ */
|
|
3586
|
+
/* @__PURE__ */ M("b", { children: e }),
|
|
3587
|
+
/* @__PURE__ */ M("span", { children: i })
|
|
3508
3588
|
]
|
|
3509
3589
|
});
|
|
3510
|
-
},
|
|
3590
|
+
}, Ti = () => u(h, () => f().pathname ?? "", () => ""), Ei = (e) => {
|
|
3511
3591
|
let t = e.detail;
|
|
3512
3592
|
switch (t.source) {
|
|
3513
3593
|
case "subscription": return t.entry;
|
|
@@ -3516,25 +3596,25 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3516
3596
|
case "trace": return t.trace;
|
|
3517
3597
|
case "log": return t.record;
|
|
3518
3598
|
}
|
|
3519
|
-
},
|
|
3520
|
-
let f =
|
|
3599
|
+
}, Di = ({ dock: e, push: t, onDock: n, onPush: r, onClose: a, scope: o, onScope: c, searchRef: u, onHeaderPointerDown: d }) => {
|
|
3600
|
+
let f = U(), p = f.shell, m = f.tabs, h = O(), [g, _] = l(!1), v = _i(!0, g), y = Ln(!0), b = Wn(!0), x = cr(!0), S = Ti(), [C, w] = l(""), [T, ee] = l(!1), [E, D] = l(null), k = E?.id ?? null;
|
|
3521
3601
|
i(() => {
|
|
3522
|
-
if (
|
|
3523
|
-
let e = v.find((e) => e.id ===
|
|
3524
|
-
e !== void 0 &&
|
|
3525
|
-
}, [v,
|
|
3526
|
-
let
|
|
3527
|
-
let e = F ?? (I ?
|
|
3528
|
-
return e !== null &&
|
|
3602
|
+
if (E === null || E.source === "subscription") return;
|
|
3603
|
+
let e = v.find((e) => e.id === E.id);
|
|
3604
|
+
e !== void 0 && Ei(e) !== Ei(E) && D(e);
|
|
3605
|
+
}, [v, E]);
|
|
3606
|
+
let te = Qr(o), A = s(() => ii(v), [v]), ne = s(() => v.filter((e) => e.source === "trace" && e.tone === "err").length, [v]), P = s(() => v.filter(ni).length, [v]), F = E === null ? null : v.find((e) => e.id === E.id) ?? null, I = E !== null && E.source !== "subscription" && F === null, L = s(() => {
|
|
3607
|
+
let e = F ?? (I ? E : null);
|
|
3608
|
+
return e !== null && ri([e], C, o).length > 0 ? e : null;
|
|
3529
3609
|
}, [
|
|
3530
3610
|
F,
|
|
3531
3611
|
I,
|
|
3532
|
-
|
|
3612
|
+
E,
|
|
3533
3613
|
C,
|
|
3534
3614
|
o
|
|
3535
3615
|
]), R = s(() => {
|
|
3536
3616
|
let e = I && L !== null ? [...v, L] : v;
|
|
3537
|
-
return
|
|
3617
|
+
return ri(T ? e.filter(ni) : e, C, o);
|
|
3538
3618
|
}, [
|
|
3539
3619
|
v,
|
|
3540
3620
|
C,
|
|
@@ -3542,30 +3622,30 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3542
3622
|
T,
|
|
3543
3623
|
I,
|
|
3544
3624
|
L
|
|
3545
|
-
]),
|
|
3625
|
+
]), z = s(() => T && C.trim() === "" ? {
|
|
3546
3626
|
title: p.emptyPending,
|
|
3547
3627
|
hint: p.emptyPendingHint
|
|
3548
|
-
} :
|
|
3628
|
+
} : bi(p, o, C), [
|
|
3549
3629
|
p,
|
|
3550
3630
|
o,
|
|
3551
3631
|
C,
|
|
3552
3632
|
T
|
|
3553
|
-
]),
|
|
3554
|
-
|
|
3555
|
-
},
|
|
3633
|
+
]), B = (e) => {
|
|
3634
|
+
D(e === null ? null : R.find((t) => t.id === e) ?? null);
|
|
3635
|
+
}, re = (e) => {
|
|
3556
3636
|
switch (e) {
|
|
3557
3637
|
case "all": return v.length;
|
|
3558
|
-
case "subscription": return
|
|
3559
|
-
case "mutation": return
|
|
3560
|
-
case "action": return
|
|
3561
|
-
case "trace": return
|
|
3562
|
-
case "log": return
|
|
3638
|
+
case "subscription": return A.subscription;
|
|
3639
|
+
case "mutation": return A.mutation;
|
|
3640
|
+
case "action": return A.action;
|
|
3641
|
+
case "trace": return A.trace;
|
|
3642
|
+
case "log": return A.log;
|
|
3563
3643
|
case "indexes": return y;
|
|
3564
3644
|
case "webhooks": return b;
|
|
3565
3645
|
case "workflows": return x;
|
|
3566
3646
|
default: return null;
|
|
3567
3647
|
}
|
|
3568
|
-
},
|
|
3648
|
+
}, V = (e) => {
|
|
3569
3649
|
switch (e) {
|
|
3570
3650
|
case "all": return p.scopeAll;
|
|
3571
3651
|
case "subscription": return m.subscriptions;
|
|
@@ -3583,232 +3663,232 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3583
3663
|
case "desktop": return m.desktop;
|
|
3584
3664
|
}
|
|
3585
3665
|
};
|
|
3586
|
-
return /* @__PURE__ */
|
|
3587
|
-
/* @__PURE__ */
|
|
3666
|
+
return /* @__PURE__ */ N(j, { children: [
|
|
3667
|
+
/* @__PURE__ */ N("header", {
|
|
3588
3668
|
className: "vdt-bar",
|
|
3589
3669
|
onPointerDown: d,
|
|
3590
3670
|
children: [
|
|
3591
|
-
e === "window" ? /* @__PURE__ */
|
|
3671
|
+
e === "window" ? /* @__PURE__ */ M("span", {
|
|
3592
3672
|
className: "vdt-win-handle",
|
|
3593
3673
|
title: p.moveTitle,
|
|
3594
3674
|
"aria-hidden": "true",
|
|
3595
|
-
children: /* @__PURE__ */
|
|
3675
|
+
children: /* @__PURE__ */ M(Fe, { className: "vdt:w-4 vdt:h-4" })
|
|
3596
3676
|
}) : null,
|
|
3597
|
-
/* @__PURE__ */
|
|
3598
|
-
|
|
3677
|
+
/* @__PURE__ */ M(de, { className: "vdt-bar-mark" }),
|
|
3678
|
+
te ? /* @__PURE__ */ N("label", {
|
|
3599
3679
|
className: "vdt-search",
|
|
3600
3680
|
children: [
|
|
3601
|
-
/* @__PURE__ */
|
|
3602
|
-
/* @__PURE__ */
|
|
3681
|
+
/* @__PURE__ */ M(we, { className: "vdt:w-3.5 vdt:h-3.5" }),
|
|
3682
|
+
/* @__PURE__ */ M("input", {
|
|
3603
3683
|
ref: u,
|
|
3604
3684
|
type: "search",
|
|
3605
3685
|
value: C,
|
|
3606
3686
|
onChange: (e) => w(e.target.value),
|
|
3607
3687
|
onKeyDown: (e) => {
|
|
3608
|
-
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(),
|
|
3688
|
+
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), B(oi(R.map((e) => e.id), k, e.key === "ArrowDown" ? 1 : -1))) : e.key === "Escape" ? C === "" ? a() : (e.preventDefault(), w("")) : e.key === "Enter" && L === null && R.length > 0 && B(R[0].id);
|
|
3609
3689
|
},
|
|
3610
3690
|
placeholder: p.searchPlaceholder,
|
|
3611
3691
|
"aria-label": p.searchLabel,
|
|
3612
3692
|
autoComplete: "off",
|
|
3613
3693
|
spellCheck: !1
|
|
3614
3694
|
}),
|
|
3615
|
-
/* @__PURE__ */
|
|
3695
|
+
/* @__PURE__ */ M("kbd", {
|
|
3616
3696
|
className: "vdt-kbd",
|
|
3617
|
-
children:
|
|
3697
|
+
children: yi.search
|
|
3618
3698
|
})
|
|
3619
3699
|
]
|
|
3620
|
-
}) : /* @__PURE__ */
|
|
3700
|
+
}) : /* @__PURE__ */ N("span", {
|
|
3621
3701
|
className: "vdt-bar-title",
|
|
3622
|
-
children: [/* @__PURE__ */
|
|
3702
|
+
children: [/* @__PURE__ */ M("span", {
|
|
3623
3703
|
className: "vdt-bar-brand",
|
|
3624
3704
|
children: p.brandWord
|
|
3625
|
-
}), /* @__PURE__ */
|
|
3705
|
+
}), /* @__PURE__ */ M("span", {
|
|
3626
3706
|
className: "vdt-bar-kicker",
|
|
3627
3707
|
children: p.kicker
|
|
3628
3708
|
})]
|
|
3629
3709
|
}),
|
|
3630
|
-
/* @__PURE__ */
|
|
3710
|
+
/* @__PURE__ */ M("div", {
|
|
3631
3711
|
role: "tablist",
|
|
3632
3712
|
"aria-label": p.brand,
|
|
3633
3713
|
className: "vdt-scopes",
|
|
3634
|
-
children:
|
|
3635
|
-
let n =
|
|
3636
|
-
return /* @__PURE__ */
|
|
3714
|
+
children: Zr.map((e, t) => {
|
|
3715
|
+
let n = vi[e], r = re(e), i = e === o;
|
|
3716
|
+
return /* @__PURE__ */ N("button", {
|
|
3637
3717
|
type: "button",
|
|
3638
3718
|
role: "tab",
|
|
3639
|
-
"aria-label": r !== null && r > 0 ? `${
|
|
3719
|
+
"aria-label": r !== null && r > 0 ? `${V(e)} (${r})` : V(e),
|
|
3640
3720
|
"aria-selected": i,
|
|
3641
3721
|
"data-scope": e,
|
|
3642
|
-
className: `vdt-scope${i ? " vdt-scope-on" : ""}${t ===
|
|
3722
|
+
className: `vdt-scope${i ? " vdt-scope-on" : ""}${t === Yr.length ? " vdt-scope-sep" : ""}`,
|
|
3643
3723
|
onClick: () => {
|
|
3644
|
-
c(e),
|
|
3724
|
+
c(e), B(null), ee(!1), Qr(e) && requestAnimationFrame(() => {
|
|
3645
3725
|
let e = u.current;
|
|
3646
3726
|
e !== null && e.getRootNode().activeElement !== e && e.focus();
|
|
3647
3727
|
});
|
|
3648
3728
|
},
|
|
3649
3729
|
children: [
|
|
3650
|
-
n ? /* @__PURE__ */
|
|
3651
|
-
/* @__PURE__ */
|
|
3730
|
+
n ? /* @__PURE__ */ M(n, { className: "vdt:w-3.5 vdt:h-3.5" }) : null,
|
|
3731
|
+
/* @__PURE__ */ M("span", {
|
|
3652
3732
|
className: "vdt-scope-label",
|
|
3653
|
-
children:
|
|
3733
|
+
children: V(e)
|
|
3654
3734
|
}),
|
|
3655
|
-
r !== null && r > 0 ? /* @__PURE__ */
|
|
3656
|
-
className: `vdt-badge${i ? " vdt-badge-acc" : ""}${e === "trace" &&
|
|
3735
|
+
r !== null && r > 0 ? /* @__PURE__ */ M("span", {
|
|
3736
|
+
className: `vdt-badge${i ? " vdt-badge-acc" : ""}${e === "trace" && ne > 0 ? " vdt-badge-err" : ""}`,
|
|
3657
3737
|
children: r
|
|
3658
3738
|
}) : null
|
|
3659
3739
|
]
|
|
3660
3740
|
}, e);
|
|
3661
3741
|
})
|
|
3662
3742
|
}),
|
|
3663
|
-
/* @__PURE__ */
|
|
3664
|
-
/* @__PURE__ */
|
|
3743
|
+
/* @__PURE__ */ M("span", { className: "vdt-sp" }),
|
|
3744
|
+
/* @__PURE__ */ M(Ut, {
|
|
3665
3745
|
dock: e,
|
|
3666
3746
|
push: t,
|
|
3667
3747
|
onDock: n,
|
|
3668
3748
|
onPush: r
|
|
3669
3749
|
}),
|
|
3670
|
-
/* @__PURE__ */
|
|
3750
|
+
/* @__PURE__ */ M("button", {
|
|
3671
3751
|
type: "button",
|
|
3672
3752
|
className: "vdt-iconbtn",
|
|
3673
3753
|
title: p.closeTitle,
|
|
3674
3754
|
"aria-label": p.closeTitle,
|
|
3675
3755
|
onClick: a,
|
|
3676
|
-
children: /* @__PURE__ */
|
|
3756
|
+
children: /* @__PURE__ */ M(pe, { className: "vdt:w-4 vdt:h-4" })
|
|
3677
3757
|
})
|
|
3678
3758
|
]
|
|
3679
3759
|
}),
|
|
3680
|
-
/* @__PURE__ */
|
|
3681
|
-
|
|
3760
|
+
/* @__PURE__ */ M(ln, {}),
|
|
3761
|
+
te ? /* @__PURE__ */ N("div", {
|
|
3682
3762
|
className: "vdt-body",
|
|
3683
3763
|
"data-empty": R.length === 0 && L === null ? "true" : "false",
|
|
3684
|
-
children: [/* @__PURE__ */
|
|
3764
|
+
children: [/* @__PURE__ */ M("div", {
|
|
3685
3765
|
role: "listbox",
|
|
3686
3766
|
"aria-label": p.results(R.length),
|
|
3687
3767
|
tabIndex: 0,
|
|
3688
3768
|
className: "vdt-results",
|
|
3689
3769
|
onKeyDown: (e) => {
|
|
3690
|
-
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(),
|
|
3770
|
+
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), B(oi(R.map((e) => e.id), k, e.key === "ArrowDown" ? 1 : -1))) : e.key === "Escape" && a();
|
|
3691
3771
|
},
|
|
3692
|
-
children: R.length === 0 ? /* @__PURE__ */
|
|
3772
|
+
children: R.length === 0 ? /* @__PURE__ */ N("div", {
|
|
3693
3773
|
className: "vdt-empty",
|
|
3694
|
-
children: [/* @__PURE__ */
|
|
3774
|
+
children: [/* @__PURE__ */ M("div", {
|
|
3695
3775
|
className: "vdt-empty-title",
|
|
3696
|
-
children:
|
|
3697
|
-
}), /* @__PURE__ */
|
|
3776
|
+
children: z.title
|
|
3777
|
+
}), /* @__PURE__ */ M("div", {
|
|
3698
3778
|
className: "vdt-empty-hint",
|
|
3699
|
-
children:
|
|
3779
|
+
children: z.hint
|
|
3700
3780
|
})]
|
|
3701
|
-
}) : R.map((e) => /* @__PURE__ */
|
|
3781
|
+
}) : R.map((e) => /* @__PURE__ */ M(Si, {
|
|
3702
3782
|
item: e,
|
|
3703
|
-
selected: e.id ===
|
|
3704
|
-
onSelect: () =>
|
|
3783
|
+
selected: e.id === k,
|
|
3784
|
+
onSelect: () => B(e.id === k ? null : e.id)
|
|
3705
3785
|
}, e.id))
|
|
3706
|
-
}), /* @__PURE__ */
|
|
3786
|
+
}), /* @__PURE__ */ M("aside", {
|
|
3707
3787
|
className: "vdt-side",
|
|
3708
3788
|
"aria-live": "polite",
|
|
3709
|
-
children: L === null ? /* @__PURE__ */
|
|
3789
|
+
children: L === null ? /* @__PURE__ */ M("div", {
|
|
3710
3790
|
className: "vdt-empty vdt-empty-side",
|
|
3711
|
-
children: /* @__PURE__ */
|
|
3791
|
+
children: /* @__PURE__ */ M("div", {
|
|
3712
3792
|
className: "vdt-empty-hint",
|
|
3713
3793
|
children: p.selectHint
|
|
3714
3794
|
})
|
|
3715
|
-
}) : /* @__PURE__ */
|
|
3795
|
+
}) : /* @__PURE__ */ M(Ci, {
|
|
3716
3796
|
item: L,
|
|
3717
3797
|
retained: I
|
|
3718
3798
|
})
|
|
3719
3799
|
})]
|
|
3720
|
-
}) : /* @__PURE__ */
|
|
3800
|
+
}) : /* @__PURE__ */ N("div", {
|
|
3721
3801
|
className: "vdt-body vdt-body-panel",
|
|
3722
3802
|
children: [
|
|
3723
|
-
o === "workflows" ? /* @__PURE__ */
|
|
3724
|
-
o === "stores" ? /* @__PURE__ */
|
|
3725
|
-
o === "indexes" ? /* @__PURE__ */
|
|
3726
|
-
o === "webhooks" ? /* @__PURE__ */
|
|
3727
|
-
o === "routes" ? /* @__PURE__ */
|
|
3728
|
-
o === "runtimes" ? /* @__PURE__ */
|
|
3729
|
-
o === "pwa" ? /* @__PURE__ */
|
|
3730
|
-
o === "desktop" ? /* @__PURE__ */
|
|
3803
|
+
o === "workflows" ? /* @__PURE__ */ M(lr, {}) : null,
|
|
3804
|
+
o === "stores" ? /* @__PURE__ */ M(Nr, {}) : null,
|
|
3805
|
+
o === "indexes" ? /* @__PURE__ */ M(Pn, {}) : null,
|
|
3806
|
+
o === "webhooks" ? /* @__PURE__ */ M(Kn, {}) : null,
|
|
3807
|
+
o === "routes" ? /* @__PURE__ */ M(_r, {}) : null,
|
|
3808
|
+
o === "runtimes" ? /* @__PURE__ */ M(yr, {}) : null,
|
|
3809
|
+
o === "pwa" ? /* @__PURE__ */ M(Tr, {}) : null,
|
|
3810
|
+
o === "desktop" ? /* @__PURE__ */ M(Or, {}) : null
|
|
3731
3811
|
]
|
|
3732
3812
|
}),
|
|
3733
|
-
/* @__PURE__ */
|
|
3813
|
+
/* @__PURE__ */ N("footer", {
|
|
3734
3814
|
className: "vdt-foot",
|
|
3735
3815
|
children: [
|
|
3736
|
-
o === "trace" ? /* @__PURE__ */
|
|
3816
|
+
o === "trace" ? /* @__PURE__ */ M("button", {
|
|
3737
3817
|
type: "button",
|
|
3738
3818
|
className: "vdt-chip vdt-background-filter",
|
|
3739
3819
|
"aria-pressed": g,
|
|
3740
3820
|
onClick: () => _(!g),
|
|
3741
3821
|
children: f.traces.includeBackground
|
|
3742
3822
|
}) : null,
|
|
3743
|
-
|
|
3823
|
+
P > 0 || T ? /* @__PURE__ */ N("button", {
|
|
3744
3824
|
type: "button",
|
|
3745
3825
|
className: "vdt-chip vdt-chip-info vdt-pending-filter",
|
|
3746
3826
|
"data-chip": "pending",
|
|
3747
|
-
"aria-label": p.pendingInvocations(
|
|
3827
|
+
"aria-label": p.pendingInvocations(P),
|
|
3748
3828
|
"aria-pressed": T,
|
|
3749
3829
|
onClick: () => {
|
|
3750
|
-
|
|
3830
|
+
ee(!T), c("all"), w(""), B(null);
|
|
3751
3831
|
},
|
|
3752
3832
|
children: [
|
|
3753
|
-
/* @__PURE__ */
|
|
3833
|
+
/* @__PURE__ */ M("span", {
|
|
3754
3834
|
className: "vdt-dot vdt-dot-info",
|
|
3755
3835
|
"aria-hidden": "true"
|
|
3756
3836
|
}),
|
|
3757
|
-
/* @__PURE__ */
|
|
3837
|
+
/* @__PURE__ */ M("b", { children: P }),
|
|
3758
3838
|
" ",
|
|
3759
3839
|
p.pending
|
|
3760
3840
|
]
|
|
3761
3841
|
}) : null,
|
|
3762
|
-
h.names.map((e) => /* @__PURE__ */
|
|
3763
|
-
S === "" ? null : /* @__PURE__ */
|
|
3842
|
+
h.names.map((e) => /* @__PURE__ */ M(wi, { name: e }, e)),
|
|
3843
|
+
S === "" ? null : /* @__PURE__ */ M("span", {
|
|
3764
3844
|
className: "vdt-foot-route",
|
|
3765
|
-
children: /* @__PURE__ */
|
|
3845
|
+
children: /* @__PURE__ */ M("code", { children: S })
|
|
3766
3846
|
}),
|
|
3767
|
-
/* @__PURE__ */
|
|
3768
|
-
/* @__PURE__ */
|
|
3847
|
+
/* @__PURE__ */ M("span", { className: "vdt-sp" }),
|
|
3848
|
+
/* @__PURE__ */ N("span", {
|
|
3769
3849
|
className: "vdt-hints",
|
|
3770
3850
|
children: [
|
|
3771
|
-
/* @__PURE__ */
|
|
3772
|
-
/* @__PURE__ */
|
|
3851
|
+
/* @__PURE__ */ N("span", { children: [
|
|
3852
|
+
/* @__PURE__ */ M("kbd", {
|
|
3773
3853
|
className: "vdt-kbd",
|
|
3774
3854
|
children: "↑↓"
|
|
3775
3855
|
}),
|
|
3776
3856
|
" ",
|
|
3777
3857
|
p.hintNavigate
|
|
3778
3858
|
] }),
|
|
3779
|
-
/* @__PURE__ */
|
|
3780
|
-
/* @__PURE__ */
|
|
3859
|
+
/* @__PURE__ */ N("span", { children: [
|
|
3860
|
+
/* @__PURE__ */ M("kbd", {
|
|
3781
3861
|
className: "vdt-kbd",
|
|
3782
3862
|
children: "↵"
|
|
3783
3863
|
}),
|
|
3784
3864
|
" ",
|
|
3785
3865
|
p.hintOpen
|
|
3786
3866
|
] }),
|
|
3787
|
-
/* @__PURE__ */
|
|
3788
|
-
/* @__PURE__ */
|
|
3867
|
+
/* @__PURE__ */ N("span", { children: [
|
|
3868
|
+
/* @__PURE__ */ M("kbd", {
|
|
3789
3869
|
className: "vdt-kbd",
|
|
3790
|
-
children:
|
|
3870
|
+
children: yi.alt
|
|
3791
3871
|
}),
|
|
3792
3872
|
"+",
|
|
3793
|
-
/* @__PURE__ */
|
|
3873
|
+
/* @__PURE__ */ M("kbd", {
|
|
3794
3874
|
className: "vdt-kbd",
|
|
3795
3875
|
children: "V"
|
|
3796
3876
|
}),
|
|
3797
3877
|
" ",
|
|
3798
3878
|
p.hintToggle
|
|
3799
3879
|
] }),
|
|
3800
|
-
/* @__PURE__ */
|
|
3801
|
-
/* @__PURE__ */
|
|
3880
|
+
/* @__PURE__ */ N("span", { children: [
|
|
3881
|
+
/* @__PURE__ */ M("kbd", {
|
|
3802
3882
|
className: "vdt-kbd",
|
|
3803
|
-
children:
|
|
3883
|
+
children: yi.alt
|
|
3804
3884
|
}),
|
|
3805
3885
|
"+",
|
|
3806
|
-
/* @__PURE__ */
|
|
3886
|
+
/* @__PURE__ */ M("kbd", {
|
|
3807
3887
|
className: "vdt-kbd",
|
|
3808
|
-
children:
|
|
3888
|
+
children: yi.shift
|
|
3809
3889
|
}),
|
|
3810
3890
|
"+",
|
|
3811
|
-
/* @__PURE__ */
|
|
3891
|
+
/* @__PURE__ */ M("kbd", {
|
|
3812
3892
|
className: "vdt-kbd",
|
|
3813
3893
|
children: "←↑↓→"
|
|
3814
3894
|
}),
|
|
@@ -3820,17 +3900,17 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3820
3900
|
]
|
|
3821
3901
|
})
|
|
3822
3902
|
] });
|
|
3823
|
-
},
|
|
3824
|
-
let n =
|
|
3825
|
-
return /* @__PURE__ */
|
|
3903
|
+
}, Oi = ({ error: e, onReset: t }) => {
|
|
3904
|
+
let n = U().shell;
|
|
3905
|
+
return /* @__PURE__ */ N("div", {
|
|
3826
3906
|
role: "alert",
|
|
3827
3907
|
className: "vdt-crash",
|
|
3828
3908
|
children: [
|
|
3829
|
-
/* @__PURE__ */
|
|
3909
|
+
/* @__PURE__ */ M("div", {
|
|
3830
3910
|
className: "vdt-crash-title",
|
|
3831
3911
|
children: n.crashTitle
|
|
3832
3912
|
}),
|
|
3833
|
-
/* @__PURE__ */
|
|
3913
|
+
/* @__PURE__ */ N("pre", {
|
|
3834
3914
|
className: "vdt-crash-message",
|
|
3835
3915
|
children: [
|
|
3836
3916
|
e.name,
|
|
@@ -3838,7 +3918,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3838
3918
|
e.message
|
|
3839
3919
|
]
|
|
3840
3920
|
}),
|
|
3841
|
-
/* @__PURE__ */
|
|
3921
|
+
/* @__PURE__ */ M("button", {
|
|
3842
3922
|
type: "button",
|
|
3843
3923
|
className: "vdt-crash-reset",
|
|
3844
3924
|
onClick: t,
|
|
@@ -3846,7 +3926,7 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3846
3926
|
})
|
|
3847
3927
|
]
|
|
3848
3928
|
});
|
|
3849
|
-
},
|
|
3929
|
+
}, ki = class extends e {
|
|
3850
3930
|
state = { error: null };
|
|
3851
3931
|
static getDerivedStateFromError(e) {
|
|
3852
3932
|
return { error: e };
|
|
@@ -3855,15 +3935,15 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3855
3935
|
this.props.onError?.(e, t);
|
|
3856
3936
|
}
|
|
3857
3937
|
render() {
|
|
3858
|
-
return this.state.error === null ? this.props.children : /* @__PURE__ */
|
|
3938
|
+
return this.state.error === null ? this.props.children : /* @__PURE__ */ M(Oi, {
|
|
3859
3939
|
error: this.state.error,
|
|
3860
3940
|
onReset: () => this.setState({ error: null })
|
|
3861
3941
|
});
|
|
3862
3942
|
}
|
|
3863
|
-
},
|
|
3943
|
+
}, Ai = /vdt/, ji = (e, t) => {
|
|
3864
3944
|
for (let n of Array.from(e)) {
|
|
3865
3945
|
if (n instanceof CSSStyleRule) {
|
|
3866
|
-
|
|
3946
|
+
(Ai.test(n.selectorText) || Array.from(n.style).some((e) => e.startsWith("--vdt-"))) && t.push(n.cssText);
|
|
3867
3947
|
continue;
|
|
3868
3948
|
}
|
|
3869
3949
|
if (n instanceof CSSKeyframesRule) {
|
|
@@ -3872,14 +3952,28 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3872
3952
|
}
|
|
3873
3953
|
if (n instanceof CSSGroupingRule || n instanceof CSSLayerBlockRule) {
|
|
3874
3954
|
let e = [];
|
|
3875
|
-
if (
|
|
3955
|
+
if (ji(n.cssRules, e), e.length === 0) continue;
|
|
3876
3956
|
let r = n.cssText, i = r.slice(0, r.indexOf("{")).trim();
|
|
3877
3957
|
t.push(`${i} {\n${e.join("\n")}\n}`);
|
|
3878
3958
|
continue;
|
|
3879
3959
|
}
|
|
3880
|
-
n.constructor.name === "CSSPropertyRule" &&
|
|
3960
|
+
n.constructor.name === "CSSPropertyRule" && Ai.test(n.cssText) && t.push(n.cssText), n.constructor.name === "CSSLayerStatementRule" && t.push(n.cssText);
|
|
3961
|
+
}
|
|
3962
|
+
}, Mi = (e) => {
|
|
3963
|
+
let t = [], n = (e) => {
|
|
3964
|
+
for (let r of Array.from(e)) r.constructor.name === "CSSPropertyRule" && /@property\s+--(tw|vdt)-/.test(r.cssText) ? t.push(r.cssText) : (r instanceof CSSGroupingRule || r instanceof CSSLayerBlockRule) && n(r.cssRules);
|
|
3965
|
+
};
|
|
3966
|
+
for (let t of Array.from(e.styleSheets)) {
|
|
3967
|
+
let e;
|
|
3968
|
+
try {
|
|
3969
|
+
e = t.cssRules;
|
|
3970
|
+
} catch {
|
|
3971
|
+
continue;
|
|
3972
|
+
}
|
|
3973
|
+
n(e);
|
|
3881
3974
|
}
|
|
3882
|
-
|
|
3975
|
+
return t.join("\n");
|
|
3976
|
+
}, Ni = (e) => {
|
|
3883
3977
|
let t = [];
|
|
3884
3978
|
for (let n of Array.from(e.styleSheets)) {
|
|
3885
3979
|
let e;
|
|
@@ -3888,66 +3982,107 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3888
3982
|
} catch {
|
|
3889
3983
|
continue;
|
|
3890
3984
|
}
|
|
3891
|
-
|
|
3985
|
+
ji(e, t);
|
|
3892
3986
|
}
|
|
3893
3987
|
return t.join("\n");
|
|
3894
|
-
},
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3988
|
+
}, Pi = (e, t) => {
|
|
3989
|
+
let n = e.ownerDocument.defaultView?.CSSStyleSheet;
|
|
3990
|
+
if (n !== void 0 && "replaceSync" in n.prototype && "adoptedStyleSheets" in e) {
|
|
3991
|
+
let r = new n();
|
|
3992
|
+
r.replaceSync(t), e.adoptedStyleSheets = [r];
|
|
3898
3993
|
return;
|
|
3899
3994
|
}
|
|
3900
|
-
let
|
|
3901
|
-
|
|
3902
|
-
},
|
|
3903
|
-
let
|
|
3995
|
+
let r = e.querySelector("style[data-vdt]");
|
|
3996
|
+
r === null && (r = e.ownerDocument.createElement("style"), r.setAttribute("data-vdt", ""), e.prepend(r)), r.textContent = t;
|
|
3997
|
+
}, Fi = ({ children: e, target: t }) => {
|
|
3998
|
+
let [n, r] = l(null);
|
|
3904
3999
|
return o(() => {
|
|
3905
|
-
let e = t.
|
|
3906
|
-
|
|
3907
|
-
let
|
|
3908
|
-
|
|
3909
|
-
let
|
|
3910
|
-
|
|
3911
|
-
|
|
4000
|
+
let e = document, n = t ?? e, i = n.createElement("div");
|
|
4001
|
+
i.className = "vdt-root", i.setAttribute("data-voltro-devtools", ""), n.documentElement.append(i);
|
|
4002
|
+
let a = i.attachShadow({ mode: "open" }), o = n.createElement("div");
|
|
4003
|
+
o.setAttribute("data-vdt-mount", ""), a.append(o);
|
|
4004
|
+
let s = n === e ? null : n.createElement("style");
|
|
4005
|
+
s !== null && (s.setAttribute("data-vdt-properties", ""), n.head.append(s));
|
|
4006
|
+
let c = "", l = () => {
|
|
4007
|
+
if (s !== null) {
|
|
4008
|
+
let t = Mi(e);
|
|
4009
|
+
s.textContent !== t && (s.textContent = t);
|
|
4010
|
+
}
|
|
4011
|
+
let t = Ni(e);
|
|
4012
|
+
t !== c && (c = t, Pi(a, t));
|
|
3912
4013
|
};
|
|
3913
|
-
|
|
3914
|
-
let
|
|
3915
|
-
return
|
|
4014
|
+
l();
|
|
4015
|
+
let u = typeof MutationObserver > "u" ? null : new MutationObserver(() => l());
|
|
4016
|
+
return u?.observe(e.head, {
|
|
3916
4017
|
childList: !0,
|
|
3917
4018
|
subtree: !0,
|
|
3918
4019
|
characterData: !0
|
|
3919
|
-
}), r(
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
4020
|
+
}), r(o), () => {
|
|
4021
|
+
u?.disconnect(), i.remove(), s?.remove(), r(null);
|
|
4022
|
+
};
|
|
4023
|
+
}, [t]), n === null ? null : ne(e, n);
|
|
4024
|
+
}, Ii = () => u(g, p, p), Li = ["overflow"], Ri = [
|
|
4025
|
+
"position",
|
|
4026
|
+
"top",
|
|
4027
|
+
"right",
|
|
4028
|
+
"bottom",
|
|
4029
|
+
"left",
|
|
4030
|
+
"overflow",
|
|
4031
|
+
"contain"
|
|
4032
|
+
], zi = (e, t) => t.map((t) => [
|
|
4033
|
+
t,
|
|
4034
|
+
e.getPropertyValue(t),
|
|
4035
|
+
e.getPropertyPriority(t)
|
|
4036
|
+
]), Bi = (e, t) => {
|
|
4037
|
+
for (let [n, r, i] of t) r === "" ? e.removeProperty(n) : e.setProperty(n, r, i);
|
|
4038
|
+
}, Vi = (e, t, n = document) => {
|
|
4039
|
+
let r = n.documentElement, i = n.body, a = n.defaultView, o = zi(r.style, Li), s = zi(i.style, Ri), c = a?.scrollX ?? 0, l = a?.scrollY ?? 0;
|
|
4040
|
+
r.style.setProperty("overflow", "hidden"), i.style.setProperty("position", "fixed");
|
|
4041
|
+
for (let e of [
|
|
4042
|
+
"top",
|
|
4043
|
+
"right",
|
|
4044
|
+
"bottom",
|
|
4045
|
+
"left"
|
|
4046
|
+
]) i.style.setProperty(e, "0px");
|
|
4047
|
+
return i.style.setProperty(e, `${t}px`), i.style.setProperty("overflow", "auto"), i.style.setProperty("contain", "layout paint"), i.scrollTop = l, i.scrollLeft = c, {
|
|
4048
|
+
resize: (t) => {
|
|
4049
|
+
i.style.setProperty(e, `${t}px`);
|
|
4050
|
+
},
|
|
4051
|
+
release: () => {
|
|
4052
|
+
let e = i.scrollTop, t = i.scrollLeft;
|
|
4053
|
+
Bi(i.style, s), Bi(r.style, o), a?.scrollTo(t, e);
|
|
4054
|
+
}
|
|
4055
|
+
};
|
|
4056
|
+
}, Hi = (e, t) => {
|
|
4057
|
+
let n = window.open("", `voltro-devtools-${Date.now().toString(36)}`, `popup,width=${Math.round(e.w)},height=${Math.round(e.h)}`);
|
|
4058
|
+
if (n === null) return null;
|
|
4059
|
+
let r = n.document;
|
|
4060
|
+
return r.title = t, r.documentElement.style.setProperty("color-scheme", "dark"), r.documentElement.style.setProperty("background", "#100c19"), r.body.style.setProperty("margin", "0"), n;
|
|
4061
|
+
}, Ui = "voltro:devtools:open", Wi = (e) => {
|
|
3927
4062
|
if (typeof window > "u") return e;
|
|
3928
4063
|
try {
|
|
3929
|
-
let t = window.localStorage.getItem(
|
|
4064
|
+
let t = window.localStorage.getItem(Ui);
|
|
3930
4065
|
return t === null ? e : t === "1";
|
|
3931
4066
|
} catch {
|
|
3932
4067
|
return e;
|
|
3933
4068
|
}
|
|
3934
|
-
},
|
|
4069
|
+
}, Gi = (e) => {
|
|
3935
4070
|
if (!(typeof window > "u")) try {
|
|
3936
|
-
window.localStorage.setItem(
|
|
4071
|
+
window.localStorage.setItem(Ui, e ? "1" : "0");
|
|
3937
4072
|
} catch {}
|
|
3938
|
-
},
|
|
3939
|
-
let i =
|
|
3940
|
-
return /* @__PURE__ */
|
|
4073
|
+
}, Ki = ({ initialIsOpen: e = !1, initialDock: t = "bottom", strings: n, inspectToken: r } = {}) => {
|
|
4074
|
+
let i = pn(r);
|
|
4075
|
+
return /* @__PURE__ */ M(dn, {
|
|
3941
4076
|
token: i,
|
|
3942
|
-
children: /* @__PURE__ */
|
|
4077
|
+
children: /* @__PURE__ */ M(Be, {
|
|
3943
4078
|
strings: n ?? {},
|
|
3944
|
-
children: /* @__PURE__ */
|
|
4079
|
+
children: /* @__PURE__ */ M(ea, {
|
|
3945
4080
|
initialIsOpen: e,
|
|
3946
4081
|
initialDock: t
|
|
3947
4082
|
})
|
|
3948
4083
|
})
|
|
3949
4084
|
});
|
|
3950
|
-
},
|
|
4085
|
+
}, qi = (e) => {
|
|
3951
4086
|
switch (e.dock) {
|
|
3952
4087
|
case "bottom":
|
|
3953
4088
|
case "top": return { height: e.sizes[e.dock] };
|
|
@@ -3959,35 +4094,42 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3959
4094
|
width: e.window.w,
|
|
3960
4095
|
height: e.window.h
|
|
3961
4096
|
};
|
|
4097
|
+
case "external": return {};
|
|
3962
4098
|
}
|
|
3963
|
-
},
|
|
4099
|
+
}, Ji = (e, t) => {
|
|
4100
|
+
let n = {
|
|
4101
|
+
"--vdt-capsule-x": e.x,
|
|
4102
|
+
"--vdt-capsule-y": e.y
|
|
4103
|
+
};
|
|
4104
|
+
return t !== void 0 && (n.width = t.w, n.height = t.h), n;
|
|
4105
|
+
}, Yi = (e, t, n, r) => {
|
|
3964
4106
|
switch (e) {
|
|
3965
4107
|
case "bottom": return t - r;
|
|
3966
4108
|
case "top": return t + r;
|
|
3967
4109
|
case "left": return t + n;
|
|
3968
4110
|
case "right": return t - n;
|
|
3969
4111
|
}
|
|
3970
|
-
},
|
|
4112
|
+
}, Xi = (e) => {
|
|
3971
4113
|
console.error("[voltro devtools] the overlay hit an error and was contained:", e);
|
|
3972
|
-
},
|
|
4114
|
+
}, Zi = (e) => {
|
|
3973
4115
|
let t = document.body.style;
|
|
3974
4116
|
e !== null && t.setProperty("cursor", e), t.setProperty("user-select", "none"), t.setProperty("-webkit-user-select", "none");
|
|
3975
|
-
},
|
|
4117
|
+
}, Qi = () => {
|
|
3976
4118
|
let e = document.body.style;
|
|
3977
4119
|
e.removeProperty("cursor"), e.removeProperty("user-select"), e.removeProperty("-webkit-user-select");
|
|
3978
|
-
},
|
|
3979
|
-
let r =
|
|
4120
|
+
}, $i = (e) => e instanceof Element && e.closest("button, input, a, [role=\"menu\"], [role=\"tablist\"], label") !== null, ea = ({ initialIsOpen: e, initialDock: t }) => {
|
|
4121
|
+
let r = U().shell, [a, o] = Bt(t), [u, d] = l(() => Wi(e) && a.dock !== "external"), [f, p] = l("all"), m = c(null), [h, g] = l(0), _ = Ii(), v = _.length > 0 ? _[_.length - 1] : null;
|
|
3980
4122
|
i(() => {
|
|
3981
|
-
|
|
3982
|
-
}, [
|
|
3983
|
-
|
|
3984
|
-
}, [
|
|
3985
|
-
let { dock: y, push: b } =
|
|
3986
|
-
|
|
3987
|
-
let k = D && !
|
|
4123
|
+
Gi(u);
|
|
4124
|
+
}, [u]), i(() => {
|
|
4125
|
+
u || tn();
|
|
4126
|
+
}, [u]);
|
|
4127
|
+
let { dock: y, push: b } = a, { setDock: x, setEdgeSize: S, setWindowRect: C, setPush: w, setCapsule: T } = o, ee = zt(), E = s(() => Nt(a, ee), [a, ee]), [D, O] = l(u);
|
|
4128
|
+
u && !D && O(!0);
|
|
4129
|
+
let k = D && !u, te = c(null);
|
|
3988
4130
|
i(() => {
|
|
3989
4131
|
if (!k) return;
|
|
3990
|
-
let e =
|
|
4132
|
+
let e = te.current?.getAnimations?.() ?? [];
|
|
3991
4133
|
if (e.length === 0) {
|
|
3992
4134
|
O(!1);
|
|
3993
4135
|
return;
|
|
@@ -3999,85 +4141,111 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
3999
4141
|
t = !0;
|
|
4000
4142
|
};
|
|
4001
4143
|
}, [k]);
|
|
4002
|
-
let
|
|
4144
|
+
let A = c(null), ne = c(!1);
|
|
4003
4145
|
i(() => {
|
|
4004
4146
|
if (D) {
|
|
4005
|
-
|
|
4147
|
+
ne.current = !0;
|
|
4148
|
+
return;
|
|
4149
|
+
}
|
|
4150
|
+
ne.current && A.current?.focus();
|
|
4151
|
+
}, [D]);
|
|
4152
|
+
let [P, F] = l(null), I = u && y === "external";
|
|
4153
|
+
i(() => {
|
|
4154
|
+
if (!I || typeof window > "u") return;
|
|
4155
|
+
let e = Hi(a.window, r.brand);
|
|
4156
|
+
if (e === null) {
|
|
4157
|
+
console.warn(`[voltro devtools] ${r.externalBlocked}`), d(!1);
|
|
4006
4158
|
return;
|
|
4007
4159
|
}
|
|
4008
|
-
|
|
4009
|
-
|
|
4160
|
+
F(e), e.focus();
|
|
4161
|
+
let t = window.setInterval(() => {
|
|
4162
|
+
e.closed && d(!1);
|
|
4163
|
+
}, 400), n = () => {
|
|
4164
|
+
e.close();
|
|
4165
|
+
};
|
|
4166
|
+
return window.addEventListener("pagehide", n), () => {
|
|
4167
|
+
window.clearInterval(t), window.removeEventListener("pagehide", n), F(null), e.close();
|
|
4168
|
+
};
|
|
4169
|
+
}, [I]), i(() => {
|
|
4010
4170
|
if (typeof window > "u") return;
|
|
4011
4171
|
let e = (e, t, n) => e.code === t || e.key.toLowerCase() === n, t = (t) => {
|
|
4012
4172
|
if (t.altKey && !t.shiftKey && !t.metaKey && !t.ctrlKey && e(t, "KeyV", "v")) {
|
|
4013
|
-
t.preventDefault(),
|
|
4173
|
+
t.preventDefault(), d((e) => !e);
|
|
4014
4174
|
return;
|
|
4015
4175
|
}
|
|
4016
4176
|
if ((t.metaKey || t.ctrlKey) && !t.altKey && e(t, "KeyK", "k")) {
|
|
4017
|
-
t.preventDefault(),
|
|
4177
|
+
t.preventDefault(), d(!0), p((e) => e === "stores" || e === "indexes" || e === "webhooks" || e === "routes" || e === "runtimes" || e === "pwa" || e === "desktop" ? "all" : e), g((e) => e + 1);
|
|
4018
4178
|
return;
|
|
4019
4179
|
}
|
|
4020
4180
|
if (t.altKey && t.shiftKey) {
|
|
4021
|
-
let e =
|
|
4022
|
-
e !== null && (t.preventDefault(),
|
|
4181
|
+
let e = Vt(t.key);
|
|
4182
|
+
e !== null && (t.preventDefault(), d(!0), x(e));
|
|
4023
4183
|
}
|
|
4184
|
+
}, n = P === null ? [window] : [window, P];
|
|
4185
|
+
for (let e of n) e.addEventListener("keydown", t);
|
|
4186
|
+
return () => {
|
|
4187
|
+
for (let e of n) e.removeEventListener("keydown", t);
|
|
4024
4188
|
};
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
if (!a) return;
|
|
4189
|
+
}, [x, P]), i(() => {
|
|
4190
|
+
if (!u) return;
|
|
4028
4191
|
let e = requestAnimationFrame(() => m.current?.focus());
|
|
4029
4192
|
return () => cancelAnimationFrame(e);
|
|
4030
|
-
}, [a, h]), i(() => {
|
|
4031
|
-
if (typeof document > "u" || !D || !b || !dt(y)) return;
|
|
4032
|
-
let e = document.documentElement, t = Ai(y);
|
|
4033
|
-
return e.style.setProperty(t, `${E.sizes[y]}px`), () => {
|
|
4034
|
-
e.style.removeProperty(t);
|
|
4035
|
-
};
|
|
4036
4193
|
}, [
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
E.sizes
|
|
4194
|
+
u,
|
|
4195
|
+
h,
|
|
4196
|
+
P
|
|
4041
4197
|
]);
|
|
4042
|
-
let
|
|
4043
|
-
|
|
4198
|
+
let L = D && b && bt(y) ? y : null, R = c(null);
|
|
4199
|
+
i(() => {
|
|
4200
|
+
if (typeof document > "u" || L === null) return;
|
|
4201
|
+
let e = Vi(L, E.sizes[L]);
|
|
4202
|
+
return R.current = e, () => {
|
|
4203
|
+
R.current = null, e.release();
|
|
4204
|
+
};
|
|
4205
|
+
}, [L]);
|
|
4206
|
+
let z = L === null ? null : E.sizes[L];
|
|
4207
|
+
i(() => {
|
|
4208
|
+
z !== null && R.current?.resize(z);
|
|
4209
|
+
}, [z]);
|
|
4210
|
+
let B = n((e) => {
|
|
4211
|
+
if (!bt(y)) return;
|
|
4044
4212
|
e.preventDefault();
|
|
4045
4213
|
let t = y, n = {
|
|
4046
4214
|
x: e.clientX,
|
|
4047
4215
|
y: e.clientY,
|
|
4048
4216
|
size: E.sizes[t]
|
|
4049
4217
|
}, r = (e) => {
|
|
4050
|
-
S(t,
|
|
4218
|
+
S(t, jt(t, Yi(t, n.size, e.clientX - n.x, e.clientY - n.y)));
|
|
4051
4219
|
}, i = () => {
|
|
4052
|
-
window.removeEventListener("pointermove", r), window.removeEventListener("pointerup", i), window.removeEventListener("pointercancel", i),
|
|
4220
|
+
window.removeEventListener("pointermove", r), window.removeEventListener("pointerup", i), window.removeEventListener("pointercancel", i), Qi();
|
|
4053
4221
|
};
|
|
4054
|
-
window.addEventListener("pointermove", r), window.addEventListener("pointerup", i), window.addEventListener("pointercancel", i),
|
|
4222
|
+
window.addEventListener("pointermove", r), window.addEventListener("pointerup", i), window.addEventListener("pointercancel", i), Zi(t === "left" || t === "right" ? "col-resize" : "row-resize");
|
|
4055
4223
|
}, [
|
|
4056
4224
|
y,
|
|
4057
4225
|
E.sizes,
|
|
4058
4226
|
S
|
|
4059
|
-
]),
|
|
4060
|
-
if (y !== "window" ||
|
|
4227
|
+
]), re = n((e) => {
|
|
4228
|
+
if (y !== "window" || $i(e.target)) return;
|
|
4061
4229
|
e.preventDefault();
|
|
4062
4230
|
let t = {
|
|
4063
4231
|
x: e.clientX,
|
|
4064
4232
|
y: e.clientY,
|
|
4065
4233
|
rect: E.window
|
|
4066
4234
|
}, n = (e) => {
|
|
4067
|
-
C(
|
|
4235
|
+
C(Mt({
|
|
4068
4236
|
...t.rect,
|
|
4069
4237
|
x: t.rect.x + (e.clientX - t.x),
|
|
4070
4238
|
y: t.rect.y + (e.clientY - t.y)
|
|
4071
4239
|
}));
|
|
4072
4240
|
}, r = () => {
|
|
4073
|
-
window.removeEventListener("pointermove", n), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", r),
|
|
4241
|
+
window.removeEventListener("pointermove", n), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", r), Qi();
|
|
4074
4242
|
};
|
|
4075
|
-
window.addEventListener("pointermove", n), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", r),
|
|
4243
|
+
window.addEventListener("pointermove", n), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", r), Zi(null);
|
|
4076
4244
|
}, [
|
|
4077
4245
|
y,
|
|
4078
4246
|
E.window,
|
|
4079
4247
|
C
|
|
4080
|
-
]),
|
|
4248
|
+
]), V = n((e) => {
|
|
4081
4249
|
if (y !== "window") return;
|
|
4082
4250
|
e.preventDefault();
|
|
4083
4251
|
let t = {
|
|
@@ -4085,75 +4253,130 @@ var Z = () => r(en), nn = (e, t) => {
|
|
|
4085
4253
|
y: e.clientY,
|
|
4086
4254
|
rect: E.window
|
|
4087
4255
|
}, n = (e) => {
|
|
4088
|
-
C(
|
|
4256
|
+
C(Mt({
|
|
4089
4257
|
...t.rect,
|
|
4090
4258
|
w: t.rect.w + (e.clientX - t.x),
|
|
4091
4259
|
h: t.rect.h + (e.clientY - t.y)
|
|
4092
4260
|
}));
|
|
4093
4261
|
}, r = () => {
|
|
4094
|
-
window.removeEventListener("pointermove", n), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", r),
|
|
4262
|
+
window.removeEventListener("pointermove", n), window.removeEventListener("pointerup", r), window.removeEventListener("pointercancel", r), Qi();
|
|
4095
4263
|
};
|
|
4096
|
-
window.addEventListener("pointermove", n), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", r),
|
|
4264
|
+
window.addEventListener("pointermove", n), window.addEventListener("pointerup", r), window.addEventListener("pointercancel", r), Zi("nwse-resize");
|
|
4097
4265
|
}, [
|
|
4098
4266
|
y,
|
|
4099
4267
|
E.window,
|
|
4100
4268
|
C
|
|
4101
|
-
]),
|
|
4102
|
-
|
|
4269
|
+
]), [ie, ae] = l(null), oe = c(!1), se = n((e) => {
|
|
4270
|
+
if (e.button !== 0) return;
|
|
4271
|
+
let t = e.currentTarget.getBoundingClientRect(), n = {
|
|
4272
|
+
x: e.clientX,
|
|
4273
|
+
y: e.clientY,
|
|
4274
|
+
placement: a.capsule,
|
|
4275
|
+
size: {
|
|
4276
|
+
w: t.width,
|
|
4277
|
+
h: t.height
|
|
4278
|
+
}
|
|
4279
|
+
}, r = !1, i = (e) => {
|
|
4280
|
+
let t = e.clientX - n.x, i = e.clientY - n.y;
|
|
4281
|
+
if (!r) {
|
|
4282
|
+
if (Math.hypot(t, i) < 4) return;
|
|
4283
|
+
r = !0, oe.current = !0, ae(n.size), Zi("grabbing");
|
|
4284
|
+
}
|
|
4285
|
+
T(mt(n.placement, n.size, {
|
|
4286
|
+
width: window.innerWidth,
|
|
4287
|
+
height: window.innerHeight
|
|
4288
|
+
}, t, i));
|
|
4289
|
+
}, o = () => {
|
|
4290
|
+
window.removeEventListener("pointermove", i), window.removeEventListener("pointerup", o), window.removeEventListener("pointercancel", o), r && (ae(null), Qi(), setTimeout(() => {
|
|
4291
|
+
oe.current = !1;
|
|
4292
|
+
}, 0));
|
|
4293
|
+
};
|
|
4294
|
+
window.addEventListener("pointermove", i), window.addEventListener("pointerup", o), window.addEventListener("pointercancel", o);
|
|
4295
|
+
}, [a.capsule, T]), ce = n(() => d(!1), []), le = n(() => {
|
|
4296
|
+
if (oe.current) {
|
|
4297
|
+
oe.current = !1;
|
|
4298
|
+
return;
|
|
4299
|
+
}
|
|
4300
|
+
d(!0);
|
|
4301
|
+
}, []), ue = y === "external", H = D ? /* @__PURE__ */ N("section", {
|
|
4302
|
+
ref: te,
|
|
4303
|
+
className: "vdt-console",
|
|
4304
|
+
role: "dialog",
|
|
4305
|
+
"aria-label": r.brand,
|
|
4306
|
+
"data-dock": y,
|
|
4307
|
+
"data-closing": k ? "true" : void 0,
|
|
4308
|
+
inert: k,
|
|
4309
|
+
style: qi(E),
|
|
4310
|
+
children: [
|
|
4311
|
+
bt(y) ? /* @__PURE__ */ M("div", {
|
|
4312
|
+
className: "vdt-grip",
|
|
4313
|
+
role: "separator",
|
|
4314
|
+
"aria-label": r.resizeLabel,
|
|
4315
|
+
"aria-orientation": y === "left" || y === "right" ? "vertical" : "horizontal",
|
|
4316
|
+
onPointerDown: B
|
|
4317
|
+
}) : null,
|
|
4318
|
+
/* @__PURE__ */ M(ki, {
|
|
4319
|
+
onError: Xi,
|
|
4320
|
+
children: /* @__PURE__ */ M(Di, {
|
|
4321
|
+
dock: y,
|
|
4322
|
+
push: b,
|
|
4323
|
+
onDock: x,
|
|
4324
|
+
onPush: w,
|
|
4325
|
+
onClose: ce,
|
|
4326
|
+
scope: f,
|
|
4327
|
+
onScope: p,
|
|
4328
|
+
searchRef: m,
|
|
4329
|
+
onHeaderPointerDown: y === "window" ? re : void 0
|
|
4330
|
+
})
|
|
4331
|
+
}),
|
|
4332
|
+
y === "window" ? /* @__PURE__ */ M("div", {
|
|
4333
|
+
className: "vdt-win-resize",
|
|
4334
|
+
role: "separator",
|
|
4335
|
+
"aria-label": r.resizeLabel,
|
|
4336
|
+
onPointerDown: V
|
|
4337
|
+
}) : null
|
|
4338
|
+
]
|
|
4339
|
+
}) : null;
|
|
4340
|
+
return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(Fi, { children: /* @__PURE__ */ M("div", {
|
|
4103
4341
|
className: "vdt-host",
|
|
4104
|
-
"data-open":
|
|
4342
|
+
"data-open": u ? "true" : "false",
|
|
4105
4343
|
"data-dock": y,
|
|
4106
|
-
"data-push":
|
|
4107
|
-
children: /* @__PURE__ */
|
|
4344
|
+
"data-push": L === null ? "false" : "true",
|
|
4345
|
+
children: /* @__PURE__ */ M("div", {
|
|
4108
4346
|
className: "vdt-scope",
|
|
4109
|
-
children: D ? /* @__PURE__ */
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
className: "vdt-grip",
|
|
4121
|
-
role: "separator",
|
|
4122
|
-
"aria-label": r.resizeLabel,
|
|
4123
|
-
"aria-orientation": y === "left" || y === "right" ? "vertical" : "horizontal",
|
|
4124
|
-
onPointerDown: M
|
|
4125
|
-
}) : null,
|
|
4126
|
-
/* @__PURE__ */ N(yi, {
|
|
4127
|
-
onError: Ni,
|
|
4128
|
-
children: /* @__PURE__ */ N(_i, {
|
|
4129
|
-
dock: y,
|
|
4130
|
-
push: b,
|
|
4131
|
-
onDock: x,
|
|
4132
|
-
onPush: w,
|
|
4133
|
-
onClose: F,
|
|
4134
|
-
scope: f,
|
|
4135
|
-
onScope: p,
|
|
4136
|
-
searchRef: m,
|
|
4137
|
-
onHeaderPointerDown: y === "window" ? te : void 0
|
|
4138
|
-
})
|
|
4139
|
-
}),
|
|
4140
|
-
y === "window" ? /* @__PURE__ */ N("div", {
|
|
4141
|
-
className: "vdt-win-resize",
|
|
4142
|
-
role: "separator",
|
|
4143
|
-
"aria-label": r.resizeLabel,
|
|
4144
|
-
onPointerDown: ne
|
|
4145
|
-
}) : null
|
|
4146
|
-
]
|
|
4147
|
-
}) : /* @__PURE__ */ N(yi, {
|
|
4148
|
-
onError: Ni,
|
|
4149
|
-
children: /* @__PURE__ */ N(st, {
|
|
4347
|
+
children: D ? ue ? null : H : /* @__PURE__ */ N(ki, {
|
|
4348
|
+
onError: Xi,
|
|
4349
|
+
children: [ie === null ? null : /* @__PURE__ */ M("div", {
|
|
4350
|
+
className: "vdt-capsule-slots",
|
|
4351
|
+
"aria-hidden": "true",
|
|
4352
|
+
children: lt.map((e) => /* @__PURE__ */ M("span", {
|
|
4353
|
+
className: "vdt-capsule-slot",
|
|
4354
|
+
"data-active": ft(e, a.capsule) ? "true" : void 0,
|
|
4355
|
+
style: Ji(e, ie)
|
|
4356
|
+
}, `${e.x}:${e.y}`))
|
|
4357
|
+
}), /* @__PURE__ */ M(st, {
|
|
4150
4358
|
status: v,
|
|
4151
|
-
onOpen:
|
|
4152
|
-
buttonRef:
|
|
4153
|
-
|
|
4359
|
+
onOpen: le,
|
|
4360
|
+
buttonRef: A,
|
|
4361
|
+
style: Ji(a.capsule),
|
|
4362
|
+
dragging: ie !== null,
|
|
4363
|
+
onPointerDown: se
|
|
4364
|
+
})]
|
|
4365
|
+
})
|
|
4366
|
+
})
|
|
4367
|
+
}) }), ue && P !== null ? /* @__PURE__ */ M(Fi, {
|
|
4368
|
+
target: P.document,
|
|
4369
|
+
children: /* @__PURE__ */ M("div", {
|
|
4370
|
+
className: "vdt-host",
|
|
4371
|
+
"data-open": "true",
|
|
4372
|
+
"data-dock": "external",
|
|
4373
|
+
"data-push": "false",
|
|
4374
|
+
children: /* @__PURE__ */ M("div", {
|
|
4375
|
+
className: "vdt-scope",
|
|
4376
|
+
children: H
|
|
4154
4377
|
})
|
|
4155
4378
|
})
|
|
4156
|
-
}) });
|
|
4379
|
+
}) : null] });
|
|
4157
4380
|
};
|
|
4158
4381
|
//#endregion
|
|
4159
|
-
export { Be as DevtoolsStringsProvider,
|
|
4382
|
+
export { Be as DevtoolsStringsProvider, Ki as VoltroDevtools, Le as defaultDevtoolsStrings, U as useDevtoolsStrings };
|