typerighter 0.56.0 → 0.56.2
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/README.md +3 -3
- package/README.npm.md +3 -3
- package/dist/{app-Btmcn8ed.js → app-Dh1RgRtN.js} +440 -501
- package/dist/{cli-0cwy5E5t.js → cli-DtmuEnwt.js} +5 -5
- package/dist/cli.js +1 -1
- package/dist/client/theme-default/composables/client-preferences/index.d.ts +0 -2
- package/dist/client/theme-default/composables/client-preferences/index.d.ts.map +1 -1
- package/dist/client/theme-default/composables/client-preferences/useSidebarConfig.d.ts +1 -0
- package/dist/client/theme-default/composables/client-preferences/useSidebarConfig.d.ts.map +1 -1
- package/dist/client/theme-default/composables/client-preferences/useTheme.d.ts +1 -0
- package/dist/client/theme-default/composables/client-preferences/useTheme.d.ts.map +1 -1
- package/dist/client/theme-default.js +1106 -1135
- package/dist/client.js +3 -1
- package/dist/index.js +2 -2
- package/dist/{init-CVVOslzB.js → init-Drks9yZs.js} +1 -1
- package/dist/{page-I67xAM4w.js → page-RL9qA6-j.js} +22 -21
- package/dist/prerenderWorker.js +1 -1
- package/dist/typerighter.css +1 -1
- package/dist/useSidebarConfig-n149FAq4.js +31 -0
- package/dist/useTheme-B-j0bXCL.js +62 -0
- package/dist/{vite-DQoRnpfn.js → vite-C2ruOX7H.js} +1 -1
- package/dist/vite.js +1 -1
- package/package.json +3 -3
- package/dist/client/theme-default/composables/client-preferences/utils/registry.d.ts +0 -3
- package/dist/client/theme-default/composables/client-preferences/utils/registry.d.ts.map +0 -1
- package/dist/registry-DHnqBLvh.js +0 -9
|
@@ -1,47 +1,19 @@
|
|
|
1
1
|
import { A as e, D as t, E as n, I as r, L as i, P as a, R as o, T as s, Y as c, _ as l, a as u, b as d, c as f, f as p, j as m, k as h, l as g, n as _, nt as v, p as y, r as b, rt as x, s as S, v as C, w, y as T } from "../shared-BK7uzYmy.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import { t as
|
|
5
|
-
import { a as
|
|
6
|
-
import { t as Ke } from "../
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
let n = typeof localStorage < "u" ? localStorage.getItem(e) : null, r = n === null ? t : bt(n, t), i = U(r);
|
|
11
|
-
return Y(i, (t) => {
|
|
12
|
-
typeof localStorage < "u" && localStorage.setItem(e, String(t));
|
|
13
|
-
}), i;
|
|
14
|
-
}
|
|
15
|
-
function bt(e, t) {
|
|
16
|
-
return typeof t == "boolean" ? e === "true" : typeof t == "number" ? Number(e) || t : e;
|
|
17
|
-
}
|
|
18
|
-
// src/client/theme-default/composables/client-preferences/useSidebarConfig.ts
|
|
19
|
-
var xt = "td-sidebar-width", St = "td-sidebar-collapsed", Ct = "--td-sidebar-width", wt = 300, Tt = 48, Et = 200, Dt = 500;
|
|
20
|
-
function Ot() {
|
|
21
|
-
let e = yt(xt, 300), t = yt(St, !1), n = U(!1);
|
|
22
|
-
V(() => {
|
|
23
|
-
n.value = !0;
|
|
24
|
-
});
|
|
25
|
-
let r = M(() => t.value ? 48 : e.value);
|
|
26
|
-
return {
|
|
27
|
-
sidebarWidth: e,
|
|
28
|
-
sidebarCollapsed: t,
|
|
29
|
-
sidebarStyle: M(() => n.value ? { width: `${r.value}px` } : {})
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function kt() {
|
|
33
|
-
let e = `${_e(St)}==='true'`, t = `collapsed?48:(Number(${_e(xt)})||300)`;
|
|
34
|
-
return oe(`var collapsed=${e};var width=${t};` + ie(Ct, "`${width}px`"));
|
|
35
|
-
}
|
|
36
|
-
Be(kt);
|
|
37
|
-
var At = O({
|
|
2
|
+
import { n as E } from "../useTheme-B-j0bXCL.js";
|
|
3
|
+
import { i as ee, n as te, o as D, r as ne, s as re, t as ie } from "../useSidebarConfig-n149FAq4.js";
|
|
4
|
+
import { t as ae } from "../es-B_QJMowB.js";
|
|
5
|
+
import { A as O, B as oe, C as se, D as ce, E as le, F as ue, H as k, I as de, L as fe, M as pe, N as me, O as he, P as ge, R as _e, S as ve, T as ye, V as be, _ as xe, a as Se, b as Ce, c as we, d as Te, f as Ee, g as De, h as Oe, i as ke, j as Ae, k as je, l as Me, m as Ne, n as Pe, o as Fe, p as A, r as j, s as Ie, u as Le, v as Re, w as ze, x as Be, y as Ve, z as He } from "../app-Dh1RgRtN.js";
|
|
6
|
+
import { a as Ue, i as We, n as Ge, t as Ke } from "../brand-BSCRFcrY.js";
|
|
7
|
+
import { t as qe } from "../inlineRe-CoUp2DgK.js";
|
|
8
|
+
import { Fragment as M, Teleport as Je, Transition as Ye, computed as N, createBlock as P, createCommentVNode as F, createElementBlock as I, createElementVNode as L, createTextVNode as R, createVNode as z, defineComponent as B, getCurrentScope as Xe, h as Ze, markRaw as Qe, mergeModels as $e, mergeProps as et, nextTick as tt, normalizeClass as V, normalizeStyle as nt, onBeforeUnmount as rt, onMounted as it, onScopeDispose as at, onUnmounted as ot, openBlock as H, readonly as st, ref as U, render as ct, renderList as W, renderSlot as G, resolveComponent as lt, resolveDynamicComponent as ut, shallowReadonly as dt, shallowRef as ft, toDisplayString as K, toValue as pt, unref as q, useModel as mt, useTemplateRef as J, vModelText as ht, vShow as gt, watch as Y, watchEffect as _t, withCtx as X, withDirectives as vt, withKeys as yt, withModifiers as bt } from "vue";
|
|
9
|
+
var xt = k({
|
|
38
10
|
name: "check",
|
|
39
11
|
size: 24,
|
|
40
12
|
node: [["path", {
|
|
41
13
|
d: "M20 6 9 17l-5-5",
|
|
42
14
|
key: "1gmf2c"
|
|
43
15
|
}]]
|
|
44
|
-
}),
|
|
16
|
+
}), St = k({
|
|
45
17
|
name: "chevrons-left",
|
|
46
18
|
size: 24,
|
|
47
19
|
node: [["path", {
|
|
@@ -51,7 +23,7 @@ var At = O({
|
|
|
51
23
|
d: "m18 17-5-5 5-5",
|
|
52
24
|
key: "h8a8et"
|
|
53
25
|
}]]
|
|
54
|
-
}),
|
|
26
|
+
}), Ct = k({
|
|
55
27
|
name: "chevrons-right",
|
|
56
28
|
size: 24,
|
|
57
29
|
node: [["path", {
|
|
@@ -61,7 +33,7 @@ var At = O({
|
|
|
61
33
|
d: "m13 17 5-5-5-5",
|
|
62
34
|
key: "17xmmf"
|
|
63
35
|
}]]
|
|
64
|
-
}),
|
|
36
|
+
}), wt = k({
|
|
65
37
|
name: "circle-dot",
|
|
66
38
|
size: 24,
|
|
67
39
|
node: [["circle", {
|
|
@@ -75,7 +47,7 @@ var At = O({
|
|
|
75
47
|
r: "10",
|
|
76
48
|
key: "1mglay"
|
|
77
49
|
}]]
|
|
78
|
-
}),
|
|
50
|
+
}), Tt = k({
|
|
79
51
|
name: "clipboard-copy",
|
|
80
52
|
size: 24,
|
|
81
53
|
node: [
|
|
@@ -105,14 +77,14 @@ var At = O({
|
|
|
105
77
|
key: "5dvupr"
|
|
106
78
|
}]
|
|
107
79
|
]
|
|
108
|
-
}),
|
|
80
|
+
}), Et = k({
|
|
109
81
|
name: "command",
|
|
110
82
|
size: 24,
|
|
111
83
|
node: [["path", {
|
|
112
84
|
d: "M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",
|
|
113
85
|
key: "11bfej"
|
|
114
86
|
}]]
|
|
115
|
-
}),
|
|
87
|
+
}), Dt = k({
|
|
116
88
|
name: "corner-down-left",
|
|
117
89
|
size: 24,
|
|
118
90
|
node: [["path", {
|
|
@@ -122,7 +94,7 @@ var At = O({
|
|
|
122
94
|
d: "m9 10-5 5 5 5",
|
|
123
95
|
key: "1kshq7"
|
|
124
96
|
}]]
|
|
125
|
-
}),
|
|
97
|
+
}), Ot = k({
|
|
126
98
|
name: "delete",
|
|
127
99
|
size: 24,
|
|
128
100
|
node: [
|
|
@@ -139,14 +111,14 @@ var At = O({
|
|
|
139
111
|
key: "1fp51s"
|
|
140
112
|
}]
|
|
141
113
|
]
|
|
142
|
-
}),
|
|
114
|
+
}), kt = k({
|
|
143
115
|
name: "folder-open",
|
|
144
116
|
size: 24,
|
|
145
117
|
node: [["path", {
|
|
146
118
|
d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",
|
|
147
119
|
key: "usdka0"
|
|
148
120
|
}]]
|
|
149
|
-
}),
|
|
121
|
+
}), At = k({
|
|
150
122
|
name: "loader-circle",
|
|
151
123
|
size: 24,
|
|
152
124
|
node: [["path", {
|
|
@@ -154,7 +126,7 @@ var At = O({
|
|
|
154
126
|
key: "13zald"
|
|
155
127
|
}]],
|
|
156
128
|
aliases: ["loader-2"]
|
|
157
|
-
}),
|
|
129
|
+
}), jt = k({
|
|
158
130
|
name: "maximize",
|
|
159
131
|
size: 24,
|
|
160
132
|
node: [
|
|
@@ -175,7 +147,7 @@ var At = O({
|
|
|
175
147
|
key: "18trek"
|
|
176
148
|
}]
|
|
177
149
|
]
|
|
178
|
-
}),
|
|
150
|
+
}), Mt = k({
|
|
179
151
|
name: "option",
|
|
180
152
|
size: 24,
|
|
181
153
|
node: [["path", {
|
|
@@ -185,14 +157,14 @@ var At = O({
|
|
|
185
157
|
d: "M3 3h5.28a1 1 0 0 1 .948.684l5.544 16.632a1 1 0 0 0 .949.684H21",
|
|
186
158
|
key: "1qf1im"
|
|
187
159
|
}]]
|
|
188
|
-
}),
|
|
160
|
+
}), Nt = k({
|
|
189
161
|
name: "space",
|
|
190
162
|
size: 24,
|
|
191
163
|
node: [["path", {
|
|
192
164
|
d: "M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1",
|
|
193
165
|
key: "lt2kga"
|
|
194
166
|
}]]
|
|
195
|
-
}),
|
|
167
|
+
}), Pt = k({
|
|
196
168
|
name: "square-check-big",
|
|
197
169
|
size: 24,
|
|
198
170
|
node: [["path", {
|
|
@@ -203,7 +175,7 @@ var At = O({
|
|
|
203
175
|
key: "1pflzl"
|
|
204
176
|
}]],
|
|
205
177
|
aliases: ["check-square"]
|
|
206
|
-
}),
|
|
178
|
+
}), Ft = k({
|
|
207
179
|
name: "tags",
|
|
208
180
|
size: 24,
|
|
209
181
|
node: [
|
|
@@ -223,7 +195,7 @@ var At = O({
|
|
|
223
195
|
key: "12ikhr"
|
|
224
196
|
}]
|
|
225
197
|
]
|
|
226
|
-
}),
|
|
198
|
+
}), It = k({
|
|
227
199
|
name: "type",
|
|
228
200
|
size: 24,
|
|
229
201
|
node: [
|
|
@@ -240,117 +212,117 @@ var At = O({
|
|
|
240
212
|
key: "s66wpe"
|
|
241
213
|
}]
|
|
242
214
|
]
|
|
243
|
-
}),
|
|
215
|
+
}), Lt = [
|
|
244
216
|
"height",
|
|
245
217
|
"width",
|
|
246
218
|
"viewBox"
|
|
247
|
-
],
|
|
219
|
+
], Rt = ["d"], zt = ["d"], Bt = ["d"], Vt = /* @__PURE__ */ B({
|
|
248
220
|
__name: "TdBrandIcon",
|
|
249
221
|
props: { size: { default: 28 } },
|
|
250
222
|
setup(e) {
|
|
251
|
-
return (t, n) => (H(),
|
|
223
|
+
return (t, n) => (H(), I("svg", {
|
|
252
224
|
fill: "none",
|
|
253
225
|
height: e.size,
|
|
254
226
|
width: e.size * 208 / 128,
|
|
255
|
-
viewBox: q(
|
|
227
|
+
viewBox: q(Ue),
|
|
256
228
|
xmlns: "http://www.w3.org/2000/svg"
|
|
257
229
|
}, [
|
|
258
|
-
|
|
230
|
+
L("path", {
|
|
259
231
|
"clip-rule": "evenodd",
|
|
260
|
-
d: q(
|
|
232
|
+
d: q(Ge),
|
|
261
233
|
"fill-rule": "evenodd",
|
|
262
234
|
fill: "currentColor"
|
|
263
|
-
}, null, 8,
|
|
264
|
-
|
|
265
|
-
d: q(
|
|
235
|
+
}, null, 8, Rt),
|
|
236
|
+
L("path", {
|
|
237
|
+
d: q(We),
|
|
266
238
|
fill: "currentColor"
|
|
267
|
-
}, null, 8,
|
|
268
|
-
|
|
269
|
-
d: q(
|
|
239
|
+
}, null, 8, zt),
|
|
240
|
+
L("path", {
|
|
241
|
+
d: q(Ke),
|
|
270
242
|
fill: "currentColor"
|
|
271
|
-
}, null, 8,
|
|
272
|
-
], 8,
|
|
243
|
+
}, null, 8, Bt)
|
|
244
|
+
], 8, Lt));
|
|
273
245
|
}
|
|
274
|
-
}),
|
|
246
|
+
}), Ht = ["title", "aria-label"], Ut = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
275
247
|
__name: "TdButton",
|
|
276
248
|
props: { label: {} },
|
|
277
249
|
setup(e) {
|
|
278
|
-
return (t, n) => (H(),
|
|
250
|
+
return (t, n) => (H(), I("button", {
|
|
279
251
|
type: "button",
|
|
280
252
|
class: "td-icon-btn",
|
|
281
253
|
title: e.label,
|
|
282
254
|
"aria-label": e.label
|
|
283
|
-
}, [G(t.$slots, "default", {}, void 0, !0)], 8,
|
|
255
|
+
}, [G(t.$slots, "default", {}, void 0, !0)], 8, Ht));
|
|
284
256
|
}
|
|
285
|
-
}), [["__scopeId", "data-v-b1861a4a"]]),
|
|
257
|
+
}), [["__scopeId", "data-v-b1861a4a"]]), Wt = Math.min, Gt = Math.max, Kt = Math.round, qt = (e) => ({
|
|
286
258
|
x: e,
|
|
287
259
|
y: e
|
|
288
|
-
}),
|
|
260
|
+
}), Jt = {
|
|
289
261
|
left: "right",
|
|
290
262
|
right: "left",
|
|
291
263
|
bottom: "top",
|
|
292
264
|
top: "bottom"
|
|
293
265
|
};
|
|
294
|
-
function
|
|
295
|
-
return
|
|
266
|
+
function Yt(e, t, n) {
|
|
267
|
+
return Gt(e, Wt(t, n));
|
|
296
268
|
}
|
|
297
|
-
function
|
|
269
|
+
function Xt(e, t) {
|
|
298
270
|
return typeof e == "function" ? e(t) : e;
|
|
299
271
|
}
|
|
300
|
-
function
|
|
272
|
+
function Zt(e) {
|
|
301
273
|
return e.split("-")[0];
|
|
302
274
|
}
|
|
303
|
-
function
|
|
275
|
+
function Qt(e) {
|
|
304
276
|
return e.split("-")[1];
|
|
305
277
|
}
|
|
306
|
-
function
|
|
278
|
+
function $t(e) {
|
|
307
279
|
return e === "x" ? "y" : "x";
|
|
308
280
|
}
|
|
309
|
-
function
|
|
281
|
+
function en(e) {
|
|
310
282
|
return e === "y" ? "height" : "width";
|
|
311
283
|
}
|
|
312
|
-
function
|
|
284
|
+
function tn(e) {
|
|
313
285
|
let t = e[0];
|
|
314
286
|
return t === "t" || t === "b" ? "y" : "x";
|
|
315
287
|
}
|
|
316
|
-
function
|
|
317
|
-
return
|
|
288
|
+
function nn(e) {
|
|
289
|
+
return $t(tn(e));
|
|
318
290
|
}
|
|
319
|
-
function
|
|
291
|
+
function rn(e, t, n) {
|
|
320
292
|
n === void 0 && (n = !1);
|
|
321
|
-
let r =
|
|
322
|
-
return t.reference[a] > t.floating[a] && (o =
|
|
293
|
+
let r = Qt(e), i = nn(e), a = en(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
294
|
+
return t.reference[a] > t.floating[a] && (o = pn(o)), [o, pn(o)];
|
|
323
295
|
}
|
|
324
|
-
function
|
|
325
|
-
let t =
|
|
296
|
+
function an(e) {
|
|
297
|
+
let t = pn(e);
|
|
326
298
|
return [
|
|
327
|
-
|
|
299
|
+
on(e),
|
|
328
300
|
t,
|
|
329
|
-
|
|
301
|
+
on(t)
|
|
330
302
|
];
|
|
331
303
|
}
|
|
332
|
-
function
|
|
304
|
+
function on(e) {
|
|
333
305
|
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
334
306
|
}
|
|
335
|
-
var
|
|
336
|
-
function
|
|
307
|
+
var sn = ["left", "right"], cn = ["right", "left"], ln = ["top", "bottom"], un = ["bottom", "top"];
|
|
308
|
+
function dn(e, t, n) {
|
|
337
309
|
switch (e) {
|
|
338
310
|
case "top":
|
|
339
|
-
case "bottom": return n ? t ?
|
|
311
|
+
case "bottom": return n ? t ? cn : sn : t ? sn : cn;
|
|
340
312
|
case "left":
|
|
341
|
-
case "right": return t ?
|
|
313
|
+
case "right": return t ? ln : un;
|
|
342
314
|
default: return [];
|
|
343
315
|
}
|
|
344
316
|
}
|
|
345
|
-
function
|
|
346
|
-
let i =
|
|
347
|
-
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(
|
|
317
|
+
function fn(e, t, n, r) {
|
|
318
|
+
let i = Qt(e), a = dn(Zt(e), n === "start", r);
|
|
319
|
+
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(on)))), a;
|
|
348
320
|
}
|
|
349
|
-
function
|
|
350
|
-
let t =
|
|
351
|
-
return
|
|
321
|
+
function pn(e) {
|
|
322
|
+
let t = Zt(e);
|
|
323
|
+
return Jt[t] + e.slice(t.length);
|
|
352
324
|
}
|
|
353
|
-
function
|
|
325
|
+
function mn(e) {
|
|
354
326
|
return {
|
|
355
327
|
top: e.top ?? 0,
|
|
356
328
|
right: e.right ?? 0,
|
|
@@ -358,15 +330,15 @@ function Cn(e) {
|
|
|
358
330
|
left: e.left ?? 0
|
|
359
331
|
};
|
|
360
332
|
}
|
|
361
|
-
function
|
|
333
|
+
function hn(e) {
|
|
362
334
|
return typeof e == "number" ? {
|
|
363
335
|
top: e,
|
|
364
336
|
right: e,
|
|
365
337
|
bottom: e,
|
|
366
338
|
left: e
|
|
367
|
-
} :
|
|
339
|
+
} : mn(e);
|
|
368
340
|
}
|
|
369
|
-
function
|
|
341
|
+
function gn(e) {
|
|
370
342
|
let { x: t, y: n, width: r, height: i } = e;
|
|
371
343
|
return {
|
|
372
344
|
width: r,
|
|
@@ -380,8 +352,8 @@ function Tn(e) {
|
|
|
380
352
|
};
|
|
381
353
|
}
|
|
382
354
|
// ../../node_modules/.pnpm/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
383
|
-
function
|
|
384
|
-
let { reference: r, floating: i } = e, a =
|
|
355
|
+
function _n(e, t, n) {
|
|
356
|
+
let { reference: r, floating: i } = e, a = tn(t), o = nn(t), s = en(o), c = Zt(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
|
|
385
357
|
switch (c) {
|
|
386
358
|
case "top":
|
|
387
359
|
p = {
|
|
@@ -412,12 +384,12 @@ function En(e, t, n) {
|
|
|
412
384
|
y: r.y
|
|
413
385
|
};
|
|
414
386
|
}
|
|
415
|
-
let m =
|
|
387
|
+
let m = Qt(t);
|
|
416
388
|
return m && (p[o] += f * (m === "end" ? 1 : -1) * (n && l ? -1 : 1)), p;
|
|
417
389
|
}
|
|
418
|
-
async function
|
|
390
|
+
async function vn(e, t) {
|
|
419
391
|
t === void 0 && (t = {});
|
|
420
|
-
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } =
|
|
392
|
+
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = Xt(t, e), p = hn(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = gn(await i.getClippingRect({
|
|
421
393
|
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
|
|
422
394
|
boundary: c,
|
|
423
395
|
rootBoundary: l,
|
|
@@ -430,7 +402,7 @@ async function Dn(e, t) {
|
|
|
430
402
|
} : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
|
|
431
403
|
x: 1,
|
|
432
404
|
y: 1
|
|
433
|
-
}, y =
|
|
405
|
+
}, y = gn(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
434
406
|
elements: o,
|
|
435
407
|
rect: g,
|
|
436
408
|
offsetParent: _,
|
|
@@ -443,15 +415,15 @@ async function Dn(e, t) {
|
|
|
443
415
|
right: (y.right - h.right + p.right) / v.x
|
|
444
416
|
};
|
|
445
417
|
}
|
|
446
|
-
var
|
|
418
|
+
var yn = 50, bn = async (e, t, n) => {
|
|
447
419
|
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
|
|
448
420
|
...o,
|
|
449
|
-
detectOverflow:
|
|
421
|
+
detectOverflow: vn
|
|
450
422
|
}, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
451
423
|
reference: e,
|
|
452
424
|
floating: t,
|
|
453
425
|
strategy: i
|
|
454
|
-
}), { x: u, y: d } =
|
|
426
|
+
}), { x: u, y: d } = _n(l, r, c), f = r, p = 0, m = {};
|
|
455
427
|
for (let n = 0; n < a.length; n++) {
|
|
456
428
|
let h = a[n];
|
|
457
429
|
if (!h) continue;
|
|
@@ -472,11 +444,11 @@ var On = 50, kn = async (e, t, n) => {
|
|
|
472
444
|
u = v ?? u, d = y ?? d, m[g] = {
|
|
473
445
|
...m[g],
|
|
474
446
|
...b
|
|
475
|
-
}, x && p <
|
|
447
|
+
}, x && p < yn && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
|
|
476
448
|
reference: e,
|
|
477
449
|
floating: t,
|
|
478
450
|
strategy: i
|
|
479
|
-
}) : x.rects), {x: u, y: d} =
|
|
451
|
+
}) : x.rects), {x: u, y: d} = _n(l, f, c)), n = -1);
|
|
480
452
|
}
|
|
481
453
|
return {
|
|
482
454
|
x: u,
|
|
@@ -485,18 +457,18 @@ var On = 50, kn = async (e, t, n) => {
|
|
|
485
457
|
strategy: i,
|
|
486
458
|
middlewareData: m
|
|
487
459
|
};
|
|
488
|
-
},
|
|
460
|
+
}, xn = (e) => ({
|
|
489
461
|
name: "arrow",
|
|
490
462
|
options: e,
|
|
491
463
|
async fn(t) {
|
|
492
|
-
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } =
|
|
464
|
+
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = Xt(e, t) || {};
|
|
493
465
|
if (l == null) return {};
|
|
494
|
-
let d =
|
|
466
|
+
let d = hn(u), f = {
|
|
495
467
|
x: n,
|
|
496
468
|
y: r
|
|
497
|
-
}, p =
|
|
469
|
+
}, p = nn(i), m = en(p), h = await o.getDimensions(l), g = p === "y", _ = g ? "top" : "left", v = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", b = a.reference[m] + a.reference[p] - f[p] - a.floating[m], x = f[p] - a.reference[p], S = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), C = S ? S[y] : 0;
|
|
498
470
|
C && await (o.isElement == null ? void 0 : o.isElement(S)) || (C = s.floating[y] || a.floating[m]);
|
|
499
|
-
let w = b / 2 - x / 2, T = C / 2 - h[m] / 2 - 1, E =
|
|
471
|
+
let w = b / 2 - x / 2, T = C / 2 - h[m] / 2 - 1, E = Wt(d[_], T), ee = Wt(d[v], T), te = C - h[m] - ee, D = C / 2 - h[m] / 2 + w, ne = Yt(E, D, te), re = !c.arrow && Qt(i) != null && D !== ne && a.reference[m] / 2 - (D < E ? E : ee) - h[m] / 2 < 0, ie = re ? D < E ? D - E : D - te : 0;
|
|
500
472
|
return {
|
|
501
473
|
[p]: f[p] + ie,
|
|
502
474
|
data: {
|
|
@@ -507,19 +479,19 @@ var On = 50, kn = async (e, t, n) => {
|
|
|
507
479
|
reset: re
|
|
508
480
|
};
|
|
509
481
|
}
|
|
510
|
-
}),
|
|
482
|
+
}), Sn = function(e) {
|
|
511
483
|
return e === void 0 && (e = {}), {
|
|
512
484
|
name: "flip",
|
|
513
485
|
options: e,
|
|
514
486
|
async fn(t) {
|
|
515
487
|
var n;
|
|
516
|
-
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } =
|
|
488
|
+
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = Xt(e, t);
|
|
517
489
|
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
518
|
-
let g =
|
|
519
|
-
!d && x && b.push(...
|
|
490
|
+
let g = Zt(r), _ = tn(o), v = Zt(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [pn(o)] : an(o)), x = p !== "none";
|
|
491
|
+
!d && x && b.push(...fn(o, m, p, y));
|
|
520
492
|
let S = [o, ...b], C = await s.detectOverflow(t, h), w = [], T = i.flip?.overflows || [];
|
|
521
493
|
if (l && w.push(C[g]), u) {
|
|
522
|
-
let e =
|
|
494
|
+
let e = rn(r, a, y);
|
|
523
495
|
w.push(C[e[0]], C[e[1]]);
|
|
524
496
|
}
|
|
525
497
|
if (T = [...T, {
|
|
@@ -527,7 +499,7 @@ var On = 50, kn = async (e, t, n) => {
|
|
|
527
499
|
overflows: w
|
|
528
500
|
}], !w.every((e) => e <= 0)) {
|
|
529
501
|
let e = (i.flip?.index || 0) + 1, t = S[e];
|
|
530
|
-
if (t && (u !== "alignment" || _ ===
|
|
502
|
+
if (t && (u !== "alignment" || _ === tn(t) || T.every((e) => tn(e.placement) !== _ || e.overflows[0] > 0))) return {
|
|
531
503
|
data: {
|
|
532
504
|
index: e,
|
|
533
505
|
overflows: T
|
|
@@ -539,7 +511,7 @@ var On = 50, kn = async (e, t, n) => {
|
|
|
539
511
|
case "bestFit": {
|
|
540
512
|
let e = T.filter((e) => {
|
|
541
513
|
if (x) {
|
|
542
|
-
let t =
|
|
514
|
+
let t = tn(e.placement);
|
|
543
515
|
return t === _ || t === "y";
|
|
544
516
|
}
|
|
545
517
|
return !0;
|
|
@@ -554,9 +526,9 @@ var On = 50, kn = async (e, t, n) => {
|
|
|
554
526
|
return {};
|
|
555
527
|
}
|
|
556
528
|
};
|
|
557
|
-
},
|
|
558
|
-
async function
|
|
559
|
-
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o =
|
|
529
|
+
}, Cn = /*#__PURE__*/ new Set(["left", "top"]);
|
|
530
|
+
async function wn(e, t) {
|
|
531
|
+
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = Zt(n), s = Qt(n), c = tn(n) === "y", l = Cn.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = Xt(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
|
|
560
532
|
mainAxis: d,
|
|
561
533
|
crossAxis: 0,
|
|
562
534
|
alignmentAxis: null
|
|
@@ -573,13 +545,13 @@ async function Nn(e, t) {
|
|
|
573
545
|
y: p * u
|
|
574
546
|
};
|
|
575
547
|
}
|
|
576
|
-
var
|
|
548
|
+
var Tn = function(e) {
|
|
577
549
|
return e === void 0 && (e = 0), {
|
|
578
550
|
name: "offset",
|
|
579
551
|
options: e,
|
|
580
552
|
async fn(t) {
|
|
581
553
|
var n;
|
|
582
|
-
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await
|
|
554
|
+
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await wn(t, e);
|
|
583
555
|
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
|
|
584
556
|
x: r + s.x,
|
|
585
557
|
y: i + s.y,
|
|
@@ -590,7 +562,7 @@ var Pn = function(e) {
|
|
|
590
562
|
};
|
|
591
563
|
}
|
|
592
564
|
};
|
|
593
|
-
},
|
|
565
|
+
}, En = function(e) {
|
|
594
566
|
return e === void 0 && (e = {}), {
|
|
595
567
|
name: "shift",
|
|
596
568
|
options: e,
|
|
@@ -601,10 +573,10 @@ var Pn = function(e) {
|
|
|
601
573
|
x: t,
|
|
602
574
|
y: n
|
|
603
575
|
};
|
|
604
|
-
} }, ...l } =
|
|
576
|
+
} }, ...l } = Xt(e, t), u = {
|
|
605
577
|
x: n,
|
|
606
578
|
y: r
|
|
607
|
-
}, d = await a.detectOverflow(t, l), f =
|
|
579
|
+
}, d = await a.detectOverflow(t, l), f = tn(i), p = $t(f), m = u[p], h = u[f], g = (e, t) => Yt(t + d[e === "y" ? "top" : "left"], t, t - d[e === "y" ? "bottom" : "right"]);
|
|
608
580
|
o && (m = g(p, m)), s && (h = g(f, h));
|
|
609
581
|
let _ = c.fn({
|
|
610
582
|
...t,
|
|
@@ -626,39 +598,39 @@ var Pn = function(e) {
|
|
|
626
598
|
};
|
|
627
599
|
};
|
|
628
600
|
// ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
629
|
-
function
|
|
601
|
+
function Dn() {
|
|
630
602
|
return typeof window < "u";
|
|
631
603
|
}
|
|
632
|
-
function
|
|
633
|
-
return
|
|
604
|
+
function On(e) {
|
|
605
|
+
return An(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
634
606
|
}
|
|
635
607
|
function Z(e) {
|
|
636
608
|
var t;
|
|
637
609
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
638
610
|
}
|
|
639
|
-
function
|
|
640
|
-
return ((
|
|
611
|
+
function kn(e) {
|
|
612
|
+
return ((An(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
641
613
|
}
|
|
642
|
-
function
|
|
643
|
-
return
|
|
614
|
+
function An(e) {
|
|
615
|
+
return Dn() ? e instanceof Node || e instanceof Z(e).Node : !1;
|
|
644
616
|
}
|
|
645
|
-
function
|
|
646
|
-
return
|
|
617
|
+
function jn(e) {
|
|
618
|
+
return Dn() ? e instanceof Element || e instanceof Z(e).Element : !1;
|
|
647
619
|
}
|
|
648
|
-
function
|
|
649
|
-
return
|
|
620
|
+
function Mn(e) {
|
|
621
|
+
return Dn() ? e instanceof HTMLElement || e instanceof Z(e).HTMLElement : !1;
|
|
650
622
|
}
|
|
651
|
-
function
|
|
652
|
-
return !
|
|
623
|
+
function Nn(e) {
|
|
624
|
+
return !Dn() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Z(e).ShadowRoot;
|
|
653
625
|
}
|
|
654
|
-
function
|
|
655
|
-
let { overflow: t, overflowX: n, overflowY: r, display: i } =
|
|
626
|
+
function Pn(e) {
|
|
627
|
+
let { overflow: t, overflowX: n, overflowY: r, display: i } = Gn(e);
|
|
656
628
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
657
629
|
}
|
|
658
|
-
function
|
|
659
|
-
return /^(table|td|th)$/.test(
|
|
630
|
+
function Fn(e) {
|
|
631
|
+
return /^(table|td|th)$/.test(On(e));
|
|
660
632
|
}
|
|
661
|
-
function
|
|
633
|
+
function In(e) {
|
|
662
634
|
try {
|
|
663
635
|
if (e.matches(":popover-open")) return !0;
|
|
664
636
|
} catch {}
|
|
@@ -668,31 +640,31 @@ function Gn(e) {
|
|
|
668
640
|
return !1;
|
|
669
641
|
}
|
|
670
642
|
}
|
|
671
|
-
var
|
|
672
|
-
function
|
|
673
|
-
let t =
|
|
674
|
-
return
|
|
643
|
+
var Ln = /transform|translate|scale|rotate|perspective|filter/, Rn = /paint|layout|strict|content/, zn = (e) => !!e && e !== "none", Bn;
|
|
644
|
+
function Vn(e) {
|
|
645
|
+
let t = jn(e) ? Gn(e) : e;
|
|
646
|
+
return zn(t.transform) || zn(t.translate) || zn(t.scale) || zn(t.rotate) || zn(t.perspective) || !Un() && (zn(t.backdropFilter) || zn(t.filter)) || Ln.test(t.willChange || "") || Rn.test(t.contain || "");
|
|
675
647
|
}
|
|
676
|
-
function
|
|
677
|
-
let t =
|
|
678
|
-
for (;
|
|
679
|
-
if (
|
|
680
|
-
if (
|
|
681
|
-
t =
|
|
648
|
+
function Hn(e) {
|
|
649
|
+
let t = qn(e);
|
|
650
|
+
for (; Mn(t) && !Wn(t);) {
|
|
651
|
+
if (Vn(t)) return t;
|
|
652
|
+
if (In(t)) return null;
|
|
653
|
+
t = qn(t);
|
|
682
654
|
}
|
|
683
655
|
return null;
|
|
684
656
|
}
|
|
685
|
-
function
|
|
686
|
-
return
|
|
657
|
+
function Un() {
|
|
658
|
+
return Bn ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), Bn;
|
|
687
659
|
}
|
|
688
|
-
function
|
|
689
|
-
return /^(html|body|#document)$/.test(
|
|
660
|
+
function Wn(e) {
|
|
661
|
+
return /^(html|body|#document)$/.test(On(e));
|
|
690
662
|
}
|
|
691
|
-
function
|
|
663
|
+
function Gn(e) {
|
|
692
664
|
return Z(e).getComputedStyle(e);
|
|
693
665
|
}
|
|
694
|
-
function
|
|
695
|
-
return
|
|
666
|
+
function Kn(e) {
|
|
667
|
+
return jn(e) ? {
|
|
696
668
|
scrollLeft: e.scrollLeft,
|
|
697
669
|
scrollTop: e.scrollTop
|
|
698
670
|
} : {
|
|
@@ -700,101 +672,101 @@ function tr(e) {
|
|
|
700
672
|
scrollTop: e.scrollY
|
|
701
673
|
};
|
|
702
674
|
}
|
|
703
|
-
function
|
|
704
|
-
if (
|
|
705
|
-
let t = e.assignedSlot || e.parentNode ||
|
|
706
|
-
return
|
|
675
|
+
function qn(e) {
|
|
676
|
+
if (On(e) === "html") return e;
|
|
677
|
+
let t = e.assignedSlot || e.parentNode || Nn(e) && e.host || kn(e);
|
|
678
|
+
return Nn(t) ? t.host : t;
|
|
707
679
|
}
|
|
708
|
-
function
|
|
709
|
-
let t =
|
|
710
|
-
return
|
|
680
|
+
function Jn(e) {
|
|
681
|
+
let t = qn(e);
|
|
682
|
+
return Wn(t) ? (e.ownerDocument || e).body : Mn(t) && Pn(t) ? t : Jn(t);
|
|
711
683
|
}
|
|
712
|
-
function
|
|
684
|
+
function Yn(e, t, n) {
|
|
713
685
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
714
|
-
let r =
|
|
686
|
+
let r = Jn(e), i = r === e.ownerDocument?.body, a = Z(r);
|
|
715
687
|
if (i) {
|
|
716
|
-
let e =
|
|
717
|
-
return t.concat(a, a.visualViewport || [],
|
|
688
|
+
let e = Xn(a);
|
|
689
|
+
return t.concat(a, a.visualViewport || [], Pn(r) ? r : [], e && n ? Yn(e) : []);
|
|
718
690
|
}
|
|
719
|
-
return t.concat(r,
|
|
691
|
+
return t.concat(r, Yn(r, [], n));
|
|
720
692
|
}
|
|
721
|
-
function
|
|
693
|
+
function Xn(e) {
|
|
722
694
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
723
695
|
}
|
|
724
696
|
// ../../node_modules/.pnpm/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
725
|
-
function
|
|
726
|
-
let t =
|
|
697
|
+
function Zn(e) {
|
|
698
|
+
let t = Gn(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = Mn(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = Kt(n) !== a || Kt(r) !== o;
|
|
727
699
|
return s && (n = a, r = o), {
|
|
728
700
|
width: n,
|
|
729
701
|
height: r,
|
|
730
702
|
$: s
|
|
731
703
|
};
|
|
732
704
|
}
|
|
733
|
-
function
|
|
734
|
-
return
|
|
705
|
+
function Qn(e) {
|
|
706
|
+
return jn(e) ? e : e.contextElement;
|
|
735
707
|
}
|
|
736
|
-
function
|
|
737
|
-
let t =
|
|
738
|
-
if (!
|
|
739
|
-
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } =
|
|
708
|
+
function $n(e) {
|
|
709
|
+
let t = Qn(e);
|
|
710
|
+
if (!Mn(t)) return qt(1);
|
|
711
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = Zn(t), o = (a ? Kt(n.width) : n.width) / r, s = (a ? Kt(n.height) : n.height) / i;
|
|
740
712
|
return o && Number.isFinite(o) || (o = 1), s && Number.isFinite(s) || (s = 1), {
|
|
741
713
|
x: o,
|
|
742
714
|
y: s
|
|
743
715
|
};
|
|
744
716
|
}
|
|
745
|
-
var
|
|
746
|
-
function
|
|
717
|
+
var er = /*#__PURE__*/ qt(0);
|
|
718
|
+
function tr(e) {
|
|
747
719
|
let t = Z(e);
|
|
748
|
-
return !
|
|
720
|
+
return !Un() || !t.visualViewport ? er : {
|
|
749
721
|
x: t.visualViewport.offsetLeft,
|
|
750
722
|
y: t.visualViewport.offsetTop
|
|
751
723
|
};
|
|
752
724
|
}
|
|
753
|
-
function
|
|
725
|
+
function nr(e, t, n) {
|
|
754
726
|
return t === void 0 && (t = !1), !!n && t && n === Z(e);
|
|
755
727
|
}
|
|
756
|
-
function
|
|
728
|
+
function rr(e, t, n, r) {
|
|
757
729
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
758
|
-
let i = e.getBoundingClientRect(), a =
|
|
759
|
-
t && (r ?
|
|
760
|
-
let s =
|
|
730
|
+
let i = e.getBoundingClientRect(), a = Qn(e), o = qt(1);
|
|
731
|
+
t && (r ? jn(r) && (o = $n(r)) : o = $n(e));
|
|
732
|
+
let s = nr(a, n, r) ? tr(a) : qt(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
761
733
|
if (a && r) {
|
|
762
|
-
let e = Z(a), t =
|
|
734
|
+
let e = Z(a), t = jn(r) ? Z(r) : r, n = e, i = Xn(n);
|
|
763
735
|
for (; i && t !== n;) {
|
|
764
|
-
let e =
|
|
765
|
-
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = Z(i), i =
|
|
736
|
+
let e = $n(i), t = i.getBoundingClientRect(), r = Gn(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
737
|
+
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = Z(i), i = Xn(n);
|
|
766
738
|
}
|
|
767
739
|
}
|
|
768
|
-
return
|
|
740
|
+
return gn({
|
|
769
741
|
width: u,
|
|
770
742
|
height: d,
|
|
771
743
|
x: c,
|
|
772
744
|
y: l
|
|
773
745
|
});
|
|
774
746
|
}
|
|
775
|
-
function
|
|
776
|
-
let n =
|
|
777
|
-
return t ? t.left + n :
|
|
747
|
+
function ir(e, t) {
|
|
748
|
+
let n = Kn(e).scrollLeft;
|
|
749
|
+
return t ? t.left + n : rr(kn(e)).left + n;
|
|
778
750
|
}
|
|
779
|
-
function
|
|
751
|
+
function ar(e, t) {
|
|
780
752
|
let n = e.getBoundingClientRect();
|
|
781
753
|
return {
|
|
782
|
-
x: n.left + t.scrollLeft -
|
|
754
|
+
x: n.left + t.scrollLeft - ir(e, n),
|
|
783
755
|
y: n.top + t.scrollTop
|
|
784
756
|
};
|
|
785
757
|
}
|
|
786
|
-
function
|
|
787
|
-
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o =
|
|
758
|
+
function or(e) {
|
|
759
|
+
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = kn(r), s = t ? In(t.floating) : !1;
|
|
788
760
|
if (r === o || s && a) return n;
|
|
789
761
|
let c = {
|
|
790
762
|
scrollLeft: 0,
|
|
791
763
|
scrollTop: 0
|
|
792
|
-
}, l =
|
|
793
|
-
if ((d || !a) && ((
|
|
794
|
-
let e =
|
|
795
|
-
l =
|
|
764
|
+
}, l = qt(1), u = qt(0), d = Mn(r);
|
|
765
|
+
if ((d || !a) && ((On(r) !== "body" || Pn(o)) && (c = Kn(r)), d)) {
|
|
766
|
+
let e = rr(r);
|
|
767
|
+
l = $n(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
796
768
|
}
|
|
797
|
-
let f = o && !d && !a ?
|
|
769
|
+
let f = o && !d && !a ? ar(o, c) : qt(0);
|
|
798
770
|
return {
|
|
799
771
|
width: n.width * l.x,
|
|
800
772
|
height: n.height * l.y,
|
|
@@ -802,29 +774,29 @@ function hr(e) {
|
|
|
802
774
|
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
|
|
803
775
|
};
|
|
804
776
|
}
|
|
805
|
-
function
|
|
777
|
+
function sr(e) {
|
|
806
778
|
return e.getClientRects ? Array.from(e.getClientRects()) : [];
|
|
807
779
|
}
|
|
808
|
-
function
|
|
809
|
-
let t =
|
|
810
|
-
return
|
|
780
|
+
function cr(e) {
|
|
781
|
+
let t = Kn(e), n = e.ownerDocument.body, r = Gt(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = Gt(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight), a = -t.scrollLeft + ir(e), o = -t.scrollTop;
|
|
782
|
+
return Gn(n).direction === "rtl" && (a += Gt(e.clientWidth, n.clientWidth) - r), {
|
|
811
783
|
width: r,
|
|
812
784
|
height: i,
|
|
813
785
|
x: a,
|
|
814
786
|
y: o
|
|
815
787
|
};
|
|
816
788
|
}
|
|
817
|
-
var
|
|
818
|
-
function
|
|
789
|
+
var lr = 25;
|
|
790
|
+
function ur(e, t, n) {
|
|
819
791
|
n === void 0 && (n = "viewport");
|
|
820
|
-
let r = n === "layoutViewport", i = Z(e), a =
|
|
792
|
+
let r = n === "layoutViewport", i = Z(e), a = kn(e), o = i.visualViewport, s = a.clientWidth, c = a.clientHeight, l = 0, u = 0;
|
|
821
793
|
if (o) {
|
|
822
|
-
let e = !
|
|
794
|
+
let e = !Un() || t === "fixed";
|
|
823
795
|
r ? e || (l = -o.offsetLeft, u = -o.offsetTop) : (s = o.width, c = o.height, e && (l = o.offsetLeft, u = o.offsetTop));
|
|
824
796
|
}
|
|
825
|
-
if (
|
|
797
|
+
if (ir(a) <= 0) {
|
|
826
798
|
let e = a.ownerDocument, t = e.body, n = getComputedStyle(t), r = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, i = Math.abs(a.clientWidth - t.clientWidth - r), o = getComputedStyle(a).scrollbarGutter === "stable both-edges" ? i / 2 : i;
|
|
827
|
-
o <=
|
|
799
|
+
o <= lr && (s -= o);
|
|
828
800
|
}
|
|
829
801
|
return {
|
|
830
802
|
width: s,
|
|
@@ -833,8 +805,8 @@ function yr(e, t, n) {
|
|
|
833
805
|
y: u
|
|
834
806
|
};
|
|
835
807
|
}
|
|
836
|
-
function
|
|
837
|
-
let n =
|
|
808
|
+
function dr(e, t) {
|
|
809
|
+
let n = rr(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = $n(e);
|
|
838
810
|
return {
|
|
839
811
|
width: e.clientWidth * a.x,
|
|
840
812
|
height: e.clientHeight * a.y,
|
|
@@ -842,13 +814,13 @@ function br(e, t) {
|
|
|
842
814
|
y: r * a.y
|
|
843
815
|
};
|
|
844
816
|
}
|
|
845
|
-
function
|
|
817
|
+
function fr(e, t, n) {
|
|
846
818
|
let r;
|
|
847
|
-
if (t === "viewport" || t === "layoutViewport") r =
|
|
848
|
-
else if (t === "document") r =
|
|
849
|
-
else if (
|
|
819
|
+
if (t === "viewport" || t === "layoutViewport") r = ur(e, n, t);
|
|
820
|
+
else if (t === "document") r = cr(kn(e));
|
|
821
|
+
else if (jn(t)) r = dr(t, n);
|
|
850
822
|
else {
|
|
851
|
-
let n =
|
|
823
|
+
let n = tr(e);
|
|
852
824
|
r = {
|
|
853
825
|
x: t.x - n.x,
|
|
854
826
|
y: t.y - n.y,
|
|
@@ -856,23 +828,23 @@ function xr(e, t, n) {
|
|
|
856
828
|
height: t.height
|
|
857
829
|
};
|
|
858
830
|
}
|
|
859
|
-
return
|
|
831
|
+
return gn(r);
|
|
860
832
|
}
|
|
861
|
-
function
|
|
833
|
+
function pr(e, t) {
|
|
862
834
|
let n = t.get(e);
|
|
863
835
|
if (n) return n;
|
|
864
|
-
let r =
|
|
865
|
-
for (;
|
|
866
|
-
let e =
|
|
867
|
-
!t && (n === "fixed" || n === "absolute" && e.position === "static") ? r = r.filter((e) => e !== o) : i = e, o =
|
|
836
|
+
let r = Yn(e, [], !1).filter((e) => jn(e) && On(e) !== "body"), i = null, a = Gn(e).position === "fixed", o = a ? qn(e) : e;
|
|
837
|
+
for (; jn(o) && !Wn(o);) {
|
|
838
|
+
let e = Gn(o), t = Vn(o), n = i ? i.position : a ? "fixed" : "";
|
|
839
|
+
!t && (n === "fixed" || n === "absolute" && e.position === "static") ? r = r.filter((e) => e !== o) : i = e, o = qn(o);
|
|
868
840
|
}
|
|
869
841
|
return t.set(e, r), r;
|
|
870
842
|
}
|
|
871
|
-
function
|
|
872
|
-
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ?
|
|
843
|
+
function mr(e) {
|
|
844
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? In(t) ? [] : pr(t, this._c) : [].concat(n), r], o = fr(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
873
845
|
for (let e = 1; e < a.length; e++) {
|
|
874
|
-
let n =
|
|
875
|
-
s =
|
|
846
|
+
let n = fr(t, a[e], i);
|
|
847
|
+
s = Gt(n.top, s), c = Wt(n.right, c), l = Wt(n.bottom, l), u = Gt(n.left, u);
|
|
876
848
|
}
|
|
877
849
|
return {
|
|
878
850
|
width: c - u,
|
|
@@ -881,24 +853,24 @@ function Cr(e) {
|
|
|
881
853
|
y: s
|
|
882
854
|
};
|
|
883
855
|
}
|
|
884
|
-
function
|
|
885
|
-
let { width: t, height: n } =
|
|
856
|
+
function hr(e) {
|
|
857
|
+
let { width: t, height: n } = Zn(e);
|
|
886
858
|
return {
|
|
887
859
|
width: t,
|
|
888
860
|
height: n
|
|
889
861
|
};
|
|
890
862
|
}
|
|
891
|
-
function
|
|
892
|
-
let r =
|
|
863
|
+
function gr(e, t, n) {
|
|
864
|
+
let r = Mn(t), i = kn(t), a = n === "fixed", o = rr(e, !0, a, t), s = {
|
|
893
865
|
scrollLeft: 0,
|
|
894
866
|
scrollTop: 0
|
|
895
|
-
}, c =
|
|
896
|
-
if ((r || !a) && ((
|
|
897
|
-
let e =
|
|
867
|
+
}, c = qt(0);
|
|
868
|
+
if ((r || !a) && ((On(t) !== "body" || Pn(i)) && (s = Kn(t)), r)) {
|
|
869
|
+
let e = rr(t, !0, a, t);
|
|
898
870
|
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
899
871
|
}
|
|
900
|
-
!r && i && (c.x =
|
|
901
|
-
let l = i && !r && !a ?
|
|
872
|
+
!r && i && (c.x = ir(i));
|
|
873
|
+
let l = i && !r && !a ? ar(i, s) : qt(0);
|
|
902
874
|
return {
|
|
903
875
|
x: o.left + s.scrollLeft - c.x - l.x,
|
|
904
876
|
y: o.top + s.scrollTop - c.y - l.y,
|
|
@@ -906,34 +878,34 @@ function Tr(e, t, n) {
|
|
|
906
878
|
height: o.height
|
|
907
879
|
};
|
|
908
880
|
}
|
|
909
|
-
function
|
|
910
|
-
return
|
|
881
|
+
function _r(e) {
|
|
882
|
+
return Gn(e).position === "static";
|
|
911
883
|
}
|
|
912
|
-
function
|
|
913
|
-
if (!
|
|
884
|
+
function vr(e, t) {
|
|
885
|
+
if (!Mn(e) || Gn(e).position === "fixed") return null;
|
|
914
886
|
if (t) return t(e);
|
|
915
887
|
let n = e.offsetParent;
|
|
916
|
-
return
|
|
888
|
+
return kn(e) === n && (n = n.ownerDocument.body), n;
|
|
917
889
|
}
|
|
918
|
-
function
|
|
890
|
+
function yr(e, t) {
|
|
919
891
|
let n = Z(e);
|
|
920
|
-
if (
|
|
921
|
-
if (!
|
|
922
|
-
let t =
|
|
923
|
-
for (; t &&
|
|
924
|
-
if (
|
|
925
|
-
t =
|
|
892
|
+
if (In(e)) return n;
|
|
893
|
+
if (!Mn(e)) {
|
|
894
|
+
let t = qn(e);
|
|
895
|
+
for (; t && !Wn(t);) {
|
|
896
|
+
if (jn(t) && !_r(t)) return t;
|
|
897
|
+
t = qn(t);
|
|
926
898
|
}
|
|
927
899
|
return n;
|
|
928
900
|
}
|
|
929
|
-
let r =
|
|
930
|
-
for (; r &&
|
|
931
|
-
return r &&
|
|
901
|
+
let r = vr(e, t);
|
|
902
|
+
for (; r && Fn(r) && _r(r);) r = vr(r, t);
|
|
903
|
+
return r && Wn(r) && _r(r) && !Vn(r) ? n : r || Hn(e) || n;
|
|
932
904
|
}
|
|
933
|
-
var
|
|
934
|
-
let t = this.getOffsetParent ||
|
|
905
|
+
var br = async function(e) {
|
|
906
|
+
let t = this.getOffsetParent || yr, n = this.getDimensions, r = await n(e.floating);
|
|
935
907
|
return {
|
|
936
|
-
reference:
|
|
908
|
+
reference: gr(e.reference, await t(e.floating), e.strategy),
|
|
937
909
|
floating: {
|
|
938
910
|
x: 0,
|
|
939
911
|
y: 0,
|
|
@@ -942,76 +914,76 @@ var kr = async function(e) {
|
|
|
942
914
|
}
|
|
943
915
|
};
|
|
944
916
|
};
|
|
945
|
-
function
|
|
946
|
-
return
|
|
947
|
-
}
|
|
948
|
-
var
|
|
949
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
950
|
-
getDocumentElement:
|
|
951
|
-
getClippingRect:
|
|
952
|
-
getOffsetParent:
|
|
953
|
-
getElementRects:
|
|
954
|
-
getClientRects:
|
|
955
|
-
getDimensions:
|
|
956
|
-
getScale:
|
|
957
|
-
isElement:
|
|
958
|
-
isRTL:
|
|
959
|
-
},
|
|
917
|
+
function xr(e) {
|
|
918
|
+
return Gn(e).direction === "rtl";
|
|
919
|
+
}
|
|
920
|
+
var Sr = {
|
|
921
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: or,
|
|
922
|
+
getDocumentElement: kn,
|
|
923
|
+
getClippingRect: mr,
|
|
924
|
+
getOffsetParent: yr,
|
|
925
|
+
getElementRects: br,
|
|
926
|
+
getClientRects: sr,
|
|
927
|
+
getDimensions: hr,
|
|
928
|
+
getScale: $n,
|
|
929
|
+
isElement: jn,
|
|
930
|
+
isRTL: xr
|
|
931
|
+
}, Cr = Tn, wr = En, Tr = Sn, Er = xn, Dr = (e, t, n) => {
|
|
960
932
|
let r = /* @__PURE__ */ new Map(), i = n ?? {}, a = {
|
|
961
|
-
...
|
|
933
|
+
...Sr,
|
|
962
934
|
...i.platform,
|
|
963
935
|
_c: r
|
|
964
936
|
};
|
|
965
|
-
return
|
|
937
|
+
return bn(e, t, {
|
|
966
938
|
...i,
|
|
967
939
|
platform: a
|
|
968
940
|
});
|
|
969
941
|
};
|
|
970
942
|
// ../../node_modules/.pnpm/@floating-ui+vue@2.0.1_vue@3.5.44_typescript@6.0.3_/node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs
|
|
971
|
-
function
|
|
943
|
+
function Or(e) {
|
|
972
944
|
return typeof e == "object" && !!e && "$el" in e;
|
|
973
945
|
}
|
|
974
|
-
function
|
|
975
|
-
if (
|
|
946
|
+
function kr(e) {
|
|
947
|
+
if (Or(e)) {
|
|
976
948
|
let t = e.$el;
|
|
977
|
-
return
|
|
949
|
+
return An(t) && On(t) === "#comment" ? null : t;
|
|
978
950
|
}
|
|
979
951
|
return e;
|
|
980
952
|
}
|
|
981
|
-
function
|
|
953
|
+
function Ar(e) {
|
|
982
954
|
return {
|
|
983
955
|
name: "arrow",
|
|
984
956
|
options: e,
|
|
985
957
|
fn(t) {
|
|
986
|
-
let n =
|
|
987
|
-
return n == null ? {} :
|
|
958
|
+
let n = kr(pt(e.element));
|
|
959
|
+
return n == null ? {} : Er({
|
|
988
960
|
element: n,
|
|
989
961
|
padding: e.padding
|
|
990
962
|
}).fn(t);
|
|
991
963
|
}
|
|
992
964
|
};
|
|
993
965
|
}
|
|
994
|
-
function
|
|
966
|
+
function jr(e) {
|
|
995
967
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
996
968
|
}
|
|
997
|
-
function
|
|
998
|
-
let n =
|
|
969
|
+
function Mr(e, t) {
|
|
970
|
+
let n = jr(e);
|
|
999
971
|
return Math.round(t * n) / n;
|
|
1000
972
|
}
|
|
1001
|
-
function
|
|
973
|
+
function Nr(e, t, n) {
|
|
1002
974
|
n === void 0 && (n = {});
|
|
1003
|
-
let r = n.whileElementsMounted, i =
|
|
975
|
+
let r = n.whileElementsMounted, i = N(() => pt(n.open) ?? !0), a = N(() => pt(n.middleware)), o = N(() => pt(n.placement) ?? "bottom"), s = N(() => pt(n.strategy) ?? "absolute"), c = N(() => pt(n.transform) ?? !0), l = N(() => kr(e.value)), u = N(() => kr(t.value)), d = U(0), f = U(0), p = U(s.value), m = U(o.value), h = ft({}), g = U(!1), _ = N(() => {
|
|
1004
976
|
let e = {
|
|
1005
977
|
position: p.value,
|
|
1006
978
|
left: "0",
|
|
1007
979
|
top: "0"
|
|
1008
980
|
};
|
|
1009
981
|
if (!u.value) return e;
|
|
1010
|
-
let t =
|
|
982
|
+
let t = Mr(u.value, d.value), n = Mr(u.value, f.value);
|
|
1011
983
|
return c.value ? {
|
|
1012
984
|
...e,
|
|
1013
985
|
transform: "translate(" + t + "px, " + n + "px)",
|
|
1014
|
-
...
|
|
986
|
+
...jr(u.value) >= 1.5 && { willChange: "transform" }
|
|
1015
987
|
} : {
|
|
1016
988
|
position: p.value,
|
|
1017
989
|
left: t + "px",
|
|
@@ -1021,7 +993,7 @@ function Hr(e, t, n) {
|
|
|
1021
993
|
function y() {
|
|
1022
994
|
if (l.value == null || u.value == null) return;
|
|
1023
995
|
let e = i.value;
|
|
1024
|
-
|
|
996
|
+
Dr(l.value, u.value, {
|
|
1025
997
|
middleware: a.value,
|
|
1026
998
|
placement: o.value,
|
|
1027
999
|
strategy: s.value
|
|
@@ -1043,13 +1015,13 @@ function Hr(e, t, n) {
|
|
|
1043
1015
|
o,
|
|
1044
1016
|
s,
|
|
1045
1017
|
i
|
|
1046
|
-
], y, { flush: "sync" }), Y([l, u], x, { flush: "sync" }), Y(i, S, { flush: "sync" }),
|
|
1047
|
-
x:
|
|
1048
|
-
y:
|
|
1049
|
-
strategy:
|
|
1050
|
-
placement:
|
|
1051
|
-
middlewareData:
|
|
1052
|
-
isPositioned:
|
|
1018
|
+
], y, { flush: "sync" }), Y([l, u], x, { flush: "sync" }), Y(i, S, { flush: "sync" }), Xe() && at(b), {
|
|
1019
|
+
x: dt(d),
|
|
1020
|
+
y: dt(f),
|
|
1021
|
+
strategy: dt(p),
|
|
1022
|
+
placement: dt(m),
|
|
1023
|
+
middlewareData: dt(h),
|
|
1024
|
+
isPositioned: dt(g),
|
|
1053
1025
|
floatingStyles: _,
|
|
1054
1026
|
update: y
|
|
1055
1027
|
};
|
|
@@ -1057,38 +1029,38 @@ function Hr(e, t, n) {
|
|
|
1057
1029
|
// src/client/theme-default/utils/keys.ts
|
|
1058
1030
|
var Q = /* @__PURE__ */ function(e) {
|
|
1059
1031
|
return e.ArrowDown = "ArrowDown", e.ArrowUp = "ArrowUp", e.ArrowLeft = "ArrowLeft", e.ArrowRight = "ArrowRight", e.Enter = "Enter", e.Tab = "Tab", e.Space = " ", e.Escape = "Escape", e.Shift = "Shift", e.Control = "Control", e.Alt = "Alt", e.Meta = "Meta", e.Delete = "Delete", e.Backspace = "Backspace", e.F1 = "F1", e.F2 = "F2", e.F3 = "F3", e.F4 = "F4", e.F5 = "F5", e.F6 = "F6", e.F7 = "F7", e.F8 = "F8", e.F9 = "F9", e.F10 = "F10", e.F11 = "F11", e.F12 = "F12", e.a = "a", e.b = "b", e.c = "c", e.d = "d", e.e = "e", e.f = "f", e.g = "g", e.h = "h", e.i = "i", e.j = "j", e.k = "k", e.l = "l", e.m = "m", e.n = "n", e.o = "o", e.p = "p", e.q = "q", e.r = "r", e.s = "s", e.t = "t", e.u = "u", e.v = "v", e.w = "w", e.x = "x", e.y = "y", e.z = "z", e.FSlash = "/", e.Question = "?", e.Backslash = "\\", e;
|
|
1060
|
-
}({}),
|
|
1032
|
+
}({}), Pr = { class: "td-kbd-shortcut" }, $ = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1061
1033
|
__name: "TdKbdShortcut",
|
|
1062
1034
|
props: { keys: {} },
|
|
1063
1035
|
setup(e) {
|
|
1064
1036
|
let t = {
|
|
1065
|
-
[Q.ArrowDown]:
|
|
1066
|
-
[Q.ArrowUp]:
|
|
1067
|
-
[Q.ArrowLeft]:
|
|
1068
|
-
[Q.ArrowRight]:
|
|
1069
|
-
[Q.Control]:
|
|
1070
|
-
[Q.Meta]:
|
|
1071
|
-
[Q.Alt]:
|
|
1072
|
-
[Q.Enter]:
|
|
1073
|
-
[Q.Delete]:
|
|
1074
|
-
[Q.Space]:
|
|
1037
|
+
[Q.ArrowDown]: be,
|
|
1038
|
+
[Q.ArrowUp]: fe,
|
|
1039
|
+
[Q.ArrowLeft]: oe,
|
|
1040
|
+
[Q.ArrowRight]: He,
|
|
1041
|
+
[Q.Control]: Et,
|
|
1042
|
+
[Q.Meta]: Et,
|
|
1043
|
+
[Q.Alt]: Mt,
|
|
1044
|
+
[Q.Enter]: Dt,
|
|
1045
|
+
[Q.Delete]: Ot,
|
|
1046
|
+
[Q.Space]: Nt
|
|
1075
1047
|
}, n = {
|
|
1076
1048
|
[Q.Shift]: "⇧",
|
|
1077
1049
|
[Q.Escape]: "Esc",
|
|
1078
1050
|
[Q.Tab]: "Tab",
|
|
1079
1051
|
[Q.Backspace]: "⌫"
|
|
1080
|
-
}, r =
|
|
1052
|
+
}, r = N(() => e.keys.map((e) => {
|
|
1081
1053
|
let r = t[e];
|
|
1082
1054
|
if (r) return { icon: r };
|
|
1083
1055
|
let i = n[e];
|
|
1084
1056
|
return i ? { label: i } : { label: e.toUpperCase() };
|
|
1085
1057
|
}));
|
|
1086
|
-
return (e, t) => (H(),
|
|
1058
|
+
return (e, t) => (H(), I("span", Pr, [(H(!0), I(M, null, W(r.value, (e, t) => (H(), I("kbd", { key: t }, [e.icon ? (H(), P(ut(e.icon), {
|
|
1087
1059
|
key: 0,
|
|
1088
1060
|
size: 12
|
|
1089
|
-
})) : (H(),
|
|
1061
|
+
})) : (H(), I(M, { key: 1 }, [R(K(e.label), 1)], 64))]))), 128))]));
|
|
1090
1062
|
}
|
|
1091
|
-
}), [["__scopeId", "data-v-ad94203e"]]),
|
|
1063
|
+
}), [["__scopeId", "data-v-ad94203e"]]), Fr = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1092
1064
|
inheritAttrs: !1,
|
|
1093
1065
|
__name: "TdTooltip",
|
|
1094
1066
|
props: {
|
|
@@ -1101,13 +1073,13 @@ var Q = /* @__PURE__ */ function(e) {
|
|
|
1101
1073
|
shortcut: { default: () => void 0 }
|
|
1102
1074
|
},
|
|
1103
1075
|
setup(e) {
|
|
1104
|
-
let t = J("trigger"), n = J("tooltip"), r = J("arrowEl"), i = U(!1), a, o, { floatingStyles: s, middlewareData: c, placement: l } =
|
|
1076
|
+
let t = J("trigger"), n = J("tooltip"), r = J("arrowEl"), i = U(!1), a, o, { floatingStyles: s, middlewareData: c, placement: l } = Nr(t, n, {
|
|
1105
1077
|
placement: e.placement,
|
|
1106
1078
|
middleware: [
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1079
|
+
Cr(8),
|
|
1080
|
+
Tr(),
|
|
1081
|
+
wr({ padding: 8 }),
|
|
1082
|
+
Ar({ element: r })
|
|
1111
1083
|
]
|
|
1112
1084
|
});
|
|
1113
1085
|
function u() {
|
|
@@ -1119,39 +1091,39 @@ var Q = /* @__PURE__ */ function(e) {
|
|
|
1119
1091
|
i.value = !0;
|
|
1120
1092
|
}, 400));
|
|
1121
1093
|
}
|
|
1122
|
-
|
|
1094
|
+
rt(u);
|
|
1123
1095
|
function f() {
|
|
1124
1096
|
u(), o = setTimeout(() => {
|
|
1125
1097
|
i.value = !1;
|
|
1126
1098
|
}, 100);
|
|
1127
1099
|
}
|
|
1128
|
-
return (r, a) => (H(),
|
|
1100
|
+
return (r, a) => (H(), I(M, null, [L("span", et({
|
|
1129
1101
|
ref_key: "trigger",
|
|
1130
1102
|
ref: t
|
|
1131
1103
|
}, r.$attrs, {
|
|
1132
1104
|
class: "td-tooltip-trigger",
|
|
1133
1105
|
onMouseenter: d,
|
|
1134
1106
|
onMouseleave: f
|
|
1135
|
-
}), [G(r.$slots, "default", {}, void 0, !0)], 16), (H(),
|
|
1107
|
+
}), [G(r.$slots, "default", {}, void 0, !0)], 16), (H(), P(Je, { to: "body" }, [i.value ? (H(), I("div", {
|
|
1136
1108
|
key: 0,
|
|
1137
1109
|
ref_key: "tooltip",
|
|
1138
1110
|
ref: n,
|
|
1139
1111
|
class: "td-tooltip",
|
|
1140
|
-
style:
|
|
1112
|
+
style: nt(q(s)),
|
|
1141
1113
|
role: "tooltip",
|
|
1142
1114
|
onMouseenter: u,
|
|
1143
1115
|
onMouseleave: f
|
|
1144
1116
|
}, [
|
|
1145
|
-
|
|
1146
|
-
e.shortcut ? (H(),
|
|
1117
|
+
R(K(e.text) + " ", 1),
|
|
1118
|
+
e.shortcut ? (H(), P($, {
|
|
1147
1119
|
key: 0,
|
|
1148
1120
|
keys: e.shortcut,
|
|
1149
1121
|
class: "td-tooltip-shortcut"
|
|
1150
|
-
}, null, 8, ["keys"])) :
|
|
1151
|
-
|
|
1122
|
+
}, null, 8, ["keys"])) : F("", !0),
|
|
1123
|
+
L("div", {
|
|
1152
1124
|
ref: "arrowEl",
|
|
1153
1125
|
class: "td-tooltip-arrow",
|
|
1154
|
-
style:
|
|
1126
|
+
style: nt({
|
|
1155
1127
|
left: q(c).arrow?.x === void 0 ? "" : `${q(c).arrow.x}px`,
|
|
1156
1128
|
top: q(c).arrow?.y === void 0 ? "" : `${q(c).arrow.y}px`,
|
|
1157
1129
|
...q(l).startsWith("bottom") ? { top: "-4px" } : {},
|
|
@@ -1160,16 +1132,16 @@ var Q = /* @__PURE__ */ function(e) {
|
|
|
1160
1132
|
...q(l).startsWith("left") ? { right: "-4px" } : {}
|
|
1161
1133
|
})
|
|
1162
1134
|
}, null, 4)
|
|
1163
|
-
], 36)) :
|
|
1135
|
+
], 36)) : F("", !0)]))], 64));
|
|
1164
1136
|
}
|
|
1165
1137
|
}), [["__scopeId", "data-v-db48de27"]]);
|
|
1166
1138
|
// src/client/theme-default/utils/renderInlineMarkup.ts
|
|
1167
|
-
function
|
|
1168
|
-
let t = U(
|
|
1169
|
-
return
|
|
1139
|
+
function Ir(e) {
|
|
1140
|
+
let t = U(Lr(e()));
|
|
1141
|
+
return _t((n) => {
|
|
1170
1142
|
let r = e();
|
|
1171
1143
|
if (!r.includes("$")) {
|
|
1172
|
-
t.value =
|
|
1144
|
+
t.value = Lr(r);
|
|
1173
1145
|
return;
|
|
1174
1146
|
}
|
|
1175
1147
|
let i = !0;
|
|
@@ -1180,58 +1152,58 @@ function Gr(e) {
|
|
|
1180
1152
|
});
|
|
1181
1153
|
}), t;
|
|
1182
1154
|
}
|
|
1183
|
-
function
|
|
1155
|
+
function Lr(e) {
|
|
1184
1156
|
let t = 0, n = "";
|
|
1185
|
-
for (let r of e.matchAll(
|
|
1157
|
+
for (let r of e.matchAll(qe)) n += f(e.slice(t, r.index)), r[1] === void 0 ? n += f(r[0]) : n += `<code>${f(r[1])}</code>`, t = r.index + r[0].length;
|
|
1186
1158
|
return n += f(e.slice(t)), n;
|
|
1187
1159
|
}
|
|
1188
1160
|
// src/client/theme-default/components/TdTree/TdTreeNodeLabel.vue?vue&type=script&setup=true&lang.ts
|
|
1189
|
-
var
|
|
1161
|
+
var Rr = ["innerHTML"], zr = /* @__PURE__ */ B({
|
|
1190
1162
|
__name: "TdTreeNodeLabel",
|
|
1191
1163
|
props: { text: {} },
|
|
1192
1164
|
setup(e) {
|
|
1193
|
-
let t =
|
|
1194
|
-
return (e, n) => (H(),
|
|
1165
|
+
let t = Ir(() => e.text);
|
|
1166
|
+
return (e, n) => (H(), I("span", { innerHTML: q(t) }, null, 8, Rr));
|
|
1195
1167
|
}
|
|
1196
|
-
}),
|
|
1168
|
+
}), Br = ["aria-expanded"], Vr = { class: "td-tree-label-text" }, Hr = ["href"], Ur = { class: "td-tree-count" }, Wr = ["href"], Gr = ["href"], Kr = {
|
|
1197
1169
|
key: 2,
|
|
1198
1170
|
class: "td-tree-time"
|
|
1199
|
-
},
|
|
1171
|
+
}, qr = 10, Jr = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1200
1172
|
__name: "TdTreeNode",
|
|
1201
1173
|
props: {
|
|
1202
1174
|
node: {},
|
|
1203
1175
|
urlPrefix: { default: "" }
|
|
1204
1176
|
},
|
|
1205
1177
|
setup(n) {
|
|
1206
|
-
let r =
|
|
1178
|
+
let r = Ie(), { withBase: i } = j(), a = N(() => w(n.urlPrefix, n.node.name)), o = N(() => l(n.node)), f = N(() => o.value ? t(o.value.filepath) : s(a.value)), p = N(() => i(f.value)), m = N(() => o.value?.label ?? c(n.node.name)), h = N(() => o.value?.icon ? Le(o.value.icon.name) : void 0), g = N(() => n.node.entries.filter((e) => e.kind === "dir" || !d(e.item.filepath))), _ = N(() => 0 < n.node.entries.length), v = N(() => y(n.node));
|
|
1207
1179
|
function y(e) {
|
|
1208
1180
|
let t = 0;
|
|
1209
1181
|
for (let n of e.entries) n.kind === "file" ? t++ : t += y(n.node);
|
|
1210
1182
|
return t;
|
|
1211
1183
|
}
|
|
1212
|
-
let b = U(!e(a.value, r.path)), x = U(!1), S =
|
|
1184
|
+
let b = U(!e(a.value, r.path)), x = U(!1), S = N(() => g.value.filter((e) => e.kind === "file")), C = N(() => S.value.length), E = N(() => {
|
|
1213
1185
|
let e = 0;
|
|
1214
1186
|
for (let n of g.value) if (n.kind === "file") {
|
|
1215
1187
|
if (t(n.item.filepath) === r.path) return e;
|
|
1216
1188
|
e++;
|
|
1217
1189
|
}
|
|
1218
1190
|
return -1;
|
|
1219
|
-
}), ee =
|
|
1220
|
-
if (C.value <=
|
|
1191
|
+
}), ee = N(() => {
|
|
1192
|
+
if (C.value <= qr) return {
|
|
1221
1193
|
start: 0,
|
|
1222
1194
|
end: C.value
|
|
1223
1195
|
};
|
|
1224
1196
|
let e = E.value;
|
|
1225
1197
|
if (e < 0) return {
|
|
1226
1198
|
start: 0,
|
|
1227
|
-
end:
|
|
1199
|
+
end: qr
|
|
1228
1200
|
};
|
|
1229
|
-
let t = Math.max(0, e - 4), n = t +
|
|
1230
|
-
return C.value < n && (n = C.value, t = Math.max(0, n -
|
|
1201
|
+
let t = Math.max(0, e - 4), n = t + qr;
|
|
1202
|
+
return C.value < n && (n = C.value, t = Math.max(0, n - qr)), {
|
|
1231
1203
|
start: t,
|
|
1232
1204
|
end: n
|
|
1233
1205
|
};
|
|
1234
|
-
}), te =
|
|
1206
|
+
}), te = N(() => x.value ? 0 : ee.value.start), D = N(() => x.value ? 0 : Math.max(0, C.value - ee.value.end)), ne = N(() => {
|
|
1235
1207
|
if (x.value) return g.value;
|
|
1236
1208
|
let { start: e, end: t } = ee.value, n = 0;
|
|
1237
1209
|
return g.value.filter((r) => {
|
|
@@ -1243,181 +1215,181 @@ var qr = ["innerHTML"], Jr = /* @__PURE__ */ z({
|
|
|
1243
1215
|
Y(() => r.path, (t) => {
|
|
1244
1216
|
e(a.value, t) && (b.value = !1);
|
|
1245
1217
|
});
|
|
1246
|
-
function
|
|
1218
|
+
function re() {
|
|
1247
1219
|
x.value = !0;
|
|
1248
1220
|
}
|
|
1249
|
-
function
|
|
1221
|
+
function ie(e) {
|
|
1250
1222
|
return r.path === e;
|
|
1251
1223
|
}
|
|
1252
|
-
function
|
|
1224
|
+
function ae(e) {
|
|
1253
1225
|
e.key === "ArrowRight" && b.value ? (b.value = !1, e.preventDefault()) : e.key === "ArrowLeft" && !b.value && (b.value = !0, e.preventDefault());
|
|
1254
1226
|
}
|
|
1255
|
-
function
|
|
1227
|
+
function O() {
|
|
1256
1228
|
b.value = !b.value;
|
|
1257
1229
|
}
|
|
1258
1230
|
return (e, n) => {
|
|
1259
|
-
let r =
|
|
1260
|
-
return _.value ? (H(),
|
|
1231
|
+
let r = lt("TdTreeNode", !0);
|
|
1232
|
+
return _.value ? (H(), I("div", {
|
|
1261
1233
|
key: 0,
|
|
1262
1234
|
class: "td-tree-node",
|
|
1263
1235
|
role: "treeitem",
|
|
1264
1236
|
"aria-expanded": !b.value
|
|
1265
|
-
}, [
|
|
1237
|
+
}, [L("div", {
|
|
1266
1238
|
class: "td-tree-label",
|
|
1267
1239
|
role: "button",
|
|
1268
1240
|
tabindex: "0",
|
|
1269
|
-
onClick:
|
|
1270
|
-
onKeydown:
|
|
1241
|
+
onClick: O,
|
|
1242
|
+
onKeydown: ae
|
|
1271
1243
|
}, [
|
|
1272
|
-
|
|
1244
|
+
z(q(ue), {
|
|
1273
1245
|
size: 14,
|
|
1274
|
-
class:
|
|
1246
|
+
class: V(["td-tree-caret", { "is-collapsed": b.value }])
|
|
1275
1247
|
}, null, 8, ["class"]),
|
|
1276
|
-
|
|
1277
|
-
|
|
1248
|
+
L("span", Vr, K(m.value), 1),
|
|
1249
|
+
z(Fr, {
|
|
1278
1250
|
text: "Open index page",
|
|
1279
1251
|
always: ""
|
|
1280
1252
|
}, {
|
|
1281
|
-
default: X(() => [
|
|
1253
|
+
default: X(() => [L("a", {
|
|
1282
1254
|
href: p.value,
|
|
1283
|
-
class:
|
|
1284
|
-
onClick: n[0] ||=
|
|
1285
|
-
}, [h.value ? (H(),
|
|
1255
|
+
class: V(["td-tree-index-btn", { "is-active": ie(f.value) }]),
|
|
1256
|
+
onClick: n[0] ||= bt(() => {}, ["stop"])
|
|
1257
|
+
}, [h.value ? (H(), P(ut(h.value), {
|
|
1286
1258
|
key: 0,
|
|
1287
1259
|
size: 12
|
|
1288
|
-
})) :
|
|
1260
|
+
})) : ie(f.value) ? (H(), P(q(kt), {
|
|
1289
1261
|
key: 1,
|
|
1290
1262
|
size: 12
|
|
1291
|
-
})) : (H(),
|
|
1263
|
+
})) : (H(), P(q(ce), {
|
|
1292
1264
|
key: 2,
|
|
1293
1265
|
size: 12
|
|
1294
|
-
}))], 10,
|
|
1266
|
+
}))], 10, Hr)]),
|
|
1295
1267
|
_: 1
|
|
1296
1268
|
}),
|
|
1297
|
-
|
|
1298
|
-
], 32),
|
|
1299
|
-
class:
|
|
1269
|
+
L("span", Ur, K(v.value), 1)
|
|
1270
|
+
], 32), L("div", {
|
|
1271
|
+
class: V(["td-collapse td-tree-children", { "is-collapsed": b.value }]),
|
|
1300
1272
|
role: "group"
|
|
1301
|
-
}, [
|
|
1302
|
-
o.value ? (H(),
|
|
1273
|
+
}, [L("div", null, [
|
|
1274
|
+
o.value ? (H(), I("a", {
|
|
1303
1275
|
key: 0,
|
|
1304
1276
|
href: p.value,
|
|
1305
|
-
class:
|
|
1306
|
-
}, [
|
|
1277
|
+
class: V(["td-tree-link td-tree-index-entry", { "is-active": ie(f.value) }])
|
|
1278
|
+
}, [z(q(de), {
|
|
1307
1279
|
size: 14,
|
|
1308
1280
|
class: "td-tree-file-icon"
|
|
1309
|
-
}), n[1] ||=
|
|
1310
|
-
te.value > 0 ? (H(),
|
|
1281
|
+
}), n[1] ||= L("span", { class: "td-tree-link-text" }, "Overview", -1)], 10, Wr)) : F("", !0),
|
|
1282
|
+
te.value > 0 ? (H(), I("button", {
|
|
1311
1283
|
key: 1,
|
|
1312
1284
|
class: "td-tree-more",
|
|
1313
1285
|
type: "button",
|
|
1314
|
-
onClick:
|
|
1315
|
-
}, K(te.value) + " more... ", 1)) :
|
|
1316
|
-
(H(!0),
|
|
1286
|
+
onClick: re
|
|
1287
|
+
}, K(te.value) + " more... ", 1)) : F("", !0),
|
|
1288
|
+
(H(!0), I(M, null, W(ne.value, (e) => (H(), I(M, { key: e.kind === "dir" ? e.node.name : e.item.filepath }, [e.kind === "dir" ? (H(), P(r, {
|
|
1317
1289
|
key: 0,
|
|
1318
1290
|
node: e.node,
|
|
1319
1291
|
"url-prefix": a.value
|
|
1320
|
-
}, null, 8, ["node", "url-prefix"])) : (H(),
|
|
1292
|
+
}, null, 8, ["node", "url-prefix"])) : (H(), I("a", {
|
|
1321
1293
|
key: 1,
|
|
1322
1294
|
href: q(i)(q(t)(e.item.filepath)),
|
|
1323
|
-
class:
|
|
1295
|
+
class: V(["td-tree-link", { "is-active": ie(q(t)(e.item.filepath)) }])
|
|
1324
1296
|
}, [
|
|
1325
|
-
e.item.icon && q(
|
|
1297
|
+
e.item.icon && q(Le)(e.item.icon.name) ? (H(), P(ut(q(Le)(e.item.icon.name)), {
|
|
1326
1298
|
key: 0,
|
|
1327
1299
|
size: 14,
|
|
1328
1300
|
class: "td-tree-file-icon"
|
|
1329
|
-
})) : (H(),
|
|
1301
|
+
})) : (H(), P(q(he), {
|
|
1330
1302
|
key: 1,
|
|
1331
1303
|
size: 14,
|
|
1332
1304
|
class: "td-tree-file-icon"
|
|
1333
1305
|
})),
|
|
1334
|
-
|
|
1306
|
+
z(Fr, {
|
|
1335
1307
|
class: "td-tree-link-text",
|
|
1336
1308
|
text: q(T)(e.item.filepath, e.item.label)
|
|
1337
1309
|
}, {
|
|
1338
|
-
default: X(() => [
|
|
1310
|
+
default: X(() => [z(zr, { text: q(T)(e.item.filepath, e.item.label) }, null, 8, ["text"])]),
|
|
1339
1311
|
_: 2
|
|
1340
1312
|
}, 1032, ["text"]),
|
|
1341
|
-
e.item.fileMetadata ? (H(),
|
|
1342
|
-
], 10,
|
|
1343
|
-
|
|
1313
|
+
e.item.fileMetadata ? (H(), I("span", Kr, K(q(u)(e.item.fileMetadata.mtimeSecs)), 1)) : F("", !0)
|
|
1314
|
+
], 10, Gr))], 64))), 128)),
|
|
1315
|
+
D.value > 0 ? (H(), I("button", {
|
|
1344
1316
|
key: 2,
|
|
1345
1317
|
class: "td-tree-more",
|
|
1346
1318
|
type: "button",
|
|
1347
|
-
onClick:
|
|
1348
|
-
}, K(
|
|
1349
|
-
])], 2)], 8,
|
|
1319
|
+
onClick: re
|
|
1320
|
+
}, K(D.value) + " more... ", 1)) : F("", !0)
|
|
1321
|
+
])], 2)], 8, Br)) : F("", !0);
|
|
1350
1322
|
};
|
|
1351
1323
|
}
|
|
1352
|
-
}), [["__scopeId", "data-v-f9c9c250"]]),
|
|
1324
|
+
}), [["__scopeId", "data-v-f9c9c250"]]), Yr = {
|
|
1353
1325
|
class: "td-nav",
|
|
1354
1326
|
"aria-label": "Site navigation"
|
|
1355
|
-
},
|
|
1327
|
+
}, Xr = { role: "tree" }, Zr = ["href"], Qr = {
|
|
1356
1328
|
key: 0,
|
|
1357
1329
|
class: "td-root-link-time"
|
|
1358
|
-
},
|
|
1330
|
+
}, $r = ["href"], ei = { class: "td-root-link-text" }, ti = {
|
|
1359
1331
|
key: 2,
|
|
1360
1332
|
class: "td-root-link-time"
|
|
1361
|
-
},
|
|
1333
|
+
}, ni = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1362
1334
|
__name: "TdContentNav",
|
|
1363
1335
|
props: { tree: {} },
|
|
1364
1336
|
setup(e) {
|
|
1365
|
-
let n =
|
|
1337
|
+
let n = Ie(), { withBase: r } = j(), i = N(() => e.tree.entries.find((e) => e.kind === "file" && d(e.item.filepath))?.item), a = N(() => e.tree.entries.filter((e) => e.kind === "dir" || !d(e.item.filepath)));
|
|
1366
1338
|
function o(e) {
|
|
1367
1339
|
return n.path === e;
|
|
1368
1340
|
}
|
|
1369
|
-
return (e, n) => (H(),
|
|
1341
|
+
return (e, n) => (H(), I("nav", Yr, [L("div", Xr, [L("a", {
|
|
1370
1342
|
href: q(r)(i.value ? q(t)(i.value.filepath) : q(s)("/")),
|
|
1371
|
-
class:
|
|
1343
|
+
class: V(["td-root-link", { "is-active": o(i.value ? q(t)(i.value.filepath) : q(s)("/")) }]),
|
|
1372
1344
|
role: "treeitem"
|
|
1373
1345
|
}, [
|
|
1374
|
-
|
|
1346
|
+
z(q(le), {
|
|
1375
1347
|
size: 14,
|
|
1376
1348
|
class: "td-root-link-icon"
|
|
1377
1349
|
}),
|
|
1378
|
-
n[0] ||=
|
|
1379
|
-
i.value ? (H(),
|
|
1380
|
-
], 10,
|
|
1350
|
+
n[0] ||= L("span", { class: "td-root-link-text" }, "Overview", -1),
|
|
1351
|
+
i.value ? (H(), I("span", Qr, K(i.value.fileMetadata ? q(u)(i.value.fileMetadata.mtimeSecs) : ""), 1)) : F("", !0)
|
|
1352
|
+
], 10, Zr), (H(!0), I(M, null, W(a.value, (e) => (H(), I(M, { key: e.kind === "dir" ? e.node.name : e.item.filepath }, [e.kind === "dir" ? (H(), P(Jr, {
|
|
1381
1353
|
key: 0,
|
|
1382
1354
|
node: e.node
|
|
1383
|
-
}, null, 8, ["node"])) : (H(),
|
|
1355
|
+
}, null, 8, ["node"])) : (H(), I("a", {
|
|
1384
1356
|
key: 1,
|
|
1385
1357
|
href: q(r)(q(t)(e.item.filepath)),
|
|
1386
|
-
class:
|
|
1358
|
+
class: V(["td-root-link", { "is-active": o(q(t)(e.item.filepath)) }]),
|
|
1387
1359
|
role: "treeitem"
|
|
1388
1360
|
}, [
|
|
1389
|
-
e.item.icon && q(
|
|
1361
|
+
e.item.icon && q(Le)(e.item.icon.name) ? (H(), P(ut(q(Le)(e.item.icon.name)), {
|
|
1390
1362
|
key: 0,
|
|
1391
1363
|
size: 14,
|
|
1392
1364
|
class: "td-root-link-icon"
|
|
1393
|
-
})) : (H(),
|
|
1365
|
+
})) : (H(), P(q(he), {
|
|
1394
1366
|
key: 1,
|
|
1395
1367
|
size: 14,
|
|
1396
1368
|
class: "td-root-link-icon"
|
|
1397
1369
|
})),
|
|
1398
|
-
|
|
1399
|
-
e.item.fileMetadata ? (H(),
|
|
1400
|
-
], 10,
|
|
1370
|
+
L("span", ei, K(q(T)(e.item.filepath, e.item.label)), 1),
|
|
1371
|
+
e.item.fileMetadata ? (H(), I("span", ti, K(q(u)(e.item.fileMetadata.mtimeSecs)), 1)) : F("", !0)
|
|
1372
|
+
], 10, $r))], 64))), 128))])]));
|
|
1401
1373
|
}
|
|
1402
|
-
}), [["__scopeId", "data-v-038de594"]]),
|
|
1374
|
+
}), [["__scopeId", "data-v-038de594"]]), ri = { class: "td-footer" }, ii = { key: 0 }, ai = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1403
1375
|
__name: "TdFooter",
|
|
1404
1376
|
setup(e) {
|
|
1405
|
-
let t =
|
|
1406
|
-
return (e, r) => (H(),
|
|
1377
|
+
let t = j(), n = (/* @__PURE__ */ new Date()).getFullYear();
|
|
1378
|
+
return (e, r) => (H(), I("footer", ri, [r[0] ||= L("span", null, [R(" Powered by "), L("a", {
|
|
1407
1379
|
href: "https://github.com/huydo862003/typerighter",
|
|
1408
1380
|
target: "_blank",
|
|
1409
1381
|
rel: "noopener noreferrer",
|
|
1410
1382
|
class: "td-footer-link"
|
|
1411
|
-
}, "Typerighter")], -1), q(t).author || q(t).license ? (H(),
|
|
1412
|
-
q(t).license ? (H(),
|
|
1413
|
-
q(t).license && q(t).author ? (H(),
|
|
1414
|
-
q(t).author ? (H(),
|
|
1415
|
-
])) :
|
|
1383
|
+
}, "Typerighter")], -1), q(t).author || q(t).license ? (H(), I("span", ii, [
|
|
1384
|
+
q(t).license ? (H(), I(M, { key: 0 }, [R(K(q(t).license), 1)], 64)) : F("", !0),
|
|
1385
|
+
q(t).license && q(t).author ? (H(), I(M, { key: 1 }, [R(" · ")], 64)) : F("", !0),
|
|
1386
|
+
q(t).author ? (H(), I(M, { key: 2 }, [R("© " + K(q(n)) + " " + K(q(t).author), 1)], 64)) : F("", !0)
|
|
1387
|
+
])) : F("", !0)]));
|
|
1416
1388
|
}
|
|
1417
|
-
}), [["__scopeId", "data-v-696804f8"]]),
|
|
1389
|
+
}), [["__scopeId", "data-v-696804f8"]]), oi = {
|
|
1418
1390
|
key: 0,
|
|
1419
1391
|
class: "td-dropdown-panel"
|
|
1420
|
-
},
|
|
1392
|
+
}, si = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1421
1393
|
inheritAttrs: !1,
|
|
1422
1394
|
__name: "TdDropdown",
|
|
1423
1395
|
props: {
|
|
@@ -1429,7 +1401,7 @@ var qr = ["innerHTML"], Jr = /* @__PURE__ */ z({
|
|
|
1429
1401
|
},
|
|
1430
1402
|
emits: ["update:open"],
|
|
1431
1403
|
setup(e) {
|
|
1432
|
-
let t =
|
|
1404
|
+
let t = mt(e, "open"), n = J("wrapper");
|
|
1433
1405
|
function r(e) {
|
|
1434
1406
|
n.value?.contains(e.target) || (t.value = !1);
|
|
1435
1407
|
}
|
|
@@ -1438,29 +1410,29 @@ var qr = ["innerHTML"], Jr = /* @__PURE__ */ z({
|
|
|
1438
1410
|
}
|
|
1439
1411
|
return Y(t, (e) => {
|
|
1440
1412
|
typeof document < "u" && (e ? document.addEventListener("click", r) : document.removeEventListener("click", r));
|
|
1441
|
-
}),
|
|
1413
|
+
}), ot(() => {
|
|
1442
1414
|
typeof document < "u" && document.removeEventListener("click", r);
|
|
1443
|
-
}), (e, r) => (H(),
|
|
1415
|
+
}), (e, r) => (H(), I("span", et({
|
|
1444
1416
|
ref_key: "wrapper",
|
|
1445
1417
|
ref: n
|
|
1446
|
-
}, e.$attrs, { class: "td-dropdown" }), [
|
|
1418
|
+
}, e.$attrs, { class: "td-dropdown" }), [L("span", { onClick: i }, [G(e.$slots, "trigger", {}, void 0, !0)]), t.value ? (H(), I("div", oi, [G(e.$slots, "default", {}, void 0, !0)])) : F("", !0)], 16));
|
|
1447
1419
|
}
|
|
1448
|
-
}), [["__scopeId", "data-v-645fe3f0"]]),
|
|
1420
|
+
}), [["__scopeId", "data-v-645fe3f0"]]), ci = {
|
|
1449
1421
|
class: "td-breadcrumb",
|
|
1450
1422
|
"aria-label": "Breadcrumb"
|
|
1451
|
-
},
|
|
1423
|
+
}, li = ["href"], ui = {
|
|
1452
1424
|
type: "button",
|
|
1453
1425
|
class: "td-breadcrumb-ellipsis"
|
|
1454
|
-
},
|
|
1426
|
+
}, di = ["href"], fi = ["href"], pi = {
|
|
1455
1427
|
key: 1,
|
|
1456
1428
|
class: "td-breadcrumb-current"
|
|
1457
|
-
},
|
|
1429
|
+
}, mi = ["href"], hi = {
|
|
1458
1430
|
key: 1,
|
|
1459
1431
|
class: "td-breadcrumb-current"
|
|
1460
|
-
},
|
|
1432
|
+
}, gi = 3, _i = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1461
1433
|
__name: "TdBreadcrumb",
|
|
1462
1434
|
setup(e) {
|
|
1463
|
-
let t =
|
|
1435
|
+
let t = Ie(), { withBase: n } = j(), i = U(!1), a = N(() => {
|
|
1464
1436
|
let e = r(t.path), i = [{
|
|
1465
1437
|
name: "Home",
|
|
1466
1438
|
href: n(s("/"))
|
|
@@ -1475,127 +1447,127 @@ var qr = ["innerHTML"], Jr = /* @__PURE__ */ z({
|
|
|
1475
1447
|
});
|
|
1476
1448
|
}
|
|
1477
1449
|
return i;
|
|
1478
|
-
}), o =
|
|
1450
|
+
}), o = N(() => gi < a.value.length), l = N(() => a.value.slice(1, -2));
|
|
1479
1451
|
return Y(() => t.path, () => {
|
|
1480
1452
|
i.value = !1;
|
|
1481
|
-
}), (e, t) => (H(),
|
|
1453
|
+
}), (e, t) => (H(), I("nav", ci, [L("a", {
|
|
1482
1454
|
href: a.value[0].href,
|
|
1483
1455
|
class: "td-breadcrumb-link td-breadcrumb-home"
|
|
1484
|
-
}, K(a.value[0].name), 9,
|
|
1485
|
-
t[2] ||=
|
|
1456
|
+
}, K(a.value[0].name), 9, li), o.value ? (H(), I(M, { key: 0 }, [
|
|
1457
|
+
t[2] ||= L("span", {
|
|
1486
1458
|
class: "td-breadcrumb-sep",
|
|
1487
1459
|
"aria-hidden": "true"
|
|
1488
1460
|
}, "/", -1),
|
|
1489
|
-
|
|
1461
|
+
z(si, {
|
|
1490
1462
|
open: i.value,
|
|
1491
1463
|
"onUpdate:open": t[0] ||= (e) => i.value = e
|
|
1492
1464
|
}, {
|
|
1493
|
-
trigger: X(() => [
|
|
1494
|
-
default: X(() => [(H(!0),
|
|
1465
|
+
trigger: X(() => [L("button", ui, [z(q(O), { size: 14 })])]),
|
|
1466
|
+
default: X(() => [(H(!0), I(M, null, W(l.value, (e) => (H(), I("a", {
|
|
1495
1467
|
key: e.href,
|
|
1496
1468
|
href: e.href,
|
|
1497
1469
|
class: "td-breadcrumb-dropdown-item"
|
|
1498
|
-
}, K(e.name), 9,
|
|
1470
|
+
}, K(e.name), 9, di))), 128))]),
|
|
1499
1471
|
_: 1
|
|
1500
1472
|
}, 8, ["open"]),
|
|
1501
|
-
(H(!0),
|
|
1473
|
+
(H(!0), I(M, null, W(a.value.slice(-2), (e) => (H(), I(M, { key: e.href }, [t[1] ||= L("span", {
|
|
1502
1474
|
class: "td-breadcrumb-sep",
|
|
1503
1475
|
"aria-hidden": "true"
|
|
1504
|
-
}, "/", -1), e === a.value[a.value.length - 1] ? (H(),
|
|
1476
|
+
}, "/", -1), e === a.value[a.value.length - 1] ? (H(), I("span", pi, K(e.name), 1)) : (H(), I("a", {
|
|
1505
1477
|
key: 0,
|
|
1506
1478
|
href: e.href,
|
|
1507
1479
|
class: "td-breadcrumb-link"
|
|
1508
|
-
}, K(e.name), 9,
|
|
1509
|
-
], 64)) : (H(!0),
|
|
1480
|
+
}, K(e.name), 9, fi))], 64))), 128))
|
|
1481
|
+
], 64)) : (H(!0), I(M, { key: 1 }, W(a.value.slice(1), (e, n) => (H(), I(M, { key: e.href }, [t[3] ||= L("span", {
|
|
1510
1482
|
class: "td-breadcrumb-sep",
|
|
1511
1483
|
"aria-hidden": "true"
|
|
1512
|
-
}, "/", -1), n < a.value.length - 2 ? (H(),
|
|
1484
|
+
}, "/", -1), n < a.value.length - 2 ? (H(), I("a", {
|
|
1513
1485
|
key: 0,
|
|
1514
1486
|
href: e.href,
|
|
1515
1487
|
class: "td-breadcrumb-link"
|
|
1516
|
-
}, K(e.name), 9,
|
|
1488
|
+
}, K(e.name), 9, mi)) : (H(), I("span", hi, K(e.name), 1))], 64))), 128))]));
|
|
1517
1489
|
}
|
|
1518
|
-
}), [["__scopeId", "data-v-89f87a49"]]),
|
|
1490
|
+
}), [["__scopeId", "data-v-89f87a49"]]), vi = {
|
|
1519
1491
|
key: 0,
|
|
1520
1492
|
class: "td-header-nav"
|
|
1521
|
-
},
|
|
1493
|
+
}, yi = [
|
|
1522
1494
|
"href",
|
|
1523
1495
|
"target",
|
|
1524
1496
|
"rel"
|
|
1525
|
-
],
|
|
1497
|
+
], bi = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1526
1498
|
__name: "TdHeaderNavBar",
|
|
1527
1499
|
setup(e) {
|
|
1528
|
-
let t =
|
|
1500
|
+
let t = j(), { withBase: n } = t, r = Ie();
|
|
1529
1501
|
function i(e) {
|
|
1530
1502
|
return !m(e) && r.path.startsWith(n(e));
|
|
1531
1503
|
}
|
|
1532
|
-
return (e, r) => q(t).nav?.length ? (H(),
|
|
1504
|
+
return (e, r) => q(t).nav?.length ? (H(), I("nav", vi, [(H(!0), I(M, null, W(q(t).nav, (e) => (H(), I("a", {
|
|
1533
1505
|
key: e.link,
|
|
1534
1506
|
href: q(m)(e.link) ? e.link : q(n)(e.link),
|
|
1535
1507
|
target: q(m)(e.link) ? "_blank" : void 0,
|
|
1536
1508
|
rel: q(m)(e.link) ? "noopener noreferrer" : void 0,
|
|
1537
|
-
class:
|
|
1509
|
+
class: V(["td-header-nav-link", { "is-active": i(e.link) }])
|
|
1538
1510
|
}, [
|
|
1539
|
-
e.icon && q(
|
|
1511
|
+
e.icon && q(Le)(e.icon) ? (H(), P(ut(q(Le)(e.icon)), {
|
|
1540
1512
|
key: 0,
|
|
1541
1513
|
size: 14,
|
|
1542
1514
|
class: "td-header-nav-icon"
|
|
1543
|
-
})) :
|
|
1544
|
-
|
|
1545
|
-
q(m)(e.link) ? (H(),
|
|
1515
|
+
})) : F("", !0),
|
|
1516
|
+
R(" " + K(e.title) + " ", 1),
|
|
1517
|
+
q(m)(e.link) ? (H(), P(q(_e), {
|
|
1546
1518
|
key: 1,
|
|
1547
1519
|
size: 14
|
|
1548
|
-
})) :
|
|
1549
|
-
], 10,
|
|
1520
|
+
})) : F("", !0)
|
|
1521
|
+
], 10, yi))), 128))])) : F("", !0);
|
|
1550
1522
|
}
|
|
1551
|
-
}), [["__scopeId", "data-v-b7b3bb7c"]]),
|
|
1523
|
+
}), [["__scopeId", "data-v-b7b3bb7c"]]), xi = {
|
|
1552
1524
|
key: 0,
|
|
1553
1525
|
class: "td-menu-nav"
|
|
1554
|
-
},
|
|
1526
|
+
}, Si = [
|
|
1555
1527
|
"href",
|
|
1556
1528
|
"target",
|
|
1557
1529
|
"rel"
|
|
1558
|
-
],
|
|
1530
|
+
], Ci = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1559
1531
|
__name: "TdHeaderNavMenu",
|
|
1560
1532
|
setup(e) {
|
|
1561
|
-
let t =
|
|
1533
|
+
let t = j(), { withBase: n } = t, r = Ie();
|
|
1562
1534
|
function i(e) {
|
|
1563
1535
|
return !m(e) && r.path.startsWith(n(e));
|
|
1564
1536
|
}
|
|
1565
|
-
return (e, r) => q(t).nav?.length ? (H(),
|
|
1537
|
+
return (e, r) => q(t).nav?.length ? (H(), I("nav", xi, [(H(!0), I(M, null, W(q(t).nav, (e) => (H(), I("a", {
|
|
1566
1538
|
key: e.link,
|
|
1567
1539
|
href: q(m)(e.link) ? e.link : q(n)(e.link),
|
|
1568
1540
|
target: q(m)(e.link) ? "_blank" : void 0,
|
|
1569
1541
|
rel: q(m)(e.link) ? "noopener noreferrer" : void 0,
|
|
1570
|
-
class:
|
|
1542
|
+
class: V(["td-menu-nav-item", { "is-active": i(e.link) }])
|
|
1571
1543
|
}, [
|
|
1572
|
-
e.icon ? (H(),
|
|
1544
|
+
e.icon ? (H(), P(Me, {
|
|
1573
1545
|
key: 0,
|
|
1574
1546
|
name: e.icon,
|
|
1575
1547
|
size: 16
|
|
1576
|
-
}, null, 8, ["name"])) :
|
|
1577
|
-
|
|
1578
|
-
q(m)(e.link) ? (H(),
|
|
1548
|
+
}, null, 8, ["name"])) : F("", !0),
|
|
1549
|
+
L("span", null, K(e.title), 1),
|
|
1550
|
+
q(m)(e.link) ? (H(), P(q(_e), {
|
|
1579
1551
|
key: 1,
|
|
1580
1552
|
size: 14
|
|
1581
|
-
})) :
|
|
1582
|
-
], 10,
|
|
1553
|
+
})) : F("", !0)
|
|
1554
|
+
], 10, Si))), 128))])) : F("", !0);
|
|
1583
1555
|
}
|
|
1584
|
-
}), [["__scopeId", "data-v-8b23de5a"]]),
|
|
1556
|
+
}), [["__scopeId", "data-v-8b23de5a"]]), wi = { class: "td-widget-checkbox" }, Ti = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1585
1557
|
__name: "TdWidgetCheckbox",
|
|
1586
1558
|
props: { value: {} },
|
|
1587
1559
|
setup(e) {
|
|
1588
|
-
return (t, n) => (H(),
|
|
1560
|
+
return (t, n) => (H(), I("span", wi, [e.value ? (H(), P(q(Pt), {
|
|
1589
1561
|
key: 0,
|
|
1590
1562
|
size: 16,
|
|
1591
1563
|
class: "td-widget-checkbox-icon is-checked"
|
|
1592
|
-
})) : (H(),
|
|
1564
|
+
})) : (H(), P(q(Re), {
|
|
1593
1565
|
key: 1,
|
|
1594
1566
|
size: 16,
|
|
1595
1567
|
class: "td-widget-checkbox-icon"
|
|
1596
1568
|
}))]));
|
|
1597
1569
|
}
|
|
1598
|
-
}), [["__scopeId", "data-v-13241c06"]]),
|
|
1570
|
+
}), [["__scopeId", "data-v-13241c06"]]), Ei = /* @__PURE__ */ new Set([
|
|
1599
1571
|
"png",
|
|
1600
1572
|
"jpg",
|
|
1601
1573
|
"jpeg",
|
|
@@ -1607,11 +1579,11 @@ var qr = ["innerHTML"], Jr = /* @__PURE__ */ z({
|
|
|
1607
1579
|
"ico",
|
|
1608
1580
|
"tiff"
|
|
1609
1581
|
]);
|
|
1610
|
-
function
|
|
1582
|
+
function Di(e) {
|
|
1611
1583
|
if (!e) return;
|
|
1612
1584
|
if (typeof e == "string") {
|
|
1613
1585
|
let t = e.trim();
|
|
1614
|
-
return !t || !
|
|
1586
|
+
return !t || !Oi({ url: t }) ? void 0 : {
|
|
1615
1587
|
url: t,
|
|
1616
1588
|
name: i(t),
|
|
1617
1589
|
isImage: !0
|
|
@@ -1628,23 +1600,23 @@ function Ii(e) {
|
|
|
1628
1600
|
name: a,
|
|
1629
1601
|
format: o,
|
|
1630
1602
|
icon: n.icon,
|
|
1631
|
-
isImage:
|
|
1603
|
+
isImage: Oi({
|
|
1632
1604
|
url: r,
|
|
1633
1605
|
name: a,
|
|
1634
1606
|
format: o
|
|
1635
1607
|
})
|
|
1636
1608
|
};
|
|
1637
1609
|
}
|
|
1638
|
-
function
|
|
1639
|
-
if (e.format &&
|
|
1610
|
+
function Oi(e) {
|
|
1611
|
+
if (e.format && Ei.has(e.format.toLowerCase())) return !0;
|
|
1640
1612
|
let t = o(e.name || e.url).slice(1);
|
|
1641
|
-
return t ?
|
|
1613
|
+
return t ? Ei.has(t.toLowerCase()) : !1;
|
|
1642
1614
|
}
|
|
1643
1615
|
// src/client/theme-default/components/TdFrontmatter/widgets/TdWidgetRelation.vue?vue&type=script&setup=true&lang.ts
|
|
1644
|
-
var
|
|
1616
|
+
var ki = {
|
|
1645
1617
|
key: 0,
|
|
1646
1618
|
class: "td-widget-relation-wrapper"
|
|
1647
|
-
},
|
|
1619
|
+
}, Ai = ["href", "title"], ji = ["src", "alt"], Mi = ["href"], Ni = { class: "td-widget-file-name" }, Pi = ["href"], Fi = ["href"], Ii = { key: 1 }, Li = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1648
1620
|
__name: "TdWidgetRelation",
|
|
1649
1621
|
props: {
|
|
1650
1622
|
value: {},
|
|
@@ -1654,80 +1626,80 @@ var Ri = {
|
|
|
1654
1626
|
}
|
|
1655
1627
|
},
|
|
1656
1628
|
setup(e) {
|
|
1657
|
-
let { withBase: t } =
|
|
1658
|
-
return (a, o) => n.value ? (H(),
|
|
1629
|
+
let { withBase: t } = j(), n = N(() => Di(e.value)), r = N(() => n.value?.icon ? Le(n.value.icon.name) : void 0), i = N(() => n.value !== void 0 && m(n.value.url));
|
|
1630
|
+
return (a, o) => n.value ? (H(), I("span", ki, [n.value.isImage ? (H(), I("a", {
|
|
1659
1631
|
key: 0,
|
|
1660
1632
|
href: q(t)(n.value.url),
|
|
1661
1633
|
target: "_blank",
|
|
1662
1634
|
rel: "noopener noreferrer",
|
|
1663
1635
|
class: "td-widget-image-preview",
|
|
1664
1636
|
title: n.value.name
|
|
1665
|
-
}, [
|
|
1637
|
+
}, [L("img", {
|
|
1666
1638
|
src: q(t)(n.value.url),
|
|
1667
1639
|
alt: n.value.name,
|
|
1668
1640
|
class: "td-widget-image-img",
|
|
1669
1641
|
loading: "lazy"
|
|
1670
|
-
}, null, 8,
|
|
1642
|
+
}, null, 8, ji)], 8, Ai)) : n.value.format || n.value.url.includes(".") ? (H(), I("a", {
|
|
1671
1643
|
key: 1,
|
|
1672
1644
|
href: q(t)(n.value.url),
|
|
1673
1645
|
target: "_blank",
|
|
1674
1646
|
rel: "noopener noreferrer",
|
|
1675
1647
|
class: "td-widget-file-link"
|
|
1676
|
-
}, [
|
|
1648
|
+
}, [z(q(je), { class: "td-widget-file-icon" }), L("span", Ni, K(n.value.name), 1)], 8, Mi)) : i.value ? (H(), I("a", {
|
|
1677
1649
|
key: 2,
|
|
1678
1650
|
href: n.value.url,
|
|
1679
1651
|
target: "_blank",
|
|
1680
1652
|
rel: "noopener noreferrer",
|
|
1681
1653
|
class: "td-widget-ref td-widget-ref-external"
|
|
1682
|
-
}, [
|
|
1654
|
+
}, [z(q(_e), {
|
|
1683
1655
|
size: 12,
|
|
1684
1656
|
class: "td-widget-external-icon"
|
|
1685
|
-
})], 8,
|
|
1657
|
+
})], 8, Pi)) : (H(), I("a", {
|
|
1686
1658
|
key: 3,
|
|
1687
1659
|
href: q(t)(n.value.url),
|
|
1688
1660
|
class: "td-widget-ref"
|
|
1689
|
-
}, [r.value && !e.hideIcon ? (H(),
|
|
1661
|
+
}, [r.value && !e.hideIcon ? (H(), P(ut(r.value), {
|
|
1690
1662
|
key: 0,
|
|
1691
1663
|
size: 14,
|
|
1692
1664
|
class: "td-widget-ref-icon"
|
|
1693
|
-
})) :
|
|
1665
|
+
})) : F("", !0), R(K(n.value.name), 1)], 8, Fi))])) : (H(), I("span", Ii, K(e.value), 1));
|
|
1694
1666
|
}
|
|
1695
|
-
}), [["__scopeId", "data-v-20319819"]]),
|
|
1667
|
+
}), [["__scopeId", "data-v-20319819"]]), Ri = { key: 0 }, zi = { class: "td-widget-list td-widget-list-icons" }, Bi = { key: 1 }, Vi = { class: "td-widget-list" }, Hi = 5, Ui = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1696
1668
|
__name: "TdWidgetList",
|
|
1697
1669
|
props: {
|
|
1698
1670
|
definition: {},
|
|
1699
1671
|
value: {}
|
|
1700
1672
|
},
|
|
1701
1673
|
setup(e) {
|
|
1702
|
-
let t = U(!1), n =
|
|
1674
|
+
let t = U(!1), n = N(() => Array.isArray(e.value) ? e.value : []), r = N(() => e.definition.items?.widget === "relation"), i = N(() => r.value ? n.value.map((e) => Di(e)).filter((e) => e !== void 0) : []), a = N(() => r.value ? Math.max(0, i.value.length - Hi) : Math.max(0, n.value.length - Hi));
|
|
1703
1675
|
function o() {
|
|
1704
1676
|
t.value = !t.value;
|
|
1705
1677
|
}
|
|
1706
1678
|
function s(e) {
|
|
1707
|
-
return t.value ? e : e.slice(0,
|
|
1679
|
+
return t.value ? e : e.slice(0, Hi);
|
|
1708
1680
|
}
|
|
1709
|
-
return (e, c) => r.value ? (H(),
|
|
1681
|
+
return (e, c) => r.value ? (H(), I("div", Ri, [L("ul", zi, [(H(!0), I(M, null, W(s(i.value), (e, t) => (H(), I("li", { key: t }, [L("div", null, [(H(), P(ut(e.icon ? q(Le)(e.icon.name) ?? q(he) : q(he)), {
|
|
1710
1682
|
size: 14,
|
|
1711
1683
|
class: "td-widget-list-icon"
|
|
1712
|
-
}))]),
|
|
1684
|
+
}))]), z(Li, {
|
|
1713
1685
|
value: { $ref: e },
|
|
1714
1686
|
"hide-icon": ""
|
|
1715
|
-
}, null, 8, ["value"])]))), 128))]), a.value > 0 ? (H(),
|
|
1687
|
+
}, null, 8, ["value"])]))), 128))]), a.value > 0 ? (H(), I("button", {
|
|
1716
1688
|
key: 0,
|
|
1717
1689
|
class: "td-widget-more",
|
|
1718
1690
|
type: "button",
|
|
1719
1691
|
onClick: o
|
|
1720
|
-
}, K(t.value ? "show less" : `+${a.value} more`), 1)) :
|
|
1692
|
+
}, K(t.value ? "show less" : `+${a.value} more`), 1)) : F("", !0)])) : (H(), I("div", Bi, [L("ul", Vi, [(H(!0), I(M, null, W(s(n.value), (e, t) => (H(), I("li", { key: t }, [q(Di)(e) ? (H(), P(Li, {
|
|
1721
1693
|
key: 0,
|
|
1722
1694
|
value: e
|
|
1723
|
-
}, null, 8, ["value"])) : (H(),
|
|
1695
|
+
}, null, 8, ["value"])) : (H(), I(M, { key: 1 }, [R(K(e), 1)], 64))]))), 128))]), a.value > 0 ? (H(), I("button", {
|
|
1724
1696
|
key: 0,
|
|
1725
1697
|
class: "td-widget-more",
|
|
1726
1698
|
type: "button",
|
|
1727
1699
|
onClick: o
|
|
1728
|
-
}, K(t.value ? "show less" : `+${a.value} more`), 1)) :
|
|
1700
|
+
}, K(t.value ? "show less" : `+${a.value} more`), 1)) : F("", !0)]));
|
|
1729
1701
|
}
|
|
1730
|
-
}), [["__scopeId", "data-v-bc659020"]]),
|
|
1702
|
+
}), [["__scopeId", "data-v-bc659020"]]), Wi = [
|
|
1731
1703
|
{
|
|
1732
1704
|
fg: "#a0522d",
|
|
1733
1705
|
bg: "rgba(160, 82, 45, 0.1)"
|
|
@@ -1761,55 +1733,55 @@ var Ri = {
|
|
|
1761
1733
|
bg: "rgba(239, 68, 68, 0.1)"
|
|
1762
1734
|
}
|
|
1763
1735
|
];
|
|
1764
|
-
function
|
|
1765
|
-
let t =
|
|
1736
|
+
function Gi(e) {
|
|
1737
|
+
let t = Wi[Ki(String(e ?? "")) % Wi.length];
|
|
1766
1738
|
return {
|
|
1767
1739
|
color: t.fg,
|
|
1768
1740
|
background: t.bg
|
|
1769
1741
|
};
|
|
1770
1742
|
}
|
|
1771
|
-
function
|
|
1743
|
+
function Ki(e) {
|
|
1772
1744
|
let t = 0;
|
|
1773
1745
|
for (let n = 0; n < e.length; n++) t = (t << 5) - t + e.charCodeAt(n) | 0;
|
|
1774
1746
|
return Math.abs(t);
|
|
1775
1747
|
}
|
|
1776
1748
|
// src/client/theme-default/components/TdFrontmatter/widgets/TdWidgetMultiSelect.vue?vue&type=script&setup=true&lang.ts
|
|
1777
|
-
var
|
|
1749
|
+
var qi = 5, Ji = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1778
1750
|
__name: "TdWidgetMultiSelect",
|
|
1779
1751
|
props: { value: {} },
|
|
1780
1752
|
setup(e) {
|
|
1781
|
-
let t = U(!1), n =
|
|
1753
|
+
let t = U(!1), n = N(() => Array.isArray(e.value) ? e.value : []), r = N(() => t.value ? n.value : n.value.slice(0, qi)), i = N(() => Math.max(0, n.value.length - qi));
|
|
1782
1754
|
function a() {
|
|
1783
1755
|
t.value = !t.value;
|
|
1784
1756
|
}
|
|
1785
|
-
return (e, n) => (H(),
|
|
1757
|
+
return (e, n) => (H(), I(M, null, [(H(!0), I(M, null, W(r.value, (e, t) => (H(), I("span", {
|
|
1786
1758
|
key: t,
|
|
1787
1759
|
class: "td-widget-pill",
|
|
1788
|
-
style:
|
|
1789
|
-
}, K(e), 5))), 128)), i.value > 0 ? (H(),
|
|
1760
|
+
style: nt(q(Gi)(e))
|
|
1761
|
+
}, K(e), 5))), 128)), i.value > 0 ? (H(), I("button", {
|
|
1790
1762
|
key: 0,
|
|
1791
1763
|
class: "td-widget-more",
|
|
1792
1764
|
type: "button",
|
|
1793
1765
|
onClick: a
|
|
1794
|
-
}, K(t.value ? "show less" : `+${i.value} more`), 1)) :
|
|
1766
|
+
}, K(t.value ? "show less" : `+${i.value} more`), 1)) : F("", !0)], 64));
|
|
1795
1767
|
}
|
|
1796
|
-
}), [["__scopeId", "data-v-b3656329"]]),
|
|
1768
|
+
}), [["__scopeId", "data-v-b3656329"]]), Yi = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1797
1769
|
__name: "TdWidgetSelect",
|
|
1798
1770
|
props: { value: {} },
|
|
1799
1771
|
setup(e) {
|
|
1800
|
-
return (t, n) => (H(),
|
|
1772
|
+
return (t, n) => (H(), I("span", {
|
|
1801
1773
|
class: "td-widget-pill",
|
|
1802
|
-
style:
|
|
1774
|
+
style: nt(q(Gi)(e.value))
|
|
1803
1775
|
}, K(e.value), 5));
|
|
1804
1776
|
}
|
|
1805
|
-
}), [["__scopeId", "data-v-b9e2b4fd"]]),
|
|
1777
|
+
}), [["__scopeId", "data-v-b9e2b4fd"]]), Xi = ["href", "title"], Zi = ["src", "alt"], Qi = ["href"], $i = { class: "td-widget-file-name" }, ea = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1806
1778
|
__name: "TdWidgetText",
|
|
1807
1779
|
props: {
|
|
1808
1780
|
definition: {},
|
|
1809
1781
|
value: {}
|
|
1810
1782
|
},
|
|
1811
1783
|
setup(e) {
|
|
1812
|
-
let { withBase: t } =
|
|
1784
|
+
let { withBase: t } = j(), n = N(() => typeof e.value == "string" ? e.value.trim() : ""), r = N(() => Di(e.value)), i = N(() => r.value ? r.value.isImage : 0 < n.value.length && Oi({ url: n.value })), a = N(() => r.value ? r.value.url : n.value), o = N(() => t(a.value)), s = N(() => !n.value || !n.value.includes(".") || n.value.includes(" ") ? !1 : n.value.endsWith(".pdf") || n.value.endsWith(".zip") || n.value.endsWith(".doc") || n.value.endsWith(".docx"));
|
|
1813
1785
|
function c(t) {
|
|
1814
1786
|
if (t == null) return "";
|
|
1815
1787
|
if (typeof t == "object" && !Array.isArray(t)) {
|
|
@@ -1822,65 +1794,65 @@ var na = 5, ra = /*#__PURE__*/ k(/* @__PURE__ */ z({
|
|
|
1822
1794
|
}
|
|
1823
1795
|
return e.definition.widget === "date" ? _(String(t)) : String(t);
|
|
1824
1796
|
}
|
|
1825
|
-
return (t, a) => i.value ? (H(),
|
|
1797
|
+
return (t, a) => i.value ? (H(), I("a", {
|
|
1826
1798
|
key: 0,
|
|
1827
1799
|
href: o.value,
|
|
1828
1800
|
target: "_blank",
|
|
1829
1801
|
rel: "noopener noreferrer",
|
|
1830
1802
|
class: "td-widget-image-preview",
|
|
1831
1803
|
title: r.value ? r.value.name : n.value
|
|
1832
|
-
}, [
|
|
1804
|
+
}, [L("img", {
|
|
1833
1805
|
src: o.value,
|
|
1834
1806
|
alt: r.value ? r.value.name : n.value,
|
|
1835
1807
|
class: "td-widget-image-img",
|
|
1836
1808
|
loading: "lazy"
|
|
1837
|
-
}, null, 8,
|
|
1809
|
+
}, null, 8, Zi)], 8, Xi)) : s.value ? (H(), I("a", {
|
|
1838
1810
|
key: 1,
|
|
1839
1811
|
href: o.value,
|
|
1840
1812
|
target: "_blank",
|
|
1841
1813
|
rel: "noopener noreferrer",
|
|
1842
1814
|
class: "td-widget-file-link"
|
|
1843
|
-
}, [
|
|
1815
|
+
}, [z(q(je), { class: "td-widget-file-icon" }), L("span", $i, K(n.value.split("/").pop() ?? n.value), 1)], 8, Qi)) : (H(), I(M, { key: 2 }, [R(K(c(e.value)), 1)], 64));
|
|
1844
1816
|
}
|
|
1845
|
-
}), [["__scopeId", "data-v-2ea0f146"]]),
|
|
1817
|
+
}), [["__scopeId", "data-v-2ea0f146"]]), ta = {
|
|
1846
1818
|
key: 0,
|
|
1847
1819
|
class: "td-frontmatter-empty"
|
|
1848
|
-
},
|
|
1820
|
+
}, na = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1849
1821
|
__name: "TdFrontmatterValue",
|
|
1850
1822
|
props: {
|
|
1851
1823
|
definition: {},
|
|
1852
1824
|
value: {}
|
|
1853
1825
|
},
|
|
1854
1826
|
setup(e) {
|
|
1855
|
-
return (t, n) => e.value === void 0 || e.value === null ? (H(),
|
|
1827
|
+
return (t, n) => e.value === void 0 || e.value === null ? (H(), I("span", ta, "Empty")) : e.definition.widget === "checkbox" ? (H(), P(Ti, {
|
|
1856
1828
|
key: 1,
|
|
1857
1829
|
value: e.value
|
|
1858
|
-
}, null, 8, ["value"])) : e.definition.widget === "select" ? (H(),
|
|
1830
|
+
}, null, 8, ["value"])) : e.definition.widget === "select" ? (H(), P(Yi, {
|
|
1859
1831
|
key: 2,
|
|
1860
1832
|
value: e.value
|
|
1861
|
-
}, null, 8, ["value"])) : e.definition.widget === "multiSelect" ? (H(),
|
|
1833
|
+
}, null, 8, ["value"])) : e.definition.widget === "multiSelect" ? (H(), P(Ji, {
|
|
1862
1834
|
key: 3,
|
|
1863
1835
|
value: e.value
|
|
1864
|
-
}, null, 8, ["value"])) : q(
|
|
1836
|
+
}, null, 8, ["value"])) : q(Di)(e.value) || e.definition.widget === "relation" ? (H(), P(Li, {
|
|
1865
1837
|
key: 4,
|
|
1866
1838
|
value: e.value
|
|
1867
|
-
}, null, 8, ["value"])) : Array.isArray(e.value) || e.definition.widget === "list" ? (H(),
|
|
1839
|
+
}, null, 8, ["value"])) : Array.isArray(e.value) || e.definition.widget === "list" ? (H(), P(Ui, {
|
|
1868
1840
|
key: 5,
|
|
1869
1841
|
definition: e.definition,
|
|
1870
1842
|
value: e.value
|
|
1871
|
-
}, null, 8, ["definition", "value"])) : (H(),
|
|
1843
|
+
}, null, 8, ["definition", "value"])) : (H(), P(ea, {
|
|
1872
1844
|
key: 6,
|
|
1873
1845
|
definition: e.definition,
|
|
1874
1846
|
value: e.value
|
|
1875
1847
|
}, null, 8, ["definition", "value"]));
|
|
1876
1848
|
}
|
|
1877
|
-
}), [["__scopeId", "data-v-1deedc98"]]),
|
|
1849
|
+
}), [["__scopeId", "data-v-1deedc98"]]), ra = {
|
|
1878
1850
|
key: 0,
|
|
1879
1851
|
class: "td-fm-rail"
|
|
1880
|
-
},
|
|
1852
|
+
}, ia = { class: "td-fm-rail-key" }, aa = { class: "td-fm-rail-value" }, oa = {
|
|
1881
1853
|
key: 1,
|
|
1882
1854
|
class: "td-fm-box"
|
|
1883
|
-
},
|
|
1855
|
+
}, sa = { class: "td-fm-box-label" }, ca = { class: "td-fm-box-count" }, la = { class: "td-fm-box-toggle" }, ua = { class: "td-fm-box-body" }, da = { class: "td-fm-box-key" }, fa = { class: "td-fm-box-value" }, pa = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1884
1856
|
__name: "TdFrontmatter",
|
|
1885
1857
|
props: {
|
|
1886
1858
|
mode: { default: "inline" },
|
|
@@ -1888,12 +1860,12 @@ var na = 5, ra = /*#__PURE__*/ k(/* @__PURE__ */ z({
|
|
|
1888
1860
|
frontmatter: {}
|
|
1889
1861
|
},
|
|
1890
1862
|
setup(e) {
|
|
1891
|
-
let t =
|
|
1863
|
+
let t = ke(), n = N(() => {
|
|
1892
1864
|
if (e.schema) return t.value.schemas[e.schema];
|
|
1893
|
-
}), r =
|
|
1865
|
+
}), r = N(() => {
|
|
1894
1866
|
let t = e.frontmatter;
|
|
1895
1867
|
return t._type && t.fields && typeof t.fields == "object" && !Array.isArray(t.fields) ? t.fields : t;
|
|
1896
|
-
}), i =
|
|
1868
|
+
}), i = N(() => {
|
|
1897
1869
|
let e = n.value, t = r.value, i = [], a = /* @__PURE__ */ new Set();
|
|
1898
1870
|
e && Object.keys(e).forEach((e) => a.add(e)), Object.keys(t).forEach((e) => a.add(e));
|
|
1899
1871
|
for (let n of a) {
|
|
@@ -1905,15 +1877,15 @@ var na = 5, ra = /*#__PURE__*/ k(/* @__PURE__ */ z({
|
|
|
1905
1877
|
}
|
|
1906
1878
|
return i;
|
|
1907
1879
|
}), a = {
|
|
1908
|
-
text:
|
|
1909
|
-
checkbox:
|
|
1910
|
-
select:
|
|
1911
|
-
multiSelect:
|
|
1912
|
-
relation:
|
|
1913
|
-
list:
|
|
1880
|
+
text: It,
|
|
1881
|
+
checkbox: wt,
|
|
1882
|
+
select: De,
|
|
1883
|
+
multiSelect: Ft,
|
|
1884
|
+
relation: _e,
|
|
1885
|
+
list: ye
|
|
1914
1886
|
};
|
|
1915
1887
|
function o(e) {
|
|
1916
|
-
return a[e] ??
|
|
1888
|
+
return a[e] ?? It;
|
|
1917
1889
|
}
|
|
1918
1890
|
let s = U(!1), l = U(!1);
|
|
1919
1891
|
function u() {
|
|
@@ -1922,73 +1894,73 @@ var na = 5, ra = /*#__PURE__*/ k(/* @__PURE__ */ z({
|
|
|
1922
1894
|
function d() {
|
|
1923
1895
|
l.value = !l.value;
|
|
1924
1896
|
}
|
|
1925
|
-
return (t, n) => e.mode === "rail" && i.value.length > 0 ? (H(),
|
|
1897
|
+
return (t, n) => e.mode === "rail" && i.value.length > 0 ? (H(), I("div", ra, [L("button", {
|
|
1926
1898
|
type: "button",
|
|
1927
1899
|
class: "td-fm-rail-header",
|
|
1928
1900
|
onClick: d
|
|
1929
|
-
}, [n[0] ||=
|
|
1901
|
+
}, [n[0] ||= L("span", { class: "td-fm-rail-label" }, "Properties", -1), z(q(ue), {
|
|
1930
1902
|
size: 14,
|
|
1931
|
-
class:
|
|
1932
|
-
}, null, 8, ["class"])]),
|
|
1903
|
+
class: V(["td-fm-rail-caret", { "is-collapsed": l.value }])
|
|
1904
|
+
}, null, 8, ["class"])]), L("div", { class: V(["td-collapse", { "is-collapsed": l.value }]) }, [L("div", null, [(H(!0), I(M, null, W(i.value, ([e, t]) => (H(), I("div", {
|
|
1933
1905
|
key: e,
|
|
1934
1906
|
class: "td-fm-rail-row"
|
|
1935
|
-
}, [
|
|
1907
|
+
}, [L("span", ia, [(H(), P(ut(o(t.widget)), {
|
|
1936
1908
|
size: 12,
|
|
1937
1909
|
class: "td-fm-icon"
|
|
1938
|
-
})),
|
|
1910
|
+
})), R(" " + K(q(c)(e)), 1)]), L("span", aa, [z(na, {
|
|
1939
1911
|
definition: t,
|
|
1940
1912
|
value: r.value[e]
|
|
1941
|
-
}, null, 8, ["definition", "value"])])]))), 128))])], 2)])) : i.value.length > 0 ? (H(),
|
|
1913
|
+
}, null, 8, ["definition", "value"])])]))), 128))])], 2)])) : i.value.length > 0 ? (H(), I("div", oa, [L("button", {
|
|
1942
1914
|
type: "button",
|
|
1943
1915
|
class: "td-fm-box-header",
|
|
1944
1916
|
onClick: u
|
|
1945
|
-
}, [
|
|
1917
|
+
}, [L("span", sa, [n[1] ||= R("Properties ", -1), L("span", ca, K(i.value.length), 1)]), L("span", la, [R(K(s.value ? "Show" : "Hide") + " ", 1), s.value ? (H(), P(q(me), {
|
|
1946
1918
|
key: 1,
|
|
1947
1919
|
size: 14
|
|
1948
|
-
})) : (H(),
|
|
1920
|
+
})) : (H(), P(q(ue), {
|
|
1949
1921
|
key: 0,
|
|
1950
1922
|
size: 14
|
|
1951
|
-
}))])]),
|
|
1923
|
+
}))])]), L("div", { class: V(["td-collapse", { "is-collapsed": s.value }]) }, [L("div", ua, [(H(!0), I(M, null, W(i.value, ([e, t]) => (H(), I(M, { key: e }, [L("span", da, [(H(), P(ut(o(t.widget)), {
|
|
1952
1924
|
size: 12,
|
|
1953
1925
|
class: "td-fm-icon"
|
|
1954
|
-
})),
|
|
1926
|
+
})), R(" " + K(q(c)(e)), 1)]), L("span", fa, [z(na, {
|
|
1955
1927
|
definition: t,
|
|
1956
1928
|
value: r.value[e]
|
|
1957
|
-
}, null, 8, ["definition", "value"])])], 64))), 128))])], 2)])) :
|
|
1929
|
+
}, null, 8, ["definition", "value"])])], 64))), 128))])], 2)])) : F("", !0);
|
|
1958
1930
|
}
|
|
1959
1931
|
}), [["__scopeId", "data-v-88227032"]]);
|
|
1960
1932
|
// src/client/theme-default/composables/useMediaQuery.ts
|
|
1961
|
-
function
|
|
1933
|
+
function ma(e) {
|
|
1962
1934
|
let t = U(!1), n;
|
|
1963
1935
|
function r(e) {
|
|
1964
1936
|
t.value = e.matches;
|
|
1965
1937
|
}
|
|
1966
|
-
return
|
|
1938
|
+
return it(() => {
|
|
1967
1939
|
n = window.matchMedia(e), t.value = n.matches, n?.addEventListener("change", r);
|
|
1968
|
-
}),
|
|
1940
|
+
}), ot(() => {
|
|
1969
1941
|
n?.removeEventListener("change", r);
|
|
1970
1942
|
}), t;
|
|
1971
1943
|
}
|
|
1972
1944
|
// src/client/theme-default/composables/useHotkey.ts
|
|
1973
|
-
var
|
|
1945
|
+
var ha = /* @__PURE__ */ new Map([
|
|
1974
1946
|
[Q.Control, "ctrlKey"],
|
|
1975
1947
|
[Q.Alt, "altKey"],
|
|
1976
1948
|
[Q.Shift, "shiftKey"],
|
|
1977
1949
|
[Q.Meta, "metaKey"]
|
|
1978
1950
|
]);
|
|
1979
|
-
function
|
|
1951
|
+
function ga(e) {
|
|
1980
1952
|
if (!(e instanceof Element)) return !1;
|
|
1981
1953
|
let t = e.tagName.toLowerCase();
|
|
1982
1954
|
return t === "input" || t === "textarea" || t === "select" || e.isContentEditable;
|
|
1983
1955
|
}
|
|
1984
|
-
function
|
|
1956
|
+
function _a(e, t, n) {
|
|
1985
1957
|
function r(r) {
|
|
1986
|
-
r.defaultPrevented || n?.ignoreWhenTyping &&
|
|
1958
|
+
r.defaultPrevented || n?.ignoreWhenTyping && ga(r.target) || ba(r, e) && (r.preventDefault(), t(r));
|
|
1987
1959
|
}
|
|
1988
1960
|
let i = { capture: n?.capture ?? !1 };
|
|
1989
|
-
|
|
1961
|
+
it(() => window.addEventListener("keydown", r, i)), ot(() => window.removeEventListener("keydown", r, i));
|
|
1990
1962
|
}
|
|
1991
|
-
function
|
|
1963
|
+
function va(e) {
|
|
1992
1964
|
let t = [];
|
|
1993
1965
|
function n(e, n) {
|
|
1994
1966
|
t.push({
|
|
@@ -1997,47 +1969,47 @@ function Da(e) {
|
|
|
1997
1969
|
});
|
|
1998
1970
|
}
|
|
1999
1971
|
function r(e) {
|
|
2000
|
-
for (let n of t) if (
|
|
1972
|
+
for (let n of t) if (ba(e, n.keys)) {
|
|
2001
1973
|
e.preventDefault(), e.stopPropagation(), n.handler(e);
|
|
2002
1974
|
return;
|
|
2003
1975
|
}
|
|
2004
1976
|
}
|
|
2005
1977
|
return Y(e, (e, t) => {
|
|
2006
1978
|
t?.removeEventListener("keydown", r), e?.addEventListener("keydown", r);
|
|
2007
|
-
}, { immediate: !0 }),
|
|
1979
|
+
}, { immediate: !0 }), ot(() => {
|
|
2008
1980
|
e.value?.removeEventListener("keydown", r);
|
|
2009
1981
|
}), { register: n };
|
|
2010
1982
|
}
|
|
2011
|
-
function
|
|
1983
|
+
function ya(e) {
|
|
2012
1984
|
if (e.length === 1 && /[a-z]/i.test(e)) return `Key${e.toUpperCase()}`;
|
|
2013
1985
|
}
|
|
2014
|
-
function
|
|
2015
|
-
let n = t.filter((e) =>
|
|
1986
|
+
function ba(e, t) {
|
|
1987
|
+
let n = t.filter((e) => ha.has(e)), r = t.filter((e) => !ha.has(e));
|
|
2016
1988
|
if (r.length !== 1) return !1;
|
|
2017
|
-
let i =
|
|
1989
|
+
let i = ya(r[0]);
|
|
2018
1990
|
if (!(i ? e.code === i : e.key.toLowerCase() === r[0].toLowerCase())) return !1;
|
|
2019
|
-
for (let t of n) if (!e[
|
|
1991
|
+
for (let t of n) if (!e[ha.get(t)]) return !1;
|
|
2020
1992
|
return !(e.ctrlKey && !n.includes(Q.Control) || e.altKey && !n.includes(Q.Alt) || e.shiftKey && !n.includes(Q.Shift) || e.metaKey && !n.includes(Q.Meta));
|
|
2021
1993
|
}
|
|
2022
1994
|
// src/client/theme-default/composables/useMenu.ts
|
|
2023
|
-
var
|
|
2024
|
-
function
|
|
2025
|
-
let e =
|
|
1995
|
+
var xa = U(!1);
|
|
1996
|
+
function Sa() {
|
|
1997
|
+
let e = ma("(width >= 64rem)"), t = N(() => !e.value);
|
|
2026
1998
|
function n() {
|
|
2027
|
-
|
|
1999
|
+
xa.value = !xa.value;
|
|
2028
2000
|
}
|
|
2029
2001
|
function r() {
|
|
2030
|
-
|
|
2002
|
+
xa.value = !0;
|
|
2031
2003
|
}
|
|
2032
2004
|
function i() {
|
|
2033
|
-
|
|
2005
|
+
xa.value = !1;
|
|
2034
2006
|
}
|
|
2035
2007
|
return Y(e, (e) => {
|
|
2036
2008
|
e && i();
|
|
2037
|
-
}),
|
|
2038
|
-
|
|
2009
|
+
}), _a([Q.Escape], () => {
|
|
2010
|
+
xa.value && i();
|
|
2039
2011
|
}), {
|
|
2040
|
-
isOpen:
|
|
2012
|
+
isOpen: st(xa),
|
|
2041
2013
|
isDrawerMounted: t,
|
|
2042
2014
|
toggle: n,
|
|
2043
2015
|
open: r,
|
|
@@ -2045,20 +2017,20 @@ function ja() {
|
|
|
2045
2017
|
};
|
|
2046
2018
|
}
|
|
2047
2019
|
// src/client/theme-default/components/TdMenuButton.vue
|
|
2048
|
-
var
|
|
2020
|
+
var Ca = /* @__PURE__ */ B({
|
|
2049
2021
|
__name: "TdMenuButton",
|
|
2050
2022
|
setup(e) {
|
|
2051
|
-
let { isOpen: t, toggle: n } =
|
|
2052
|
-
return (e, r) => (H(),
|
|
2023
|
+
let { isOpen: t, toggle: n } = Sa();
|
|
2024
|
+
return (e, r) => (H(), P(Ut, {
|
|
2053
2025
|
class: "td-menu-button",
|
|
2054
2026
|
label: q(t) ? "Close menu" : "Open menu",
|
|
2055
2027
|
"aria-expanded": q(t),
|
|
2056
2028
|
onClick: q(n)
|
|
2057
2029
|
}, {
|
|
2058
|
-
default: X(() => [q(t) ? (H(),
|
|
2030
|
+
default: X(() => [q(t) ? (H(), P(q(Ne), {
|
|
2059
2031
|
key: 0,
|
|
2060
2032
|
size: 20
|
|
2061
|
-
})) : (H(),
|
|
2033
|
+
})) : (H(), P(q(ze), {
|
|
2062
2034
|
key: 1,
|
|
2063
2035
|
size: 20
|
|
2064
2036
|
}))]),
|
|
@@ -2071,9 +2043,9 @@ var Ma = /* @__PURE__ */ z({
|
|
|
2071
2043
|
}
|
|
2072
2044
|
});
|
|
2073
2045
|
// src/client/theme-default/composables/usePreviousNext.ts
|
|
2074
|
-
function
|
|
2075
|
-
let e =
|
|
2076
|
-
let i =
|
|
2046
|
+
function wa() {
|
|
2047
|
+
let e = ke(), t = Ie(), { withBase: n, title: r } = j(), i = N(() => {
|
|
2048
|
+
let i = Ea(e.value.contentTree, r), a = i.findIndex((e) => e.url === t.path);
|
|
2077
2049
|
if (a === -1) return {};
|
|
2078
2050
|
let o = 0 < a ? i[a - 1] : void 0, s = a < i.length - 1 ? i[a + 1] : void 0;
|
|
2079
2051
|
return {
|
|
@@ -2088,22 +2060,22 @@ function Na() {
|
|
|
2088
2060
|
};
|
|
2089
2061
|
});
|
|
2090
2062
|
return {
|
|
2091
|
-
previous:
|
|
2092
|
-
next:
|
|
2063
|
+
previous: N(() => i.value.previous),
|
|
2064
|
+
next: N(() => i.value.next)
|
|
2093
2065
|
};
|
|
2094
2066
|
}
|
|
2095
|
-
function
|
|
2067
|
+
function Ta(e, t, n) {
|
|
2096
2068
|
let r = w(t, e.name), i = l(e);
|
|
2097
|
-
i && n.push(
|
|
2098
|
-
for (let t of e.entries) t.kind === "file" && !d(t.item.filepath) ? n.push(
|
|
2069
|
+
i && n.push(Da(i));
|
|
2070
|
+
for (let t of e.entries) t.kind === "file" && !d(t.item.filepath) ? n.push(Da(t.item)) : t.kind === "dir" && Ta(t.node, r, n);
|
|
2099
2071
|
}
|
|
2100
|
-
function
|
|
2072
|
+
function Ea(e, t) {
|
|
2101
2073
|
let n = [], r = e.entries.find((e) => e.kind === "file" && d(e.item.filepath));
|
|
2102
|
-
r && r.kind === "file" && n.push(
|
|
2103
|
-
for (let t of e.entries) t.kind === "file" && !d(t.item.filepath) ? n.push(
|
|
2074
|
+
r && r.kind === "file" && n.push(Da(r.item, t));
|
|
2075
|
+
for (let t of e.entries) t.kind === "file" && !d(t.item.filepath) ? n.push(Da(t.item)) : t.kind === "dir" && Ta(t.node, "", n);
|
|
2104
2076
|
return n;
|
|
2105
2077
|
}
|
|
2106
|
-
function
|
|
2078
|
+
function Da(e, n) {
|
|
2107
2079
|
let r = e.label === void 0 ? n === void 0 ? T(e.filepath) : C(e.filepath, n) : e.label;
|
|
2108
2080
|
return {
|
|
2109
2081
|
url: t(e.filepath),
|
|
@@ -2111,58 +2083,57 @@ function Ia(e, n) {
|
|
|
2111
2083
|
};
|
|
2112
2084
|
}
|
|
2113
2085
|
// src/client/theme-default/components/TdPreviousNext.vue?vue&type=script&setup=true&lang.ts
|
|
2114
|
-
var
|
|
2086
|
+
var Oa = {
|
|
2115
2087
|
key: 0,
|
|
2116
2088
|
class: "td-prevnext",
|
|
2117
2089
|
"aria-label": "Page navigation"
|
|
2118
|
-
},
|
|
2090
|
+
}, ka = ["href"], Aa = { class: "td-prevnext-label" }, ja = { class: "td-prevnext-title" }, Ma = {
|
|
2119
2091
|
key: 1,
|
|
2120
2092
|
class: "td-prevnext-spacer"
|
|
2121
|
-
},
|
|
2093
|
+
}, Na = ["href"], Pa = { class: "td-prevnext-label" }, Fa = { class: "td-prevnext-title" }, Ia = {
|
|
2122
2094
|
key: 3,
|
|
2123
2095
|
class: "td-prevnext-spacer"
|
|
2124
|
-
},
|
|
2096
|
+
}, La = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2125
2097
|
__name: "TdPreviousNext",
|
|
2126
2098
|
setup(e) {
|
|
2127
|
-
let { previous: t, next: n } =
|
|
2128
|
-
return (e, r) => q(t) || q(n) ? (H(),
|
|
2099
|
+
let { previous: t, next: n } = wa();
|
|
2100
|
+
return (e, r) => q(t) || q(n) ? (H(), I("nav", Oa, [q(t) ? (H(), I("a", {
|
|
2129
2101
|
key: 0,
|
|
2130
2102
|
href: q(t).url,
|
|
2131
2103
|
class: "td-prevnext-link is-previous"
|
|
2132
|
-
}, [
|
|
2133
|
-
|
|
2104
|
+
}, [L("span", Aa, [
|
|
2105
|
+
z(q(ge), {
|
|
2134
2106
|
size: 14,
|
|
2135
2107
|
class: "td-prevnext-chevron"
|
|
2136
2108
|
}),
|
|
2137
|
-
r[0] ||=
|
|
2138
|
-
|
|
2139
|
-
]),
|
|
2109
|
+
r[0] ||= R(" Previous ", -1),
|
|
2110
|
+
z($, { keys: [q(Q).Control, q(Q).ArrowLeft] }, null, 8, ["keys"])
|
|
2111
|
+
]), L("span", ja, K(q(t).title), 1)], 8, ka)) : (H(), I("span", Ma)), q(n) ? (H(), I("a", {
|
|
2140
2112
|
key: 2,
|
|
2141
2113
|
href: q(n).url,
|
|
2142
2114
|
class: "td-prevnext-link is-next"
|
|
2143
|
-
}, [
|
|
2144
|
-
|
|
2145
|
-
r[1] ||=
|
|
2146
|
-
|
|
2115
|
+
}, [L("span", Pa, [
|
|
2116
|
+
z($, { keys: [q(Q).Control, q(Q).ArrowRight] }, null, 8, ["keys"]),
|
|
2117
|
+
r[1] ||= R(" Next ", -1),
|
|
2118
|
+
z(q(me), {
|
|
2147
2119
|
size: 14,
|
|
2148
2120
|
class: "td-prevnext-chevron"
|
|
2149
2121
|
})
|
|
2150
|
-
]),
|
|
2122
|
+
]), L("span", Fa, K(q(n).title), 1)], 8, Na)) : (H(), I("span", Ia))])) : F("", !0);
|
|
2151
2123
|
}
|
|
2152
|
-
}), [["__scopeId", "data-v-b937f37a"]]),
|
|
2153
|
-
function
|
|
2124
|
+
}), [["__scopeId", "data-v-b937f37a"]]), Ra = 100;
|
|
2125
|
+
function za(e) {
|
|
2154
2126
|
let t = U(void 0), n = [], r;
|
|
2155
2127
|
function i() {
|
|
2156
2128
|
if (n.length === 0) return;
|
|
2157
|
-
|
|
2158
|
-
if (document.body.offsetHeight <= e + window.innerHeight) {
|
|
2129
|
+
if (document.body.offsetHeight <= window.scrollY + window.innerHeight) {
|
|
2159
2130
|
t.value = n.at(-1).id;
|
|
2160
2131
|
return;
|
|
2161
2132
|
}
|
|
2162
|
-
let
|
|
2163
|
-
for (let t of n) if (
|
|
2133
|
+
let e;
|
|
2134
|
+
for (let t of n) if (t.getBoundingClientRect().top <= Ra) e = t.id;
|
|
2164
2135
|
else break;
|
|
2165
|
-
t.value =
|
|
2136
|
+
t.value = e;
|
|
2166
2137
|
}
|
|
2167
2138
|
function a() {
|
|
2168
2139
|
r !== void 0 && cancelAnimationFrame(r), r = requestAnimationFrame(i);
|
|
@@ -2173,31 +2144,26 @@ function Ja(e) {
|
|
|
2173
2144
|
let r = new Set(e.map((e) => e.slug));
|
|
2174
2145
|
n = Array.from(document.querySelectorAll(".td-content h2[id], .td-content h3[id], .td-content h4[id], .td-content h5[id]")).filter((e) => r.has(e.id)), i();
|
|
2175
2146
|
}
|
|
2176
|
-
return
|
|
2147
|
+
return it(() => {
|
|
2177
2148
|
window.addEventListener("scroll", a);
|
|
2178
|
-
}),
|
|
2149
|
+
}), ot(() => {
|
|
2179
2150
|
window.removeEventListener("scroll", a), r !== void 0 && cancelAnimationFrame(r);
|
|
2180
2151
|
}), Y(e, (e) => {
|
|
2181
|
-
typeof window < "u" &&
|
|
2152
|
+
typeof window < "u" && tt(() => o(e));
|
|
2182
2153
|
}, { immediate: !0 }), t;
|
|
2183
2154
|
}
|
|
2184
|
-
function Ya(e) {
|
|
2185
|
-
let t = 0, n = e;
|
|
2186
|
-
for (; n;) t += n.offsetTop, n = n.offsetParent;
|
|
2187
|
-
return t;
|
|
2188
|
-
}
|
|
2189
2155
|
// src/client/theme-default/components/custom/TdToc.vue?vue&type=script&setup=true&lang.ts
|
|
2190
|
-
var
|
|
2156
|
+
var Ba = {
|
|
2191
2157
|
key: 0,
|
|
2192
2158
|
class: "td-toc-inline-wrap"
|
|
2193
|
-
},
|
|
2159
|
+
}, Va = { class: "td-toc-inline-list" }, Ha = ["href", "innerHTML"], Ua = {
|
|
2194
2160
|
key: 0,
|
|
2195
2161
|
class: "td-toc-inline-children"
|
|
2196
|
-
},
|
|
2162
|
+
}, Wa = ["href", "innerHTML"], Ga = {
|
|
2197
2163
|
key: 1,
|
|
2198
2164
|
class: "td-toc",
|
|
2199
2165
|
"data-testid": "toc"
|
|
2200
|
-
},
|
|
2166
|
+
}, Ka = { class: "td-toc-list" }, qa = ["href", "innerHTML"], Ja = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2201
2167
|
__name: "TdToc",
|
|
2202
2168
|
props: {
|
|
2203
2169
|
headings: {},
|
|
@@ -2215,75 +2181,80 @@ var Xa = {
|
|
|
2215
2181
|
}
|
|
2216
2182
|
},
|
|
2217
2183
|
setup(e) {
|
|
2218
|
-
let t =
|
|
2184
|
+
let t = N(() => {
|
|
2219
2185
|
let t = [];
|
|
2220
2186
|
for (let n of e.headings) {
|
|
2221
2187
|
t.push(n);
|
|
2222
2188
|
for (let e of n.children) t.push(e);
|
|
2223
2189
|
}
|
|
2224
2190
|
return t;
|
|
2225
|
-
}), n = e.static || e.inline ?
|
|
2191
|
+
}), n = e.static || e.inline ? N(() => void 0) : za(() => t.value), r = J("list");
|
|
2226
2192
|
return Y(n, () => {
|
|
2227
|
-
|
|
2228
|
-
r.value?.querySelector("a.is-active")
|
|
2193
|
+
tt(() => {
|
|
2194
|
+
let e = r.value, t = e?.querySelector("a.is-active");
|
|
2195
|
+
if (!e || !t) return;
|
|
2196
|
+
let n = e.closest(".td-toc") ?? e;
|
|
2197
|
+
if (n.scrollHeight <= n.clientHeight) return;
|
|
2198
|
+
let i = n.getBoundingClientRect(), a = t.getBoundingClientRect().top - i.top - n.clientHeight / 2 + t.clientHeight / 2;
|
|
2199
|
+
n.scrollTop += a;
|
|
2229
2200
|
});
|
|
2230
|
-
}), (r, i) => e.inline ? (H(),
|
|
2201
|
+
}), (r, i) => e.inline ? (H(), I("div", Ba, [i[0] ||= L("div", { class: "td-toc-inline-label" }, " On this page ", -1), L("ul", Va, [(H(!0), I(M, null, W(e.headings, (e) => (H(), I("li", {
|
|
2231
2202
|
key: e.slug,
|
|
2232
2203
|
class: "td-toc-inline-item"
|
|
2233
|
-
}, [
|
|
2204
|
+
}, [L("a", {
|
|
2234
2205
|
href: e.link,
|
|
2235
2206
|
class: "td-toc-inline-link is-h2",
|
|
2236
2207
|
innerHTML: q(g)(e.titleHtml)
|
|
2237
|
-
}, null, 8,
|
|
2208
|
+
}, null, 8, Ha), e.children.length ? (H(), I("ul", Ua, [(H(!0), I(M, null, W(e.children, (e) => (H(), I("li", { key: e.slug }, [L("a", {
|
|
2238
2209
|
href: e.link,
|
|
2239
2210
|
class: "td-toc-inline-link is-h3",
|
|
2240
2211
|
innerHTML: q(g)(e.titleHtml)
|
|
2241
|
-
}, null, 8,
|
|
2212
|
+
}, null, 8, Wa)]))), 128))])) : F("", !0)]))), 128))])])) : e.headings.length ? (H(), I("div", Ga, [L("div", {
|
|
2242
2213
|
ref: "list",
|
|
2243
|
-
class:
|
|
2244
|
-
}, [
|
|
2214
|
+
class: V(["td-toc-list-wrap", { "is-scrollable": e.scrollable }])
|
|
2215
|
+
}, [L("ul", Ka, [(H(!0), I(M, null, W(t.value, (e) => (H(), I("li", {
|
|
2245
2216
|
key: e.slug,
|
|
2246
|
-
class:
|
|
2217
|
+
class: V({
|
|
2247
2218
|
"td-toc-indent-1": e.level === 3,
|
|
2248
2219
|
"td-toc-indent-2": e.level === 4,
|
|
2249
2220
|
"td-toc-indent-3": e.level === 5
|
|
2250
2221
|
})
|
|
2251
|
-
}, [
|
|
2222
|
+
}, [L("a", {
|
|
2252
2223
|
href: e.link,
|
|
2253
|
-
class:
|
|
2224
|
+
class: V(["td-toc-link", { "is-active": q(n) === e.slug }]),
|
|
2254
2225
|
innerHTML: q(g)(e.titleHtml)
|
|
2255
|
-
}, null, 10,
|
|
2226
|
+
}, null, 10, qa)], 2))), 128))])], 2)])) : F("", !0);
|
|
2256
2227
|
}
|
|
2257
|
-
}), [["__scopeId", "data-v-
|
|
2228
|
+
}), [["__scopeId", "data-v-f02336c5"]]), Ya = {
|
|
2258
2229
|
key: 0,
|
|
2259
2230
|
class: "td-rail"
|
|
2260
|
-
},
|
|
2231
|
+
}, Xa = { class: "td-rail-inner" }, Za = {
|
|
2261
2232
|
class: "td-rail-indicators",
|
|
2262
2233
|
"aria-hidden": "true"
|
|
2263
|
-
},
|
|
2234
|
+
}, Qa = { class: "td-rail-panel" }, $a = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2264
2235
|
__name: "TdRail",
|
|
2265
2236
|
setup(e) {
|
|
2266
|
-
let { page: t } =
|
|
2237
|
+
let { page: t } = Se(), n = N(() => {
|
|
2267
2238
|
let e = [];
|
|
2268
2239
|
for (let n of t.value.headings) {
|
|
2269
2240
|
e.push(n);
|
|
2270
2241
|
for (let t of n.children) e.push(t);
|
|
2271
2242
|
}
|
|
2272
2243
|
return e;
|
|
2273
|
-
}), r =
|
|
2274
|
-
return (e, i) => q(t).headings.length > 1 ? (H(),
|
|
2244
|
+
}), r = za(() => n.value);
|
|
2245
|
+
return (e, i) => q(t).headings.length > 1 ? (H(), I("aside", Ya, [L("div", Xa, [L("div", Za, [(H(!0), I(M, null, W(n.value, (e) => (H(), I("div", {
|
|
2275
2246
|
key: e.slug,
|
|
2276
|
-
class:
|
|
2247
|
+
class: V(["td-rail-indicator", {
|
|
2277
2248
|
"is-h3": e.level === 3,
|
|
2278
2249
|
"is-active": q(r) === e.slug
|
|
2279
2250
|
}])
|
|
2280
|
-
}, null, 2))), 128))]),
|
|
2251
|
+
}, null, 2))), 128))]), L("div", Qa, [z(Ja, { headings: q(t).headings }, null, 8, ["headings"])])])])) : F("", !0);
|
|
2281
2252
|
}
|
|
2282
|
-
}), [["__scopeId", "data-v-ebea8dba"]]),
|
|
2253
|
+
}), [["__scopeId", "data-v-ebea8dba"]]), eo = {
|
|
2283
2254
|
class: "td-skeleton",
|
|
2284
2255
|
role: "status",
|
|
2285
2256
|
"aria-label": "Loading"
|
|
2286
|
-
},
|
|
2257
|
+
}, to = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2287
2258
|
__name: "TdSkeleton",
|
|
2288
2259
|
props: { lines: { default: 5 } },
|
|
2289
2260
|
setup(e) {
|
|
@@ -2297,13 +2268,13 @@ var Xa = {
|
|
|
2297
2268
|
55,
|
|
2298
2269
|
72
|
|
2299
2270
|
];
|
|
2300
|
-
return (n, r) => (H(),
|
|
2271
|
+
return (n, r) => (H(), I("div", eo, [(H(!0), I(M, null, W(e.lines, (e) => (H(), I("div", {
|
|
2301
2272
|
key: e,
|
|
2302
2273
|
class: "td-skeleton-line",
|
|
2303
|
-
style:
|
|
2274
|
+
style: nt({ width: `${t[(e - 1) % t.length]}%` })
|
|
2304
2275
|
}, null, 4))), 128))]));
|
|
2305
2276
|
}
|
|
2306
|
-
}), [["__scopeId", "data-v-f78bb079"]]),
|
|
2277
|
+
}), [["__scopeId", "data-v-f78bb079"]]), no = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2307
2278
|
__name: "TdSidebarNav",
|
|
2308
2279
|
props: {
|
|
2309
2280
|
tree: {},
|
|
@@ -2311,33 +2282,33 @@ var Xa = {
|
|
|
2311
2282
|
ready: { type: Boolean }
|
|
2312
2283
|
},
|
|
2313
2284
|
setup(e) {
|
|
2314
|
-
let t =
|
|
2285
|
+
let t = Ie(), n = J("scrollElement");
|
|
2315
2286
|
return Y(() => t.path, () => {
|
|
2316
|
-
|
|
2287
|
+
tt(() => {
|
|
2317
2288
|
n.value?.querySelector(".is-active")?.scrollIntoView({ block: "nearest" });
|
|
2318
2289
|
});
|
|
2319
|
-
}, { immediate: !0 }), (t, r) => (H(),
|
|
2290
|
+
}, { immediate: !0 }), (t, r) => (H(), I("div", {
|
|
2320
2291
|
ref_key: "scrollElement",
|
|
2321
2292
|
ref: n,
|
|
2322
2293
|
class: "td-sidebar-scroll"
|
|
2323
|
-
}, [!e.searchActive && !e.ready ? (H(),
|
|
2294
|
+
}, [!e.searchActive && !e.ready ? (H(), P(to, { key: 0 })) : e.searchActive ? F("", !0) : (H(), P(ni, {
|
|
2324
2295
|
key: 1,
|
|
2325
2296
|
tree: e.tree
|
|
2326
2297
|
}, null, 8, ["tree"]))], 512));
|
|
2327
2298
|
}
|
|
2328
|
-
}), [["__scopeId", "data-v-ca83b6cd"]]),
|
|
2299
|
+
}), [["__scopeId", "data-v-ca83b6cd"]]), ro = { class: "td-sidebar-icons" }, io = ["href", "aria-label"], ao = {
|
|
2329
2300
|
key: 1,
|
|
2330
2301
|
class: "td-sidebar-icon-sep"
|
|
2331
|
-
},
|
|
2302
|
+
}, oo = ["href", "aria-label"], so = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2332
2303
|
__name: "TdSidebarIcons",
|
|
2333
2304
|
props: { tree: {} },
|
|
2334
2305
|
emits: ["search"],
|
|
2335
2306
|
setup(n, { emit: r }) {
|
|
2336
|
-
let i = r, a =
|
|
2307
|
+
let i = r, a = Ie(), { withBase: o } = j(), u = N(() => n.tree.entries.find((e) => e.kind === "file" && d(e.item.filepath))?.item), f = N(() => {
|
|
2337
2308
|
let e = [];
|
|
2338
2309
|
for (let r of n.tree.entries) {
|
|
2339
2310
|
if (r.kind !== "dir") continue;
|
|
2340
|
-
let n = r.node, i = w("", n.name), a = l(n), u = a ? t(a.filepath) : s(i), d = a?.label ?? c(n.name), f = a?.icon ?
|
|
2311
|
+
let n = r.node, i = w("", n.name), a = l(n), u = a ? t(a.filepath) : s(i), d = a?.label ?? c(n.name), f = a?.icon ? Le(a.icon.name) : void 0;
|
|
2341
2312
|
e.push({
|
|
2342
2313
|
label: d,
|
|
2343
2314
|
href: o(u),
|
|
@@ -2354,55 +2325,55 @@ var Xa = {
|
|
|
2354
2325
|
function m(t) {
|
|
2355
2326
|
return a.path === t || e(t, a.path);
|
|
2356
2327
|
}
|
|
2357
|
-
return (e, n) => (H(),
|
|
2358
|
-
|
|
2328
|
+
return (e, n) => (H(), I("div", ro, [
|
|
2329
|
+
z(Fr, {
|
|
2359
2330
|
text: "Search",
|
|
2360
2331
|
always: ""
|
|
2361
2332
|
}, {
|
|
2362
|
-
default: X(() => [
|
|
2333
|
+
default: X(() => [L("button", {
|
|
2363
2334
|
class: "td-sidebar-icon-btn",
|
|
2364
2335
|
type: "button",
|
|
2365
2336
|
"aria-label": "Search",
|
|
2366
2337
|
onClick: p
|
|
2367
|
-
}, [
|
|
2338
|
+
}, [z(q(Ve), { size: 16 })])]),
|
|
2368
2339
|
_: 1
|
|
2369
2340
|
}),
|
|
2370
|
-
u.value ? (H(),
|
|
2341
|
+
u.value ? (H(), P(Fr, {
|
|
2371
2342
|
key: 0,
|
|
2372
2343
|
text: u.value.label ?? "Home",
|
|
2373
2344
|
always: ""
|
|
2374
2345
|
}, {
|
|
2375
|
-
default: X(() => [
|
|
2346
|
+
default: X(() => [L("a", {
|
|
2376
2347
|
href: q(o)(q(t)(u.value.filepath)),
|
|
2377
|
-
class:
|
|
2348
|
+
class: V(["td-sidebar-icon-btn", { "is-active": m(q(t)(u.value.filepath)) }]),
|
|
2378
2349
|
"aria-label": u.value.label ?? "Home"
|
|
2379
|
-
}, [
|
|
2350
|
+
}, [z(q(le), { size: 16 })], 10, io)]),
|
|
2380
2351
|
_: 1
|
|
2381
|
-
}, 8, ["text"])) :
|
|
2382
|
-
f.value.length ? (H(),
|
|
2383
|
-
(H(!0),
|
|
2352
|
+
}, 8, ["text"])) : F("", !0),
|
|
2353
|
+
f.value.length ? (H(), I("div", ao)) : F("", !0),
|
|
2354
|
+
(H(!0), I(M, null, W(f.value, (e) => (H(), P(Fr, {
|
|
2384
2355
|
key: e.href,
|
|
2385
2356
|
text: e.label,
|
|
2386
2357
|
always: ""
|
|
2387
2358
|
}, {
|
|
2388
|
-
default: X(() => [
|
|
2359
|
+
default: X(() => [L("a", {
|
|
2389
2360
|
href: e.href,
|
|
2390
|
-
class:
|
|
2361
|
+
class: V(["td-sidebar-icon-btn", { "is-active": m(e.path) }]),
|
|
2391
2362
|
"aria-label": e.label
|
|
2392
|
-
}, [e.isFallback ? (H(),
|
|
2363
|
+
}, [e.isFallback ? (H(), P(q(ce), {
|
|
2393
2364
|
key: 1,
|
|
2394
2365
|
size: 16
|
|
2395
|
-
})) : (H(),
|
|
2366
|
+
})) : (H(), P(ut(e.icon), {
|
|
2396
2367
|
key: 0,
|
|
2397
2368
|
size: 16
|
|
2398
|
-
}))], 10,
|
|
2369
|
+
}))], 10, oo)]),
|
|
2399
2370
|
_: 2
|
|
2400
2371
|
}, 1032, ["text"]))), 128))
|
|
2401
2372
|
]));
|
|
2402
2373
|
}
|
|
2403
2374
|
}), [["__scopeId", "data-v-a8248b04"]]);
|
|
2404
2375
|
// src/client/theme-default/components/TdSiteSearch/highlight.ts
|
|
2405
|
-
function
|
|
2376
|
+
function co(e, t) {
|
|
2406
2377
|
if (!e || !t) return f(e);
|
|
2407
2378
|
let n = t.trim().split(/\s+/).filter(Boolean), r = f(e);
|
|
2408
2379
|
for (let e of n) {
|
|
@@ -2412,15 +2383,15 @@ function yo(e, t) {
|
|
|
2412
2383
|
return r;
|
|
2413
2384
|
}
|
|
2414
2385
|
// src/client/theme-default/components/TdSiteSearch/useSiteSearch.ts
|
|
2415
|
-
var
|
|
2416
|
-
function
|
|
2417
|
-
let e =
|
|
2386
|
+
var lo = 120;
|
|
2387
|
+
function uo() {
|
|
2388
|
+
let e = Pe(), t, n = ft([]), r = ft(!1);
|
|
2418
2389
|
Y(e, () => {
|
|
2419
2390
|
t = void 0;
|
|
2420
2391
|
});
|
|
2421
2392
|
function i() {
|
|
2422
2393
|
if (t) return t;
|
|
2423
|
-
if (e.value) return t =
|
|
2394
|
+
if (e.value) return t = Qe(ae.loadJSON(e.value, {
|
|
2424
2395
|
fields: v,
|
|
2425
2396
|
storeFields: x
|
|
2426
2397
|
})), t;
|
|
@@ -2428,13 +2399,13 @@ function xo() {
|
|
|
2428
2399
|
function a(e, t) {
|
|
2429
2400
|
if (!e) return "";
|
|
2430
2401
|
let n = Object.keys(t);
|
|
2431
|
-
if (n.length === 0) return e.slice(0,
|
|
2402
|
+
if (n.length === 0) return e.slice(0, lo);
|
|
2432
2403
|
let r = e.toLowerCase(), i = e.length;
|
|
2433
2404
|
for (let e of n) {
|
|
2434
2405
|
let t = r.indexOf(e.toLowerCase());
|
|
2435
2406
|
t !== -1 && t < i && (i = t);
|
|
2436
2407
|
}
|
|
2437
|
-
let a = Math.max(0, i - 30), o = Math.min(e.length, a +
|
|
2408
|
+
let a = Math.max(0, i - 30), o = Math.min(e.length, a + lo), s = e.slice(a, o).trim();
|
|
2438
2409
|
return 0 < a && (s = "..." + s), o < e.length && (s += "..."), s;
|
|
2439
2410
|
}
|
|
2440
2411
|
async function o(e) {
|
|
@@ -2466,7 +2437,7 @@ function xo() {
|
|
|
2466
2437
|
function l() {
|
|
2467
2438
|
r.value = !1;
|
|
2468
2439
|
}
|
|
2469
|
-
let u =
|
|
2440
|
+
let u = ft(!1);
|
|
2470
2441
|
return Y(e, (e) => {
|
|
2471
2442
|
e && (u.value = !0);
|
|
2472
2443
|
}, { immediate: !0 }), {
|
|
@@ -2478,31 +2449,31 @@ function xo() {
|
|
|
2478
2449
|
};
|
|
2479
2450
|
}
|
|
2480
2451
|
// src/client/theme-default/components/TdCommandPalette.vue?vue&type=script&setup=true&lang.ts
|
|
2481
|
-
var
|
|
2452
|
+
var fo = {
|
|
2482
2453
|
class: "td-palette",
|
|
2483
2454
|
role: "dialog",
|
|
2484
2455
|
"aria-modal": "true",
|
|
2485
2456
|
"aria-label": "Command palette"
|
|
2486
|
-
},
|
|
2457
|
+
}, po = { class: "td-palette-input-row" }, mo = {
|
|
2487
2458
|
ref: "results",
|
|
2488
2459
|
class: "td-palette-results"
|
|
2489
|
-
},
|
|
2460
|
+
}, ho = [
|
|
2490
2461
|
"href",
|
|
2491
2462
|
"onClick",
|
|
2492
2463
|
"onMouseenter"
|
|
2493
|
-
],
|
|
2464
|
+
], go = ["innerHTML"], _o = { class: "td-palette-item-path" }, vo = { class: "td-palette-group-label" }, yo = { class: "td-palette-item-label" }, bo = {
|
|
2494
2465
|
key: 1,
|
|
2495
2466
|
class: "td-palette-empty"
|
|
2496
|
-
},
|
|
2467
|
+
}, xo = { class: "td-palette-footer" }, So = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2497
2468
|
__name: "TdCommandPalette",
|
|
2498
2469
|
emits: ["toggle-sidebar", "show-shortcuts"],
|
|
2499
2470
|
setup(e, { expose: t, emit: r }) {
|
|
2500
|
-
let i = r, a = U(!1), o = U(""), s = U(0), c = J("input"), l = J("results"), u =
|
|
2471
|
+
let i = r, a = U(!1), o = U(""), s = U(0), c = J("input"), l = J("results"), u = Ie(), d = we(), { withBase: f } = j(), { previous: p, next: m } = wa(), { results: h, search: g, cancel: _ } = uo(), v = N(() => o.value.trim());
|
|
2501
2472
|
function y() {
|
|
2502
2473
|
a.value = !1, _();
|
|
2503
2474
|
}
|
|
2504
2475
|
function b() {
|
|
2505
|
-
o.value = "", a.value = !0, s.value = 0,
|
|
2476
|
+
o.value = "", a.value = !0, s.value = 0, tt(() => c.value?.focus());
|
|
2506
2477
|
}
|
|
2507
2478
|
t({
|
|
2508
2479
|
open: b,
|
|
@@ -2510,10 +2481,10 @@ var So = {
|
|
|
2510
2481
|
}), Y(v, (e, t, n) => {
|
|
2511
2482
|
n(() => _()), g(e), s.value = 0;
|
|
2512
2483
|
});
|
|
2513
|
-
let x =
|
|
2484
|
+
let x = N(() => {
|
|
2514
2485
|
let e = n(u.path);
|
|
2515
2486
|
return e === "/" ? void 0 : e;
|
|
2516
|
-
}), S =
|
|
2487
|
+
}), S = N(() => {
|
|
2517
2488
|
let e = [];
|
|
2518
2489
|
return m.value && e.push({
|
|
2519
2490
|
id: "nav-next",
|
|
@@ -2554,18 +2525,18 @@ var So = {
|
|
|
2554
2525
|
navigator.clipboard.writeText(window.location.href).catch(() => {}), y();
|
|
2555
2526
|
}
|
|
2556
2527
|
}), e;
|
|
2557
|
-
}), C =
|
|
2528
|
+
}), C = N(() => {
|
|
2558
2529
|
if (!v.value) return S.value;
|
|
2559
2530
|
let e = v.value.toLowerCase();
|
|
2560
2531
|
return S.value.filter((t) => t.label.toLowerCase().includes(e) || t.group.toLowerCase().includes(e));
|
|
2561
|
-
}), w =
|
|
2532
|
+
}), w = N(() => {
|
|
2562
2533
|
let e = /* @__PURE__ */ new Map();
|
|
2563
2534
|
for (let t of C.value) e.has(t.group) || e.set(t.group, []), e.get(t.group).push(t);
|
|
2564
2535
|
return [...e.entries()].map(([e, t]) => ({
|
|
2565
2536
|
name: e,
|
|
2566
2537
|
commands: t
|
|
2567
2538
|
}));
|
|
2568
|
-
}), T =
|
|
2539
|
+
}), T = N(() => h.value.length + C.value.length);
|
|
2569
2540
|
function E(e) {
|
|
2570
2541
|
return h.value.length + C.value.indexOf(e);
|
|
2571
2542
|
}
|
|
@@ -2595,16 +2566,16 @@ var So = {
|
|
|
2595
2566
|
requestAnimationFrame(() => {
|
|
2596
2567
|
l.value?.querySelector(".is-selected")?.scrollIntoView({ block: "nearest" });
|
|
2597
2568
|
});
|
|
2598
|
-
}), (e, t) => (H(),
|
|
2569
|
+
}), (e, t) => (H(), P(Je, { to: "body" }, [a.value ? (H(), I(M, { key: 0 }, [L("div", {
|
|
2599
2570
|
class: "td-palette-scrim",
|
|
2600
2571
|
onClick: y
|
|
2601
|
-
}),
|
|
2602
|
-
|
|
2603
|
-
|
|
2572
|
+
}), L("div", fo, [
|
|
2573
|
+
L("div", po, [
|
|
2574
|
+
z(q(Ve), {
|
|
2604
2575
|
size: 14,
|
|
2605
2576
|
class: "td-palette-input-icon"
|
|
2606
2577
|
}),
|
|
2607
|
-
|
|
2578
|
+
vt(L("input", {
|
|
2608
2579
|
ref: "input",
|
|
2609
2580
|
"onUpdate:modelValue": t[0] ||= (e) => o.value = e,
|
|
2610
2581
|
class: "td-palette-input",
|
|
@@ -2613,55 +2584,55 @@ var So = {
|
|
|
2613
2584
|
autocomplete: "off",
|
|
2614
2585
|
spellcheck: "false",
|
|
2615
2586
|
onKeydown: ee
|
|
2616
|
-
}, null, 544), [[
|
|
2617
|
-
|
|
2587
|
+
}, null, 544), [[ht, o.value]]),
|
|
2588
|
+
L("button", {
|
|
2618
2589
|
class: "td-palette-esc",
|
|
2619
2590
|
type: "button",
|
|
2620
2591
|
"aria-label": "Close",
|
|
2621
2592
|
onClick: y
|
|
2622
2593
|
}, " esc ")
|
|
2623
2594
|
]),
|
|
2624
|
-
|
|
2625
|
-
q(h).length > 0 ? (H(),
|
|
2595
|
+
L("div", mo, [
|
|
2596
|
+
q(h).length > 0 ? (H(), I(M, { key: 0 }, [t[1] ||= L("div", { class: "td-palette-group-label" }, " Pages ", -1), (H(!0), I(M, null, W(q(h), (e, t) => (H(), I("a", {
|
|
2626
2597
|
key: e.id,
|
|
2627
2598
|
href: q(f)(e.id),
|
|
2628
|
-
class:
|
|
2629
|
-
onClick:
|
|
2599
|
+
class: V(["td-palette-item", { "is-selected": t === s.value }]),
|
|
2600
|
+
onClick: bt(() => ne(t), ["prevent"]),
|
|
2630
2601
|
onMouseenter: () => s.value = t
|
|
2631
|
-
}, [
|
|
2602
|
+
}, [L("span", {
|
|
2632
2603
|
class: "td-palette-item-label",
|
|
2633
|
-
innerHTML: q(
|
|
2634
|
-
}, null, 8,
|
|
2635
|
-
(H(!0),
|
|
2604
|
+
innerHTML: q(co)(e.title, v.value)
|
|
2605
|
+
}, null, 8, go), L("span", _o, K(e.id), 1)], 42, ho))), 128))], 64)) : F("", !0),
|
|
2606
|
+
(H(!0), I(M, null, W(w.value, (e) => (H(), I(M, { key: e.name }, [L("div", vo, K(e.name), 1), (H(!0), I(M, null, W(e.commands, (e) => (H(), P(ut(e.href ? "a" : "button"), et({ key: e.id }, { ref_for: !0 }, e.href ? { href: e.href } : { type: "button" }, {
|
|
2636
2607
|
class: ["td-palette-item", { "is-selected": E(e) === s.value }],
|
|
2637
2608
|
onClick: () => te(e),
|
|
2638
2609
|
onMouseenter: () => s.value = E(e)
|
|
2639
2610
|
}), {
|
|
2640
|
-
default: X(() => [
|
|
2611
|
+
default: X(() => [L("span", yo, K(e.label), 1), e.keys ? (H(), P($, {
|
|
2641
2612
|
key: 0,
|
|
2642
2613
|
keys: e.keys
|
|
2643
|
-
}, null, 8, ["keys"])) :
|
|
2614
|
+
}, null, 8, ["keys"])) : F("", !0)]),
|
|
2644
2615
|
_: 2
|
|
2645
2616
|
}, 1040, [
|
|
2646
2617
|
"class",
|
|
2647
2618
|
"onClick",
|
|
2648
2619
|
"onMouseenter"
|
|
2649
2620
|
]))), 128))], 64))), 128)),
|
|
2650
|
-
T.value === 0 && v.value ? (H(),
|
|
2621
|
+
T.value === 0 && v.value ? (H(), I("div", bo, " No results for \"" + K(v.value) + "\" ", 1)) : F("", !0)
|
|
2651
2622
|
], 512),
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
t[2] ||=
|
|
2656
|
-
|
|
2657
|
-
t[3] ||=
|
|
2623
|
+
L("div", xo, [
|
|
2624
|
+
L("span", null, [
|
|
2625
|
+
z($, { keys: [q(Q).ArrowUp] }, null, 8, ["keys"]),
|
|
2626
|
+
t[2] ||= R(),
|
|
2627
|
+
z($, { keys: [q(Q).ArrowDown] }, null, 8, ["keys"]),
|
|
2628
|
+
t[3] ||= R(" navigate", -1)
|
|
2658
2629
|
]),
|
|
2659
|
-
|
|
2660
|
-
|
|
2630
|
+
L("span", null, [z($, { keys: [q(Q).Enter] }, null, 8, ["keys"]), t[4] ||= R(" select", -1)]),
|
|
2631
|
+
L("span", null, [z($, { keys: [q(Q).Escape] }, null, 8, ["keys"]), t[5] ||= R(" close", -1)])
|
|
2661
2632
|
])
|
|
2662
|
-
])], 64)) :
|
|
2633
|
+
])], 64)) : F("", !0)]));
|
|
2663
2634
|
}
|
|
2664
|
-
}), [["__scopeId", "data-v-12ce6133"]]),
|
|
2635
|
+
}), [["__scopeId", "data-v-12ce6133"]]), Co = ["onKeydown"], wo = { class: "td-shortcuts-header" }, To = { class: "td-shortcuts-table" }, Eo = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2665
2636
|
__name: "TdShortcutsDialog",
|
|
2666
2637
|
props: { open: { type: Boolean } },
|
|
2667
2638
|
emits: ["close"],
|
|
@@ -2671,42 +2642,42 @@ var So = {
|
|
|
2671
2642
|
n("close");
|
|
2672
2643
|
}
|
|
2673
2644
|
return Y(() => e.open, (e) => {
|
|
2674
|
-
e &&
|
|
2675
|
-
}), (t, n) => (H(),
|
|
2645
|
+
e && tt(() => r.value?.focus());
|
|
2646
|
+
}), (t, n) => (H(), P(Je, { to: "body" }, [e.open ? (H(), I(M, { key: 0 }, [L("div", {
|
|
2676
2647
|
class: "td-shortcuts-scrim",
|
|
2677
2648
|
onClick: i
|
|
2678
|
-
}),
|
|
2649
|
+
}), L("div", {
|
|
2679
2650
|
ref: "dialog",
|
|
2680
2651
|
class: "td-shortcuts-dialog",
|
|
2681
2652
|
role: "dialog",
|
|
2682
2653
|
"aria-modal": "true",
|
|
2683
2654
|
"aria-label": "Keyboard shortcuts",
|
|
2684
2655
|
tabindex: "-1",
|
|
2685
|
-
onKeydown:
|
|
2686
|
-
}, [
|
|
2656
|
+
onKeydown: yt(bt(i, ["stop"]), ["esc"])
|
|
2657
|
+
}, [L("div", wo, [n[0] ||= L("h2", { class: "td-shortcuts-title" }, " Keyboard shortcuts ", -1), L("button", {
|
|
2687
2658
|
class: "td-shortcuts-close",
|
|
2688
2659
|
type: "button",
|
|
2689
2660
|
"aria-label": "Close",
|
|
2690
2661
|
onClick: i
|
|
2691
|
-
}, [
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
])])], 40,
|
|
2699
|
-
}
|
|
2700
|
-
}), [["__scopeId", "data-v-09d6a93c"]]),
|
|
2662
|
+
}, [z(q(Ne), { size: 16 })])]), L("table", To, [L("tbody", null, [
|
|
2663
|
+
L("tr", null, [n[1] ||= L("td", null, "Search", -1), L("td", null, [z($, { keys: [q(Q).Meta, q(Q).k] }, null, 8, ["keys"])])]),
|
|
2664
|
+
L("tr", null, [n[2] ||= L("td", null, "Commands", -1), L("td", null, [z($, { keys: [q(Q).Meta, q(Q).FSlash] }, null, 8, ["keys"])])]),
|
|
2665
|
+
L("tr", null, [n[3] ||= L("td", null, "Next page", -1), L("td", null, [z($, { keys: [q(Q).Control, q(Q).ArrowRight] }, null, 8, ["keys"])])]),
|
|
2666
|
+
L("tr", null, [n[4] ||= L("td", null, "Previous page", -1), L("td", null, [z($, { keys: [q(Q).Control, q(Q).ArrowLeft] }, null, 8, ["keys"])])]),
|
|
2667
|
+
L("tr", null, [n[5] ||= L("td", null, "Toggle sidebar", -1), L("td", null, [z($, { keys: [q(Q).Meta, q(Q).Backslash] }, null, 8, ["keys"])])]),
|
|
2668
|
+
L("tr", null, [n[6] ||= L("td", null, "Close", -1), L("td", null, [z($, { keys: [q(Q).Escape] }, null, 8, ["keys"])])])
|
|
2669
|
+
])])], 40, Co)], 64)) : F("", !0)]));
|
|
2670
|
+
}
|
|
2671
|
+
}), [["__scopeId", "data-v-09d6a93c"]]), Do = { class: "td-search" }, Oo = { class: "td-search-input-wrap" }, ko = {
|
|
2701
2672
|
key: 2,
|
|
2702
2673
|
class: "td-search-count"
|
|
2703
|
-
},
|
|
2674
|
+
}, Ao = {
|
|
2704
2675
|
key: 0,
|
|
2705
2676
|
class: "td-search-results"
|
|
2706
|
-
},
|
|
2677
|
+
}, jo = ["href"], Mo = ["innerHTML"], No = { class: "td-search-result-path" }, Po = ["innerHTML"], Fo = {
|
|
2707
2678
|
key: 1,
|
|
2708
2679
|
class: "td-search-empty"
|
|
2709
|
-
},
|
|
2680
|
+
}, Io = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2710
2681
|
__name: "TdSiteSearch",
|
|
2711
2682
|
props: {
|
|
2712
2683
|
active: {
|
|
@@ -2717,9 +2688,9 @@ var So = {
|
|
|
2717
2688
|
query: { default: "" },
|
|
2718
2689
|
queryModifiers: {}
|
|
2719
2690
|
},
|
|
2720
|
-
emits: /*@__PURE__*/
|
|
2691
|
+
emits: /*@__PURE__*/ $e(["select"], ["update:active", "update:query"]),
|
|
2721
2692
|
setup(e, { expose: t, emit: n }) {
|
|
2722
|
-
let r =
|
|
2693
|
+
let r = mt(e, "active"), i = mt(e, "query"), o = n, s = Ie(), { withBase: l } = j(), { results: u, searching: d, indexLoaded: f, search: p, cancel: m } = uo(), h = U(-1), g = N(() => 0 < i.value.trim().length), _ = N(() => {
|
|
2723
2694
|
let e = [], t = /* @__PURE__ */ new Map();
|
|
2724
2695
|
for (let n of u.value) {
|
|
2725
2696
|
let r = a(n.id), i = t.get(r);
|
|
@@ -2743,7 +2714,7 @@ var So = {
|
|
|
2743
2714
|
function v() {
|
|
2744
2715
|
i.value = "";
|
|
2745
2716
|
}
|
|
2746
|
-
let y =
|
|
2717
|
+
let y = N(() => _.value.flatMap((e) => e.results)), b = N(() => {
|
|
2747
2718
|
let e = /* @__PURE__ */ new Map();
|
|
2748
2719
|
for (let t = 0; t < y.value.length; t++) e.set(y.value[t].id, t);
|
|
2749
2720
|
return e;
|
|
@@ -2783,13 +2754,13 @@ var So = {
|
|
|
2783
2754
|
get isFocused() {
|
|
2784
2755
|
return document.activeElement === w.value;
|
|
2785
2756
|
}
|
|
2786
|
-
}), (e, t) => (H(),
|
|
2787
|
-
|
|
2788
|
-
|
|
2757
|
+
}), (e, t) => (H(), I("div", Do, [
|
|
2758
|
+
L("div", Oo, [
|
|
2759
|
+
z(q(Ve), {
|
|
2789
2760
|
size: 14,
|
|
2790
2761
|
class: "td-search-icon"
|
|
2791
2762
|
}),
|
|
2792
|
-
|
|
2763
|
+
vt(L("input", {
|
|
2793
2764
|
ref_key: "searchInput",
|
|
2794
2765
|
ref: w,
|
|
2795
2766
|
"onUpdate:modelValue": t[0] ||= (e) => i.value = e,
|
|
@@ -2798,63 +2769,63 @@ var So = {
|
|
|
2798
2769
|
size: "1",
|
|
2799
2770
|
placeholder: "Search...",
|
|
2800
2771
|
onKeydown: x
|
|
2801
|
-
}, null, 544), [[
|
|
2802
|
-
!g.value && !q(d) ? (H(),
|
|
2772
|
+
}, null, 544), [[ht, i.value]]),
|
|
2773
|
+
!g.value && !q(d) ? (H(), P($, {
|
|
2803
2774
|
key: 0,
|
|
2804
2775
|
keys: [q(Q).Meta, q(Q).k],
|
|
2805
2776
|
class: "td-search-kbd"
|
|
2806
|
-
}, null, 8, ["keys"])) :
|
|
2807
|
-
q(d) || !q(f) ? (H(),
|
|
2777
|
+
}, null, 8, ["keys"])) : F("", !0),
|
|
2778
|
+
q(d) || !q(f) ? (H(), P(q(At), {
|
|
2808
2779
|
key: 1,
|
|
2809
2780
|
size: 12,
|
|
2810
2781
|
class: "td-search-spinner"
|
|
2811
|
-
})) : g.value ? (H(),
|
|
2812
|
-
i.value ? (H(),
|
|
2782
|
+
})) : g.value ? (H(), I("span", ko, K(q(u).length), 1)) : F("", !0),
|
|
2783
|
+
i.value ? (H(), I("button", {
|
|
2813
2784
|
key: 3,
|
|
2814
2785
|
class: "td-search-clear",
|
|
2815
2786
|
type: "button",
|
|
2816
2787
|
"aria-label": "Clear search",
|
|
2817
2788
|
onClick: v
|
|
2818
|
-
}, [
|
|
2789
|
+
}, [z(q(Ne), { size: 12 })])) : F("", !0)
|
|
2819
2790
|
]),
|
|
2820
|
-
g.value && q(u).length > 0 ? (H(),
|
|
2791
|
+
g.value && q(u).length > 0 ? (H(), I("div", Ao, [(H(!0), I(M, null, W(_.value, (e) => (H(), I("div", {
|
|
2821
2792
|
key: e.pageUrl,
|
|
2822
2793
|
class: "td-search-group"
|
|
2823
|
-
}, [(H(!0),
|
|
2794
|
+
}, [(H(!0), I(M, null, W(e.results, (e) => (H(), I("a", {
|
|
2824
2795
|
key: e.id,
|
|
2825
2796
|
href: q(l)(e.id),
|
|
2826
|
-
class:
|
|
2797
|
+
class: V(["td-search-result", {
|
|
2827
2798
|
"is-selected": b.value.get(e.id) === h.value,
|
|
2828
2799
|
"is-current": q(l)(e.id) === q(s).path
|
|
2829
2800
|
}]),
|
|
2830
2801
|
onClick: S
|
|
2831
2802
|
}, [
|
|
2832
|
-
|
|
2803
|
+
L("span", {
|
|
2833
2804
|
class: "td-search-result-title",
|
|
2834
|
-
innerHTML: q(
|
|
2835
|
-
}, null, 8,
|
|
2836
|
-
|
|
2837
|
-
e.excerpt ? (H(),
|
|
2805
|
+
innerHTML: q(co)(e.title, i.value)
|
|
2806
|
+
}, null, 8, Mo),
|
|
2807
|
+
L("span", No, K(e.id), 1),
|
|
2808
|
+
e.excerpt ? (H(), I("span", {
|
|
2838
2809
|
key: 0,
|
|
2839
2810
|
class: "td-search-result-excerpt",
|
|
2840
|
-
innerHTML: q(
|
|
2841
|
-
}, null, 8,
|
|
2842
|
-
], 10,
|
|
2843
|
-
g.value && q(u).length === 0 ? (H(),
|
|
2811
|
+
innerHTML: q(co)(e.excerpt, i.value)
|
|
2812
|
+
}, null, 8, Po)) : F("", !0)
|
|
2813
|
+
], 10, jo))), 128))]))), 128))])) : F("", !0),
|
|
2814
|
+
g.value && q(u).length === 0 ? (H(), I("div", Fo, " No results for \"" + K(i.value) + "\" ", 1)) : F("", !0)
|
|
2844
2815
|
]));
|
|
2845
2816
|
}
|
|
2846
|
-
}), [["__scopeId", "data-v-f42853f1"]]),
|
|
2817
|
+
}), [["__scopeId", "data-v-f42853f1"]]), Lo = /* @__PURE__ */ B({
|
|
2847
2818
|
__name: "TdThemeToggle",
|
|
2848
2819
|
setup(e) {
|
|
2849
|
-
let { isDark: t, toggle: n } =
|
|
2850
|
-
return (e, r) => (H(),
|
|
2820
|
+
let { isDark: t, toggle: n } = E();
|
|
2821
|
+
return (e, r) => (H(), P(Ut, {
|
|
2851
2822
|
label: q(t) ? "Switch to light mode" : "Switch to dark mode",
|
|
2852
2823
|
onClick: q(n)
|
|
2853
2824
|
}, {
|
|
2854
|
-
default: X(() => [q(t) ? (H(),
|
|
2825
|
+
default: X(() => [q(t) ? (H(), P(q(xe), {
|
|
2855
2826
|
key: 0,
|
|
2856
2827
|
size: 18
|
|
2857
|
-
})) : (H(),
|
|
2828
|
+
})) : (H(), P(q(Be), {
|
|
2858
2829
|
key: 1,
|
|
2859
2830
|
size: 18
|
|
2860
2831
|
}))]),
|
|
@@ -2863,7 +2834,7 @@ var So = {
|
|
|
2863
2834
|
}
|
|
2864
2835
|
});
|
|
2865
2836
|
// src/client/theme-default/composables/useCopyCode.ts
|
|
2866
|
-
function
|
|
2837
|
+
function Ro() {
|
|
2867
2838
|
function e(e) {
|
|
2868
2839
|
let t = e.target?.closest(".td-code-copy, .copy");
|
|
2869
2840
|
if (!t) return;
|
|
@@ -2883,14 +2854,14 @@ function Jo() {
|
|
|
2883
2854
|
}, 2e3);
|
|
2884
2855
|
}
|
|
2885
2856
|
}
|
|
2886
|
-
|
|
2857
|
+
it(() => {
|
|
2887
2858
|
document.addEventListener("click", e);
|
|
2888
|
-
}),
|
|
2859
|
+
}), ot(() => {
|
|
2889
2860
|
document.removeEventListener("click", e);
|
|
2890
2861
|
});
|
|
2891
2862
|
}
|
|
2892
2863
|
// src/client/theme-default/composables/useCopyHeadingAnchor.ts
|
|
2893
|
-
function
|
|
2864
|
+
function zo() {
|
|
2894
2865
|
function e(e) {
|
|
2895
2866
|
let t = e.target?.closest(".td-header-anchor");
|
|
2896
2867
|
if (!t) return;
|
|
@@ -2900,18 +2871,18 @@ function Yo() {
|
|
|
2900
2871
|
t.classList.remove("td-header-anchor--copied");
|
|
2901
2872
|
}, 2e3);
|
|
2902
2873
|
}
|
|
2903
|
-
|
|
2874
|
+
it(() => {
|
|
2904
2875
|
document.addEventListener("click", e);
|
|
2905
|
-
}),
|
|
2876
|
+
}), ot(() => {
|
|
2906
2877
|
document.removeEventListener("click", e);
|
|
2907
2878
|
});
|
|
2908
2879
|
}
|
|
2909
2880
|
// src/client/theme-default/composables/useResizableTable.ts
|
|
2910
|
-
var
|
|
2911
|
-
function
|
|
2881
|
+
var Bo = 6, Vo = 40;
|
|
2882
|
+
function Ho() {
|
|
2912
2883
|
let e, t = !1;
|
|
2913
2884
|
function n(e, t) {
|
|
2914
|
-
return e.getBoundingClientRect().right - t <
|
|
2885
|
+
return e.getBoundingClientRect().right - t < Bo;
|
|
2915
2886
|
}
|
|
2916
2887
|
function r(r) {
|
|
2917
2888
|
if (t) return;
|
|
@@ -2931,27 +2902,27 @@ function Qo() {
|
|
|
2931
2902
|
r.classList.add("is-resizing"), document.body.style.cursor = "col-resize";
|
|
2932
2903
|
function o(e) {
|
|
2933
2904
|
let t = e.clientX - i;
|
|
2934
|
-
r && (r.style.width = `${Math.max(
|
|
2905
|
+
r && (r.style.width = `${Math.max(Vo, a + t)}px`);
|
|
2935
2906
|
}
|
|
2936
2907
|
function s() {
|
|
2937
2908
|
t = !1, r?.classList.remove("is-resizing"), document.body.style.cursor = "", document.removeEventListener("pointermove", o), document.removeEventListener("pointerup", s);
|
|
2938
2909
|
}
|
|
2939
2910
|
document.addEventListener("pointermove", o), document.addEventListener("pointerup", s);
|
|
2940
2911
|
}
|
|
2941
|
-
|
|
2912
|
+
it(() => {
|
|
2942
2913
|
document.addEventListener("pointermove", r), document.addEventListener("pointerdown", i);
|
|
2943
|
-
}),
|
|
2914
|
+
}), ot(() => {
|
|
2944
2915
|
document.removeEventListener("pointermove", r), document.removeEventListener("pointerdown", i);
|
|
2945
2916
|
});
|
|
2946
2917
|
}
|
|
2947
2918
|
// src/client/theme-default/components/TdDiagram.vue?vue&type=script&setup=true&lang.ts
|
|
2948
|
-
var
|
|
2919
|
+
var Uo = ["id"], Wo = { class: "td-diagram-frame" }, Go = ["innerHTML"], Ko = { class: "td-diagram-code" }, qo = { class: "td-diagram-code-number" }, Jo = { class: "td-diagram-code-column" }, Yo = { class: "td-diagram-toolbar" }, Xo = { class: "td-diagram-toolbar-label" }, Zo = { class: "td-diagram-segment" }, Qo = { class: "td-diagram-zoom" }, $o = {
|
|
2949
2920
|
key: 0,
|
|
2950
2921
|
class: "td-diagram-caption"
|
|
2951
|
-
},
|
|
2922
|
+
}, es = ["aria-label"], ts = { class: "td-diagram-modal-header" }, ns = { class: "td-diagram-modal-header-left" }, rs = { class: "td-diagram-modal-title" }, is = { class: "td-diagram-modal-chip" }, as = { class: "td-diagram-modal-header-right" }, os = ["aria-pressed"], ss = { class: "td-diagram-button-label" }, cs = { class: "td-diagram-modal-body" }, ls = {
|
|
2952
2923
|
key: 0,
|
|
2953
2924
|
class: "td-diagram-modal-code-panel"
|
|
2954
|
-
},
|
|
2925
|
+
}, us = { class: "td-diagram-modal-code-panel-header" }, ds = { class: "td-diagram-modal-code-panel-body" }, fs = { class: "td-diagram-code td-diagram-code--modal" }, ps = { class: "td-diagram-code-number" }, ms = { class: "td-diagram-code-column" }, hs = ["innerHTML"], gs = { class: "td-diagram-modal-hint" }, _s = .15, vs = 5, ys = 4, bs = .9, xs = .82, Ss = 1.25, Cs = .8, ws = 1.6, Ts = 1400, Es = 20, Ds = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2955
2926
|
__name: "TdDiagram",
|
|
2956
2927
|
props: {
|
|
2957
2928
|
svg: {},
|
|
@@ -2969,7 +2940,7 @@ var $o = ["id"], es = { class: "td-diagram-frame" }, ts = ["innerHTML"], ns = {
|
|
|
2969
2940
|
x: 0,
|
|
2970
2941
|
y: 0,
|
|
2971
2942
|
scale: 1
|
|
2972
|
-
}), h =
|
|
2943
|
+
}), h = N(() => {
|
|
2973
2944
|
let t = e.svg.match(/viewBox=["']([^"']+)["']/);
|
|
2974
2945
|
if (t) {
|
|
2975
2946
|
let e = t[1].split(/[\s,]+/);
|
|
@@ -2986,33 +2957,33 @@ var $o = ["id"], es = { class: "td-diagram-frame" }, ts = ["innerHTML"], ns = {
|
|
|
2986
2957
|
width: 400,
|
|
2987
2958
|
height: 300
|
|
2988
2959
|
};
|
|
2989
|
-
}), g =
|
|
2960
|
+
}), g = N(() => e.source.split("\n")), _ = N(() => g.value.length), v = N(() => `${Math.round(p.value.scale * 100)}%`), y = N(() => `${Math.round(m.value.scale * 100)}%`), b = N(() => e.label === "Mermaid" ? "mmd" : e.label === "D2" ? "d2" : "txt"), x = N(() => ({
|
|
2990
2961
|
width: `${h.value.width}px`,
|
|
2991
2962
|
height: `${h.value.height}px`
|
|
2992
|
-
})), S =
|
|
2963
|
+
})), S = N(() => {
|
|
2993
2964
|
let { x: e, y: t, scale: n } = p.value;
|
|
2994
2965
|
return {
|
|
2995
2966
|
...x.value,
|
|
2996
2967
|
transform: `translate(${e}px, ${t}px) scale(${n})`
|
|
2997
2968
|
};
|
|
2998
|
-
}), C =
|
|
2969
|
+
}), C = N(() => {
|
|
2999
2970
|
let { x: e, y: t, scale: n } = m.value;
|
|
3000
2971
|
return {
|
|
3001
2972
|
...x.value,
|
|
3002
2973
|
transform: `translate(${e}px, ${t}px) scale(${n})`
|
|
3003
2974
|
};
|
|
3004
|
-
}), w =
|
|
3005
|
-
let { x: e, y: t, scale: n } = m.value, r =
|
|
2975
|
+
}), w = N(() => {
|
|
2976
|
+
let { x: e, y: t, scale: n } = m.value, r = Es * n;
|
|
3006
2977
|
return {
|
|
3007
2978
|
backgroundSize: `${r}px ${r}px`,
|
|
3008
2979
|
backgroundPosition: `${e % r}px ${t % r}px`
|
|
3009
2980
|
};
|
|
3010
2981
|
});
|
|
3011
2982
|
function T(e) {
|
|
3012
|
-
return Math.min(
|
|
2983
|
+
return Math.min(vs, Math.max(_s, e));
|
|
3013
2984
|
}
|
|
3014
2985
|
function E() {
|
|
3015
|
-
l.value = !1,
|
|
2986
|
+
l.value = !1, Re?.(), Re = void 0, s.value?.focus();
|
|
3016
2987
|
}
|
|
3017
2988
|
function ee(e, t, n, r, i) {
|
|
3018
2989
|
if (n <= 0 || r <= 0) return {
|
|
@@ -3027,18 +2998,18 @@ var $o = ["id"], es = { class: "td-diagram-frame" }, ts = ["innerHTML"], ns = {
|
|
|
3027
2998
|
scale: a
|
|
3028
2999
|
};
|
|
3029
3000
|
}
|
|
3030
|
-
function
|
|
3031
|
-
|
|
3001
|
+
function te() {
|
|
3002
|
+
ne(d);
|
|
3032
3003
|
}
|
|
3033
|
-
function
|
|
3034
|
-
|
|
3004
|
+
function D() {
|
|
3005
|
+
ne(f);
|
|
3035
3006
|
}
|
|
3036
|
-
function
|
|
3037
|
-
navigator.clipboard.writeText(e.source).catch(() => {}), t.value = !0, clearTimeout(
|
|
3007
|
+
function ne(t) {
|
|
3008
|
+
navigator.clipboard.writeText(e.source).catch(() => {}), t.value = !0, clearTimeout(ze), ze = setTimeout(() => {
|
|
3038
3009
|
t.value = !1;
|
|
3039
|
-
},
|
|
3010
|
+
}, Ts);
|
|
3040
3011
|
}
|
|
3041
|
-
function
|
|
3012
|
+
function re() {
|
|
3042
3013
|
let t = (a.value ?? r.value)?.querySelector("svg");
|
|
3043
3014
|
if (!t) return;
|
|
3044
3015
|
let n = t.cloneNode(!0);
|
|
@@ -3046,67 +3017,67 @@ var $o = ["id"], es = { class: "td-diagram-frame" }, ts = ["innerHTML"], ns = {
|
|
|
3046
3017
|
let i = new XMLSerializer().serializeToString(n), o = new Blob([i], { type: "image/svg+xml" }), s = URL.createObjectURL(o), c = document.createElement("a");
|
|
3047
3018
|
c.href = s, c.download = `${e.diagramId}.svg`, c.click(), URL.revokeObjectURL(s);
|
|
3048
3019
|
}
|
|
3049
|
-
function
|
|
3050
|
-
|
|
3020
|
+
function ie() {
|
|
3021
|
+
O(n.value ?? void 0, p, bs);
|
|
3051
3022
|
}
|
|
3052
3023
|
function ae() {
|
|
3053
|
-
|
|
3024
|
+
O(i.value ?? void 0, m, xs);
|
|
3054
3025
|
}
|
|
3055
|
-
function
|
|
3026
|
+
function O(e, t, n) {
|
|
3056
3027
|
!e || e.offsetWidth <= 0 || (t.value = ee(e.offsetWidth, e.offsetHeight, h.value.width, h.value.height, n));
|
|
3057
3028
|
}
|
|
3058
|
-
function
|
|
3029
|
+
function oe(e, t) {
|
|
3059
3030
|
let n = t.getBoundingClientRect(), r = (t.offsetWidth ? n.width / t.offsetWidth : 1) || 1;
|
|
3060
3031
|
return {
|
|
3061
3032
|
x: (e.clientX - n.left) / r,
|
|
3062
3033
|
y: (e.clientY - n.top) / r
|
|
3063
3034
|
};
|
|
3064
3035
|
}
|
|
3065
|
-
function
|
|
3036
|
+
function ce(e) {
|
|
3066
3037
|
e.target.classList.contains("td-diagram-modal-backdrop") && E();
|
|
3067
3038
|
}
|
|
3068
|
-
function
|
|
3069
|
-
e.key === "Escape" ? (e.stopPropagation(), E()) : e.key === "+" || e.key === "=" ?
|
|
3039
|
+
function le(e) {
|
|
3040
|
+
e.key === "Escape" ? (e.stopPropagation(), E()) : e.key === "+" || e.key === "=" ? de() : e.key === "-" ? fe() : e.key === "0" && ae();
|
|
3041
|
+
}
|
|
3042
|
+
function ue() {
|
|
3043
|
+
xe(n.value ?? void 0, p, Ss);
|
|
3044
|
+
}
|
|
3045
|
+
function k() {
|
|
3046
|
+
xe(n.value ?? void 0, p, Cs);
|
|
3070
3047
|
}
|
|
3071
3048
|
function de() {
|
|
3072
|
-
|
|
3049
|
+
xe(i.value ?? void 0, m, Ss);
|
|
3073
3050
|
}
|
|
3074
3051
|
function fe() {
|
|
3075
|
-
|
|
3052
|
+
xe(i.value ?? void 0, m, Cs);
|
|
3076
3053
|
}
|
|
3077
3054
|
function me() {
|
|
3078
|
-
Ce(i.value ?? void 0, m, Ms);
|
|
3079
|
-
}
|
|
3080
|
-
function he() {
|
|
3081
|
-
Ce(i.value ?? void 0, m, Ns);
|
|
3082
|
-
}
|
|
3083
|
-
function ge() {
|
|
3084
3055
|
let e = i.value;
|
|
3085
3056
|
if (!e) return;
|
|
3086
3057
|
let t = T(1);
|
|
3087
|
-
m.value =
|
|
3058
|
+
m.value = be(m.value, e.offsetWidth / 2, e.offsetHeight / 2, t / m.value.scale);
|
|
3088
3059
|
}
|
|
3089
|
-
function
|
|
3060
|
+
function he() {
|
|
3090
3061
|
l.value = !0, u.value = c.value, m.value = {
|
|
3091
3062
|
x: 0,
|
|
3092
3063
|
y: 0,
|
|
3093
3064
|
scale: 1
|
|
3094
|
-
},
|
|
3065
|
+
}, tt(() => {
|
|
3095
3066
|
requestAnimationFrame(() => {
|
|
3096
|
-
ae(), o.value?.focus({ preventScroll: !0 }),
|
|
3067
|
+
ae(), o.value?.focus({ preventScroll: !0 }), Ee();
|
|
3097
3068
|
});
|
|
3098
3069
|
});
|
|
3099
3070
|
}
|
|
3100
|
-
function
|
|
3071
|
+
function ge() {
|
|
3101
3072
|
c.value = !0;
|
|
3102
3073
|
}
|
|
3103
|
-
function
|
|
3074
|
+
function _e() {
|
|
3104
3075
|
c.value = !1;
|
|
3105
3076
|
}
|
|
3106
|
-
function
|
|
3077
|
+
function ye() {
|
|
3107
3078
|
u.value = !u.value;
|
|
3108
3079
|
}
|
|
3109
|
-
function
|
|
3080
|
+
function be(e, t, n, r) {
|
|
3110
3081
|
let i = T(e.scale * r), a = i / e.scale;
|
|
3111
3082
|
return {
|
|
3112
3083
|
x: t - (t - e.x) * a,
|
|
@@ -3114,10 +3085,10 @@ var $o = ["id"], es = { class: "td-diagram-frame" }, ts = ["innerHTML"], ns = {
|
|
|
3114
3085
|
scale: i
|
|
3115
3086
|
};
|
|
3116
3087
|
}
|
|
3117
|
-
function
|
|
3118
|
-
e && (t.value =
|
|
3088
|
+
function xe(e, t, n) {
|
|
3089
|
+
e && (t.value = be(t.value, e.offsetWidth / 2, e.offsetHeight / 2, n));
|
|
3119
3090
|
}
|
|
3120
|
-
let
|
|
3091
|
+
let Se = {
|
|
3121
3092
|
active: !1,
|
|
3122
3093
|
startClientX: 0,
|
|
3123
3094
|
startClientY: 0,
|
|
@@ -3125,7 +3096,7 @@ var $o = ["id"], es = { class: "td-diagram-frame" }, ts = ["innerHTML"], ns = {
|
|
|
3125
3096
|
startTransformY: 0,
|
|
3126
3097
|
moved: !1,
|
|
3127
3098
|
clientScale: 1
|
|
3128
|
-
},
|
|
3099
|
+
}, we = {
|
|
3129
3100
|
active: !1,
|
|
3130
3101
|
startClientX: 0,
|
|
3131
3102
|
startClientY: 0,
|
|
@@ -3134,23 +3105,23 @@ var $o = ["id"], es = { class: "td-diagram-frame" }, ts = ["innerHTML"], ns = {
|
|
|
3134
3105
|
moved: !1,
|
|
3135
3106
|
clientScale: 1
|
|
3136
3107
|
};
|
|
3137
|
-
function
|
|
3108
|
+
function Te(e) {
|
|
3138
3109
|
function t(t) {
|
|
3139
3110
|
if (!t.ctrlKey && !t.metaKey) return;
|
|
3140
3111
|
t.preventDefault();
|
|
3141
|
-
let n =
|
|
3142
|
-
p.value =
|
|
3112
|
+
let n = oe(t, e), r = Math.exp(-t.deltaY * .01);
|
|
3113
|
+
p.value = be(p.value, n.x, n.y, r);
|
|
3143
3114
|
}
|
|
3144
3115
|
return e.addEventListener("wheel", t, { passive: !1 }), () => e.removeEventListener("wheel", t);
|
|
3145
3116
|
}
|
|
3146
|
-
function
|
|
3117
|
+
function Ee() {
|
|
3147
3118
|
let e = i.value;
|
|
3148
3119
|
if (!e) return;
|
|
3149
3120
|
function t(t) {
|
|
3150
3121
|
if (e) {
|
|
3151
3122
|
if (t.preventDefault(), t.ctrlKey || t.metaKey) {
|
|
3152
|
-
let n =
|
|
3153
|
-
m.value =
|
|
3123
|
+
let n = oe(t, e), r = Math.exp(-t.deltaY * .01);
|
|
3124
|
+
m.value = be(m.value, n.x, n.y, r);
|
|
3154
3125
|
} else {
|
|
3155
3126
|
let n = (e.offsetWidth ? e.getBoundingClientRect().width / e.offsetWidth : 1) || 1;
|
|
3156
3127
|
m.value = {
|
|
@@ -3161,294 +3132,294 @@ var $o = ["id"], es = { class: "td-diagram-frame" }, ts = ["innerHTML"], ns = {
|
|
|
3161
3132
|
}
|
|
3162
3133
|
}
|
|
3163
3134
|
}
|
|
3164
|
-
e.addEventListener("wheel", t, { passive: !1 }),
|
|
3135
|
+
e.addEventListener("wheel", t, { passive: !1 }), Re = () => e.removeEventListener("wheel", t);
|
|
3165
3136
|
}
|
|
3166
|
-
function
|
|
3137
|
+
function De(e, t, n, r) {
|
|
3167
3138
|
if (e.button !== 0) return;
|
|
3168
3139
|
t.active = !0, t.moved = !1;
|
|
3169
3140
|
let i = n.getBoundingClientRect();
|
|
3170
3141
|
t.clientScale = (n.offsetWidth ? i.width / n.offsetWidth : 1) || 1, t.startClientX = e.clientX, t.startClientY = e.clientY, t.startTransformX = r.value.x, t.startTransformY = r.value.y, n.setPointerCapture(e.pointerId), n.style.cursor = "grabbing";
|
|
3171
3142
|
}
|
|
3172
|
-
function
|
|
3143
|
+
function Oe(e, t, n, r) {
|
|
3173
3144
|
t.active && (t.active = !1, n.releasePointerCapture(e.pointerId), n.style.cursor = "", !t.moved && r && r());
|
|
3174
3145
|
}
|
|
3175
|
-
function
|
|
3146
|
+
function ke(e, t, n) {
|
|
3176
3147
|
if (!t.active) return;
|
|
3177
3148
|
let r = (e.clientX - t.startClientX) / t.clientScale, i = (e.clientY - t.startClientY) / t.clientScale;
|
|
3178
|
-
!t.moved &&
|
|
3149
|
+
!t.moved && ys <= Math.hypot(r, i) && (t.moved = !0), t.moved && (n.value = {
|
|
3179
3150
|
x: t.startTransformX + r,
|
|
3180
3151
|
y: t.startTransformY + i,
|
|
3181
3152
|
scale: n.value.scale
|
|
3182
3153
|
});
|
|
3183
3154
|
}
|
|
3184
|
-
function
|
|
3155
|
+
function je(e) {
|
|
3185
3156
|
let t = n.value;
|
|
3186
|
-
t &&
|
|
3157
|
+
t && De(e, Se, t, p);
|
|
3187
3158
|
}
|
|
3188
|
-
function
|
|
3159
|
+
function Me(e) {
|
|
3189
3160
|
let t = n.value;
|
|
3190
|
-
t &&
|
|
3191
|
-
}
|
|
3192
|
-
function Ne(e) {
|
|
3193
|
-
Me(e, we, p);
|
|
3161
|
+
t && Oe(e, Se, t, he);
|
|
3194
3162
|
}
|
|
3195
3163
|
function Pe(e) {
|
|
3164
|
+
ke(e, Se, p);
|
|
3165
|
+
}
|
|
3166
|
+
function Fe(e) {
|
|
3196
3167
|
let t = i.value;
|
|
3197
3168
|
if (!t) return;
|
|
3198
|
-
let n =
|
|
3199
|
-
m.value =
|
|
3169
|
+
let n = oe(e, t);
|
|
3170
|
+
m.value = be(m.value, n.x, n.y, ws);
|
|
3200
3171
|
}
|
|
3201
|
-
function
|
|
3172
|
+
function A(e) {
|
|
3202
3173
|
let t = i.value;
|
|
3203
|
-
t &&
|
|
3174
|
+
t && De(e, we, t, m);
|
|
3204
3175
|
}
|
|
3205
|
-
function
|
|
3176
|
+
function j(e) {
|
|
3206
3177
|
let t = i.value;
|
|
3207
|
-
t &&
|
|
3178
|
+
t && Oe(e, we, t);
|
|
3208
3179
|
}
|
|
3209
|
-
function
|
|
3210
|
-
|
|
3180
|
+
function Ie(e) {
|
|
3181
|
+
ke(e, we, m);
|
|
3211
3182
|
}
|
|
3212
3183
|
Y(u, () => {
|
|
3213
|
-
|
|
3184
|
+
tt(() => ae());
|
|
3214
3185
|
});
|
|
3215
|
-
let Re, ze
|
|
3216
|
-
return
|
|
3186
|
+
let Le, Re, ze;
|
|
3187
|
+
return it(() => {
|
|
3217
3188
|
let e = n.value;
|
|
3218
3189
|
if (!e) return;
|
|
3219
3190
|
let t = new ResizeObserver(() => {
|
|
3220
|
-
0 < e.offsetWidth && 0 < e.offsetHeight && (
|
|
3191
|
+
0 < e.offsetWidth && 0 < e.offsetHeight && (ie(), t.disconnect());
|
|
3221
3192
|
});
|
|
3222
|
-
t.observe(e),
|
|
3223
|
-
}),
|
|
3224
|
-
|
|
3225
|
-
}), (n, r) => (H(),
|
|
3193
|
+
t.observe(e), Le = Te(e);
|
|
3194
|
+
}), rt(() => {
|
|
3195
|
+
Le?.(), Re?.(), clearTimeout(ze);
|
|
3196
|
+
}), (n, r) => (H(), I("figure", {
|
|
3226
3197
|
id: e.diagramId,
|
|
3227
3198
|
class: "td-diagram"
|
|
3228
3199
|
}, [
|
|
3229
|
-
|
|
3230
|
-
|
|
3200
|
+
L("div", Wo, [
|
|
3201
|
+
vt(L("div", {
|
|
3231
3202
|
ref: "stage",
|
|
3232
3203
|
class: "td-diagram-stage",
|
|
3233
|
-
onPointerdown:
|
|
3234
|
-
onPointermove:
|
|
3235
|
-
onPointerup:
|
|
3236
|
-
onPointercancel:
|
|
3237
|
-
}, [
|
|
3204
|
+
onPointerdown: je,
|
|
3205
|
+
onPointermove: Pe,
|
|
3206
|
+
onPointerup: Me,
|
|
3207
|
+
onPointercancel: Me
|
|
3208
|
+
}, [L("div", {
|
|
3238
3209
|
ref: "canvas",
|
|
3239
3210
|
class: "td-diagram-canvas",
|
|
3240
|
-
style:
|
|
3211
|
+
style: nt(S.value),
|
|
3241
3212
|
innerHTML: e.svg
|
|
3242
|
-
}, null, 12,
|
|
3243
|
-
|
|
3244
|
-
r[3] ||=
|
|
3245
|
-
(H(!0),
|
|
3213
|
+
}, null, 12, Go)], 544), [[gt, !c.value]]),
|
|
3214
|
+
vt(L("pre", Ko, [
|
|
3215
|
+
r[3] ||= R(" ", -1),
|
|
3216
|
+
(H(!0), I(M, null, W(g.value, (e, t) => (H(), I("div", {
|
|
3246
3217
|
key: t,
|
|
3247
3218
|
class: "td-diagram-code-row"
|
|
3248
3219
|
}, [
|
|
3249
|
-
r[0] ||=
|
|
3250
|
-
|
|
3251
|
-
r[1] ||=
|
|
3252
|
-
|
|
3253
|
-
r[2] ||=
|
|
3220
|
+
r[0] ||= R("\n ", -1),
|
|
3221
|
+
L("span", qo, K(t + 1), 1),
|
|
3222
|
+
r[1] ||= R("\n ", -1),
|
|
3223
|
+
L("span", Jo, K(e || " "), 1),
|
|
3224
|
+
r[2] ||= R("\n ", -1)
|
|
3254
3225
|
]))), 128)),
|
|
3255
|
-
r[4] ||=
|
|
3256
|
-
], 512), [[
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3226
|
+
r[4] ||= R("\n ", -1)
|
|
3227
|
+
], 512), [[gt, c.value]]),
|
|
3228
|
+
L("div", Yo, [
|
|
3229
|
+
L("span", Xo, K(e.label), 1),
|
|
3230
|
+
L("div", Zo, [L("button", {
|
|
3260
3231
|
type: "button",
|
|
3261
|
-
class:
|
|
3262
|
-
onClick:
|
|
3263
|
-
}, " Preview ", 2),
|
|
3232
|
+
class: V(["td-diagram-segment-button", { "is-active": !c.value }]),
|
|
3233
|
+
onClick: _e
|
|
3234
|
+
}, " Preview ", 2), L("button", {
|
|
3264
3235
|
type: "button",
|
|
3265
|
-
class:
|
|
3266
|
-
onClick:
|
|
3236
|
+
class: V(["td-diagram-segment-button", { "is-active": c.value }]),
|
|
3237
|
+
onClick: ge
|
|
3267
3238
|
}, " Code ", 2)]),
|
|
3268
|
-
|
|
3239
|
+
L("button", {
|
|
3269
3240
|
type: "button",
|
|
3270
|
-
class:
|
|
3241
|
+
class: V(["td-diagram-button", { "is-copied": d.value }]),
|
|
3271
3242
|
"aria-label": "Copy source",
|
|
3272
|
-
onClick:
|
|
3273
|
-
}, [d.value ? (H(),
|
|
3243
|
+
onClick: te
|
|
3244
|
+
}, [d.value ? (H(), P(q(xt), {
|
|
3274
3245
|
key: 0,
|
|
3275
3246
|
size: 16
|
|
3276
|
-
})) : (H(),
|
|
3247
|
+
})) : (H(), P(q(Tt), {
|
|
3277
3248
|
key: 1,
|
|
3278
3249
|
size: 16
|
|
3279
3250
|
}))], 2),
|
|
3280
|
-
|
|
3251
|
+
L("button", {
|
|
3281
3252
|
ref: "expandButton",
|
|
3282
3253
|
type: "button",
|
|
3283
3254
|
class: "td-diagram-button",
|
|
3284
3255
|
"aria-label": "Open full-screen preview",
|
|
3285
|
-
onClick:
|
|
3286
|
-
}, [
|
|
3256
|
+
onClick: he
|
|
3257
|
+
}, [z(q(jt), { size: 16 })], 512)
|
|
3287
3258
|
]),
|
|
3288
|
-
|
|
3289
|
-
|
|
3259
|
+
vt(L("div", Qo, [
|
|
3260
|
+
L("button", {
|
|
3290
3261
|
type: "button",
|
|
3291
3262
|
class: "td-diagram-button",
|
|
3292
3263
|
"aria-label": "Zoom out",
|
|
3293
|
-
onClick:
|
|
3294
|
-
}, [
|
|
3295
|
-
|
|
3264
|
+
onClick: k
|
|
3265
|
+
}, [z(q(ve), { size: 16 })]),
|
|
3266
|
+
L("button", {
|
|
3296
3267
|
type: "button",
|
|
3297
3268
|
class: "td-diagram-button td-diagram-zoom-level",
|
|
3298
3269
|
"aria-label": "Reset zoom",
|
|
3299
|
-
onClick:
|
|
3270
|
+
onClick: ie
|
|
3300
3271
|
}, K(v.value), 1),
|
|
3301
|
-
|
|
3272
|
+
L("button", {
|
|
3302
3273
|
type: "button",
|
|
3303
3274
|
class: "td-diagram-button",
|
|
3304
3275
|
"aria-label": "Zoom in",
|
|
3305
|
-
onClick:
|
|
3306
|
-
}, [
|
|
3307
|
-
], 512), [[
|
|
3308
|
-
|
|
3276
|
+
onClick: ue
|
|
3277
|
+
}, [z(q(Ce), { size: 16 })])
|
|
3278
|
+
], 512), [[gt, !c.value]]),
|
|
3279
|
+
vt(L("div", { class: "td-diagram-hint" }, " Click to expand · Drag to pan · " + K(q(t)) + " + scroll to zoom ", 513), [[gt, !c.value]])
|
|
3309
3280
|
]),
|
|
3310
|
-
e.title ? (H(),
|
|
3311
|
-
(H(),
|
|
3281
|
+
e.title ? (H(), I("figcaption", $o, K(e.title), 1)) : F("", !0),
|
|
3282
|
+
(H(), P(Je, { to: "body" }, [l.value ? (H(), I("div", {
|
|
3312
3283
|
key: 0,
|
|
3313
3284
|
class: "td-diagram-modal-backdrop",
|
|
3314
|
-
onClick:
|
|
3315
|
-
}, [
|
|
3285
|
+
onClick: ce
|
|
3286
|
+
}, [L("div", {
|
|
3316
3287
|
ref: "modalDialog",
|
|
3317
3288
|
class: "td-diagram-modal",
|
|
3318
3289
|
role: "dialog",
|
|
3319
3290
|
"aria-label": e.title || `${e.label} diagram`,
|
|
3320
3291
|
tabindex: "-1",
|
|
3321
|
-
onKeydown:
|
|
3322
|
-
}, [
|
|
3323
|
-
|
|
3292
|
+
onKeydown: le
|
|
3293
|
+
}, [L("div", ts, [L("div", ns, [L("span", rs, K(e.title || "Diagram"), 1), L("span", is, K(e.label), 1)]), L("div", as, [
|
|
3294
|
+
L("button", {
|
|
3324
3295
|
type: "button",
|
|
3325
|
-
class:
|
|
3296
|
+
class: V(["td-diagram-modal-button", { "is-active": u.value }]),
|
|
3326
3297
|
"aria-pressed": u.value,
|
|
3327
3298
|
"aria-label": "Toggle code",
|
|
3328
|
-
onClick:
|
|
3329
|
-
}, [
|
|
3330
|
-
r[8] ||=
|
|
3331
|
-
|
|
3299
|
+
onClick: ye
|
|
3300
|
+
}, [z(q(pe), { size: 16 }), r[5] ||= L("span", { class: "td-diagram-button-label" }, "Code", -1)], 10, os),
|
|
3301
|
+
r[8] ||= L("span", { class: "td-diagram-modal-separator" }, null, -1),
|
|
3302
|
+
L("button", {
|
|
3332
3303
|
type: "button",
|
|
3333
3304
|
class: "td-diagram-modal-button",
|
|
3334
3305
|
"aria-label": "Zoom out",
|
|
3335
|
-
onClick:
|
|
3336
|
-
}, [
|
|
3337
|
-
|
|
3306
|
+
onClick: fe
|
|
3307
|
+
}, [z(q(ve), { size: 16 })]),
|
|
3308
|
+
L("button", {
|
|
3338
3309
|
type: "button",
|
|
3339
3310
|
class: "td-diagram-modal-button td-diagram-modal-zoom-level",
|
|
3340
3311
|
"aria-label": "Zoom to 100%",
|
|
3341
|
-
onClick:
|
|
3312
|
+
onClick: me
|
|
3342
3313
|
}, K(y.value), 1),
|
|
3343
|
-
|
|
3314
|
+
L("button", {
|
|
3344
3315
|
type: "button",
|
|
3345
3316
|
class: "td-diagram-modal-button",
|
|
3346
3317
|
"aria-label": "Zoom in",
|
|
3347
|
-
onClick:
|
|
3348
|
-
}, [
|
|
3349
|
-
|
|
3318
|
+
onClick: de
|
|
3319
|
+
}, [z(q(Ce), { size: 16 })]),
|
|
3320
|
+
L("button", {
|
|
3350
3321
|
type: "button",
|
|
3351
3322
|
class: "td-diagram-modal-button",
|
|
3352
3323
|
"aria-label": "Fit to view",
|
|
3353
3324
|
onClick: ae
|
|
3354
|
-
}, [
|
|
3355
|
-
r[9] ||=
|
|
3356
|
-
|
|
3325
|
+
}, [z(q(se), { size: 16 }), r[6] ||= L("span", { class: "td-diagram-button-label" }, "Fit", -1)]),
|
|
3326
|
+
r[9] ||= L("span", { class: "td-diagram-modal-separator" }, null, -1),
|
|
3327
|
+
L("button", {
|
|
3357
3328
|
type: "button",
|
|
3358
|
-
class:
|
|
3329
|
+
class: V(["td-diagram-modal-button", { "is-copied": f.value }]),
|
|
3359
3330
|
"aria-label": "Copy source",
|
|
3360
|
-
onClick:
|
|
3361
|
-
}, [f.value ? (H(),
|
|
3331
|
+
onClick: D
|
|
3332
|
+
}, [f.value ? (H(), P(q(xt), {
|
|
3362
3333
|
key: 0,
|
|
3363
3334
|
size: 16
|
|
3364
|
-
})) : (H(),
|
|
3335
|
+
})) : (H(), P(q(Tt), {
|
|
3365
3336
|
key: 1,
|
|
3366
3337
|
size: 16
|
|
3367
|
-
})),
|
|
3368
|
-
|
|
3338
|
+
})), L("span", ss, K(f.value ? "Copied" : "Copy"), 1)], 2),
|
|
3339
|
+
L("button", {
|
|
3369
3340
|
type: "button",
|
|
3370
3341
|
class: "td-diagram-modal-button",
|
|
3371
3342
|
"aria-label": "Download SVG",
|
|
3372
|
-
onClick:
|
|
3373
|
-
}, [
|
|
3374
|
-
r[10] ||=
|
|
3375
|
-
|
|
3343
|
+
onClick: re
|
|
3344
|
+
}, [z(q(Ae), { size: 16 }), r[7] ||= L("span", { class: "td-diagram-button-label" }, "SVG", -1)]),
|
|
3345
|
+
r[10] ||= L("span", { class: "td-diagram-modal-separator" }, null, -1),
|
|
3346
|
+
L("button", {
|
|
3376
3347
|
type: "button",
|
|
3377
3348
|
class: "td-diagram-modal-button",
|
|
3378
3349
|
"aria-label": "Close preview",
|
|
3379
3350
|
onClick: E
|
|
3380
|
-
}, [
|
|
3381
|
-
])]),
|
|
3382
|
-
r[14] ||=
|
|
3383
|
-
(H(!0),
|
|
3351
|
+
}, [z(q(Ne), { size: 16 })])
|
|
3352
|
+
])]), L("div", cs, [u.value ? (H(), I("div", ls, [L("div", us, " diagram." + K(b.value) + " · " + K(_.value) + " lines ", 1), L("div", ds, [L("pre", fs, [
|
|
3353
|
+
r[14] ||= R(" ", -1),
|
|
3354
|
+
(H(!0), I(M, null, W(g.value, (e, t) => (H(), I("div", {
|
|
3384
3355
|
key: t,
|
|
3385
3356
|
class: "td-diagram-code-row"
|
|
3386
3357
|
}, [
|
|
3387
|
-
r[11] ||=
|
|
3388
|
-
|
|
3389
|
-
r[12] ||=
|
|
3390
|
-
|
|
3391
|
-
r[13] ||=
|
|
3358
|
+
r[11] ||= R("\n ", -1),
|
|
3359
|
+
L("span", ps, K(t + 1), 1),
|
|
3360
|
+
r[12] ||= R("\n ", -1),
|
|
3361
|
+
L("span", ms, K(e || " "), 1),
|
|
3362
|
+
r[13] ||= R("\n ", -1)
|
|
3392
3363
|
]))), 128)),
|
|
3393
|
-
r[15] ||=
|
|
3394
|
-
])])])) :
|
|
3364
|
+
r[15] ||= R("\n ", -1)
|
|
3365
|
+
])])])) : F("", !0), L("div", {
|
|
3395
3366
|
ref: "modalStage",
|
|
3396
3367
|
class: "td-diagram-modal-stage",
|
|
3397
|
-
style:
|
|
3398
|
-
onPointerdown:
|
|
3399
|
-
onPointermove:
|
|
3400
|
-
onPointerup:
|
|
3401
|
-
onPointercancel:
|
|
3402
|
-
onDblclick:
|
|
3403
|
-
}, [
|
|
3368
|
+
style: nt(w.value),
|
|
3369
|
+
onPointerdown: A,
|
|
3370
|
+
onPointermove: Ie,
|
|
3371
|
+
onPointerup: j,
|
|
3372
|
+
onPointercancel: j,
|
|
3373
|
+
onDblclick: Fe
|
|
3374
|
+
}, [L("div", {
|
|
3404
3375
|
ref: "modalCanvas",
|
|
3405
3376
|
class: "td-diagram-modal-canvas",
|
|
3406
|
-
style:
|
|
3377
|
+
style: nt(C.value),
|
|
3407
3378
|
innerHTML: e.svg
|
|
3408
|
-
}, null, 12,
|
|
3409
|
-
], 8,
|
|
3379
|
+
}, null, 12, hs), L("div", gs, " Drag or scroll to pan · " + K(q(t)) + " + scroll or pinch to zoom · Double-click to zoom in · Esc to close ", 1)], 36)])], 40, es)])) : F("", !0)]))
|
|
3380
|
+
], 8, Uo));
|
|
3410
3381
|
}
|
|
3411
3382
|
}), [["__scopeId", "data-v-fb95bcf7"]]);
|
|
3412
3383
|
// src/client/theme-default/composables/lazy-embed/mountDiagram.ts
|
|
3413
|
-
function
|
|
3384
|
+
function Os(e, t) {
|
|
3414
3385
|
let n = document.createElement("div");
|
|
3415
|
-
n.style.display = "contents", e.replaceWith(n),
|
|
3386
|
+
n.style.display = "contents", e.replaceWith(n), ct(Ze(Ds, t), n);
|
|
3416
3387
|
}
|
|
3417
3388
|
// src/client/theme-default/composables/lazy-embed/d2.ts
|
|
3418
|
-
var
|
|
3419
|
-
function
|
|
3389
|
+
var ks = "https://esm.sh/@terrastruct/d2@0.1.32", As, js = 0;
|
|
3390
|
+
function Ms(e) {
|
|
3420
3391
|
let t = {
|
|
3421
3392
|
selector: ".td-d2-placeholder",
|
|
3422
|
-
onRender:
|
|
3393
|
+
onRender: Ps,
|
|
3423
3394
|
onVisible() {
|
|
3424
3395
|
let e = document.createElement("link");
|
|
3425
|
-
e.rel = "modulepreload", e.href =
|
|
3396
|
+
e.rel = "modulepreload", e.href = ks, document.head.appendChild(e);
|
|
3426
3397
|
}
|
|
3427
3398
|
};
|
|
3428
|
-
|
|
3399
|
+
it(() => e.register(t)), ot(() => e.unregister(t));
|
|
3429
3400
|
}
|
|
3430
|
-
async function
|
|
3431
|
-
if (
|
|
3401
|
+
async function Ns() {
|
|
3402
|
+
if (As) return As;
|
|
3432
3403
|
try {
|
|
3433
3404
|
let e = await import(
|
|
3434
3405
|
/* @vite-ignore */
|
|
3435
|
-
|
|
3406
|
+
ks
|
|
3436
3407
|
);
|
|
3437
|
-
|
|
3408
|
+
As = new (e.D2 || (e.default?.D2) || e.default)();
|
|
3438
3409
|
} catch {
|
|
3439
3410
|
return;
|
|
3440
3411
|
}
|
|
3441
|
-
return
|
|
3412
|
+
return As;
|
|
3442
3413
|
}
|
|
3443
|
-
async function
|
|
3414
|
+
async function Ps(e) {
|
|
3444
3415
|
let t = e, n = t.querySelector("code");
|
|
3445
3416
|
if (!n) return;
|
|
3446
|
-
let r = n.textContent ?? "", i = await
|
|
3417
|
+
let r = n.textContent ?? "", i = await Ns();
|
|
3447
3418
|
if (!i) return;
|
|
3448
|
-
let a = `td-d2-${
|
|
3419
|
+
let a = `td-d2-${js++}`, o = t.getAttribute("data-title");
|
|
3449
3420
|
try {
|
|
3450
3421
|
let e = await i.compile(r, { layout: "dagre" });
|
|
3451
|
-
|
|
3422
|
+
Os(t, {
|
|
3452
3423
|
svg: await i.render(e.diagram, {
|
|
3453
3424
|
...e.renderOptions,
|
|
3454
3425
|
themeID: document.documentElement.classList.contains("dark") ? 200 : 0
|
|
@@ -3463,42 +3434,42 @@ async function Ws(e) {
|
|
|
3463
3434
|
}
|
|
3464
3435
|
}
|
|
3465
3436
|
// src/client/theme-default/composables/lazy-embed/mermaid.ts
|
|
3466
|
-
var
|
|
3467
|
-
function
|
|
3437
|
+
var Fs = "https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs", Is, Ls = 0;
|
|
3438
|
+
function Rs(e) {
|
|
3468
3439
|
let t = {
|
|
3469
3440
|
selector: ".td-mermaid-placeholder",
|
|
3470
|
-
onRender:
|
|
3441
|
+
onRender: Bs,
|
|
3471
3442
|
onVisible() {
|
|
3472
3443
|
let e = document.createElement("link");
|
|
3473
|
-
e.rel = "modulepreload", e.href =
|
|
3444
|
+
e.rel = "modulepreload", e.href = Fs, document.head.appendChild(e);
|
|
3474
3445
|
}
|
|
3475
3446
|
};
|
|
3476
|
-
|
|
3447
|
+
it(() => e.register(t)), ot(() => e.unregister(t));
|
|
3477
3448
|
}
|
|
3478
|
-
async function
|
|
3479
|
-
if (
|
|
3449
|
+
async function zs() {
|
|
3450
|
+
if (Is !== void 0) return Is;
|
|
3480
3451
|
try {
|
|
3481
|
-
|
|
3452
|
+
Is = await import(
|
|
3482
3453
|
/* @vite-ignore */
|
|
3483
|
-
|
|
3454
|
+
Fs
|
|
3484
3455
|
);
|
|
3485
3456
|
} catch {
|
|
3486
3457
|
return;
|
|
3487
3458
|
}
|
|
3488
|
-
return
|
|
3459
|
+
return Is.default.initialize({
|
|
3489
3460
|
startOnLoad: !1,
|
|
3490
3461
|
theme: document.documentElement.classList.contains("dark") ? "dark" : "default"
|
|
3491
|
-
}),
|
|
3462
|
+
}), Is;
|
|
3492
3463
|
}
|
|
3493
|
-
async function
|
|
3464
|
+
async function Bs(e) {
|
|
3494
3465
|
let t = e, n = t.querySelector("code");
|
|
3495
3466
|
if (!n) return;
|
|
3496
|
-
let r = n.textContent ?? "", i = await
|
|
3467
|
+
let r = n.textContent ?? "", i = await zs();
|
|
3497
3468
|
if (i === void 0) return;
|
|
3498
|
-
let a = `td-mermaid-${
|
|
3469
|
+
let a = `td-mermaid-${Ls++}`, o = t.getAttribute("data-title");
|
|
3499
3470
|
try {
|
|
3500
3471
|
let { svg: e } = await i.default.render(a, r);
|
|
3501
|
-
|
|
3472
|
+
Os(t, {
|
|
3502
3473
|
svg: e,
|
|
3503
3474
|
source: r,
|
|
3504
3475
|
title: o ?? void 0,
|
|
@@ -3510,15 +3481,15 @@ async function Xs(e) {
|
|
|
3510
3481
|
}
|
|
3511
3482
|
}
|
|
3512
3483
|
// src/client/theme-default/composables/lazy-embed/github.ts
|
|
3513
|
-
var
|
|
3514
|
-
function
|
|
3484
|
+
var Vs = "https://emgithub.com/embed-v2.js";
|
|
3485
|
+
function Hs(e) {
|
|
3515
3486
|
let t, n = [], r = {
|
|
3516
3487
|
selector: ".td-github-placeholder",
|
|
3517
3488
|
onRender(e) {
|
|
3518
3489
|
let t = e, r = t.getAttribute("data-url");
|
|
3519
3490
|
if (!r) return;
|
|
3520
3491
|
let i = document.documentElement.classList.contains("dark"), a = document.createElement("script");
|
|
3521
|
-
a.src =
|
|
3492
|
+
a.src = Us(r, i);
|
|
3522
3493
|
let o = document.createElement("div");
|
|
3523
3494
|
o.className = "td-github-wrapper", o.dataset.url = r, o.appendChild(a), t.replaceWith(o), n.push({
|
|
3524
3495
|
container: o,
|
|
@@ -3531,10 +3502,10 @@ function Qs(e) {
|
|
|
3531
3502
|
for (let e = n.length - 1; 0 <= e; e--) n[e].container.isConnected || n.splice(e, 1);
|
|
3532
3503
|
for (let t of n) {
|
|
3533
3504
|
let n = document.createElement("script");
|
|
3534
|
-
n.src =
|
|
3505
|
+
n.src = Us(t.url, e), t.container.innerHTML = "", t.container.appendChild(n);
|
|
3535
3506
|
}
|
|
3536
3507
|
}
|
|
3537
|
-
|
|
3508
|
+
it(() => {
|
|
3538
3509
|
e.register(r);
|
|
3539
3510
|
let n = document.documentElement.classList.contains("dark");
|
|
3540
3511
|
t = new MutationObserver(() => {
|
|
@@ -3544,15 +3515,15 @@ function Qs(e) {
|
|
|
3544
3515
|
attributes: !0,
|
|
3545
3516
|
attributeFilter: ["class"]
|
|
3546
3517
|
});
|
|
3547
|
-
}),
|
|
3518
|
+
}), ot(() => {
|
|
3548
3519
|
e.unregister(r), t?.disconnect(), n.length = 0;
|
|
3549
3520
|
});
|
|
3550
3521
|
}
|
|
3551
|
-
function
|
|
3552
|
-
return `${
|
|
3522
|
+
function Us(e, t) {
|
|
3523
|
+
return `${Vs}?target=${encodeURIComponent(e)}&style=${t ? "base16/gruvbox-dark-medium" : "grayscale"}&type=code&showBorder=on&showFileMeta=on&showFullPath=on&showCopy=on&showLineNumbers=on`;
|
|
3553
3524
|
}
|
|
3554
3525
|
// src/client/theme-default/composables/lazy-embed/index.ts
|
|
3555
|
-
function
|
|
3526
|
+
function Ws() {
|
|
3556
3527
|
let e = [], t = /* @__PURE__ */ new WeakSet(), n = /* @__PURE__ */ new WeakMap(), r, i;
|
|
3557
3528
|
function a() {
|
|
3558
3529
|
let i = document.getElementById("td-content");
|
|
@@ -3561,7 +3532,7 @@ function ec() {
|
|
|
3561
3532
|
for (let i of e) t.has(i) || (t.add(i), n.set(i, a), r.observe(i));
|
|
3562
3533
|
}
|
|
3563
3534
|
}
|
|
3564
|
-
|
|
3535
|
+
it(() => {
|
|
3565
3536
|
r = new IntersectionObserver((e) => {
|
|
3566
3537
|
for (let t of e) if (t.isIntersecting) {
|
|
3567
3538
|
r?.unobserve(t.target);
|
|
@@ -3574,7 +3545,7 @@ function ec() {
|
|
|
3574
3545
|
childList: !0,
|
|
3575
3546
|
subtree: !0
|
|
3576
3547
|
}));
|
|
3577
|
-
}),
|
|
3548
|
+
}), ot(() => {
|
|
3578
3549
|
i?.disconnect(), r?.disconnect();
|
|
3579
3550
|
});
|
|
3580
3551
|
let o = {
|
|
@@ -3586,38 +3557,38 @@ function ec() {
|
|
|
3586
3557
|
n !== -1 && e.splice(n, 1);
|
|
3587
3558
|
}
|
|
3588
3559
|
};
|
|
3589
|
-
|
|
3560
|
+
Rs(o), Ms(o), Hs(o);
|
|
3590
3561
|
}
|
|
3591
3562
|
// src/client/theme-default/TdLayout.vue?vue&type=script&setup=true&lang.ts
|
|
3592
|
-
var
|
|
3563
|
+
var Gs = { class: "td-header" }, Ks = { class: "td-header-left" }, qs = ["href"], Js = { class: "td-brand-name" }, Ys = { class: "td-header-right" }, Xs = ["href"], Zs = { class: "td-drawer-header" }, Qs = ["href"], $s = { class: "td-brand-name" }, ec = {
|
|
3593
3564
|
key: 0,
|
|
3594
3565
|
class: "pt-4",
|
|
3595
3566
|
"aria-label": "Site navigation"
|
|
3596
|
-
},
|
|
3567
|
+
}, tc = { class: "td-page" }, nc = ["aria-label"], rc = {
|
|
3597
3568
|
key: 2,
|
|
3598
3569
|
class: "td-sidebar-collapse-label"
|
|
3599
|
-
},
|
|
3570
|
+
}, ic = ["onKeydown"], ac = { class: "td-main-and-rail" }, oc = { class: "td-main" }, sc = {
|
|
3600
3571
|
id: "td-content",
|
|
3601
3572
|
class: "td-content",
|
|
3602
3573
|
"data-testid": "content"
|
|
3603
|
-
},
|
|
3574
|
+
}, cc = {
|
|
3604
3575
|
key: 0,
|
|
3605
3576
|
class: "td-page-eyebrow"
|
|
3606
|
-
},
|
|
3577
|
+
}, lc = {
|
|
3607
3578
|
key: 1,
|
|
3608
3579
|
class: "td-page-icon"
|
|
3609
|
-
},
|
|
3580
|
+
}, uc = ["innerHTML"], dc = {
|
|
3610
3581
|
key: 3,
|
|
3611
3582
|
class: "td-page-meta"
|
|
3612
|
-
},
|
|
3583
|
+
}, fc = { key: 0 }, pc = { class: "td-content-body" }, mc = ["href"], hc = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
3613
3584
|
__name: "TdLayout",
|
|
3614
3585
|
setup(e) {
|
|
3615
|
-
let { title: t, page: n } =
|
|
3586
|
+
let { title: t, page: n } = Se(), i = N(() => {
|
|
3616
3587
|
let e = n.value.icon;
|
|
3617
|
-
return e ?
|
|
3618
|
-
}), a =
|
|
3619
|
-
Y(() => v.path, () => m()),
|
|
3620
|
-
let x = J("sidebarSearch"), S = J("menuSearch"), C = J("palette"), { previous: w, next: T } =
|
|
3588
|
+
return e ? Le(e.name) : void 0;
|
|
3589
|
+
}), a = j(), { withBase: o } = a, c = we(), l = ke(), u = N(() => l.value.ready), { isOpen: d, isDrawerMounted: f, open: p, close: m } = Sa(), h = U(""), g = U(!1), _ = U(!1), v = Ie(), y = U(!1);
|
|
3590
|
+
Y(() => v.path, () => m()), Ro(), zo(), Ws();
|
|
3591
|
+
let x = J("sidebarSearch"), S = J("menuSearch"), C = J("palette"), { previous: w, next: T } = wa();
|
|
3621
3592
|
function E() {
|
|
3622
3593
|
y.value = !1;
|
|
3623
3594
|
}
|
|
@@ -3630,133 +3601,133 @@ var tc = { class: "td-header" }, nc = { class: "td-header-left" }, rc = ["href"]
|
|
|
3630
3601
|
].filter(Boolean).join("/")}`;
|
|
3631
3602
|
}
|
|
3632
3603
|
function te() {
|
|
3633
|
-
O.value = !1,
|
|
3604
|
+
O.value = !1, tt(() => x.value?.focus());
|
|
3634
3605
|
}
|
|
3635
|
-
function
|
|
3606
|
+
function ne() {
|
|
3636
3607
|
x.value?.isVisible ? x.value.focus() : (p(), S.value?.focus());
|
|
3637
3608
|
}
|
|
3638
|
-
function
|
|
3609
|
+
function re() {
|
|
3639
3610
|
C.value?.open();
|
|
3640
3611
|
}
|
|
3641
|
-
function
|
|
3612
|
+
function ie() {
|
|
3642
3613
|
y.value = !0;
|
|
3643
3614
|
}
|
|
3644
|
-
|
|
3615
|
+
_a([Q.Control, Q.k], ne), _a([Q.Meta, Q.k], ne), _a([Q.Control, Q.FSlash], re), _a([Q.Meta, Q.FSlash], re), _a([Q.Control, Q.ArrowLeft], () => {
|
|
3645
3616
|
w.value && c.go(w.value.url);
|
|
3646
|
-
}, { ignoreWhenTyping: !0 }),
|
|
3617
|
+
}, { ignoreWhenTyping: !0 }), _a([Q.Control, Q.ArrowRight], () => {
|
|
3647
3618
|
T.value && c.go(T.value.url);
|
|
3648
|
-
}, { ignoreWhenTyping: !0 }),
|
|
3619
|
+
}, { ignoreWhenTyping: !0 }), _t(() => {
|
|
3649
3620
|
if (typeof document > "u") return;
|
|
3650
3621
|
let e = t.value, r = a.title;
|
|
3651
3622
|
document.title = e && e !== r ? `${e} - ${r}` : r;
|
|
3652
3623
|
let i = n.value.frontmatter?.description === void 0 ? a.description ?? "" : String(n.value.frontmatter.description), o = document.querySelector("meta[name=\"description\"]");
|
|
3653
3624
|
o && o.setAttribute("content", i);
|
|
3654
|
-
}),
|
|
3655
|
-
let { sidebarWidth:
|
|
3656
|
-
function se() {
|
|
3657
|
-
f.value ? d.value ? m() : p() : ce();
|
|
3658
|
-
}
|
|
3625
|
+
}), Ho();
|
|
3626
|
+
let { sidebarWidth: ae, sidebarCollapsed: O, sidebarStyle: oe } = D(), se = U(!1);
|
|
3659
3627
|
function ce() {
|
|
3660
|
-
|
|
3628
|
+
f.value ? d.value ? m() : p() : le();
|
|
3661
3629
|
}
|
|
3662
|
-
Ea([Q.Control, Q.Backslash], se, { capture: !0 }), Ea([Q.Meta, Q.Backslash], se, { capture: !0 });
|
|
3663
3630
|
function le() {
|
|
3664
|
-
|
|
3631
|
+
O.value = !O.value;
|
|
3632
|
+
}
|
|
3633
|
+
_a([Q.Control, Q.Backslash], ce, { capture: !0 }), _a([Q.Meta, Q.Backslash], ce, { capture: !0 });
|
|
3634
|
+
function ue() {
|
|
3635
|
+
ae.value = Math.min(500, ae.value + 20);
|
|
3665
3636
|
}
|
|
3666
|
-
function
|
|
3667
|
-
let t = e.clientX, n =
|
|
3668
|
-
|
|
3637
|
+
function k(e) {
|
|
3638
|
+
let t = e.clientX, n = ae.value, r = e.currentTarget;
|
|
3639
|
+
se.value = !0, r.setPointerCapture(e.pointerId);
|
|
3669
3640
|
function i(e) {
|
|
3670
3641
|
let r = Math.min(500, window.innerWidth * .85), i = Math.min(r, Math.max(200, n + e.clientX - t));
|
|
3671
|
-
|
|
3642
|
+
ae.value = i;
|
|
3672
3643
|
}
|
|
3673
3644
|
function a() {
|
|
3674
|
-
|
|
3645
|
+
se.value = !1, document.body.style.cursor = "", r.removeEventListener("pointermove", i), r.removeEventListener("pointerup", a);
|
|
3675
3646
|
}
|
|
3676
3647
|
document.body.style.cursor = "col-resize", r.addEventListener("pointermove", i), r.addEventListener("pointerup", a);
|
|
3677
3648
|
}
|
|
3678
3649
|
function de() {
|
|
3679
|
-
|
|
3650
|
+
ae.value = Math.max(200, ae.value - 20);
|
|
3680
3651
|
}
|
|
3681
|
-
return (e, r) => (H(),
|
|
3652
|
+
return (e, r) => (H(), I("div", null, [
|
|
3682
3653
|
G(e.$slots, "layout-top", {}, void 0, !0),
|
|
3683
|
-
r[6] ||=
|
|
3654
|
+
r[6] ||= L("a", {
|
|
3684
3655
|
href: "#td-content",
|
|
3685
3656
|
class: "td-skip-link"
|
|
3686
3657
|
}, "Skip to content", -1),
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3658
|
+
L("header", Gs, [
|
|
3659
|
+
L("div", Ks, [
|
|
3660
|
+
z(Ca, { onClick: q(p) }, null, 8, ["onClick"]),
|
|
3661
|
+
L("a", {
|
|
3691
3662
|
href: q(o)(q(s)("/")),
|
|
3692
3663
|
class: "td-brand"
|
|
3693
|
-
}, [
|
|
3694
|
-
|
|
3664
|
+
}, [z(Vt), L("span", Js, K(q(a).title || "Typedown"), 1)], 8, qs),
|
|
3665
|
+
z(_i, { class: "td-header-breadcrumb" })
|
|
3695
3666
|
]),
|
|
3696
|
-
|
|
3667
|
+
z(q(bi)),
|
|
3697
3668
|
G(e.$slots, "nav-bar-after", {}, void 0, !0),
|
|
3698
|
-
|
|
3699
|
-
|
|
3669
|
+
L("div", Ys, [
|
|
3670
|
+
z(Fr, {
|
|
3700
3671
|
text: "Commands",
|
|
3701
3672
|
placement: "bottom",
|
|
3702
3673
|
shortcut: [q(Q).Meta, q(Q).FSlash],
|
|
3703
3674
|
always: ""
|
|
3704
3675
|
}, {
|
|
3705
|
-
default: X(() => [
|
|
3676
|
+
default: X(() => [L("button", {
|
|
3706
3677
|
class: "td-header-commands-btn",
|
|
3707
3678
|
type: "button",
|
|
3708
3679
|
"aria-label": "Open command palette",
|
|
3709
|
-
onClick:
|
|
3710
|
-
}, [
|
|
3680
|
+
onClick: re
|
|
3681
|
+
}, [z(q(Oe), { size: 15 })])]),
|
|
3711
3682
|
_: 1
|
|
3712
3683
|
}, 8, ["shortcut"]),
|
|
3713
|
-
|
|
3714
|
-
q(a).repo ? (H(),
|
|
3684
|
+
z(Lo),
|
|
3685
|
+
q(a).repo ? (H(), I("a", {
|
|
3715
3686
|
key: 0,
|
|
3716
3687
|
href: q(a).repo.url,
|
|
3717
3688
|
target: "_blank",
|
|
3718
3689
|
rel: "noopener noreferrer",
|
|
3719
3690
|
class: "td-header-icon-link",
|
|
3720
3691
|
"aria-label": "GitHub repository"
|
|
3721
|
-
}, [...r[5] ||= [
|
|
3692
|
+
}, [...r[5] ||= [L("svg", {
|
|
3722
3693
|
width: "20",
|
|
3723
3694
|
height: "20",
|
|
3724
3695
|
viewBox: "0 0 98 96",
|
|
3725
3696
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3726
3697
|
"aria-hidden": "true",
|
|
3727
3698
|
fill: "currentColor"
|
|
3728
|
-
}, [
|
|
3699
|
+
}, [L("path", {
|
|
3729
3700
|
"fill-rule": "evenodd",
|
|
3730
3701
|
"clip-rule": "evenodd",
|
|
3731
3702
|
d: "M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59\n 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367\n 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778\n 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125\n 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2\n 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364\n 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z"
|
|
3732
|
-
})], -1)]], 8,
|
|
3703
|
+
})], -1)]], 8, Xs)) : F("", !0)
|
|
3733
3704
|
])
|
|
3734
3705
|
]),
|
|
3735
|
-
|
|
3736
|
-
default: X(() => [q(f) ? (H(),
|
|
3706
|
+
z(Ye, { name: "td-drawer-scrim" }, {
|
|
3707
|
+
default: X(() => [q(f) ? (H(), I("div", {
|
|
3737
3708
|
key: 0,
|
|
3738
|
-
class:
|
|
3709
|
+
class: V(["td-drawer-scrim", { "is-open": q(d) }]),
|
|
3739
3710
|
onClick: r[0] ||= (...e) => q(m) && q(m)(...e)
|
|
3740
|
-
}, null, 2)) :
|
|
3711
|
+
}, null, 2)) : F("", !0)]),
|
|
3741
3712
|
_: 1
|
|
3742
3713
|
}),
|
|
3743
|
-
|
|
3744
|
-
default: X(() => [q(f) ? (H(),
|
|
3714
|
+
z(Ye, { name: "td-drawer-panel" }, {
|
|
3715
|
+
default: X(() => [q(f) ? (H(), I("aside", {
|
|
3745
3716
|
key: 0,
|
|
3746
|
-
class:
|
|
3717
|
+
class: V(["td-drawer", { "is-open": q(d) }])
|
|
3747
3718
|
}, [
|
|
3748
|
-
|
|
3719
|
+
L("header", Zs, [L("a", {
|
|
3749
3720
|
href: q(o)(q(s)("/")),
|
|
3750
3721
|
class: "td-brand"
|
|
3751
|
-
}, [
|
|
3722
|
+
}, [z(Vt), L("span", $s, K(q(a).title || "Typedown"), 1)], 8, Qs), z(Ut, {
|
|
3752
3723
|
label: "Close menu",
|
|
3753
3724
|
onClick: q(m)
|
|
3754
3725
|
}, {
|
|
3755
|
-
default: X(() => [
|
|
3726
|
+
default: X(() => [z(q(Ne), { size: 20 })]),
|
|
3756
3727
|
_: 1
|
|
3757
3728
|
}, 8, ["onClick"])]),
|
|
3758
|
-
|
|
3759
|
-
|
|
3729
|
+
z(q(Ci)),
|
|
3730
|
+
z(Io, {
|
|
3760
3731
|
ref_key: "menuSearch",
|
|
3761
3732
|
ref: S,
|
|
3762
3733
|
query: h.value,
|
|
@@ -3769,29 +3740,29 @@ var tc = { class: "td-header" }, nc = { class: "td-header-left" }, rc = ["href"]
|
|
|
3769
3740
|
"active",
|
|
3770
3741
|
"onSelect"
|
|
3771
3742
|
]),
|
|
3772
|
-
_.value ?
|
|
3743
|
+
_.value ? F("", !0) : (H(), I("nav", ec, [u.value ? (H(), P(ni, {
|
|
3773
3744
|
key: 1,
|
|
3774
3745
|
tree: q(l).contentTree
|
|
3775
|
-
}, null, 8, ["tree"])) : (H(),
|
|
3776
|
-
], 2)) :
|
|
3746
|
+
}, null, 8, ["tree"])) : (H(), P(to, { key: 0 }))]))
|
|
3747
|
+
], 2)) : F("", !0)]),
|
|
3777
3748
|
_: 1
|
|
3778
3749
|
}),
|
|
3779
|
-
|
|
3780
|
-
class:
|
|
3781
|
-
"is-resizing":
|
|
3750
|
+
L("div", tc, [L("nav", {
|
|
3751
|
+
class: V(["td-sidebar-left", {
|
|
3752
|
+
"is-resizing": se.value,
|
|
3782
3753
|
"is-collapsed": q(O)
|
|
3783
3754
|
}]),
|
|
3784
3755
|
"data-testid": "sidebar",
|
|
3785
3756
|
"aria-label": "Site navigation",
|
|
3786
|
-
style:
|
|
3757
|
+
style: nt(q(oe))
|
|
3787
3758
|
}, [
|
|
3788
|
-
q(O) ? (H(),
|
|
3759
|
+
q(O) ? (H(), P(so, {
|
|
3789
3760
|
key: 1,
|
|
3790
3761
|
tree: q(l).contentTree,
|
|
3791
3762
|
onSearch: te
|
|
3792
|
-
}, null, 8, ["tree"])) : (H(),
|
|
3763
|
+
}, null, 8, ["tree"])) : (H(), I(M, { key: 0 }, [
|
|
3793
3764
|
G(e.$slots, "sidebar-top", {}, void 0, !0),
|
|
3794
|
-
|
|
3765
|
+
z(Io, {
|
|
3795
3766
|
ref_key: "sidebarSearch",
|
|
3796
3767
|
ref: x,
|
|
3797
3768
|
query: h.value,
|
|
@@ -3800,7 +3771,7 @@ var tc = { class: "td-header" }, nc = { class: "td-header-left" }, rc = ["href"]
|
|
|
3800
3771
|
"onUpdate:active": r[4] ||= (e) => g.value = e,
|
|
3801
3772
|
class: "td-sidebar-search"
|
|
3802
3773
|
}, null, 8, ["query", "active"]),
|
|
3803
|
-
|
|
3774
|
+
z(no, {
|
|
3804
3775
|
tree: q(l).contentTree,
|
|
3805
3776
|
"search-active": g.value,
|
|
3806
3777
|
ready: u.value
|
|
@@ -3811,99 +3782,99 @@ var tc = { class: "td-header" }, nc = { class: "td-header-left" }, rc = ["href"]
|
|
|
3811
3782
|
]),
|
|
3812
3783
|
G(e.$slots, "sidebar-bottom", {}, void 0, !0)
|
|
3813
3784
|
], 64)),
|
|
3814
|
-
|
|
3785
|
+
L("button", {
|
|
3815
3786
|
class: "td-sidebar-collapse-btn",
|
|
3816
3787
|
type: "button",
|
|
3817
3788
|
"aria-label": q(O) ? "Expand sidebar" : "Collapse sidebar",
|
|
3818
|
-
onClick:
|
|
3789
|
+
onClick: le
|
|
3819
3790
|
}, [
|
|
3820
|
-
q(O) ? (H(),
|
|
3791
|
+
q(O) ? (H(), P(q(Ct), {
|
|
3821
3792
|
key: 1,
|
|
3822
3793
|
size: 14
|
|
3823
|
-
})) : (H(),
|
|
3794
|
+
})) : (H(), P(q(St), {
|
|
3824
3795
|
key: 0,
|
|
3825
3796
|
size: 14
|
|
3826
3797
|
})),
|
|
3827
|
-
q(O) ?
|
|
3828
|
-
q(O) ?
|
|
3798
|
+
q(O) ? F("", !0) : (H(), I("span", rc, "Collapse sidebar")),
|
|
3799
|
+
q(O) ? F("", !0) : (H(), P($, {
|
|
3829
3800
|
key: 3,
|
|
3830
3801
|
keys: [q(Q).Meta, q(Q).Backslash]
|
|
3831
3802
|
}, null, 8, ["keys"]))
|
|
3832
|
-
], 8,
|
|
3833
|
-
q(O) ?
|
|
3803
|
+
], 8, nc),
|
|
3804
|
+
q(O) ? F("", !0) : (H(), I("div", {
|
|
3834
3805
|
key: 2,
|
|
3835
3806
|
class: "td-resize-handle",
|
|
3836
3807
|
role: "separator",
|
|
3837
3808
|
"aria-orientation": "vertical",
|
|
3838
3809
|
"aria-label": "Resize sidebar",
|
|
3839
3810
|
tabindex: "0",
|
|
3840
|
-
onPointerdown:
|
|
3841
|
-
onKeydown: [
|
|
3842
|
-
}, null, 40,
|
|
3843
|
-
], 6),
|
|
3811
|
+
onPointerdown: bt(k, ["prevent"]),
|
|
3812
|
+
onKeydown: [yt(bt(de, ["prevent"]), ["left"]), yt(bt(ue, ["prevent"]), ["right"])]
|
|
3813
|
+
}, null, 40, ic))
|
|
3814
|
+
], 6), L("div", ac, [L("main", oc, [L("article", sc, [
|
|
3844
3815
|
G(e.$slots, "doc-before", {}, void 0, !0),
|
|
3845
|
-
q(n).schema ? (H(),
|
|
3846
|
-
i.value ? (H(),
|
|
3847
|
-
q(t) ? (H(),
|
|
3816
|
+
q(n).schema ? (H(), I("div", cc, K(q(n).schemaLabel ?? q(n).schema), 1)) : F("", !0),
|
|
3817
|
+
i.value ? (H(), I("div", lc, [(H(), P(ut(i.value), { size: 32 }))])) : F("", !0),
|
|
3818
|
+
q(t) ? (H(), I("h1", {
|
|
3848
3819
|
key: 2,
|
|
3849
3820
|
class: "td-page-title",
|
|
3850
3821
|
innerHTML: q(n).titleHtml
|
|
3851
|
-
}, null, 8,
|
|
3852
|
-
q(n).fileMetadata ? (H(),
|
|
3853
|
-
|
|
3822
|
+
}, null, 8, uc)) : F("", !0),
|
|
3823
|
+
q(n).fileMetadata ? (H(), I("div", dc, [L("span", null, K(q(b)(q(n).fileMetadata.mtimeSecs, "Modified")), 1), q(n).fileMetadata.ctimeSecs === q(n).fileMetadata.mtimeSecs ? F("", !0) : (H(), I("span", fc, " · " + K(q(b)(q(n).fileMetadata.ctimeSecs, "Created")), 1))])) : F("", !0),
|
|
3824
|
+
z(q(pa), {
|
|
3854
3825
|
class: "td-frontmatter-inline",
|
|
3855
3826
|
schema: q(n).schema,
|
|
3856
3827
|
frontmatter: q(n).frontmatter
|
|
3857
3828
|
}, null, 8, ["schema", "frontmatter"]),
|
|
3858
|
-
q(n).headings.length > 1 ? (H(),
|
|
3829
|
+
q(n).headings.length > 1 ? (H(), P(Ja, {
|
|
3859
3830
|
key: 4,
|
|
3860
3831
|
class: "td-toc-inline",
|
|
3861
3832
|
headings: q(n).headings,
|
|
3862
3833
|
inline: ""
|
|
3863
|
-
}, null, 8, ["headings"])) :
|
|
3834
|
+
}, null, 8, ["headings"])) : F("", !0),
|
|
3864
3835
|
G(e.$slots, "doc-content-before", {}, void 0, !0),
|
|
3865
|
-
|
|
3836
|
+
L("div", pc, [z(q(Fe))]),
|
|
3866
3837
|
G(e.$slots, "doc-content-after", {}, void 0, !0),
|
|
3867
|
-
|
|
3868
|
-
q(a).repo && q(n).filepath ? (H(),
|
|
3838
|
+
z(La),
|
|
3839
|
+
q(a).repo && q(n).filepath ? (H(), I("a", {
|
|
3869
3840
|
key: 5,
|
|
3870
3841
|
href: ee(q(n).filepath),
|
|
3871
3842
|
target: "_blank",
|
|
3872
3843
|
rel: "noopener noreferrer",
|
|
3873
3844
|
class: "td-page-edit"
|
|
3874
|
-
}, "Edit this page", 8,
|
|
3845
|
+
}, "Edit this page", 8, mc)) : F("", !0),
|
|
3875
3846
|
G(e.$slots, "doc-after", {}, void 0, !0)
|
|
3876
|
-
])]),
|
|
3877
|
-
|
|
3847
|
+
])]), z($a, { class: "td-rail" })])]),
|
|
3848
|
+
z(ai),
|
|
3878
3849
|
G(e.$slots, "layout-bottom", {}, void 0, !0),
|
|
3879
|
-
|
|
3850
|
+
z(So, {
|
|
3880
3851
|
ref_key: "palette",
|
|
3881
3852
|
ref: C,
|
|
3882
|
-
onToggleSidebar:
|
|
3883
|
-
onShowShortcuts:
|
|
3853
|
+
onToggleSidebar: le,
|
|
3854
|
+
onShowShortcuts: ie
|
|
3884
3855
|
}, null, 512),
|
|
3885
|
-
|
|
3856
|
+
z(Eo, {
|
|
3886
3857
|
open: y.value,
|
|
3887
3858
|
onClose: E
|
|
3888
3859
|
}, null, 8, ["open"])
|
|
3889
3860
|
]));
|
|
3890
3861
|
}
|
|
3891
|
-
}), [["__scopeId", "data-v-e1cb586a"]]),
|
|
3862
|
+
}), [["__scopeId", "data-v-e1cb586a"]]), gc = { class: "pt-16 pb-24" }, _c = ["href"], vc = /* @__PURE__ */ B({
|
|
3892
3863
|
__name: "TdNotFound",
|
|
3893
3864
|
setup(e) {
|
|
3894
|
-
let { withBase: t } =
|
|
3895
|
-
return (e, n) => (H(),
|
|
3896
|
-
n[0] ||=
|
|
3897
|
-
n[1] ||=
|
|
3898
|
-
n[2] ||=
|
|
3899
|
-
|
|
3865
|
+
let { withBase: t } = j();
|
|
3866
|
+
return (e, n) => (H(), I("div", gc, [
|
|
3867
|
+
n[0] ||= L("p", { class: "text-td-4xl font-extrabold leading-none tracking-td-tight text-td-fg-muted" }, " 404 ", -1),
|
|
3868
|
+
n[1] ||= L("h1", { class: "text-td-xl font-extrabold leading-td-tight tracking-td-tight mt-4" }, " Page Not Found ", -1),
|
|
3869
|
+
n[2] ||= L("p", { class: "text-td-fg-muted mt-2 text-td-base leading-td-relaxed" }, " The page you are looking for does not exist. ", -1),
|
|
3870
|
+
L("a", {
|
|
3900
3871
|
class: "inline-flex items-center mt-6 text-td-accent text-td-sm font-extrabold tracking-td-tight hover:text-td-accent-hi",
|
|
3901
3872
|
href: q(t)(q(s)("/"))
|
|
3902
|
-
}, "Go Home", 8,
|
|
3873
|
+
}, "Go Home", 8, _c)
|
|
3903
3874
|
]));
|
|
3904
3875
|
}
|
|
3905
|
-
}),
|
|
3906
|
-
Layout:
|
|
3907
|
-
NotFound:
|
|
3876
|
+
}), yc = {
|
|
3877
|
+
Layout: hc,
|
|
3878
|
+
NotFound: vc
|
|
3908
3879
|
};
|
|
3909
|
-
export {
|
|
3880
|
+
export { ie as SIDEBAR_COLLAPSED_WIDTH, te as SIDEBAR_DEFAULT_WIDTH, ne as SIDEBAR_MAX_WIDTH, ee as SIDEBAR_MIN_WIDTH, Vt as TdBrandIcon, ni as TdContentNav, Ee as TdDirectoryIndex, ai as TdFooter, Te as TdGlossaryIndex, $ as TdKbdShortcut, Q as TdKeyName, hc as TdLayout, vc as TdNotFound, La as TdPreviousNext, $a as TdRail, Lo as TdThemeToggle, Ja as TdToc, yc as default, ga as isTypingTarget, re as useClientPreferences, Ro as useCopyCode, _a as useGlobalHotkey, va as useLocalHotkeys, D as useSidebarConfig, E as useTheme };
|