@canofold/markdown 0.2.1 → 0.3.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.
- package/dist/{Markdown-DgolXL7g.js → Markdown-CPG2lcO7.js} +223 -212
- package/dist/base.css +1 -1
- package/dist/client/chunks/{client-kVNIqHQd.js → client-CTpZrdpv.js} +2 -2
- package/dist/client/chunks/{image-BuMCsr5L.js → image-BsfZtDsx.js} +1 -1
- package/dist/client/chunks/{serialized-T1PzI4rG.js → serialized-Ck9NBdg7.js} +129 -118
- package/dist/client/chunks/{table-JOSJsHgy.js → table-jaJMPch3.js} +1 -1
- package/dist/client/index.js +1 -1
- package/dist/compiler/analyze.d.ts +11 -0
- package/dist/compiler/fenceMetadata.d.ts +7 -0
- package/dist/compiler/normalizeOptions.d.ts +2 -1
- package/dist/compiler/plugins/code.d.ts +1 -1
- package/dist/compiler/plugins.d.ts +2 -0
- package/dist/compiler/prepareMarkdown.d.ts +1 -1
- package/dist/compiler/types.d.ts +9 -0
- package/dist/components/blocks/MarkdownCodeBlock.d.ts +3 -1
- package/dist/{directiveValidation-CwXRsn5k.js → directiveValidation-BdVbgcY_.js} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/{plugins-CeQ-Bo89.js → plugins-StkCS2su.js} +18 -8
- package/dist/{prepareMarkdown-Bug1ncYk.js → prepareMarkdown-DPMq7203.js} +221 -203
- package/dist/server/analyze.d.ts +1 -1
- package/dist/server/analyze.js +104 -86
- package/dist/server.js +60 -55
- package/package.json +2 -2
|
@@ -3,8 +3,8 @@ import { toJsxRuntime as ht } from "hast-util-to-jsx-runtime";
|
|
|
3
3
|
import { createContext as Ye, createElement as w, useContext as Qe, useState as B, useEffect as Z, isValidElement as A, Children as O, useMemo as le, useRef as _, cloneElement as R, useId as yt, version as vt, Fragment as Ct } from "react";
|
|
4
4
|
import { ChevronRight as wt, ChevronLeft as kt, X as Lt, Link2 as Nt, Workflow as St, FileText as xt, Folder as It, Table2 as Mt, ChevronsUpDown as Tt, RotateCcw as Ft, Plus as At, Minus as zt, Maximize2 as Dt, Code2 as $t, Download as Pt, Copy as Ot, Check as Rt, ChevronDown as Et, CheckCircle2 as jt, TriangleAlert as Bt, CircleAlert as _t, Info as Wt } from "lucide-react";
|
|
5
5
|
import { createPortal as Gt } from "react-dom";
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
6
|
+
import { f as Ut, g as Kt, s as Vt } from "./plugins-StkCS2su.js";
|
|
7
|
+
const I = {
|
|
8
8
|
copyCode: "Copy code",
|
|
9
9
|
copyFailed: "Copy failed",
|
|
10
10
|
copySnippet: "Copy snippet",
|
|
@@ -113,7 +113,7 @@ function me({
|
|
|
113
113
|
action: a,
|
|
114
114
|
className: o = "cf-block-button",
|
|
115
115
|
icon: n = "copy",
|
|
116
|
-
failureLabel: c =
|
|
116
|
+
failureLabel: c = I.copyFailed
|
|
117
117
|
}) {
|
|
118
118
|
const [r, i] = B("idle");
|
|
119
119
|
Z(() => {
|
|
@@ -121,7 +121,7 @@ function me({
|
|
|
121
121
|
const f = setTimeout(() => i("idle"), ct);
|
|
122
122
|
return () => clearTimeout(f);
|
|
123
123
|
}, [r]);
|
|
124
|
-
const
|
|
124
|
+
const s = r === "success" ? `${t} ✓` : r === "error" ? c : t;
|
|
125
125
|
return /* @__PURE__ */ L(
|
|
126
126
|
"button",
|
|
127
127
|
{
|
|
@@ -130,8 +130,8 @@ function me({
|
|
|
130
130
|
"data-cf-action": a,
|
|
131
131
|
"data-cf-copied": r === "success" ? "true" : void 0,
|
|
132
132
|
"data-cf-copy-error": r === "error" ? "true" : void 0,
|
|
133
|
-
"aria-label":
|
|
134
|
-
title:
|
|
133
|
+
"aria-label": s,
|
|
134
|
+
title: s,
|
|
135
135
|
onClick: async () => {
|
|
136
136
|
try {
|
|
137
137
|
i(await et(e) ? "success" : "error");
|
|
@@ -142,7 +142,7 @@ function me({
|
|
|
142
142
|
children: [
|
|
143
143
|
/* @__PURE__ */ l("span", { className: "cf-action-icon cf-action-icon-copy", "aria-hidden": "true", children: /* @__PURE__ */ l(E, { name: n }) }),
|
|
144
144
|
/* @__PURE__ */ l("span", { className: "cf-action-icon cf-action-icon-success", "aria-hidden": "true", children: /* @__PURE__ */ l(Rt, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) }),
|
|
145
|
-
/* @__PURE__ */ l("span", { className: "cf-sr-only", "aria-live": "polite", "aria-atomic": "true", children: r === "idle" ? "" :
|
|
145
|
+
/* @__PURE__ */ l("span", { className: "cf-sr-only", "aria-live": "polite", "aria-atomic": "true", children: r === "idle" ? "" : s })
|
|
146
146
|
]
|
|
147
147
|
}
|
|
148
148
|
);
|
|
@@ -158,8 +158,8 @@ function Jt({
|
|
|
158
158
|
const [r, i] = B();
|
|
159
159
|
return Z(() => {
|
|
160
160
|
if (typeof URL > "u" || typeof URL.createObjectURL != "function") return;
|
|
161
|
-
const
|
|
162
|
-
return i(
|
|
161
|
+
const s = URL.createObjectURL(new Blob([e], { type: c }));
|
|
162
|
+
return i(s), () => URL.revokeObjectURL(s);
|
|
163
163
|
}, [c, e]), /* @__PURE__ */ l(
|
|
164
164
|
"a",
|
|
165
165
|
{
|
|
@@ -171,8 +171,8 @@ function Jt({
|
|
|
171
171
|
"aria-label": a,
|
|
172
172
|
title: a,
|
|
173
173
|
tabIndex: r ? void 0 : -1,
|
|
174
|
-
onClick: (
|
|
175
|
-
r ||
|
|
174
|
+
onClick: (s) => {
|
|
175
|
+
r || s.preventDefault();
|
|
176
176
|
},
|
|
177
177
|
children: /* @__PURE__ */ l(E, { name: "download" })
|
|
178
178
|
}
|
|
@@ -273,31 +273,42 @@ function ve({
|
|
|
273
273
|
source: t,
|
|
274
274
|
language: a,
|
|
275
275
|
filename: o,
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
276
|
+
overflow: n,
|
|
277
|
+
copyLabel: c,
|
|
278
|
+
copyFailureLabel: r,
|
|
279
|
+
...i
|
|
279
280
|
}) {
|
|
280
|
-
const
|
|
281
|
-
return /* @__PURE__ */ L(
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
281
|
+
const s = i, f = t ?? (p(s, "data-cf-source", "dataCfSource") || Qt(e)), b = a ?? (p(s, "data-cf-language", "dataCfLanguage") || "text"), d = o ?? (p(s, "data-cf-filename", "dataCfFilename") || void 0), y = p(s, "data-cf-code-overflow", "dataCfCodeOverflow"), m = n ?? (y === "wrap" || y === "scroll" ? y : void 0), v = c ?? (p(s, "data-cf-copy-label", "dataCfCopyLabel") || I.copyCode), C = r ?? (p(s, "data-cf-copy-failure-label", "dataCfCopyFailureLabel") || I.copyFailed), S = V("cf-code", s.className), { className: g, ...M } = J(s);
|
|
282
|
+
return /* @__PURE__ */ L(
|
|
283
|
+
"figure",
|
|
284
|
+
{
|
|
285
|
+
...M,
|
|
286
|
+
className: S,
|
|
287
|
+
"data-cf-component": "code-block",
|
|
288
|
+
"data-cf-slot": "root",
|
|
289
|
+
"data-cf-code-overflow": m,
|
|
290
|
+
children: [
|
|
291
|
+
/* @__PURE__ */ l(
|
|
292
|
+
ea,
|
|
293
|
+
{
|
|
294
|
+
source: f,
|
|
295
|
+
language: b,
|
|
296
|
+
filename: d,
|
|
297
|
+
copyLabel: v,
|
|
298
|
+
copyFailureLabel: C
|
|
299
|
+
}
|
|
300
|
+
),
|
|
301
|
+
e
|
|
302
|
+
]
|
|
303
|
+
}
|
|
304
|
+
);
|
|
294
305
|
}
|
|
295
306
|
function ea({
|
|
296
307
|
source: e,
|
|
297
308
|
language: t,
|
|
298
309
|
filename: a,
|
|
299
|
-
copyLabel: o =
|
|
300
|
-
copyFailureLabel: n =
|
|
310
|
+
copyLabel: o = I.copyCode,
|
|
311
|
+
copyFailureLabel: n = I.copyFailed
|
|
301
312
|
}) {
|
|
302
313
|
return /* @__PURE__ */ l(
|
|
303
314
|
"div",
|
|
@@ -336,13 +347,13 @@ function Ce({
|
|
|
336
347
|
inner: c = !1,
|
|
337
348
|
...r
|
|
338
349
|
}) {
|
|
339
|
-
const i = t ?? (p(r, "data-cf-value", "dataCfValue") || j(e)),
|
|
350
|
+
const i = t ?? (p(r, "data-cf-value", "dataCfValue") || j(e)), s = a || p(r, "data-cf-copy-label", "dataCfCopyLabel") || I.copySnippet, f = o || p(r, "data-cf-copy-failure-label", "dataCfCopyFailureLabel") || I.copyFailed, b = V("cf-copy-snippet", n), { className: d, ...y } = J(r), m = /* @__PURE__ */ L(U, { children: [
|
|
340
351
|
/* @__PURE__ */ l("code", { "data-cf-slot": "content", children: e ?? i }),
|
|
341
352
|
/* @__PURE__ */ l(
|
|
342
353
|
me,
|
|
343
354
|
{
|
|
344
355
|
value: i,
|
|
345
|
-
label:
|
|
356
|
+
label: s,
|
|
346
357
|
action: "copy-snippet",
|
|
347
358
|
className: "cf-copy-snippet-button",
|
|
348
359
|
failureLabel: f
|
|
@@ -358,7 +369,7 @@ function Ce({
|
|
|
358
369
|
"data-cf-slot": "root",
|
|
359
370
|
"data-cf-behavior": "copy-snippet",
|
|
360
371
|
"data-cf-value": i,
|
|
361
|
-
"data-cf-copy-label":
|
|
372
|
+
"data-cf-copy-label": s,
|
|
362
373
|
"data-cf-copy-failure-label": f,
|
|
363
374
|
children: m
|
|
364
375
|
}
|
|
@@ -413,8 +424,8 @@ function je({
|
|
|
413
424
|
c.preventDefault(), a.current?.focus();
|
|
414
425
|
return;
|
|
415
426
|
}
|
|
416
|
-
const i = r[0],
|
|
417
|
-
!i || !
|
|
427
|
+
const i = r[0], s = r.at(-1);
|
|
428
|
+
!i || !s || (c.shiftKey && document.activeElement === i ? (c.preventDefault(), s.focus()) : !c.shiftKey && document.activeElement === s && (c.preventDefault(), i.focus()));
|
|
418
429
|
};
|
|
419
430
|
}
|
|
420
431
|
const it = Ye(void 0), oa = /^(?:https?|ircs?|mailto|tel|xmpp)$/i;
|
|
@@ -496,24 +507,24 @@ function Le({
|
|
|
496
507
|
title: c,
|
|
497
508
|
width: r,
|
|
498
509
|
height: i,
|
|
499
|
-
loading:
|
|
510
|
+
loading: s,
|
|
500
511
|
srcSet: f,
|
|
501
512
|
sizes: b,
|
|
502
|
-
zoomLabel:
|
|
513
|
+
zoomLabel: d,
|
|
503
514
|
closeLabel: y,
|
|
504
515
|
inner: m = !1,
|
|
505
516
|
...v
|
|
506
517
|
}) {
|
|
507
|
-
const C = v,
|
|
518
|
+
const C = v, S = lt(), g = a && S ? S(a, "src") : a, M = f && S ? _e(f, S) : f, h = rt(ot()), k = O.toArray(e).find(
|
|
508
519
|
(X) => A(X) && W(X) === "img"
|
|
509
520
|
), z = O.toArray(e).find((X) => {
|
|
510
521
|
if (!A(X)) return !1;
|
|
511
522
|
const oe = X;
|
|
512
523
|
return W(oe) === "figcaption" || oe.props["data-cf-slot"] === "caption";
|
|
513
|
-
}), F =
|
|
514
|
-
open:
|
|
524
|
+
}), F = d || p(C, "data-cf-zoom-label", "dataCfZoomLabel") || I.zoomImage, D = y || p(C, "data-cf-close-label", "dataCfCloseLabel") || I.closeImagePreview, [T, G] = B(!1), $ = _(null), u = _(null), x = _(null), K = () => G(!1), te = je({
|
|
525
|
+
open: T,
|
|
515
526
|
close: K,
|
|
516
|
-
dialogRef:
|
|
527
|
+
dialogRef: x,
|
|
517
528
|
initialFocusRef: u,
|
|
518
529
|
triggerRef: $
|
|
519
530
|
}), re = k ?? (g ? /* @__PURE__ */ l(
|
|
@@ -524,8 +535,8 @@ function Le({
|
|
|
524
535
|
title: c,
|
|
525
536
|
width: r,
|
|
526
537
|
height: i,
|
|
527
|
-
loading:
|
|
528
|
-
srcSet:
|
|
538
|
+
loading: s,
|
|
539
|
+
srcSet: M,
|
|
529
540
|
sizes: b,
|
|
530
541
|
"data-cf-element": "image"
|
|
531
542
|
}
|
|
@@ -549,10 +560,10 @@ function Le({
|
|
|
549
560
|
}
|
|
550
561
|
),
|
|
551
562
|
Y ? h ? /* @__PURE__ */ l(h, { ...Y.props, "data-cf-slot": "caption", children: Y.props.children }) : /* @__PURE__ */ l("figcaption", { "data-cf-slot": "caption", children: Y.props.children }) : null,
|
|
552
|
-
|
|
563
|
+
T ? /* @__PURE__ */ l(Ee, { children: /* @__PURE__ */ L(
|
|
553
564
|
"div",
|
|
554
565
|
{
|
|
555
|
-
ref:
|
|
566
|
+
ref: x,
|
|
556
567
|
className: "cf-image-lightbox",
|
|
557
568
|
"data-cf-slot": "lightbox",
|
|
558
569
|
role: "dialog",
|
|
@@ -637,8 +648,8 @@ function sa(e) {
|
|
|
637
648
|
}
|
|
638
649
|
function da(e, t, a, o) {
|
|
639
650
|
if (!e) return null;
|
|
640
|
-
const n = Ve(e, "thead"), c = Ve(e, "tbody"), r = Ne(n), i = r[0] ? ue(r[0]).map((b,
|
|
641
|
-
const y = t?.column ===
|
|
651
|
+
const n = Ve(e, "thead"), c = Ve(e, "tbody"), r = Ne(n), i = r[0] ? ue(r[0]).map((b, d) => {
|
|
652
|
+
const y = t?.column === d, m = y ? t.direction : void 0;
|
|
642
653
|
return R(b, {
|
|
643
654
|
"aria-sort": y ? m === "asc" ? "ascending" : "descending" : void 0,
|
|
644
655
|
children: /* @__PURE__ */ L(
|
|
@@ -647,12 +658,12 @@ function da(e, t, a, o) {
|
|
|
647
658
|
className: "cf-sort-button",
|
|
648
659
|
type: "button",
|
|
649
660
|
"data-cf-action": "sort-table",
|
|
650
|
-
"data-column": String(
|
|
661
|
+
"data-column": String(d),
|
|
651
662
|
"data-sort": m,
|
|
652
663
|
"aria-pressed": y ? "true" : "false",
|
|
653
|
-
"aria-label": a.replace("{column}", String(
|
|
654
|
-
title: a.replace("{column}", String(
|
|
655
|
-
onClick: () => o?.(
|
|
664
|
+
"aria-label": a.replace("{column}", String(d + 1)),
|
|
665
|
+
title: a.replace("{column}", String(d + 1)),
|
|
666
|
+
onClick: () => o?.(d),
|
|
656
667
|
children: [
|
|
657
668
|
/* @__PURE__ */ l("span", { className: "cf-sort-label", children: b.props.children }),
|
|
658
669
|
/* @__PURE__ */ l("span", { className: "cf-sort-icon", "aria-hidden": "true", children: /* @__PURE__ */ l(E, { name: "sort", direction: m }) })
|
|
@@ -660,15 +671,15 @@ function da(e, t, a, o) {
|
|
|
660
671
|
}
|
|
661
672
|
)
|
|
662
673
|
});
|
|
663
|
-
}) : [],
|
|
674
|
+
}) : [], s = c ? Ne(c).slice().sort((b, d) => {
|
|
664
675
|
if (!t) return 0;
|
|
665
|
-
const y = j(ue(b)[t.column]?.props.children), m = j(ue(
|
|
676
|
+
const y = j(ue(b)[t.column]?.props.children), m = j(ue(d)[t.column]?.props.children), v = y.localeCompare(m, void 0, { numeric: !0, sensitivity: "base" });
|
|
666
677
|
return t.direction === "asc" ? v : -v;
|
|
667
678
|
}) : [], f = Q(e.props.children).map((b) => W(b) === "thead" && r[0] ? R(b, {
|
|
668
679
|
children: r.map(
|
|
669
|
-
(
|
|
680
|
+
(d, y) => y === 0 ? R(d, { children: i }) : d
|
|
670
681
|
)
|
|
671
|
-
}) : W(b) === "tbody" && c && t ? R(b, { children:
|
|
682
|
+
}) : W(b) === "tbody" && c && t ? R(b, { children: s }) : b);
|
|
672
683
|
return R(e, { children: f });
|
|
673
684
|
}
|
|
674
685
|
function Se({
|
|
@@ -680,18 +691,18 @@ function Se({
|
|
|
680
691
|
zoomLabel: c,
|
|
681
692
|
closeLabel: r,
|
|
682
693
|
sortLabel: i,
|
|
683
|
-
serializedTable:
|
|
694
|
+
serializedTable: s,
|
|
684
695
|
inner: f = !1,
|
|
685
696
|
...b
|
|
686
697
|
}) {
|
|
687
|
-
const
|
|
698
|
+
const d = b, y = ia(e), m = le(() => sa(y), [y]), [v, C] = B(null), [S, g] = B(!1), M = _(null), h = _(null), k = _(null), z = t || p(d, "data-cf-table-title", "dataCfTableTitle") || I.tableTitle, F = a || p(d, "data-cf-copy-label", "dataCfCopyLabel") || I.copyTableCsv, D = o || p(d, "data-cf-copy-failure-label", "dataCfCopyFailureLabel") || I.copyFailed, T = n || p(d, "data-cf-download-label", "dataCfDownloadLabel") || I.downloadTableCsv, G = c || p(d, "data-cf-zoom-label", "dataCfZoomLabel") || I.zoomTable, $ = r || p(d, "data-cf-close-label", "dataCfCloseLabel") || I.closeTablePreview, u = i || p(d, "data-cf-sort-label", "dataCfSortLabel") || I.sortTableColumn, x = s ?? p(d, "data-cf-table", "dataCfTable"), K = V("cf-table-window", d.className), { className: te, ...re } = J(d), ae = da(y, v, u, (oe) => C(
|
|
688
699
|
(Ke) => Ke?.column === oe ? Ke.direction === "asc" ? { column: oe, direction: "desc" } : null : { column: oe, direction: "asc" }
|
|
689
700
|
)), se = () => g(!1), de = je({
|
|
690
|
-
open:
|
|
701
|
+
open: S,
|
|
691
702
|
close: se,
|
|
692
703
|
dialogRef: k,
|
|
693
704
|
initialFocusRef: k,
|
|
694
|
-
triggerRef:
|
|
705
|
+
triggerRef: M
|
|
695
706
|
}), X = /* @__PURE__ */ L(U, { children: [
|
|
696
707
|
/* @__PURE__ */ L("div", { className: "cf-block-toolbar", "data-cf-slot": "toolbar", children: [
|
|
697
708
|
/* @__PURE__ */ L("span", { className: "cf-block-title", "data-cf-slot": "title", children: [
|
|
@@ -713,7 +724,7 @@ function Se({
|
|
|
713
724
|
{
|
|
714
725
|
value: m,
|
|
715
726
|
filename: "table.csv",
|
|
716
|
-
label:
|
|
727
|
+
label: T,
|
|
717
728
|
action: "download-table",
|
|
718
729
|
contentType: "text/csv;charset=utf-8"
|
|
719
730
|
}
|
|
@@ -721,7 +732,7 @@ function Se({
|
|
|
721
732
|
/* @__PURE__ */ l(
|
|
722
733
|
"button",
|
|
723
734
|
{
|
|
724
|
-
ref:
|
|
735
|
+
ref: M,
|
|
725
736
|
className: "cf-block-button",
|
|
726
737
|
type: "button",
|
|
727
738
|
"data-cf-action": "zoom-table",
|
|
@@ -735,7 +746,7 @@ function Se({
|
|
|
735
746
|
] })
|
|
736
747
|
] }),
|
|
737
748
|
/* @__PURE__ */ l("div", { className: "cf-data-table", "data-cf-slot": "content", children: ae ?? e }),
|
|
738
|
-
|
|
749
|
+
S && ae ? /* @__PURE__ */ l(Ee, { children: /* @__PURE__ */ L(
|
|
739
750
|
"div",
|
|
740
751
|
{
|
|
741
752
|
ref: k,
|
|
@@ -790,11 +801,11 @@ function Se({
|
|
|
790
801
|
"data-cf-table-title": z,
|
|
791
802
|
"data-cf-copy-label": F,
|
|
792
803
|
"data-cf-copy-failure-label": D,
|
|
793
|
-
"data-cf-download-label":
|
|
804
|
+
"data-cf-download-label": T,
|
|
794
805
|
"data-cf-zoom-label": G,
|
|
795
806
|
"data-cf-close-label": $,
|
|
796
807
|
"data-cf-sort-label": u,
|
|
797
|
-
"data-cf-table":
|
|
808
|
+
"data-cf-table": x || void 0,
|
|
798
809
|
children: X
|
|
799
810
|
}
|
|
800
811
|
);
|
|
@@ -828,15 +839,15 @@ function pe({
|
|
|
828
839
|
copyFailureLabel: c,
|
|
829
840
|
...r
|
|
830
841
|
}) {
|
|
831
|
-
const i = r,
|
|
842
|
+
const i = r, s = a || p(i, "data-cf-title", "dataCfTitle") || I.terminalTitle, f = o ?? p(i, "data-cf-source", "dataCfSource"), b = n || p(i, "data-cf-copy-label", "dataCfCopyLabel") || I.copyTerminal, d = c || p(i, "data-cf-copy-failure-label", "dataCfCopyFailureLabel") || I.copyFailed, y = V("cf-terminal", i.className), { className: m, ...v } = J(i);
|
|
832
843
|
return /* @__PURE__ */ L("div", { ...v, className: y, "data-cf-component": "terminal", "data-cf-slot": "root", children: [
|
|
833
844
|
/* @__PURE__ */ l(
|
|
834
845
|
ua,
|
|
835
846
|
{
|
|
836
|
-
title:
|
|
847
|
+
title: s,
|
|
837
848
|
source: f,
|
|
838
849
|
copyLabel: b,
|
|
839
|
-
copyFailureLabel:
|
|
850
|
+
copyFailureLabel: d
|
|
840
851
|
}
|
|
841
852
|
),
|
|
842
853
|
/* @__PURE__ */ l("pre", { "data-cf-slot": "content", children: fa(f) })
|
|
@@ -845,8 +856,8 @@ function pe({
|
|
|
845
856
|
function ua({
|
|
846
857
|
title: e,
|
|
847
858
|
source: t,
|
|
848
|
-
copyLabel: a =
|
|
849
|
-
copyFailureLabel: o =
|
|
859
|
+
copyLabel: a = I.copyTerminal,
|
|
860
|
+
copyFailureLabel: o = I.copyFailed,
|
|
850
861
|
inner: n = !1
|
|
851
862
|
}) {
|
|
852
863
|
const c = /* @__PURE__ */ L(U, { children: [
|
|
@@ -941,12 +952,12 @@ function st(e, t, a) {
|
|
|
941
952
|
}
|
|
942
953
|
function ma(e, t) {
|
|
943
954
|
return {
|
|
944
|
-
gallery: e?.gallery ?? (p(t, "data-cf-gallery-label", "dataCfGalleryLabel") ||
|
|
945
|
-
close: e?.close ?? (p(t, "data-cf-close-label", "dataCfCloseLabel") ||
|
|
946
|
-
previous: e?.previous ?? (p(t, "data-cf-previous-label", "dataCfPreviousLabel") ||
|
|
947
|
-
next: e?.next ?? (p(t, "data-cf-next-label", "dataCfNextLabel") ||
|
|
948
|
-
thumbnails: e?.thumbnails ?? (p(t, "data-cf-thumbnails-label", "dataCfThumbnailsLabel") ||
|
|
949
|
-
image: e?.image ?? (p(t, "data-cf-image-label", "dataCfImageLabel") ||
|
|
955
|
+
gallery: e?.gallery ?? (p(t, "data-cf-gallery-label", "dataCfGalleryLabel") || I.imageGallery),
|
|
956
|
+
close: e?.close ?? (p(t, "data-cf-close-label", "dataCfCloseLabel") || I.closeImageGallery),
|
|
957
|
+
previous: e?.previous ?? (p(t, "data-cf-previous-label", "dataCfPreviousLabel") || I.previousGalleryImage),
|
|
958
|
+
next: e?.next ?? (p(t, "data-cf-next-label", "dataCfNextLabel") || I.nextGalleryImage),
|
|
959
|
+
thumbnails: e?.thumbnails ?? (p(t, "data-cf-thumbnails-label", "dataCfThumbnailsLabel") || I.galleryThumbnails),
|
|
960
|
+
image: e?.image ?? (p(t, "data-cf-image-label", "dataCfImageLabel") || I.galleryImage)
|
|
950
961
|
};
|
|
951
962
|
}
|
|
952
963
|
function Ie({
|
|
@@ -959,39 +970,39 @@ function Ie({
|
|
|
959
970
|
inner: r = !1,
|
|
960
971
|
...i
|
|
961
972
|
}) {
|
|
962
|
-
const
|
|
973
|
+
const s = i, f = lt(), b = We(c), d = st(t, c, e).map((u) => ({
|
|
963
974
|
...u,
|
|
964
975
|
src: f ? f(u.src, "src") : u.src,
|
|
965
976
|
srcSet: u.srcSet && f ? _e(u.srcSet, f) : u.srcSet
|
|
966
|
-
})), y = JSON.stringify(
|
|
967
|
-
g.current =
|
|
977
|
+
})), y = JSON.stringify(d), m = d.length && b.length === 0 ? ba(e) : [], [v, C] = B(null), S = v === null ? void 0 : d[v], g = _(null), M = _(null), h = _(null), k = ma(n, s), z = (u, x) => {
|
|
978
|
+
g.current = x, C(u);
|
|
968
979
|
}, F = () => C(null), D = je({
|
|
969
|
-
open: !!
|
|
980
|
+
open: !!S,
|
|
970
981
|
close: F,
|
|
971
982
|
dialogRef: h,
|
|
972
|
-
initialFocusRef:
|
|
983
|
+
initialFocusRef: M,
|
|
973
984
|
triggerRef: g
|
|
974
985
|
});
|
|
975
986
|
Z(() => {
|
|
976
|
-
v !== null && !
|
|
977
|
-
}, [v,
|
|
978
|
-
const
|
|
979
|
-
|
|
980
|
-
(
|
|
987
|
+
v !== null && !S && C(null);
|
|
988
|
+
}, [v, S]);
|
|
989
|
+
const T = (u) => {
|
|
990
|
+
d.length && C(
|
|
991
|
+
(x) => x === null ? 0 : (x + u + d.length) % d.length
|
|
981
992
|
);
|
|
982
993
|
}, G = (u) => {
|
|
983
|
-
D(u), !u.defaultPrevented && (u.key === "ArrowLeft" || u.key === "ArrowRight") && (u.preventDefault(),
|
|
994
|
+
D(u), !u.defaultPrevented && (u.key === "ArrowLeft" || u.key === "ArrowRight") && (u.preventDefault(), T(u.key === "ArrowLeft" ? -1 : 1));
|
|
984
995
|
}, $ = /* @__PURE__ */ L(U, { children: [
|
|
985
|
-
|
|
996
|
+
d.length ? d.map((u, x) => /* @__PURE__ */ L("figure", { "data-cf-slot": "item", children: [
|
|
986
997
|
/* @__PURE__ */ l(
|
|
987
998
|
"button",
|
|
988
999
|
{
|
|
989
1000
|
className: "cf-gallery-trigger",
|
|
990
1001
|
type: "button",
|
|
991
1002
|
"data-cf-action": "open-gallery",
|
|
992
|
-
"aria-label": `${u.alt || k.image} ${
|
|
1003
|
+
"aria-label": `${u.alt || k.image} ${x + 1}`,
|
|
993
1004
|
"aria-haspopup": "dialog",
|
|
994
|
-
onClick: (K) => z(
|
|
1005
|
+
onClick: (K) => z(x, K.currentTarget),
|
|
995
1006
|
children: /* @__PURE__ */ l(
|
|
996
1007
|
"img",
|
|
997
1008
|
{
|
|
@@ -1008,9 +1019,9 @@ function Ie({
|
|
|
1008
1019
|
}
|
|
1009
1020
|
),
|
|
1010
1021
|
u.caption ? /* @__PURE__ */ l("figcaption", { children: u.caption }) : null
|
|
1011
|
-
] }, `${u.src}-${
|
|
1022
|
+
] }, `${u.src}-${x}`)) : e,
|
|
1012
1023
|
m,
|
|
1013
|
-
v !== null &&
|
|
1024
|
+
v !== null && S ? /* @__PURE__ */ l(Ee, { children: /* @__PURE__ */ L(
|
|
1014
1025
|
"div",
|
|
1015
1026
|
{
|
|
1016
1027
|
ref: h,
|
|
@@ -1037,7 +1048,7 @@ function Ie({
|
|
|
1037
1048
|
/* @__PURE__ */ l(
|
|
1038
1049
|
"button",
|
|
1039
1050
|
{
|
|
1040
|
-
ref:
|
|
1051
|
+
ref: M,
|
|
1041
1052
|
className: "cf-icon-button",
|
|
1042
1053
|
type: "button",
|
|
1043
1054
|
"data-cf-action": "close-gallery",
|
|
@@ -1049,7 +1060,7 @@ function Ie({
|
|
|
1049
1060
|
)
|
|
1050
1061
|
] }),
|
|
1051
1062
|
/* @__PURE__ */ L("div", { className: "cf-gallery-stage", children: [
|
|
1052
|
-
|
|
1063
|
+
d.length > 1 ? /* @__PURE__ */ l(
|
|
1053
1064
|
"button",
|
|
1054
1065
|
{
|
|
1055
1066
|
className: "cf-gallery-nav cf-gallery-prev",
|
|
@@ -1057,7 +1068,7 @@ function Ie({
|
|
|
1057
1068
|
"data-cf-action": "previous-gallery-image",
|
|
1058
1069
|
"aria-label": k.previous,
|
|
1059
1070
|
title: k.previous,
|
|
1060
|
-
onClick: () =>
|
|
1071
|
+
onClick: () => T(-1),
|
|
1061
1072
|
children: /* @__PURE__ */ l(E, { name: "previous", size: 20 })
|
|
1062
1073
|
}
|
|
1063
1074
|
) : null,
|
|
@@ -1065,17 +1076,17 @@ function Ie({
|
|
|
1065
1076
|
/* @__PURE__ */ l(
|
|
1066
1077
|
"img",
|
|
1067
1078
|
{
|
|
1068
|
-
src:
|
|
1069
|
-
alt:
|
|
1070
|
-
title:
|
|
1071
|
-
srcSet:
|
|
1072
|
-
sizes:
|
|
1073
|
-
width:
|
|
1074
|
-
height:
|
|
1079
|
+
src: S.src,
|
|
1080
|
+
alt: S.alt,
|
|
1081
|
+
title: S.title,
|
|
1082
|
+
srcSet: S.srcSet,
|
|
1083
|
+
sizes: S.sizes,
|
|
1084
|
+
width: S.width,
|
|
1085
|
+
height: S.height
|
|
1075
1086
|
}
|
|
1076
1087
|
),
|
|
1077
1088
|
/* @__PURE__ */ L("figcaption", { children: [
|
|
1078
|
-
/* @__PURE__ */ l("span", { className: "cf-gallery-caption", children:
|
|
1089
|
+
/* @__PURE__ */ l("span", { className: "cf-gallery-caption", children: S.caption || S.alt }),
|
|
1079
1090
|
/* @__PURE__ */ L(
|
|
1080
1091
|
"small",
|
|
1081
1092
|
{
|
|
@@ -1086,13 +1097,13 @@ function Ie({
|
|
|
1086
1097
|
children: [
|
|
1087
1098
|
v + 1,
|
|
1088
1099
|
" / ",
|
|
1089
|
-
|
|
1100
|
+
d.length
|
|
1090
1101
|
]
|
|
1091
1102
|
}
|
|
1092
1103
|
)
|
|
1093
1104
|
] })
|
|
1094
1105
|
] }),
|
|
1095
|
-
|
|
1106
|
+
d.length > 1 ? /* @__PURE__ */ l(
|
|
1096
1107
|
"button",
|
|
1097
1108
|
{
|
|
1098
1109
|
className: "cf-gallery-nav cf-gallery-next",
|
|
@@ -1100,23 +1111,23 @@ function Ie({
|
|
|
1100
1111
|
"data-cf-action": "next-gallery-image",
|
|
1101
1112
|
"aria-label": k.next,
|
|
1102
1113
|
title: k.next,
|
|
1103
|
-
onClick: () =>
|
|
1114
|
+
onClick: () => T(1),
|
|
1104
1115
|
children: /* @__PURE__ */ l(E, { name: "next", size: 20 })
|
|
1105
1116
|
}
|
|
1106
1117
|
) : null
|
|
1107
1118
|
] }),
|
|
1108
|
-
|
|
1119
|
+
d.length > 1 ? /* @__PURE__ */ l("div", { className: "cf-gallery-thumbs", role: "group", "aria-label": k.thumbnails, children: d.map((u, x) => /* @__PURE__ */ l(
|
|
1109
1120
|
"button",
|
|
1110
1121
|
{
|
|
1111
|
-
className:
|
|
1122
|
+
className: x === v ? "is-current" : void 0,
|
|
1112
1123
|
type: "button",
|
|
1113
1124
|
"data-cf-action": "select-gallery-image",
|
|
1114
|
-
"aria-current":
|
|
1115
|
-
"aria-label": `${u.alt || k.image} ${
|
|
1116
|
-
onClick: () => C(
|
|
1125
|
+
"aria-current": x === v ? "true" : void 0,
|
|
1126
|
+
"aria-label": `${u.alt || k.image} ${x + 1}`,
|
|
1127
|
+
onClick: () => C(x),
|
|
1117
1128
|
children: /* @__PURE__ */ l("img", { src: u.src, alt: "", loading: "lazy" })
|
|
1118
1129
|
},
|
|
1119
|
-
`${u.src}-thumb-${
|
|
1130
|
+
`${u.src}-thumb-${x}`
|
|
1120
1131
|
)) }) : null
|
|
1121
1132
|
] })
|
|
1122
1133
|
]
|
|
@@ -1126,7 +1137,7 @@ function Ie({
|
|
|
1126
1137
|
return r ? $ : /* @__PURE__ */ l(
|
|
1127
1138
|
"div",
|
|
1128
1139
|
{
|
|
1129
|
-
...J(
|
|
1140
|
+
...J(s),
|
|
1130
1141
|
className: ["cf-image-gallery", a].filter(Boolean).join(" "),
|
|
1131
1142
|
"data-cf-component": "gallery",
|
|
1132
1143
|
"data-cf-slot": "root",
|
|
@@ -1177,47 +1188,47 @@ function ya(e, t, a = "smooth") {
|
|
|
1177
1188
|
function va(e, t, a, o, n, c) {
|
|
1178
1189
|
const r = O.toArray(e), i = r.findIndex((g) => ce(g) && g.props.role === "tablist");
|
|
1179
1190
|
if (i < 0) return e;
|
|
1180
|
-
const
|
|
1191
|
+
const s = r[i], f = Me(s);
|
|
1181
1192
|
if (!f.length) return e;
|
|
1182
|
-
const b = f.map((g,
|
|
1193
|
+
const b = f.map((g, M) => dt(g) || `tab-${M + 1}`), d = f.flatMap((g, M) => Te(g) ? [] : [M]), y = (g, M = !1) => {
|
|
1183
1194
|
g && (a(g), queueMicrotask(() => {
|
|
1184
1195
|
const h = o.current[g];
|
|
1185
|
-
h && (ya(n.current ?? h.parentElement ?? h, h),
|
|
1196
|
+
h && (ya(n.current ?? h.parentElement ?? h, h), M && h.focus());
|
|
1186
1197
|
}));
|
|
1187
|
-
}, m = (g,
|
|
1198
|
+
}, m = (g, M) => {
|
|
1188
1199
|
if (!["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"].includes(g.key)) return;
|
|
1189
|
-
const h =
|
|
1190
|
-
if (h < 0 ||
|
|
1200
|
+
const h = d.indexOf(M);
|
|
1201
|
+
if (h < 0 || d.length === 0) return;
|
|
1191
1202
|
g.preventDefault(), g.stopPropagation();
|
|
1192
|
-
const k = g.key === "Home" ?
|
|
1203
|
+
const k = g.key === "Home" ? d[0] : g.key === "End" ? d.at(-1) : d[(h + (g.key === "ArrowRight" || g.key === "ArrowDown" ? 1 : -1) + d.length) % d.length];
|
|
1193
1204
|
if (k === void 0) return;
|
|
1194
1205
|
const z = b[k];
|
|
1195
1206
|
z && y(z, !0);
|
|
1196
|
-
}, v = f.map((g,
|
|
1197
|
-
const h = b[
|
|
1207
|
+
}, v = f.map((g, M) => {
|
|
1208
|
+
const h = b[M] ?? `tab-${M + 1}`, k = h === t, z = g.props.onClick, F = g.props.onKeyDown, D = He(g);
|
|
1198
1209
|
return R(g, {
|
|
1199
|
-
id: `${c}-tab-${
|
|
1200
|
-
"aria-controls": `${c}-panel-${
|
|
1210
|
+
id: `${c}-tab-${M + 1}`,
|
|
1211
|
+
"aria-controls": `${c}-panel-${M + 1}`,
|
|
1201
1212
|
"aria-selected": k ? "true" : "false",
|
|
1202
1213
|
tabIndex: k ? 0 : -1,
|
|
1203
|
-
ref: (
|
|
1204
|
-
o.current[h] =
|
|
1214
|
+
ref: (T) => {
|
|
1215
|
+
o.current[h] = T, typeof D == "function" ? D(T) : D && "current" in D && (D.current = T);
|
|
1205
1216
|
},
|
|
1206
|
-
onClick: (
|
|
1207
|
-
z?.(
|
|
1217
|
+
onClick: (T) => {
|
|
1218
|
+
z?.(T), !T.defaultPrevented && (T.stopPropagation(), y(h));
|
|
1208
1219
|
},
|
|
1209
|
-
onKeyDown: (
|
|
1210
|
-
F?.(
|
|
1220
|
+
onKeyDown: (T) => {
|
|
1221
|
+
F?.(T), T.defaultPrevented || m(T, M);
|
|
1211
1222
|
}
|
|
1212
1223
|
});
|
|
1213
|
-
}), C = He(
|
|
1224
|
+
}), C = He(s), S = R(s, {
|
|
1214
1225
|
children: v,
|
|
1215
1226
|
ref: (g) => {
|
|
1216
1227
|
n.current = g, typeof C == "function" ? C(g) : C && "current" in C && (C.current = g);
|
|
1217
1228
|
}
|
|
1218
1229
|
});
|
|
1219
|
-
return r.map((g,
|
|
1220
|
-
if (
|
|
1230
|
+
return r.map((g, M) => {
|
|
1231
|
+
if (M === i) return S;
|
|
1221
1232
|
if (!ce(g) || g.props.role !== "tabpanel") return g;
|
|
1222
1233
|
const h = r.filter((z) => ce(z) && z.props.role === "tabpanel").indexOf(g), k = ga(g) || b[h] || "";
|
|
1223
1234
|
return R(g, {
|
|
@@ -1235,27 +1246,27 @@ function ie({
|
|
|
1235
1246
|
}) {
|
|
1236
1247
|
const c = O.toArray(e).find(
|
|
1237
1248
|
(u) => ce(u) && u.props.role === "tablist"
|
|
1238
|
-
), r = c ? Me(c).map((u,
|
|
1249
|
+
), r = c ? Me(c).map((u, x) => dt(u) || `tab-${x + 1}`) : [], i = c ? Me(c) : [], s = i.findIndex(
|
|
1239
1250
|
(u) => ha(u) && !Te(u)
|
|
1240
|
-
), f = i.findIndex((u) => !Te(u)), b = r[
|
|
1251
|
+
), f = i.findIndex((u) => !Te(u)), b = r[s >= 0 ? s : f] ?? "", [d, y] = B(b), m = r.includes(d) ? d : b, v = _({}), C = _(null), [S, g] = B(!1), [M, h] = B(!1), k = yt().replace(/:/g, ""), F = String(Ge(o, "data-cf-tabs-id", "dataCfTabsId") ?? "") || `cf-tabs-${k}`, D = va(e, m, y, v, C, F);
|
|
1241
1252
|
Z(() => {
|
|
1242
1253
|
if (t !== "code-group") return;
|
|
1243
1254
|
const u = C.current;
|
|
1244
1255
|
if (!u) return;
|
|
1245
|
-
const
|
|
1256
|
+
const x = () => {
|
|
1246
1257
|
const te = Math.max(0, u.scrollWidth - u.clientWidth);
|
|
1247
1258
|
g(te > 1 && u.scrollLeft > 1), h(te > 1 && u.scrollLeft < te - 1);
|
|
1248
1259
|
};
|
|
1249
|
-
|
|
1250
|
-
const K = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(
|
|
1260
|
+
x(), u.addEventListener("scroll", x, { passive: !0 });
|
|
1261
|
+
const K = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(x);
|
|
1251
1262
|
return K?.observe(u), () => {
|
|
1252
|
-
u.removeEventListener("scroll",
|
|
1263
|
+
u.removeEventListener("scroll", x), K?.disconnect();
|
|
1253
1264
|
};
|
|
1254
1265
|
}, [e, t]);
|
|
1255
|
-
const
|
|
1256
|
-
const
|
|
1257
|
-
!
|
|
1258
|
-
left: u * Math.max(180,
|
|
1266
|
+
const T = (u) => {
|
|
1267
|
+
const x = C.current;
|
|
1268
|
+
!x || typeof x.scrollBy != "function" || x.scrollBy({
|
|
1269
|
+
left: u * Math.max(180, x.clientWidth * 0.72),
|
|
1259
1270
|
behavior: "smooth"
|
|
1260
1271
|
});
|
|
1261
1272
|
}, G = J(o), $ = V(
|
|
@@ -1292,8 +1303,8 @@ function ie({
|
|
|
1292
1303
|
"data-cf-action": "scroll-code-tabs",
|
|
1293
1304
|
"data-cf-direction": "-1",
|
|
1294
1305
|
"aria-label": "Previous code files",
|
|
1295
|
-
hidden: !
|
|
1296
|
-
onClick: () =>
|
|
1306
|
+
hidden: !S,
|
|
1307
|
+
onClick: () => T(-1),
|
|
1297
1308
|
children: /* @__PURE__ */ l(E, { name: "previous", size: 18 })
|
|
1298
1309
|
}
|
|
1299
1310
|
) : null,
|
|
@@ -1306,8 +1317,8 @@ function ie({
|
|
|
1306
1317
|
"data-cf-action": "scroll-code-tabs",
|
|
1307
1318
|
"data-cf-direction": "1",
|
|
1308
1319
|
"aria-label": "Next code files",
|
|
1309
|
-
hidden: !
|
|
1310
|
-
onClick: () =>
|
|
1320
|
+
hidden: !M,
|
|
1321
|
+
onClick: () => T(1),
|
|
1311
1322
|
children: /* @__PURE__ */ l(E, { name: "next", size: 18 })
|
|
1312
1323
|
}
|
|
1313
1324
|
) : null
|
|
@@ -1325,16 +1336,16 @@ function ft(e) {
|
|
|
1325
1336
|
}
|
|
1326
1337
|
function Fe(e, t, a, o) {
|
|
1327
1338
|
if (!A(e)) return e;
|
|
1328
|
-
const n = e, c = O.toArray(n.props.children).filter((h) => !ft(h)), r = n.props["data-cf-file-tree-file"] !== void 0 || n.props.dataCfFileTreeFile !== void 0, i = n.props["data-cf-file-tree-branch"] !== void 0 || n.props.dataCfFileTreeBranch !== void 0,
|
|
1339
|
+
const n = e, c = O.toArray(n.props.children).filter((h) => !ft(h)), r = n.props["data-cf-file-tree-file"] !== void 0 || n.props.dataCfFileTreeFile !== void 0, i = n.props["data-cf-file-tree-branch"] !== void 0 || n.props.dataCfFileTreeBranch !== void 0, s = n.props["aria-current"] === "page" || n.props["aria-current"] === !0 || n.props["data-cf-current"] !== void 0 || n.props.dataCfCurrent !== void 0, f = i ? c.findIndex(
|
|
1329
1340
|
(h) => A(h) && Ze(h) === "button"
|
|
1330
1341
|
) : -1, b = i ? c.findIndex(
|
|
1331
1342
|
(h) => A(h) && Ze(h) === "ul"
|
|
1332
|
-
) : -1,
|
|
1343
|
+
) : -1, d = String(
|
|
1333
1344
|
n.props["data-cf-file-tree-path"] ?? n.props.dataCfFileTreePath ?? ""
|
|
1334
|
-
), y = f >= 0 ? j(c[f].props.children) : "", m =
|
|
1345
|
+
), y = f >= 0 ? j(c[f].props.children) : "", m = d || `${t}:${y.trim().toLowerCase()}`, v = f >= 0 ? c[f].props["aria-expanded"] : void 0, C = i ? a[m] ?? (v !== !1 && v !== "false") : !0, S = c.map((h, k) => {
|
|
1335
1346
|
const z = `${t}.${k}`;
|
|
1336
1347
|
if (i && k === f && A(h)) {
|
|
1337
|
-
const F = h, D = F.props.onClick,
|
|
1348
|
+
const F = h, D = F.props.onClick, T = O.toArray(F.props.children), G = T.some(
|
|
1338
1349
|
($) => A($) && ($.props["data-cf-slot"] === "folder-icon" || $.props.dataCfSlot === "folder-icon")
|
|
1339
1350
|
);
|
|
1340
1351
|
return R(F, {
|
|
@@ -1342,9 +1353,9 @@ function Fe(e, t, a, o) {
|
|
|
1342
1353
|
"data-cf-action": "toggle-file-tree",
|
|
1343
1354
|
"data-cf-file-tree-toggle": "",
|
|
1344
1355
|
"aria-expanded": String(C),
|
|
1345
|
-
children: G ?
|
|
1356
|
+
children: G ? T : [
|
|
1346
1357
|
/* @__PURE__ */ l("span", { className: "cf-file-tree-folder-icon", "data-cf-slot": "folder-icon", children: /* @__PURE__ */ l(E, { name: "folder" }) }, "folder-icon"),
|
|
1347
|
-
...
|
|
1358
|
+
...T
|
|
1348
1359
|
],
|
|
1349
1360
|
onClick: ($) => {
|
|
1350
1361
|
typeof D == "function" && D($), $.defaultPrevented || o(m, !C);
|
|
@@ -1368,17 +1379,17 @@ function Fe(e, t, a, o) {
|
|
|
1368
1379
|
return Fe(h, z, a, o);
|
|
1369
1380
|
}), g = c.some(
|
|
1370
1381
|
(h) => A(h) && (h.props["data-cf-slot"] === "file-icon" || h.props.dataCfSlot === "file-icon")
|
|
1371
|
-
),
|
|
1382
|
+
), M = r && !g ? [
|
|
1372
1383
|
/* @__PURE__ */ l("span", { className: "cf-file-tree-file-icon", "data-cf-slot": "file-icon", children: /* @__PURE__ */ l(E, { name: "file" }) }, "file-icon"),
|
|
1373
|
-
...
|
|
1374
|
-
] :
|
|
1384
|
+
...S
|
|
1385
|
+
] : S;
|
|
1375
1386
|
return R(n, {
|
|
1376
1387
|
...r || i ? {
|
|
1377
1388
|
className: V(
|
|
1378
1389
|
[
|
|
1379
1390
|
r ? "cf-file-tree-file" : "",
|
|
1380
1391
|
i ? "cf-file-tree-branch" : "",
|
|
1381
|
-
|
|
1392
|
+
s ? "cf-file-tree-current" : ""
|
|
1382
1393
|
].filter(Boolean).join(" "),
|
|
1383
1394
|
n.props.className
|
|
1384
1395
|
)
|
|
@@ -1387,16 +1398,16 @@ function Fe(e, t, a, o) {
|
|
|
1387
1398
|
"data-cf-state": C ? "expanded" : "collapsed",
|
|
1388
1399
|
"data-cf-file-tree-path": m
|
|
1389
1400
|
} : {},
|
|
1390
|
-
children:
|
|
1401
|
+
children: M
|
|
1391
1402
|
});
|
|
1392
1403
|
}
|
|
1393
1404
|
function Ae({ children: e, ...t }) {
|
|
1394
1405
|
const [a, o] = B({}), n = O.toArray(e).filter((i) => !ft(i)).map(
|
|
1395
|
-
(i,
|
|
1406
|
+
(i, s) => Fe(
|
|
1396
1407
|
i,
|
|
1397
|
-
String(
|
|
1408
|
+
String(s),
|
|
1398
1409
|
a,
|
|
1399
|
-
(f, b) => o((
|
|
1410
|
+
(f, b) => o((d) => ({ ...d, [f]: b }))
|
|
1400
1411
|
)
|
|
1401
1412
|
), c = O.map(
|
|
1402
1413
|
n,
|
|
@@ -1452,7 +1463,7 @@ function Ca(e) {
|
|
|
1452
1463
|
};
|
|
1453
1464
|
}
|
|
1454
1465
|
function De({ children: e, onToggle: t, ...a }) {
|
|
1455
|
-
const o = a.open === !0, [n, c] = B(o), [r, i] = B(!1),
|
|
1466
|
+
const o = a.open === !0, [n, c] = B(o), [r, i] = B(!1), s = _(null), { summary: f, content: b } = Ca(e), d = A(f) ? (() => {
|
|
1456
1467
|
const m = f, v = m.props.onClick;
|
|
1457
1468
|
return R(m, {
|
|
1458
1469
|
children: /* @__PURE__ */ L(U, { children: [
|
|
@@ -1461,8 +1472,8 @@ function De({ children: e, onToggle: t, ...a }) {
|
|
|
1461
1472
|
] }),
|
|
1462
1473
|
onClick: (C) => {
|
|
1463
1474
|
if (v?.(C), C.defaultPrevented) return;
|
|
1464
|
-
const
|
|
1465
|
-
queueMicrotask(() => c(
|
|
1475
|
+
const S = C.currentTarget.closest("details");
|
|
1476
|
+
queueMicrotask(() => c(S?.open ?? !1));
|
|
1466
1477
|
}
|
|
1467
1478
|
});
|
|
1468
1479
|
})() : f;
|
|
@@ -1470,11 +1481,11 @@ function De({ children: e, onToggle: t, ...a }) {
|
|
|
1470
1481
|
i(!0);
|
|
1471
1482
|
}, []);
|
|
1472
1483
|
const y = /* @__PURE__ */ L(U, { children: [
|
|
1473
|
-
|
|
1484
|
+
d,
|
|
1474
1485
|
/* @__PURE__ */ l(
|
|
1475
1486
|
"div",
|
|
1476
1487
|
{
|
|
1477
|
-
ref:
|
|
1488
|
+
ref: s,
|
|
1478
1489
|
className: "cf-details-content",
|
|
1479
1490
|
"data-cf-slot": "content",
|
|
1480
1491
|
inert: r && !n ? !0 : void 0,
|
|
@@ -1514,22 +1525,22 @@ function Re({ children: e, ...t }) {
|
|
|
1514
1525
|
function wa({
|
|
1515
1526
|
anchor: e,
|
|
1516
1527
|
anchorLabel: t,
|
|
1517
|
-
copyFailureLabel: a =
|
|
1528
|
+
copyFailureLabel: a = I.copyFailed
|
|
1518
1529
|
}) {
|
|
1519
1530
|
const [o, n] = B("idle");
|
|
1520
1531
|
Z(() => {
|
|
1521
1532
|
if (o === "idle") return;
|
|
1522
|
-
const
|
|
1523
|
-
return () => clearTimeout(
|
|
1533
|
+
const s = setTimeout(() => n("idle"), ct);
|
|
1534
|
+
return () => clearTimeout(s);
|
|
1524
1535
|
}, [o]);
|
|
1525
1536
|
const c = async () => {
|
|
1526
|
-
const
|
|
1537
|
+
const s = typeof window > "u" ? e : `${window.location.origin}${window.location.pathname}${window.location.search}${e}`;
|
|
1527
1538
|
try {
|
|
1528
|
-
n(await et(
|
|
1539
|
+
n(await et(s) ? "success" : "error");
|
|
1529
1540
|
} catch {
|
|
1530
1541
|
n("error");
|
|
1531
1542
|
}
|
|
1532
|
-
}, r = t ||
|
|
1543
|
+
}, r = t || I.copySectionLink, i = o === "success" ? `${r} ✓` : o === "error" ? a : r;
|
|
1533
1544
|
return /* @__PURE__ */ L(
|
|
1534
1545
|
"button",
|
|
1535
1546
|
{
|
|
@@ -1558,12 +1569,12 @@ function ka({
|
|
|
1558
1569
|
copyFailureLabel: c,
|
|
1559
1570
|
children: r,
|
|
1560
1571
|
className: i,
|
|
1561
|
-
...
|
|
1572
|
+
...s
|
|
1562
1573
|
}) {
|
|
1563
|
-
const f = t ?? `h${e}`, b = i?.split(/\s+/).filter(Boolean) ?? [],
|
|
1564
|
-
|
|
1574
|
+
const f = t ?? `h${e}`, b = i?.split(/\s+/).filter(Boolean) ?? [], d = b.some((v) => v === "sr-only" || v === "cf-sr-only"), y = e > 1 && !!o && !d;
|
|
1575
|
+
d && !b.includes("cf-sr-only") && b.push("cf-sr-only"), y && b.push("cf-heading-with-anchor");
|
|
1565
1576
|
const m = b.join(" ");
|
|
1566
|
-
return /* @__PURE__ */ L(f, { ...
|
|
1577
|
+
return /* @__PURE__ */ L(f, { ...s, id: a, className: m || void 0, children: [
|
|
1567
1578
|
r,
|
|
1568
1579
|
y && o ? /* @__PURE__ */ l(
|
|
1569
1580
|
"span",
|
|
@@ -1571,8 +1582,8 @@ function ka({
|
|
|
1571
1582
|
className: "cf-anchor-island",
|
|
1572
1583
|
"data-cf-behavior": "heading",
|
|
1573
1584
|
"data-cf-anchor": o,
|
|
1574
|
-
"data-cf-anchor-label": n ||
|
|
1575
|
-
"data-cf-copy-failure-label": c ||
|
|
1585
|
+
"data-cf-anchor-label": n || I.copySectionLink,
|
|
1586
|
+
"data-cf-copy-failure-label": c || I.copyFailed,
|
|
1576
1587
|
children: /* @__PURE__ */ l(
|
|
1577
1588
|
wa,
|
|
1578
1589
|
{
|
|
@@ -1621,7 +1632,7 @@ function pt(e, t, a) {
|
|
|
1621
1632
|
sortLabel: p(t, "data-cf-sort-label", "dataCfSortLabel") || void 0
|
|
1622
1633
|
};
|
|
1623
1634
|
if (e === "image") {
|
|
1624
|
-
const n = qe(a, "img"), c = qe(a, "figcaption"), r = n ? fe(n.props, "width") : void 0, i = n ? fe(n.props, "height") : void 0,
|
|
1635
|
+
const n = qe(a, "img"), c = qe(a, "figcaption"), r = n ? fe(n.props, "width") : void 0, i = n ? fe(n.props, "height") : void 0, s = n ? fe(n.props, "loading") : void 0;
|
|
1625
1636
|
return {
|
|
1626
1637
|
...o,
|
|
1627
1638
|
src: n && p(n.props, "src") || void 0,
|
|
@@ -1630,7 +1641,7 @@ function pt(e, t, a) {
|
|
|
1630
1641
|
title: n && p(n.props, "title") || void 0,
|
|
1631
1642
|
width: typeof r == "string" || typeof r == "number" ? r : void 0,
|
|
1632
1643
|
height: typeof i == "string" || typeof i == "number" ? i : void 0,
|
|
1633
|
-
loading:
|
|
1644
|
+
loading: s === "eager" || s === "lazy" ? s : void 0,
|
|
1634
1645
|
srcSet: n && p(n.props, "srcSet", "srcset") || void 0,
|
|
1635
1646
|
sizes: n && p(n.props, "sizes") || void 0,
|
|
1636
1647
|
zoomLabel: p(t, "data-cf-zoom-label", "dataCfZoomLabel") || void 0,
|
|
@@ -1700,8 +1711,8 @@ function q(e, t) {
|
|
|
1700
1711
|
function bt(e, t, a, o, n, c) {
|
|
1701
1712
|
const r = P(t.className, Na(e, o)), i = ne(n, e);
|
|
1702
1713
|
if (i) {
|
|
1703
|
-
const
|
|
1704
|
-
return w(i, mt(e,
|
|
1714
|
+
const s = pt(e, { ...t, className: r }, a);
|
|
1715
|
+
return w(i, mt(e, s, c));
|
|
1705
1716
|
}
|
|
1706
1717
|
if (e === "file-tree") return w(Ae, { ...t, className: r, children: a });
|
|
1707
1718
|
if (e === "gallery") return w(Ie, { ...t, className: r, children: a });
|
|
@@ -1724,18 +1735,18 @@ function mt(e, t, a) {
|
|
|
1724
1735
|
}
|
|
1725
1736
|
function N(e, t, a, o, n) {
|
|
1726
1737
|
const c = t.replace(/[A-Z]/g, (i) => `-${i.toLowerCase()}`);
|
|
1727
|
-
function r({ children: i, node:
|
|
1728
|
-
const b = q(o, e) ?? e,
|
|
1738
|
+
function r({ children: i, node: s, ...f }) {
|
|
1739
|
+
const b = q(o, e) ?? e, d = ke(f, n);
|
|
1729
1740
|
if (t === "heading" && /^h[1-6]$/.test(e)) {
|
|
1730
1741
|
const y = f["data-cf-anchor"] ?? f.dataCfAnchor, m = f["data-cf-anchor-label"] ?? f.dataCfAnchorLabel, v = f["data-cf-copy-failure-label"] ?? f.dataCfCopyFailureLabel;
|
|
1731
1742
|
return w(ka, {
|
|
1732
|
-
...
|
|
1743
|
+
...d,
|
|
1733
1744
|
as: b,
|
|
1734
1745
|
level: Number(e.slice(1)),
|
|
1735
1746
|
anchor: typeof y == "string" ? y : void 0,
|
|
1736
1747
|
anchorLabel: typeof m == "string" ? m : void 0,
|
|
1737
1748
|
copyFailureLabel: typeof v == "string" ? v : void 0,
|
|
1738
|
-
className: P(
|
|
1749
|
+
className: P(d.className, a[t]),
|
|
1739
1750
|
"data-cf-element": c,
|
|
1740
1751
|
children: i
|
|
1741
1752
|
});
|
|
@@ -1743,8 +1754,8 @@ function N(e, t, a, o, n) {
|
|
|
1743
1754
|
return w(
|
|
1744
1755
|
b,
|
|
1745
1756
|
{
|
|
1746
|
-
...
|
|
1747
|
-
className: P(
|
|
1757
|
+
...d,
|
|
1758
|
+
className: P(d.className, a[t]),
|
|
1748
1759
|
"data-cf-element": c
|
|
1749
1760
|
},
|
|
1750
1761
|
i
|
|
@@ -1761,7 +1772,7 @@ function Sa(e, t) {
|
|
|
1761
1772
|
className: typeof c.className == "string" ? c.className : void 0,
|
|
1762
1773
|
"aria-hidden": c["aria-hidden"]
|
|
1763
1774
|
});
|
|
1764
|
-
const { ["data-cf-icon"]:
|
|
1775
|
+
const { ["data-cf-icon"]: s, dataCfIcon: f, ...b } = c;
|
|
1765
1776
|
return w(q(t, "svg") ?? "svg", b, o);
|
|
1766
1777
|
};
|
|
1767
1778
|
}
|
|
@@ -1777,9 +1788,9 @@ function xa(e, t) {
|
|
|
1777
1788
|
}
|
|
1778
1789
|
function Ia(e, t, a) {
|
|
1779
1790
|
return function({ children: n, node: c, ...r }) {
|
|
1780
|
-
const i = ge(r),
|
|
1791
|
+
const i = ge(r), s = i ? ne(t, i) : void 0;
|
|
1781
1792
|
if (i === "callout")
|
|
1782
|
-
return w(
|
|
1793
|
+
return w(s ?? be, {
|
|
1783
1794
|
...r,
|
|
1784
1795
|
className: P(r.className, e.callout),
|
|
1785
1796
|
children: n
|
|
@@ -1789,7 +1800,7 @@ function Ia(e, t, a) {
|
|
|
1789
1800
|
...r,
|
|
1790
1801
|
className: P(r.className, e.tabs),
|
|
1791
1802
|
kind: i,
|
|
1792
|
-
component:
|
|
1803
|
+
component: s,
|
|
1793
1804
|
children: n
|
|
1794
1805
|
});
|
|
1795
1806
|
const f = i && bt(i, { ...r, node: c }, n, e, t, a);
|
|
@@ -1805,31 +1816,31 @@ function Ia(e, t, a) {
|
|
|
1805
1816
|
}
|
|
1806
1817
|
function ye(e, t, a, o) {
|
|
1807
1818
|
return function({ children: c, node: r, ...i }) {
|
|
1808
|
-
const
|
|
1809
|
-
if (
|
|
1819
|
+
const s = ge(i), f = s ? ne(a, s) : void 0;
|
|
1820
|
+
if (s === "callout")
|
|
1810
1821
|
return w(f ?? be, {
|
|
1811
1822
|
...i,
|
|
1812
1823
|
className: P(i.className, t.callout),
|
|
1813
1824
|
children: c
|
|
1814
1825
|
});
|
|
1815
|
-
if (
|
|
1826
|
+
if (s === "tabs" || s === "code-group")
|
|
1816
1827
|
return w(ie, {
|
|
1817
1828
|
...i,
|
|
1818
1829
|
className: P(i.className, t.tabs),
|
|
1819
|
-
kind:
|
|
1830
|
+
kind: s,
|
|
1820
1831
|
component: f,
|
|
1821
1832
|
children: c
|
|
1822
1833
|
});
|
|
1823
|
-
const b =
|
|
1834
|
+
const b = s && bt(s, { ...i, node: r }, c, t, a, o);
|
|
1824
1835
|
if (b) return b;
|
|
1825
|
-
const
|
|
1836
|
+
const d = e === "section" && (i["data-cf-element"] === "footnotes" || i.dataCfElement === "footnotes");
|
|
1826
1837
|
return w(
|
|
1827
1838
|
q(a, e) ?? e,
|
|
1828
1839
|
{
|
|
1829
1840
|
...i,
|
|
1830
|
-
className:
|
|
1831
|
-
...
|
|
1832
|
-
...
|
|
1841
|
+
className: d ? P(i.className, t.footnotes) : i.className,
|
|
1842
|
+
...d ? { "data-cf-element": "footnotes" } : {},
|
|
1843
|
+
...s ? { "data-cf-component": s } : {}
|
|
1833
1844
|
},
|
|
1834
1845
|
c
|
|
1835
1846
|
);
|
|
@@ -1841,12 +1852,12 @@ function Ma(e, t, a) {
|
|
|
1841
1852
|
if (i && ["code-block", "table", "image", "terminal"].includes(i)) {
|
|
1842
1853
|
const f = e[i === "code-block" ? "codeBlock" : i], b = ne(t, i);
|
|
1843
1854
|
if (b) {
|
|
1844
|
-
const
|
|
1855
|
+
const d = pt(
|
|
1845
1856
|
i,
|
|
1846
1857
|
{ ...r, className: P(r.className, f) },
|
|
1847
1858
|
n
|
|
1848
1859
|
);
|
|
1849
|
-
return w(b, mt(i,
|
|
1860
|
+
return w(b, mt(i, d, a));
|
|
1850
1861
|
}
|
|
1851
1862
|
return i === "code-block" ? w(ve, {
|
|
1852
1863
|
...r,
|
|
@@ -2062,7 +2073,7 @@ function Pa(e, t) {
|
|
|
2062
2073
|
return t === void 0 ? void 0 : `${t.length}:${t}\0${e}`;
|
|
2063
2074
|
}
|
|
2064
2075
|
async function Oa(e, t, a) {
|
|
2065
|
-
const o = () => import("./prepareMarkdown-
|
|
2076
|
+
const o = () => import("./prepareMarkdown-DPMq7203.js").then((i) => i.b).then(({ prepareMarkdown: i }) => i(e, t)), n = Pa(e, a);
|
|
2066
2077
|
if (n === void 0) return o();
|
|
2067
2078
|
const c = H.get(n);
|
|
2068
2079
|
if (c)
|
|
@@ -2086,28 +2097,28 @@ function Ua({
|
|
|
2086
2097
|
retainPrevious: c = !1,
|
|
2087
2098
|
...r
|
|
2088
2099
|
}) {
|
|
2089
|
-
const i = le(() => Da(t), [t]),
|
|
2100
|
+
const i = le(() => Da(t), [t]), s = i ?? t ?? null, f = _(a);
|
|
2090
2101
|
f.current = a;
|
|
2091
2102
|
const b = _(o);
|
|
2092
2103
|
b.current = o;
|
|
2093
|
-
const [
|
|
2104
|
+
const [d, y] = B({});
|
|
2094
2105
|
Z(() => {
|
|
2095
2106
|
let v = !0;
|
|
2096
|
-
return c || y({ source: e, optionsIdentity:
|
|
2097
|
-
v && y({ source: e, optionsIdentity:
|
|
2107
|
+
return c || y({ source: e, optionsIdentity: s }), Oa(e, t, i).then((C) => {
|
|
2108
|
+
v && y({ source: e, optionsIdentity: s, prepared: C });
|
|
2098
2109
|
}).catch((C) => {
|
|
2099
|
-
v && (f.current?.(C), c || y({ source: e, optionsIdentity:
|
|
2110
|
+
v && (f.current?.(C), c || y({ source: e, optionsIdentity: s }));
|
|
2100
2111
|
}), () => {
|
|
2101
2112
|
v = !1;
|
|
2102
2113
|
};
|
|
2103
|
-
}, [e,
|
|
2104
|
-
const m =
|
|
2114
|
+
}, [e, s, c]);
|
|
2115
|
+
const m = d.source === e && Object.is(d.optionsIdentity, s) && !!d.prepared;
|
|
2105
2116
|
return Z(() => {
|
|
2106
2117
|
m && b.current?.();
|
|
2107
|
-
}, [m,
|
|
2118
|
+
}, [m, d.prepared]), m ? d.prepared ? /* @__PURE__ */ l(Xe, { document: d.prepared.document, "data-cf-runtime": "react", ...r }) : n : c && d.prepared ? /* @__PURE__ */ l(Xe, { document: d.prepared.document, "data-cf-runtime": "react", ...r }) : n;
|
|
2108
2119
|
}
|
|
2109
2120
|
export {
|
|
2110
|
-
|
|
2121
|
+
I as D,
|
|
2111
2122
|
Ua as M,
|
|
2112
2123
|
za as a,
|
|
2113
2124
|
Xe as b,
|