typerighter 0.56.3 → 0.57.1

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