@statezero/core 0.2.45 → 0.2.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adaptors/vue/components/LayoutRenderer.d.ts +1 -0
- package/dist/adaptors/vue/components/StateZeroDebugPanel.d.ts +1 -0
- package/dist/adaptors/vue/components/StateZeroDebugPanel.js +781 -0
- package/dist/adaptors/vue/components/defaults/AlertElement.d.ts +1 -0
- package/dist/adaptors/vue/components/defaults/DisplayElement.d.ts +1 -0
- package/dist/adaptors/vue/components/defaults/DividerElement.d.ts +1 -0
- package/dist/adaptors/vue/components/defaults/ErrorBlock.d.ts +1 -0
- package/dist/adaptors/vue/components/defaults/GroupElement.d.ts +1 -0
- package/dist/adaptors/vue/components/defaults/LabelElement.d.ts +1 -0
- package/dist/adaptors/vue/components/defaults/TabsElement.d.ts +1 -0
- package/dist/adaptors/vue/components/defaults/index.d.ts +7 -0
- package/dist/adaptors/vue/components/index.d.ts +2 -0
- package/dist/adaptors/vue/components/index.js +1 -0
- package/dist/adaptors/vue/composables.js +0 -1
- package/dist/adaptors/vue/index.d.ts +1 -1
- package/dist/adaptors/vue/index.js +1 -1
- package/dist/config.js +11 -1
- package/dist/core/eventReceivers.d.ts +3 -3
- package/dist/core/eventReceivers.js +6 -3
- package/dist/core.css +1 -0
- package/dist/debug/statezeroDebug.d.ts +8 -0
- package/dist/debug/statezeroDebug.js +118 -0
- package/dist/flavours/django/errors.js +0 -1
- package/dist/flavours/django/makeApiCall.js +71 -0
- package/dist/reset.js +0 -2
- package/dist/syncEngine/cache/cache.js +0 -1
- package/dist/syncEngine/registries/querysetStoreRegistry.d.ts +1 -1
- package/dist/syncEngine/registries/querysetStoreRegistry.js +45 -3
- package/dist/syncEngine/stores/metricStore.js +0 -4
- package/dist/syncEngine/stores/modelStore.js +0 -3
- package/dist/syncEngine/stores/operation.js +0 -1
- package/dist/syncEngine/stores/operationEventHandlers.js +87 -2
- package/dist/syncEngine/stores/querysetStore.d.ts +1 -1
- package/dist/syncEngine/stores/querysetStore.js +58 -5
- package/dist/syncEngine/sync.d.ts +2 -0
- package/dist/syncEngine/sync.js +17 -11
- package/dist/vue-entry.d.ts +2 -1
- package/dist/vue-entry.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,781 @@
|
|
|
1
|
+
import { ref as f, computed as d, onMounted as qe, onBeforeUnmount as Me, watch as G, createElementBlock as a, openBlock as o, createElementVNode as t, createVNode as ue, toDisplayString as n, createCommentVNode as _, Fragment as y, renderList as w, normalizeClass as ce, normalizeStyle as W, withDirectives as q, createTextVNode as M, vModelCheckbox as ve, vModelSelect as _e, Transition as pe, withCtx as me } from "vue";
|
|
2
|
+
import { querysets as Ie } from "../../../../composables.js";
|
|
3
|
+
import { querysetStoreRegistry as Y } from "../../../../../../syncEngine/registries/querysetStoreRegistry.js";
|
|
4
|
+
import { getDebugEntries as ze, startStateZeroDebug as Ve, setDebugMaxEntries as fe, subscribeDebugEvents as Qe, subscribeDebugClear as Re, clearDebugEntries as Le } from "../../../../../../debug/statezeroDebug.js";
|
|
5
|
+
const je = (D, c) => {
|
|
6
|
+
const g = D.__vccOpts || D;
|
|
7
|
+
for (const [I, S] of c)
|
|
8
|
+
g[I] = S;
|
|
9
|
+
return g;
|
|
10
|
+
}, Be = { class: "szd" }, Ue = { class: "szd-header" }, Je = { class: "szd-header__top" }, He = { class: "szd-header__left" }, Ze = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "szd-header__model"
|
|
13
|
+
}, Ge = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "szd-header__model szd-header__model--empty"
|
|
16
|
+
}, We = { class: "szd-header__right" }, Ye = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "szd-header__badge szd-header__badge--syncing"
|
|
19
|
+
}, Xe = {
|
|
20
|
+
key: 1,
|
|
21
|
+
class: "szd-header__badge"
|
|
22
|
+
}, es = { class: "szd-header__badge" }, ss = { class: "szd-tabs" }, ts = ["onClick"], ls = { class: "szd-content" }, ns = {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: "szd-panel"
|
|
25
|
+
}, as = { class: "szd-panel__section" }, os = { class: "szd-kv" }, is = { class: "szd-kv__row" }, ds = { class: "szd-kv__value" }, rs = { class: "szd-kv__row" }, us = { class: "szd-kv__value" }, cs = { class: "szd-kv__row" }, vs = { class: "szd-kv__value" }, _s = { class: "szd-kv__row" }, ps = { class: "szd-kv__value" }, ms = { class: "szd-panel__section" }, zs = { class: "szd-stats" }, fs = { class: "szd-stat" }, ys = { class: "szd-stat__value" }, gs = { class: "szd-stat" }, hs = { class: "szd-stat__value" }, ks = { class: "szd-stat" }, bs = { class: "szd-stat__value" }, Ss = { class: "szd-stat" }, Cs = { class: "szd-stat__value" }, ws = {
|
|
26
|
+
class: "szd-kv",
|
|
27
|
+
style: { "margin-top": "12px" }
|
|
28
|
+
}, Ts = { class: "szd-kv__row" }, Ns = { class: "szd-kv__value" }, Ks = {
|
|
29
|
+
key: 0,
|
|
30
|
+
class: "szd-panel__section"
|
|
31
|
+
}, $s = { class: "szd-event-preview__text" }, As = { class: "szd-event-preview__time" }, Es = {
|
|
32
|
+
key: 1,
|
|
33
|
+
class: "szd-panel"
|
|
34
|
+
}, xs = { class: "szd-timeline-filters" }, Ds = ["onUpdate:modelValue"], Os = { class: "szd-timeline" }, Fs = ["onClick"], Ps = { class: "szd-timeline__time" }, qs = { class: "szd-timeline__text" }, Ms = {
|
|
35
|
+
key: 0,
|
|
36
|
+
class: "szd-empty"
|
|
37
|
+
}, Is = {
|
|
38
|
+
key: 2,
|
|
39
|
+
class: "szd-panel"
|
|
40
|
+
}, Vs = { class: "szd-pipeline" }, Qs = ["onClick"], Rs = { class: "szd-pipeline__label" }, Ls = { class: "szd-pipeline__count" }, js = {
|
|
41
|
+
key: 0,
|
|
42
|
+
class: "szd-pipeline__arrow"
|
|
43
|
+
}, Bs = {
|
|
44
|
+
class: "szd-panel__section",
|
|
45
|
+
style: { "margin-top": "20px" }
|
|
46
|
+
}, Us = { class: "szd-preview-header" }, Js = ["value"], Hs = {
|
|
47
|
+
key: 0,
|
|
48
|
+
class: "szd-data-grid"
|
|
49
|
+
}, Zs = { class: "szd-data-card__header" }, Gs = {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: "szd-data-card__badge"
|
|
52
|
+
}, Ws = {
|
|
53
|
+
key: 1,
|
|
54
|
+
class: "szd-data-card__badge szd-data-card__badge--absent"
|
|
55
|
+
}, Ys = { class: "szd-data-card__content" }, Xs = {
|
|
56
|
+
key: 1,
|
|
57
|
+
class: "szd-empty"
|
|
58
|
+
}, et = {
|
|
59
|
+
key: 3,
|
|
60
|
+
class: "szd-panel"
|
|
61
|
+
}, st = {
|
|
62
|
+
class: "szd-kv",
|
|
63
|
+
style: { "margin-bottom": "16px" }
|
|
64
|
+
}, tt = { class: "szd-kv__row" }, lt = { class: "szd-kv__value szd-kv__value--mono" }, nt = { class: "szd-ast" }, at = {
|
|
65
|
+
key: 0,
|
|
66
|
+
class: "szd-detail"
|
|
67
|
+
}, ot = { class: "szd-detail__panel szd-detail__panel--sm" }, it = { class: "szd-detail__header" }, dt = { class: "szd-detail__body" }, rt = { class: "szd-settings-section" }, ut = ["value"], ct = {
|
|
68
|
+
key: 0,
|
|
69
|
+
class: "szd-settings-section"
|
|
70
|
+
}, vt = { class: "szd-settings-row" }, _t = { class: "szd-settings-code" }, pt = { class: "szd-settings-section" }, mt = { class: "szd-settings-actions" }, zt = ["disabled"], ft = { class: "szd-settings-section" }, yt = { class: "szd-toggle" }, gt = {
|
|
71
|
+
key: 1,
|
|
72
|
+
class: "szd-settings-section"
|
|
73
|
+
}, ht = { class: "szd-kv" }, kt = { class: "szd-kv__row" }, bt = { class: "szd-kv__value" }, St = { class: "szd-kv__row" }, Ct = { class: "szd-kv__value" }, wt = { class: "szd-kv__row" }, Tt = { class: "szd-kv__value" }, Nt = { class: "szd-kv__row" }, Kt = { class: "szd-kv__value" }, $t = { class: "szd-kv__row" }, At = { class: "szd-kv__value" }, Et = {
|
|
74
|
+
key: 0,
|
|
75
|
+
class: "szd-detail"
|
|
76
|
+
}, xt = { class: "szd-detail__panel" }, Dt = { class: "szd-detail__header" }, Ot = { class: "szd-detail__title" }, Ft = { class: "szd-detail__body" }, Pt = { class: "szd-kv" }, qt = { class: "szd-kv__key" }, Mt = { class: "szd-kv__value" }, It = { class: "szd-ast" }, Vt = {
|
|
77
|
+
class: "szd-kv",
|
|
78
|
+
style: { "margin-bottom": "16px" }
|
|
79
|
+
}, Qt = { class: "szd-kv__row" }, Rt = { class: "szd-kv__value" }, Lt = { class: "szd-kv__row" }, jt = { class: "szd-kv__value" }, Bt = {
|
|
80
|
+
key: 0,
|
|
81
|
+
class: "szd-kv__note"
|
|
82
|
+
}, Ut = { class: "szd-ast" }, ye = 100, Jt = {
|
|
83
|
+
__name: "StateZeroDebugPanel",
|
|
84
|
+
props: {
|
|
85
|
+
queryset: { type: [Object, String], default: null },
|
|
86
|
+
useQueryset: { type: Boolean, default: !1 },
|
|
87
|
+
maxEntries: { type: Number, default: 500 },
|
|
88
|
+
sampleSize: { type: Number, default: 5 }
|
|
89
|
+
},
|
|
90
|
+
setup(D) {
|
|
91
|
+
const c = D, g = f("overview"), I = [
|
|
92
|
+
{ id: "overview", label: "Overview" },
|
|
93
|
+
{ id: "timeline", label: "Timeline" },
|
|
94
|
+
{ id: "data", label: "Data" },
|
|
95
|
+
{ id: "ast", label: "AST" }
|
|
96
|
+
], S = f(""), X = f(c.useQueryset), V = f(!0), v = f(ze()), N = f(0), x = f(!1), r = f(null), O = f(!1), h = f(null), T = f({
|
|
97
|
+
request: !0,
|
|
98
|
+
response: !0,
|
|
99
|
+
render: !0,
|
|
100
|
+
operation: !0,
|
|
101
|
+
event: !0,
|
|
102
|
+
sync: !0,
|
|
103
|
+
routing: !0,
|
|
104
|
+
groupSync: !0,
|
|
105
|
+
error: !0
|
|
106
|
+
});
|
|
107
|
+
function ge(s, e) {
|
|
108
|
+
if (!s) return null;
|
|
109
|
+
let l = s;
|
|
110
|
+
return e && l && typeof l == "object" && "value" in l && (l = l.value), l?.original?.queryset ? l.original.queryset : l?.queryset ? l.queryset : l?.semanticKey ? l : null;
|
|
111
|
+
}
|
|
112
|
+
const F = d(
|
|
113
|
+
() => ge(c.queryset, X.value)
|
|
114
|
+
), ee = d(() => {
|
|
115
|
+
N.value;
|
|
116
|
+
const s = [];
|
|
117
|
+
return Ie.forEach((e) => {
|
|
118
|
+
e?.semanticKey && s.push({
|
|
119
|
+
semanticKey: e.semanticKey,
|
|
120
|
+
modelName: e.ModelClass?.modelName,
|
|
121
|
+
configKey: e.ModelClass?.configKey,
|
|
122
|
+
queryset: e
|
|
123
|
+
});
|
|
124
|
+
}), s;
|
|
125
|
+
}), he = d(() => (N.value, Array.from(Y._stores.entries()).map(
|
|
126
|
+
([s, e]) => ({
|
|
127
|
+
semanticKey: s,
|
|
128
|
+
modelName: e?.modelClass?.modelName,
|
|
129
|
+
configKey: e?.modelClass?.configKey,
|
|
130
|
+
store: e
|
|
131
|
+
})
|
|
132
|
+
))), ke = d(() => {
|
|
133
|
+
const s = /* @__PURE__ */ new Map();
|
|
134
|
+
return ee.value.forEach((e) => {
|
|
135
|
+
s.set(e.semanticKey, e.queryset);
|
|
136
|
+
}), s;
|
|
137
|
+
}), be = d(() => {
|
|
138
|
+
const s = /* @__PURE__ */ new Map();
|
|
139
|
+
return ee.value.forEach((e) => {
|
|
140
|
+
s.set(e.semanticKey, e);
|
|
141
|
+
}), he.value.forEach((e) => {
|
|
142
|
+
s.has(e.semanticKey) || s.set(e.semanticKey, e);
|
|
143
|
+
}), Array.from(s.values());
|
|
144
|
+
}), p = d(() => F.value?.semanticKey ? F.value.semanticKey : S.value ? S.value : ""), K = d(() => F.value ? F.value : S.value && ke.value.get(S.value) || null), k = d(() => {
|
|
145
|
+
if (K.value)
|
|
146
|
+
try {
|
|
147
|
+
return Y.getStore(K.value);
|
|
148
|
+
} catch {
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
return p.value && Y._stores.get(p.value) || null;
|
|
152
|
+
}), u = d(() => {
|
|
153
|
+
N.value;
|
|
154
|
+
const s = k.value, e = K.value, l = s?.modelClass?.modelName || e?.ModelClass?.modelName, i = s?.modelClass?.configKey || e?.ModelClass?.configKey, m = s?.groundTruthPks?.length ?? 0, b = s?.operationsMap?.size ?? 0, C = s?.getInflightOperations?.() || [], E = s?.isSyncing ?? !1, P = s?.lastSync ? new Date(s.lastSync).toLocaleString() : "—", Z = s && Array.isArray(s._lastRenderedPks) ? s._lastRenderedPks.length : null, Oe = s?.groundTruthPks?.length ?? 0, Fe = s ? s.lastSync === null ? "model store" : "ground truth" : "—", Pe = E ? "Sync in progress — results may change." : b > 0 ? "Optimistic operations are applied to results." : s?.lastSync === null ? "No ground truth yet — rendering from model store." : "Using ground truth + local filters.";
|
|
155
|
+
return {
|
|
156
|
+
modelName: l,
|
|
157
|
+
configKey: i,
|
|
158
|
+
groundTruthCount: m,
|
|
159
|
+
opsCount: b,
|
|
160
|
+
inFlightCount: C.length,
|
|
161
|
+
isSyncing: E,
|
|
162
|
+
lastSync: P,
|
|
163
|
+
optimisticCount: Z,
|
|
164
|
+
confirmedCount: Oe,
|
|
165
|
+
source: Fe,
|
|
166
|
+
reason: Pe
|
|
167
|
+
};
|
|
168
|
+
}), Q = d(() => {
|
|
169
|
+
N.value;
|
|
170
|
+
try {
|
|
171
|
+
return k.value?.queryset?.build?.() || null;
|
|
172
|
+
} catch (s) {
|
|
173
|
+
return { error: s?.message || "Failed to build AST" };
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
function Se(s) {
|
|
177
|
+
if (!s?.filter?.conditions) return "—";
|
|
178
|
+
const e = s.filter.conditions;
|
|
179
|
+
return typeof e != "object" ? String(e) : Object.entries(e).map(([i, m]) => m === null ? `${i}: null` : typeof m == "object" ? `${i}: ${JSON.stringify(m)}` : `${i}: ${m}`).join(", ");
|
|
180
|
+
}
|
|
181
|
+
function Ce(s) {
|
|
182
|
+
const e = s?.orderBy;
|
|
183
|
+
return !e || Array.isArray(e) && e.length === 0 ? "—" : Array.isArray(e) ? e.join(", ") : String(e);
|
|
184
|
+
}
|
|
185
|
+
const R = d(() => {
|
|
186
|
+
const s = Q.value;
|
|
187
|
+
return {
|
|
188
|
+
filter: Se(s),
|
|
189
|
+
orderBy: Ce(s),
|
|
190
|
+
limit: s?.serializerOptions?.limit ?? "—"
|
|
191
|
+
};
|
|
192
|
+
});
|
|
193
|
+
function $(s, e, l, i) {
|
|
194
|
+
if (!s || !Array.isArray(l)) return [];
|
|
195
|
+
const m = [];
|
|
196
|
+
for (const b of l.slice(0, i))
|
|
197
|
+
try {
|
|
198
|
+
const C = s.fromPk(b, e);
|
|
199
|
+
C && m.push(C.serialize());
|
|
200
|
+
} catch {
|
|
201
|
+
}
|
|
202
|
+
return m;
|
|
203
|
+
}
|
|
204
|
+
const z = d(() => {
|
|
205
|
+
N.value;
|
|
206
|
+
const s = k.value, e = K.value;
|
|
207
|
+
if (!s || !e)
|
|
208
|
+
return {
|
|
209
|
+
modelStoreFiltered: [],
|
|
210
|
+
groundTruth: [],
|
|
211
|
+
optimistic: [],
|
|
212
|
+
filtered: [],
|
|
213
|
+
final: [],
|
|
214
|
+
modelStoreSample: [],
|
|
215
|
+
groundTruthSample: [],
|
|
216
|
+
optimisticSample: [],
|
|
217
|
+
filteredSample: [],
|
|
218
|
+
finalSample: [],
|
|
219
|
+
limit: null
|
|
220
|
+
};
|
|
221
|
+
const l = Array.isArray(s.groundTruthPks) ? [...s.groundTruthPks] : [], i = s.renderFromData(!0), m = s.renderFromData(!1), b = s._getValidatedAndFilteredPks(i), C = s.lastSync === null ? s.renderFromModelStore() : [], E = e.build()?.serializerOptions?.limit ?? null, P = E ? b.slice(0, E) : b, Z = C.length > 0 ? $(
|
|
222
|
+
s.modelClass,
|
|
223
|
+
e,
|
|
224
|
+
C,
|
|
225
|
+
c.sampleSize
|
|
226
|
+
) : [];
|
|
227
|
+
return {
|
|
228
|
+
modelStoreFiltered: C,
|
|
229
|
+
groundTruth: l,
|
|
230
|
+
optimistic: i,
|
|
231
|
+
filtered: b,
|
|
232
|
+
final: P,
|
|
233
|
+
modelStoreSample: Z,
|
|
234
|
+
groundTruthSample: $(
|
|
235
|
+
s.modelClass,
|
|
236
|
+
e,
|
|
237
|
+
l,
|
|
238
|
+
c.sampleSize
|
|
239
|
+
),
|
|
240
|
+
optimisticSample: $(
|
|
241
|
+
s.modelClass,
|
|
242
|
+
e,
|
|
243
|
+
i,
|
|
244
|
+
c.sampleSize
|
|
245
|
+
),
|
|
246
|
+
filteredSample: $(
|
|
247
|
+
s.modelClass,
|
|
248
|
+
e,
|
|
249
|
+
b,
|
|
250
|
+
c.sampleSize
|
|
251
|
+
),
|
|
252
|
+
finalSample: $(
|
|
253
|
+
s.modelClass,
|
|
254
|
+
e,
|
|
255
|
+
P,
|
|
256
|
+
c.sampleSize
|
|
257
|
+
),
|
|
258
|
+
limit: E,
|
|
259
|
+
confirmed: m
|
|
260
|
+
};
|
|
261
|
+
}), L = d(() => [
|
|
262
|
+
{ id: "model-store", label: "Model Store", count: z.value.modelStoreFiltered.length, pks: z.value.modelStoreFiltered },
|
|
263
|
+
{ id: "ground-truth", label: "Ground Truth", count: z.value.groundTruth.length, pks: z.value.groundTruth },
|
|
264
|
+
{ id: "optimistic", label: "Optimistic", count: z.value.optimistic.length, pks: z.value.optimistic },
|
|
265
|
+
{ id: "filtered", label: "Filtered", count: z.value.filtered.length, pks: z.value.filtered },
|
|
266
|
+
{ id: "final", label: "Final", count: z.value.final.length, pks: z.value.final }
|
|
267
|
+
]), we = d(() => z.value.final || []);
|
|
268
|
+
function se(s) {
|
|
269
|
+
const e = k.value, l = K.value;
|
|
270
|
+
if (!e || !l || s == null) return null;
|
|
271
|
+
try {
|
|
272
|
+
const i = e.modelClass.fromPk(s, l);
|
|
273
|
+
return i ? i.serialize() : null;
|
|
274
|
+
} catch {
|
|
275
|
+
return null;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
d(() => h.value == null ? null : se(h.value));
|
|
279
|
+
const te = d(() => {
|
|
280
|
+
if (!r.value || r.value.type !== "snapshot") return [];
|
|
281
|
+
const s = r.value.data, e = k.value, l = K.value;
|
|
282
|
+
return !e || !l || !s.pks ? [] : $(e.modelClass, l, s.pks, ye);
|
|
283
|
+
}), Te = d(() => !r.value || r.value.type !== "snapshot" ? !1 : r.value.data.count > ye), Ne = d(() => {
|
|
284
|
+
if (!p.value) return v.value;
|
|
285
|
+
const s = k.value;
|
|
286
|
+
return v.value.filter((e) => e.semanticKey === p.value ? !0 : s ? e.modelName === s.modelClass?.modelName && e.configKey === s.modelClass?.configKey : !1);
|
|
287
|
+
}), le = d(() => Ne.value.filter((s) => T.value[s.type])), Ke = d(() => v.value.length), A = d(
|
|
288
|
+
() => v.value.length ? v.value[v.value.length - 1] : null
|
|
289
|
+
), ne = [
|
|
290
|
+
{ id: "request", label: "Requests", color: "#3b82f6" },
|
|
291
|
+
{ id: "response", label: "Responses", color: "#22c55e" },
|
|
292
|
+
{ id: "render", label: "Renders", color: "#a855f7" },
|
|
293
|
+
{ id: "operation", label: "Operations", color: "#f59e0b" },
|
|
294
|
+
{ id: "event", label: "Events", color: "#ec4899" },
|
|
295
|
+
{ id: "sync", label: "Sync", color: "#06b6d4" },
|
|
296
|
+
{ id: "routing", label: "Routing", color: "#64748b" },
|
|
297
|
+
{ id: "groupSync", label: "Group Sync", color: "#8b5cf6" },
|
|
298
|
+
{ id: "error", label: "Errors", color: "#ef4444" }
|
|
299
|
+
];
|
|
300
|
+
function ae(s) {
|
|
301
|
+
return ne.find((e) => e.id === s)?.color || "#6b7280";
|
|
302
|
+
}
|
|
303
|
+
function j(s) {
|
|
304
|
+
if (!s) return "";
|
|
305
|
+
try {
|
|
306
|
+
return new Date(s).toLocaleTimeString();
|
|
307
|
+
} catch {
|
|
308
|
+
return "";
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
function oe(s) {
|
|
312
|
+
if (!s) return "";
|
|
313
|
+
switch (s.type) {
|
|
314
|
+
case "request":
|
|
315
|
+
return `${s.operationType} → ${s.modelName}`;
|
|
316
|
+
case "response":
|
|
317
|
+
return `${s.operationType} ← ${s.modelName} (${s.dataCount})`;
|
|
318
|
+
case "render":
|
|
319
|
+
return `${s.source} (${s.resultCount})`;
|
|
320
|
+
case "operation":
|
|
321
|
+
return `${s.subtype} ${s.operationType || ""}`;
|
|
322
|
+
case "event":
|
|
323
|
+
return `${s.eventType} (${s.instanceCount || 0})`;
|
|
324
|
+
case "sync":
|
|
325
|
+
return `${s.phase} (${s.dataCount || 0})`;
|
|
326
|
+
case "routing":
|
|
327
|
+
return `${s.decision || "route"} (opt:${s.optimistic ? "y" : "n"}, verify:${s.verify ? "y" : "n"})`;
|
|
328
|
+
case "groupSync":
|
|
329
|
+
return `${s.phase} ${s.iAmRoot ? "(root)" : ""}`;
|
|
330
|
+
case "error":
|
|
331
|
+
return s.message || "error";
|
|
332
|
+
default:
|
|
333
|
+
return s.type;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
function $e(s) {
|
|
337
|
+
if (!s) return null;
|
|
338
|
+
const e = {
|
|
339
|
+
type: s.type,
|
|
340
|
+
time: j(s.ts),
|
|
341
|
+
model: s.modelName,
|
|
342
|
+
config: s.configKey,
|
|
343
|
+
semanticKey: s.semanticKey
|
|
344
|
+
};
|
|
345
|
+
switch (s.type) {
|
|
346
|
+
case "request":
|
|
347
|
+
return { ...e, operation: s.operationType, url: s.url };
|
|
348
|
+
case "response":
|
|
349
|
+
return { ...e, operation: s.operationType, status: s.status, dataCount: s.dataCount, includedCount: s.includedCount };
|
|
350
|
+
case "render":
|
|
351
|
+
return { ...e, source: s.source, rawCount: s.rawCount, filteredCount: s.filteredCount, resultCount: s.resultCount, limit: s.limit, operationsCount: s.operationsCount };
|
|
352
|
+
case "operation":
|
|
353
|
+
return { ...e, operation: s.operationType, status: s.status, instanceCount: s.instanceCount };
|
|
354
|
+
case "event":
|
|
355
|
+
return { ...e, eventType: s.eventType, instanceCount: s.instanceCount, operationId: s.operationId };
|
|
356
|
+
case "routing":
|
|
357
|
+
return { ...e, operation: s.operationType, decision: s.decision, optimistic: s.optimistic, verify: s.verify };
|
|
358
|
+
case "groupSync":
|
|
359
|
+
return { ...e, phase: s.phase, rootKey: s.rootKey, iAmRoot: s.iAmRoot, dataCount: s.dataCount };
|
|
360
|
+
case "sync":
|
|
361
|
+
return { ...e, phase: s.phase, dataCount: s.dataCount, includedCount: s.includedCount };
|
|
362
|
+
case "error":
|
|
363
|
+
return { ...e, message: s.message, status: s.status };
|
|
364
|
+
default:
|
|
365
|
+
return e;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
function Ae() {
|
|
369
|
+
Le(), v.value = [];
|
|
370
|
+
}
|
|
371
|
+
function Ee() {
|
|
372
|
+
!p.value || !navigator?.clipboard || navigator.clipboard.writeText(p.value);
|
|
373
|
+
}
|
|
374
|
+
async function xe() {
|
|
375
|
+
if (!(!k.value || x.value)) {
|
|
376
|
+
x.value = !0;
|
|
377
|
+
try {
|
|
378
|
+
await k.value.sync();
|
|
379
|
+
} catch {
|
|
380
|
+
} finally {
|
|
381
|
+
x.value = !1;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
function ie(s) {
|
|
386
|
+
r.value = { type: "entry", data: s };
|
|
387
|
+
}
|
|
388
|
+
function De(s) {
|
|
389
|
+
r.value = { type: "snapshot", data: s };
|
|
390
|
+
}
|
|
391
|
+
function de() {
|
|
392
|
+
r.value = null;
|
|
393
|
+
}
|
|
394
|
+
function re(s) {
|
|
395
|
+
Object.keys(T.value).forEach((e) => {
|
|
396
|
+
T.value[e] = s;
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
let B = null, U = null, J = null, H = null;
|
|
400
|
+
return qe(() => {
|
|
401
|
+
Ve(), fe(c.maxEntries), B = Qe((s) => {
|
|
402
|
+
V.value && (v.value = [...v.value, s], v.value.length > c.maxEntries && (v.value = v.value.slice(-c.maxEntries)));
|
|
403
|
+
}), U = Re(() => {
|
|
404
|
+
v.value = [];
|
|
405
|
+
}), J = setInterval(() => {
|
|
406
|
+
N.value += 1;
|
|
407
|
+
}, 2e3), H = setInterval(() => {
|
|
408
|
+
v.value = ze();
|
|
409
|
+
}, 1e3);
|
|
410
|
+
}), Me(() => {
|
|
411
|
+
B && B(), U && U(), J && clearInterval(J), H && clearInterval(H);
|
|
412
|
+
}), G(
|
|
413
|
+
() => c.maxEntries,
|
|
414
|
+
(s) => fe(s)
|
|
415
|
+
), G(
|
|
416
|
+
() => c.useQueryset,
|
|
417
|
+
(s) => {
|
|
418
|
+
X.value = s;
|
|
419
|
+
}
|
|
420
|
+
), G(p, () => {
|
|
421
|
+
h.value = null;
|
|
422
|
+
}), (s, e) => (o(), a("section", Be, [
|
|
423
|
+
t("header", Ue, [
|
|
424
|
+
t("div", Je, [
|
|
425
|
+
t("div", He, [
|
|
426
|
+
e[9] || (e[9] = t("div", { class: "szd-header__title" }, "StateZero", -1)),
|
|
427
|
+
p.value ? (o(), a("span", Ze, n(u.value.modelName || "?"), 1)) : (o(), a("span", Ge, "No queryset"))
|
|
428
|
+
]),
|
|
429
|
+
t("div", We, [
|
|
430
|
+
u.value.isSyncing ? (o(), a("span", Ye, "Syncing")) : _("", !0),
|
|
431
|
+
u.value.opsCount > 0 ? (o(), a("span", Xe, n(u.value.opsCount) + " ops", 1)) : _("", !0),
|
|
432
|
+
t("span", es, n(Ke.value) + " events", 1),
|
|
433
|
+
t("button", {
|
|
434
|
+
class: "szd-btn szd-btn--icon",
|
|
435
|
+
onClick: e[0] || (e[0] = (l) => O.value = !0),
|
|
436
|
+
title: "Settings"
|
|
437
|
+
}, [...e[10] || (e[10] = [
|
|
438
|
+
t("svg", {
|
|
439
|
+
width: "16",
|
|
440
|
+
height: "16",
|
|
441
|
+
viewBox: "0 0 24 24",
|
|
442
|
+
fill: "none",
|
|
443
|
+
stroke: "currentColor",
|
|
444
|
+
"stroke-width": "2"
|
|
445
|
+
}, [
|
|
446
|
+
t("circle", {
|
|
447
|
+
cx: "12",
|
|
448
|
+
cy: "12",
|
|
449
|
+
r: "3"
|
|
450
|
+
}),
|
|
451
|
+
t("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })
|
|
452
|
+
], -1)
|
|
453
|
+
])])
|
|
454
|
+
])
|
|
455
|
+
]),
|
|
456
|
+
t("nav", ss, [
|
|
457
|
+
(o(), a(y, null, w(I, (l) => t("button", {
|
|
458
|
+
key: l.id,
|
|
459
|
+
class: ce(["szd-tabs__tab", { "szd-tabs__tab--active": g.value === l.id }]),
|
|
460
|
+
onClick: (i) => g.value = l.id
|
|
461
|
+
}, n(l.label), 11, ts)), 64))
|
|
462
|
+
])
|
|
463
|
+
]),
|
|
464
|
+
t("main", ls, [
|
|
465
|
+
g.value === "overview" ? (o(), a("div", ns, [
|
|
466
|
+
t("div", as, [
|
|
467
|
+
e[15] || (e[15] = t("h3", { class: "szd-panel__heading" }, "Why This View?", -1)),
|
|
468
|
+
t("div", os, [
|
|
469
|
+
t("div", is, [
|
|
470
|
+
e[11] || (e[11] = t("span", { class: "szd-kv__key" }, "Filter:", -1)),
|
|
471
|
+
t("span", ds, n(R.value.filter), 1)
|
|
472
|
+
]),
|
|
473
|
+
t("div", rs, [
|
|
474
|
+
e[12] || (e[12] = t("span", { class: "szd-kv__key" }, "Order:", -1)),
|
|
475
|
+
t("span", us, n(R.value.orderBy), 1)
|
|
476
|
+
]),
|
|
477
|
+
t("div", cs, [
|
|
478
|
+
e[13] || (e[13] = t("span", { class: "szd-kv__key" }, "Limit:", -1)),
|
|
479
|
+
t("span", vs, n(R.value.limit), 1)
|
|
480
|
+
]),
|
|
481
|
+
t("div", _s, [
|
|
482
|
+
e[14] || (e[14] = t("span", { class: "szd-kv__key" }, "Reason:", -1)),
|
|
483
|
+
t("span", ps, n(u.value.reason), 1)
|
|
484
|
+
])
|
|
485
|
+
])
|
|
486
|
+
]),
|
|
487
|
+
t("div", ms, [
|
|
488
|
+
e[21] || (e[21] = t("h3", { class: "szd-panel__heading" }, "Current State", -1)),
|
|
489
|
+
t("div", zs, [
|
|
490
|
+
t("div", fs, [
|
|
491
|
+
t("div", ys, n(u.value.optimisticCount ?? "—"), 1),
|
|
492
|
+
e[16] || (e[16] = t("div", { class: "szd-stat__label" }, "Optimistic", -1))
|
|
493
|
+
]),
|
|
494
|
+
t("div", gs, [
|
|
495
|
+
t("div", hs, n(u.value.confirmedCount), 1),
|
|
496
|
+
e[17] || (e[17] = t("div", { class: "szd-stat__label" }, "Confirmed", -1))
|
|
497
|
+
]),
|
|
498
|
+
t("div", ks, [
|
|
499
|
+
t("div", bs, n(u.value.groundTruthCount), 1),
|
|
500
|
+
e[18] || (e[18] = t("div", { class: "szd-stat__label" }, "Ground Truth", -1))
|
|
501
|
+
]),
|
|
502
|
+
t("div", Ss, [
|
|
503
|
+
t("div", Cs, n(u.value.inFlightCount), 1),
|
|
504
|
+
e[19] || (e[19] = t("div", { class: "szd-stat__label" }, "In-Flight", -1))
|
|
505
|
+
])
|
|
506
|
+
]),
|
|
507
|
+
t("div", ws, [
|
|
508
|
+
t("div", Ts, [
|
|
509
|
+
e[20] || (e[20] = t("span", { class: "szd-kv__key" }, "Last Sync:", -1)),
|
|
510
|
+
t("span", Ns, n(u.value.lastSync), 1)
|
|
511
|
+
])
|
|
512
|
+
])
|
|
513
|
+
]),
|
|
514
|
+
A.value ? (o(), a("div", Ks, [
|
|
515
|
+
e[22] || (e[22] = t("h3", { class: "szd-panel__heading" }, "Last Event", -1)),
|
|
516
|
+
t("button", {
|
|
517
|
+
class: "szd-event-preview",
|
|
518
|
+
onClick: e[1] || (e[1] = (l) => ie(A.value))
|
|
519
|
+
}, [
|
|
520
|
+
t("span", {
|
|
521
|
+
class: "szd-event-preview__badge",
|
|
522
|
+
style: W({ background: ae(A.value.type) })
|
|
523
|
+
}, n(A.value.type), 5),
|
|
524
|
+
t("span", $s, n(oe(A.value)), 1),
|
|
525
|
+
t("span", As, n(j(A.value.ts)), 1)
|
|
526
|
+
])
|
|
527
|
+
])) : _("", !0)
|
|
528
|
+
])) : _("", !0),
|
|
529
|
+
g.value === "timeline" ? (o(), a("div", Es, [
|
|
530
|
+
t("div", xs, [
|
|
531
|
+
t("button", {
|
|
532
|
+
class: "szd-btn szd-btn--sm",
|
|
533
|
+
onClick: e[2] || (e[2] = (l) => re(!0))
|
|
534
|
+
}, "All"),
|
|
535
|
+
t("button", {
|
|
536
|
+
class: "szd-btn szd-btn--sm",
|
|
537
|
+
onClick: e[3] || (e[3] = (l) => re(!1))
|
|
538
|
+
}, "None"),
|
|
539
|
+
(o(), a(y, null, w(ne, (l) => t("label", {
|
|
540
|
+
key: l.id,
|
|
541
|
+
class: ce(["szd-filter-chip", { "szd-filter-chip--active": T.value[l.id] }]),
|
|
542
|
+
style: W(T.value[l.id] ? { background: l.color, borderColor: l.color } : {})
|
|
543
|
+
}, [
|
|
544
|
+
q(t("input", {
|
|
545
|
+
type: "checkbox",
|
|
546
|
+
"onUpdate:modelValue": (i) => T.value[l.id] = i,
|
|
547
|
+
class: "szd-filter-chip__input"
|
|
548
|
+
}, null, 8, Ds), [
|
|
549
|
+
[ve, T.value[l.id]]
|
|
550
|
+
]),
|
|
551
|
+
M(" " + n(l.label), 1)
|
|
552
|
+
], 6)), 64))
|
|
553
|
+
]),
|
|
554
|
+
t("div", Os, [
|
|
555
|
+
(o(!0), a(y, null, w(le.value, (l) => (o(), a("div", {
|
|
556
|
+
key: l.id,
|
|
557
|
+
class: "szd-timeline__item",
|
|
558
|
+
onClick: (i) => ie(l)
|
|
559
|
+
}, [
|
|
560
|
+
t("span", Ps, n(j(l.ts)), 1),
|
|
561
|
+
t("span", {
|
|
562
|
+
class: "szd-timeline__badge",
|
|
563
|
+
style: W({ background: ae(l.type) })
|
|
564
|
+
}, n(l.type), 5),
|
|
565
|
+
t("span", qs, n(oe(l)), 1)
|
|
566
|
+
], 8, Fs))), 128)),
|
|
567
|
+
le.value.length ? _("", !0) : (o(), a("div", Ms, " No events match current filters "))
|
|
568
|
+
])
|
|
569
|
+
])) : _("", !0),
|
|
570
|
+
g.value === "data" ? (o(), a("div", Is, [
|
|
571
|
+
e[25] || (e[25] = t("h3", { class: "szd-panel__heading" }, "Data Pipeline", -1)),
|
|
572
|
+
t("div", Vs, [
|
|
573
|
+
(o(!0), a(y, null, w(L.value, (l, i) => (o(), a(y, {
|
|
574
|
+
key: l.id
|
|
575
|
+
}, [
|
|
576
|
+
t("div", {
|
|
577
|
+
class: "szd-pipeline__stage",
|
|
578
|
+
onClick: (m) => De(l)
|
|
579
|
+
}, [
|
|
580
|
+
t("div", Rs, n(l.label), 1),
|
|
581
|
+
t("div", Ls, n(l.count), 1)
|
|
582
|
+
], 8, Qs),
|
|
583
|
+
i < L.value.length - 1 ? (o(), a("div", js, "→")) : _("", !0)
|
|
584
|
+
], 64))), 128))
|
|
585
|
+
]),
|
|
586
|
+
t("div", Bs, [
|
|
587
|
+
t("div", Us, [
|
|
588
|
+
e[24] || (e[24] = t("h3", { class: "szd-panel__heading" }, "Instance Preview", -1)),
|
|
589
|
+
q(t("select", {
|
|
590
|
+
"onUpdate:modelValue": e[4] || (e[4] = (l) => h.value = l),
|
|
591
|
+
class: "szd-select"
|
|
592
|
+
}, [
|
|
593
|
+
e[23] || (e[23] = t("option", { value: null }, "Select instance...", -1)),
|
|
594
|
+
(o(!0), a(y, null, w(we.value, (l) => (o(), a("option", {
|
|
595
|
+
key: l,
|
|
596
|
+
value: l
|
|
597
|
+
}, n(l), 9, Js))), 128))
|
|
598
|
+
], 512), [
|
|
599
|
+
[_e, h.value]
|
|
600
|
+
])
|
|
601
|
+
]),
|
|
602
|
+
h.value != null ? (o(), a("div", Hs, [
|
|
603
|
+
(o(!0), a(y, null, w(L.value, (l) => (o(), a("div", {
|
|
604
|
+
key: l.id,
|
|
605
|
+
class: "szd-data-card"
|
|
606
|
+
}, [
|
|
607
|
+
t("div", Zs, [
|
|
608
|
+
M(n(l.label) + " ", 1),
|
|
609
|
+
l.pks.includes(h.value) ? (o(), a("span", Gs, "Present")) : (o(), a("span", Ws, "Absent"))
|
|
610
|
+
]),
|
|
611
|
+
t("pre", Ys, n(l.pks.includes(h.value) ? JSON.stringify(se(h.value), null, 2) : "—"), 1)
|
|
612
|
+
]))), 128))
|
|
613
|
+
])) : (o(), a("div", Xs, "Select an instance to preview"))
|
|
614
|
+
])
|
|
615
|
+
])) : _("", !0),
|
|
616
|
+
g.value === "ast" ? (o(), a("div", et, [
|
|
617
|
+
e[27] || (e[27] = t("h3", { class: "szd-panel__heading" }, "Query AST", -1)),
|
|
618
|
+
t("div", st, [
|
|
619
|
+
t("div", tt, [
|
|
620
|
+
e[26] || (e[26] = t("span", { class: "szd-kv__key" }, "Semantic Key:", -1)),
|
|
621
|
+
t("code", lt, n(p.value || "—"), 1)
|
|
622
|
+
])
|
|
623
|
+
]),
|
|
624
|
+
t("pre", nt, n(Q.value ? JSON.stringify(Q.value, null, 2) : "Select a queryset to view AST"), 1)
|
|
625
|
+
])) : _("", !0)
|
|
626
|
+
]),
|
|
627
|
+
ue(pe, { name: "szd-slide" }, {
|
|
628
|
+
default: me(() => [
|
|
629
|
+
O.value ? (o(), a("div", at, [
|
|
630
|
+
t("div", {
|
|
631
|
+
class: "szd-detail__backdrop",
|
|
632
|
+
onClick: e[5] || (e[5] = (l) => O.value = !1)
|
|
633
|
+
}),
|
|
634
|
+
t("div", ot, [
|
|
635
|
+
t("div", it, [
|
|
636
|
+
e[28] || (e[28] = t("h3", { class: "szd-detail__title" }, "Debug Settings", -1)),
|
|
637
|
+
t("button", {
|
|
638
|
+
class: "szd-btn",
|
|
639
|
+
onClick: e[6] || (e[6] = (l) => O.value = !1)
|
|
640
|
+
}, "Close")
|
|
641
|
+
]),
|
|
642
|
+
t("div", dt, [
|
|
643
|
+
t("div", rt, [
|
|
644
|
+
e[30] || (e[30] = t("label", { class: "szd-settings-label" }, "Queryset", -1)),
|
|
645
|
+
q(t("select", {
|
|
646
|
+
"onUpdate:modelValue": e[7] || (e[7] = (l) => S.value = l),
|
|
647
|
+
class: "szd-select szd-select--full"
|
|
648
|
+
}, [
|
|
649
|
+
e[29] || (e[29] = t("option", { value: "" }, "Select queryset...", -1)),
|
|
650
|
+
(o(!0), a(y, null, w(be.value, (l) => (o(), a("option", {
|
|
651
|
+
key: l.semanticKey,
|
|
652
|
+
value: l.semanticKey
|
|
653
|
+
}, n(l.modelName || "?") + " · " + n(l.semanticKey), 9, ut))), 128))
|
|
654
|
+
], 512), [
|
|
655
|
+
[_e, S.value]
|
|
656
|
+
])
|
|
657
|
+
]),
|
|
658
|
+
p.value ? (o(), a("div", ct, [
|
|
659
|
+
e[31] || (e[31] = t("label", { class: "szd-settings-label" }, "Semantic Key", -1)),
|
|
660
|
+
t("div", vt, [
|
|
661
|
+
t("code", _t, n(p.value), 1),
|
|
662
|
+
t("button", {
|
|
663
|
+
class: "szd-btn szd-btn--sm",
|
|
664
|
+
onClick: Ee
|
|
665
|
+
}, "Copy")
|
|
666
|
+
])
|
|
667
|
+
])) : _("", !0),
|
|
668
|
+
t("div", pt, [
|
|
669
|
+
e[32] || (e[32] = t("label", { class: "szd-settings-label" }, "Actions", -1)),
|
|
670
|
+
t("div", mt, [
|
|
671
|
+
t("button", {
|
|
672
|
+
class: "szd-btn",
|
|
673
|
+
onClick: xe,
|
|
674
|
+
disabled: !k.value || x.value
|
|
675
|
+
}, n(x.value ? "Syncing..." : "Sync Now"), 9, zt),
|
|
676
|
+
t("button", {
|
|
677
|
+
class: "szd-btn",
|
|
678
|
+
onClick: Ae
|
|
679
|
+
}, "Clear Events")
|
|
680
|
+
])
|
|
681
|
+
]),
|
|
682
|
+
t("div", ft, [
|
|
683
|
+
e[34] || (e[34] = t("label", { class: "szd-settings-label" }, "Options", -1)),
|
|
684
|
+
t("label", yt, [
|
|
685
|
+
q(t("input", {
|
|
686
|
+
type: "checkbox",
|
|
687
|
+
"onUpdate:modelValue": e[8] || (e[8] = (l) => V.value = l)
|
|
688
|
+
}, null, 512), [
|
|
689
|
+
[ve, V.value]
|
|
690
|
+
]),
|
|
691
|
+
e[33] || (e[33] = M(" Live updates ", -1))
|
|
692
|
+
])
|
|
693
|
+
]),
|
|
694
|
+
p.value ? (o(), a("div", gt, [
|
|
695
|
+
e[40] || (e[40] = t("label", { class: "szd-settings-label" }, "Current State", -1)),
|
|
696
|
+
t("div", ht, [
|
|
697
|
+
t("div", kt, [
|
|
698
|
+
e[35] || (e[35] = t("span", { class: "szd-kv__key" }, "Model:", -1)),
|
|
699
|
+
t("span", bt, n(u.value.modelName || "—"), 1)
|
|
700
|
+
]),
|
|
701
|
+
t("div", St, [
|
|
702
|
+
e[36] || (e[36] = t("span", { class: "szd-kv__key" }, "Source:", -1)),
|
|
703
|
+
t("span", Ct, n(u.value.source), 1)
|
|
704
|
+
]),
|
|
705
|
+
t("div", wt, [
|
|
706
|
+
e[37] || (e[37] = t("span", { class: "szd-kv__key" }, "Syncing:", -1)),
|
|
707
|
+
t("span", Tt, n(u.value.isSyncing ? "Yes" : "No"), 1)
|
|
708
|
+
]),
|
|
709
|
+
t("div", Nt, [
|
|
710
|
+
e[38] || (e[38] = t("span", { class: "szd-kv__key" }, "Operations:", -1)),
|
|
711
|
+
t("span", Kt, n(u.value.opsCount), 1)
|
|
712
|
+
]),
|
|
713
|
+
t("div", $t, [
|
|
714
|
+
e[39] || (e[39] = t("span", { class: "szd-kv__key" }, "Last Sync:", -1)),
|
|
715
|
+
t("span", At, n(u.value.lastSync), 1)
|
|
716
|
+
])
|
|
717
|
+
])
|
|
718
|
+
])) : _("", !0)
|
|
719
|
+
])
|
|
720
|
+
])
|
|
721
|
+
])) : _("", !0)
|
|
722
|
+
]),
|
|
723
|
+
_: 1
|
|
724
|
+
}),
|
|
725
|
+
ue(pe, { name: "szd-slide" }, {
|
|
726
|
+
default: me(() => [
|
|
727
|
+
r.value ? (o(), a("div", Et, [
|
|
728
|
+
t("div", {
|
|
729
|
+
class: "szd-detail__backdrop",
|
|
730
|
+
onClick: de
|
|
731
|
+
}),
|
|
732
|
+
t("div", xt, [
|
|
733
|
+
t("div", Dt, [
|
|
734
|
+
t("h3", Ot, n(r.value.type === "entry" ? "Event Detail" : "Snapshot: " + r.value.data.label), 1),
|
|
735
|
+
t("button", {
|
|
736
|
+
class: "szd-btn",
|
|
737
|
+
onClick: de
|
|
738
|
+
}, "Close")
|
|
739
|
+
]),
|
|
740
|
+
t("div", Ft, [
|
|
741
|
+
r.value.type === "entry" ? (o(), a(y, { key: 0 }, [
|
|
742
|
+
t("div", Pt, [
|
|
743
|
+
(o(!0), a(y, null, w($e(r.value.data), (l, i) => (o(), a("div", {
|
|
744
|
+
key: i,
|
|
745
|
+
class: "szd-kv__row"
|
|
746
|
+
}, [
|
|
747
|
+
t("span", qt, n(i) + ":", 1),
|
|
748
|
+
t("span", Mt, n(l ?? "—"), 1)
|
|
749
|
+
]))), 128))
|
|
750
|
+
]),
|
|
751
|
+
e[41] || (e[41] = t("h4", { style: { margin: "16px 0 8px" } }, "Raw JSON", -1)),
|
|
752
|
+
t("pre", It, n(JSON.stringify(r.value.data, null, 2)), 1)
|
|
753
|
+
], 64)) : (o(), a(y, { key: 1 }, [
|
|
754
|
+
t("div", Vt, [
|
|
755
|
+
t("div", Qt, [
|
|
756
|
+
e[42] || (e[42] = t("span", { class: "szd-kv__key" }, "Total Count:", -1)),
|
|
757
|
+
t("span", Rt, n(r.value.data.count), 1)
|
|
758
|
+
]),
|
|
759
|
+
t("div", Lt, [
|
|
760
|
+
e[43] || (e[43] = t("span", { class: "szd-kv__key" }, "Showing:", -1)),
|
|
761
|
+
t("span", jt, [
|
|
762
|
+
M(n(te.value.length) + " items ", 1),
|
|
763
|
+
Te.value ? (o(), a("span", Bt, "(limited to first 100)")) : _("", !0)
|
|
764
|
+
])
|
|
765
|
+
])
|
|
766
|
+
]),
|
|
767
|
+
e[44] || (e[44] = t("h4", { style: { margin: "0 0 8px" } }, "Data", -1)),
|
|
768
|
+
t("pre", Ut, n(JSON.stringify(te.value, null, 2)), 1)
|
|
769
|
+
], 64))
|
|
770
|
+
])
|
|
771
|
+
])
|
|
772
|
+
])) : _("", !0)
|
|
773
|
+
]),
|
|
774
|
+
_: 1
|
|
775
|
+
})
|
|
776
|
+
]));
|
|
777
|
+
}
|
|
778
|
+
}, Yt = /* @__PURE__ */ je(Jt, [["__scopeId", "data-v-6d80920c"]]);
|
|
779
|
+
export {
|
|
780
|
+
Yt as default
|
|
781
|
+
};
|