@aiquants/markdown-explorer 0.37.0 → 0.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +41 -1
  2. package/README.md +7 -3
  3. package/dist/{EditSurface-BQgwRUrR.js → EditSurface-BTrQ1viw.js} +3 -3
  4. package/dist/{EditSurface-Xvk5wZu7.cjs → EditSurface-Dis52Iwq.cjs} +1 -1
  5. package/dist/{ExplorerSplit-C_3FChSt.cjs → ExplorerSplit-13nPIuf0.cjs} +1 -1
  6. package/dist/{ExplorerSplit-C_kaEnyM.js → ExplorerSplit-Dq7HfNre.js} +4 -4
  7. package/dist/{MultiLayout-DROxkTdD.js → MultiLayout-1rKm2Hzt.js} +3 -3
  8. package/dist/{MultiLayout-BZNj1GYo.cjs → MultiLayout-B7RvBpCj.cjs} +1 -1
  9. package/dist/{NativeScrollBar-DvdOpwIW.js → NativeScrollBar-Bg05yuzM.js} +2 -2
  10. package/dist/{NativeScrollBar-BDF9A1sc.cjs → NativeScrollBar-D63-6AL1.cjs} +1 -1
  11. package/dist/{TreeLayout-Cc-ykewY.js → TreeLayout-9eEP62LF.js} +3 -3
  12. package/dist/{TreeLayout-D_DYV64_.cjs → TreeLayout-CNE0XkWz.cjs} +1 -1
  13. package/dist/core/config.d.cts +3 -0
  14. package/dist/core/config.d.ts +3 -0
  15. package/dist/{explorerCore-DivWkFQF.cjs → explorerCore-5qeC3-gt.cjs} +1 -1
  16. package/dist/{explorerCore-EkU0mwdW.js → explorerCore-GCqatHTO.js} +1 -1
  17. package/dist/{index-dtjghDWY.js → index-C52Nj37x.js} +1126 -1125
  18. package/dist/index-_XNluAcx.cjs +18 -0
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.js +2 -2
  21. package/dist/{location-Dh6K-y7w.js → location-CJvL6JNs.js} +248 -243
  22. package/dist/location-DOIG84V9.cjs +1 -0
  23. package/dist/{merge-BCFCL1cF.cjs → merge-CKpFyeqR.cjs} +1 -1
  24. package/dist/{merge-DC_h-t31.js → merge-CnrrjXmc.js} +1 -1
  25. package/dist/server.cjs +1 -1
  26. package/dist/server.js +3 -3
  27. package/dist/serverCore.cjs +1 -1
  28. package/dist/serverCore.js +3 -3
  29. package/dist/{tapScrollCircle-DVNlszeF.cjs → tapScrollCircle-6etmzCb7.cjs} +1 -1
  30. package/dist/{tapScrollCircle-CqMZzWjo.js → tapScrollCircle-D-Lgzdxx.js} +1 -1
  31. package/dist/{useSplitPersistence-BUa_KMsV.cjs → useSplitPersistence-CD_n1ivo.cjs} +1 -1
  32. package/dist/{useSplitPersistence-pnb21dsr.js → useSplitPersistence-tbTu3P5m.js} +1 -1
  33. package/docs/behavior/dom-hooks.md +1 -1
  34. package/docs/behavior/security.md +1 -1
  35. package/package.json +5 -5
  36. package/dist/index-BmOU3xcK.cjs +0 -18
  37. package/dist/location-DrOP6t1F.cjs +0 -1
@@ -1,36 +1,36 @@
1
1
  /*! Bundled third-party code: @heroicons/react 2.2.0 (MIT, ./licenses/@heroicons/react/LICENSE) */
2
2
  import { d as G, i as et } from "./describeValue-CLlVRO8d.js";
3
- import { jsx as u, jsxs as j, Fragment as Oe } from "react/jsx-runtime";
3
+ import { jsx as d, jsxs as j, Fragment as Oe } from "react/jsx-runtime";
4
4
  import * as T from "react";
5
- import { createContext as ge, use as se, useMemo as Q, useSyncExternalStore as oe, useLayoutEffect as K, useRef as z, useCallback as _, useId as Le, useEffect as ne, Component as Mr, Suspense as tt, lazy as hn, useState as V, useEffectEvent as pe, startTransition as Qo, useImperativeHandle as ea } from "react";
6
- import { useParams as ta, useSearchParams as na, matchPath as ra, useBlocker as oa, useNavigate as aa, Link as ia, NavigationType as sa, useHref as at, useLocation as pn, useRevalidator as la } from "react-router";
7
- import { h as Or, L as ca, E as Lr, m as Ar, M as da, x as Cn, O as ua, y as fa, Q as ma, R as Ye, e as xe, d as ha, T as pa, k as wa, U as ga, V as va, W as Rn, X as ya, Y as Mn, Z as ba, j as ka, w as Ea, _ as Sa, $ as xa } from "./location-Dh6K-y7w.js";
5
+ import { createContext as ge, use as se, useMemo as Q, useSyncExternalStore as oe, useLayoutEffect as K, useRef as z, useCallback as _, useId as Le, useEffect as ne, Component as Or, Suspense as tt, lazy as hn, useState as V, useEffectEvent as pe, startTransition as ea, useImperativeHandle as ta } from "react";
6
+ import { useParams as na, useSearchParams as ra, matchPath as oa, useBlocker as aa, useNavigate as ia, Link as sa, NavigationType as la, useHref as at, useLocation as pn, useRevalidator as ca } from "react-router";
7
+ import { h as Lr, L as da, E as Ar, m as Dr, M as ua, x as Cn, O as fa, y as ma, Q as ha, R as Ye, e as xe, d as pa, T as wa, k as ga, U as va, V as ya, W as Rn, X as ba, Y as Mn, Z as ka, j as Ea, w as Sa, _ as xa, $ as Ta } from "./location-CJvL6JNs.js";
8
8
  import { SPREADSHEET_BLOCK_LABEL_PLACEHOLDERS as On, SPREADSHEET_BLOCK_LABEL_CATALOGS as xt } from "@aiquants/markdown/code-blocks";
9
- import { J as ae, l as ve, i as Ta, W as Lt, X as Ca, Y as Ra, Z as qt, g as $e, I as Ma, _ as Oa, k as La, $ as Aa, a0 as Da, a1 as Na, a2 as Ia, a3 as Pa, a4 as Fa, H as $a, a5 as Ln, F as _a, a6 as qa, a7 as Ba, a8 as Ua, O as Ha, G as za, a9 as ja, aa as Va, ab as Za, C as Bt } from "./ownUrls-DD0cSCsF.js";
10
- import { HostedScrollArea as An, SpreadsheetBlock as Ga, useMarkdownToolbarState as Wa, MarkdownViewer as Dr } from "@aiquants/markdown";
11
- import { SOURCE_LINES_ATTRIBUTE as Nr, parseSourceLines as Ka } from "@aiquants/markdown/source-lines";
12
- import { iterateTsvRows as Xa, iterateTsvPrefixRows as Ya, serializeTsv as Ja } from "@aiquants/spreadsheet/tsv";
9
+ import { J as ae, l as ve, i as Ca, W as Lt, X as Ra, Y as Ma, Z as qt, g as $e, I as Oa, _ as La, k as Aa, $ as Da, a0 as Na, a1 as Ia, a2 as Pa, a3 as Fa, a4 as $a, H as _a, a5 as Ln, F as qa, a6 as Ba, a7 as Ua, a8 as Ha, O as za, G as ja, a9 as Va, aa as Za, ab as Ga, C as Bt } from "./ownUrls-DD0cSCsF.js";
10
+ import { HostedScrollArea as An, SpreadsheetBlock as Wa, useMarkdownToolbarState as Ka, MarkdownViewer as Nr } from "@aiquants/markdown";
11
+ import { SOURCE_LINES_ATTRIBUTE as Ir, parseSourceLines as Xa } from "@aiquants/markdown/source-lines";
12
+ import { iterateTsvRows as Ya, iterateTsvPrefixRows as Ja, serializeTsv as Qa } from "@aiquants/spreadsheet/tsv";
13
13
  import { SPREADSHEET_MAX_OPERATION_CELLS as Dn } from "@aiquants/spreadsheet/view";
14
- import { DEFAULT_CONTENT_ALIGN as Qa } from "@aiquants/markdown/viewer-settings";
15
- import { w as nn, r as rn, a as ei, b as Nn, s as Ze, c as ti } from "./storage-D1uSw-xj.js";
16
- import { MarkdownResourceExhaustedError as ni, MarkdownConversionTimeoutError as ri, MarkdownConversionError as oi } from "@aiquants/markdown/converter";
17
- import { createShouldRevalidate as ai } from "@aiquants/route-revalidation";
18
- const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
14
+ import { DEFAULT_CONTENT_ALIGN as ei } from "@aiquants/markdown/viewer-settings";
15
+ import { w as nn, r as rn, a as ti, b as Nn, s as Ze, c as ni } from "./storage-D1uSw-xj.js";
16
+ import { MarkdownResourceExhaustedError as ri, MarkdownConversionTimeoutError as oi, MarkdownConversionError as ai } from "@aiquants/markdown/converter";
17
+ import { createShouldRevalidate as ii } from "@aiquants/route-revalidation";
18
+ const si = Object.freeze(["reload", "notify"]), li = Object.freeze([`
19
19
  `, `\r
20
- `]), li = Object.freeze(["fetch", "persistSettings", "subscribeHostChanges", "onDraftChange"]), ci = Object.freeze(["guardUnload", "confirmUnversionedSaves"]), di = (e, t, n) => {
20
+ `]), ci = Object.freeze(["fetch", "persistSettings", "subscribeHostChanges", "onDraftChange"]), di = Object.freeze(["guardUnload", "confirmUnversionedSaves"]), ui = (e, t, n) => {
21
21
  if (!(t === void 0 || typeof t == "string" && n.includes(t)))
22
22
  throw new RangeError(`[markdown-explorer] ${e} must be ${n.map(G).join(" or ")}; got ${G(t)}`);
23
- }, ui = (e) => {
23
+ }, fi = (e) => {
24
24
  if (typeof e.accessFailure != "function") throw new TypeError(`[markdown-explorer] accessFailure must be the host's access failure presenter (a function); got ${G(e.accessFailure)}`);
25
- for (const n of li) {
25
+ for (const n of ci) {
26
26
  const r = e[n];
27
27
  if (r !== void 0 && typeof r != "function") throw new TypeError(`[markdown-explorer] ${n} must be a function; got ${G(r)}`);
28
28
  }
29
- for (const n of ci) {
29
+ for (const n of di) {
30
30
  const r = e[n];
31
31
  if (r !== void 0 && typeof r != "boolean") throw new TypeError(`[markdown-explorer] ${n} must be a boolean; got ${G(r)}`);
32
32
  }
33
- di("hostChangePolicy", e.hostChangePolicy, ii);
33
+ ui("hostChangePolicy", e.hostChangePolicy, si);
34
34
  const { paletteKey: t } = e;
35
35
  if (t !== void 0) {
36
36
  if (typeof t != "string") throw new TypeError(`[markdown-explorer] paletteKey must be a non-empty string; got ${G(t)}`);
@@ -42,15 +42,15 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
42
42
  if (typeof n != "string") throw new TypeError(`[markdown-explorer] ${e} must hold strings only; got ${G(n)}`);
43
43
  if (n === "") throw new RangeError(`[markdown-explorer] ${e} must hold non-empty strings; got an empty string`);
44
44
  }
45
- }, fi = (e, t) => {
45
+ }, mi = (e, t) => {
46
46
  on(`${e}'s paths`, t);
47
- }, mi = (e) => {
47
+ }, hi = (e) => {
48
48
  if (!et(e)) throw new TypeError(`[markdown-explorer] a host change must be a plain object; got ${G(e)}`);
49
49
  on("a host change's sourceIds", e.sourceIds), on("a host change's paths", e.paths);
50
50
  }, In = (e, t) => {
51
51
  if (typeof t != "string") throw new TypeError(`[markdown-explorer] restoreDrafts takes ${e} as a string; got ${G(t)}`);
52
52
  if (t.includes("\r")) throw new RangeError(`[markdown-explorer] restoreDrafts takes ${e} with its lines ending in "\\n" alone; got a text with "\\r"`);
53
- }, hi = (e) => {
53
+ }, pi = (e) => {
54
54
  if (!Array.isArray(e)) throw new TypeError(`[markdown-explorer] restoreDrafts takes an array of drafts; got ${G(e)}`);
55
55
  const t = /* @__PURE__ */ new Set();
56
56
  for (const n of e) {
@@ -61,18 +61,18 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
61
61
  if (t.has(r)) throw new RangeError(`[markdown-explorer] restoreDrafts takes one draft per path; got ${G(r)} twice`);
62
62
  if (t.add(r), !et(o)) throw new TypeError(`[markdown-explorer] restoreDrafts takes a draft's base as a plain object; got ${G(o)}`);
63
63
  if (In("base.text", o.text), o.version !== null && typeof o.version != "string") throw new TypeError(`[markdown-explorer] restoreDrafts takes base.version as a string or null; got ${G(o.version)}`);
64
- if (In("draft", n.draft), !si.includes(a)) throw new RangeError(`[markdown-explorer] restoreDrafts takes lineEnding as "\\n" or "\\r\\n"; got ${G(a)}`);
64
+ if (In("draft", n.draft), !li.includes(a)) throw new RangeError(`[markdown-explorer] restoreDrafts takes lineEnding as "\\n" or "\\r\\n"; got ${G(a)}`);
65
65
  }
66
- }, pi = (e) => {
66
+ }, wi = (e) => {
67
67
  if (typeof e != "string") throw new TypeError(`[markdown-explorer] announce takes a string; got ${G(e)}`);
68
68
  if (e === "") throw new RangeError("[markdown-explorer] announce takes a non-empty string; got an empty string");
69
- }, wi = (e) => {
69
+ }, gi = (e) => {
70
70
  if (!et(e)) throw new TypeError(`[markdown-explorer] reportMediaFailure takes a plain object; got ${G(e)}`);
71
71
  const { url: t, final: n } = e;
72
72
  if (typeof t != "string") throw new TypeError(`[markdown-explorer] reportMediaFailure takes url as a string; got ${G(t)}`);
73
73
  if (t === "") throw new RangeError("[markdown-explorer] reportMediaFailure takes a non-empty url; got an empty string");
74
74
  if (typeof n != "boolean") throw new TypeError(`[markdown-explorer] reportMediaFailure takes final as a boolean; got ${G(n)}`);
75
- }, Pn = Object.freeze(["en", "ja"]), gi = "en", wn = (e) => `viewerSpreadsheet${e.charAt(0).toUpperCase()}${e.slice(1)}`, Ir = Object.freeze(Object.keys(xt.en)), Pr = (e) => Object.fromEntries(Ir.map((t) => [wn(t), xt[e][t].text])), vi = Object.freeze({
75
+ }, Pn = Object.freeze(["en", "ja"]), vi = "en", wn = (e) => `viewerSpreadsheet${e.charAt(0).toUpperCase()}${e.slice(1)}`, Pr = Object.freeze(Object.keys(xt.en)), Fr = (e) => Object.fromEntries(Pr.map((t) => [wn(t), xt[e][t].text])), yi = Object.freeze({
76
76
  panelMoved: Object.freeze(["title", "column", "position"]),
77
77
  panelMoveUnavailable: Object.freeze(["title", "move"]),
78
78
  panelDragStarted: Object.freeze(["title"]),
@@ -82,9 +82,9 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
82
82
  panelGroupMaximumInsufficientDetail: Object.freeze(["total", "needed"]),
83
83
  viewerSvgImageSourceRegion: Object.freeze(["name"]),
84
84
  viewerSvgImageFullscreenDialog: Object.freeze(["name"]),
85
- ...Object.fromEntries(Ir.filter((e) => On[e].length > 0).map((e) => [wn(e), On[e]]))
86
- }), yi = /\{(\w+)\}|[{}]/gu, Fr = {
87
- ...Pr("en"),
85
+ ...Object.fromEntries(Pr.filter((e) => On[e].length > 0).map((e) => [wn(e), On[e]]))
86
+ }), bi = /\{(\w+)\}|[{}]/gu, $r = {
87
+ ...Fr("en"),
88
88
  explorerRegion: "Explorer",
89
89
  sourceLabel: "Source",
90
90
  refreshTreeLabel: "Refresh tree",
@@ -343,9 +343,9 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
343
343
  viewerMermaidModeNone: "No interaction",
344
344
  viewerMermaidModeZoom: "Zoom only",
345
345
  viewerMermaidModePan: "Pan only (drag)",
346
- viewerMermaidModePanShift: "Pan only (Shift+drag)",
346
+ viewerMermaidModePanShift: "Pan only (modifier+drag)",
347
347
  viewerMermaidModeBoth: "Zoom and pan (drag)",
348
- viewerMermaidModeBothShift: "Zoom and pan (Shift+drag)",
348
+ viewerMermaidModeBothShift: "Zoom and pan (modifier+drag)",
349
349
  viewerMermaidModeNoneTouch: "No interaction (a finger scrolls the page)",
350
350
  viewerMermaidModeZoomTouch: "Zoom only (two fingers)",
351
351
  viewerMermaidModePanTouch: "Pan only (one-finger drag while the diagram overflows)",
@@ -465,8 +465,8 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
465
465
  panelGroupMinimumExceededDetail: "Min required: {required}px | Available: {available}px",
466
466
  panelGroupMaximumInsufficientSummary: "Layout unavailable: panels cannot fill the container with their maximum sizes.",
467
467
  panelGroupMaximumInsufficientDetail: "Max total: {total}px | Needed: {needed}px"
468
- }, bi = {
469
- ...Pr("ja"),
468
+ }, ki = {
469
+ ...Fr("ja"),
470
470
  explorerRegion: "エクスプローラー",
471
471
  sourceLabel: "ソース",
472
472
  refreshTreeLabel: "ツリーを更新",
@@ -725,9 +725,9 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
725
725
  viewerMermaidModeNone: "操作なし",
726
726
  viewerMermaidModeZoom: "拡大縮小のみ",
727
727
  viewerMermaidModePan: "移動のみ (左ドラッグ)",
728
- viewerMermaidModePanShift: "移動のみ (Shift+ドラッグ)",
728
+ viewerMermaidModePanShift: "移動のみ (修飾キー+ドラッグ)",
729
729
  viewerMermaidModeBoth: "拡大縮小+移動 (左ドラッグ)",
730
- viewerMermaidModeBothShift: "拡大縮小+移動 (Shift+ドラッグ)",
730
+ viewerMermaidModeBothShift: "拡大縮小+移動 (修飾キー+ドラッグ)",
731
731
  viewerMermaidModeNoneTouch: "操作なし (指はページをスクロール)",
732
732
  viewerMermaidModeZoomTouch: "拡大縮小のみ (2 本指)",
733
733
  viewerMermaidModePanTouch: "移動のみ (はみ出す図を 1 本指でドラッグ)",
@@ -847,15 +847,15 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
847
847
  panelGroupMinimumExceededDetail: "必要な最小: {required}px | 使える長さ: {available}px",
848
848
  panelGroupMaximumInsufficientSummary: "レイアウトを表示できません: パネルを最大の大きさにしても枠を満たせません。",
849
849
  panelGroupMaximumInsufficientDetail: "最大の合計: {total}px | 必要な長さ: {needed}px"
850
- }, ki = Object.freeze({
851
- en: Object.freeze(Fr),
852
- ja: Object.freeze(bi)
853
- }), $r = Object.freeze(Object.keys(Fr)), Ei = new Set($r), Si = (e) => Ei.has(e), _r = (e) => {
854
- if (e === void 0) return gi;
850
+ }, Ei = Object.freeze({
851
+ en: Object.freeze($r),
852
+ ja: Object.freeze(ki)
853
+ }), _r = Object.freeze(Object.keys($r)), Si = new Set(_r), xi = (e) => Si.has(e), qr = (e) => {
854
+ if (e === void 0) return vi;
855
855
  if (Pn.includes(e)) return e;
856
856
  throw new RangeError(`[markdown-explorer] locale is the UI language (${Pn.map(G).join(" or ")}), not a BCP 47 tag; got ${G(e)}`);
857
857
  }, Fn = (e, t) => {
858
- const n = ki[_r(e)];
858
+ const n = Ei[qr(e)];
859
859
  if (t === void 0) return n;
860
860
  if (t === null || typeof t != "object")
861
861
  throw new RangeError(`[markdown-explorer] labels must be an object; got ${G(t)}`);
@@ -863,8 +863,8 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
863
863
  throw new RangeError(`[markdown-explorer] labels must be a plain object; got ${G(t)}`);
864
864
  const r = t, o = { ...n };
865
865
  for (const a of Object.keys(r)) {
866
- if (!Si(a))
867
- throw new RangeError(`[markdown-explorer] labels.${a} is not a known label key; expected one of ${$r.join(", ")}`);
866
+ if (!xi(a))
867
+ throw new RangeError(`[markdown-explorer] labels.${a} is not a known label key; expected one of ${_r.join(", ")}`);
868
868
  const i = r[a];
869
869
  if (i === void 0) continue;
870
870
  const s = typeof n[a];
@@ -872,43 +872,43 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
872
872
  throw new TypeError(`[markdown-explorer] labels.${a} must be a ${s}; got ${G(i)}`);
873
873
  if (typeof i == "string" && i.trim() === "")
874
874
  throw new RangeError(`[markdown-explorer] labels.${a} must be a non-blank string`);
875
- const f = vi[a];
875
+ const f = yi[a];
876
876
  if (typeof i == "string" && f !== void 0) {
877
877
  const h = f.map((w) => `{${w}}`).join(", ");
878
- for (const w of i.matchAll(yi)) {
879
- const d = w[1];
880
- if (d === void 0)
878
+ for (const w of i.matchAll(bi)) {
879
+ const u = w[1];
880
+ if (u === void 0)
881
881
  throw new RangeError(`[markdown-explorer] labels.${a} holds a brace outside a placeholder at index ${String(w.index)}; it accepts ${h}, and no other braces`);
882
- if (!f.includes(d))
883
- throw new RangeError(`[markdown-explorer] labels.${a} uses the unknown placeholder {${d}}; it accepts ${h}`);
882
+ if (!f.includes(u))
883
+ throw new RangeError(`[markdown-explorer] labels.${a} uses the unknown placeholder {${u}}; it accepts ${h}`);
884
884
  }
885
885
  }
886
886
  o[a] = i;
887
887
  }
888
888
  return Object.freeze(o);
889
- }, xi = (e, t) => {
889
+ }, Ti = (e, t) => {
890
890
  if (Object.is(e, t)) return !0;
891
891
  if (e === null || t === null || typeof e != "object" || typeof t != "object") return !1;
892
892
  const n = e, r = t, o = Object.keys(n), a = Object.keys(r);
893
893
  return o.length === a.length && a.every((i) => Object.hasOwn(n, i) && Object.is(n[i], r[i]));
894
- }, $n = Object.freeze(["light", "dark"]), Ti = (e) => {
894
+ }, $n = Object.freeze(["light", "dark"]), Ci = (e) => {
895
895
  if (e === void 0) return "light";
896
896
  if ($n.includes(e)) return e;
897
897
  throw new RangeError(`[markdown-explorer] theme must be ${$n.map(G).join(" or ")}; got ${G(e)}`);
898
898
  }, _n = Object.freeze({
899
899
  guardUnload: !0,
900
900
  confirmUnversionedSaves: !1
901
- }), qr = ge(null), $ = () => {
902
- const e = se(qr);
901
+ }), Br = ge(null), $ = () => {
902
+ const e = se(Br);
903
903
  if (e === null) throw new Error("[markdown-explorer] explorer components must be rendered inside <MarkdownExplorer>");
904
904
  return e;
905
905
  }, Be = (e) => {
906
906
  const { viewSettings: t } = $(), n = () => e(t.getSnapshot());
907
907
  return oe(t.subscribe, n, n);
908
908
  }, At = () => {
909
- const { config: e } = $(), t = ta()["*"], [n] = na(), r = n.toString();
910
- return Q(() => Or(e, t, new URLSearchParams(r)), [e, t, r]);
911
- }, Ci = () => {
909
+ const { config: e } = $(), t = na()["*"], [n] = ra(), r = n.toString();
910
+ return Q(() => Lr(e, t, new URLSearchParams(r)), [e, t, r]);
911
+ }, Ri = () => {
912
912
  const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = () => {
913
913
  for (const a of [...n]) a();
914
914
  }, o = (a) => {
@@ -941,7 +941,7 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
941
941
  n.delete(a);
942
942
  })
943
943
  };
944
- }, Ri = 2, Mi = 1, Oi = 2, Li = 3, Ai = 4, qn = Object.freeze(["error", "loadstart", "progress", "stalled"]), an = Object.freeze({ marked: !1, final: !1, stalled: !1, progress: 0, error: null }), bt = Object.freeze([]), Di = (e) => e.marked && e.progress <= Ri && (e.final || e.stalled), Ni = (e, t) => e === Mi ? null : t || e === Oi ? "media-load" : e === Li || e === Ai ? "media-unplayable" : null, Ii = (e, t) => {
944
+ }, Mi = 2, Oi = 1, Li = 2, Ai = 3, Di = 4, qn = Object.freeze(["error", "loadstart", "progress", "stalled"]), an = Object.freeze({ marked: !1, final: !1, stalled: !1, progress: 0, error: null }), bt = Object.freeze([]), Ni = (e) => e.marked && e.progress <= Mi && (e.final || e.stalled), Ii = (e, t) => e === Oi ? null : t || e === Li ? "media-load" : e === Ai || e === Di ? "media-unplayable" : null, Pi = (e, t) => {
945
945
  switch (t.kind) {
946
946
  case "report":
947
947
  return { ...e, marked: !0, final: t.final, progress: 0, error: e.error === null ? null : "media-load" };
@@ -952,31 +952,31 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
952
952
  case "loadstart":
953
953
  return an;
954
954
  case "error": {
955
- const n = Ni(t.code, e.marked);
955
+ const n = Ii(t.code, e.marked);
956
956
  return n === null ? e : { ...e, error: n };
957
957
  }
958
958
  case "source-error":
959
959
  return { ...e, error: e.marked ? "media-load" : "media-unplayable" };
960
960
  }
961
- }, Pi = (e) => e.error === "media-load" || Di(e) ? "media-load" : e.error, Bn = (e, t, n) => {
961
+ }, Fi = (e) => e.error === "media-load" || Ni(e) ? "media-load" : e.error, Bn = (e, t, n) => {
962
962
  if (e === "" || t === "" || !URL.canParse(e, n) || !URL.canParse(t, n)) return !1;
963
963
  const r = new URL(e, n), o = new URL(t, n);
964
964
  return r.hash = "", o.hash = "", r.href === o.href;
965
- }, Fi = (e, t) => {
965
+ }, $i = (e, t) => {
966
966
  if (!URL.canParse(e, t)) return e;
967
967
  const n = new URL(e, t), r = n.searchParams.get(ae.path);
968
968
  return ve(r === null ? n.pathname : r);
969
- }, $i = (e) => {
969
+ }, _i = (e) => {
970
970
  for (let t = e.nextElementSibling; t !== null; t = t.nextElementSibling) if (t instanceof HTMLSourceElement) return !1;
971
971
  return !0;
972
- }, _i = (e) => {
972
+ }, qi = (e) => {
973
973
  const { target: t, type: n } = e;
974
974
  if (t instanceof HTMLSourceElement) {
975
975
  const r = t.parentElement;
976
- return n === "error" && r instanceof HTMLMediaElement && $i(t) ? { element: r, arrival: { kind: "source-error" }, url: t.src } : null;
976
+ return n === "error" && r instanceof HTMLMediaElement && _i(t) ? { element: r, arrival: { kind: "source-error" }, url: t.src } : null;
977
977
  }
978
978
  return t instanceof HTMLMediaElement ? n === "error" ? { element: t, arrival: { kind: "error", code: t.error === null ? null : t.error.code }, url: t.currentSrc } : n === "stalled" || n === "progress" || n === "loadstart" ? { element: t, arrival: { kind: n }, url: t.currentSrc } : null : null;
979
- }, qi = () => {
979
+ }, Bi = () => {
980
980
  const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set();
981
981
  let i = bt, s = null;
982
982
  const f = (m, g, v) => {
@@ -984,17 +984,17 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
984
984
  o.delete(m);
985
985
  return;
986
986
  }
987
- o.get(m)?.kind !== g && o.set(m, { kind: g, target: m, url: v, name: Fi(v, document.baseURI) });
987
+ o.get(m)?.kind !== g && o.set(m, { kind: g, target: m, url: v, name: $i(v, document.baseURI) });
988
988
  }, h = (m) => {
989
989
  for (const b of [...o.keys()]) b.isConnected || o.delete(b);
990
990
  const g = [...o.values()], v = g.length === i.length && g.every((b, k) => b === i[k]);
991
991
  if (v || (i = Object.freeze(g)), !(v && !m))
992
992
  for (const b of [...a]) b();
993
993
  }, w = (m, g, v) => {
994
- const b = Ii(e.get(m) ?? an, g);
995
- e.set(m, b), f(m, Pi(b), v);
996
- }, d = (m) => {
997
- const g = _i(m);
994
+ const b = Pi(e.get(m) ?? an, g);
995
+ e.set(m, b), f(m, Fi(b), v);
996
+ }, u = (m) => {
997
+ const g = qi(m);
998
998
  g !== null && (w(g.element, g.arrival, g.url), h(!1));
999
999
  }, p = (m) => {
1000
1000
  const g = m.ended ? 0 : m.currentTime, v = !m.paused, b = r.get(m);
@@ -1008,9 +1008,9 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
1008
1008
  return {
1009
1009
  observe: (m) => {
1010
1010
  s = m;
1011
- for (const g of qn) m.addEventListener(g, d, !0);
1011
+ for (const g of qn) m.addEventListener(g, u, !0);
1012
1012
  return () => {
1013
- for (const g of qn) m.removeEventListener(g, d, !0);
1013
+ for (const g of qn) m.removeEventListener(g, u, !0);
1014
1014
  s === m && (s = null);
1015
1015
  };
1016
1016
  },
@@ -1037,7 +1037,9 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
1037
1037
  h(g);
1038
1038
  }
1039
1039
  };
1040
- }, Bi = Object.freeze({ unauthorized: "unauthenticated", forbidden: "forbidden" }), me = (e) => e === "unauthorized" || e === "forbidden", Ui = (e, t, n, r) => {
1040
+ }, Ui = Object.freeze({ unauthorized: "unauthenticated", forbidden: "forbidden" }), me = (e) => e === "unauthorized" || e === "forbidden";
1041
+ let Un = 0;
1042
+ const Hi = (e, t, n, r) => {
1041
1043
  const o = z(r);
1042
1044
  K(() => {
1043
1045
  o.current = r;
@@ -1046,55 +1048,54 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
1046
1048
  return Q(() => {
1047
1049
  const { reason: i } = e;
1048
1050
  if (!me(i)) throw new TypeError(`[markdown-explorer] the failure ${i} is the explorer's own, not an access failure for the host's presenter`);
1049
- const s = Bi[i], f = Object.freeze({ kind: s, place: t, deniedSentence: s === "forbidden" ? n : null, retry: a ? () => o.current?.() : null });
1050
- return Object.freeze({ occurrence: f, reason: i });
1051
+ const s = Ui[i], f = Object.freeze({ kind: s, place: t, deniedSentence: s === "forbidden" ? n : null, retry: a ? () => o.current?.() : null });
1052
+ return Un += 1, Object.freeze({ occurrence: f, reason: i, number: Un });
1051
1053
  }, [e, t, n, a]);
1052
- }, Hi = Object.freeze([]), Pm = () => {
1053
- let e = Hi, t = 0;
1054
- const n = /* @__PURE__ */ new Set(), r = (o) => {
1055
- e = Object.freeze(o);
1056
- for (const a of [...n]) a();
1054
+ }, zi = Object.freeze([]), Fm = () => {
1055
+ let e = zi;
1056
+ const t = /* @__PURE__ */ new Set(), n = (r) => {
1057
+ e = Object.freeze(r);
1058
+ for (const o of [...t]) o();
1057
1059
  };
1058
1060
  return Object.freeze({
1059
- hold: (o) => {
1060
- t += 1;
1061
- const a = Object.freeze({ ...o, key: t });
1062
- return r([...e, a]), () => {
1063
- e.includes(a) && r(e.filter((i) => i !== a));
1061
+ hold: (r) => {
1062
+ const o = Object.freeze({ ...r });
1063
+ return n([...e, o]), () => {
1064
+ e.includes(o) && n(e.filter((a) => a !== o));
1064
1065
  };
1065
1066
  },
1066
- subscribe: (o) => (n.add(o), () => {
1067
- n.delete(o);
1067
+ subscribe: (r) => (t.add(r), () => {
1068
+ t.delete(r);
1068
1069
  }),
1069
1070
  held: () => e
1070
1071
  });
1071
- }, zi = ge(null), ji = ge(null), Br = ({ reason: e, testId: t, children: n }) => t === null ? n : /* @__PURE__ */ u("div", { className: "aqmx-access-failure", "data-testid": t, "data-aqmx-failure": e, children: n }), Dt = ({ failure: e, place: t, deniedSentence: n, retry: r, testId: o }) => {
1072
- const { accessFailure: a } = $(), i = Ui(e, t, n, r), s = se(zi);
1073
- return K(() => s === null ? void 0 : s.hold({ access: i, testId: o }), [s, i, o]), s !== null ? null : /* @__PURE__ */ u(Br, { reason: i.reason, testId: o, children: a(i.occurrence) });
1074
- }, Fm = () => {
1075
- const e = se(ji);
1076
- return e === null ? null : /* @__PURE__ */ u(Vi, { sheet: e });
1077
- }, Vi = ({ sheet: e }) => {
1072
+ }, ji = ge(null), Vi = ge(null), Ur = ({ reason: e, testId: t, children: n }) => t === null ? n : /* @__PURE__ */ d("div", { className: "aqmx-access-failure", "data-testid": t, "data-aqmx-failure": e, children: n }), Dt = ({ failure: e, place: t, deniedSentence: n, retry: r, testId: o }) => {
1073
+ const { accessFailure: a } = $(), i = Hi(e, t, n, r), s = se(ji);
1074
+ return K(() => s === null ? void 0 : s.hold({ access: i, testId: o }), [s, i, o]), s !== null ? null : /* @__PURE__ */ d(Ur, { reason: i.reason, testId: o, children: a(i.occurrence) }, i.number);
1075
+ }, $m = () => {
1076
+ const e = se(Vi);
1077
+ return e === null ? null : /* @__PURE__ */ d(Zi, { sheet: e });
1078
+ }, Zi = ({ sheet: e }) => {
1078
1079
  const { accessFailure: t } = $(), n = oe(e.subscribe, e.held, e.held);
1079
- return n.length === 0 ? null : /* @__PURE__ */ u("div", { className: "aqmx-sheet-access-failures", "data-testid": "markdown-explorer-sheet-access-failures", children: n.map((r) => /* @__PURE__ */ u(Br, { reason: r.access.reason, testId: r.testId, children: t(r.access.occurrence) }, r.key)) });
1080
- }, Ur = {
1080
+ return n.length === 0 ? null : /* @__PURE__ */ d("div", { className: "aqmx-sheet-access-failures", "data-testid": "markdown-explorer-sheet-access-failures", children: n.map((r) => /* @__PURE__ */ d(Ur, { reason: r.access.reason, testId: r.testId, children: t(r.access.occurrence) }, r.access.number)) });
1081
+ }, Hr = {
1081
1082
  "not-found": ["failureNotFoundTitle", "failureNotFoundBody"],
1082
1083
  "not-configured": ["failureNotConfiguredTitle", "failureNotConfiguredBody"],
1083
1084
  invalid: ["failureInvalidTitle", "failureInvalidBody"],
1084
1085
  "too-large": ["failureTooLargeTitle", "failureTooLargeBody"],
1085
1086
  unsupported: ["failureUnsupportedTitle", "failureUnsupportedBody"],
1086
1087
  failed: ["failureFailedTitle", "failureFailedBody"]
1087
- }, we = (e, t) => e[Ur[t][0]], Ue = ({ failure: e, alert: t, onRetry: n, testId: r, text: o, deniedSentence: a }) => {
1088
+ }, we = (e, t) => e[Hr[t][0]], Ue = ({ failure: e, alert: t, onRetry: n, testId: r, text: o, deniedSentence: a }) => {
1088
1089
  const { reason: i } = e;
1089
- return me(i) ? /* @__PURE__ */ u(Dt, { failure: e, place: "read", deniedSentence: a ?? null, retry: n ?? null, testId: r }) : /* @__PURE__ */ u(Zi, { failure: e, reason: i, alert: t, onRetry: n, testId: r, text: o });
1090
- }, Zi = ({ failure: e, reason: t, alert: n, onRetry: r, testId: o, text: a }) => {
1091
- const { labels: i } = $(), s = a === void 0 ? we(i, t) : a.title, f = a === void 0 ? i[Ur[t][1]] : a.body;
1090
+ return me(i) ? /* @__PURE__ */ d(Dt, { failure: e, place: "read", deniedSentence: a ?? null, retry: n ?? null, testId: r }) : /* @__PURE__ */ d(Gi, { failure: e, reason: i, alert: t, onRetry: n, testId: r, text: o });
1091
+ }, Gi = ({ failure: e, reason: t, alert: n, onRetry: r, testId: o, text: a }) => {
1092
+ const { labels: i } = $(), s = a === void 0 ? we(i, t) : a.title, f = a === void 0 ? i[Hr[t][1]] : a.body;
1092
1093
  return /* @__PURE__ */ j("div", { className: "aqmx-callout", role: n ? "alert" : void 0, "data-aqmx-tone": t === "failed" ? "danger" : "warning", "data-testid": o === null ? void 0 : o, "data-aqmx-failure": o === null ? void 0 : e.reason, children: [
1093
- /* @__PURE__ */ u("p", { className: "aqmx-callout-title", children: s }),
1094
- /* @__PURE__ */ u("p", { className: "aqmx-callout-body", children: f }),
1095
- r !== void 0 && t === "failed" ? /* @__PURE__ */ u("button", { type: "button", className: "aqmx-callout-action", onClick: r, children: i.retry }) : null
1094
+ /* @__PURE__ */ d("p", { className: "aqmx-callout-title", children: s }),
1095
+ /* @__PURE__ */ d("p", { className: "aqmx-callout-body", children: f }),
1096
+ r !== void 0 && t === "failed" ? /* @__PURE__ */ d("button", { type: "button", className: "aqmx-callout-action", onClick: r, children: i.retry }) : null
1096
1097
  ] });
1097
- }, Gi = (e, t) => {
1098
+ }, Wi = (e, t) => {
1098
1099
  const { phase: n, save: r, dirty: o } = t;
1099
1100
  switch (n.kind) {
1100
1101
  case "opening":
@@ -1125,7 +1126,7 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
1125
1126
  break;
1126
1127
  }
1127
1128
  return o ? e.draftUnsaved : "";
1128
- }, Wi = (e, t, n) => {
1129
+ }, Ki = (e, t, n) => {
1129
1130
  switch (t.kind) {
1130
1131
  case "draft":
1131
1132
  return e.draftNotSaved;
@@ -1153,30 +1154,30 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
1153
1154
  for (const t of [...e]) t();
1154
1155
  }
1155
1156
  };
1156
- }, Ki = "<<<<<<<", Xi = "=======", Yi = ">>>>>>>", Un = (e, t) => e === t || e.startsWith(`${t} `), Hn = (e) => Ji(e.split(`
1157
- `)), Ji = (e) => {
1157
+ }, Xi = "<<<<<<<", Yi = "=======", Ji = ">>>>>>>", Hn = (e, t) => e === t || e.startsWith(`${t} `), zn = (e) => Qi(e.split(`
1158
+ `)), Qi = (e) => {
1158
1159
  const t = [];
1159
1160
  let n = null, r = null, o = 0;
1160
1161
  for (const a of e) {
1161
1162
  o += 1;
1162
1163
  const i = a.charCodeAt(0);
1163
- i !== 60 && i !== 61 && i !== 62 || (Un(a, Ki) ? (n = o, r = null) : a === Xi ? n !== null && r === null ? r = o : n = null : Un(a, Yi) && (n !== null && r !== null && t.push({ start: n, separator: r, end: o }), n = null, r = null));
1164
+ i !== 60 && i !== 61 && i !== 62 || (Hn(a, Xi) ? (n = o, r = null) : a === Yi ? n !== null && r === null ? r = o : n = null : Hn(a, Ji) && (n !== null && r !== null && t.push({ start: n, separator: r, end: o }), n = null, r = null));
1164
1165
  }
1165
1166
  return t;
1166
1167
  }, Ut = (e) => e.includes(`\r
1167
1168
  `) ? `\r
1168
1169
  ` : `
1169
1170
  `, pt = (e) => e.replace(/\r\n?/gu, `
1170
- `), Qi = (e, t) => t === `
1171
+ `), es = (e, t) => t === `
1171
1172
  ` ? e : e.replaceAll(`
1172
1173
  `, `\r
1173
- `), es = 3, ts = /^\d+(?:\.\d+)?$/u, ns = (e) => {
1174
- if (e === null || !ts.test(e)) return null;
1174
+ `), ts = 3, ns = /^\d+(?:\.\d+)?$/u, rs = (e) => {
1175
+ if (e === null || !ns.test(e)) return null;
1175
1176
  const t = Number(e);
1176
- return t >= Ar && t <= Lr ? t : null;
1177
- }, Ge = Object.freeze({ kind: "idle" }), Ht = Object.freeze({ kind: "draft" }), rs = ({ data: e, conflictLabels: t, onSaveSettled: n, sideBySideSetting: r, editorShareSetting: o }) => {
1177
+ return t >= Dr && t <= Ar ? t : null;
1178
+ }, Ge = Object.freeze({ kind: "idle" }), Ht = Object.freeze({ kind: "draft" }), os = ({ data: e, conflictLabels: t, onSaveSettled: n, sideBySideSetting: r, editorShareSetting: o }) => {
1178
1179
  const a = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), w = it();
1179
- let d = null, p = null, m = null;
1180
+ let u = null, p = null, m = null;
1180
1181
  const g = /* @__PURE__ */ new Set(), v = /* @__PURE__ */ new Set();
1181
1182
  let b = !1;
1182
1183
  const k = (c, l) => {
@@ -1234,7 +1235,7 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
1234
1235
  n(c, Ht);
1235
1236
  return;
1236
1237
  }
1237
- const x = Hn(l.draft).length;
1238
+ const x = zn(l.draft).length;
1238
1239
  if (x > 0) {
1239
1240
  H(c, l, { kind: "conflicts", count: x });
1240
1241
  return;
@@ -1243,8 +1244,8 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
1243
1244
  const { signal: O } = l.controller;
1244
1245
  let F = { text: l.base.text, version: E }, y = l.draft, S = !1;
1245
1246
  k(l, { save: { kind: "saving" } });
1246
- for (let L = 0; L < es; L += 1) {
1247
- const A = await e.save(c, F.version, Qi(y, l.ending), O);
1247
+ for (let L = 0; L < ts; L += 1) {
1248
+ const A = await e.save(c, F.version, es(y, l.ending), O);
1248
1249
  if (!I(c, l) || O.aborted || !("kind" in A)) return;
1249
1250
  if (A.kind === "saved") {
1250
1251
  f.get(c)?.flush(), l.base = { text: y, version: A.version }, R(c), H(c, l, { kind: "saved", merged: S }, { dirty: l.draft !== y });
@@ -1258,12 +1259,12 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
1258
1259
  H(c, l, { kind: "failed", failure: A.failure });
1259
1260
  return;
1260
1261
  }
1261
- const { mergeDraft: q } = await import("./merge-DC_h-t31.js");
1262
+ const { mergeDraft: q } = await import("./merge-CnrrjXmc.js");
1262
1263
  if (!I(c, l) || O.aborted) return;
1263
- const te = f.get(c);
1264
- te?.flush();
1264
+ const ee = f.get(c);
1265
+ ee?.flush();
1265
1266
  const re = pt(A.text), X = q(F.text, l.draft, re, t());
1266
- if (F = { text: re, version: A.version }, l.base = F, l.ending = Ut(A.text), l.draft = X.text, R(c), te?.adopt(X.text), X.kind === "conflicts") {
1267
+ if (F = { text: re, version: A.version }, l.base = F, l.ending = Ut(A.text), l.draft = X.text, R(c), ee?.adopt(X.text), X.kind === "conflicts") {
1267
1268
  H(c, l, { kind: "conflicts", count: X.conflicts }, { dirty: !0, generation: l.value.generation + 1 });
1268
1269
  return;
1269
1270
  }
@@ -1284,7 +1285,7 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
1284
1285
  else if (c.base.version === l.version)
1285
1286
  x = { text: E, version: l.version }, O = c.draft, F = Ge;
1286
1287
  else {
1287
- const { mergeDraft: y } = await import("./merge-DC_h-t31.js"), S = y(c.base.text, c.draft, E, t());
1288
+ const { mergeDraft: y } = await import("./merge-CnrrjXmc.js"), S = y(c.base.text, c.draft, E, t());
1288
1289
  x = { text: E, version: l.version }, O = S.text, F = S.kind === "conflicts" ? { kind: "conflicts", count: S.conflicts } : Ge;
1289
1290
  }
1290
1291
  if (a.has(c.path)) return { restored: !1, reason: "failed" };
@@ -1336,7 +1337,7 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
1336
1337
  O !== E.value.dirty && (x.dirty = O);
1337
1338
  const { save: F } = E.value;
1338
1339
  if (F.kind === "conflicts") {
1339
- const y = Hn(l).length;
1340
+ const y = zn(l).length;
1340
1341
  y === 0 ? x.save = Ge : y !== F.count && (x.save = { kind: "conflicts", count: y });
1341
1342
  }
1342
1343
  (x.dirty !== void 0 || x.save !== void 0) && k(E, x);
@@ -1424,14 +1425,14 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
1424
1425
  }
1425
1426
  return { restored: x, failed: O };
1426
1427
  },
1427
- sideBySide: () => (d ??= r.read(), d),
1428
+ sideBySide: () => (u ??= r.read(), u),
1428
1429
  setSideBySide: (c) => {
1429
- d !== c && (d = c, r.write(c), w.emit());
1430
+ u !== c && (u = c, r.write(c), w.emit());
1430
1431
  },
1431
- editorShare: () => (p ??= o.read() ?? ca, p),
1432
+ editorShare: () => (p ??= o.read() ?? da, p),
1432
1433
  setEditorShare: (c) => {
1433
1434
  if (!Number.isFinite(c)) throw new RangeError(`[markdown-explorer] an editor share must be a finite number; got ${G(c)}`);
1434
- const l = Math.min(Lr, Math.max(Ar, c));
1435
+ const l = Math.min(Ar, Math.max(Dr, c));
1435
1436
  p !== l && (p = l, o.write(l));
1436
1437
  },
1437
1438
  setView: (c, l) => {
@@ -1443,18 +1444,18 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
1443
1444
  l !== void 0 && !l.value.previewPrepared && k(l, { previewPrepared: !0 });
1444
1445
  }
1445
1446
  };
1446
- }, Hr = (e) => {
1447
+ }, zr = (e) => {
1447
1448
  e.preventDefault(), e.stopPropagation();
1448
- }, os = (e) => e.endsWith("px") ? Number.parseFloat(e) : Number.NaN, zr = "data-aqmx-content-pane", sn = Object.freeze({ [zr]: "" }), as = "--aqmx-dialog-left", is = "--aqmx-dialog-top", ss = '[data-testid="markdown-explorer"]', ls = (e) => {
1449
- const t = e.closest(ss)?.querySelectorAll(`[${zr}]`), n = t?.item(t.length - 1);
1449
+ }, as = (e) => e.endsWith("px") ? Number.parseFloat(e) : Number.NaN, jr = "data-aqmx-content-pane", sn = Object.freeze({ [jr]: "" }), is = "--aqmx-dialog-left", ss = "--aqmx-dialog-top", ls = '[data-testid="markdown-explorer"]', cs = (e) => {
1450
+ const t = e.closest(ls)?.querySelectorAll(`[${jr}]`), n = t?.item(t.length - 1);
1450
1451
  if (!(n instanceof HTMLElement)) throw new Error("[markdown-explorer] a dialog opened where the explorer marks no content pane");
1451
1452
  return n;
1452
- }, cs = (e) => {
1453
- const t = os(getComputedStyle(e).marginTop);
1453
+ }, ds = (e) => {
1454
+ const t = as(getComputedStyle(e).marginTop);
1454
1455
  if (Number.isNaN(t)) return null;
1455
- const n = ls(e), r = e.getBoundingClientRect(), o = e.ownerDocument.documentElement, { left: a, top: i } = da(n.getBoundingClientRect(), { width: r.width + 2 * t, height: r.height + 2 * t }, { width: o.clientWidth, height: o.clientHeight });
1456
- return e.style.setProperty(as, `${String(a)}px`), e.style.setProperty(is, `${String(i)}px`), n;
1457
- }, ds = (e) => e.preventDefault(), jr = ({ open: e, onOpen: t, onDismiss: n }) => {
1456
+ const n = cs(e), r = e.getBoundingClientRect(), o = e.ownerDocument.documentElement, { left: a, top: i } = ua(n.getBoundingClientRect(), { width: r.width + 2 * t, height: r.height + 2 * t }, { width: o.clientWidth, height: o.clientHeight });
1457
+ return e.style.setProperty(is, `${String(a)}px`), e.style.setProperty(ss, `${String(i)}px`), n;
1458
+ }, us = (e) => e.preventDefault(), Vr = ({ open: e, onOpen: t, onDismiss: n }) => {
1458
1459
  const r = z(null), o = z(null), a = z(!1), i = z(t);
1459
1460
  K(() => {
1460
1461
  i.current = t;
@@ -1463,27 +1464,27 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
1463
1464
  const w = r.current;
1464
1465
  if (w !== null)
1465
1466
  if (e && !w.open) {
1466
- const d = w.ownerDocument.activeElement;
1467
- o.current = d instanceof HTMLElement ? d : null, w.showModal(), i.current?.();
1467
+ const u = w.ownerDocument.activeElement;
1468
+ o.current = u instanceof HTMLElement ? u : null, w.showModal(), i.current?.();
1468
1469
  } else !e && w.open && (w.close(), o.current?.isConnected === !0 && o.current.focus(), o.current = null);
1469
1470
  }, [e]), K(() => {
1470
1471
  const w = r.current;
1471
1472
  if (!e || w === null) return;
1472
- const d = new ResizeObserver(() => m());
1473
+ const u = new ResizeObserver(() => m());
1473
1474
  let p = null;
1474
1475
  const m = () => {
1475
- const v = cs(w);
1476
- v === null || v === p || (p !== null && d.unobserve(p), d.observe(v), p = v);
1476
+ const v = ds(w);
1477
+ v === null || v === p || (p !== null && u.unobserve(p), u.observe(v), p = v);
1477
1478
  };
1478
- m(), d.observe(w);
1479
+ m(), u.observe(w);
1479
1480
  const g = w.ownerDocument.defaultView;
1480
1481
  return g?.addEventListener("resize", m), w.ownerDocument.addEventListener("scroll", m, { capture: !0, passive: !0 }), () => {
1481
- d.disconnect(), g?.removeEventListener("resize", m), w.ownerDocument.removeEventListener("scroll", m, { capture: !0 });
1482
+ u.disconnect(), g?.removeEventListener("resize", m), w.ownerDocument.removeEventListener("scroll", m, { capture: !0 });
1482
1483
  };
1483
1484
  }, [e]);
1484
1485
  const s = _(
1485
1486
  (w) => {
1486
- w.key !== "Escape" || w.defaultPrevented || (Hr(w), n());
1487
+ w.key !== "Escape" || w.defaultPrevented || (zr(w), n());
1487
1488
  },
1488
1489
  [n]
1489
1490
  ), f = _(
@@ -1494,15 +1495,15 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
1494
1495
  ), h = _(() => {
1495
1496
  a.current && n();
1496
1497
  }, [n]);
1497
- return { ref: r, onKeyDown: s, onClick: f, onCancel: ds, onClose: h };
1498
+ return { ref: r, onKeyDown: s, onClick: f, onCancel: us, onClose: h };
1498
1499
  }, gn = ({ open: e, title: t, body: n, confirmLabel: r, cancelLabel: o, onConfirm: a, onCancel: i, testId: s }) => {
1499
- const f = z(null), h = Le(), w = Le(), d = _(() => f.current?.focus(), []), p = jr({ open: e, onOpen: d, onDismiss: i });
1500
- return /* @__PURE__ */ u("dialog", { ...p, className: "aqmx-confirm", "aria-labelledby": h, "aria-describedby": w, "data-testid": s, children: /* @__PURE__ */ j("div", { className: "aqmx-confirm-panel", children: [
1501
- /* @__PURE__ */ u("p", { id: h, className: "aqmx-confirm-title", children: t }),
1502
- /* @__PURE__ */ u("p", { id: w, className: "aqmx-confirm-body", children: n }),
1500
+ const f = z(null), h = Le(), w = Le(), u = _(() => f.current?.focus(), []), p = Vr({ open: e, onOpen: u, onDismiss: i });
1501
+ return /* @__PURE__ */ d("dialog", { ...p, className: "aqmx-confirm", "aria-labelledby": h, "aria-describedby": w, "data-testid": s, children: /* @__PURE__ */ j("div", { className: "aqmx-confirm-panel", children: [
1502
+ /* @__PURE__ */ d("p", { id: h, className: "aqmx-confirm-title", children: t }),
1503
+ /* @__PURE__ */ d("p", { id: w, className: "aqmx-confirm-body", children: n }),
1503
1504
  /* @__PURE__ */ j("div", { className: "aqmx-confirm-actions", children: [
1504
- /* @__PURE__ */ u("button", { ref: f, type: "button", className: "aqmx-callout-action", "data-testid": `${s}-cancel`, onClick: i, children: o }),
1505
- /* @__PURE__ */ u("button", { type: "button", className: "aqmx-callout-action", "data-aqmx-tone": "danger", "data-testid": `${s}-confirm`, onClick: a, children: r })
1505
+ /* @__PURE__ */ d("button", { ref: f, type: "button", className: "aqmx-callout-action", "data-testid": `${s}-cancel`, onClick: i, children: o }),
1506
+ /* @__PURE__ */ d("button", { type: "button", className: "aqmx-callout-action", "data-aqmx-tone": "danger", "data-testid": `${s}-confirm`, onClick: a, children: r })
1506
1507
  ] })
1507
1508
  ] }) });
1508
1509
  }, nt = (e) => {
@@ -1515,7 +1516,7 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
1515
1516
  t.status = "rejected", t.reason = n;
1516
1517
  }
1517
1518
  )), t;
1518
- }, Vr = (e) => Object.assign(Promise.resolve(e), { status: "fulfilled", value: e }), Je = (e) => e.status === "fulfilled" ? e.value : void 0, us = Object.freeze({ readme: Object.freeze({ status: "loading" }), claim: !1 }), fs = Object.freeze({ readme: Object.freeze({ status: "loading" }), claim: !0 }), ms = (e, t, n) => {
1519
+ }, Zr = (e) => Object.assign(Promise.resolve(e), { status: "fulfilled", value: e }), Je = (e) => e.status === "fulfilled" ? e.value : void 0, fs = Object.freeze({ readme: Object.freeze({ status: "loading" }), claim: !1 }), ms = Object.freeze({ readme: Object.freeze({ status: "loading" }), claim: !0 }), hs = (e, t, n) => {
1519
1520
  const r = /* @__PURE__ */ new Set(), o = [...e].reverse();
1520
1521
  for (let a = o.pop(); a !== void 0; a = o.pop()) {
1521
1522
  if (a.type !== "directory" || r.has(a.path)) continue;
@@ -1525,21 +1526,21 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
1525
1526
  if (s !== null) for (const f of [...s].reverse()) o.push(f);
1526
1527
  }
1527
1528
  return null;
1528
- }, hs = (e, t, n) => {
1529
+ }, ps = (e, t, n) => {
1529
1530
  const r = Je(e.read(t));
1530
- if (r === void 0 || r.status === "deferred") return us;
1531
+ if (r === void 0 || r.status === "deferred") return fs;
1531
1532
  if (r.status === "error") return { readme: { status: "failed", failure: r.failure, retry: () => e.retry(t) }, claim: !1 };
1532
- const o = ms(r.entries, n, (i) => e.children(t, i));
1533
+ const o = hs(r.entries, n, (i) => e.children(t, i));
1533
1534
  if (o !== null) return { readme: { status: "ok", readme: Cn(o) }, claim: !1 };
1534
1535
  const a = e.children(t, n);
1535
- return a === void 0 || a.status === "loading" ? fs : a.status === "failed" ? { readme: { status: "failed", failure: a.failure, retry: () => e.retryChildren(t, n) }, claim: !0 } : { readme: { status: "ok", readme: Cn(a.entries) }, claim: !0 };
1536
- }, ps = (e, t, n) => {
1537
- const { readme: r } = hs(e, t, n);
1538
- return r.status === "ok" ? r.readme : null;
1536
+ return a === void 0 || a.status === "loading" ? ms : a.status === "failed" ? { readme: { status: "failed", failure: a.failure, retry: () => e.retryChildren(t, n) }, claim: !0 } : { readme: { status: "ok", readme: Cn(a.entries) }, claim: !0 };
1539
1537
  }, ws = (e, t, n) => {
1540
- const r = ra({ path: `${e.basePath}/*`, end: !0 }, t.pathname);
1538
+ const { readme: r } = ps(e, t, n);
1539
+ return r.status === "ok" ? r.readme : null;
1540
+ }, gs = (e, t, n) => {
1541
+ const r = oa({ path: `${e.basePath}/*`, end: !0 }, t.pathname);
1541
1542
  if (r === null) return /* @__PURE__ */ new Set();
1542
- const { location: o } = Or(e, r.params["*"], new URLSearchParams(t.search));
1543
+ const { location: o } = Lr(e, r.params["*"], new URLSearchParams(t.search));
1543
1544
  switch (o.view) {
1544
1545
  case "tree": {
1545
1546
  const a = o.folder === null ? o.doc : n(o.source, o.folder);
@@ -1550,24 +1551,24 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
1550
1551
  case "multi":
1551
1552
  return new Set(o.docs);
1552
1553
  }
1553
- }, Zr = (e) => {
1554
+ }, Gr = (e) => {
1554
1555
  const { edits: t } = $(), n = _(() => t.session(e), [t, e]);
1555
- return oe(t.subscribe, n, gs);
1556
- }, Gr = () => !1, gs = () => {
1557
- }, vs = () => {
1558
- const { edits: e } = $();
1559
- return oe(e.subscribe, e.hasSessions, Gr);
1556
+ return oe(t.subscribe, n, vs);
1557
+ }, Wr = () => !1, vs = () => {
1560
1558
  }, ys = () => {
1561
1559
  const { edits: e } = $();
1562
- return oe(e.subscribe, e.sideBySide, Gr);
1563
- }, bs = () => null, ks = () => {
1560
+ return oe(e.subscribe, e.hasSessions, Wr);
1561
+ }, bs = () => {
1562
+ const { edits: e } = $();
1563
+ return oe(e.subscribe, e.sideBySide, Wr);
1564
+ }, ks = () => null, Es = () => {
1564
1565
  const { edits: e, labels: t, config: n, trees: r, guardUnload: o } = $(), a = z([]), i = _(
1565
1566
  ({ nextLocation: g }) => {
1566
- const v = ws(n, g, (b, k) => ps(r, b, k));
1567
+ const v = gs(n, g, (b, k) => ws(r, b, k));
1567
1568
  return e.flushDrafts(), a.current = e.dirtyPaths().filter((b) => !v.has(b)), a.current.length > 0;
1568
1569
  },
1569
1570
  [e, n, r]
1570
- ), s = oa(i), f = vs();
1571
+ ), s = aa(i), f = ys();
1571
1572
  ne(() => {
1572
1573
  if (!(f && o)) return;
1573
1574
  const g = (v) => {
@@ -1575,12 +1576,12 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
1575
1576
  };
1576
1577
  return window.addEventListener("beforeunload", g), () => window.removeEventListener("beforeunload", g);
1577
1578
  }, [f, e, o]);
1578
- const h = oe(e.subscribe, e.discardRequest, bs), w = s.state === "blocked";
1579
+ const h = oe(e.subscribe, e.discardRequest, ks), w = s.state === "blocked";
1579
1580
  ne(() => {
1580
1581
  h !== null && s.state === "blocked" && s.reset();
1581
1582
  }, [h, s]);
1582
- const d = h !== null ? h.paths : w ? a.current : [], p = d.map((g) => ve(g)).join(", "), m = d.length > 0 && d.every((g) => e.session(g)?.save.kind === "draft");
1583
- return /* @__PURE__ */ u(
1583
+ const u = h !== null ? h.paths : w ? a.current : [], p = u.map((g) => ve(g)).join(", "), m = u.length > 0 && u.every((g) => e.session(g)?.save.kind === "draft");
1584
+ return /* @__PURE__ */ d(
1584
1585
  gn,
1585
1586
  {
1586
1587
  open: w || h !== null,
@@ -1605,25 +1606,25 @@ const ii = Object.freeze(["reload", "notify"]), si = Object.freeze([`
1605
1606
  }
1606
1607
  }
1607
1608
  );
1608
- }, Es = async (e, t) => {
1609
+ }, Ss = async (e, t) => {
1609
1610
  const n = await t.documents.refresh(e);
1610
1611
  if (n.status === "refreshed" || n.status === "shown" && !n.failed) {
1611
1612
  t.announcer.announce(t.labels.documentReloadedAfterChange(t.nameOf(e)));
1612
1613
  return;
1613
1614
  }
1614
1615
  n.status === "failed" && t.documentChanges.mark([e]);
1615
- }, Ss = (e, t) => {
1616
- mi(e);
1616
+ }, xs = (e, t) => {
1617
+ hi(e);
1617
1618
  for (const r of e.sourceIds) t.trees.reloadSource(r);
1618
1619
  const n = [];
1619
1620
  for (const r of e.paths) {
1620
1621
  if (t.documents.noteChanged(r), t.edits.session(r) !== void 0 || !t.documentChanges.shown(r)) continue;
1621
1622
  const o = t.documents.peek(r);
1622
- o?.status !== "loaded" || o.document.kind === "failure" || (t.policy === "notify" ? n.push(r) : Es(r, t));
1623
+ o?.status !== "loaded" || o.document.kind === "failure" || (t.policy === "notify" ? n.push(r) : Ss(r, t));
1623
1624
  }
1624
1625
  n.length > 0 && t.documentChanges.mark(n);
1625
1626
  };
1626
- function xs({
1627
+ function Ts({
1627
1628
  title: e,
1628
1629
  titleId: t,
1629
1630
  ...n
@@ -1644,18 +1645,18 @@ function xs({
1644
1645
  clipRule: "evenodd"
1645
1646
  }));
1646
1647
  }
1647
- const Ts = /* @__PURE__ */ T.forwardRef(xs);
1648
+ const Cs = /* @__PURE__ */ T.forwardRef(Ts);
1648
1649
  let zt = null;
1649
- const Wr = () => (zt ??= import("./EditSurface-BQgwRUrR.js").catch((e) => {
1650
+ const Kr = () => (zt ??= import("./EditSurface-BTrQ1viw.js").catch((e) => {
1650
1651
  throw zt = null, e;
1651
- }), zt), Cs = () => {
1652
- Wr().catch(() => {
1652
+ }), zt), Rs = () => {
1653
+ Kr().catch(() => {
1653
1654
  });
1654
- }, Rs = (e) => {
1655
- const { default: t } = se(Wr());
1656
- return /* @__PURE__ */ u(t, { ...e });
1655
+ }, Ms = (e) => {
1656
+ const { default: t } = se(Kr());
1657
+ return /* @__PURE__ */ d(t, { ...e });
1657
1658
  };
1658
- class Ms extends Mr {
1659
+ class Os extends Or {
1659
1660
  state = { failed: !1 };
1660
1661
  static getDerivedStateFromError() {
1661
1662
  return { failed: !0 };
@@ -1665,7 +1666,7 @@ class Ms extends Mr {
1665
1666
  return this.state.failed ? this.props.fallback(this.retry) : this.props.children;
1666
1667
  }
1667
1668
  }
1668
- const Kr = "[data-aqmd-fullscreen]", Os = "[data-aqmd-fullscreen-dialog]:modal", $m = (e) => e instanceof Element && e.closest(Kr) !== null, Ls = (e) => e.querySelector(Os) !== null, vn = `[${Nr}]`, As = "[data-aqmd-content]", Ds = `a[href], button, input, select, textarea, summary, label, [contenteditable], [role="menu"], iframe, video, audio, object, embed, svg, [data-aqmd-spreadsheet-editable], ${Kr}, [data-aqmd-svg-image-source]`, Ns = 200, rt = (e) => Ka(e.getAttribute(Nr)), Is = (e, t) => {
1669
+ const Xr = "[data-aqmd-fullscreen]", Ls = "[data-aqmd-fullscreen-dialog]:modal", _m = (e) => e instanceof Element && e.closest(Xr) !== null, As = (e) => e.querySelector(Ls) !== null, vn = `[${Ir}]`, Ds = "[data-aqmd-content]", Ns = `a[href], button, input, select, textarea, summary, label, [contenteditable], [role="menu"], iframe, video, audio, object, embed, svg, [data-aqmd-spreadsheet-editable], ${Xr}, [data-aqmd-svg-image-source]`, Is = 200, rt = (e) => Xa(e.getAttribute(Ir)), Ps = (e, t) => {
1669
1670
  for (let r = e; r !== null && t.contains(r); r = r.parentElement) {
1670
1671
  const o = rt(r);
1671
1672
  if (o !== null) return { block: r, lines: o, own: !0 };
@@ -1677,43 +1678,43 @@ const Kr = "[data-aqmd-fullscreen]", Os = "[data-aqmd-fullscreen-dialog]:modal",
1677
1678
  o !== null && (n = { block: r, lines: o });
1678
1679
  }
1679
1680
  return n === null ? null : { ...n, own: !1 };
1680
- }, Ps = (e, t) => {
1681
+ }, Fs = (e, t) => {
1681
1682
  let n = 0;
1682
1683
  for (let r = e.indexOf(t); r >= 0; r = e.indexOf(t, r + t.length)) n += 1;
1683
1684
  return n;
1684
- }, Fs = (e) => e.closest(As) !== null && e.closest(Ds) === null, $s = (e, t, n) => {
1685
- const r = Is(e, t);
1685
+ }, $s = (e) => e.closest(Ds) !== null && e.closest(Ns) === null, _s = (e, t, n) => {
1686
+ const r = Ps(e, t);
1686
1687
  if (r === null) return null;
1687
1688
  const { block: o, own: a } = r;
1688
1689
  if (!a) {
1689
1690
  const s = r.lines.last + 1;
1690
1691
  return { lines: { first: s, last: s }, word: null, occurrence: 0, clientTop: Tt(e) };
1691
1692
  }
1692
- const i = Us(o, n);
1693
+ const i = Hs(o, n);
1693
1694
  return i === null ? { lines: r.lines, word: null, occurrence: 0, clientTop: Tt(o) } : { lines: r.lines, word: i.text, occurrence: i.occurrence, clientTop: i.clientTop };
1694
- }, _s = (e, t) => {
1695
+ }, qs = (e, t) => {
1695
1696
  let n = null, r = null, o = null;
1696
1697
  for (const i of e.querySelectorAll(vn)) {
1697
1698
  const s = rt(i);
1698
1699
  if (s === null) continue;
1699
- n ??= Bs(t, i);
1700
+ n ??= Us(t, i);
1700
1701
  const { top: f, bottom: h } = i.getBoundingClientRect();
1701
1702
  f <= n && n < h ? r = { lines: s, block: i } : o === null && f >= n && (o = { lines: s, block: i });
1702
1703
  }
1703
1704
  const a = r === null ? o : r;
1704
1705
  return a === null ? null : { lines: a.lines, word: null, occurrence: 0, clientTop: Tt(a.block) };
1705
- }, qs = (e) => e === e.ownerDocument.scrollingElement ? 0 : e.getBoundingClientRect().top + e.clientTop, Bs = (e, t) => {
1706
+ }, Bs = (e) => e === e.ownerDocument.scrollingElement ? 0 : e.getBoundingClientRect().top + e.clientTop, Us = (e, t) => {
1706
1707
  const n = Number.parseFloat(getComputedStyle(t).scrollMarginTop);
1707
- return qs(e) + (Number.isFinite(n) ? n : 0);
1708
- }, Us = (e, t) => {
1708
+ return Bs(e) + (Number.isFinite(n) ? n : 0);
1709
+ }, Hs = (e, t) => {
1709
1710
  if (t === null || t.rangeCount === 0) return null;
1710
1711
  const n = t.getRangeAt(0);
1711
1712
  if (!(e.contains(n.startContainer) && e.contains(n.endContainer))) return null;
1712
1713
  const r = n.toString().trim();
1713
- if (r === "" || r.length > Ns || /[\r\n]/u.test(r)) return null;
1714
+ if (r === "" || r.length > Is || /[\r\n]/u.test(r)) return null;
1714
1715
  const o = e.ownerDocument.createRange();
1715
- return o.setStart(e, 0), o.setEnd(n.startContainer, n.startOffset), { text: r, occurrence: Ps(o.toString(), r), clientTop: n.getBoundingClientRect().top };
1716
- }, _m = (e, t) => {
1716
+ return o.setStart(e, 0), o.setEnd(n.startContainer, n.startOffset), { text: r, occurrence: Fs(o.toString(), r), clientTop: n.getBoundingClientRect().top };
1717
+ }, qm = (e, t) => {
1717
1718
  const n = e.split(`
1718
1719
  `), r = Math.min(t.lines.first, n.length), o = Math.min(t.lines.last, n.length), a = { line: r, column: 0 };
1719
1720
  if (t.word === null) return a;
@@ -1725,21 +1726,21 @@ const Kr = "[data-aqmd-fullscreen]", Os = "[data-aqmd-fullscreen-dialog]:modal",
1725
1726
  i += 1;
1726
1727
  }
1727
1728
  }
1728
- return i > 0 ? Hs(n, r, o, t.word) ?? a : a;
1729
- }, Hs = (e, t, n, r) => {
1729
+ return i > 0 ? zs(n, r, o, t.word) ?? a : a;
1730
+ }, zs = (e, t, n, r) => {
1730
1731
  for (let o = n; o >= t; o -= 1) {
1731
1732
  const a = (e[o - 1] ?? "").lastIndexOf(r);
1732
1733
  if (a >= 0) return { line: o, column: a };
1733
1734
  }
1734
1735
  return null;
1735
- }, zs = (e, t) => {
1736
+ }, js = (e, t) => {
1736
1737
  let n = null, r = null;
1737
1738
  for (const o of e.querySelectorAll(vn)) {
1738
1739
  const a = rt(o);
1739
1740
  a === null || a.first > t || (a.last >= t ? n = o : (r === null || a.last >= r.last) && (r = { element: o, last: a.last }));
1740
1741
  }
1741
1742
  return n !== null ? n : r === null ? null : r.element;
1742
- }, js = (e, t) => {
1743
+ }, Vs = (e, t) => {
1743
1744
  const { bottom: n } = e.getBoundingClientRect(), r = Tt(e), o = rt(e);
1744
1745
  if (o === null) return r;
1745
1746
  const a = Math.min(Math.max(t - o.first, 0) / (o.last - o.first + 1), 1);
@@ -1761,19 +1762,19 @@ const Kr = "[data-aqmd-fullscreen]", Os = "[data-aqmd-fullscreen-dialog]:modal",
1761
1762
  "switch-source": We("switch-source", { replace: !1, preventScrollReset: !0 }),
1762
1763
  "switch-view": We("switch-view", { replace: !1, preventScrollReset: !1 }),
1763
1764
  "follow-link": We("follow-link", { replace: !1, preventScrollReset: !1 })
1764
- }), Vs = Object.freeze(Object.keys(Nt)), qm = (e) => Nt[e], Bm = (e, t) => {
1765
- if (e === sa.Pop || typeof t != "object" || t === null || !("aqmxNavigation" in t)) return null;
1765
+ }), Zs = Object.freeze(Object.keys(Nt)), Bm = (e) => Nt[e], Um = (e, t) => {
1766
+ if (e === la.Pop || typeof t != "object" || t === null || !("aqmxNavigation" in t)) return null;
1766
1767
  const { aqmxNavigation: n } = t;
1767
- return Vs.find((r) => r === n) ?? null;
1768
+ return Zs.find((r) => r === n) ?? null;
1768
1769
  }, ze = () => {
1769
- const e = aa();
1770
+ const e = ia();
1770
1771
  return _(
1771
1772
  (t, n) => {
1772
1773
  e(t, Nt[n]);
1773
1774
  },
1774
1775
  [e]
1775
1776
  );
1776
- }, Zs = ({ navigation: e, ...t }) => /* @__PURE__ */ u(ia, { ...t, ...Nt[e] }), Xr = (e) => {
1777
+ }, Gs = ({ navigation: e, ...t }) => /* @__PURE__ */ d(sa, { ...t, ...Nt[e] }), Yr = (e) => {
1777
1778
  const t = e.ownerDocument;
1778
1779
  if (e.focus({ preventScroll: !0 }), t.activeElement === e) return !0;
1779
1780
  if (e.hasAttribute("tabindex")) return !1;
@@ -1783,7 +1784,7 @@ const Kr = "[data-aqmd-fullscreen]", Os = "[data-aqmd-fullscreen-dialog]:modal",
1783
1784
  t.activeElement !== e && (e.removeAttribute("tabindex"), e.removeEventListener("blur", n));
1784
1785
  };
1785
1786
  return e.addEventListener("blur", n), !0;
1786
- }, Gs = (e, t) => {
1787
+ }, Ws = (e, t) => {
1787
1788
  const n = z(null), r = z(null), o = z(null), a = _(() => {
1788
1789
  n.current !== null && window.clearTimeout(n.current), n.current = null, r.current = null;
1789
1790
  }, []);
@@ -1797,9 +1798,9 @@ const Kr = "[data-aqmd-fullscreen]", Os = "[data-aqmd-fullscreen-dialog]:modal",
1797
1798
  return;
1798
1799
  }
1799
1800
  e.prefetch(h);
1800
- const d = e.peek(h);
1801
- if (d?.status !== "pending") return;
1802
- const p = Promise.allSettled([d.promise]);
1801
+ const u = e.peek(h);
1802
+ if (u?.status !== "pending") return;
1803
+ const p = Promise.allSettled([u.promise]);
1803
1804
  o.current = p, p.then(() => {
1804
1805
  o.current === p && (o.current = null);
1805
1806
  });
@@ -1810,7 +1811,7 @@ const Kr = "[data-aqmd-fullscreen]", Os = "[data-aqmd-fullscreen-dialog]:modal",
1810
1811
  const w = t(h);
1811
1812
  w !== r.current && (a(), w !== null && (r.current = w, n.current = window.setTimeout(() => {
1812
1813
  n.current = null, i(w);
1813
- }, ua)));
1814
+ }, fa)));
1814
1815
  },
1815
1816
  [a, t, i]
1816
1817
  ), f = _(
@@ -1828,8 +1829,8 @@ const Kr = "[data-aqmd-fullscreen]", Os = "[data-aqmd-fullscreen-dialog]:modal",
1828
1829
  }),
1829
1830
  [s, f]
1830
1831
  );
1831
- }, Ws = hn(() => import("./NativeScrollBar-DvdOpwIW.js").then((e) => ({ default: e.NativeScrollBar })));
1832
- class Ks extends Mr {
1832
+ }, Ks = hn(() => import("./NativeScrollBar-Bg05yuzM.js").then((e) => ({ default: e.NativeScrollBar })));
1833
+ class Xs extends Or {
1833
1834
  state = { failed: !1 };
1834
1835
  static getDerivedStateFromError() {
1835
1836
  return { failed: !0 };
@@ -1841,36 +1842,36 @@ class Ks extends Mr {
1841
1842
  return this.state.failed ? null : this.props.children;
1842
1843
  }
1843
1844
  }
1844
- const Xs = ({ scroller: e, kind: t }) => /* @__PURE__ */ u(Ks, { children: /* @__PURE__ */ u(tt, { fallback: null, children: /* @__PURE__ */ u(Ws, { scroller: e, kind: t }) }) }), Yr = (e) => /* @__PURE__ */ u(Xs, { scroller: e, kind: "content" }), Ys = Object.freeze({ showArrowButtons: !0, enableThumbDrag: !0, enableTrackClick: !0 }), Js = Object.freeze({ showArrowButtons: !1, enableThumbDrag: !1, enableTrackClick: !1 }), Jr = (e) => e ? Js : Ys, Um = 8, Qs = "--aqmx-scroll-bar-slot-size", Qr = `var(${Qs})`, eo = fa, el = ma[3], tl = "--aqmx-tap-circle-gutter-size", to = `var(${tl})`, Hm = -(eo + el), nl = Object.freeze({ minSpeedMultiplier: 0.25, maxSpeedMultiplier: 18 });
1845
- let no = null, jt = null;
1846
- const ln = /* @__PURE__ */ new Set(), rl = (e) => (ln.add(e), () => {
1845
+ const Ys = ({ scroller: e, kind: t }) => /* @__PURE__ */ d(Xs, { children: /* @__PURE__ */ d(tt, { fallback: null, children: /* @__PURE__ */ d(Ks, { scroller: e, kind: t }) }) }), Jr = (e) => /* @__PURE__ */ d(Ys, { scroller: e, kind: "content" }), Js = Object.freeze({ showArrowButtons: !0, enableThumbDrag: !0, enableTrackClick: !0 }), Qs = Object.freeze({ showArrowButtons: !1, enableThumbDrag: !1, enableTrackClick: !1 }), Qr = (e) => e ? Qs : Js, Hm = 8, el = "--aqmx-scroll-bar-slot-size", eo = `var(${el})`, to = ma, tl = ha[3], nl = "--aqmx-tap-circle-gutter-size", no = `var(${nl})`, zm = -(to + tl), rl = Object.freeze({ minSpeedMultiplier: 0.25, maxSpeedMultiplier: 18 });
1846
+ let ro = null, jt = null;
1847
+ const ln = /* @__PURE__ */ new Set(), ol = (e) => (ln.add(e), () => {
1847
1848
  ln.delete(e);
1848
- }), ol = () => {
1849
- jt === null && (jt = import("./tapScrollCircle-CqMZzWjo.js").then((e) => {
1849
+ }), al = () => {
1850
+ jt === null && (jt = import("./tapScrollCircle-D-Lgzdxx.js").then((e) => {
1850
1851
  const t = e.TAP_SCROLL_CIRCLE.renderVisual;
1851
1852
  if (t === void 0) throw new TypeError("[markdown-explorer] the bars' tap-scroll circle has no look to share");
1852
- no = t;
1853
+ ro = t;
1853
1854
  for (const n of [...ln]) n();
1854
1855
  }).catch((e) => {
1855
1856
  jt = null, console.error("[markdown-explorer] the look of a table's tap-scroll circle failed to load; the circle still scrolls without it.", e);
1856
1857
  }));
1857
- }, al = ({ look: e, state: t }) => e(t), il = (e) => {
1858
+ }, il = ({ look: e, state: t }) => e(t), sl = (e) => {
1858
1859
  const t = oe(
1859
- rl,
1860
- () => no,
1860
+ ol,
1861
+ () => ro,
1861
1862
  () => null
1862
1863
  );
1863
1864
  return ne(() => {
1864
- t === null && ol();
1865
- }, [t]), t === null ? null : /* @__PURE__ */ u(al, { look: t, state: e });
1866
- }, ro = Object.freeze({
1867
- renderVisual: (e) => /* @__PURE__ */ u(il, { ...e }),
1868
- ...nl,
1869
- size: eo
1870
- }), sl = Object.freeze({ ...ro, visibility: "scrolling" }), oo = (e) => e ? sl : ro, ao = "(pointer: coarse)", ll = (e) => {
1871
- const t = window.matchMedia(ao);
1865
+ t === null && al();
1866
+ }, [t]), t === null ? null : /* @__PURE__ */ d(il, { look: t, state: e });
1867
+ }, oo = Object.freeze({
1868
+ renderVisual: (e) => /* @__PURE__ */ d(sl, { ...e }),
1869
+ ...rl,
1870
+ size: to
1871
+ }), ll = Object.freeze({ ...oo, visibility: "scrolling" }), ao = (e) => e ? ll : oo, io = "(pointer: coarse)", cl = (e) => {
1872
+ const t = window.matchMedia(io);
1872
1873
  return t.addEventListener("change", e), () => t.removeEventListener("change", e);
1873
- }, cl = () => window.matchMedia(ao).matches, dl = () => !1, io = () => oe(ll, cl, dl), so = () => {
1874
+ }, dl = () => window.matchMedia(io).matches, ul = () => !1, so = () => oe(cl, dl, ul), lo = () => {
1874
1875
  const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set();
1875
1876
  let n = !1;
1876
1877
  const r = (o) => {
@@ -1904,11 +1905,11 @@ const ln = /* @__PURE__ */ new Set(), rl = (e) => (ln.add(e), () => {
1904
1905
  return !(Array.isArray(e) && Array.isArray(t)) || e.length !== t.length ? !1 : e.every((a, i) => Ct(a, t[i]));
1905
1906
  const n = e, r = t, o = Object.keys(n);
1906
1907
  return o.length !== Object.keys(r).length ? !1 : o.every((a) => Object.hasOwn(r, a) && Ct(n[a], r[a]));
1907
- }, ul = 55e3, zn = Object.freeze({ status: "deferred" }), Vt = Object.freeze({ status: "refreshed" }), Zt = Object.freeze({ status: "shown", failed: !1 }), wt = Object.freeze({ status: "shown", failed: !0 }), gt = Object.freeze({ status: "superseded" }), Te = (e) => e === void 0 || e.status === "deferred" ? null : e.status === "loaded" ? e : e.previous, fl = (e) => e !== void 0 && e.status === "loaded" && e.document.kind !== "failure", ml = ({ client: e, capacity: t }) => {
1908
+ }, fl = 55e3, jn = Object.freeze({ status: "deferred" }), Vt = Object.freeze({ status: "refreshed" }), Zt = Object.freeze({ status: "shown", failed: !1 }), wt = Object.freeze({ status: "shown", failed: !0 }), gt = Object.freeze({ status: "superseded" }), Te = (e) => e === void 0 || e.status === "deferred" ? null : e.status === "loaded" ? e : e.previous, ml = (e) => e !== void 0 && e.status === "loaded" && e.document.kind !== "failure", hl = ({ client: e, capacity: t }) => {
1908
1909
  if (!Number.isInteger(t) || t < 1) throw new RangeError(`[markdown-explorer] the document cache capacity must be a positive integer; got ${G(t)}`);
1909
- const n = /* @__PURE__ */ new Map(), r = so(), o = it(), a = /* @__PURE__ */ new WeakSet(), i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
1910
+ const n = /* @__PURE__ */ new Map(), r = lo(), o = it(), a = /* @__PURE__ */ new WeakSet(), i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
1910
1911
  let h = 0;
1911
- const w = o.emit, d = () => (h += 1, h), p = () => {
1912
+ const w = o.emit, u = () => (h += 1, h), p = () => {
1912
1913
  if (!(n.size <= t))
1913
1914
  for (const c of [...n.keys()]) {
1914
1915
  if (n.size <= t) return;
@@ -1916,13 +1917,13 @@ const ln = /* @__PURE__ */ new Set(), rl = (e) => (ln.add(e), () => {
1916
1917
  }
1917
1918
  }, m = (c, l) => {
1918
1919
  n.delete(c), n.set(c, l);
1919
- }, g = (c) => performance.now() - c.validatedAt >= ul, v = (c, l, E) => {
1920
- const x = n.get(c), O = Te(x?.snapshot), F = E || x?.refreshPending === !0, y = nt(e.document(c, { refresh: F }).then((L) => ({ status: "loaded", document: L }))), S = { snapshot: { status: "pending", promise: y, previous: O }, validatedAt: performance.now(), opened: l, background: null, refreshPending: !1, seeded: void 0, stamp: d() };
1920
+ }, g = (c) => performance.now() - c.validatedAt >= fl, v = (c, l, E) => {
1921
+ const x = n.get(c), O = Te(x?.snapshot), F = E || x?.refreshPending === !0, y = nt(e.document(c, { refresh: F }).then((L) => ({ status: "loaded", document: L }))), S = { snapshot: { status: "pending", promise: y, previous: O }, validatedAt: performance.now(), opened: l, background: null, refreshPending: !1, seeded: void 0, stamp: u() };
1921
1922
  return m(c, S), p(), y.then((L) => {
1922
- n.get(c) === S && (S.snapshot = L, S.stamp = d(), w());
1923
+ n.get(c) === S && (S.snapshot = L, S.stamp = u(), w());
1923
1924
  }), S;
1924
1925
  }, b = (c, l, E, x, O, F) => {
1925
- l.background === E && (l.background = null, !(n.get(c) !== l || l.snapshot !== x) && (O.kind === "failure" && x.document.kind !== "failure" || (l.validatedAt = F, l.stamp = d(), Ct(x.document, O) || (l.snapshot = { status: "loaded", document: O }), w())));
1926
+ l.background === E && (l.background = null, !(n.get(c) !== l || l.snapshot !== x) && (O.kind === "failure" && x.document.kind !== "failure" || (l.validatedAt = F, l.stamp = u(), Ct(x.document, O) || (l.snapshot = { status: "loaded", document: O }), w())));
1926
1927
  }, k = async (c, l) => {
1927
1928
  const E = l.snapshot;
1928
1929
  if (E.status !== "loaded") return null;
@@ -2034,8 +2035,8 @@ const ln = /* @__PURE__ */ new Set(), rl = (e) => (ln.add(e), () => {
2034
2035
  seed: (c, l) => {
2035
2036
  const E = performance.now(), x = nt(
2036
2037
  l.then(
2037
- (L) => L === null ? zn : { status: "loaded", document: L },
2038
- () => zn
2038
+ (L) => L === null ? jn : { status: "loaded", document: L },
2039
+ () => jn
2039
2040
  )
2040
2041
  ), O = n.get(c);
2041
2042
  if (O !== void 0 && O.snapshot.status === "loaded") {
@@ -2049,9 +2050,9 @@ const ln = /* @__PURE__ */ new Set(), rl = (e) => (ln.add(e), () => {
2049
2050
  });
2050
2051
  return;
2051
2052
  }
2052
- const F = O !== void 0 && O.snapshot.status === "pending" ? O.snapshot.previous : null, y = { status: "pending", promise: x, previous: F }, S = { snapshot: y, validatedAt: E, opened: O?.opened === !0, background: null, refreshPending: O?.refreshPending === !0, seeded: y, stamp: d() };
2053
+ const F = O !== void 0 && O.snapshot.status === "pending" ? O.snapshot.previous : null, y = { status: "pending", promise: x, previous: F }, S = { snapshot: y, validatedAt: E, opened: O?.opened === !0, background: null, refreshPending: O?.refreshPending === !0, seeded: y, stamp: u() };
2053
2054
  m(c, S), p(), x.then((L) => {
2054
- n.get(c) === S && (L.status === "deferred" && r.isHeld(c) ? v(c, S.opened, !1) : (S.snapshot = L, S.stamp = d()), w());
2055
+ n.get(c) === S && (L.status === "deferred" && r.isHeld(c) ? v(c, S.opened, !1) : (S.snapshot = L, S.stamp = u()), w());
2055
2056
  });
2056
2057
  },
2057
2058
  invalidate: () => {
@@ -2088,7 +2089,7 @@ const ln = /* @__PURE__ */ new Set(), rl = (e) => (ln.add(e), () => {
2088
2089
  },
2089
2090
  refresh: async (c) => {
2090
2091
  const l = n.get(c);
2091
- if (l !== void 0 && fl(l.snapshot)) {
2092
+ if (l !== void 0 && ml(l.snapshot)) {
2092
2093
  l.refreshPending = !0;
2093
2094
  const O = await k(c, l);
2094
2095
  return O === null ? gt : O.kind === "failure" ? { status: "failed", failure: O.failure } : U(c, l, !0);
@@ -2115,11 +2116,11 @@ const ln = /* @__PURE__ */ new Set(), rl = (e) => (ln.add(e), () => {
2115
2116
  },
2116
2117
  noteFailureShown: (c) => a.has(c) ? !1 : (a.add(c), !0)
2117
2118
  };
2118
- }, Ae = ge("fill"), hl = "--aqmx-tap-circle-gutter", pl = Object.freeze({ blockSize: "100%", [hl]: to }), st = ({ scrollerProps: e, children: t }) => se(Ae) === "content" ? /* @__PURE__ */ u(An, { scrollerProps: e, children: t }) : /* @__PURE__ */ u(An, { scrollerProps: { ...e, style: pl }, rowClassName: "aqmx-document-scroll-row", renderScrollBar: Yr, barInlineSize: Qr, children: t }), wl = Object.freeze(["l1", "l2", "l3", "l4", "l5", "l6", "l7", "l8"]), gl = Object.freeze({ className: "aqmx-document-failure", "data-aqmx-document-scroller": "" }), He = ({ label: e, testId: t }) => /* @__PURE__ */ j(Oe, { children: [
2119
- /* @__PURE__ */ u("div", { className: "aqmx-skeleton", "aria-hidden": "true", "data-testid": t, children: wl.map((n) => /* @__PURE__ */ u("span", {}, n)) }),
2120
- /* @__PURE__ */ u("p", { className: "aqmx-sr-only", children: e })
2121
- ] }), Rt = ({ failure: e, onRetry: t, testId: n, text: r, deniedSentence: o }) => /* @__PURE__ */ u(st, { scrollerProps: gl, children: /* @__PURE__ */ u(Ue, { failure: e, alert: !1, onRetry: t, testId: n, text: r, deniedSentence: o }) });
2122
- function vl({
2119
+ }, Ae = ge("fill"), pl = "--aqmx-tap-circle-gutter", wl = Object.freeze({ blockSize: "100%", [pl]: no }), st = ({ scrollerProps: e, children: t }) => se(Ae) === "content" ? /* @__PURE__ */ d(An, { scrollerProps: e, children: t }) : /* @__PURE__ */ d(An, { scrollerProps: { ...e, style: wl }, rowClassName: "aqmx-document-scroll-row", renderScrollBar: Jr, barInlineSize: eo, children: t }), gl = Object.freeze(["l1", "l2", "l3", "l4", "l5", "l6", "l7", "l8"]), vl = Object.freeze({ className: "aqmx-document-failure", "data-aqmx-document-scroller": "" }), He = ({ label: e, testId: t }) => /* @__PURE__ */ j(Oe, { children: [
2120
+ /* @__PURE__ */ d("div", { className: "aqmx-skeleton", "aria-hidden": "true", "data-testid": t, children: gl.map((n) => /* @__PURE__ */ d("span", {}, n)) }),
2121
+ /* @__PURE__ */ d("p", { className: "aqmx-sr-only", children: e })
2122
+ ] }), Rt = ({ failure: e, onRetry: t, testId: n, text: r, deniedSentence: o }) => /* @__PURE__ */ d(st, { scrollerProps: vl, children: /* @__PURE__ */ d(Ue, { failure: e, alert: !1, onRetry: t, testId: n, text: r, deniedSentence: o }) });
2123
+ function yl({
2123
2124
  title: e,
2124
2125
  titleId: t,
2125
2126
  ...n
@@ -2144,8 +2145,8 @@ function vl({
2144
2145
  clipRule: "evenodd"
2145
2146
  }));
2146
2147
  }
2147
- const yl = /* @__PURE__ */ T.forwardRef(vl);
2148
- function bl({
2148
+ const bl = /* @__PURE__ */ T.forwardRef(yl);
2149
+ function kl({
2149
2150
  title: e,
2150
2151
  titleId: t,
2151
2152
  ...n
@@ -2168,8 +2169,8 @@ function bl({
2168
2169
  d: "M3.5 6A1.5 1.5 0 0 0 2 7.5v9A1.5 1.5 0 0 0 3.5 18h7a1.5 1.5 0 0 0 1.5-1.5v-5.879a1.5 1.5 0 0 0-.44-1.06L8.44 6.439A1.5 1.5 0 0 0 7.378 6H3.5Z"
2169
2170
  }));
2170
2171
  }
2171
- const kl = /* @__PURE__ */ T.forwardRef(bl);
2172
- function El({
2172
+ const El = /* @__PURE__ */ T.forwardRef(kl);
2173
+ function Sl({
2173
2174
  title: e,
2174
2175
  titleId: t,
2175
2176
  ...n
@@ -2190,11 +2191,11 @@ function El({
2190
2191
  clipRule: "evenodd"
2191
2192
  }));
2192
2193
  }
2193
- const lo = /* @__PURE__ */ T.forwardRef(El), Sl = 2e3, jn = Object.freeze({ outcome: "idle", message: null }), co = () => {
2194
- const { announcer: e } = $(), [t, n] = V(jn), r = z(0);
2194
+ const co = /* @__PURE__ */ T.forwardRef(Sl), xl = 2e3, Vn = Object.freeze({ outcome: "idle", message: null }), uo = () => {
2195
+ const { announcer: e } = $(), [t, n] = V(Vn), r = z(0);
2195
2196
  ne(() => {
2196
2197
  if (t.outcome === "idle") return;
2197
- const a = setTimeout(() => n(jn), Sl);
2198
+ const a = setTimeout(() => n(Vn), xl);
2198
2199
  return () => clearTimeout(a);
2199
2200
  }, [t]);
2200
2201
  const o = _(() => {
@@ -2205,14 +2206,14 @@ const lo = /* @__PURE__ */ T.forwardRef(El), Sl = 2e3, jn = Object.freeze({ outc
2205
2206
  };
2206
2207
  }, [e]);
2207
2208
  return { shown: t, press: o };
2208
- }, xl = (e, t) => new Promise((n) => n(e.writeText(t))), Tl = ({ text: e }) => {
2209
- const { labels: t } = $(), { shown: n, press: r } = co(), o = () => {
2209
+ }, Tl = (e, t) => new Promise((n) => n(e.writeText(t))), Cl = ({ text: e }) => {
2210
+ const { labels: t } = $(), { shown: n, press: r } = uo(), o = () => {
2210
2211
  const i = r(), s = navigator.clipboard;
2211
2212
  if (s === void 0) {
2212
2213
  i("failed", t.copyTextFailed);
2213
2214
  return;
2214
2215
  }
2215
- xl(s, e).then(
2216
+ Tl(s, e).then(
2216
2217
  () => i("copied", t.copiedText),
2217
2218
  (f) => {
2218
2219
  console.error("[markdown-explorer] could not copy the text", f), i("failed", t.copyTextFailed);
@@ -2220,14 +2221,14 @@ const lo = /* @__PURE__ */ T.forwardRef(El), Sl = 2e3, jn = Object.freeze({ outc
2220
2221
  );
2221
2222
  }, a = n.message === null ? t.copyText : n.message;
2222
2223
  return (
2223
- /* @__PURE__ */ u("button", { type: "button", className: "aqmx-icon-button", "aria-label": t.copyText, title: a, onClick: o, "data-aqmx-copy-outcome": n.outcome, "data-testid": "markdown-explorer-file-copy", children: n.outcome === "copied" ? /* @__PURE__ */ u(yl, {}) : n.outcome === "failed" ? /* @__PURE__ */ u(lo, {}) : /* @__PURE__ */ u(kl, {}) })
2224
+ /* @__PURE__ */ d("button", { type: "button", className: "aqmx-icon-button", "aria-label": t.copyText, title: a, onClick: o, "data-aqmx-copy-outcome": n.outcome, "data-testid": "markdown-explorer-file-copy", children: n.outcome === "copied" ? /* @__PURE__ */ d(bl, {}) : n.outcome === "failed" ? /* @__PURE__ */ d(co, {}) : /* @__PURE__ */ d(El, {}) })
2224
2225
  );
2225
- }, uo = ge(null), Cl = () => {
2226
- const e = se(uo);
2226
+ }, fo = ge(null), Rl = () => {
2227
+ const e = se(fo);
2227
2228
  if (e === null) throw new Error("[markdown-explorer] a document's content reads its own part only inside a document pane (DocumentContentChannelContext)");
2228
2229
  return e;
2229
- }, Rl = /* @__PURE__ */ new Set(), fo = (e, t, n) => {
2230
- const { documents: r, announcer: o, labels: a } = $(), i = _(() => r.peek(e), [r, e]), s = _(() => r.peekSeeded(e), [r, e]), f = oe(r.subscribe, i, s), h = _(() => r.answerStampOf(e), [r, e]), w = oe(r.subscribe, h, h), [d] = V(() => /* @__PURE__ */ new Set()), [p, m] = V(Rl), [g, v] = V(null);
2230
+ }, Ml = /* @__PURE__ */ new Set(), mo = (e, t, n) => {
2231
+ const { documents: r, announcer: o, labels: a } = $(), i = _(() => r.peek(e), [r, e]), s = _(() => r.peekSeeded(e), [r, e]), f = oe(r.subscribe, i, s), h = _(() => r.answerStampOf(e), [r, e]), w = oe(r.subscribe, h, h), [u] = V(() => /* @__PURE__ */ new Set()), [p, m] = V(Ml), [g, v] = V(null);
2231
2232
  g !== null && (g.path !== e || g.markup !== n) && v(null);
2232
2233
  const b = z(null);
2233
2234
  K(() => (b.current = e, () => {
@@ -2239,7 +2240,7 @@ const lo = /* @__PURE__ */ T.forwardRef(El), Sl = 2e3, jn = Object.freeze({ outc
2239
2240
  }, [n]);
2240
2241
  const M = _(() => {
2241
2242
  const R = e, I = r.peek(R);
2242
- d.has(R) || I?.status === "pending" || (d.add(R), m(new Set(d)), v(null), (async () => {
2243
+ u.has(R) || I?.status === "pending" || (u.add(R), m(new Set(u)), v(null), (async () => {
2243
2244
  try {
2244
2245
  const P = await r.refresh(R);
2245
2246
  if (b.current !== R || P.status === "superseded") return;
@@ -2254,61 +2255,61 @@ const lo = /* @__PURE__ */ T.forwardRef(El), Sl = 2e3, jn = Object.freeze({ outc
2254
2255
  if (U === null || U.document.kind === "failure") return;
2255
2256
  o.announce(a.documentRefreshed(U.document.name));
2256
2257
  } finally {
2257
- d.delete(R), m(new Set(d));
2258
+ u.delete(R), m(new Set(u));
2258
2259
  }
2259
2260
  })());
2260
- }, [e, t, d, r, o, a]), D = p.has(e), C = g !== null && g.path === e && g.stamp === w && g.markup === n ? g.failure : null;
2261
+ }, [e, t, u, r, o, a]), D = p.has(e), C = g !== null && g.path === e && g.stamp === w && g.markup === n ? g.failure : null;
2261
2262
  return { refreshing: D, unavailable: D || f?.status === "pending", failure: C, refresh: M };
2262
- }, Ml = (e, t) => e.length === t.length && e.every((n, r) => n === t[r]), Ol = (e, t) => {
2263
+ }, Ol = (e, t) => e.length === t.length && e.every((n, r) => n === t[r]), Ll = (e, t) => {
2263
2264
  const { mediaFailures: n } = $(), [r, o] = V(() => ({ path: t, notices: bt }));
2264
2265
  return ne(() => {
2265
2266
  const a = () => {
2266
2267
  const i = e.current, s = i === null ? bt : n.notices().filter((f) => i.contains(f.target));
2267
- o((f) => f.path === t && Ml(f.notices, s) ? f : { path: t, notices: s });
2268
+ o((f) => f.path === t && Ol(f.notices, s) ? f : { path: t, notices: s });
2268
2269
  };
2269
2270
  return a(), n.subscribe(a);
2270
2271
  }, [n, e, t]), r.path === t ? r.notices : bt;
2271
- }, Vn = (e, t, n) => {
2272
+ }, Zn = (e, t, n) => {
2272
2273
  const [r] = e;
2273
2274
  return r === void 0 ? null : e.length === 1 ? t(r.name) : n(e.length);
2274
2275
  }, Gt = ({ kind: e, tone: t, text: n, onReload: r }) => {
2275
2276
  const { labels: o } = $(), a = Le();
2276
2277
  return /* @__PURE__ */ j("div", { className: "aqmx-callout aqmx-document-notice", "data-aqmx-tone": t, "data-testid": "markdown-explorer-document-notice", "data-aqmx-notice": e, children: [
2277
- /* @__PURE__ */ u("p", { id: a, className: "aqmx-callout-body", children: n }),
2278
- r === null ? null : /* @__PURE__ */ u("button", { type: "button", className: "aqmx-callout-action", "aria-describedby": a, onClick: r, children: o.reload })
2278
+ /* @__PURE__ */ d("p", { id: a, className: "aqmx-callout-body", children: n }),
2279
+ r === null ? null : /* @__PURE__ */ d("button", { type: "button", className: "aqmx-callout-action", "aria-describedby": a, onClick: r, children: o.reload })
2279
2280
  ] });
2280
- }, Ll = ({ path: e, name: t, editing: n, announces: r, markup: o, region: a, focusDocument: i }) => {
2281
- const { labels: s, documentChanges: f, mediaFailures: h } = $(), { refresh: w } = fo(e, r, o);
2281
+ }, Al = ({ path: e, name: t, editing: n, announces: r, markup: o, region: a, focusDocument: i }) => {
2282
+ const { labels: s, documentChanges: f, mediaFailures: h } = $(), { refresh: w } = mo(e, r, o);
2282
2283
  K(() => f.show(e), [f, e]);
2283
- const d = _(() => f.changed(e), [f, e]), p = oe(f.subscribe, d, d);
2284
+ const u = _(() => f.changed(e), [f, e]), p = oe(f.subscribe, u, u);
2284
2285
  ne(() => {
2285
2286
  n && f.dismiss(e);
2286
2287
  }, [n, f, e]);
2287
- const m = Ol(a, e), g = (D) => {
2288
+ const m = Ll(a, e), g = (D) => {
2288
2289
  D.currentTarget === D.currentTarget.ownerDocument.activeElement && i();
2289
2290
  }, v = (D) => {
2290
2291
  g(D), f.dismiss(e), w();
2291
2292
  }, b = (D) => {
2292
2293
  const C = a.current;
2293
2294
  C !== null && (g(D), h.reload(C));
2294
- }, k = Vn(
2295
+ }, k = Zn(
2295
2296
  m.filter((D) => D.kind === "media-load"),
2296
2297
  s.mediaLoadFailed,
2297
2298
  s.mediaLoadFailedCount
2298
- ), M = Vn(
2299
+ ), M = Zn(
2299
2300
  m.filter((D) => D.kind === "media-unplayable"),
2300
2301
  s.mediaUnplayable,
2301
2302
  s.mediaUnplayableCount
2302
2303
  );
2303
2304
  return (
2304
2305
  /* @__PURE__ */ j("div", { className: "aqmx-document-notices", role: "status", "aria-live": "polite", "aria-atomic": "false", "data-testid": "markdown-explorer-document-notices", children: [
2305
- p && !n ? /* @__PURE__ */ u(Gt, { kind: "changed", tone: "info", text: s.documentChangedElsewhere(t), onReload: v }) : null,
2306
- k === null ? null : /* @__PURE__ */ u(Gt, { kind: "media-load", tone: "warning", text: k, onReload: b }),
2307
- M === null ? null : /* @__PURE__ */ u(Gt, { kind: "media-unplayable", tone: "warning", text: M, onReload: null })
2306
+ p && !n ? /* @__PURE__ */ d(Gt, { kind: "changed", tone: "info", text: s.documentChangedElsewhere(t), onReload: v }) : null,
2307
+ k === null ? null : /* @__PURE__ */ d(Gt, { kind: "media-load", tone: "warning", text: k, onReload: b }),
2308
+ M === null ? null : /* @__PURE__ */ d(Gt, { kind: "media-unplayable", tone: "warning", text: M, onReload: null })
2308
2309
  ] })
2309
2310
  );
2310
2311
  };
2311
- function Al({
2312
+ function Dl({
2312
2313
  title: e,
2313
2314
  titleId: t,
2314
2315
  ...n
@@ -2329,8 +2330,8 @@ function Al({
2329
2330
  d: "M3.5 12.75a.75.75 0 0 0-1.5 0v2.5A2.75 2.75 0 0 0 4.75 18h10.5A2.75 2.75 0 0 0 18 15.25v-2.5a.75.75 0 0 0-1.5 0v2.5c0 .69-.56 1.25-1.25 1.25H4.75c-.69 0-1.25-.56-1.25-1.25v-2.5Z"
2330
2331
  }));
2331
2332
  }
2332
- const Dl = /* @__PURE__ */ T.forwardRef(Al);
2333
- function Nl({
2333
+ const Nl = /* @__PURE__ */ T.forwardRef(Dl);
2334
+ function Il({
2334
2335
  title: e,
2335
2336
  titleId: t,
2336
2337
  ...n
@@ -2355,17 +2356,17 @@ function Nl({
2355
2356
  clipRule: "evenodd"
2356
2357
  }));
2357
2358
  }
2358
- const Il = /* @__PURE__ */ T.forwardRef(Nl), lt = ({ name: e, openUrl: t, downloadUrl: n, icon: r, children: o }) => {
2359
+ const Pl = /* @__PURE__ */ T.forwardRef(Il), lt = ({ name: e, openUrl: t, downloadUrl: n, icon: r, children: o }) => {
2359
2360
  const { labels: a } = $();
2360
2361
  return /* @__PURE__ */ j("div", { className: "aqmx-document-toolbar", children: [
2361
- /* @__PURE__ */ u("span", { className: "aqmx-document-file-icon", "aria-hidden": "true", children: r }),
2362
- /* @__PURE__ */ u("span", { className: "aqmx-document-title", title: e, "data-testid": "markdown-explorer-file-name", children: e }),
2362
+ /* @__PURE__ */ d("span", { className: "aqmx-document-file-icon", "aria-hidden": "true", children: r }),
2363
+ /* @__PURE__ */ d("span", { className: "aqmx-document-title", title: e, "data-testid": "markdown-explorer-file-name", children: e }),
2363
2364
  o,
2364
- /* @__PURE__ */ u("a", { className: "aqmx-icon-button", href: t, target: "_blank", rel: "noopener noreferrer", "aria-label": a.openInNewTab, title: a.openInNewTab, "data-testid": "markdown-explorer-file-open", children: /* @__PURE__ */ u(Il, {}) }),
2365
- /* @__PURE__ */ u("a", { className: "aqmx-icon-button", href: n, download: e, "aria-label": a.download, title: a.download, "data-testid": "markdown-explorer-file-download", children: /* @__PURE__ */ u(Dl, {}) })
2365
+ /* @__PURE__ */ d("a", { className: "aqmx-icon-button", href: t, target: "_blank", rel: "noopener noreferrer", "aria-label": a.openInNewTab, title: a.openInNewTab, "data-testid": "markdown-explorer-file-open", children: /* @__PURE__ */ d(Pl, {}) }),
2366
+ /* @__PURE__ */ d("a", { className: "aqmx-icon-button", href: n, download: e, "aria-label": a.download, title: a.download, "data-testid": "markdown-explorer-file-download", children: /* @__PURE__ */ d(Nl, {}) })
2366
2367
  ] });
2367
2368
  };
2368
- function Pl({
2369
+ function Fl({
2369
2370
  title: e,
2370
2371
  titleId: t,
2371
2372
  ...n
@@ -2386,47 +2387,47 @@ function Pl({
2386
2387
  clipRule: "evenodd"
2387
2388
  }));
2388
2389
  }
2389
- const Fl = /* @__PURE__ */ T.forwardRef(Pl), $l = Object.freeze({ className: "aqmx-document-stage" }), _l = ({ document: e }) => {
2390
+ const $l = /* @__PURE__ */ T.forwardRef(Fl), _l = Object.freeze({ className: "aqmx-document-stage" }), ql = ({ document: e }) => {
2390
2391
  const { labels: t } = $();
2391
2392
  return /* @__PURE__ */ j("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-file-view", children: [
2392
- /* @__PURE__ */ u(lt, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: /* @__PURE__ */ u(Fl, {}) }),
2393
- /* @__PURE__ */ u(st, { scrollerProps: $l, children: /* @__PURE__ */ j("div", { className: "aqmx-callout", role: "note", "data-testid": "markdown-explorer-file-not-shown", children: [
2394
- /* @__PURE__ */ u("p", { className: "aqmx-callout-body", children: t.fileNotShown }),
2395
- /* @__PURE__ */ u("a", { className: "aqmx-callout-action", href: e.url, download: e.name, "data-testid": "markdown-explorer-file-not-shown-download", children: t.download })
2393
+ /* @__PURE__ */ d(lt, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: /* @__PURE__ */ d($l, {}) }),
2394
+ /* @__PURE__ */ d(st, { scrollerProps: _l, children: /* @__PURE__ */ j("div", { className: "aqmx-callout", role: "note", "data-testid": "markdown-explorer-file-not-shown", children: [
2395
+ /* @__PURE__ */ d("p", { className: "aqmx-callout-body", children: t.fileNotShown }),
2396
+ /* @__PURE__ */ d("a", { className: "aqmx-callout-action", href: e.url, download: e.name, "data-testid": "markdown-explorer-file-not-shown-download", children: t.download })
2396
2397
  ] }) })
2397
2398
  ] });
2398
- }, Zn = ["keydown", "pointerdown", "wheel", "touchstart"], kt = /* @__PURE__ */ new WeakMap(), Mt = /* @__PURE__ */ new WeakMap(), ql = (e) => {
2399
+ }, Gn = ["keydown", "pointerdown", "wheel", "touchstart"], kt = /* @__PURE__ */ new WeakMap(), Mt = /* @__PURE__ */ new WeakMap(), Bl = (e) => {
2399
2400
  const t = Mt.get(e);
2400
2401
  if (t !== void 0) {
2401
2402
  t.count += 1;
2402
2403
  return;
2403
2404
  }
2404
2405
  Mt.set(e, { count: 1, original: e.style.overflowAnchor }), e.style.overflowAnchor = "none";
2405
- }, Bl = (e) => {
2406
+ }, Ul = (e) => {
2406
2407
  const t = Mt.get(e);
2407
2408
  t !== void 0 && (t.count -= 1, !(t.count > 0) && (Mt.delete(e), e.style.overflowAnchor = t.original));
2408
- }, Ul = (e, t, n) => {
2409
+ }, Hl = (e, t, n) => {
2409
2410
  for (let r = t; r !== null && r !== n; r = r.parentElement) {
2410
2411
  e.observe(r);
2411
2412
  for (let o = r.previousElementSibling; o !== null; o = o.previousElementSibling) e.observe(o);
2412
2413
  }
2413
- }, Hl = (e) => {
2414
+ }, zl = (e) => {
2414
2415
  const t = /* @__PURE__ */ new Map();
2415
2416
  for (let n = e.parentElement; n !== null; n = n.parentElement) t.set(n, { top: n.scrollTop, left: n.scrollLeft });
2416
2417
  return t;
2417
- }, zl = (e) => {
2418
+ }, jl = (e) => {
2418
2419
  kt.get(e)?.();
2419
- }, jl = (e, t, n) => {
2420
- zl(e);
2420
+ }, Vl = (e, t, n) => {
2421
+ jl(e);
2421
2422
  let r = /* @__PURE__ */ new Map();
2422
2423
  const o = /* @__PURE__ */ new Set(), a = () => {
2423
- const d = t();
2424
- return d === null ? !1 : (r = Hl(d), !0);
2424
+ const u = t();
2425
+ return u === null ? !1 : (r = zl(u), !0);
2425
2426
  };
2426
2427
  if (!a() || typeof ResizeObserver > "u") return;
2427
2428
  const i = () => {
2428
- for (const d of r.keys())
2429
- !(d instanceof HTMLElement) || o.has(d) || (o.add(d), ql(d));
2429
+ for (const u of r.keys())
2430
+ !(u instanceof HTMLElement) || o.has(u) || (o.add(u), Bl(u));
2430
2431
  };
2431
2432
  i();
2432
2433
  const { ownerDocument: s } = e, f = new ResizeObserver(() => {
@@ -2436,51 +2437,51 @@ const Fl = /* @__PURE__ */ T.forwardRef(Pl), $l = Object.freeze({ className: "aq
2436
2437
  }
2437
2438
  i();
2438
2439
  });
2439
- for (const { element: d, boundary: p } of n) Ul(f, d, p);
2440
- const h = (d) => {
2441
- const p = d.target === s ? s.scrollingElement : d.target;
2440
+ for (const { element: u, boundary: p } of n) Hl(f, u, p);
2441
+ const h = (u) => {
2442
+ const p = u.target === s ? s.scrollingElement : u.target;
2442
2443
  if (!(p instanceof Element)) return;
2443
2444
  const m = r.get(p);
2444
2445
  m !== void 0 && (p.scrollTop !== m.top || p.scrollLeft !== m.left) && w();
2445
2446
  }, w = () => {
2446
2447
  f.disconnect();
2447
- for (const d of Zn) s.removeEventListener(d, w, !0);
2448
+ for (const u of Gn) s.removeEventListener(u, w, !0);
2448
2449
  s.removeEventListener("scroll", h, !0);
2449
- for (const d of o) Bl(d);
2450
+ for (const u of o) Ul(u);
2450
2451
  o.clear(), kt.get(e) === w && kt.delete(e);
2451
2452
  };
2452
- for (const d of Zn) s.addEventListener(d, w, { capture: !0, passive: !0 });
2453
+ for (const u of Gn) s.addEventListener(u, w, { capture: !0, passive: !0 });
2453
2454
  s.addEventListener("scroll", h, { capture: !0, passive: !0 }), kt.set(e, w);
2454
- }, It = "[data-aqmd-scroll-container], [data-aqmx-document-scroller]", Vl = (e) => {
2455
+ }, It = "[data-aqmd-scroll-container], [data-aqmx-document-scroller]", Zl = (e) => {
2455
2456
  const t = e.indexOf("#");
2456
2457
  return t === -1 ? "" : e.slice(t);
2457
- }, Zl = /(%[0-9A-Fa-f]{2})/u, yn = (e) => {
2458
+ }, Gl = /(%[0-9A-Fa-f]{2})/u, yn = (e) => {
2458
2459
  if (!e.startsWith("#") || e.length === 1) return null;
2459
- const t = new TextEncoder(), n = e.slice(1).split(Zl).flatMap((r, o) => o % 2 === 1 ? [Number.parseInt(r.slice(1), 16)] : [...t.encode(r)]);
2460
+ const t = new TextEncoder(), n = e.slice(1).split(Gl).flatMap((r, o) => o % 2 === 1 ? [Number.parseInt(r.slice(1), 16)] : [...t.encode(r)]);
2460
2461
  return new TextDecoder("utf-8", { ignoreBOM: !0 }).decode(Uint8Array.from(n));
2461
- }, mo = (e) => `#${encodeURIComponent(e)}`, Gl = (e) => {
2462
+ }, ho = (e) => `#${encodeURIComponent(e)}`, Wl = (e) => {
2462
2463
  if (e === "#") return !0;
2463
2464
  const t = yn(e);
2464
2465
  return t !== null && t.replace(/[A-Z]/gu, (n) => n.toLowerCase()) === "top";
2465
- }, ho = (e, t) => {
2466
+ }, po = (e, t) => {
2466
2467
  if (t === "") return null;
2467
2468
  for (const n of e.querySelectorAll("[id]"))
2468
2469
  if (n.id === t) return n;
2469
2470
  return null;
2470
- }, Wl = "http://www.w3.org/1999/xhtml", Gn = (e, t) => {
2471
+ }, Kl = "http://www.w3.org/1999/xhtml", Wn = (e, t) => {
2471
2472
  if (t === "") return null;
2472
- const n = ho(e, t);
2473
+ const n = po(e, t);
2473
2474
  if (n !== null) return n;
2474
2475
  for (const r of e.querySelectorAll("a[name]"))
2475
- if (r.localName === "a" && r.namespaceURI === Wl && r.getAttribute("name") === t) return r;
2476
+ if (r.localName === "a" && r.namespaceURI === Kl && r.getAttribute("name") === t) return r;
2476
2477
  return null;
2477
- }, po = (e, t) => {
2478
+ }, wo = (e, t) => {
2478
2479
  if (e === null || !t.startsWith("#")) return null;
2479
- const n = Gn(e, t.slice(1));
2480
+ const n = Wn(e, t.slice(1));
2480
2481
  if (n !== null) return n;
2481
2482
  const r = yn(t);
2482
- return r === null ? null : Gn(e, r);
2483
- }, Wn = (e) => {
2483
+ return r === null ? null : Wn(e, r);
2484
+ }, Kn = (e) => {
2484
2485
  const { body: t, documentElement: n } = e.ownerDocument;
2485
2486
  if (e === t) {
2486
2487
  const o = getComputedStyle(n);
@@ -2488,25 +2489,25 @@ const Fl = /* @__PURE__ */ T.forwardRef(Pl), $l = Object.freeze({ className: "aq
2488
2489
  }
2489
2490
  const { overflowY: r } = getComputedStyle(e);
2490
2491
  return r === "auto" || r === "scroll";
2491
- }, Kl = (e) => {
2492
+ }, Xl = (e) => {
2492
2493
  const { body: t, documentElement: n } = e, r = getComputedStyle(n), o = r.overflowX === "visible" && r.overflowY === "visible" && t !== null ? getComputedStyle(t).overflowY : r.overflowY;
2493
2494
  return o !== "hidden" && o !== "clip";
2494
- }, Xl = (e, t) => {
2495
+ }, Yl = (e, t) => {
2495
2496
  const n = t.closest(It), r = n !== null && e.contains(n) ? n : e;
2496
- if (r.scrollHeight > r.clientHeight && Wn(r)) return r;
2497
+ if (r.scrollHeight > r.clientHeight && Kn(r)) return r;
2497
2498
  const o = e.getBoundingClientRect().height, { documentElement: a, scrollingElement: i } = e.ownerDocument;
2498
2499
  for (let s = e.parentElement; s !== null && s !== a; s = s.parentElement)
2499
- if (Wn(s) && s.scrollHeight > s.clientHeight && s.clientHeight < o) return s;
2500
- return i instanceof Element && Kl(e.ownerDocument) && i.scrollHeight > i.clientHeight && i.clientHeight < o ? i : r;
2501
- }, Yl = Object.freeze({
2502
- scrollerOf: Xl,
2500
+ if (Kn(s) && s.scrollHeight > s.clientHeight && s.clientHeight < o) return s;
2501
+ return i instanceof Element && Xl(e.ownerDocument) && i.scrollHeight > i.clientHeight && i.clientHeight < o ? i : r;
2502
+ }, Jl = Object.freeze({
2503
+ scrollerOf: Yl,
2503
2504
  reveal: (e) => {
2504
2505
  e.scrollIntoView(cn);
2505
2506
  },
2506
2507
  keepAtStart: (e, t) => {
2507
- jl(e, () => t.isConnected ? (Ql(e, t), t) : null, [{ element: t, boundary: e }]);
2508
+ Vl(e, () => t.isConnected ? (ec(e, t), t) : null, [{ element: t, boundary: e }]);
2508
2509
  }
2509
- }), cn = Object.freeze({ block: "nearest", inline: "nearest", behavior: "instant" }), Jl = (e, t) => {
2510
+ }), cn = Object.freeze({ block: "nearest", inline: "nearest", behavior: "instant" }), Ql = (e, t) => {
2510
2511
  for (let n = t; n !== null && n !== e; n = n.parentElement) {
2511
2512
  const r = n.parentElement;
2512
2513
  if (r instanceof HTMLDetailsElement && n !== r.querySelector(":scope > summary") && (r.open = !0), n.getAttribute("hidden")?.toLowerCase() === "until-found") {
@@ -2514,7 +2515,7 @@ const Fl = /* @__PURE__ */ T.forwardRef(Pl), $l = Object.freeze({ className: "aq
2514
2515
  n.removeAttribute("hidden");
2515
2516
  }
2516
2517
  }
2517
- }, Ql = (e, t) => {
2518
+ }, ec = (e, t) => {
2518
2519
  if (t.getClientRects().length === 0) return;
2519
2520
  const n = e === e.ownerDocument.scrollingElement ? 0 : e.getBoundingClientRect().top + e.clientTop, { scrollMarginTop: r, scrollMarginBottom: o } = getComputedStyle(t), a = Number.parseFloat(r), i = t.getBoundingClientRect(), s = i.height + a + Number.parseFloat(o) > e.clientHeight;
2520
2521
  if (!s && Math.abs(i.top - a - n) < 1) {
@@ -2522,15 +2523,15 @@ const Fl = /* @__PURE__ */ T.forwardRef(Pl), $l = Object.freeze({ className: "aq
2522
2523
  return;
2523
2524
  }
2524
2525
  e.scrollBy({ top: s ? i.top - n - e.clientHeight : i.bottom - n + e.clientHeight, behavior: "instant" }), t.scrollIntoView(cn);
2525
- }, ec = (e, t) => {
2526
+ }, tc = (e, t) => {
2526
2527
  const n = t.scrollerOf(e, e.querySelector(It) ?? e);
2527
2528
  n.getClientRects().length !== 0 && (n.scrollTo({ top: 0, left: 0, behavior: "instant" }), t.reveal(n));
2528
- }, Kn = (e, t, n) => {
2529
+ }, Xn = (e, t, n) => {
2529
2530
  if (e === null) return null;
2530
- const r = po(e, t);
2531
- return r === null ? (Gl(t) && ec(e, n), null) : (Jl(e, r), n.keepAtStart(n.scrollerOf(e, r), r), r);
2531
+ const r = wo(e, t);
2532
+ return r === null ? (Wl(t) && tc(e, n), null) : (Ql(e, r), n.keepAtStart(n.scrollerOf(e, r), r), r);
2532
2533
  };
2533
- function tc({
2534
+ function nc({
2534
2535
  title: e,
2535
2536
  titleId: t,
2536
2537
  ...n
@@ -2549,8 +2550,8 @@ function tc({
2549
2550
  d: "M3.28 2.22a.75.75 0 0 0-1.06 1.06L5.44 6.5H2.75a.75.75 0 0 0 0 1.5h4.5A.75.75 0 0 0 8 7.25v-4.5a.75.75 0 0 0-1.5 0v2.69L3.28 2.22ZM13.5 2.75a.75.75 0 0 0-1.5 0v4.5c0 .414.336.75.75.75h4.5a.75.75 0 0 0 0-1.5h-2.69l3.22-3.22a.75.75 0 0 0-1.06-1.06L13.5 5.44V2.75ZM3.28 17.78l3.22-3.22v2.69a.75.75 0 0 0 1.5 0v-4.5a.75.75 0 0 0-.75-.75h-4.5a.75.75 0 0 0 0 1.5h2.69l-3.22 3.22a.75.75 0 1 0 1.06 1.06ZM13.5 14.56l3.22 3.22a.75.75 0 1 0 1.06-1.06l-3.22-3.22h2.69a.75.75 0 0 0 0-1.5h-4.5a.75.75 0 0 0-.75.75v4.5a.75.75 0 0 0 1.5 0v-2.69Z"
2550
2551
  }));
2551
2552
  }
2552
- const nc = /* @__PURE__ */ T.forwardRef(tc);
2553
- function rc({
2553
+ const rc = /* @__PURE__ */ T.forwardRef(nc);
2554
+ function oc({
2554
2555
  title: e,
2555
2556
  titleId: t,
2556
2557
  ...n
@@ -2573,8 +2574,8 @@ function rc({
2573
2574
  clipRule: "evenodd"
2574
2575
  }));
2575
2576
  }
2576
- const oc = /* @__PURE__ */ T.forwardRef(rc);
2577
- function ac({
2577
+ const ac = /* @__PURE__ */ T.forwardRef(oc);
2578
+ function ic({
2578
2579
  title: e,
2579
2580
  titleId: t,
2580
2581
  ...n
@@ -2597,8 +2598,8 @@ function ac({
2597
2598
  clipRule: "evenodd"
2598
2599
  }));
2599
2600
  }
2600
- const ic = /* @__PURE__ */ T.forwardRef(ac);
2601
- function sc({
2601
+ const sc = /* @__PURE__ */ T.forwardRef(ic);
2602
+ function lc({
2602
2603
  title: e,
2603
2604
  titleId: t,
2604
2605
  ...n
@@ -2619,7 +2620,7 @@ function sc({
2619
2620
  clipRule: "evenodd"
2620
2621
  }));
2621
2622
  }
2622
- const lc = /* @__PURE__ */ T.forwardRef(sc), dn = "data-aqmx-key-repeat", un = Object.freeze({ [dn]: "allow" }), cc = `[${dn}="${un[dn]}"]`, dc = () => {
2623
+ const cc = /* @__PURE__ */ T.forwardRef(lc), dn = "data-aqmx-key-repeat", un = Object.freeze({ [dn]: "allow" }), dc = `[${dn}="${un[dn]}"]`, uc = () => {
2623
2624
  let e = null;
2624
2625
  return {
2625
2626
  onKeyDownCapture: (t) => {
@@ -2628,7 +2629,7 @@ const lc = /* @__PURE__ */ T.forwardRef(sc), dn = "data-aqmx-key-repeat", un = O
2628
2629
  e = t.target instanceof Element ? t.target : null;
2629
2630
  return;
2630
2631
  }
2631
- e !== null && t.target === e && e.closest(cc) !== null || (t.preventDefault(), t.stopPropagation());
2632
+ e !== null && t.target === e && e.closest(dc) !== null || (t.preventDefault(), t.stopPropagation());
2632
2633
  }
2633
2634
  },
2634
2635
  onKeyUpCapture: (t) => {
@@ -2638,7 +2639,7 @@ const lc = /* @__PURE__ */ T.forwardRef(sc), dn = "data-aqmx-key-repeat", un = O
2638
2639
  t.target === e && (e = null);
2639
2640
  }
2640
2641
  };
2641
- }, Et = Object.freeze([1 / Ye ** 2, 1 / Ye, 1, Ye, Ye ** 2]), Xn = Object.freeze({ mode: "fit" }), uc = 1, wo = Object.freeze({ className: "aqmx-document-canvas", "data-testid": "markdown-explorer-image-canvas" }), Yn = `[data-testid="${wo["data-testid"]}"]`, fc = ge(null), mc = (e, t) => e.width > 0 && e.height > 0 && t.width - e.width <= uc ? { base: e, scale: t.width / e.width } : t.width > 0 && t.height > 0 ? { base: t, scale: 1 } : null, Jn = (e, t, n) => {
2642
+ }, Et = Object.freeze([1 / Ye ** 2, 1 / Ye, 1, Ye, Ye ** 2]), Yn = Object.freeze({ mode: "fit" }), fc = 1, go = Object.freeze({ className: "aqmx-document-canvas", "data-testid": "markdown-explorer-image-canvas" }), Jn = `[data-testid="${go["data-testid"]}"]`, mc = ge(null), hc = (e, t) => e.width > 0 && e.height > 0 && t.width - e.width <= fc ? { base: e, scale: t.width / e.width } : t.width > 0 && t.height > 0 ? { base: t, scale: 1 } : null, Qn = (e, t, n) => {
2642
2643
  if (e.mode === "level") {
2643
2644
  const o = e.index + n;
2644
2645
  return o >= 0 && o < Et.length ? o : null;
@@ -2646,69 +2647,69 @@ const lc = /* @__PURE__ */ T.forwardRef(sc), dn = "data-aqmx-key-repeat", un = O
2646
2647
  if (t === null || !Number.isFinite(t) || t <= 0) return null;
2647
2648
  const r = n === 1 ? Et.findIndex((o) => o > t) : Et.findLastIndex((o) => o < t);
2648
2649
  return r === -1 ? null : r;
2649
- }, Qn = (e, t, n) => {
2650
+ }, er = (e, t, n) => {
2650
2651
  if (e.mode === "level") {
2651
- const o = Jn(e, null, n);
2652
+ const o = Qn(e, null, n);
2652
2653
  return o === null ? null : { mode: "level", index: o, base: e.base };
2653
2654
  }
2654
2655
  if (t === null) return null;
2655
- const r = Jn(e, t.scale, n);
2656
+ const r = Qn(e, t.scale, n);
2656
2657
  return r === null ? null : { mode: "level", index: r, base: t.base };
2657
- }, hc = (e, t) => {
2658
+ }, pc = (e, t) => {
2658
2659
  if (e <= 0 || t <= 0) return 0;
2659
2660
  const n = Math.trunc(Math.log(t / e) / Math.log(Ye));
2660
2661
  return n === 0 ? 0 : n;
2661
- }, er = (e) => {
2662
+ }, tr = (e) => {
2662
2663
  const t = e[0], n = e[1];
2663
2664
  return e.length !== 2 || t === void 0 || n === void 0 ? null : { distance: Math.hypot(n.clientX - t.clientX, n.clientY - t.clientY), middle: { x: (t.clientX + n.clientX) / 2, y: (t.clientY + n.clientY) / 2 } };
2664
- }, pc = (e) => {
2665
+ }, wc = (e) => {
2665
2666
  const t = Et[e];
2666
2667
  if (t === void 0) throw new RangeError(`[markdown-explorer] no image zoom step ${G(e)}`);
2667
2668
  return t;
2668
- }, tr = (e, t, n) => e !== null && e.width === t && e.height === n ? e : { width: t, height: n }, wc = ({ document: e }) => {
2669
- const { labels: t } = $(), n = se(fc), [r] = V(() => n === null ? null : n.read(e.url)), [o, a] = V(r === null ? Xn : r.zoom), [i, s] = V(r === null ? null : r.reported), [f, h] = V(null), w = z(null), d = _((C) => {
2669
+ }, nr = (e, t, n) => e !== null && e.width === t && e.height === n ? e : { width: t, height: n }, gc = ({ document: e }) => {
2670
+ const { labels: t } = $(), n = se(mc), [r] = V(() => n === null ? null : n.read(e.url)), [o, a] = V(r === null ? Yn : r.zoom), [i, s] = V(r === null ? null : r.reported), [f, h] = V(null), w = z(null), u = _((C) => {
2670
2671
  const { naturalWidth: R, naturalHeight: I } = C;
2671
- s((P) => tr(P, R, I));
2672
+ s((P) => nr(P, R, I));
2672
2673
  }, []), p = _(
2673
2674
  (C) => {
2674
- w.current = C, !(C === null || !C.complete) && (C.naturalWidth > 0 || C.naturalHeight > 0 ? d(C) : C.decode().then(
2675
- () => d(C),
2675
+ w.current = C, !(C === null || !C.complete) && (C.naturalWidth > 0 || C.naturalHeight > 0 ? u(C) : C.decode().then(
2676
+ () => u(C),
2676
2677
  () => {
2677
2678
  }
2678
2679
  ));
2679
2680
  },
2680
- [d]
2681
+ [u]
2681
2682
  );
2682
2683
  ne(() => {
2683
2684
  n !== null && i !== null && n.save(e.url, { zoom: o, reported: i });
2684
2685
  }, [n, e.url, o, i]), K(() => {
2685
2686
  const C = w.current;
2686
2687
  if (C === null || i === null || o.mode !== "fit") return;
2687
- const R = () => h((P) => tr(P, C.clientWidth, C.clientHeight));
2688
+ const R = () => h((P) => nr(P, C.clientWidth, C.clientHeight));
2688
2689
  if (R(), typeof ResizeObserver > "u") return;
2689
2690
  const I = new ResizeObserver(R);
2690
2691
  return I.observe(C), () => I.disconnect();
2691
2692
  }, [i, o.mode]);
2692
- const m = i === null || f === null ? null : mc(i, f), g = Qn(o, m, -1), v = Qn(o, m, 1), b = o.mode === "level" ? pc(o.index) : null, k = z({ zoomIn: v, zoomOut: g });
2693
+ const m = i === null || f === null ? null : hc(i, f), g = er(o, m, -1), v = er(o, m, 1), b = o.mode === "level" ? wc(o.index) : null, k = z({ zoomIn: v, zoomOut: g });
2693
2694
  K(() => {
2694
2695
  k.current = { zoomIn: v, zoomOut: g };
2695
2696
  });
2696
2697
  const M = z(null);
2697
2698
  K(() => {
2698
- const C = M.current, R = w.current?.closest(Yn);
2699
+ const C = M.current, R = w.current?.closest(Jn);
2699
2700
  M.current = null, !(C === null || R === null || R === void 0) && (R.scrollLeft = C.across * R.scrollWidth - C.x, R.scrollTop = C.down * R.scrollHeight - C.y);
2700
2701
  }, [o]), ne(() => {
2701
- const C = w.current?.closest(Yn);
2702
+ const C = w.current?.closest(Jn);
2702
2703
  if (C == null) return;
2703
2704
  let R = null;
2704
2705
  const I = (N) => {
2705
- const H = er(N.touches);
2706
+ const H = tr(N.touches);
2706
2707
  R = H === null ? null : { distance: H.distance, steps: 0 };
2707
2708
  }, P = (N) => {
2708
- const H = er(N.touches);
2709
+ const H = tr(N.touches);
2709
2710
  if (R === null || H === null) return;
2710
2711
  N.preventDefault();
2711
- const W = hc(R.distance, H.distance);
2712
+ const W = pc(R.distance, H.distance);
2712
2713
  if (W === R.steps) return;
2713
2714
  const Y = W > R.steps ? 1 : -1, c = Y === 1 ? k.current.zoomIn : k.current.zoomOut;
2714
2715
  if (c === null) return;
@@ -2724,8 +2725,8 @@ const lc = /* @__PURE__ */ T.forwardRef(sc), dn = "data-aqmx-key-repeat", un = O
2724
2725
  }, []);
2725
2726
  const D = o.mode === "level" && b !== null ? { width: `${o.base.width * b}px`, height: `${o.base.height * b}px` } : void 0;
2726
2727
  return /* @__PURE__ */ j("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-image-view", children: [
2727
- /* @__PURE__ */ j(lt, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: /* @__PURE__ */ u(lc, {}), children: [
2728
- /* @__PURE__ */ u(
2728
+ /* @__PURE__ */ j(lt, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: /* @__PURE__ */ d(cc, {}), children: [
2729
+ /* @__PURE__ */ d(
2729
2730
  "button",
2730
2731
  {
2731
2732
  type: "button",
@@ -2737,11 +2738,11 @@ const lc = /* @__PURE__ */ T.forwardRef(sc), dn = "data-aqmx-key-repeat", un = O
2737
2738
  g !== null && a(g);
2738
2739
  },
2739
2740
  ...un,
2740
- children: /* @__PURE__ */ u(oc, {})
2741
+ children: /* @__PURE__ */ d(ac, {})
2741
2742
  }
2742
2743
  ),
2743
- /* @__PURE__ */ u("output", { className: "aqmx-document-level", "aria-live": "polite", "data-testid": "markdown-explorer-image-level", children: b === null ? t.imageFitLevel : t.imageZoomLevel(Math.round(b * 100)) }),
2744
- /* @__PURE__ */ u(
2744
+ /* @__PURE__ */ d("output", { className: "aqmx-document-level", "aria-live": "polite", "data-testid": "markdown-explorer-image-level", children: b === null ? t.imageFitLevel : t.imageZoomLevel(Math.round(b * 100)) }),
2745
+ /* @__PURE__ */ d(
2745
2746
  "button",
2746
2747
  {
2747
2748
  type: "button",
@@ -2753,54 +2754,54 @@ const lc = /* @__PURE__ */ T.forwardRef(sc), dn = "data-aqmx-key-repeat", un = O
2753
2754
  v !== null && a(v);
2754
2755
  },
2755
2756
  ...un,
2756
- children: /* @__PURE__ */ u(ic, {})
2757
+ children: /* @__PURE__ */ d(sc, {})
2757
2758
  }
2758
2759
  ),
2759
- /* @__PURE__ */ u("button", { type: "button", className: "aqmx-icon-button", "aria-label": t.imageFit, title: t.imageFit, "aria-pressed": o.mode === "fit", onClick: () => a(Xn), children: /* @__PURE__ */ u(nc, {}) })
2760
+ /* @__PURE__ */ d("button", { type: "button", className: "aqmx-icon-button", "aria-label": t.imageFit, title: t.imageFit, "aria-pressed": o.mode === "fit", onClick: () => a(Yn), children: /* @__PURE__ */ d(rc, {}) })
2760
2761
  ] }),
2761
- /* @__PURE__ */ u(st, { scrollerProps: wo, children: /* @__PURE__ */ u("img", { ref: p, className: "aqmx-document-image", src: e.url, alt: e.name, "data-aqmx-image-mode": o.mode, style: D, onLoad: (C) => d(C.currentTarget), "data-testid": "markdown-explorer-image" }) })
2762
+ /* @__PURE__ */ d(st, { scrollerProps: go, children: /* @__PURE__ */ d("img", { ref: p, className: "aqmx-document-image", src: e.url, alt: e.name, "data-aqmx-image-mode": o.mode, style: D, onLoad: (C) => u(C.currentTarget), "data-testid": "markdown-explorer-image" }) })
2762
2763
  ] });
2763
- }, gc = async (e, t, n) => {
2764
+ }, vc = async (e, t, n) => {
2764
2765
  const r = await e.text(t, n);
2765
2766
  if (!("kind" in r)) throw n.reason;
2766
2767
  return r.kind === "text" ? { kind: "text", text: r.text, truncated: r.truncated } : { kind: "failure", retryable: r.failure.reason === "failed" };
2767
- }, go = ge(null), vo = ge(void 0), Pt = ge(void 0), yo = ge(null), Ft = () => {
2768
- const e = se(go);
2768
+ }, vo = ge(null), yo = ge(void 0), Pt = ge(void 0), bo = ge(null), Ft = () => {
2769
+ const e = se(vo);
2769
2770
  if (e === null) throw new Error("[markdown-explorer] document links must be rendered inside a document pane");
2770
2771
  return e;
2771
- }, vc = () => {
2772
- const e = se(yo);
2772
+ }, yc = () => {
2773
+ const e = se(bo);
2773
2774
  if (e === null) throw new Error("[markdown-explorer] table-of-contents entries must be rendered inside a document pane's links");
2774
2775
  return e;
2775
- }, $t = (e, t, n, r) => t.kind === "panel" ? xe(e, { view: "tree", source: n, doc: r }) : t.view === "single" ? xe(e, { view: "single", source: n, doc: r, overrides: t.overrides, embed: t.embed }) : xe(e, { view: "tree", source: n, doc: r, overrides: t.overrides }), bo = (e, t, n, r) => t.view === "tree" ? xe(e, { view: "tree", source: n, doc: r, overrides: t.overrides, maximized: t.maximized() }) : $t(e, t, n, r), yc = ({ children: e }) => {
2776
+ }, $t = (e, t, n, r) => t.kind === "panel" ? xe(e, { view: "tree", source: n, doc: r }) : t.view === "single" ? xe(e, { view: "single", source: n, doc: r, overrides: t.overrides, embed: t.embed }) : xe(e, { view: "tree", source: n, doc: r, overrides: t.overrides }), ko = (e, t, n, r) => t.view === "tree" ? xe(e, { view: "tree", source: n, doc: r, overrides: t.overrides, maximized: t.maximized() }) : $t(e, t, n, r), bc = ({ children: e }) => {
2776
2777
  const { config: t } = $(), n = Ft(), r = At(), o = r.kind === "location" ? r.location.source : void 0, a = at($t(t, n.navigation, o, n.currentPath));
2777
- return /* @__PURE__ */ u(Pt, { value: o, children: /* @__PURE__ */ u(yo, { value: a, children: e }) });
2778
- }, bc = 'a[data-link-kind="doc"][data-doc-path]:not([data-doc-exists="false"])', kc = (e) => {
2779
- const t = e instanceof Element ? e.closest(bc) : null;
2778
+ return /* @__PURE__ */ d(Pt, { value: o, children: /* @__PURE__ */ d(bo, { value: a, children: e }) });
2779
+ }, kc = 'a[data-link-kind="doc"][data-doc-path]:not([data-doc-exists="false"])', Ec = (e) => {
2780
+ const t = e instanceof Element ? e.closest(kc) : null;
2780
2781
  return t === null ? null : t.getAttribute("data-doc-path");
2781
- }, ct = (e) => !e.defaultPrevented && e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey, Ec = ({ to: e, docPath: t, fragment: n, exists: r, className: o, attributes: a, onDocumentLink: i, scope: s, children: f }) => {
2782
+ }, ct = (e) => !e.defaultPrevented && e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey, Sc = ({ to: e, docPath: t, fragment: n, exists: r, className: o, attributes: a, onDocumentLink: i, scope: s, children: f }) => {
2782
2783
  const h = at(e);
2783
- return /* @__PURE__ */ u("a", { ...a, href: h, className: o, "data-link-kind": "doc", "data-doc-path": t, "data-doc-exists": r, onClick: (d) => {
2784
- if (ct(d)) {
2785
- if (d.preventDefault(), t === s.currentPath && n !== "") {
2784
+ return /* @__PURE__ */ d("a", { ...a, href: h, className: o, "data-link-kind": "doc", "data-doc-path": t, "data-doc-exists": r, onClick: (u) => {
2785
+ if (ct(u)) {
2786
+ if (u.preventDefault(), t === s.currentPath && n !== "") {
2786
2787
  s.scrollWithin(n);
2787
2788
  return;
2788
2789
  }
2789
2790
  i(t, n);
2790
2791
  }
2791
2792
  }, children: f });
2792
- }, Sc = ({ href: e, docPath: t, docExists: n, className: r, attributes: o, children: a }) => {
2793
- const { config: i } = $(), s = Ft(), f = se(Pt), h = ze(), w = Vl(e), { navigation: d } = s, p = `${$t(i, d, f, t)}${w}`, m = n === !1 ? "false" : void 0;
2794
- return d.kind === "page" ? /* @__PURE__ */ u(Zs, { ...o, to: p, navigation: "follow-link", className: r, "data-link-kind": "doc", "data-doc-path": t, "data-doc-exists": m, onClick: (v) => {
2793
+ }, xc = ({ href: e, docPath: t, docExists: n, className: r, attributes: o, children: a }) => {
2794
+ const { config: i } = $(), s = Ft(), f = se(Pt), h = ze(), w = Zl(e), { navigation: u } = s, p = `${$t(i, u, f, t)}${w}`, m = n === !1 ? "false" : void 0;
2795
+ return u.kind === "page" ? /* @__PURE__ */ d(Gs, { ...o, to: p, navigation: "follow-link", className: r, "data-link-kind": "doc", "data-doc-path": t, "data-doc-exists": m, onClick: (v) => {
2795
2796
  if (!ct(v)) return;
2796
- const b = `${bo(i, d, f, t)}${w}`;
2797
+ const b = `${ko(i, u, f, t)}${w}`;
2797
2798
  b !== p && (v.preventDefault(), h(b, "follow-link"));
2798
- }, children: a }) : /* @__PURE__ */ u(Ec, { to: p, docPath: t, fragment: w, exists: m, className: r, attributes: o, onDocumentLink: d.onDocumentLink, scope: s, children: a });
2799
- }, xc = ({ className: e, attributes: t, children: n }) => {
2800
- const { labels: r, locale: o } = $(), a = se(vo), { lang: i, dir: s, ...f } = t, h = i ?? a;
2799
+ }, children: a }) : /* @__PURE__ */ d(Sc, { to: p, docPath: t, fragment: w, exists: m, className: r, attributes: o, onDocumentLink: u.onDocumentLink, scope: s, children: a });
2800
+ }, Tc = ({ className: e, attributes: t, children: n }) => {
2801
+ const { labels: r, locale: o } = $(), a = se(yo), { lang: i, dir: s, ...f } = t, h = i ?? a;
2801
2802
  return (
2802
2803
  /* @__PURE__ */ j("a", { ...f, className: e === void 0 ? "aqmx-document-inert-link" : `${e} aqmx-document-inert-link`, title: r.inertLink, lang: h === void 0 ? void 0 : o, "data-link-kind": "doc", "data-doc-exists": "false", children: [
2803
- /* @__PURE__ */ u("span", { lang: h, dir: s, children: n }),
2804
+ /* @__PURE__ */ d("span", { lang: h, dir: s, children: n }),
2804
2805
  /* @__PURE__ */ j("span", { className: "aqmx-sr-only", children: [
2805
2806
  " (",
2806
2807
  r.inertLink,
@@ -2808,32 +2809,32 @@ const lc = /* @__PURE__ */ T.forwardRef(sc), dn = "data-aqmx-key-repeat", un = O
2808
2809
  ] })
2809
2810
  ] })
2810
2811
  );
2811
- }, Tc = ({ href: e, className: t, attributes: n, scope: r, children: o }) => {
2812
+ }, Cc = ({ href: e, className: t, attributes: n, scope: r, children: o }) => {
2812
2813
  const { config: a } = $(), i = se(Pt), s = at(`${$t(a, r.navigation, i, r.currentPath)}${e}`);
2813
- return /* @__PURE__ */ u("a", { ...n, href: s, className: t, onClick: (h) => {
2814
+ return /* @__PURE__ */ d("a", { ...n, href: s, className: t, onClick: (h) => {
2814
2815
  ct(h) && (h.preventDefault(), r.scrollWithin(e));
2815
2816
  }, children: o });
2816
- }, Cc = ({ href: e, className: t, attributes: n, children: r }) => {
2817
+ }, Rc = ({ href: e, className: t, attributes: n, children: r }) => {
2817
2818
  const o = Ft();
2818
- return o.navigation.kind === "page" ? /* @__PURE__ */ u("a", { ...n, href: e, className: t, onClick: (i) => {
2819
+ return o.navigation.kind === "page" ? /* @__PURE__ */ d("a", { ...n, href: e, className: t, onClick: (i) => {
2819
2820
  ct(i) && (e === "#" ? o.followEmptyFragment(i.nativeEvent) : o.followFragmentJump(e, i.nativeEvent));
2820
- }, children: r }) : /* @__PURE__ */ u(Tc, { href: e, className: t, attributes: n, scope: o, children: r });
2821
- }, Rc = ({ href: e, kind: t, docPath: n, docExists: r, className: o, attributes: a, children: i }) => t === "doc" ? n === void 0 || !Ta(n) ? /* @__PURE__ */ u(xc, { className: o, attributes: a, children: i }) : /* @__PURE__ */ u(Sc, { href: e, docPath: n, docExists: r, className: o, attributes: a, children: i }) : e.startsWith("#") ? /* @__PURE__ */ u(Cc, { href: e, className: o, attributes: a, children: i }) : /* @__PURE__ */ u("a", { ...a, href: e, className: o, children: i }), Mc = () => {
2821
+ }, children: r }) : /* @__PURE__ */ d(Cc, { href: e, className: t, attributes: n, scope: o, children: r });
2822
+ }, Mc = ({ href: e, kind: t, docPath: n, docExists: r, className: o, attributes: a, children: i }) => t === "doc" ? n === void 0 || !Ca(n) ? /* @__PURE__ */ d(Tc, { className: o, attributes: a, children: i }) : /* @__PURE__ */ d(xc, { href: e, docPath: n, docExists: r, className: o, attributes: a, children: i }) : e.startsWith("#") ? /* @__PURE__ */ d(Rc, { href: e, className: o, attributes: a, children: i }) : /* @__PURE__ */ d("a", { ...a, href: e, className: o, children: i }), Oc = () => {
2822
2823
  const { config: e } = $(), t = Ft(), n = se(Pt), r = ze();
2823
2824
  return _(
2824
2825
  (o, a) => {
2825
2826
  if (!ct(a)) return !0;
2826
2827
  a.preventDefault();
2827
- const i = mo(o.id), { navigation: s } = t;
2828
- return s.kind === "panel" || yn(a.currentTarget.ownerDocument.location.hash) === o.id ? (t.scrollWithin(i), !0) : (r(`${bo(e, s, n, t.currentPath)}${i}`, "follow-link"), !0);
2828
+ const i = ho(o.id), { navigation: s } = t;
2829
+ return s.kind === "panel" || yn(a.currentTarget.ownerDocument.location.hash) === o.id ? (t.scrollWithin(i), !0) : (r(`${ko(e, s, n, t.currentPath)}${i}`, "follow-link"), !0);
2829
2830
  },
2830
2831
  [e, t, n, r]
2831
2832
  );
2832
- }, Oc = () => {
2833
- const e = vc();
2834
- return _((t) => `${e}${mo(t.id)}`, [e]);
2833
+ }, Lc = () => {
2834
+ const e = yc();
2835
+ return _((t) => `${e}${ho(t.id)}`, [e]);
2835
2836
  };
2836
- function Lc({
2837
+ function Ac({
2837
2838
  title: e,
2838
2839
  titleId: t,
2839
2840
  ...n
@@ -2852,8 +2853,8 @@ function Lc({
2852
2853
  d: "M3 3.5A1.5 1.5 0 0 1 4.5 2h6.879a1.5 1.5 0 0 1 1.06.44l4.122 4.12A1.5 1.5 0 0 1 17 7.622V16.5a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 3 16.5v-13Z"
2853
2854
  }));
2854
2855
  }
2855
- const Ac = /* @__PURE__ */ T.forwardRef(Lc);
2856
- function Dc({
2856
+ const Dc = /* @__PURE__ */ T.forwardRef(Ac);
2857
+ function Nc({
2857
2858
  title: e,
2858
2859
  titleId: t,
2859
2860
  ...n
@@ -2874,8 +2875,8 @@ function Dc({
2874
2875
  clipRule: "evenodd"
2875
2876
  }));
2876
2877
  }
2877
- const Nc = /* @__PURE__ */ T.forwardRef(Dc);
2878
- function Ic({
2878
+ const Ic = /* @__PURE__ */ T.forwardRef(Nc);
2879
+ function Pc({
2879
2880
  title: e,
2880
2881
  titleId: t,
2881
2882
  ...n
@@ -2896,50 +2897,50 @@ function Ic({
2896
2897
  clipRule: "evenodd"
2897
2898
  }));
2898
2899
  }
2899
- const Pc = /* @__PURE__ */ T.forwardRef(Ic), Fc = Object.freeze({ className: "aqmx-document-stage" }), $c = () => () => {
2900
- }, _c = () => navigator.pdfViewerEnabled !== !1, qc = () => null, Bc = ({ document: e }) => {
2901
- const { labels: t, mediaFailures: n } = $(), r = oe($c, _c, qc), o = _(() => n.pdfGeneration(e.url), [n, e.url]), a = oe(n.subscribe, o, o), i = _((s) => n.registerPdfFrame(e.url, s), [n, e.url]);
2902
- return r === null ? null : r ? /* @__PURE__ */ u("iframe", { ref: i, className: "aqmx-document-frame", src: e.url, title: e.name, "data-testid": "markdown-explorer-media-player" }, a) : /* @__PURE__ */ j("div", { className: "aqmx-callout", role: "note", "data-testid": "markdown-explorer-pdf-not-shown", children: [
2903
- /* @__PURE__ */ u("p", { className: "aqmx-callout-body", children: t.pdfNotShown }),
2900
+ const Fc = /* @__PURE__ */ T.forwardRef(Pc), $c = Object.freeze({ className: "aqmx-document-stage" }), _c = () => () => {
2901
+ }, qc = () => navigator.pdfViewerEnabled !== !1, Bc = () => null, Uc = ({ document: e }) => {
2902
+ const { labels: t, mediaFailures: n } = $(), r = oe(_c, qc, Bc), o = _(() => n.pdfGeneration(e.url), [n, e.url]), a = oe(n.subscribe, o, o), i = _((s) => n.registerPdfFrame(e.url, s), [n, e.url]);
2903
+ return r === null ? null : r ? /* @__PURE__ */ d("iframe", { ref: i, className: "aqmx-document-frame", src: e.url, title: e.name, "data-testid": "markdown-explorer-media-player" }, a) : /* @__PURE__ */ j("div", { className: "aqmx-callout", role: "note", "data-testid": "markdown-explorer-pdf-not-shown", children: [
2904
+ /* @__PURE__ */ d("p", { className: "aqmx-callout-body", children: t.pdfNotShown }),
2904
2905
  /* @__PURE__ */ j("div", { className: "aqmx-callout-actions", children: [
2905
- /* @__PURE__ */ u("a", { className: "aqmx-callout-action", href: e.url, target: "_blank", rel: "noopener noreferrer", "data-testid": "markdown-explorer-pdf-not-shown-open", children: t.openInNewTab }),
2906
- /* @__PURE__ */ u("a", { className: "aqmx-callout-action", href: e.url, download: e.name, "data-testid": "markdown-explorer-pdf-not-shown-download", children: t.download })
2906
+ /* @__PURE__ */ d("a", { className: "aqmx-callout-action", href: e.url, target: "_blank", rel: "noopener noreferrer", "data-testid": "markdown-explorer-pdf-not-shown-open", children: t.openInNewTab }),
2907
+ /* @__PURE__ */ d("a", { className: "aqmx-callout-action", href: e.url, download: e.name, "data-testid": "markdown-explorer-pdf-not-shown-download", children: t.download })
2907
2908
  ] })
2908
2909
  ] });
2909
- }, Uc = (e) => {
2910
+ }, Hc = (e) => {
2910
2911
  switch (e) {
2911
2912
  case "video":
2912
- return /* @__PURE__ */ u(Nc, {});
2913
+ return /* @__PURE__ */ d(Ic, {});
2913
2914
  case "audio":
2914
- return /* @__PURE__ */ u(Pc, {});
2915
+ return /* @__PURE__ */ d(Fc, {});
2915
2916
  case "pdf":
2916
- return /* @__PURE__ */ u(Ac, {});
2917
+ return /* @__PURE__ */ d(Dc, {});
2917
2918
  default: {
2918
2919
  const t = e;
2919
2920
  throw new RangeError(`[markdown-explorer] unknown media type ${G(t)}`);
2920
2921
  }
2921
2922
  }
2922
- }, Hc = ({ document: e }) => {
2923
+ }, zc = ({ document: e }) => {
2923
2924
  const { labels: t } = $();
2924
2925
  switch (e.mediaType) {
2925
2926
  case "video":
2926
2927
  return (
2927
- /* @__PURE__ */ u("video", { className: "aqmx-document-video", src: e.url, controls: !0, preload: "metadata", "aria-label": e.name, "data-testid": "markdown-explorer-media-player", children: t.mediaUnsupported })
2928
+ /* @__PURE__ */ d("video", { className: "aqmx-document-video", src: e.url, controls: !0, preload: "metadata", "aria-label": e.name, "data-testid": "markdown-explorer-media-player", children: t.mediaUnsupported })
2928
2929
  );
2929
2930
  case "audio":
2930
2931
  return (
2931
- /* @__PURE__ */ u("audio", { className: "aqmx-document-audio", src: e.url, controls: !0, preload: "metadata", "aria-label": e.name, "data-testid": "markdown-explorer-media-player", children: t.mediaUnsupported })
2932
+ /* @__PURE__ */ d("audio", { className: "aqmx-document-audio", src: e.url, controls: !0, preload: "metadata", "aria-label": e.name, "data-testid": "markdown-explorer-media-player", children: t.mediaUnsupported })
2932
2933
  );
2933
2934
  case "pdf":
2934
- return /* @__PURE__ */ u(Bc, { document: e });
2935
+ return /* @__PURE__ */ d(Uc, { document: e });
2935
2936
  default: {
2936
2937
  const n = e.mediaType;
2937
2938
  throw new RangeError(`[markdown-explorer] unknown media type ${G(n)}`);
2938
2939
  }
2939
2940
  }
2940
- }, zc = ({ document: e }) => /* @__PURE__ */ j("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-media-view", "data-aqmx-media-type": e.mediaType, children: [
2941
- /* @__PURE__ */ u(lt, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: Uc(e.mediaType) }),
2942
- /* @__PURE__ */ u(st, { scrollerProps: Fc, children: /* @__PURE__ */ u(Hc, { document: e }) })
2941
+ }, jc = ({ document: e }) => /* @__PURE__ */ j("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-media-view", "data-aqmx-media-type": e.mediaType, children: [
2942
+ /* @__PURE__ */ d(lt, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: Hc(e.mediaType) }),
2943
+ /* @__PURE__ */ d(st, { scrollerProps: $c, children: /* @__PURE__ */ d(zc, { document: e }) })
2943
2944
  ] }), bn = (e) => {
2944
2945
  switch (e.kind) {
2945
2946
  case "markdown":
@@ -2951,14 +2952,14 @@ const Pc = /* @__PURE__ */ T.forwardRef(Ic), Fc = Object.freeze({ className: "aq
2951
2952
  default:
2952
2953
  return null;
2953
2954
  }
2954
- }, jc = (e) => {
2955
+ }, Vc = (e) => {
2955
2956
  const { documents: t } = $(), n = _(() => t.peek(e), [t, e]), r = _(() => t.peekSeeded(e), [t, e]), o = oe(t.subscribe, n, r), a = Te(o);
2956
2957
  return a === null ? null : bn(a.document);
2957
- }, Vc = (e) => {
2958
+ }, Zc = (e) => {
2958
2959
  const { config: t } = $(), n = ze(), r = _(() => n(xe(t, { ...e, markup: !e.markup }), "browse"), [t, n, e]);
2959
2960
  return Q(() => ({ shown: e.markup, toggle: r }), [e.markup, r]);
2960
2961
  };
2961
- function Zc({
2962
+ function Gc({
2962
2963
  title: e,
2963
2964
  titleId: t,
2964
2965
  ...n
@@ -2979,16 +2980,16 @@ function Zc({
2979
2980
  clipRule: "evenodd"
2980
2981
  }));
2981
2982
  }
2982
- const Gc = /* @__PURE__ */ T.forwardRef(Zc), Wc = 100, Kc = 32767, St = Object.freeze({ maxCells: Dn, maxColumns: Dn / Wc, maxCellLength: Kc }), ko = 44, Eo = 10, So = 13, vt = '"', nr = (e, t) => {
2983
+ const Wc = /* @__PURE__ */ T.forwardRef(Gc), Kc = 100, Xc = 32767, St = Object.freeze({ maxCells: Dn, maxColumns: Dn / Kc, maxCellLength: Xc }), Eo = 44, So = 10, xo = 13, vt = '"', rr = (e, t) => {
2983
2984
  let n = t;
2984
2985
  for (; n < e.length; ) {
2985
2986
  const r = e.charCodeAt(n);
2986
- if (r === ko || r === Eo || r === So) return n;
2987
+ if (r === Eo || r === So || r === xo) return n;
2987
2988
  n += 1;
2988
2989
  }
2989
2990
  return n;
2990
2991
  };
2991
- function* Xc(e, t) {
2992
+ function* Yc(e, t) {
2992
2993
  let n = [], r = 0;
2993
2994
  for (; ; ) {
2994
2995
  let o;
@@ -3008,10 +3009,10 @@ function* Xc(e, t) {
3008
3009
  r = f + 1;
3009
3010
  break;
3010
3011
  }
3011
- const s = nr(e, r);
3012
+ const s = rr(e, r);
3012
3013
  o += e.slice(r, s), r = s;
3013
3014
  } else {
3014
- const i = nr(e, r);
3015
+ const i = rr(e, r);
3015
3016
  o = e.slice(r, i), r = i;
3016
3017
  }
3017
3018
  if (n.push(o), r >= e.length) {
@@ -3019,15 +3020,15 @@ function* Xc(e, t) {
3019
3020
  return;
3020
3021
  }
3021
3022
  const a = e.charCodeAt(r);
3022
- if (r += 1, a !== ko && (yield n, n = [], a === So && e.charCodeAt(r) === Eo && (r += 1), r >= e.length))
3023
+ if (r += 1, a !== Eo && (yield n, n = [], a === xo && e.charCodeAt(r) === So && (r += 1), r >= e.length))
3023
3024
  return;
3024
3025
  }
3025
3026
  }
3026
- const Yc = (e, t, n) => t === "csv" ? Xc(e, n) : n === "whole" ? Xa(e) : Ya(e), Jc = (e, t) => {
3027
+ const Jc = (e, t, n) => t === "csv" ? Yc(e, n) : n === "whole" ? Ya(e) : Ja(e), Qc = (e, t) => {
3027
3028
  if (e.length <= t) return e;
3028
3029
  const n = e.charCodeAt(t - 1);
3029
3030
  return e.slice(0, n >= 55296 && n <= 56319 ? t - 1 : t);
3030
- }, xo = (e, t) => {
3031
+ }, To = (e, t) => {
3031
3032
  const n = [];
3032
3033
  let r = 0, o = !1, a = !1;
3033
3034
  for (const s of e) {
@@ -3036,17 +3037,17 @@ const Yc = (e, t, n) => t === "csv" ? Xc(e, n) : n === "whole" ? Xa(e) : Ya(e),
3036
3037
  a = !0;
3037
3038
  break;
3038
3039
  }
3039
- const w = f.some((d) => d.length > t.maxCellLength) ? f.map((d) => Jc(d, t.maxCellLength)) : f;
3040
+ const w = f.some((u) => u.length > t.maxCellLength) ? f.map((u) => Qc(u, t.maxCellLength)) : f;
3040
3041
  w !== s && (o = !0), n.push(w), r = h;
3041
3042
  }
3042
3043
  return { rows: n.map((s) => s.length === r ? s : [...s, ...Array(r - s.length).fill("")]), truncated: a || o, full: a };
3043
3044
  }, Wt = (e, t, n, r, o) => {
3044
- const a = ha(e, t, r);
3045
- if (a === null) return { kind: "unreadable", code: "encoding", encodings: pa(e, t, r) };
3045
+ const a = pa(e, t, r);
3046
+ if (a === null) return { kind: "unreadable", code: "encoding", encodings: wa(e, t, r) };
3046
3047
  if (a.includes("\0")) return { kind: "unreadable", code: "binary" };
3047
- const i = xo(Yc(a, n, t ? "whole" : "prefix"), o);
3048
+ const i = To(Jc(a, n, t ? "whole" : "prefix"), o);
3048
3049
  return t ? i.truncated || i.rows.some((s) => s.some((f) => f !== "")) ? { kind: "table", table: i } : { kind: "empty" } : i.rows.length === 0 ? { kind: "unreadable", code: "long-row" } : { kind: "table", table: { ...i, truncated: !0 } };
3049
- }, Qc = Object.freeze({ maxPartBytes: 64 * 1024 * 1024, maxSheets: 256 }), To = (e) => {
3050
+ }, ed = Object.freeze({ maxPartBytes: 64 * 1024 * 1024, maxSheets: 256 }), Co = (e) => {
3050
3051
  const t = [];
3051
3052
  let n = 0, r = !1;
3052
3053
  const o = (a) => {
@@ -3058,28 +3059,28 @@ const Yc = (e, t, n) => t === "csv" ? Xc(e, n) : n === "whole" ? Xa(e) : Ya(e),
3058
3059
  addRow: (a, i, s) => {
3059
3060
  if (i.size === 0 || r) return;
3060
3061
  let f = -1;
3061
- for (const d of i.keys()) d > f && (f = d);
3062
+ for (const u of i.keys()) u > f && (f = u);
3062
3063
  const h = Array(Math.min(f, e.maxColumns) + 1).fill("");
3063
- for (const [d, p] of i) d <= e.maxColumns && (h[d] = p);
3064
+ for (const [u, p] of i) u <= e.maxColumns && (h[u] = p);
3064
3065
  const w = Math.min(h.length, e.maxColumns);
3065
3066
  if (n === 0 && (a + 1) * w > e.maxCells) {
3066
- const d = Math.floor(e.maxCells / w);
3067
- for (; t.length < d; ) t.push([]);
3067
+ const u = Math.floor(e.maxCells / w);
3068
+ for (; t.length < u; ) t.push([]);
3068
3069
  o(h);
3069
3070
  return;
3070
3071
  }
3071
3072
  for (; t.length < a && !r; ) o([]);
3072
- for (let d = 0; d < s && !r; d += 1) o(d === 0 ? h : [...h]);
3073
+ for (let u = 0; u < s && !r; u += 1) o(u === 0 ? h : [...h]);
3073
3074
  },
3074
3075
  full: () => r,
3075
- table: () => xo(t, e)
3076
+ table: () => To(t, e)
3076
3077
  };
3077
- }, ed = (e) => {
3078
+ }, td = (e) => {
3078
3079
  const t = Array.from(e.currentTarget.querySelectorAll('[role="tab"]')), n = e.target instanceof HTMLButtonElement ? t.indexOf(e.target) : -1;
3079
3080
  if (n === -1) return;
3080
3081
  const r = getComputedStyle(e.currentTarget).direction === "rtl" ? "ArrowRight" : "ArrowLeft", o = r === "ArrowLeft" ? "ArrowRight" : "ArrowLeft", a = e.key === o ? (n + 1) % t.length : e.key === r ? (n - 1 + t.length) % t.length : e.key === "Home" ? 0 : e.key === "End" ? t.length - 1 : null;
3081
3082
  a !== null && (e.preventDefault(), t[a]?.focus());
3082
- }, td = ({ names: e, selected: t, onSelect: n, label: r, tabIdOf: o, panelId: a }) => /* @__PURE__ */ u("div", { role: "tablist", "aria-label": r, className: "aqmx-sheet-tabs", "data-testid": "markdown-explorer-spreadsheet-sheets", onKeyDown: ed, children: e.map((i, s) => /* @__PURE__ */ u(
3083
+ }, nd = ({ names: e, selected: t, onSelect: n, label: r, tabIdOf: o, panelId: a }) => /* @__PURE__ */ d("div", { role: "tablist", "aria-label": r, className: "aqmx-sheet-tabs", "data-testid": "markdown-explorer-spreadsheet-sheets", onKeyDown: td, children: e.map((i, s) => /* @__PURE__ */ d(
3083
3084
  "button",
3084
3085
  {
3085
3086
  type: "button",
@@ -3094,8 +3095,8 @@ const Yc = (e, t, n) => t === "csv" ? Xc(e, n) : n === "whole" ? Xa(e) : Ya(e),
3094
3095
  children: i
3095
3096
  },
3096
3097
  s
3097
- )) }), Co = 64 * 1024, nd = (e) => {
3098
- let t = new Uint8Array(Math.min(e, Co)), n = 0;
3098
+ )) }), Ro = 64 * 1024, rd = (e) => {
3099
+ let t = new Uint8Array(Math.min(e, Ro)), n = 0;
3099
3100
  return {
3100
3101
  append: (r) => {
3101
3102
  if (n + r.byteLength > t.byteLength) {
@@ -3107,22 +3108,22 @@ const Yc = (e, t, n) => t === "csv" ? Xc(e, n) : n === "whole" ? Xa(e) : Ya(e),
3107
3108
  bytes: () => t.subarray(0, n),
3108
3109
  length: () => n
3109
3110
  };
3110
- }, rd = async (e) => {
3111
+ }, od = async (e) => {
3111
3112
  for (; ; ) {
3112
3113
  const { done: t, value: n } = await e.read();
3113
3114
  if (t) return !0;
3114
3115
  if (n.byteLength > 0) return !1;
3115
3116
  }
3116
- }, od = async (e, t) => {
3117
- const { format: n, legacyEncoding: r, maxBytes: o, budget: a } = t, i = e.getReader(), s = nd(o);
3118
- let f = Co;
3117
+ }, ad = async (e, t) => {
3118
+ const { format: n, legacyEncoding: r, maxBytes: o, budget: a } = t, i = e.getReader(), s = rd(o);
3119
+ let f = Ro;
3119
3120
  try {
3120
3121
  for (; ; ) {
3121
3122
  const { done: h, value: w } = await i.read();
3122
3123
  if (h) return Wt(s.bytes(), !0, n, r, a);
3123
- const d = o - s.length();
3124
- if (s.append(w.byteLength > d ? w.subarray(0, d) : w), s.length() === o) {
3125
- const m = w.byteLength <= d && await rd(i);
3124
+ const u = o - s.length();
3125
+ if (s.append(w.byteLength > u ? w.subarray(0, u) : w), s.length() === o) {
3126
+ const m = w.byteLength <= u && await od(i);
3126
3127
  return Wt(s.bytes(), m, n, r, a);
3127
3128
  }
3128
3129
  if (s.length() < f) continue;
@@ -3134,25 +3135,25 @@ const Yc = (e, t, n) => t === "csv" ? Xc(e, n) : n === "whole" ? Xa(e) : Ya(e),
3134
3135
  i.cancel().catch(() => {
3135
3136
  });
3136
3137
  }
3137
- }, Ro = async (e, t, n, r) => {
3138
+ }, Mo = async (e, t, n, r) => {
3138
3139
  const o = await e.asset(Lt(t), r);
3139
3140
  if (o.status === "cancelled") return null;
3140
3141
  if (o.status === "error") return { kind: "failure", failure: o.failure };
3141
3142
  let a;
3142
3143
  try {
3143
- a = await od(o.body, n);
3144
+ a = await ad(o.body, n);
3144
3145
  } catch {
3145
3146
  return r.aborted ? null : { kind: "failure", failure: { reason: "failed" } };
3146
3147
  }
3147
3148
  return r.aborted ? null : a.kind === "table" ? { kind: "table", rows: a.table.rows, truncated: a.table.truncated } : a;
3148
3149
  }, kn = (e, t, n) => {
3149
- const { documents: r, labels: o } = $(), a = Cl(), i = _(() => r.answerStampOf(e), [r, e]), s = oe(r.subscribe, i, i), [f, h] = V(0), w = Q(() => ({ read: n, stamp: s, attempt: f }), [n, s, f]), [d, p] = V({ settled: null, shown: null, failure: null }), m = z(null), g = pe((k, M) => {
3150
+ const { documents: r, labels: o } = $(), a = Rl(), i = _(() => r.answerStampOf(e), [r, e]), s = oe(r.subscribe, i, i), [f, h] = V(0), w = Q(() => ({ read: n, stamp: s, attempt: f }), [n, s, f]), [u, p] = V({ settled: null, shown: null, failure: null }), m = z(null), g = pe((k, M) => {
3150
3151
  if (m.current?.settle(M.stamp, k.kind === "failure" ? k.failure : null), k.kind === "read") {
3151
3152
  p({ settled: M, shown: k.value, failure: null });
3152
3153
  return;
3153
3154
  }
3154
- if (d.shown !== null) {
3155
- p({ settled: M, shown: d.shown, failure: null });
3155
+ if (u.shown !== null) {
3156
+ p({ settled: M, shown: u.shown, failure: null });
3156
3157
  return;
3157
3158
  }
3158
3159
  p({ settled: M, shown: null, failure: k.failure });
@@ -3170,19 +3171,19 @@ const Yc = (e, t, n) => t === "csv" ? Xc(e, n) : n === "whole" ? Xa(e) : Ya(e),
3170
3171
  M !== null && !k.signal.aborted && g(M, w);
3171
3172
  }), () => k.abort();
3172
3173
  }, [w]);
3173
- const v = d.settled !== w && (d.shown !== null || d.failure !== null);
3174
+ const v = u.settled !== w && (u.shown !== null || u.failure !== null);
3174
3175
  K(() => v ? a.holdBusy() : void 0, [v, a]);
3175
3176
  const b = _(() => h((k) => k + 1), []);
3176
- return { shown: d.shown, failure: d.failure, retry: b };
3177
- }, Mo = (e, t) => {
3177
+ return { shown: u.shown, failure: u.failure, retry: b };
3178
+ }, Oo = (e, t) => {
3178
3179
  const n = {};
3179
3180
  for (const r of Object.keys(xt[t])) {
3180
3181
  const o = e[wn(r)];
3181
3182
  o !== xt[t][r].text && (n[r] = o);
3182
3183
  }
3183
3184
  return n;
3184
- }, ad = (e, t) => Object.fromEntries(Object.entries(Mo(e, t)).map(([n, r]) => [`spreadsheet${n.charAt(0).toUpperCase()}${n.slice(1)}`, r])), id = (e, t) => ({
3185
- ...ad(e, t),
3185
+ }, id = (e, t) => Object.fromEntries(Object.entries(Oo(e, t)).map(([n, r]) => [`spreadsheet${n.charAt(0).toUpperCase()}${n.slice(1)}`, r])), sd = (e, t) => ({
3186
+ ...id(e, t),
3186
3187
  loading: e.viewerLoading,
3187
3188
  errorPrefix: e.viewerErrorPrefix,
3188
3189
  styleTitle: e.viewerStyleTitle,
@@ -3301,22 +3302,22 @@ const Yc = (e, t, n) => t === "csv" ? Xc(e, n) : n === "whole" ? Xa(e) : Ya(e),
3301
3302
  displayMathCopy: e.viewerDisplayMathCopy,
3302
3303
  displayMathCopied: e.viewerDisplayMathCopied,
3303
3304
  displayMathCopyFailed: e.viewerDisplayMathCopyFailed
3304
- }), Oo = (e, t, n) => t !== void 0 ? t : n !== void 0 ? n : e.defaultDocumentStyle, Lo = (e, t) => e !== void 0 ? e : t !== void 0 ? t : Qa;
3305
+ }), Lo = (e, t, n) => t !== void 0 ? t : n !== void 0 ? n : e.defaultDocumentStyle, Ao = (e, t) => e !== void 0 ? e : t !== void 0 ? t : ei;
3305
3306
  class ce extends Error {
3306
3307
  refusal;
3307
3308
  constructor(t, n) {
3308
3309
  super(n), this.name = "WorkbookError", this.refusal = t;
3309
3310
  }
3310
3311
  }
3311
- const sd = /* @__PURE__ */ new Map([
3312
+ const ld = /* @__PURE__ */ new Map([
3312
3313
  ["lt", "<"],
3313
3314
  ["gt", ">"],
3314
3315
  ["amp", "&"],
3315
3316
  ["quot", '"'],
3316
3317
  ["apos", "'"]
3317
- ]), ld = /&(#x[0-9A-Fa-f]+|#[0-9]+|[A-Za-z_][A-Za-z0-9._-]*);/gu, cd = /([^\s=/>]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/gu, dd = /^[^\s/>]+/u, _e = (e) => {
3318
+ ]), cd = /&(#x[0-9A-Fa-f]+|#[0-9]+|[A-Za-z_][A-Za-z0-9._-]*);/gu, dd = /([^\s=/>]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/gu, ud = /^[^\s/>]+/u, _e = (e) => {
3318
3319
  throw new ce("not-workbook", `the XML ${e}`);
3319
- }, rr = (e) => Number.isInteger(e) && e >= 0 && e <= 1114111 ? String.fromCodePoint(e) : _e(`refers to the code point ${e}`), Ao = (e) => e.includes("&") ? e.replace(ld, (t, n) => n.startsWith("#x") ? rr(Number.parseInt(n.slice(2), 16)) : n.startsWith("#") ? rr(Number.parseInt(n.slice(1), 10)) : sd.get(n) ?? _e(`names the undeclared entity ${t}`)) : e, fn = (e) => e.slice(e.indexOf(":") + 1), ud = (e, t) => {
3320
+ }, or = (e) => Number.isInteger(e) && e >= 0 && e <= 1114111 ? String.fromCodePoint(e) : _e(`refers to the code point ${e}`), Do = (e) => e.includes("&") ? e.replace(cd, (t, n) => n.startsWith("#x") ? or(Number.parseInt(n.slice(2), 16)) : n.startsWith("#") ? or(Number.parseInt(n.slice(1), 10)) : ld.get(n) ?? _e(`names the undeclared entity ${t}`)) : e, fn = (e) => e.slice(e.indexOf(":") + 1), fd = (e, t) => {
3320
3321
  let n = "";
3321
3322
  for (let r = t; r < e.length; r += 1) {
3322
3323
  const o = e[r];
@@ -3328,18 +3329,18 @@ const sd = /* @__PURE__ */ new Map([
3328
3329
  return r;
3329
3330
  }
3330
3331
  return -1;
3331
- }, fd = (e) => {
3332
+ }, md = (e) => {
3332
3333
  const t = /* @__PURE__ */ new Map();
3333
- for (const n of e.matchAll(cd)) t.set(fn(n[1] ?? ""), Ao(n[2] ?? n[3] ?? ""));
3334
+ for (const n of e.matchAll(dd)) t.set(fn(n[1] ?? ""), Do(n[2] ?? n[3] ?? ""));
3334
3335
  return t;
3335
- }, Do = (e, t) => {
3336
+ }, No = (e, t) => {
3336
3337
  let n = "";
3337
3338
  const r = () => {
3338
3339
  let o = 0;
3339
3340
  for (; !t(); ) {
3340
3341
  const a = n.indexOf("<", o);
3341
3342
  if (a === -1) break;
3342
- if (a > o && (e.text?.(Ao(n.slice(o, a))), o = a), n.startsWith("<!--", a)) {
3343
+ if (a > o && (e.text?.(Do(n.slice(o, a))), o = a), n.startsWith("<!--", a)) {
3343
3344
  const h = n.indexOf("-->", a + 4);
3344
3345
  if (h === -1) break;
3345
3346
  o = h + 3;
@@ -3359,14 +3360,14 @@ const sd = /* @__PURE__ */ new Map([
3359
3360
  o = h + 2;
3360
3361
  continue;
3361
3362
  }
3362
- const s = ud(n, a + 1);
3363
+ const s = fd(n, a + 1);
3363
3364
  if (s === -1) break;
3364
3365
  const f = n.slice(a + 1, s);
3365
3366
  if (f.startsWith("/"))
3366
3367
  e.end?.(fn(f.slice(1).trim()));
3367
3368
  else {
3368
- const h = f.endsWith("/"), w = h ? f.slice(0, -1) : f, d = dd.exec(w)?.[0] ?? _e("has a tag without a name"), p = fn(d);
3369
- e.start?.(p, fd(w.slice(d.length)), h), h && e.end?.(p);
3369
+ const h = f.endsWith("/"), w = h ? f.slice(0, -1) : f, u = ud.exec(w)?.[0] ?? _e("has a tag without a name"), p = fn(u);
3370
+ e.start?.(p, md(w.slice(u.length)), h), h && e.end?.(p);
3370
3371
  }
3371
3372
  o = s + 1;
3372
3373
  }
@@ -3381,7 +3382,7 @@ const sd = /* @__PURE__ */ new Map([
3381
3382
  }
3382
3383
  };
3383
3384
  }, dt = async (e, t, n) => {
3384
- const r = Do(t, n), o = new TextDecoder("utf-8", { fatal: !0 }), a = e.getReader();
3385
+ const r = No(t, n), o = new TextDecoder("utf-8", { fatal: !0 }), a = e.getReader();
3385
3386
  try {
3386
3387
  for (; !n(); ) {
3387
3388
  const { done: i, value: s } = await a.read();
@@ -3398,44 +3399,44 @@ const sd = /* @__PURE__ */ new Map([
3398
3399
  a.cancel().catch(() => {
3399
3400
  });
3400
3401
  }
3401
- }, md = 101010256, hd = 33639248, pd = 67324752, No = 22, wd = 65535, or = 46, ar = 30, gd = 1, ir = 0, vd = 8, yd = 65535, Ke = 4294967295, bd = new TextDecoder("utf-8"), fe = (e) => {
3402
+ }, hd = 101010256, pd = 33639248, wd = 67324752, Io = 22, gd = 65535, ar = 46, ir = 30, vd = 1, sr = 0, yd = 8, bd = 65535, Ke = 4294967295, kd = new TextDecoder("utf-8"), fe = (e) => {
3402
3403
  throw new ce("not-workbook", `the ZIP package ${e}`);
3403
- }, kd = (e) => {
3404
- const t = e.byteLength - No, n = Math.max(0, t - wd);
3404
+ }, Ed = (e) => {
3405
+ const t = e.byteLength - Io, n = Math.max(0, t - gd);
3405
3406
  for (let r = t; r >= n; r -= 1)
3406
- if (e.getUint32(r, !0) === md) return r;
3407
+ if (e.getUint32(r, !0) === hd) return r;
3407
3408
  return fe("has no end of central directory record");
3408
- }, Ed = (e) => {
3409
- if (e.byteLength < No) return fe("is shorter than its end record");
3410
- const t = new DataView(e.buffer, e.byteOffset, e.byteLength), n = kd(t), r = t.getUint16(n + 4, !0), o = t.getUint16(n + 6, !0), a = t.getUint16(n + 10, !0), i = t.getUint32(n + 12, !0), s = t.getUint32(n + 16, !0);
3409
+ }, Sd = (e) => {
3410
+ if (e.byteLength < Io) return fe("is shorter than its end record");
3411
+ const t = new DataView(e.buffer, e.byteOffset, e.byteLength), n = Ed(t), r = t.getUint16(n + 4, !0), o = t.getUint16(n + 6, !0), a = t.getUint16(n + 10, !0), i = t.getUint32(n + 12, !0), s = t.getUint32(n + 16, !0);
3411
3412
  if (r !== 0 || o !== 0) return fe("spans several disks");
3412
- if (a === yd || i === Ke || s === Ke) return fe("is a ZIP64 package");
3413
+ if (a === bd || i === Ke || s === Ke) return fe("is a ZIP64 package");
3413
3414
  if (s + i > n) return fe("has a central directory past its end record");
3414
3415
  const f = /* @__PURE__ */ new Map();
3415
3416
  let h = s;
3416
3417
  for (let w = 0; w < a; w += 1) {
3417
- if (h + or > n || t.getUint32(h, !0) !== hd) return fe("has a malformed central directory");
3418
- const d = t.getUint16(h + 8, !0), p = t.getUint16(h + 10, !0), m = t.getUint32(h + 20, !0), g = t.getUint32(h + 24, !0), v = t.getUint16(h + 28, !0), b = t.getUint16(h + 30, !0), k = t.getUint16(h + 32, !0), M = t.getUint32(h + 42, !0), D = h + or;
3418
+ if (h + ar > n || t.getUint32(h, !0) !== pd) return fe("has a malformed central directory");
3419
+ const u = t.getUint16(h + 8, !0), p = t.getUint16(h + 10, !0), m = t.getUint32(h + 20, !0), g = t.getUint32(h + 24, !0), v = t.getUint16(h + 28, !0), b = t.getUint16(h + 30, !0), k = t.getUint16(h + 32, !0), M = t.getUint32(h + 42, !0), D = h + ar;
3419
3420
  if (D + v > n) return fe("has a name past its central directory");
3420
- const C = bd.decode(e.subarray(D, D + v));
3421
+ const C = kd.decode(e.subarray(D, D + v));
3421
3422
  if (m === Ke || g === Ke || M === Ke) return fe("has a ZIP64 entry");
3422
3423
  if (!C.endsWith("/")) {
3423
3424
  if (f.has(C)) return fe(`names ${C} twice`);
3424
- f.set(C, { name: C, encrypted: (d & gd) !== 0, method: p, compressedSize: m, uncompressedSize: g, localHeaderOffset: M });
3425
+ f.set(C, { name: C, encrypted: (u & vd) !== 0, method: p, compressedSize: m, uncompressedSize: g, localHeaderOffset: M });
3425
3426
  }
3426
3427
  h = D + v + b + k;
3427
3428
  }
3428
3429
  return { bytes: e, entries: f };
3429
- }, Sd = (e, t) => {
3430
+ }, xd = (e, t) => {
3430
3431
  const { bytes: n } = e, r = new DataView(n.buffer, n.byteOffset, n.byteLength), o = t.localHeaderOffset;
3431
- if (o + ar > n.byteLength || r.getUint32(o, !0) !== pd) return fe(`has no local header for ${t.name}`);
3432
- const a = o + ar + r.getUint16(o + 26, !0) + r.getUint16(o + 28, !0), i = a + t.compressedSize;
3432
+ if (o + ir > n.byteLength || r.getUint32(o, !0) !== wd) return fe(`has no local header for ${t.name}`);
3433
+ const a = o + ir + r.getUint16(o + 26, !0) + r.getUint16(o + 28, !0), i = a + t.compressedSize;
3433
3434
  return i > n.byteLength ? fe(`has the data of ${t.name} past its end`) : { start: a, end: i };
3434
- }, Io = (e) => new ReadableStream({
3435
+ }, Po = (e) => new ReadableStream({
3435
3436
  start(t) {
3436
3437
  e.byteLength > 0 && t.enqueue(e), t.close();
3437
3438
  }
3438
- }), xd = (e) => Io(e).pipeThrough(new DecompressionStream("deflate-raw")), Td = (e, t) => {
3439
+ }), Td = (e) => Po(e).pipeThrough(new DecompressionStream("deflate-raw")), Cd = (e, t) => {
3439
3440
  let n = 0;
3440
3441
  return new TransformStream({
3441
3442
  transform(r, o) {
@@ -3450,10 +3451,10 @@ const sd = /* @__PURE__ */ new Map([
3450
3451
  const r = e.entries.get(t);
3451
3452
  if (r === void 0) return null;
3452
3453
  if (r.encrypted) throw new ce("encrypted", `${t} is encrypted`);
3453
- if (r.method !== ir && r.method !== vd) return fe(`compresses ${t} with method ${r.method}`);
3454
+ if (r.method !== sr && r.method !== yd) return fe(`compresses ${t} with method ${r.method}`);
3454
3455
  if (r.uncompressedSize > n) throw new ce("too-large", `${t} declares ${r.uncompressedSize} bytes`);
3455
- const { start: o, end: a } = Sd(e, r), i = e.bytes.subarray(o, a);
3456
- return (r.method === ir ? Io(i) : xd(i)).pipeThrough(Td(t, n));
3456
+ const { start: o, end: a } = xd(e, r), i = e.bytes.subarray(o, a);
3457
+ return (r.method === sr ? Po(i) : Td(i)).pipeThrough(Cd(t, n));
3457
3458
  }, Ot = async (e, t, n) => {
3458
3459
  const r = ot(e, t, n);
3459
3460
  if (r === null) return null;
@@ -3472,10 +3473,10 @@ const sd = /* @__PURE__ */ new Map([
3472
3473
  } finally {
3473
3474
  a.releaseLock();
3474
3475
  }
3475
- }, sr = "content.xml", Cd = "META-INF/manifest.xml", Po = (e) => {
3476
+ }, lr = "content.xml", Rd = "META-INF/manifest.xml", Fo = (e) => {
3476
3477
  throw new ce("not-workbook", `the spreadsheet ${e}`);
3477
- }, lr = (e, t) => ot(e, sr, t.maxPartBytes) ?? Po(`has no ${sr}`), Rd = async (e, t) => {
3478
- const n = ot(e, Cd, t.maxPartBytes);
3478
+ }, cr = (e, t) => ot(e, lr, t.maxPartBytes) ?? Fo(`has no ${lr}`), Md = async (e, t) => {
3479
+ const n = ot(e, Rd, t.maxPartBytes);
3479
3480
  if (n === null) return !1;
3480
3481
  let r = !1;
3481
3482
  return await dt(
@@ -3487,7 +3488,7 @@ const sd = /* @__PURE__ */ new Map([
3487
3488
  },
3488
3489
  () => r
3489
3490
  ), r;
3490
- }, Md = async (e) => {
3491
+ }, Od = async (e) => {
3491
3492
  const t = [], n = /* @__PURE__ */ new Set();
3492
3493
  let r = null, o = 0;
3493
3494
  return await dt(
@@ -3505,9 +3506,9 @@ const sd = /* @__PURE__ */ new Map([
3505
3506
  }, Kt = (e) => {
3506
3507
  const t = Number(e);
3507
3508
  return Number.isInteger(t) && t > 0 ? t : 1;
3508
- }, Od = async (e, t, n) => {
3509
- const r = To(n);
3510
- let o = 0, a = 0, i = !1, s = !1, f = 0, h = 1, w = /* @__PURE__ */ new Map(), d = 0, p = null;
3509
+ }, Ld = async (e, t, n) => {
3510
+ const r = Co(n);
3511
+ let o = 0, a = 0, i = !1, s = !1, f = 0, h = 1, w = /* @__PURE__ */ new Map(), u = 0, p = null;
3511
3512
  return await dt(
3512
3513
  e,
3513
3514
  {
@@ -3516,7 +3517,7 @@ const sd = /* @__PURE__ */ new Map([
3516
3517
  a === 0 && (i = o === t, o += 1), v || (a += 1);
3517
3518
  return;
3518
3519
  }
3519
- !i || a !== 1 || (m === "table-row" ? (h = Kt(g.get("number-rows-repeated")), w = /* @__PURE__ */ new Map(), d = 0) : m === "table-cell" || m === "covered-table-cell" ? p = { repeat: Kt(g.get("number-columns-repeated")), covered: m === "covered-table-cell", parts: [], paragraphs: 0, paragraphDepth: 0, annotationDepth: 0 } : p !== null && p.annotationDepth === 0 && (m === "annotation" && !v ? p.annotationDepth += 1 : m === "p" || m === "h" ? (p.paragraphs > 0 && p.parts.push(`
3520
+ !i || a !== 1 || (m === "table-row" ? (h = Kt(g.get("number-rows-repeated")), w = /* @__PURE__ */ new Map(), u = 0) : m === "table-cell" || m === "covered-table-cell" ? p = { repeat: Kt(g.get("number-columns-repeated")), covered: m === "covered-table-cell", parts: [], paragraphs: 0, paragraphDepth: 0, annotationDepth: 0 } : p !== null && p.annotationDepth === 0 && (m === "annotation" && !v ? p.annotationDepth += 1 : m === "p" || m === "h" ? (p.paragraphs > 0 && p.parts.push(`
3520
3521
  `), p.paragraphs += 1, v || (p.paragraphDepth += 1)) : p.paragraphDepth > 0 && (m === "s" ? p.parts.push(" ".repeat(Kt(g.get("c")))) : m === "tab" ? p.parts.push(" ") : m === "line-break" && p.parts.push(`
3521
3522
  `))));
3522
3523
  },
@@ -3533,10 +3534,10 @@ const sd = /* @__PURE__ */ new Map([
3533
3534
  if ((m === "table-cell" || m === "covered-table-cell") && p !== null) {
3534
3535
  const g = p.covered ? "" : p.parts.join("");
3535
3536
  if (g !== "") {
3536
- const v = Math.min(d + p.repeat, n.maxColumns + 1);
3537
- for (let b = d; b < v; b += 1) w.set(b, g);
3537
+ const v = Math.min(u + p.repeat, n.maxColumns + 1);
3538
+ for (let b = u; b < v; b += 1) w.set(b, g);
3538
3539
  }
3539
- d += p.repeat, p = null;
3540
+ u += p.repeat, p = null;
3540
3541
  } else m === "table-row" ? (r.addRow(f, w, h), f += h) : (m === "p" || m === "h") && p !== null && (p.paragraphDepth = Math.max(0, p.paragraphDepth - 1));
3541
3542
  },
3542
3543
  text: (m) => {
@@ -3545,18 +3546,18 @@ const sd = /* @__PURE__ */ new Map([
3545
3546
  },
3546
3547
  () => s || r.full()
3547
3548
  ), r.table();
3548
- }, Ld = async (e, t) => {
3549
- if (await Rd(e, t)) throw new ce("encrypted", "the spreadsheet's manifest names encryption data");
3550
- const { tables: n, hidingStyles: r } = await Md(lr(e, t)), o = [];
3549
+ }, Ad = async (e, t) => {
3550
+ if (await Md(e, t)) throw new ce("encrypted", "the spreadsheet's manifest names encryption data");
3551
+ const { tables: n, hidingStyles: r } = await Od(cr(e, t)), o = [];
3551
3552
  let a = 0;
3552
3553
  return n.forEach((i, s) => {
3553
3554
  if (r.has(i.style)) {
3554
3555
  a += 1;
3555
3556
  return;
3556
3557
  }
3557
- o.push({ name: i.name, read: async (f) => Od(lr(e, t), s, f) });
3558
- }), o.length === 0 && Po("shows no table"), { sheets: o.slice(0, t.maxSheets), unshownSheets: a, unlistedSheets: Math.max(0, o.length - t.maxSheets) };
3559
- }, Pe = Object.freeze({ kind: "general" }), Ad = new Map([
3558
+ o.push({ name: i.name, read: async (f) => Ld(cr(e, t), s, f) });
3559
+ }), o.length === 0 && Fo("shows no table"), { sheets: o.slice(0, t.maxSheets), unshownSheets: a, unlistedSheets: Math.max(0, o.length - t.maxSheets) };
3560
+ }, Pe = Object.freeze({ kind: "general" }), Dd = new Map([
3560
3561
  [0, "General"],
3561
3562
  [1, "0"],
3562
3563
  [2, "0.00"],
@@ -3588,7 +3589,7 @@ const sd = /* @__PURE__ */ new Map([
3588
3589
  [47, "mmss.0"],
3589
3590
  [48, "##0.0E+0"],
3590
3591
  [49, "@"]
3591
- ]), Dd = /^\[(h+|m+|s+)\]$/iu, Nd = (e) => {
3592
+ ]), Nd = /^\[(h+|m+|s+)\]$/iu, Id = (e) => {
3592
3593
  let t = "", n = !1;
3593
3594
  for (let r = 0; r < e.length; r += 1) {
3594
3595
  const o = e[r];
@@ -3600,13 +3601,13 @@ const sd = /* @__PURE__ */ new Map([
3600
3601
  r += 1;
3601
3602
  else if (o === "[") {
3602
3603
  const a = e.indexOf("]", r + 1), i = e.slice(r, a === -1 ? e.length : a + 1);
3603
- Dd.test(i) && (t += i.slice(1, -1), n = !0), r = a === -1 ? e.length : a;
3604
+ Nd.test(i) && (t += i.slice(1, -1), n = !0), r = a === -1 ? e.length : a;
3604
3605
  } else
3605
3606
  t += o;
3606
3607
  }
3607
3608
  return { text: t.toLowerCase(), elapsed: n };
3608
- }, Id = (e) => {
3609
- const { text: t, elapsed: n } = Nd(e);
3609
+ }, Pd = (e) => {
3610
+ const { text: t, elapsed: n } = Id(e);
3610
3611
  if (t === "" || t === "general" || t.includes("@") || /[0#?.]e[+-]/u.test(t)) return Pe;
3611
3612
  const r = n || /[hs]/u.test(t) || t.includes("am/pm") || t.includes("a/p"), o = /[ydge]/u.test(t.replace(/am\/pm|a\/p/gu, "")) || t.includes("m") && !r;
3612
3613
  if (o || r) return { kind: "date-time", date: o, time: r, seconds: t.includes("s"), elapsed: n };
@@ -3615,74 +3616,74 @@ const sd = /* @__PURE__ */ new Map([
3615
3616
  if (a === void 0) return Pe;
3616
3617
  const i = /,*$/u.exec(a)?.[0].length ?? 0, [s = "", f = ""] = a.slice(0, a.length - i).split("."), h = (f.match(/[0#?]/gu) ?? []).length;
3617
3618
  return t.includes("%") ? { kind: "percent", decimals: h } : { kind: "fixed", decimals: h, grouping: s.includes(","), scale: 1e3 ** i };
3618
- }, Pd = (e, t) => {
3619
- const n = t.get(e) ?? Ad.get(e);
3620
- return n === void 0 ? Pe : Id(n);
3619
+ }, Fd = (e, t) => {
3620
+ const n = t.get(e) ?? Dd.get(e);
3621
+ return n === void 0 ? Pe : Pd(n);
3621
3622
  }, En = (e) => {
3622
3623
  if (Number.isInteger(e) && Math.abs(e) < 1e15) return String(e);
3623
3624
  const [t = "", n] = e.toPrecision(15).split("e"), r = t.includes(".") ? t.replace(/0+$/u, "").replace(/\.$/u, "") : t;
3624
3625
  return n === void 0 ? r : `${r}E${n.startsWith("-") ? n : `+${n.replace("+", "")}`}`;
3625
- }, cr = (e, t, n) => {
3626
+ }, dr = (e, t, n) => {
3626
3627
  const r = Math.abs(e).toFixed(t);
3627
3628
  if (r.includes("e")) return En(e);
3628
3629
  const [o = "", a] = r.split("."), i = n ? o.replace(/\B(?=(\d{3})+(?!\d))/gu, ",") : o;
3629
3630
  return `${e < 0 && /[1-9]/u.test(r) ? "-" : ""}${i}${a === void 0 ? "" : `.${a}`}`;
3630
- }, Fd = 864e5, dr = 86400, $d = 2958465, qe = (e, t) => String(e).padStart(t, "0"), _d = (e, t) => {
3631
+ }, $d = 864e5, ur = 86400, _d = 2958465, qe = (e, t) => String(e).padStart(t, "0"), qd = (e, t) => {
3631
3632
  if (!t && e === 0) return "1900-01-00";
3632
3633
  if (!t && e === 60) return "1900-02-29";
3633
- const n = t ? Date.UTC(1904, 0, 1) : e < 60 ? Date.UTC(1899, 11, 31) : Date.UTC(1899, 11, 30), r = new Date(n + e * Fd);
3634
+ const n = t ? Date.UTC(1904, 0, 1) : e < 60 ? Date.UTC(1899, 11, 31) : Date.UTC(1899, 11, 30), r = new Date(n + e * $d);
3634
3635
  return `${qe(r.getUTCFullYear(), 4)}-${qe(r.getUTCMonth() + 1, 2)}-${qe(r.getUTCDate(), 2)}`;
3635
- }, qd = (e, t, n) => {
3636
- if (e < 0 || e >= $d + 1) return En(e);
3637
- let r = Math.floor(e), o = Math.round((e - r) * dr);
3638
- o === dr && (r += 1, o = 0);
3636
+ }, Bd = (e, t, n) => {
3637
+ if (e < 0 || e >= _d + 1) return En(e);
3638
+ let r = Math.floor(e), o = Math.round((e - r) * ur);
3639
+ o === ur && (r += 1, o = 0);
3639
3640
  const a = Math.floor(o / 3600), i = Math.floor(o % 3600 / 60), s = `${qe(t.elapsed ? r * 24 + a : a, 2)}:${qe(i, 2)}${t.seconds ? `:${qe(o % 60, 2)}` : ""}`;
3640
3641
  if (t.elapsed || !t.date) return s;
3641
- const f = _d(r, n);
3642
+ const f = qd(r, n);
3642
3643
  return t.time ? `${f} ${s}` : f;
3643
- }, Bd = (e, t, n) => {
3644
+ }, Ud = (e, t, n) => {
3644
3645
  switch (t.kind) {
3645
3646
  case "general":
3646
3647
  return En(e);
3647
3648
  case "date-time":
3648
- return qd(e, t, n);
3649
+ return Bd(e, t, n);
3649
3650
  case "percent":
3650
- return `${cr(e * 100, t.decimals, !1)}%`;
3651
+ return `${dr(e * 100, t.decimals, !1)}%`;
3651
3652
  case "fixed":
3652
- return cr(e / t.scale, t.decimals, t.grouping);
3653
+ return dr(e / t.scale, t.decimals, t.grouping);
3653
3654
  }
3654
- }, Fo = "_rels/.rels", Se = (e) => {
3655
+ }, $o = "_rels/.rels", Se = (e) => {
3655
3656
  throw new ce("not-workbook", `the workbook ${e}`);
3656
3657
  }, Sn = (e, t) => {
3657
- const n = Do(t, () => !1);
3658
+ const n = No(t, () => !1);
3658
3659
  n.write(e), n.finish();
3659
- }, Ud = (e, t) => {
3660
+ }, Hd = (e, t) => {
3660
3661
  try {
3661
3662
  return decodeURIComponent(e);
3662
3663
  } catch {
3663
3664
  return Se(`points to a malformed part name (${t})`);
3664
3665
  }
3665
- }, Hd = (e, t) => {
3666
+ }, zd = (e, t) => {
3666
3667
  const r = [...t.startsWith("/") ? [] : e.split("/").slice(0, -1)];
3667
3668
  for (const o of t.split("/"))
3668
- o === "" || o === "." || (o === ".." ? (r.length === 0 && Se(`points above its root (${t})`), r.pop()) : r.push(Ud(o, t)));
3669
+ o === "" || o === "." || (o === ".." ? (r.length === 0 && Se(`points above its root (${t})`), r.pop()) : r.push(Hd(o, t)));
3669
3670
  return r.join("/");
3670
- }, zd = (e) => {
3671
+ }, jd = (e) => {
3671
3672
  const t = e.lastIndexOf("/");
3672
3673
  return `${e.slice(0, t + 1)}_rels/${e.slice(t + 1)}.rels`;
3673
- }, ur = async (e, t, n) => {
3674
- const r = await Ot(e, t === "" ? Fo : zd(t), n.maxPartBytes), o = /* @__PURE__ */ new Map();
3674
+ }, fr = async (e, t, n) => {
3675
+ const r = await Ot(e, t === "" ? $o : jd(t), n.maxPartBytes), o = /* @__PURE__ */ new Map();
3675
3676
  return r === null || Sn(r, {
3676
3677
  start: (a, i) => {
3677
3678
  if (a !== "Relationship") return;
3678
3679
  const s = i.get("Id"), f = i.get("Type"), h = i.get("Target");
3679
- s === void 0 || f === void 0 || h === void 0 || i.get("TargetMode") === "External" || o.set(s, { type: f, target: Hd(t, h) });
3680
+ s === void 0 || f === void 0 || h === void 0 || i.get("TargetMode") === "External" || o.set(s, { type: f, target: zd(t, h) });
3680
3681
  }
3681
3682
  }), o;
3682
3683
  }, Xt = (e, t) => {
3683
3684
  for (const n of e.values()) if (n.type.endsWith(`/${t}`)) return n.target;
3684
3685
  return null;
3685
- }, jd = (e) => {
3686
+ }, Vd = (e) => {
3686
3687
  const t = [];
3687
3688
  let n = !1;
3688
3689
  return Sn(e, {
@@ -3693,7 +3694,7 @@ const sd = /* @__PURE__ */ new Map([
3693
3694
  } else r === "sheet" && t.push({ name: o.get("name") ?? "", state: o.get("state") ?? "visible", relationship: o.get("id") ?? "" });
3694
3695
  }
3695
3696
  }), { sheets: t, date1904: n };
3696
- }, Vd = async (e) => {
3697
+ }, Zd = async (e) => {
3697
3698
  const t = [];
3698
3699
  let n = null, r = !1, o = 0;
3699
3700
  return await dt(
@@ -3711,7 +3712,7 @@ const sd = /* @__PURE__ */ new Map([
3711
3712
  },
3712
3713
  () => !1
3713
3714
  ), t;
3714
- }, Zd = (e) => {
3715
+ }, Gd = (e) => {
3715
3716
  const t = /* @__PURE__ */ new Map(), n = [];
3716
3717
  let r = !1;
3717
3718
  return Sn(e, {
@@ -3729,19 +3730,19 @@ const sd = /* @__PURE__ */ new Map([
3729
3730
  end: (o) => {
3730
3731
  o === "cellXfs" && (r = !1);
3731
3732
  }
3732
- }), n.map((o) => Pd(o, t));
3733
- }, Gd = /^(\d{4}-\d{2}-\d{2})(?:T(\d{2}:\d{2}(?::\d{2})?)(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?$/u, Wd = (e) => {
3734
- const t = Gd.exec(e);
3733
+ }), n.map((o) => Fd(o, t));
3734
+ }, Wd = /^(\d{4}-\d{2}-\d{2})(?:T(\d{2}:\d{2}(?::\d{2})?)(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?$/u, Kd = (e) => {
3735
+ const t = Wd.exec(e);
3735
3736
  if (t === null) return e;
3736
3737
  const [, n, r] = t;
3737
3738
  return r === void 0 || /^00:00(?::00)?$/u.test(r) ? n ?? e : `${n} ${r}`;
3738
- }, Kd = /^([A-Za-z]{1,3})(\d+)$/u, Xd = (e) => {
3739
- const t = Kd.exec(e)?.[1];
3739
+ }, Xd = /^([A-Za-z]{1,3})(\d+)$/u, Yd = (e) => {
3740
+ const t = Xd.exec(e)?.[1];
3740
3741
  if (t === void 0) return null;
3741
3742
  let n = 0;
3742
3743
  for (const r of t.toUpperCase()) n = n * 26 + (r.charCodeAt(0) - 64);
3743
3744
  return n - 1;
3744
- }, Yd = (e, t, n, r) => {
3745
+ }, Jd = (e, t, n, r) => {
3745
3746
  const o = e.value.join("");
3746
3747
  switch (e.type) {
3747
3748
  case "s":
@@ -3754,33 +3755,33 @@ const sd = /* @__PURE__ */ new Map([
3754
3755
  case "e":
3755
3756
  return o;
3756
3757
  case "d":
3757
- return Wd(o.trim());
3758
+ return Kd(o.trim());
3758
3759
  default: {
3759
3760
  const a = o.trim();
3760
3761
  if (a === "") return "";
3761
3762
  const i = Number(a);
3762
- return Number.isFinite(i) ? Bd(i, n[e.style] ?? Pe, r) : a;
3763
+ return Number.isFinite(i) ? Ud(i, n[e.style] ?? Pe, r) : a;
3763
3764
  }
3764
3765
  }
3765
- }, Jd = async (e, t, n, r, o) => {
3766
- const a = To(t);
3766
+ }, Qd = async (e, t, n, r, o) => {
3767
+ const a = Co(t);
3767
3768
  let i = -1, s = /* @__PURE__ */ new Map(), f = 0, h = null;
3768
3769
  return await dt(
3769
3770
  e,
3770
3771
  {
3771
- start: (w, d, p) => {
3772
+ start: (w, u, p) => {
3772
3773
  if (w === "row") {
3773
- const m = Number(d.get("r"));
3774
+ const m = Number(u.get("r"));
3774
3775
  i = Number.isInteger(m) && m > i + 1 ? m - 1 : i + 1, s = /* @__PURE__ */ new Map(), f = 0;
3775
3776
  } else if (w === "c") {
3776
- const m = Xd(d.get("r") ?? "") ?? f, g = Number(d.get("s") ?? "0");
3777
- h = { column: m, type: d.get("t") ?? "n", style: Number.isInteger(g) ? g : 0, value: [], inline: [], inValue: !1, inInlineText: !1, phoneticDepth: 0 };
3777
+ const m = Yd(u.get("r") ?? "") ?? f, g = Number(u.get("s") ?? "0");
3778
+ h = { column: m, type: u.get("t") ?? "n", style: Number.isInteger(g) ? g : 0, value: [], inline: [], inValue: !1, inInlineText: !1, phoneticDepth: 0 };
3778
3779
  } else h !== null && (w === "v" ? h.inValue = !p : w === "rPh" && !p ? h.phoneticDepth += 1 : w === "t" && h.type === "inlineStr" && h.phoneticDepth === 0 && (h.inInlineText = !p));
3779
3780
  },
3780
3781
  end: (w) => {
3781
3782
  if (w === "c" && h !== null) {
3782
- const d = Yd(h, n, r, o);
3783
- d !== "" && s.set(h.column, d), f = h.column + 1, h = null;
3783
+ const u = Jd(h, n, r, o);
3784
+ u !== "" && s.set(h.column, u), f = h.column + 1, h = null;
3784
3785
  } else w === "row" ? a.addRow(i, s, 1) : h !== null && (w === "v" ? h.inValue = !1 : w === "rPh" ? h.phoneticDepth = Math.max(0, h.phoneticDepth - 1) : w === "t" && (h.inInlineText = !1));
3785
3786
  },
3786
3787
  text: (w) => {
@@ -3789,8 +3790,8 @@ const sd = /* @__PURE__ */ new Map([
3789
3790
  },
3790
3791
  a.full
3791
3792
  ), a.table();
3792
- }, Qd = async (e, t) => {
3793
- const n = Xt(await ur(e, "", t), "officeDocument") ?? Se("has no officeDocument relationship"), r = await Ot(e, n, t.maxPartBytes) ?? Se(`has no part ${n}`), { sheets: o, date1904: a } = jd(r), i = await ur(e, n, t), s = Xt(i, "sharedStrings"), f = s === null ? null : ot(e, s, t.maxPartBytes), h = f === null ? [] : await Vd(f), w = Xt(i, "styles"), d = w === null ? null : await Ot(e, w, t.maxPartBytes), p = d === null ? [] : Zd(d), m = [];
3793
+ }, eu = async (e, t) => {
3794
+ const n = Xt(await fr(e, "", t), "officeDocument") ?? Se("has no officeDocument relationship"), r = await Ot(e, n, t.maxPartBytes) ?? Se(`has no part ${n}`), { sheets: o, date1904: a } = Vd(r), i = await fr(e, n, t), s = Xt(i, "sharedStrings"), f = s === null ? null : ot(e, s, t.maxPartBytes), h = f === null ? [] : await Zd(f), w = Xt(i, "styles"), u = w === null ? null : await Ot(e, w, t.maxPartBytes), p = u === null ? [] : Gd(u), m = [];
3794
3795
  let g = 0;
3795
3796
  for (const v of o) {
3796
3797
  const b = i.get(v.relationship) ?? Se(`lists the sheet ${v.name} without its relationship`);
@@ -3802,25 +3803,25 @@ const sd = /* @__PURE__ */ new Map([
3802
3803
  name: v.name,
3803
3804
  read: async (k) => {
3804
3805
  const M = ot(e, b.target, t.maxPartBytes) ?? Se(`has no part ${b.target}`);
3805
- return Jd(M, k, h, p, a);
3806
+ return Qd(M, k, h, p, a);
3806
3807
  }
3807
3808
  });
3808
3809
  }
3809
3810
  return m.length === 0 && Se("shows no sheet"), { sheets: m.slice(0, t.maxSheets), unshownSheets: g, unlistedSheets: Math.max(0, m.length - t.maxSheets) };
3810
- }, eu = Object.freeze([80, 75, 3, 4]), tu = Object.freeze([208, 207, 17, 224, 161, 177, 26, 225]), Yt = Uint8Array.from([..."EncryptedPackage"].flatMap((e) => [e.charCodeAt(0), 0])), nu = /* @__PURE__ */ new Set(["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template"]), ru = "mimetype", $o = (e, t) => e.byteLength >= t.length && t.every((n, r) => e[r] === n), _o = (e) => $o(e, eu), qo = (e) => $o(e, tu), ou = (e) => {
3811
+ }, tu = Object.freeze([80, 75, 3, 4]), nu = Object.freeze([208, 207, 17, 224, 161, 177, 26, 225]), Yt = Uint8Array.from([..."EncryptedPackage"].flatMap((e) => [e.charCodeAt(0), 0])), ru = /* @__PURE__ */ new Set(["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template"]), ou = "mimetype", _o = (e, t) => e.byteLength >= t.length && t.every((n, r) => e[r] === n), qo = (e) => _o(e, tu), Bo = (e) => _o(e, nu), au = (e) => {
3811
3812
  const t = e.byteLength - Yt.byteLength;
3812
3813
  for (let n = 0; n <= t; n += 1)
3813
3814
  if (e[n] === Yt[0] && Yt.every((r, o) => e[n + o] === r)) return !0;
3814
3815
  return !1;
3815
- }, au = async (e, t) => {
3816
- if (qo(e))
3817
- throw ou(e) ? new ce("encrypted", "the bytes are a password-protected workbook") : new ce("not-workbook", "the bytes are a compound file (a legacy .xls)");
3818
- if (!_o(e)) throw new ce("not-workbook", "the bytes are no ZIP package");
3819
- const n = Ed(e), r = await Ot(n, ru, t.maxPartBytes);
3820
- if (r !== null && nu.has(r.trim())) return Ld(n, t);
3821
- if (n.entries.has(Fo)) return Qd(n, t);
3822
- throw new ce("not-workbook", "the ZIP package is neither an OpenDocument spreadsheet nor an Office Open XML package");
3823
3816
  }, iu = async (e, t) => {
3817
+ if (Bo(e))
3818
+ throw au(e) ? new ce("encrypted", "the bytes are a password-protected workbook") : new ce("not-workbook", "the bytes are a compound file (a legacy .xls)");
3819
+ if (!qo(e)) throw new ce("not-workbook", "the bytes are no ZIP package");
3820
+ const n = Sd(e), r = await Ot(n, ou, t.maxPartBytes);
3821
+ if (r !== null && ru.has(r.trim())) return Ad(n, t);
3822
+ if (n.entries.has($o)) return eu(n, t);
3823
+ throw new ce("not-workbook", "the ZIP package is neither an OpenDocument spreadsheet nor an Office Open XML package");
3824
+ }, su = async (e, t) => {
3824
3825
  const n = e.getReader(), r = [];
3825
3826
  let o = 0;
3826
3827
  try {
@@ -3839,34 +3840,34 @@ const sd = /* @__PURE__ */ new Map([
3839
3840
  for (const s of r)
3840
3841
  a.set(s, i), i += s.byteLength;
3841
3842
  return a;
3842
- }, Bo = async (e, t) => {
3843
+ }, Uo = async (e, t) => {
3843
3844
  try {
3844
3845
  return { kind: "table", table: await e.read(t) };
3845
3846
  } catch (n) {
3846
3847
  return { kind: "refused", refusal: n instanceof ce ? n.refusal : "not-workbook" };
3847
3848
  }
3848
- }, su = async (e, t, n, r, o) => {
3849
- const a = await e.asset(Ca(t), o);
3849
+ }, lu = async (e, t, n, r, o) => {
3850
+ const a = await e.asset(Ra(t), o);
3850
3851
  if (a.status === "cancelled") return null;
3851
3852
  if (a.status === "error") return { kind: "failure", failure: a.failure };
3852
3853
  let i;
3853
3854
  try {
3854
- i = await iu(a.body, n.maxBytes);
3855
+ i = await su(a.body, n.maxBytes);
3855
3856
  } catch {
3856
3857
  return o.aborted ? null : { kind: "failure", failure: { reason: "failed" } };
3857
3858
  }
3858
3859
  if (o.aborted) return null;
3859
3860
  if (i === null) return { kind: "refused", refusal: "too-large" };
3860
- if (!(_o(i) || qo(i))) return { kind: "not-package" };
3861
+ if (!(qo(i) || Bo(i))) return { kind: "not-package" };
3861
3862
  try {
3862
- const s = await au(i, n.limits), f = r === null ? -1 : s.sheets.findIndex((p) => p.name === r), h = Math.max(f, 0), w = s.sheets[h];
3863
+ const s = await iu(i, n.limits), f = r === null ? -1 : s.sheets.findIndex((p) => p.name === r), h = Math.max(f, 0), w = s.sheets[h];
3863
3864
  if (w === void 0) return { kind: "refused", refusal: "not-workbook" };
3864
- const d = await Bo(w, n.budget);
3865
- return o.aborted ? null : { kind: "workbook", workbook: s, selected: h, sheet: d };
3865
+ const u = await Uo(w, n.budget);
3866
+ return o.aborted ? null : { kind: "workbook", workbook: s, selected: h, sheet: u };
3866
3867
  } catch (s) {
3867
3868
  return s instanceof ce ? { kind: "refused", refusal: s.refusal } : o.aborted ? null : { kind: "failure", failure: { reason: "failed" } };
3868
3869
  }
3869
- }, lu = Object.freeze({ className: "aqmx-document-spreadsheet-body", "data-aqmx-document-scroller": "" }), cu = (e, t) => {
3870
+ }, cu = Object.freeze({ className: "aqmx-document-spreadsheet-body", "data-aqmx-document-scroller": "" }), du = (e, t) => {
3870
3871
  switch (t.code) {
3871
3872
  case "encoding":
3872
3873
  return e.spreadsheetUnreadableEncoding(t.encodings);
@@ -3875,7 +3876,7 @@ const sd = /* @__PURE__ */ new Map([
3875
3876
  case "long-row":
3876
3877
  return e.spreadsheetLongRow;
3877
3878
  }
3878
- }, fr = (e, t) => {
3879
+ }, mr = (e, t) => {
3879
3880
  switch (t) {
3880
3881
  case "encrypted":
3881
3882
  return e.spreadsheetWorkbookEncrypted;
@@ -3884,60 +3885,60 @@ const sd = /* @__PURE__ */ new Map([
3884
3885
  case "too-large":
3885
3886
  return e.spreadsheetWorkbookTooLarge;
3886
3887
  }
3887
- }, Jt = (e) => e.every((t) => t.every((n) => n === "")), Uo = ({ name: e, url: t, openUrl: n, state: r, children: o }) => /* @__PURE__ */ j("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-spreadsheet-view", "data-aqmx-spreadsheet": r, children: [
3888
- /* @__PURE__ */ u(lt, { name: e, openUrl: n, downloadUrl: t, icon: /* @__PURE__ */ u(Gc, {}) }),
3889
- /* @__PURE__ */ u(st, { scrollerProps: lu, children: /* @__PURE__ */ u("div", { className: "aqmx-document-spreadsheet-column", children: o }) })
3890
- ] }), Ho = ({ rows: e, title: t }) => {
3891
- const { labels: n, locale: r, theme: o } = $(), a = se(Ae), i = Q(() => ({ ...Mo(n, r), table: t, fullscreenDialog: n.spreadsheetFullscreen(t) }), [n, r, t]), s = Q(() => Ja(e), [e]), f = io();
3888
+ }, Jt = (e) => e.every((t) => t.every((n) => n === "")), Ho = ({ name: e, url: t, openUrl: n, state: r, children: o }) => /* @__PURE__ */ j("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-spreadsheet-view", "data-aqmx-spreadsheet": r, children: [
3889
+ /* @__PURE__ */ d(lt, { name: e, openUrl: n, downloadUrl: t, icon: /* @__PURE__ */ d(Wc, {}) }),
3890
+ /* @__PURE__ */ d(st, { scrollerProps: cu, children: /* @__PURE__ */ d("div", { className: "aqmx-document-spreadsheet-column", children: o }) })
3891
+ ] }), zo = ({ rows: e, title: t }) => {
3892
+ const { labels: n, locale: r, theme: o } = $(), a = se(Ae), i = Q(() => ({ ...Oo(n, r), table: t, fullscreenDialog: n.spreadsheetFullscreen(t) }), [n, r, t]), s = Q(() => Qa(e), [e]), f = so();
3892
3893
  return (
3893
- /* @__PURE__ */ u("div", { className: "aqmx-document-spreadsheet", "data-theme": o, children: /* @__PURE__ */ u(Ga, { tsv: s, layout: a === "fill" ? "fill" : "inline", locale: r, labels: i, tapScrollCircle: oo(f), scrollBarControls: Jr(f) }) })
3894
+ /* @__PURE__ */ d("div", { className: "aqmx-document-spreadsheet", "data-theme": o, children: /* @__PURE__ */ d(Wa, { tsv: s, layout: a === "fill" ? "fill" : "inline", locale: r, labels: i, tapScrollCircle: ao(f), scrollBarControls: Qr(f) }) })
3894
3895
  );
3895
3896
  }, Qe = ({ note: e, testId: t, code: n, download: r }) => {
3896
3897
  const { labels: o } = $();
3897
- return /* @__PURE__ */ u("div", { className: "aqmx-document-spreadsheet-stage", children: r === void 0 ? /* @__PURE__ */ u("p", { className: "aqmx-callout", role: "note", "data-testid": t, children: e }) : /* @__PURE__ */ j("div", { className: "aqmx-callout", role: "note", "data-testid": t, "data-aqmx-unreadable": n, children: [
3898
- /* @__PURE__ */ u("p", { className: "aqmx-callout-body", children: e }),
3899
- /* @__PURE__ */ u("a", { className: "aqmx-callout-action", href: r.url, download: r.name, "data-testid": "markdown-explorer-spreadsheet-unreadable-download", children: o.download })
3898
+ return /* @__PURE__ */ d("div", { className: "aqmx-document-spreadsheet-stage", children: r === void 0 ? /* @__PURE__ */ d("p", { className: "aqmx-callout", role: "note", "data-testid": t, children: e }) : /* @__PURE__ */ j("div", { className: "aqmx-callout", role: "note", "data-testid": t, "data-aqmx-unreadable": n, children: [
3899
+ /* @__PURE__ */ d("p", { className: "aqmx-callout-body", children: e }),
3900
+ /* @__PURE__ */ d("a", { className: "aqmx-callout-action", href: r.url, download: r.name, "data-testid": "markdown-explorer-spreadsheet-unreadable-download", children: o.download })
3900
3901
  ] }) });
3901
- }, zo = ({ reading: e, name: t, url: n }) => {
3902
+ }, jo = ({ reading: e, name: t, url: n }) => {
3902
3903
  const { labels: r } = $();
3903
3904
  switch (e.kind) {
3904
3905
  case "table":
3905
3906
  return /* @__PURE__ */ j(Oe, { children: [
3906
- e.truncated ? /* @__PURE__ */ u("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-truncated", children: r.spreadsheetTruncated }) : null,
3907
- /* @__PURE__ */ u(Ho, { rows: e.rows, title: t })
3907
+ e.truncated ? /* @__PURE__ */ d("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-truncated", children: r.spreadsheetTruncated }) : null,
3908
+ /* @__PURE__ */ d(zo, { rows: e.rows, title: t })
3908
3909
  ] });
3909
3910
  case "empty":
3910
- return /* @__PURE__ */ u(Qe, { note: r.spreadsheetEmpty, testId: "markdown-explorer-spreadsheet-empty" });
3911
+ return /* @__PURE__ */ d(Qe, { note: r.spreadsheetEmpty, testId: "markdown-explorer-spreadsheet-empty" });
3911
3912
  case "unreadable":
3912
- return /* @__PURE__ */ u(Qe, { note: cu(r, e), testId: "markdown-explorer-spreadsheet-unreadable", code: e.code, download: { url: n, name: t } });
3913
+ return /* @__PURE__ */ d(Qe, { note: du(r, e), testId: "markdown-explorer-spreadsheet-unreadable", code: e.code, download: { url: n, name: t } });
3913
3914
  }
3914
- }, du = ({ path: e, document: t }) => t.format === "workbook" ? /* @__PURE__ */ u(fu, { path: e, document: t }) : /* @__PURE__ */ u(uu, { path: e, document: t, format: t.format }), uu = ({ path: e, document: t, format: n }) => {
3915
+ }, uu = ({ path: e, document: t }) => t.format === "workbook" ? /* @__PURE__ */ d(mu, { path: e, document: t }) : /* @__PURE__ */ d(fu, { path: e, document: t, format: t.format }), fu = ({ path: e, document: t, format: n }) => {
3915
3916
  const { config: r, data: o, labels: a } = $(), { name: i, url: s } = t, f = _(
3916
3917
  async (p) => {
3917
- const m = await Ro(o, s, { format: n, legacyEncoding: r.legacyTextEncoding, maxBytes: r.spreadsheets.maxBytes, budget: St }, p);
3918
+ const m = await Mo(o, s, { format: n, legacyEncoding: r.legacyTextEncoding, maxBytes: r.spreadsheets.maxBytes, budget: St }, p);
3918
3919
  return m === null || m.kind === "failure" ? m : { kind: "read", value: m };
3919
3920
  },
3920
3921
  [o, s, n, r.legacyTextEncoding, r.spreadsheets.maxBytes]
3921
- ), { shown: h, failure: w, retry: d } = kn(e, i, f);
3922
- return /* @__PURE__ */ j(Uo, { name: i, url: s, openUrl: Lt(s), state: h === null ? w === null ? "loading" : "failure" : h.kind, children: [
3923
- h === null && w === null ? /* @__PURE__ */ u(He, { label: a.spreadsheetLoading, testId: "markdown-explorer-spreadsheet-skeleton" }) : null,
3924
- h === null && w !== null ? /* @__PURE__ */ u("div", { className: "aqmx-document-spreadsheet-failure", children: /* @__PURE__ */ u(Ue, { failure: w, alert: !1, onRetry: d, testId: "markdown-explorer-spreadsheet-failure" }) }) : null,
3925
- h === null ? null : /* @__PURE__ */ u(zo, { reading: h, name: i, url: s })
3922
+ ), { shown: h, failure: w, retry: u } = kn(e, i, f);
3923
+ return /* @__PURE__ */ j(Ho, { name: i, url: s, openUrl: Lt(s), state: h === null ? w === null ? "loading" : "failure" : h.kind, children: [
3924
+ h === null && w === null ? /* @__PURE__ */ d(He, { label: a.spreadsheetLoading, testId: "markdown-explorer-spreadsheet-skeleton" }) : null,
3925
+ h === null && w !== null ? /* @__PURE__ */ d("div", { className: "aqmx-document-spreadsheet-failure", children: /* @__PURE__ */ d(Ue, { failure: w, alert: !1, onRetry: u, testId: "markdown-explorer-spreadsheet-failure" }) }) : null,
3926
+ h === null ? null : /* @__PURE__ */ d(jo, { reading: h, name: i, url: s })
3926
3927
  ] });
3927
- }, fu = ({ path: e, document: t }) => {
3928
+ }, mu = ({ path: e, document: t }) => {
3928
3929
  const { config: n, data: r, labels: o } = $(), { name: a, url: i, firstSheetText: s } = t, f = Le(), h = z(null), w = _(
3929
3930
  async (W) => {
3930
- const Y = await su(r, i, { maxBytes: n.spreadsheets.maxWorkbookBytes, limits: Qc, budget: St }, h.current, W);
3931
+ const Y = await lu(r, i, { maxBytes: n.spreadsheets.maxWorkbookBytes, limits: ed, budget: St }, h.current, W);
3931
3932
  if (Y === null || Y.kind === "failure") return Y;
3932
3933
  if (Y.kind === "workbook") return { kind: "read", value: Y };
3933
3934
  if (s !== null) {
3934
- const c = await Ro(r, i, { format: s, legacyEncoding: n.legacyTextEncoding, maxBytes: n.spreadsheets.maxBytes, budget: St }, W);
3935
+ const c = await Mo(r, i, { format: s, legacyEncoding: n.legacyTextEncoding, maxBytes: n.spreadsheets.maxBytes, budget: St }, W);
3935
3936
  return c === null || c.kind === "failure" ? c : { kind: "read", value: { kind: "first-sheet", reading: c } };
3936
3937
  }
3937
3938
  return { kind: "read", value: { kind: "refused", refusal: Y.kind === "not-package" ? "not-workbook" : Y.refusal } };
3938
3939
  },
3939
3940
  [r, i, s, n.legacyTextEncoding, n.spreadsheets.maxBytes, n.spreadsheets.maxWorkbookBytes]
3940
- ), { shown: d, failure: p, retry: m } = kn(e, a, w), [g, v] = V(null), b = z(/* @__PURE__ */ new WeakMap()), k = d?.kind === "workbook" ? d : null, M = k === null ? null : g !== null && g.workbook === k.workbook ? g : { workbook: k.workbook, index: k.selected, reading: k.sheet }, D = (W) => {
3941
+ ), { shown: u, failure: p, retry: m } = kn(e, a, w), [g, v] = V(null), b = z(/* @__PURE__ */ new WeakMap()), k = u?.kind === "workbook" ? u : null, M = k === null ? null : g !== null && g.workbook === k.workbook ? g : { workbook: k.workbook, index: k.selected, reading: k.sheet }, D = (W) => {
3941
3942
  if (k === null) return;
3942
3943
  const Y = k.workbook.sheets[W];
3943
3944
  if (Y === void 0) return;
@@ -3947,32 +3948,32 @@ const sd = /* @__PURE__ */ new Map([
3947
3948
  const l = c.get(W), E = { workbook: k.workbook, index: W, reading: l ?? null };
3948
3949
  if (v(E), l !== void 0) return;
3949
3950
  const x = c;
3950
- Bo(Y, St).then((O) => {
3951
+ Uo(Y, St).then((O) => {
3951
3952
  x.set(W, O), v((F) => F === E ? { ...E, reading: O } : F);
3952
3953
  });
3953
- }, C = M === null ? null : M.reading === null ? "loading" : M.reading.kind === "refused" ? "unreadable" : Jt(M.reading.table.rows) ? "empty" : "table", R = d === null ? p === null ? "loading" : "failure" : d.kind === "first-sheet" ? d.reading.kind : d.kind === "refused" ? "unreadable" : C ?? "loading", I = s === null ? i : Lt(i), P = (W) => `${f}-sheet-${W}`, U = `${f}-panel`, N = M === null ? null : k?.workbook.sheets[M.index]?.name ?? null, H = k !== null && k.workbook.sheets.length > 1;
3954
- return /* @__PURE__ */ j(Uo, { name: a, url: i, openUrl: I, state: R, children: [
3955
- d === null && p === null ? /* @__PURE__ */ u(He, { label: o.spreadsheetLoading, testId: "markdown-explorer-spreadsheet-skeleton" }) : null,
3956
- d === null && p !== null ? /* @__PURE__ */ u("div", { className: "aqmx-document-spreadsheet-failure", children: /* @__PURE__ */ u(Ue, { failure: p, alert: !1, onRetry: m, testId: "markdown-explorer-spreadsheet-failure" }) }) : null,
3957
- d?.kind === "refused" ? /* @__PURE__ */ u(Qe, { note: fr(o, d.refusal), testId: "markdown-explorer-spreadsheet-unreadable", code: d.refusal, download: { url: i, name: a } }) : null,
3958
- d?.kind === "first-sheet" ? /* @__PURE__ */ j(Oe, { children: [
3959
- /* @__PURE__ */ u("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-first-sheet", children: o.spreadsheetWorkbookFirstSheet }),
3960
- /* @__PURE__ */ u(zo, { reading: d.reading, name: a, url: i })
3954
+ }, C = M === null ? null : M.reading === null ? "loading" : M.reading.kind === "refused" ? "unreadable" : Jt(M.reading.table.rows) ? "empty" : "table", R = u === null ? p === null ? "loading" : "failure" : u.kind === "first-sheet" ? u.reading.kind : u.kind === "refused" ? "unreadable" : C ?? "loading", I = s === null ? i : Lt(i), P = (W) => `${f}-sheet-${W}`, U = `${f}-panel`, N = M === null ? null : k?.workbook.sheets[M.index]?.name ?? null, H = k !== null && k.workbook.sheets.length > 1;
3955
+ return /* @__PURE__ */ j(Ho, { name: a, url: i, openUrl: I, state: R, children: [
3956
+ u === null && p === null ? /* @__PURE__ */ d(He, { label: o.spreadsheetLoading, testId: "markdown-explorer-spreadsheet-skeleton" }) : null,
3957
+ u === null && p !== null ? /* @__PURE__ */ d("div", { className: "aqmx-document-spreadsheet-failure", children: /* @__PURE__ */ d(Ue, { failure: p, alert: !1, onRetry: m, testId: "markdown-explorer-spreadsheet-failure" }) }) : null,
3958
+ u?.kind === "refused" ? /* @__PURE__ */ d(Qe, { note: mr(o, u.refusal), testId: "markdown-explorer-spreadsheet-unreadable", code: u.refusal, download: { url: i, name: a } }) : null,
3959
+ u?.kind === "first-sheet" ? /* @__PURE__ */ j(Oe, { children: [
3960
+ /* @__PURE__ */ d("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-first-sheet", children: o.spreadsheetWorkbookFirstSheet }),
3961
+ /* @__PURE__ */ d(jo, { reading: u.reading, name: a, url: i })
3961
3962
  ] }) : null,
3962
3963
  k === null || M === null || N === null ? null : /* @__PURE__ */ j(Oe, { children: [
3963
- k.workbook.unshownSheets > 0 ? /* @__PURE__ */ u("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-unshown-sheets", children: o.spreadsheetUnshownSheets(k.workbook.unshownSheets) }) : null,
3964
- k.workbook.unlistedSheets > 0 ? /* @__PURE__ */ u("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-unlisted-sheets", children: o.spreadsheetUnlistedSheets(k.workbook.sheets.length) }) : null,
3965
- H ? /* @__PURE__ */ u(td, { names: k.workbook.sheets.map((W) => W.name), selected: M.index, onSelect: D, label: o.spreadsheetSheets(a), tabIdOf: P, panelId: U }) : null,
3964
+ k.workbook.unshownSheets > 0 ? /* @__PURE__ */ d("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-unshown-sheets", children: o.spreadsheetUnshownSheets(k.workbook.unshownSheets) }) : null,
3965
+ k.workbook.unlistedSheets > 0 ? /* @__PURE__ */ d("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-unlisted-sheets", children: o.spreadsheetUnlistedSheets(k.workbook.sheets.length) }) : null,
3966
+ H ? /* @__PURE__ */ d(nd, { names: k.workbook.sheets.map((W) => W.name), selected: M.index, onSelect: D, label: o.spreadsheetSheets(a), tabIdOf: P, panelId: U }) : null,
3966
3967
  /* @__PURE__ */ j("div", { className: "aqmx-document-spreadsheet-sheet", "data-testid": "markdown-explorer-spreadsheet-sheet", "data-aqmx-sheet": M.index, ...H ? { role: "tabpanel", id: U, "aria-labelledby": P(M.index) } : {}, children: [
3967
- M.reading === null ? /* @__PURE__ */ u(He, { label: o.spreadsheetSheetLoading, testId: "markdown-explorer-spreadsheet-sheet-skeleton" }) : null,
3968
- M.reading?.kind === "table" && M.reading.table.truncated ? /* @__PURE__ */ u("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-truncated", children: o.spreadsheetTruncated }) : null,
3969
- M.reading?.kind === "refused" ? /* @__PURE__ */ u(Qe, { note: fr(o, M.reading.refusal), testId: "markdown-explorer-spreadsheet-unreadable", code: M.reading.refusal, download: { url: i, name: a } }) : null,
3970
- M.reading?.kind === "table" && Jt(M.reading.table.rows) ? /* @__PURE__ */ u(Qe, { note: o.spreadsheetSheetEmpty, testId: "markdown-explorer-spreadsheet-empty" }) : null,
3971
- M.reading?.kind === "table" && !Jt(M.reading.table.rows) ? /* @__PURE__ */ u(Ho, { rows: M.reading.table.rows, title: o.spreadsheetSheetName(a, N) }, M.index) : null
3968
+ M.reading === null ? /* @__PURE__ */ d(He, { label: o.spreadsheetSheetLoading, testId: "markdown-explorer-spreadsheet-sheet-skeleton" }) : null,
3969
+ M.reading?.kind === "table" && M.reading.table.truncated ? /* @__PURE__ */ d("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-truncated", children: o.spreadsheetTruncated }) : null,
3970
+ M.reading?.kind === "refused" ? /* @__PURE__ */ d(Qe, { note: mr(o, M.reading.refusal), testId: "markdown-explorer-spreadsheet-unreadable", code: M.reading.refusal, download: { url: i, name: a } }) : null,
3971
+ M.reading?.kind === "table" && Jt(M.reading.table.rows) ? /* @__PURE__ */ d(Qe, { note: o.spreadsheetSheetEmpty, testId: "markdown-explorer-spreadsheet-empty" }) : null,
3972
+ M.reading?.kind === "table" && !Jt(M.reading.table.rows) ? /* @__PURE__ */ d(zo, { rows: M.reading.table.rows, title: o.spreadsheetSheetName(a, N) }, M.index) : null
3972
3973
  ] })
3973
3974
  ] })
3974
3975
  ] });
3975
- }, mu = Object.freeze({ kind: "empty" }), hu = (e, t, n) => {
3976
+ }, hu = Object.freeze({ kind: "empty" }), pu = (e, t, n) => {
3976
3977
  if (t.view === "multi" || t.overrides[n] === void 0) return null;
3977
3978
  const r = n === "style" ? { align: t.overrides.align } : { style: t.overrides.style };
3978
3979
  return xe(e, { ...t, overrides: r });
@@ -3980,14 +3981,14 @@ const sd = /* @__PURE__ */ new Map([
3980
3981
  const f = se(Ae);
3981
3982
  return (
3982
3983
  /* @__PURE__ */ j("section", { ref: a, role: "region", "aria-label": n, "aria-busy": o, "data-testid": "markdown-explorer-document", "data-aqmx-document-kind": e, "data-aqmx-document-view": t, "data-aqmx-document-flow": f, className: "aqmx-document", ...i, children: [
3983
- r ? /* @__PURE__ */ u("div", { className: "aqmx-progress", "aria-hidden": "true", "data-testid": "markdown-explorer-document-progress" }) : null,
3984
+ r ? /* @__PURE__ */ d("div", { className: "aqmx-progress", "aria-hidden": "true", "data-testid": "markdown-explorer-document-progress" }) : null,
3984
3985
  s
3985
3986
  ] })
3986
3987
  );
3987
- }, pu = Object.freeze({ invalid: "documentIdInvalid", "not-found": "documentIdNotFound" }), mr = (e, t) => {
3988
- const n = pu[t];
3988
+ }, wu = Object.freeze({ invalid: "documentIdInvalid", "not-found": "documentIdNotFound" }), hr = (e, t) => {
3989
+ const n = wu[t];
3989
3990
  return n === void 0 ? void 0 : { title: e.documentIdFailedTitle, body: e[n] };
3990
- }, wu = ({ absence: e, announces: t, announceFailure: n }) => {
3991
+ }, gu = ({ absence: e, announces: t, announceFailure: n }) => {
3991
3992
  const { labels: r, announcer: o } = $(), a = e.kind === "no-readme" ? e.folder : null, i = e.kind === "failure" ? e.folder : null, s = e.kind === "failure" ? e.failure : null, f = e.kind === "document-id" ? e.failure : null;
3992
3993
  switch (ne(() => {
3993
3994
  t && a !== null && o.announce(r.folderReadmeMissing(ve(a)));
@@ -3999,54 +4000,54 @@ const sd = /* @__PURE__ */ new Map([
3999
4000
  if (f === null) return;
4000
4001
  const { reason: h } = f;
4001
4002
  if (me(h)) return;
4002
- const w = mr(r, h);
4003
+ const w = hr(r, h);
4003
4004
  n(r.announcementSequence([r.documentIdFailedTitle, w === void 0 ? we(r, h) : w.body]));
4004
4005
  }, [f, n, r]), e.kind) {
4005
4006
  case "empty":
4006
- return /* @__PURE__ */ u(Fe, { kind: "empty", label: r.documentRegion, stale: !1, busy: !1, children: /* @__PURE__ */ u("div", { className: "aqmx-empty", "data-testid": "markdown-explorer-document-empty", children: /* @__PURE__ */ u("p", { className: "aqmx-empty-title", children: r.documentEmpty }) }) });
4007
+ return /* @__PURE__ */ d(Fe, { kind: "empty", label: r.documentRegion, stale: !1, busy: !1, children: /* @__PURE__ */ d("div", { className: "aqmx-empty", "data-testid": "markdown-explorer-document-empty", children: /* @__PURE__ */ d("p", { className: "aqmx-empty-title", children: r.documentEmpty }) }) });
4007
4008
  case "loading":
4008
- return /* @__PURE__ */ u(xn, { label: r.documentRegion });
4009
+ return /* @__PURE__ */ d(xn, { label: r.documentRegion });
4009
4010
  case "no-readme":
4010
- return /* @__PURE__ */ u(Fe, { kind: "empty", label: r.documentRegion, stale: !1, busy: !1, children: /* @__PURE__ */ u("div", { className: "aqmx-empty", "data-testid": "markdown-explorer-folder-empty", children: /* @__PURE__ */ u("p", { className: "aqmx-empty-title", children: r.folderReadmeMissing(ve(e.folder)) }) }) });
4011
+ return /* @__PURE__ */ d(Fe, { kind: "empty", label: r.documentRegion, stale: !1, busy: !1, children: /* @__PURE__ */ d("div", { className: "aqmx-empty", "data-testid": "markdown-explorer-folder-empty", children: /* @__PURE__ */ d("p", { className: "aqmx-empty-title", children: r.folderReadmeMissing(ve(e.folder)) }) }) });
4011
4012
  case "failure":
4012
- return /* @__PURE__ */ u(Fe, { kind: "failure", label: r.documentRegion, stale: !1, busy: !1, children: /* @__PURE__ */ u(Rt, { failure: e.failure, onRetry: e.onRetry, testId: "markdown-explorer-folder-failure" }) });
4013
+ return /* @__PURE__ */ d(Fe, { kind: "failure", label: r.documentRegion, stale: !1, busy: !1, children: /* @__PURE__ */ d(Rt, { failure: e.failure, onRetry: e.onRetry, testId: "markdown-explorer-folder-failure" }) });
4013
4014
  case "document-id":
4014
- return /* @__PURE__ */ u(Fe, { kind: "failure", label: r.documentRegion, stale: !1, busy: !1, children: /* @__PURE__ */ u(Rt, { failure: e.failure, onRetry: e.onRetry, testId: "markdown-explorer-document-id-failure", text: mr(r, e.failure.reason), deniedSentence: r.documentIdForbidden }) });
4015
+ return /* @__PURE__ */ d(Fe, { kind: "failure", label: r.documentRegion, stale: !1, busy: !1, children: /* @__PURE__ */ d(Rt, { failure: e.failure, onRetry: e.onRetry, testId: "markdown-explorer-document-id-failure", text: hr(r, e.failure.reason), deniedSentence: r.documentIdForbidden }) });
4015
4016
  }
4016
4017
  }, xn = ({ label: e }) => {
4017
4018
  const { labels: t } = $();
4018
- return /* @__PURE__ */ u(Fe, { kind: "loading", label: e, stale: !1, busy: !0, children: /* @__PURE__ */ u(He, { label: t.documentLoading, testId: "markdown-explorer-document-skeleton" }) });
4019
- }, hr = Object.freeze(["wheel", "touchstart", "pointerdown", "keydown"]), gu = ({ path: e, document: t, viewer: n, editing: r }) => {
4020
- const { reportMathDiagnostics: o, edits: a } = $(), i = Q(() => ({ htmlContent: t.htmlContent, headings: [...t.headings] }), [t]), s = Mc(), f = Oc(), h = Q(() => o === void 0 ? void 0 : (R) => o(e, R), [o, e]), w = z(null), { editable: d, doubleClick: p, region: m, paneScroll: g, stale: v } = r;
4019
+ return /* @__PURE__ */ d(Fe, { kind: "loading", label: e, stale: !1, busy: !0, children: /* @__PURE__ */ d(He, { label: t.documentLoading, testId: "markdown-explorer-document-skeleton" }) });
4020
+ }, pr = Object.freeze(["wheel", "touchstart", "pointerdown", "keydown"]), vu = ({ path: e, document: t, viewer: n, editing: r }) => {
4021
+ const { reportMathDiagnostics: o, edits: a } = $(), i = Q(() => ({ htmlContent: t.htmlContent, headings: [...t.headings] }), [t]), s = Oc(), f = Lc(), h = Q(() => o === void 0 ? void 0 : (R) => o(e, R), [o, e]), w = z(null), { editable: u, doubleClick: p, region: m, paneScroll: g, stale: v } = r;
4021
4022
  K(() => {
4022
- if (d)
4023
+ if (u)
4023
4024
  return a.bindView(e, {
4024
4025
  anchor: () => {
4025
4026
  const R = w.current, I = m(), P = R === null ? null : R.querySelector(It);
4026
- return R === null || I === null || P === null ? null : _s(R, g.scrollerOf(I, P));
4027
+ return R === null || I === null || P === null ? null : qs(R, g.scrollerOf(I, P));
4027
4028
  }
4028
4029
  });
4029
- }, [a, e, d, m, g]);
4030
+ }, [a, e, u, m, g]);
4030
4031
  const b = (R) => {
4031
4032
  const I = w.current, { target: P } = R;
4032
- !p || I === null || !(P instanceof Element) || !Fs(P) || (R.stopPropagation(), a.start(e, $s(P, I, I.ownerDocument.getSelection())));
4033
+ !p || I === null || !(P instanceof Element) || !$s(P) || (R.stopPropagation(), a.start(e, _s(P, I, I.ownerDocument.getSelection())));
4033
4034
  }, k = z(null), M = z(v);
4034
4035
  K(() => {
4035
4036
  M.current = v;
4036
4037
  });
4037
4038
  const D = pe((R) => {
4038
- const I = w.current, P = m(), U = I === null ? null : zs(I, R.line);
4039
+ const I = w.current, P = m(), U = I === null ? null : js(I, R.line);
4039
4040
  if (P === null || U === null) return !1;
4040
4041
  const N = g.scrollerOf(P, U);
4041
- return N.scrollTop += js(U, R.line) - R.clientTop, !0;
4042
+ return N.scrollTop += Vs(U, R.line) - R.clientTop, !0;
4042
4043
  }), C = pe((R) => {
4043
4044
  const I = m();
4044
4045
  if (I === null) return;
4045
4046
  const P = () => {
4046
- for (const N of hr) I.removeEventListener(N, U, !0);
4047
+ for (const N of pr) I.removeEventListener(N, U, !0);
4047
4048
  k.current?.release === P && (k.current = null);
4048
4049
  }, U = () => P();
4049
- for (const N of hr) I.addEventListener(N, U, { capture: !0, passive: !0 });
4050
+ for (const N of pr) I.addEventListener(N, U, { capture: !0, passive: !0 });
4050
4051
  k.current = { point: R, release: P };
4051
4052
  });
4052
4053
  return K(() => {
@@ -4059,13 +4060,13 @@ const sd = /* @__PURE__ */ new Map([
4059
4060
  const R = k.current;
4060
4061
  R === null || v || (R.release(), D(R.point));
4061
4062
  }, [t, v]),
4062
- /* @__PURE__ */ u("div", { ref: w, className: "aqmx-document-viewer", onDoubleClick: b, children: /* @__PURE__ */ u(Dr, { ...n, onHeadingSelect: s, headingHref: f, onMathDiagnostics: h, parseResult: i, content: null }) });
4063
- }, jo = ({ document: e, viewer: t }) => {
4063
+ /* @__PURE__ */ d("div", { ref: w, className: "aqmx-document-viewer", onDoubleClick: b, children: /* @__PURE__ */ d(Nr, { ...n, onHeadingSelect: s, headingHref: f, onMathDiagnostics: h, parseResult: i, content: null }) });
4064
+ }, Vo = ({ document: e, viewer: t }) => {
4064
4065
  const { labels: n } = $();
4065
4066
  return /* @__PURE__ */ j(Oe, { children: [
4066
- /* @__PURE__ */ u(lt, { name: e.name, openUrl: Lt(e.url), downloadUrl: e.url, icon: /* @__PURE__ */ u(Ts, {}), children: e.truncated ? null : /* @__PURE__ */ u(Tl, { text: e.text }) }),
4067
- e.truncated ? /* @__PURE__ */ u("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-text-truncated", children: n.textTruncated }) : null,
4068
- /* @__PURE__ */ u("div", { className: "aqmx-document-viewer", children: /* @__PURE__ */ u(Dr, { ...t, parseResult: null, content: e.text }) })
4067
+ /* @__PURE__ */ d(lt, { name: e.name, openUrl: Lt(e.url), downloadUrl: e.url, icon: /* @__PURE__ */ d(Cs, {}), children: e.truncated ? null : /* @__PURE__ */ d(Cl, { text: e.text }) }),
4068
+ e.truncated ? /* @__PURE__ */ d("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-text-truncated", children: n.textTruncated }) : null,
4069
+ /* @__PURE__ */ d("div", { className: "aqmx-document-viewer", children: /* @__PURE__ */ d(Nr, { ...t, parseResult: null, content: e.text }) })
4069
4070
  ] });
4070
4071
  }, Qt = ({ path: e, name: t, viewer: n }) => {
4071
4072
  const { data: r, labels: o } = $(), a = _(
@@ -4075,54 +4076,54 @@ const sd = /* @__PURE__ */ new Map([
4075
4076
  },
4076
4077
  [r, e]
4077
4078
  ), { shown: i, failure: s, retry: f } = kn(e, t, a);
4078
- return i !== null ? /* @__PURE__ */ u(jo, { document: i, viewer: n }) : s !== null ? /* @__PURE__ */ u(Rt, { failure: s, onRetry: f, testId: "markdown-explorer-markup-failure" }) : /* @__PURE__ */ u(He, { label: o.markupLoading, testId: "markdown-explorer-markup-skeleton" });
4079
- }, vu = Object.freeze({ reason: "failed" }), yu = (e) => {
4079
+ return i !== null ? /* @__PURE__ */ d(Vo, { document: i, viewer: n }) : s !== null ? /* @__PURE__ */ d(Rt, { failure: s, onRetry: f, testId: "markdown-explorer-markup-failure" }) : /* @__PURE__ */ d(He, { label: o.markupLoading, testId: "markdown-explorer-markup-skeleton" });
4080
+ }, yu = Object.freeze({ reason: "failed" }), bu = (e) => {
4080
4081
  const { labels: t } = $();
4081
- return /* @__PURE__ */ u(
4082
- Ms,
4082
+ return /* @__PURE__ */ d(
4083
+ Os,
4083
4084
  {
4084
- fallback: (n) => /* @__PURE__ */ u("div", { className: "aqmx-edit-message", children: /* @__PURE__ */ u(Ue, { failure: vu, alert: !1, onRetry: n, testId: "markdown-explorer-edit-load-failure" }) }),
4085
- children: /* @__PURE__ */ u(tt, { fallback: /* @__PURE__ */ u(He, { label: t.editLoading, testId: "markdown-explorer-edit-skeleton" }), children: /* @__PURE__ */ u(Rs, { ...e }) })
4085
+ fallback: (n) => /* @__PURE__ */ d("div", { className: "aqmx-edit-message", children: /* @__PURE__ */ d(Ue, { failure: yu, alert: !1, onRetry: n, testId: "markdown-explorer-edit-load-failure" }) }),
4086
+ children: /* @__PURE__ */ d(tt, { fallback: /* @__PURE__ */ d(He, { label: t.editLoading, testId: "markdown-explorer-edit-skeleton" }), children: /* @__PURE__ */ d(Ms, { ...e }) })
4086
4087
  }
4087
4088
  );
4088
- }, bu = ({ path: e, document: t, view: n, viewer: r, contentViewer: o, onRetry: a, editing: i }) => {
4089
+ }, ku = ({ path: e, document: t, view: n, viewer: r, contentViewer: o, onRetry: a, editing: i }) => {
4089
4090
  switch (t.kind) {
4090
4091
  case "markdown": {
4091
- const { session: s, layout: f, region: h, paneScroll: w, stale: d } = i;
4092
- if (n === "edit" && s !== void 0) return /* @__PURE__ */ u(yu, { path: e, name: t.name, session: s, layout: f, viewer: o, region: h, paneScroll: w });
4093
- if (n === "markup") return /* @__PURE__ */ u(Qt, { path: e, name: t.name, viewer: o });
4092
+ const { session: s, layout: f, region: h, paneScroll: w, stale: u } = i;
4093
+ if (n === "edit" && s !== void 0) return /* @__PURE__ */ d(bu, { path: e, name: t.name, session: s, layout: f, viewer: o, region: h, paneScroll: w });
4094
+ if (n === "markup") return /* @__PURE__ */ d(Qt, { path: e, name: t.name, viewer: o });
4094
4095
  const p = t.edit !== null && (t.edit.kind === "inline" || t.edit.kind === "draft");
4095
- return /* @__PURE__ */ u(gu, { path: e, document: t, viewer: o, editing: { editable: p, doubleClick: p && f === "fill", region: h, paneScroll: w, stale: d } });
4096
+ return /* @__PURE__ */ d(vu, { path: e, document: t, viewer: o, editing: { editable: p, doubleClick: p && f === "fill", region: h, paneScroll: w, stale: u } });
4096
4097
  }
4097
4098
  case "text":
4098
- return /* @__PURE__ */ u(jo, { document: t, viewer: o });
4099
+ return /* @__PURE__ */ d(Vo, { document: t, viewer: o });
4099
4100
  case "image":
4100
- return n === "markup" && bn(t) === "svg" ? /* @__PURE__ */ u(Qt, { path: e, name: t.name, viewer: r }) : /* @__PURE__ */ u(wc, { document: t });
4101
+ return n === "markup" && bn(t) === "svg" ? /* @__PURE__ */ d(Qt, { path: e, name: t.name, viewer: r }) : /* @__PURE__ */ d(gc, { document: t });
4101
4102
  case "media":
4102
- return /* @__PURE__ */ u(zc, { document: t });
4103
+ return /* @__PURE__ */ d(jc, { document: t });
4103
4104
  case "spreadsheet":
4104
- return n === "markup" ? /* @__PURE__ */ u(Qt, { path: e, name: t.name, viewer: r }) : /* @__PURE__ */ u(du, { path: e, document: t });
4105
+ return n === "markup" ? /* @__PURE__ */ d(Qt, { path: e, name: t.name, viewer: r }) : /* @__PURE__ */ d(uu, { path: e, document: t });
4105
4106
  case "file":
4106
- return /* @__PURE__ */ u(_l, { document: t });
4107
+ return /* @__PURE__ */ d(ql, { document: t });
4107
4108
  case "failure":
4108
- return /* @__PURE__ */ u(Rt, { failure: t.failure, onRetry: a, testId: "markdown-explorer-document-failure" });
4109
+ return /* @__PURE__ */ d(Rt, { failure: t.failure, onRetry: a, testId: "markdown-explorer-document-failure" });
4109
4110
  default: {
4110
4111
  const s = t;
4111
4112
  throw new RangeError(`[markdown-explorer] unknown document kind ${G(s.kind)}`);
4112
4113
  }
4113
4114
  }
4114
- }, ku = (e) => {
4115
+ }, Eu = (e) => {
4115
4116
  const { document: t, viewer: n } = e, r = t.kind === "markdown" || t.kind === "text" ? t.lang : void 0, o = Q(() => r === void 0 ? n : { ...n, contentLang: r }, [n, r]);
4116
- return /* @__PURE__ */ u(vo, { value: r, children: /* @__PURE__ */ u(bu, { ...e, contentViewer: o }) });
4117
- }, Eu = 'a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), iframe, audio[controls], video[controls], [tabindex]:not([tabindex="-1"])', pr = (e, t, n) => {
4118
- const [r] = t.kind === "markdown" ? t.headings : [], o = [n === null ? null : po(e, n), r === void 0 ? null : ho(e, r.id), e.querySelector(It), e.querySelector(Eu)];
4117
+ return /* @__PURE__ */ d(yo, { value: r, children: /* @__PURE__ */ d(ku, { ...e, contentViewer: o }) });
4118
+ }, Su = 'a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), iframe, audio[controls], video[controls], [tabindex]:not([tabindex="-1"])', wr = (e, t, n) => {
4119
+ const [r] = t.kind === "markdown" ? t.headings : [], o = [n === null ? null : wo(e, n), r === void 0 ? null : po(e, r.id), e.querySelector(It), e.querySelector(Su)];
4119
4120
  for (const a of o)
4120
- if (a instanceof HTMLElement && Xr(a)) return a;
4121
+ if (a instanceof HTMLElement && Yr(a)) return a;
4121
4122
  return null;
4122
- }, wr = (e, t, n) => {
4123
+ }, gr = (e, t, n) => {
4123
4124
  const { activeElement: r, body: o } = e.ownerDocument, a = r === null || r === o;
4124
- t instanceof HTMLElement && n && (a || e.contains(r)) && Xr(t);
4125
- }, Su = (e) => {
4125
+ t instanceof HTMLElement && n && (a || e.contains(r)) && Yr(t);
4126
+ }, xu = (e) => {
4126
4127
  const t = z(!1);
4127
4128
  return K(() => {
4128
4129
  const n = e.current;
@@ -4141,24 +4142,24 @@ const sd = /* @__PURE__ */ new Map([
4141
4142
  }, w = () => {
4142
4143
  const { activeElement: p, body: m } = r;
4143
4144
  p !== null && p !== m && (t.current = n.contains(p));
4144
- }, d = () => {
4145
+ }, u = () => {
4145
4146
  a && !n.contains(r.activeElement) && (t.current = !1);
4146
4147
  };
4147
- return o.addEventListener("pointerdown", s, !0), o.addEventListener("mousedown", s, !0), o.addEventListener("focusin", f, !0), o.addEventListener("blur", w), o.addEventListener("focus", d), n.addEventListener("focusout", h), () => {
4148
- clearTimeout(i), o.removeEventListener("pointerdown", s, !0), o.removeEventListener("mousedown", s, !0), o.removeEventListener("focusin", f, !0), o.removeEventListener("blur", w), o.removeEventListener("focus", d), n.removeEventListener("focusout", h);
4148
+ return o.addEventListener("pointerdown", s, !0), o.addEventListener("mousedown", s, !0), o.addEventListener("focusin", f, !0), o.addEventListener("blur", w), o.addEventListener("focus", u), n.addEventListener("focusout", h), () => {
4149
+ clearTimeout(i), o.removeEventListener("pointerdown", s, !0), o.removeEventListener("mousedown", s, !0), o.removeEventListener("focusin", f, !0), o.removeEventListener("blur", w), o.removeEventListener("focus", u), n.removeEventListener("focusout", h);
4149
4150
  };
4150
4151
  }, [e]), t;
4151
- }, xu = Object.freeze({ count: 0, recovered: !1 }), Tu = ({ path: e, snapshot: t, markup: n, stale: r, viewer: o, editLayout: a, regionLabel: i, navigation: s, fragment: f, paneScroll: h, announces: w, announceFailure: d, onDocumentShown: p }) => {
4152
- const { labels: m, announcer: g, documents: v } = $(), { document: b } = t, k = z(null), M = z(null), D = z(null), C = z(null), [R, I] = V(null), P = z(null), U = Su(k), N = z({ path: e, document: b }), H = z(null), W = _(
4152
+ }, Tu = Object.freeze({ count: 0, recovered: !1 }), Cu = ({ path: e, snapshot: t, markup: n, stale: r, viewer: o, editLayout: a, regionLabel: i, navigation: s, fragment: f, paneScroll: h, announces: w, announceFailure: u, onDocumentShown: p }) => {
4153
+ const { labels: m, announcer: g, documents: v } = $(), { document: b } = t, k = z(null), M = z(null), D = z(null), C = z(null), [R, I] = V(null), P = z(null), U = xu(k), N = z({ path: e, document: b }), H = z(null), W = _(
4153
4154
  (Z) => {
4154
- const J = k.current, ie = Kn(J, Z, h);
4155
- J !== null && ie !== null && wr(J, ie, U.current);
4155
+ const J = k.current, ie = Xn(J, Z, h);
4156
+ J !== null && ie !== null && gr(J, ie, U.current);
4156
4157
  },
4157
4158
  [h, U]
4158
4159
  ), Y = _((Z, J) => {
4159
4160
  const ie = C.current;
4160
4161
  setTimeout(() => {
4161
- J.defaultPrevented || Qo(() => I({ fragment: Z, from: ie }));
4162
+ J.defaultPrevented || ea(() => I({ fragment: Z, from: ie }));
4162
4163
  }, 0);
4163
4164
  }, []), c = _(
4164
4165
  (Z) => {
@@ -4167,13 +4168,13 @@ const sd = /* @__PURE__ */ new Map([
4167
4168
  }, 0);
4168
4169
  },
4169
4170
  [W]
4170
- ), l = Q(() => ({ navigation: s, currentPath: e, scrollWithin: W, followFragmentJump: Y, followEmptyFragment: c }), [s, e, W, Y, c]), E = _(() => v.retry(e), [v, e]), x = Gs(v, kc), O = Zr(e), F = O !== void 0 ? "edit" : n ? "markup" : "rendered", y = bn(b) === null ? void 0 : F, S = _(() => k.current, []), L = _(() => {
4171
+ ), l = Q(() => ({ navigation: s, currentPath: e, scrollWithin: W, followFragmentJump: Y, followEmptyFragment: c }), [s, e, W, Y, c]), E = _(() => v.retry(e), [v, e]), x = Ws(v, Ec), O = Gr(e), F = O !== void 0 ? "edit" : n ? "markup" : "rendered", y = bn(b) === null ? void 0 : F, S = _(() => k.current, []), L = _(() => {
4171
4172
  const Z = k.current;
4172
- Z !== null && pr(Z, b, null);
4173
- }, [b]), A = Q(() => ({ session: O, layout: a, region: S, paneScroll: h, stale: r }), [O, a, S, h, r]), q = y === "edit" ? !1 : r, te = se(Ae), re = y === "edit" && a === "fill" ? "fill" : te, [X, de] = V(0), Ce = z(0), he = z(!1), [Re, _t] = V(xu), [je, ut] = V(0), be = z(d), Ve = z(r);
4173
+ Z !== null && wr(Z, b, null);
4174
+ }, [b]), A = Q(() => ({ session: O, layout: a, region: S, paneScroll: h, stale: r }), [O, a, S, h, r]), q = y === "edit" ? !1 : r, ee = se(Ae), re = y === "edit" && a === "fill" ? "fill" : ee, [X, de] = V(0), Ce = z(0), he = z(!1), [Re, _t] = V(Tu), [je, ut] = V(0), be = z(u), Ve = z(r);
4174
4175
  K(() => {
4175
- be.current = d, Ve.current = r;
4176
- }, [d, r]);
4176
+ be.current = u, Ve.current = r;
4177
+ }, [u, r]);
4177
4178
  const ft = Q(
4178
4179
  () => ({
4179
4180
  announceFailure: (Z) => {
@@ -4215,7 +4216,7 @@ const sd = /* @__PURE__ */ new Map([
4215
4216
  if (ue.kind === "failure") {
4216
4217
  he.current = !1;
4217
4218
  const { reason: ke } = ue.failure;
4218
- v.noteFailureShown(J) && !me(ke) && d(m.documentFailed(ve(Z), we(m, ke)));
4219
+ v.noteFailureShown(J) && !me(ke) && u(m.documentFailed(ve(Z), we(m, ke)));
4219
4220
  return;
4220
4221
  }
4221
4222
  p?.(Z, ue), !(!w || ie !== null && ie.path === Z && ie.snapshot.document.kind !== "failure") && (he.current = Ce.current > 0, he.current || g.announce(m.documentShown(ue.name)));
@@ -4223,13 +4224,13 @@ const sd = /* @__PURE__ */ new Map([
4223
4224
  ne(() => {
4224
4225
  B(e, t);
4225
4226
  }, [e, t]);
4226
- const ee = pe(() => {
4227
+ const te = pe(() => {
4227
4228
  f.kind === "panel" && f.consume();
4228
4229
  }), le = pe((Z) => {
4229
4230
  const J = k.current;
4230
4231
  if (J === null || !U.current) return null;
4231
4232
  const { activeElement: ie, body: ue } = J.ownerDocument;
4232
- return ie !== null && ie !== ue ? null : pr(J, b, Z);
4233
+ return ie !== null && ie !== ue ? null : wr(J, b, Z);
4233
4234
  }), De = pe((Z) => {
4234
4235
  const J = he.current;
4235
4236
  he.current = !1, !r && (Z && le(null), w && (Z || J) && b.kind !== "failure" && g.announce(m.documentShown(b.name)));
@@ -4237,16 +4238,16 @@ const sd = /* @__PURE__ */ new Map([
4237
4238
  ne(() => {
4238
4239
  Re.count > 0 && De(Re.recovered);
4239
4240
  }, [Re]);
4240
- const Ko = pe(() => {
4241
+ const Xo = pe(() => {
4241
4242
  Ce.current > 0 || !he.current || (he.current = !1, w && !r && b.kind !== "failure" && g.announce(m.documentShown(b.name)));
4242
4243
  });
4243
4244
  ne(() => {
4244
- je > 0 && Ko();
4245
+ je > 0 && Xo();
4245
4246
  }, [je]);
4246
- const Xo = pe((Z) => {
4247
+ const Yo = pe((Z) => {
4247
4248
  const J = k.current;
4248
- J !== null && wr(J, Z, U.current);
4249
- }), Yo = pe((Z) => h.reveal(Z)), Jo = pe((Z) => Kn(k.current, Z, h));
4249
+ J !== null && gr(J, Z, U.current);
4250
+ }), Jo = pe((Z) => h.reveal(Z)), Qo = pe((Z) => Xn(k.current, Z, h));
4250
4251
  return ne(() => {
4251
4252
  if (r) return;
4252
4253
  const Z = N.current.path !== e, J = Z || N.current.document !== b;
@@ -4254,15 +4255,15 @@ const sd = /* @__PURE__ */ new Map([
4254
4255
  const ie = H.current !== e;
4255
4256
  H.current = e;
4256
4257
  let ue = null;
4257
- f.kind === "page" ? D.current !== f.navigation && (D.current = f.navigation, ue = f.fragment) : f.fragment !== null && (ue = f.fragment, ee());
4258
+ f.kind === "page" ? D.current !== f.navigation && (D.current = f.navigation, ue = f.fragment) : f.fragment !== null && (ue = f.fragment, te());
4258
4259
  const ke = () => {
4259
- const Ne = ue === null ? null : Jo(ue);
4260
+ const Ne = ue === null ? null : Qo(ue);
4260
4261
  if (!J) {
4261
- Ne !== null && Xo(Ne);
4262
+ Ne !== null && Yo(Ne);
4262
4263
  return;
4263
4264
  }
4264
4265
  const ht = le(f.fragment);
4265
- Z && Ne === null && ht !== null && Yo(ht);
4266
+ Z && Ne === null && ht !== null && Jo(ht);
4266
4267
  };
4267
4268
  ie ? queueMicrotask(ke) : ke();
4268
4269
  }, [f, e, b, r]), K(() => {
@@ -4270,44 +4271,45 @@ const sd = /* @__PURE__ */ new Map([
4270
4271
  }, [f]), ne(() => {
4271
4272
  R === null || R === P.current || r || (P.current = R, !(f.kind === "page" && f.navigation !== R.from) && W(R.fragment));
4272
4273
  }, [R, f, r, W]), /* @__PURE__ */ j(Ae, { value: re, children: [
4273
- /* @__PURE__ */ u(Ll, { path: e, name: b.kind === "failure" ? ve(e) : b.name, editing: O !== void 0, announces: w, markup: n, region: k, focusDocument: L }),
4274
- /* @__PURE__ */ u(Fe, { kind: b.kind, view: y, label: i(e, b), stale: mt, busy: mt, frameRef: k, intent: x, children: /* @__PURE__ */ u(go, { value: l, children: /* @__PURE__ */ u(yc, { children: /* @__PURE__ */ u(uo, { value: ft, children: /* @__PURE__ */ u(ku, { path: e, document: b, view: F, viewer: o, onRetry: E, editing: A }, e) }) }) }) })
4274
+ /* @__PURE__ */ d(Al, { path: e, name: b.kind === "failure" ? ve(e) : b.name, editing: O !== void 0, announces: w, markup: n, region: k, focusDocument: L }),
4275
+ /* @__PURE__ */ d(Fe, { kind: b.kind, view: y, label: i(e, b), stale: mt, busy: mt, frameRef: k, intent: x, children: /* @__PURE__ */ d(vo, { value: l, children: /* @__PURE__ */ d(bc, { children: /* @__PURE__ */ d(fo, { value: ft, children: /* @__PURE__ */ d(Eu, { path: e, document: b, view: F, viewer: o, onRetry: E, editing: A }, e) }) }) }) })
4275
4276
  ] });
4276
- }, Tn = Object.freeze({ kind: "skeleton" }), Cu = (e, t, n, r, o) => {
4277
+ }, Tn = Object.freeze({ kind: "skeleton" }), Ru = (e, t, n, r, o) => {
4277
4278
  if (t?.status === "loaded") return { kind: "document", path: e, snapshot: t, stale: !1 };
4278
4279
  const a = Te(t);
4279
4280
  if (a !== null) return { kind: "document", path: e, snapshot: a, stale: !0 };
4280
4281
  if (o && t?.status === "pending") return { kind: "streaming", path: e, promise: t.promise };
4281
4282
  const i = n === null || n === e ? null : Te(r);
4282
4283
  return n === null || i === null ? Tn : { kind: "document", path: n, snapshot: i, stale: !0 };
4283
- }, Ru = (e, t) => t.status === "deferred" ? Tn : { kind: "document", path: e, snapshot: t, stale: !1 }, Mu = ({ requestedPath: e, content: t, markup: n, ...r }) => {
4284
- const o = t.kind === "streaming" ? Ru(t.path, se(t.promise)) : t;
4285
- return o.kind !== "document" ? /* @__PURE__ */ u(xn, { label: r.regionLabel(e, null) }) : /* @__PURE__ */ u(Tu, { path: o.path, snapshot: o.snapshot, markup: n, stale: o.stale, ...r });
4286
- }, Vo = ({ path: e, absence: t, markup: n, display: r, navigation: o, fragment: a, paneScroll: i, announces: s, announceFailure: f, onDocumentShown: h }) => {
4287
- const { config: w, labels: d, locale: p, theme: m, documents: g, data: v, fetch: b } = $(), k = Wa(), M = z(!1);
4284
+ }, Mu = (e, t) => t.status === "deferred" ? Tn : { kind: "document", path: e, snapshot: t, stale: !1 }, Ou = ({ requestedPath: e, content: t, markup: n, ...r }) => {
4285
+ const o = t.kind === "streaming" ? Mu(t.path, se(t.promise)) : t;
4286
+ return o.kind !== "document" ? /* @__PURE__ */ d(xn, { label: r.regionLabel(e, null) }) : /* @__PURE__ */ d(Cu, { path: o.path, snapshot: o.snapshot, markup: n, stale: o.stale, ...r });
4287
+ }, Zo = ({ path: e, absence: t, markup: n, display: r, navigation: o, fragment: a, paneScroll: i, announces: s, announceFailure: f, onDocumentShown: h }) => {
4288
+ const { config: w, labels: u, locale: p, theme: m, documents: g, data: v, fetch: b } = $(), k = Ka(), M = z(!1);
4288
4289
  K(() => {
4289
4290
  M.current = !0;
4290
4291
  }, []);
4291
4292
  const [D, C] = V(null), [R, I] = V(n), P = _(() => e === null ? void 0 : g.peek(e), [g, e]), U = oe(g.subscribe, P, P), N = _(() => D === null ? void 0 : g.peek(D), [g, D]), H = oe(g.subscribe, N, N);
4292
4293
  K(() => e === null ? void 0 : g.open(e), [g, e]), K(() => D === null ? void 0 : g.retain(D), [g, D]);
4293
- const W = e === null ? Tn : Cu(e, U, D, H, !M.current), Y = e === null ? null : W.kind === "document" && !W.stale ? W.path : D;
4294
+ const W = e === null ? Tn : Ru(e, U, D, H, !M.current), Y = e === null ? null : W.kind === "document" && !W.stale ? W.path : D;
4294
4295
  Y !== D && C(Y);
4295
4296
  const c = W.kind !== "document" || W.path === e;
4296
4297
  c && n !== R && I(n);
4297
- const l = Q(() => id(d, p), [d, p]), E = Q(() => ({ read: (A, q) => gc(v, A, q) }), [v]), x = Q(() => [...w.iframeHosts], [w]), O = o.kind === "panel", F = io(), y = Q(
4298
+ const l = Q(() => sd(u, p), [u, p]), E = Q(() => ({ read: (A, q) => vc(v, A, q) }), [v]), x = Q(() => [...w.iframeHosts], [w]), O = o.kind === "panel", F = so(), y = Q(
4298
4299
  () => ({
4299
4300
  labels: l,
4300
4301
  labelsLang: p,
4301
4302
  spreadsheetLocale: p,
4302
- spreadsheetTapScrollCircle: oo(F),
4303
- spreadsheetScrollBarControls: Jr(F),
4304
- emptyMessage: d.documentEmpty,
4303
+ spreadsheetTapScrollCircle: ao(F),
4304
+ spreadsheetScrollBarControls: Qr(F),
4305
+ emptyMessage: u.documentEmpty,
4305
4306
  theme: m,
4306
4307
  availableStyles: w.documentStyles,
4307
4308
  iFrameAllowedDomains: x,
4308
4309
  embeds: w.embeds,
4310
+ mermaidModifier: w.mermaidModifier,
4309
4311
  fetch: b,
4310
- linkComponent: Rc,
4312
+ linkComponent: Mc,
4311
4313
  toolbar: k,
4312
4314
  style: r.style,
4313
4315
  onStyleChange: r.onStyleChange,
@@ -4325,15 +4327,15 @@ const sd = /* @__PURE__ */ new Map([
4325
4327
  padding: r.padding,
4326
4328
  width: r.width === void 0 ? void 0 : `min(${r.width}, 100%)`,
4327
4329
  maxWidth: r.maxWidth === void 0 ? void 0 : `min(${r.maxWidth}, 100%)`,
4328
- renderScrollBar: O ? void 0 : Yr,
4329
- scrollBarInlineSize: O ? void 0 : Qr,
4330
- scrollBarGutter: O ? void 0 : to,
4330
+ renderScrollBar: O ? void 0 : Jr,
4331
+ scrollBarInlineSize: O ? void 0 : eo,
4332
+ scrollBarGutter: O ? void 0 : no,
4331
4333
  imageSource: E
4332
4334
  }),
4333
- [l, p, F, d.documentEmpty, m, w.documentStyles, x, w.embeds, b, k, r, O, E]
4334
- ), S = _((A, q) => O ? q === null || q.kind === "failure" ? ve(A) : q.name : d.documentRegion, [O, d.documentRegion]), L = O ? "content" : "fill";
4335
- return e === null ? /* @__PURE__ */ u(Ae, { value: L, children: /* @__PURE__ */ u(wu, { absence: t, announces: s, announceFailure: f }) }) : /* @__PURE__ */ u(Ae, { value: L, children: /* @__PURE__ */ u(tt, { fallback: /* @__PURE__ */ u(xn, { label: S(e, null) }), children: /* @__PURE__ */ u(
4336
- Mu,
4335
+ [l, p, F, u.documentEmpty, m, w.documentStyles, x, w.embeds, w.mermaidModifier, b, k, r, O, E]
4336
+ ), S = _((A, q) => O ? q === null || q.kind === "failure" ? ve(A) : q.name : u.documentRegion, [O, u.documentRegion]), L = O ? "content" : "fill";
4337
+ return e === null ? /* @__PURE__ */ d(Ae, { value: L, children: /* @__PURE__ */ d(gu, { absence: t, announces: s, announceFailure: f }) }) : /* @__PURE__ */ d(Ae, { value: L, children: /* @__PURE__ */ d(tt, { fallback: /* @__PURE__ */ d(xn, { label: S(e, null) }), children: /* @__PURE__ */ d(
4338
+ Ou,
4337
4339
  {
4338
4340
  requestedPath: e,
4339
4341
  content: W,
@@ -4349,14 +4351,14 @@ const sd = /* @__PURE__ */ new Map([
4349
4351
  onDocumentShown: h
4350
4352
  }
4351
4353
  ) }) });
4352
- }, Zo = () => {
4354
+ }, Go = () => {
4353
4355
  const { viewSettings: e } = $(), t = Be((a) => a.measure), n = Be((a) => a.documentColors), r = _((a) => e.update({ measure: a }), [e]), o = _((a) => e.update({ documentColors: a }), [e]);
4354
4356
  return Q(() => ({ measure: t, onMeasureChange: r, documentColors: n, onDocumentColorsChange: o }), [t, r, n, o]);
4355
- }, Ou = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => {
4356
- const { config: a, viewSettings: i, announcer: s } = $(), f = Be((N) => N.style), h = Be((N) => N.align), w = ze(), d = pn(), p = At(), { overrides: m, embed: g } = r, v = _(
4357
+ }, Lu = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => {
4358
+ const { config: a, viewSettings: i, announcer: s } = $(), f = Be((N) => N.style), h = Be((N) => N.align), w = ze(), u = pn(), p = At(), { overrides: m, embed: g } = r, v = _(
4357
4359
  (N) => {
4358
4360
  if (p.kind !== "location") return;
4359
- const H = hu(a, p.location, N);
4361
+ const H = pu(a, p.location, N);
4360
4362
  H !== null && w(H, "browse");
4361
4363
  },
4362
4364
  [a, w, p]
@@ -4370,7 +4372,7 @@ const sd = /* @__PURE__ */ new Map([
4370
4372
  i.update({ align: N }), v("align");
4371
4373
  },
4372
4374
  [i, v]
4373
- ), M = Oo(a, m.style, f), D = Lo(m.align, h), C = Zo(), R = Q(
4375
+ ), M = Lo(a, m.style, f), D = Ao(m.align, h), C = Go(), R = Q(
4374
4376
  () => ({
4375
4377
  style: M,
4376
4378
  onStyleChange: b,
@@ -4388,14 +4390,14 @@ const sd = /* @__PURE__ */ new Map([
4388
4390
  editLayout: "fill"
4389
4391
  }),
4390
4392
  [M, b, D, k, C, g]
4391
- ), I = r, P = Q(() => ({ kind: "page", fragment: d.hash, navigation: d }), [d]), U = _((N) => s.announce(N), [s]);
4392
- return /* @__PURE__ */ u(Vo, { path: e, absence: t, markup: n, display: R, navigation: I, fragment: P, paneScroll: Yl, announces: !0, announceFailure: U, onDocumentShown: o });
4393
- }, Lu = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => {
4394
- const { config: a, viewSettings: i } = $(), s = Be((P) => P.style), f = Be((P) => P.align), [h, w] = V(() => Oo(a, void 0, s)), d = Lo(void 0, f), p = _((P) => i.update({ align: P }), [i]), m = Zo(), { maximized: g, onDocumentLink: v, pendingHash: b, onHashConsumed: k, announceFailure: M, paneScroll: D } = r, C = Q(
4393
+ ), I = r, P = Q(() => ({ kind: "page", fragment: u.hash, navigation: u }), [u]), U = _((N) => s.announce(N), [s]);
4394
+ return /* @__PURE__ */ d(Zo, { path: e, absence: t, markup: n, display: R, navigation: I, fragment: P, paneScroll: Jl, announces: !0, announceFailure: U, onDocumentShown: o });
4395
+ }, Au = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => {
4396
+ const { config: a, viewSettings: i } = $(), s = Be((P) => P.style), f = Be((P) => P.align), [h, w] = V(() => Lo(a, void 0, s)), u = Ao(void 0, f), p = _((P) => i.update({ align: P }), [i]), m = Go(), { maximized: g, onDocumentLink: v, pendingHash: b, onHashConsumed: k, announceFailure: M, paneScroll: D } = r, C = Q(
4395
4397
  () => ({
4396
4398
  style: h,
4397
4399
  onStyleChange: w,
4398
- align: d,
4400
+ align: u,
4399
4401
  onAlignChange: p,
4400
4402
  ...m,
4401
4403
  showToc: g,
@@ -4408,11 +4410,11 @@ const sd = /* @__PURE__ */ new Map([
4408
4410
  maxWidth: void 0,
4409
4411
  editLayout: g ? "fill" : "content"
4410
4412
  }),
4411
- [h, d, p, m, g]
4413
+ [h, u, p, m, g]
4412
4414
  ), R = Q(() => ({ kind: "panel", onDocumentLink: v }), [v]), I = Q(() => ({ kind: "panel", fragment: b, consume: k }), [b, k]);
4413
- return /* @__PURE__ */ u(Vo, { path: e, absence: t, markup: n, display: C, navigation: R, fragment: I, paneScroll: D, announces: !1, announceFailure: M, onDocumentShown: o });
4414
- }, Au = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => r.kind === "page" ? /* @__PURE__ */ u(Ou, { path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) : /* @__PURE__ */ u(Lu, { path: e, absence: t, markup: n, variant: r, onDocumentShown: o });
4415
- function Du({
4415
+ return /* @__PURE__ */ d(Zo, { path: e, absence: t, markup: n, display: C, navigation: R, fragment: I, paneScroll: D, announces: !1, announceFailure: M, onDocumentShown: o });
4416
+ }, Du = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => r.kind === "page" ? /* @__PURE__ */ d(Lu, { path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) : /* @__PURE__ */ d(Au, { path: e, absence: t, markup: n, variant: r, onDocumentShown: o });
4417
+ function Nu({
4416
4418
  title: e,
4417
4419
  titleId: t,
4418
4420
  ...n
@@ -4433,8 +4435,8 @@ function Du({
4433
4435
  clipRule: "evenodd"
4434
4436
  }));
4435
4437
  }
4436
- const Nu = /* @__PURE__ */ T.forwardRef(Du);
4437
- function Iu({
4438
+ const Iu = /* @__PURE__ */ T.forwardRef(Nu);
4439
+ function Pu({
4438
4440
  title: e,
4439
4441
  titleId: t,
4440
4442
  ...n
@@ -4455,8 +4457,8 @@ function Iu({
4455
4457
  clipRule: "evenodd"
4456
4458
  }));
4457
4459
  }
4458
- const Pu = /* @__PURE__ */ T.forwardRef(Iu);
4459
- function Fu({
4460
+ const Fu = /* @__PURE__ */ T.forwardRef(Pu);
4461
+ function $u({
4460
4462
  title: e,
4461
4463
  titleId: t,
4462
4464
  ...n
@@ -4477,8 +4479,8 @@ function Fu({
4477
4479
  clipRule: "evenodd"
4478
4480
  }));
4479
4481
  }
4480
- const $u = /* @__PURE__ */ T.forwardRef(Fu);
4481
- function _u({
4482
+ const _u = /* @__PURE__ */ T.forwardRef($u);
4483
+ function qu({
4482
4484
  title: e,
4483
4485
  titleId: t,
4484
4486
  ...n
@@ -4499,8 +4501,8 @@ function _u({
4499
4501
  clipRule: "evenodd"
4500
4502
  }));
4501
4503
  }
4502
- const Go = /* @__PURE__ */ T.forwardRef(_u);
4503
- function qu({
4504
+ const Wo = /* @__PURE__ */ T.forwardRef(qu);
4505
+ function Bu({
4504
4506
  title: e,
4505
4507
  titleId: t,
4506
4508
  ...n
@@ -4521,8 +4523,8 @@ function qu({
4521
4523
  clipRule: "evenodd"
4522
4524
  }));
4523
4525
  }
4524
- const Bu = /* @__PURE__ */ T.forwardRef(qu);
4525
- function Uu({
4526
+ const Uu = /* @__PURE__ */ T.forwardRef(Bu);
4527
+ function Hu({
4526
4528
  title: e,
4527
4529
  titleId: t,
4528
4530
  ...n
@@ -4547,8 +4549,8 @@ function Uu({
4547
4549
  clipRule: "evenodd"
4548
4550
  }));
4549
4551
  }
4550
- const Hu = /* @__PURE__ */ T.forwardRef(Uu);
4551
- function zu({
4552
+ const zu = /* @__PURE__ */ T.forwardRef(Hu);
4553
+ function ju({
4552
4554
  title: e,
4553
4555
  titleId: t,
4554
4556
  ...n
@@ -4569,8 +4571,8 @@ function zu({
4569
4571
  clipRule: "evenodd"
4570
4572
  }));
4571
4573
  }
4572
- const ju = /* @__PURE__ */ T.forwardRef(zu);
4573
- function Vu({
4574
+ const Vu = /* @__PURE__ */ T.forwardRef(ju);
4575
+ function Zu({
4574
4576
  title: e,
4575
4577
  titleId: t,
4576
4578
  ...n
@@ -4593,8 +4595,8 @@ function Vu({
4593
4595
  d: "M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"
4594
4596
  }));
4595
4597
  }
4596
- const Zu = /* @__PURE__ */ T.forwardRef(Vu);
4597
- function Gu({
4598
+ const Gu = /* @__PURE__ */ T.forwardRef(Zu);
4599
+ function Wu({
4598
4600
  title: e,
4599
4601
  titleId: t,
4600
4602
  ...n
@@ -4617,8 +4619,8 @@ function Gu({
4617
4619
  clipRule: "evenodd"
4618
4620
  }));
4619
4621
  }
4620
- const Wu = /* @__PURE__ */ T.forwardRef(Gu);
4621
- function Ku({
4622
+ const Ku = /* @__PURE__ */ T.forwardRef(Wu);
4623
+ function Xu({
4622
4624
  title: e,
4623
4625
  titleId: t,
4624
4626
  ...n
@@ -4639,8 +4641,8 @@ function Ku({
4639
4641
  d: "M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"
4640
4642
  }));
4641
4643
  }
4642
- const Xu = /* @__PURE__ */ T.forwardRef(Ku);
4643
- function Yu({
4644
+ const Yu = /* @__PURE__ */ T.forwardRef(Xu);
4645
+ function Ju({
4644
4646
  title: e,
4645
4647
  titleId: t,
4646
4648
  ...n
@@ -4659,44 +4661,44 @@ function Yu({
4659
4661
  d: "M15 3.75H9v16.5h6V3.75ZM16.5 20.25h3.375c1.035 0 1.875-.84 1.875-1.875V5.625c0-1.036-.84-1.875-1.875-1.875H16.5v16.5ZM4.125 3.75H7.5v16.5H4.125a1.875 1.875 0 0 1-1.875-1.875V5.625c0-1.036.84-1.875 1.875-1.875Z"
4660
4662
  }));
4661
4663
  }
4662
- const Ju = /* @__PURE__ */ T.forwardRef(Yu), Qu = ({ href: e, onRetry: t, testId: n }) => {
4664
+ const Qu = /* @__PURE__ */ T.forwardRef(Ju), ef = ({ href: e, onRetry: t, testId: n }) => {
4663
4665
  const { labels: r, onEditGrant: o } = $(), [a, i] = V(!1), s = () => {
4664
4666
  o === void 0 || a || (i(!0), o(e).then((f) => {
4665
4667
  f && t();
4666
4668
  }).finally(() => i(!1)));
4667
4669
  };
4668
4670
  return /* @__PURE__ */ j("div", { className: "aqmx-callout aqmx-edit-grant", "data-testid": n, children: [
4669
- /* @__PURE__ */ u("p", { className: "aqmx-callout-title", children: r.editGrantTitle }),
4670
- /* @__PURE__ */ u("p", { className: "aqmx-callout-body", children: r.editGrantBody }),
4671
+ /* @__PURE__ */ d("p", { className: "aqmx-callout-title", children: r.editGrantTitle }),
4672
+ /* @__PURE__ */ d("p", { className: "aqmx-callout-body", children: r.editGrantBody }),
4671
4673
  /* @__PURE__ */ j("div", { className: "aqmx-edit-grant-actions", children: [
4672
- o === void 0 ? /* @__PURE__ */ u("a", { className: "aqmx-callout-action", href: e, target: "_blank", rel: "noopener", "data-testid": `${n}-open`, children: r.editGrantAction }) : (
4673
- /* @__PURE__ */ u("button", { type: "button", className: "aqmx-callout-action", "aria-disabled": a, "data-testid": `${n}-open`, onClick: s, children: r.editGrantAction })
4674
+ o === void 0 ? /* @__PURE__ */ d("a", { className: "aqmx-callout-action", href: e, target: "_blank", rel: "noopener", "data-testid": `${n}-open`, children: r.editGrantAction }) : (
4675
+ /* @__PURE__ */ d("button", { type: "button", className: "aqmx-callout-action", "aria-disabled": a, "data-testid": `${n}-open`, onClick: s, children: r.editGrantAction })
4674
4676
  ),
4675
- /* @__PURE__ */ u("button", { type: "button", className: "aqmx-callout-action", "data-testid": `${n}-retry`, onClick: t, children: r.editGrantRetry })
4677
+ /* @__PURE__ */ d("button", { type: "button", className: "aqmx-callout-action", "data-testid": `${n}-retry`, onClick: t, children: r.editGrantRetry })
4676
4678
  ] })
4677
4679
  ] });
4678
- }, ef = "Control+E Meta+E", tf = (e, t, n) => n && t ? "split" : e.view, gr = (e, t, n, r) => {
4680
+ }, tf = "Control+E Meta+E", nf = (e, t, n) => n && t ? "split" : e.view, vr = (e, t, n, r) => {
4679
4681
  if (n === "split") {
4680
4682
  e.setSideBySide(!0);
4681
4683
  return;
4682
4684
  }
4683
4685
  e.setView(t, n), r && e.sideBySide() && e.setSideBySide(!1);
4684
- }, zm = (e) => e === "split" ? null : e, nf = (e) => e === "preview" ? "editor" : "preview", rf = (e) => /Mac|iPhone|iPad|iPod/u.test(e), of = (e, t) => {
4686
+ }, jm = (e) => e === "split" ? null : e, rf = (e) => e === "preview" ? "editor" : "preview", of = (e) => /Mac|iPhone|iPad|iPod/u.test(e), af = (e, t) => {
4685
4687
  if (e.isComposing || e.altKey || e.shiftKey || (t ? !e.metaKey || e.ctrlKey : !e.ctrlKey || e.metaKey)) return !1;
4686
4688
  const n = e.key.toLowerCase();
4687
4689
  return n === "e" || e.code === "KeyE" && /^\p{L}$/u.test(n) && !/^[a-z]$/u.test(n);
4688
- }, vr = (e, t, n) => {
4690
+ }, yr = (e, t, n) => {
4689
4691
  const r = e.modifiedAt === null ? Number.NaN : Date.parse(e.modifiedAt);
4690
4692
  return n(Number.isNaN(r) ? e.id : t.format(r), e.author === null ? "" : e.author);
4691
- }, af = ({ path: e, documentName: t, open: n, onClose: r }) => {
4692
- const { data: o, edits: a, labels: i, locale: s, announcer: f } = $(), h = Le(), [w, d] = V(null), [p, m] = V(0), [g, v] = V(null), [b, k] = V(null), [M, D] = V(0), C = Q(() => new Intl.DateTimeFormat(s, { dateStyle: "medium", timeStyle: "short" }), [s]), R = _(() => {
4693
+ }, sf = ({ path: e, documentName: t, open: n, onClose: r }) => {
4694
+ const { data: o, edits: a, labels: i, locale: s, announcer: f } = $(), h = Le(), [w, u] = V(null), [p, m] = V(0), [g, v] = V(null), [b, k] = V(null), [M, D] = V(0), C = Q(() => new Intl.DateTimeFormat(s, { dateStyle: "medium", timeStyle: "short" }), [s]), R = _(() => {
4693
4695
  v(null), k(null);
4694
- }, []), I = jr({ open: n, onOpen: R, onDismiss: r });
4696
+ }, []), I = Vr({ open: n, onOpen: R, onDismiss: r });
4695
4697
  ne(() => {
4696
4698
  if (!n) return;
4697
4699
  const N = new AbortController();
4698
- return d(null), o.revisions(e, N.signal).then((H) => {
4699
- "kind" in H && d(H);
4700
+ return u(null), o.revisions(e, N.signal).then((H) => {
4701
+ "kind" in H && u(H);
4700
4702
  }), () => N.abort();
4701
4703
  }, [n, o, e, p]), ne(() => {
4702
4704
  if (!n || g === null) return;
@@ -4708,29 +4710,29 @@ const Ju = /* @__PURE__ */ T.forwardRef(Yu), Qu = ({ href: e, onRetry: t, testId
4708
4710
  const P = () => {
4709
4711
  b === null || b.kind !== "revision" || (a.replaceDraft(e, b.text), f.announce(i.historyRestored(t)), r());
4710
4712
  }, U = w !== null && w.kind === "revisions" ? w.revisions.find((N) => N.id === g) : void 0;
4711
- return /* @__PURE__ */ u("dialog", { ...I, className: "aqmx-confirm aqmx-history", "aria-labelledby": h, "data-testid": "markdown-explorer-history", children: /* @__PURE__ */ j("div", { className: "aqmx-confirm-panel aqmx-history-panel", children: [
4712
- /* @__PURE__ */ u("p", { id: h, className: "aqmx-confirm-title", children: i.historyTitle(t) }),
4713
- w === null ? /* @__PURE__ */ u("p", { className: "aqmx-history-note", "data-testid": "markdown-explorer-history-loading", children: i.historyLoading }) : w.kind === "failure" ? /* @__PURE__ */ u(Ue, { failure: w.failure, alert: !1, onRetry: () => m((N) => N + 1), testId: "markdown-explorer-history-failure" }) : w.revisions.length === 0 ? /* @__PURE__ */ u("p", { className: "aqmx-history-note", "data-testid": "markdown-explorer-history-empty", children: i.historyEmpty }) : /* @__PURE__ */ u("ul", { className: "aqmx-history-list", "data-testid": "markdown-explorer-history-list", children: w.revisions.map((N) => /* @__PURE__ */ u("li", { children: /* @__PURE__ */ j("button", { type: "button", className: "aqmx-history-entry", "aria-pressed": N.id === g, "data-testid": "markdown-explorer-history-entry", onClick: () => v(N.id), children: [
4714
- /* @__PURE__ */ u("span", { children: vr(N, C, i.historyEntry) }),
4715
- N.current ? /* @__PURE__ */ u("span", { className: "aqmx-history-mark", children: i.historyCurrent }) : null,
4716
- N.kept ? /* @__PURE__ */ u("span", { className: "aqmx-history-mark", children: i.historyKept }) : null
4713
+ return /* @__PURE__ */ d("dialog", { ...I, className: "aqmx-confirm aqmx-history", "aria-labelledby": h, "data-testid": "markdown-explorer-history", children: /* @__PURE__ */ j("div", { className: "aqmx-confirm-panel aqmx-history-panel", children: [
4714
+ /* @__PURE__ */ d("p", { id: h, className: "aqmx-confirm-title", children: i.historyTitle(t) }),
4715
+ w === null ? /* @__PURE__ */ d("p", { className: "aqmx-history-note", "data-testid": "markdown-explorer-history-loading", children: i.historyLoading }) : w.kind === "failure" ? /* @__PURE__ */ d(Ue, { failure: w.failure, alert: !1, onRetry: () => m((N) => N + 1), testId: "markdown-explorer-history-failure" }) : w.revisions.length === 0 ? /* @__PURE__ */ d("p", { className: "aqmx-history-note", "data-testid": "markdown-explorer-history-empty", children: i.historyEmpty }) : /* @__PURE__ */ d("ul", { className: "aqmx-history-list", "data-testid": "markdown-explorer-history-list", children: w.revisions.map((N) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ j("button", { type: "button", className: "aqmx-history-entry", "aria-pressed": N.id === g, "data-testid": "markdown-explorer-history-entry", onClick: () => v(N.id), children: [
4716
+ /* @__PURE__ */ d("span", { children: yr(N, C, i.historyEntry) }),
4717
+ N.current ? /* @__PURE__ */ d("span", { className: "aqmx-history-mark", children: i.historyCurrent }) : null,
4718
+ N.kept ? /* @__PURE__ */ d("span", { className: "aqmx-history-mark", children: i.historyKept }) : null
4717
4719
  ] }) }, N.id)) }),
4718
- g === null ? null : b === null ? /* @__PURE__ */ u("p", { className: "aqmx-history-note", children: i.historyLoading }) : b.kind === "failure" ? /* @__PURE__ */ u(Ue, { failure: b.failure, alert: !1, onRetry: () => D((N) => N + 1), testId: "markdown-explorer-history-revision-failure" }) : (
4719
- /* @__PURE__ */ u("section", { className: "aqmx-history-text", tabIndex: 0, "aria-label": U === void 0 ? i.historyTitle(t) : vr(U, C, i.historyEntry), "data-testid": "markdown-explorer-history-text", children: /* @__PURE__ */ u("pre", { children: b.text }) })
4720
+ g === null ? null : b === null ? /* @__PURE__ */ d("p", { className: "aqmx-history-note", children: i.historyLoading }) : b.kind === "failure" ? /* @__PURE__ */ d(Ue, { failure: b.failure, alert: !1, onRetry: () => D((N) => N + 1), testId: "markdown-explorer-history-revision-failure" }) : (
4721
+ /* @__PURE__ */ d("section", { className: "aqmx-history-text", tabIndex: 0, "aria-label": U === void 0 ? i.historyTitle(t) : yr(U, C, i.historyEntry), "data-testid": "markdown-explorer-history-text", children: /* @__PURE__ */ d("pre", { children: b.text }) })
4720
4722
  ),
4721
4723
  /* @__PURE__ */ j("div", { className: "aqmx-confirm-actions", children: [
4722
- /* @__PURE__ */ u("button", { type: "button", className: "aqmx-callout-action", "data-testid": "markdown-explorer-history-close", onClick: r, children: i.historyClose }),
4723
- /* @__PURE__ */ u("button", { type: "button", className: "aqmx-callout-action", "aria-disabled": b === null || b.kind !== "revision", "data-testid": "markdown-explorer-history-restore", onClick: P, children: i.historyRestore })
4724
+ /* @__PURE__ */ d("button", { type: "button", className: "aqmx-callout-action", "data-testid": "markdown-explorer-history-close", onClick: r, children: i.historyClose }),
4725
+ /* @__PURE__ */ d("button", { type: "button", className: "aqmx-callout-action", "aria-disabled": b === null || b.kind !== "revision", "data-testid": "markdown-explorer-history-restore", onClick: P, children: i.historyRestore })
4724
4726
  ] })
4725
4727
  ] }) });
4726
- }, sf = (e, t) => {
4728
+ }, lf = (e, t) => {
4727
4729
  if (!t || e === void 0 || e.history || !e.dirty || e.phase.kind !== "editing") return !1;
4728
4730
  const { kind: n } = e.save;
4729
4731
  return n !== "draft" && n !== "saving" && n !== "conflicts";
4730
- }, lf = (e) => {
4732
+ }, cf = (e) => {
4731
4733
  const { edits: t, labels: n, confirmUnversionedSaves: r } = $(), [o, a] = V(!1), i = _(() => {
4732
- t.flush(e), sf(t.session(e), r) ? a(!0) : t.save(e);
4733
- }, [t, e, r]), s = /* @__PURE__ */ u(
4734
+ t.flush(e), lf(t.session(e), r) ? a(!0) : t.save(e);
4735
+ }, [t, e, r]), s = /* @__PURE__ */ d(
4734
4736
  gn,
4735
4737
  {
4736
4738
  open: o,
@@ -4746,17 +4748,17 @@ const Ju = /* @__PURE__ */ T.forwardRef(Yu), Qu = ({ href: e, onRetry: t, testId
4746
4748
  }
4747
4749
  );
4748
4750
  return { requestSave: i, confirmation: s };
4749
- }, cf = (e) => {
4751
+ }, df = (e) => {
4750
4752
  const { documents: t } = $(), n = _(() => t.peek(e), [t, e]), r = _(() => t.peekSeeded(e), [t, e]), o = oe(t.subscribe, n, r), a = Te(o)?.document;
4751
4753
  return a === void 0 || a.kind === "failure" ? { edit: null, name: ve(e) } : { edit: a.kind === "markdown" || a.kind === "spreadsheet" ? a.edit : null, name: a.name };
4752
4754
  }, ye = (e) => {
4753
4755
  e.stopPropagation();
4754
- }, df = ({ path: e, documentName: t, iconOnly: n, previewAvailable: r, draft: o }) => {
4756
+ }, uf = ({ path: e, documentName: t, iconOnly: n, previewAvailable: r, draft: o }) => {
4755
4757
  const { draftConverter: a, edits: i, labels: s } = $(), f = oe(
4756
4758
  i.subscribe,
4757
4759
  () => i.session(e) !== void 0,
4758
4760
  () => !1
4759
- ), [h, w] = V(null), d = () => {
4761
+ ), [h, w] = V(null), u = () => {
4760
4762
  if (!f) {
4761
4763
  i.start(e, i.viewAnchor(e));
4762
4764
  return;
@@ -4765,7 +4767,7 @@ const Ju = /* @__PURE__ */ T.forwardRef(Yu), Qu = ({ href: e, onRetry: t, testId
4765
4767
  const v = i.session(e);
4766
4768
  v?.dirty === !0 ? w(v.save.kind === "draft" ? "draft" : "unsaved") : i.close(e);
4767
4769
  }, p = () => {
4768
- f || (Cs(), r && i.sideBySide() && a?.prepare?.());
4770
+ f || (Rs(), r && i.sideBySide() && a?.prepare?.());
4769
4771
  }, m = n ? o ? s.editDraftDocumentNamed(t) : s.editDocumentNamed(t) : null, g = o ? s.editDraftDocument : s.editDocument;
4770
4772
  return /* @__PURE__ */ j(Oe, { children: [
4771
4773
  /* @__PURE__ */ j(
@@ -4777,17 +4779,17 @@ const Ju = /* @__PURE__ */ T.forwardRef(Yu), Qu = ({ href: e, onRetry: t, testId
4777
4779
  "aria-label": m === null ? void 0 : m,
4778
4780
  "aria-pressed": f,
4779
4781
  "data-testid": "markdown-explorer-document-edit",
4780
- onClick: d,
4782
+ onClick: u,
4781
4783
  onDoubleClick: ye,
4782
4784
  onPointerEnter: p,
4783
4785
  onFocus: p,
4784
4786
  children: [
4785
- /* @__PURE__ */ u(Xu, { "aria-hidden": "true" }),
4786
- m === null ? /* @__PURE__ */ u("span", { children: s.editDocumentLabel }) : null
4787
+ /* @__PURE__ */ d(Yu, { "aria-hidden": "true" }),
4788
+ m === null ? /* @__PURE__ */ d("span", { children: s.editDocumentLabel }) : null
4787
4789
  ]
4788
4790
  }
4789
4791
  ),
4790
- /* @__PURE__ */ u(
4792
+ /* @__PURE__ */ d(
4791
4793
  gn,
4792
4794
  {
4793
4795
  open: h !== null,
@@ -4803,7 +4805,7 @@ const Ju = /* @__PURE__ */ T.forwardRef(Yu), Qu = ({ href: e, onRetry: t, testId
4803
4805
  }
4804
4806
  )
4805
4807
  ] });
4806
- }, uf = ({ href: e, documentName: t, iconOnly: n }) => {
4808
+ }, ff = ({ href: e, documentName: t, iconOnly: n }) => {
4807
4809
  const { labels: r } = $(), o = n ? r.editExternallyNamed(t) : null;
4808
4810
  return /* @__PURE__ */ j(
4809
4811
  "a",
@@ -4817,86 +4819,86 @@ const Ju = /* @__PURE__ */ T.forwardRef(Yu), Qu = ({ href: e, onRetry: t, testId
4817
4819
  "data-testid": "markdown-explorer-document-edit-external",
4818
4820
  onDoubleClick: ye,
4819
4821
  children: [
4820
- /* @__PURE__ */ u(Bu, { "aria-hidden": "true" }),
4821
- o === null ? /* @__PURE__ */ u("span", { children: r.editExternallyLabel }) : null
4822
+ /* @__PURE__ */ d(Uu, { "aria-hidden": "true" }),
4823
+ o === null ? /* @__PURE__ */ d("span", { children: r.editExternallyLabel }) : null
4822
4824
  ]
4823
4825
  }
4824
4826
  );
4825
- }, ff = ({ session: e }) => {
4826
- const { labels: t } = $(), n = Gi(t, e);
4827
- return /* @__PURE__ */ u("p", { className: "aqmx-edit-status", title: n === "" ? void 0 : n, "data-testid": "markdown-explorer-edit-status", "data-aqmx-save": e.save.kind, children: n });
4828
- }, mf = Object.freeze(["editor", "split", "preview"]), hf = Object.freeze(["editor", "preview"]), pf = Object.freeze({ editor: Go, split: Ju, preview: Wu }), wf = ({ path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }) => {
4829
- const { draftConverter: a, edits: i, labels: s } = $(), f = ys(), h = tf(r, f, o), w = o ? mf : hf, d = Le(), p = z(/* @__PURE__ */ new Map()), m = {
4827
+ }, mf = ({ session: e }) => {
4828
+ const { labels: t } = $(), n = Wi(t, e);
4829
+ return /* @__PURE__ */ d("p", { className: "aqmx-edit-status", title: n === "" ? void 0 : n, "data-testid": "markdown-explorer-edit-status", "data-aqmx-save": e.save.kind, children: n });
4830
+ }, hf = Object.freeze(["editor", "split", "preview"]), pf = Object.freeze(["editor", "preview"]), wf = Object.freeze({ editor: Wo, split: Qu, preview: Ku }), gf = ({ path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }) => {
4831
+ const { draftConverter: a, edits: i, labels: s } = $(), f = bs(), h = nf(r, f, o), w = o ? hf : pf, u = Le(), p = z(/* @__PURE__ */ new Map()), m = {
4830
4832
  editor: { label: s.editViewEditor, tooltip: s.editViewEditorTooltip },
4831
4833
  split: { label: s.editViewSplit, tooltip: s.editViewSplitTooltip },
4832
4834
  preview: { label: s.editViewPreview, tooltip: s.editViewPreviewTooltip }
4833
4835
  }, g = () => {
4834
4836
  i.preparePreview(e), a?.prepare?.();
4835
4837
  }, v = (b) => {
4836
- if (!of(b.nativeEvent, rf(navigator.platform))) return;
4837
- Hr(b);
4838
- const k = nf(h);
4839
- gr(i, e, k, o), p.current.get(k)?.focus();
4838
+ if (!af(b.nativeEvent, of(navigator.platform))) return;
4839
+ zr(b);
4840
+ const k = rf(h);
4841
+ vr(i, e, k, o), p.current.get(k)?.focus();
4840
4842
  };
4841
- return /* @__PURE__ */ u("div", { role: "radiogroup", "aria-label": n ? s.editViewNamed(t) : s.editView, className: "aqmx-edit-view", "data-testid": "markdown-explorer-edit-view", onKeyDown: v, children: w.map((b) => {
4842
- const k = pf[b], { label: M, tooltip: D } = m[b], C = b === "preview" ? g : void 0;
4843
+ return /* @__PURE__ */ d("div", { role: "radiogroup", "aria-label": n ? s.editViewNamed(t) : s.editView, className: "aqmx-edit-view", "data-testid": "markdown-explorer-edit-view", onKeyDown: v, children: w.map((b) => {
4844
+ const k = wf[b], { label: M, tooltip: D } = m[b], C = b === "preview" ? g : void 0;
4843
4845
  return /* @__PURE__ */ j("label", { className: n ? "aqmx-icon-button" : "aqmx-icon-button aqmx-labelled-button", children: [
4844
- /* @__PURE__ */ u(
4846
+ /* @__PURE__ */ d(
4845
4847
  "input",
4846
4848
  {
4847
4849
  ref: (R) => {
4848
4850
  R === null ? p.current.delete(b) : p.current.set(b, R);
4849
4851
  },
4850
4852
  type: "radio",
4851
- name: d,
4853
+ name: u,
4852
4854
  value: b,
4853
4855
  checked: b === h,
4854
4856
  "aria-label": M,
4855
- "aria-keyshortcuts": b === "split" ? void 0 : ef,
4857
+ "aria-keyshortcuts": b === "split" ? void 0 : tf,
4856
4858
  title: D,
4857
4859
  "data-testid": `markdown-explorer-edit-view-${b}`,
4858
- onChange: () => gr(i, e, b, o),
4860
+ onChange: () => vr(i, e, b, o),
4859
4861
  onDoubleClick: ye,
4860
4862
  onPointerEnter: C,
4861
4863
  onFocus: C
4862
4864
  }
4863
4865
  ),
4864
- /* @__PURE__ */ u(k, { "aria-hidden": "true" }),
4865
- n ? null : /* @__PURE__ */ u("span", { children: M })
4866
+ /* @__PURE__ */ d(k, { "aria-hidden": "true" }),
4867
+ n ? null : /* @__PURE__ */ d("span", { children: M })
4866
4868
  ] }, b);
4867
4869
  }) });
4868
- }, gf = ({ path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }) => {
4869
- const { edits: a, labels: i } = $(), [s, f] = V(!1), { requestSave: h, confirmation: w } = lf(e);
4870
+ }, vf = ({ path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }) => {
4871
+ const { edits: a, labels: i } = $(), [s, f] = V(!1), { requestSave: h, confirmation: w } = cf(e);
4870
4872
  if (r.phase.kind !== "editing") return null;
4871
- const d = r.save.kind === "saving", p = d || !r.dirty, m = () => {
4873
+ const u = r.save.kind === "saving", p = u || !r.dirty, m = () => {
4872
4874
  a.flush(e);
4873
4875
  const v = a.session(e);
4874
4876
  v === void 0 || !v.dirty || v.save.kind === "saving" || h();
4875
4877
  }, g = (v) => n ? { className: "aqmx-icon-button", "aria-label": v } : { className: "aqmx-icon-button aqmx-labelled-button" };
4876
4878
  return /* @__PURE__ */ j(Oe, { children: [
4877
4879
  r.save.kind === "conflicts" ? /* @__PURE__ */ j("button", { type: "button", ...g(i.conflictNext), title: i.conflictNext, "data-testid": "markdown-explorer-edit-next-conflict", onClick: () => a.nextConflict(e), onDoubleClick: ye, children: [
4878
- /* @__PURE__ */ u(Hu, { "aria-hidden": "true" }),
4879
- n ? null : /* @__PURE__ */ u("span", { children: i.conflictNext })
4880
+ /* @__PURE__ */ d(zu, { "aria-hidden": "true" }),
4881
+ n ? null : /* @__PURE__ */ d("span", { children: i.conflictNext })
4880
4882
  ] }) : null,
4881
- /* @__PURE__ */ u(wf, { path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }),
4883
+ /* @__PURE__ */ d(gf, { path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }),
4882
4884
  r.history ? /* @__PURE__ */ j("button", { type: "button", ...g(i.historyOpen), title: i.historyOpen, "aria-haspopup": "dialog", "data-testid": "markdown-explorer-edit-history", onClick: () => f(!0), onDoubleClick: ye, children: [
4883
- /* @__PURE__ */ u(ju, { "aria-hidden": "true" }),
4884
- n ? null : /* @__PURE__ */ u("span", { children: i.historyOpen })
4885
+ /* @__PURE__ */ d(Vu, { "aria-hidden": "true" }),
4886
+ n ? null : /* @__PURE__ */ d("span", { children: i.historyOpen })
4885
4887
  ] }) : null,
4886
- r.save.kind === "draft" ? null : /* @__PURE__ */ j("button", { type: "button", ...g(i.saveDraft), title: i.saveDraftTooltip, "aria-disabled": p, "aria-busy": d, "aria-keyshortcuts": "Control+S Meta+S", "data-testid": "markdown-explorer-edit-save", onClick: m, onDoubleClick: ye, children: [
4887
- /* @__PURE__ */ u(Zu, { "aria-hidden": "true" }),
4888
- n ? null : /* @__PURE__ */ u("span", { children: i.saveDraft })
4888
+ r.save.kind === "draft" ? null : /* @__PURE__ */ j("button", { type: "button", ...g(i.saveDraft), title: i.saveDraftTooltip, "aria-disabled": p, "aria-busy": u, "aria-keyshortcuts": "Control+S Meta+S", "data-testid": "markdown-explorer-edit-save", onClick: m, onDoubleClick: ye, children: [
4889
+ /* @__PURE__ */ d(Gu, { "aria-hidden": "true" }),
4890
+ n ? null : /* @__PURE__ */ d("span", { children: i.saveDraft })
4889
4891
  ] }),
4890
- r.history ? /* @__PURE__ */ u(af, { path: e, documentName: t, open: s, onClose: () => f(!1) }) : null,
4892
+ r.history ? /* @__PURE__ */ d(sf, { path: e, documentName: t, open: s, onClose: () => f(!1) }) : null,
4891
4893
  w
4892
4894
  ] });
4893
- }, vf = ({ path: e, session: t }) => {
4895
+ }, yf = ({ path: e, session: t }) => {
4894
4896
  const { edits: n } = $(), { save: r } = t, o = () => {
4895
4897
  n.save(e);
4896
4898
  };
4897
- return r.kind === "grant" ? /* @__PURE__ */ u(Qu, { href: r.href, onRetry: o, testId: "markdown-explorer-save-grant" }) : r.kind === "failed" && me(r.failure.reason) ? /* @__PURE__ */ u(Dt, { failure: r.failure, place: "write", deniedSentence: null, retry: o, testId: "markdown-explorer-save-access-failure" }) : null;
4898
- }, yf = ge(null);
4899
- function bf({
4899
+ return r.kind === "grant" ? /* @__PURE__ */ d(ef, { href: r.href, onRetry: o, testId: "markdown-explorer-save-grant" }) : r.kind === "failed" && me(r.failure.reason) ? /* @__PURE__ */ d(Dt, { failure: r.failure, place: "write", deniedSentence: null, retry: o, testId: "markdown-explorer-save-access-failure" }) : null;
4900
+ }, bf = ge(null);
4901
+ function kf({
4900
4902
  title: e,
4901
4903
  titleId: t,
4902
4904
  ...n
@@ -4921,8 +4923,8 @@ function bf({
4921
4923
  clipRule: "evenodd"
4922
4924
  }));
4923
4925
  }
4924
- const kf = /* @__PURE__ */ T.forwardRef(bf);
4925
- function Ef({
4926
+ const Ef = /* @__PURE__ */ T.forwardRef(kf);
4927
+ function Sf({
4926
4928
  title: e,
4927
4929
  titleId: t,
4928
4930
  ...n
@@ -4943,10 +4945,10 @@ function Ef({
4943
4945
  clipRule: "evenodd"
4944
4946
  }));
4945
4947
  }
4946
- const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
4948
+ const xf = /* @__PURE__ */ T.forwardRef(Sf), Tf = (e) => {
4947
4949
  const { documents: t } = $(), n = _(() => t.peek(e), [t, e]), r = _(() => t.peekSeeded(e), [t, e]), o = Te(oe(t.subscribe, n, r));
4948
4950
  return o !== null && o.document.kind !== "failure";
4949
- }, Tf = (e, t) => {
4951
+ }, Cf = (e, t) => {
4950
4952
  switch (e.view) {
4951
4953
  case "single":
4952
4954
  return { view: "document-id", id: t, opens: "single", overrides: e.overrides, embed: e.embed };
@@ -4955,10 +4957,10 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
4955
4957
  case "multi":
4956
4958
  return { view: "document-id", id: t };
4957
4959
  }
4958
- }, Cf = (e, t) => new Promise((n) => n(e.write([t()]))), Rf = ({ path: e, placement: t, onAccessFailure: n }) => {
4959
- const { config: r, data: o, labels: a } = $(), { location: i } = At(), { shown: s, press: f } = co(), h = xf(e), w = z(0), d = at(r.basePath), p = (b) => {
4960
- const k = xe(r, Tf(i, b));
4961
- return new URL(`${d}${k.slice(r.basePath.length)}`, window.location.origin).href;
4960
+ }, Rf = (e, t) => new Promise((n) => n(e.write([t()]))), Mf = ({ path: e, placement: t, onAccessFailure: n }) => {
4961
+ const { config: r, data: o, labels: a } = $(), { location: i } = At(), { shown: s, press: f } = uo(), h = Tf(e), w = z(0), u = at(r.basePath), p = (b) => {
4962
+ const k = xe(r, Cf(i, b));
4963
+ return new URL(`${u}${k.slice(r.basePath.length)}`, window.location.origin).href;
4962
4964
  }, m = () => {
4963
4965
  if (!h) return;
4964
4966
  const b = f();
@@ -4974,9 +4976,9 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
4974
4976
  }
4975
4977
  const C = o.issueId(e), R = C.then((I) => I.status === "ok" ? new Blob([p(I.id)], { type: "text/plain" }) : Promise.reject(new Error(`[markdown-explorer] the document ID was not issued: ${I.failure.reason}`)));
4976
4978
  R.catch(() => {
4977
- }), Cf(D, () => new ClipboardItem({ "text/plain": R })).then(
4979
+ }), Rf(D, () => new ClipboardItem({ "text/plain": R })).then(
4978
4980
  () => C.then((I) => {
4979
- I.status === "ok" && b("copied", a.permalinkCopied(Ra(I.id)));
4981
+ I.status === "ok" && b("copied", a.permalinkCopied(Ma(I.id)));
4980
4982
  }),
4981
4983
  (I) => C.then((P) => {
4982
4984
  if (P.status !== "error") {
@@ -5002,13 +5004,13 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5002
5004
  onClick: m,
5003
5005
  onDoubleClick: ye,
5004
5006
  children: [
5005
- s.outcome === "copied" ? /* @__PURE__ */ u(kf, { "aria-hidden": "true" }) : s.outcome === "failed" ? /* @__PURE__ */ u(lo, { "aria-hidden": "true" }) : /* @__PURE__ */ u(Sf, { "aria-hidden": "true" }),
5006
- g === null ? /* @__PURE__ */ u("span", { children: a.copyPermalinkLabel }) : null
5007
+ s.outcome === "copied" ? /* @__PURE__ */ d(Ef, { "aria-hidden": "true" }) : s.outcome === "failed" ? /* @__PURE__ */ d(co, { "aria-hidden": "true" }) : /* @__PURE__ */ d(xf, { "aria-hidden": "true" }),
5008
+ g === null ? /* @__PURE__ */ d("span", { children: a.copyPermalinkLabel }) : null
5007
5009
  ]
5008
5010
  }
5009
5011
  )
5010
5012
  );
5011
- }, Mf = (e, t) => {
5013
+ }, Of = (e, t) => {
5012
5014
  switch (t) {
5013
5015
  case "markdown":
5014
5016
  return e.showMarkup;
@@ -5018,40 +5020,40 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5018
5020
  case "tsv":
5019
5021
  return e.showSpreadsheetMarkup(t.toUpperCase());
5020
5022
  }
5021
- }, Of = ({ maximize: e }) => {
5023
+ }, Lf = ({ maximize: e }) => {
5022
5024
  const { labels: t } = $(), n = e.maximized ? t.documentRestore : t.documentMaximize;
5023
- return /* @__PURE__ */ u("button", { type: "button", className: "aqmx-icon-button", title: n, "aria-label": n, "data-testid": "markdown-explorer-document-maximize", onClick: e.toggle, onDoubleClick: ye, children: e.maximized ? /* @__PURE__ */ u(Pu, { "aria-hidden": "true" }) : /* @__PURE__ */ u($u, { "aria-hidden": "true" }) });
5024
- }, Lf = Object.freeze({ kind: "page" }), Af = ({ path: e, placement: t, markup: n, maximize: r }) => {
5025
- const { config: o, labels: a } = $(), { refreshing: i, unavailable: s, failure: f, refresh: h } = fo(e, t.kind === "page", n.shown), w = jc(e), d = cf(e), p = Zr(e), m = t.kind === "panel" ? a.refreshDocumentNamed(t.documentName) : null, g = t.kind === "panel" ? a.showMarkupNamed(t.documentName) : null, v = t.kind === "panel", b = t.kind === "panel" ? t.documentName : d.name, k = t.kind === "page" || t.maximized, M = se(yf), D = t.kind === "page" ? M : null, C = D === null ? null : D.onBar;
5025
+ return /* @__PURE__ */ d("button", { type: "button", className: "aqmx-icon-button", title: n, "aria-label": n, "data-testid": "markdown-explorer-document-maximize", onClick: e.toggle, onDoubleClick: ye, children: e.maximized ? /* @__PURE__ */ d(Fu, { "aria-hidden": "true" }) : /* @__PURE__ */ d(_u, { "aria-hidden": "true" }) });
5026
+ }, Af = Object.freeze({ kind: "page" }), Df = ({ path: e, placement: t, markup: n, maximize: r }) => {
5027
+ const { config: o, labels: a } = $(), { refreshing: i, unavailable: s, failure: f, refresh: h } = mo(e, t.kind === "page", n.shown), w = Vc(e), u = df(e), p = Gr(e), m = t.kind === "panel" ? a.refreshDocumentNamed(t.documentName) : null, g = t.kind === "panel" ? a.showMarkupNamed(t.documentName) : null, v = t.kind === "panel", b = t.kind === "panel" ? t.documentName : u.name, k = t.kind === "page" || t.maximized, M = se(bf), D = t.kind === "page" ? M : null, C = D === null ? null : D.onBar;
5026
5028
  K(() => {
5027
5029
  if (C !== null)
5028
5030
  return C(!0), () => C(!1);
5029
5031
  }, [C]);
5030
5032
  const R = D === null ? void 0 : D.lane ? "merged" : "covering", [I, P] = V(null);
5031
- I !== null && I.path !== e && P(null);
5032
- const U = I !== null && I.path === e ? I.failure : null, N = _((H) => P(H === null ? null : { path: e, failure: H }), [e]);
5033
+ I !== null && (I.path !== e || p !== void 0) && P(null);
5034
+ const U = I !== null && I.path === e && p === void 0 ? I.failure : null, N = _((H) => P(H === null ? null : { path: e, failure: H }), [e]);
5033
5035
  return /* @__PURE__ */ j("div", { className: "aqmx-document-refresh-bar", "data-testid": "markdown-explorer-document-refresh-bar", "data-aqmx-editing": p === void 0 ? void 0 : "true", "data-aqmx-sheet-bar": R, children: [
5034
5036
  /* @__PURE__ */ j("div", { className: "aqmx-document-refresh-row", children: [
5035
- p === void 0 ? null : /* @__PURE__ */ u(ff, { session: p }),
5036
- p === void 0 ? null : /* @__PURE__ */ u(gf, { path: e, documentName: b, iconOnly: v, session: p, previewAvailable: k }),
5037
+ p === void 0 ? null : /* @__PURE__ */ d(mf, { session: p }),
5038
+ p === void 0 ? null : /* @__PURE__ */ d(vf, { path: e, documentName: b, iconOnly: v, session: p, previewAvailable: k }),
5037
5039
  p === void 0 && w !== null ? /* @__PURE__ */ j(
5038
5040
  "button",
5039
5041
  {
5040
5042
  type: "button",
5041
5043
  className: g === null ? "aqmx-icon-button aqmx-labelled-button" : "aqmx-icon-button",
5042
- title: g === null ? Mf(a, w) : g,
5044
+ title: g === null ? Of(a, w) : g,
5043
5045
  "aria-label": g === null ? void 0 : g,
5044
5046
  "aria-pressed": n.shown,
5045
5047
  "data-testid": "markdown-explorer-document-markup",
5046
5048
  onClick: n.toggle,
5047
5049
  onDoubleClick: ye,
5048
5050
  children: [
5049
- /* @__PURE__ */ u(Go, { "aria-hidden": "true" }),
5050
- g === null ? /* @__PURE__ */ u("span", { children: a.showMarkupLabel }) : null
5051
+ /* @__PURE__ */ d(Wo, { "aria-hidden": "true" }),
5052
+ g === null ? /* @__PURE__ */ d("span", { children: a.showMarkupLabel }) : null
5051
5053
  ]
5052
5054
  }
5053
5055
  ) : null,
5054
- p !== void 0 || d.edit?.kind === "inline" || d.edit?.kind === "draft" ? /* @__PURE__ */ u(df, { path: e, documentName: b, iconOnly: v, previewAvailable: k, draft: d.edit?.kind === "draft" }) : d.edit?.kind === "external" ? /* @__PURE__ */ u(uf, { href: d.edit.href, documentName: b, iconOnly: v }) : null,
5056
+ p !== void 0 || u.edit?.kind === "inline" || u.edit?.kind === "draft" ? /* @__PURE__ */ d(uf, { path: e, documentName: b, iconOnly: v, previewAvailable: k, draft: u.edit?.kind === "draft" }) : u.edit?.kind === "external" ? /* @__PURE__ */ d(ff, { href: u.edit.href, documentName: b, iconOnly: v }) : null,
5055
5057
  p === void 0 ? /* @__PURE__ */ j(
5056
5058
  "button",
5057
5059
  {
@@ -5066,32 +5068,32 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5066
5068
  onClick: h,
5067
5069
  onDoubleClick: ye,
5068
5070
  children: [
5069
- /* @__PURE__ */ u(Nu, { "aria-hidden": "true" }),
5070
- m === null ? /* @__PURE__ */ u("span", { children: a.refreshDocumentLabel }) : null
5071
+ /* @__PURE__ */ d(Iu, { "aria-hidden": "true" }),
5072
+ m === null ? /* @__PURE__ */ d("span", { children: a.refreshDocumentLabel }) : null
5071
5073
  ]
5072
5074
  }
5073
5075
  ) : null,
5074
- p === void 0 && o.documentIds !== null ? /* @__PURE__ */ u(Rf, { path: e, placement: t, onAccessFailure: N }) : null,
5075
- r === null ? null : /* @__PURE__ */ u(Of, { maximize: r })
5076
+ p === void 0 && o.documentIds !== null ? /* @__PURE__ */ d(Mf, { path: e, placement: t, onAccessFailure: N }) : null,
5077
+ r === null ? null : /* @__PURE__ */ d(Lf, { maximize: r })
5076
5078
  ] }),
5077
- p !== void 0 || f === null ? null : /* @__PURE__ */ u(Df, { failure: f, onRetry: h }),
5078
- p !== void 0 || U === null ? null : /* @__PURE__ */ u(Dt, { failure: U, place: "write", deniedSentence: null, retry: null, testId: "markdown-explorer-permalink-access-failure" }),
5079
- p === void 0 ? null : /* @__PURE__ */ u(vf, { path: e, session: p })
5079
+ p !== void 0 || f === null ? null : /* @__PURE__ */ d(Nf, { failure: f, onRetry: h }),
5080
+ p !== void 0 || U === null ? null : /* @__PURE__ */ d(Dt, { failure: U, place: "write", deniedSentence: null, retry: null, testId: "markdown-explorer-permalink-access-failure" }),
5081
+ p === void 0 ? null : /* @__PURE__ */ d(yf, { path: e, session: p })
5080
5082
  ] });
5081
- }, Df = ({ failure: e, onRetry: t }) => {
5083
+ }, Nf = ({ failure: e, onRetry: t }) => {
5082
5084
  const { labels: n } = $(), { reason: r } = e;
5083
- return me(r) ? /* @__PURE__ */ u(Dt, { failure: e, place: "read", deniedSentence: null, retry: t, testId: "markdown-explorer-document-refresh-failure" }) : /* @__PURE__ */ u("p", { className: "aqmx-document-refresh-failure", "data-testid": "markdown-explorer-document-refresh-failure", "data-aqmx-failure": r, children: n.documentRefreshFailed(we(n, r)) });
5084
- }, Nf = ({ location: e }) => {
5085
- const t = e.doc, n = Q(() => ({ kind: "page", view: "single", overrides: e.overrides, embed: e.embed }), [e.overrides, e.embed]), r = Vc(e);
5085
+ return me(r) ? /* @__PURE__ */ d(Dt, { failure: e, place: "read", deniedSentence: null, retry: t, testId: "markdown-explorer-document-refresh-failure" }) : /* @__PURE__ */ d("p", { className: "aqmx-document-refresh-failure", "data-testid": "markdown-explorer-document-refresh-failure", "data-aqmx-failure": r, children: n.documentRefreshFailed(we(n, r)) });
5086
+ }, If = ({ location: e }) => {
5087
+ const t = e.doc, n = Q(() => ({ kind: "page", view: "single", overrides: e.overrides, embed: e.embed }), [e.overrides, e.embed]), r = Zc(e);
5086
5088
  return /* @__PURE__ */ j("div", { className: "aqmx-single aqmx-document-column", "data-testid": "markdown-explorer-single", ...sn, children: [
5087
- /* @__PURE__ */ u(Af, { path: t, placement: Lf, markup: r, maximize: null }),
5088
- /* @__PURE__ */ u(Au, { path: t, absence: mu, markup: e.markup, variant: n })
5089
+ /* @__PURE__ */ d(Df, { path: t, placement: Af, markup: r, maximize: null }),
5090
+ /* @__PURE__ */ d(Du, { path: t, absence: hu, markup: e.markup, variant: n })
5089
5091
  ] });
5090
- }, If = ({ holds: e, deferWhileFullscreenIn: t, testId: n }) => {
5092
+ }, Pf = ({ holds: e, deferWhileFullscreenIn: t, testId: n }) => {
5091
5093
  const { labels: r, announcer: o } = $(), a = Le();
5092
5094
  K(() => {
5093
5095
  if (!e) return;
5094
- const f = t === null ? null : () => t.current !== null && Ls(t.current);
5096
+ const f = t === null ? null : () => t.current !== null && As(t.current);
5095
5097
  return o.claim(a, f);
5096
5098
  }, [e, o, a, t]), ne(() => {
5097
5099
  if (t === null) return;
@@ -5101,8 +5103,8 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5101
5103
  return f.addEventListener("close", h, !0), () => f.removeEventListener("close", h, !0);
5102
5104
  }, [o, t]);
5103
5105
  const i = _(() => o.shownIn(a), [o, a]), s = oe(o.subscribe, i, i);
5104
- return /* @__PURE__ */ u("div", { className: "aqmx-sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", "data-testid": n, children: s.length > 1 ? r.announcementSequence(s) : s[0] });
5105
- }, Ie = Object.freeze([]), Pf = (e) => {
5106
+ return /* @__PURE__ */ d("div", { className: "aqmx-sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", "data-testid": n, children: s.length > 1 ? r.announcementSequence(s) : s[0] });
5107
+ }, Ie = Object.freeze([]), Ff = (e) => {
5106
5108
  const t = /* @__PURE__ */ new Set();
5107
5109
  let n = Ie, r = [], o = !1;
5108
5110
  const a = [];
@@ -5113,7 +5115,7 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5113
5115
  }, f = () => a.at(-1)?.region, h = () => a.at(-1)?.defers?.() === !0, w = (m) => {
5114
5116
  const g = f();
5115
5117
  m(), f() !== g && n !== Ie && s(Ie);
5116
- }, d = () => {
5118
+ }, u = () => {
5117
5119
  o = !1;
5118
5120
  const m = r.map((v) => "sentence" in v ? v.sentence : v.list(v.items));
5119
5121
  if (r = [], h()) {
@@ -5123,7 +5125,7 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5123
5125
  const g = [...i, ...m];
5124
5126
  i = [], s(Object.freeze(g));
5125
5127
  }, p = () => {
5126
- o || (o = !0, n !== Ie && s(Ie), e.request(d));
5128
+ o || (o = !0, n !== Ie && s(Ie), e.request(u));
5127
5129
  };
5128
5130
  return {
5129
5131
  announce: (m) => {
@@ -5149,21 +5151,20 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5149
5151
  },
5150
5152
  shownIn: (m) => f() === m ? n : Ie
5151
5153
  };
5152
- }, Ee = Object.freeze({ status: "cancelled" }), Ff = (e) => Pa(e) && (e.status !== "ok" || wa(e.path)), yr = (e) => {
5154
+ }, Ee = Object.freeze({ status: "cancelled" }), $f = (e) => Fa(e) && (e.status !== "ok" || ga(e.path)), br = (e) => {
5153
5155
  if (e === null || typeof e != "object") return null;
5154
5156
  const { failure: t } = e;
5155
- if (Oa(t) !== null) return null;
5157
+ if (La(t) !== null) return null;
5156
5158
  const { reason: n, code: r } = t;
5157
- return La(n, r);
5158
- }, $f = ({ dataPath: e, onScope: t, fetch: n }) => {
5159
- const r = n ?? ((d, p) => globalThis.fetch(d, p)), o = (d, p) => `${e}/${d}?${new URLSearchParams(p).toString()}`, a = (d) => {
5160
- d.status === 401 && t(null);
5161
- const p = d.headers.get(Ma);
5159
+ return Aa(n, r);
5160
+ }, _f = ({ dataPath: e, onScope: t, fetch: n }) => {
5161
+ const r = n ?? ((u, p) => globalThis.fetch(u, p)), o = (u, p) => `${e}/${u}?${new URLSearchParams(p).toString()}`, a = (u) => {
5162
+ const p = u.headers.get(Oa);
5162
5163
  p !== null && t(p);
5163
- }, i = async (d, p, m, g) => {
5164
+ }, i = async (u, p, m, g) => {
5164
5165
  let v;
5165
5166
  try {
5166
- v = await r(d, { credentials: "same-origin", ...p, headers: { Accept: "application/json", ...p.headers } });
5167
+ v = await r(u, { credentials: "same-origin", ...p, headers: { Accept: "application/json", ...p.headers } });
5167
5168
  } catch {
5168
5169
  return g({ reason: "failed" });
5169
5170
  }
@@ -5181,35 +5182,35 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5181
5182
  k = !1;
5182
5183
  }
5183
5184
  if (k) return b;
5184
- const M = yr(b);
5185
+ const M = br(b);
5185
5186
  return g(M !== null ? M : { reason: v.status === 200 ? "failed" : qt(v.status) });
5186
- }, s = { [Bt]: _a }, f = { [Bt]: za, "Content-Type": `${Ha}; charset=utf-8` }, h = { [Bt]: $a }, w = async (d, p, m) => {
5187
- const g = await i(d, p, m, (v) => $e(v.reason, v.code));
5187
+ }, s = { [Bt]: qa }, f = { [Bt]: ja, "Content-Type": `${za}; charset=utf-8` }, h = { [Bt]: _a }, w = async (u, p, m) => {
5188
+ const g = await i(u, p, m, (v) => $e(v.reason, v.code));
5188
5189
  return p.signal.aborted ? Ee : g;
5189
5190
  };
5190
5191
  return {
5191
- tree: (d) => i(o("tree", { [ae.source]: d }), { method: "GET" }, Ln, (p) => ({ status: "error", failure: p })),
5192
- children: async (d, p, m) => {
5193
- const g = await i(o("children", { [ae.source]: d, [ae.path]: p }), { method: "GET", signal: m }, Ia, (v) => ({ status: "error", failure: v }));
5192
+ tree: (u) => i(o("tree", { [ae.source]: u }), { method: "GET" }, Ln, (p) => ({ status: "error", failure: p })),
5193
+ children: async (u, p, m) => {
5194
+ const g = await i(o("children", { [ae.source]: u, [ae.path]: p }), { method: "GET", signal: m }, Pa, (v) => ({ status: "error", failure: v }));
5194
5195
  return m.aborted ? Ee : g;
5195
5196
  },
5196
- ancestors: async (d, p, m) => {
5197
- const g = await i(o("ancestors", { [ae.source]: d, [ae.path]: p }), { method: "GET", signal: m }, Na, (v) => ({ status: "error", failure: v }));
5197
+ ancestors: async (u, p, m) => {
5198
+ const g = await i(o("ancestors", { [ae.source]: u, [ae.path]: p }), { method: "GET", signal: m }, Ia, (v) => ({ status: "error", failure: v }));
5198
5199
  return m.aborted ? Ee : g;
5199
5200
  },
5200
- reveal: async (d, p, m) => {
5201
- const g = await i(o("reveal", { [ae.source]: d, [ae.path]: p }), { method: "GET", signal: m }, Da, (v) => ({ status: "error", failure: v }));
5201
+ reveal: async (u, p, m) => {
5202
+ const g = await i(o("reveal", { [ae.source]: u, [ae.path]: p }), { method: "GET", signal: m }, Na, (v) => ({ status: "error", failure: v }));
5202
5203
  return m.aborted ? Ee : g;
5203
5204
  },
5204
- document: (d, { refresh: p }) => i(o("document", { [ae.path]: d }), p ? { method: "GET", headers: s } : { method: "GET" }, Za, (m) => $e(m.reason, m.code)),
5205
- text: async (d, p) => {
5206
- const m = await i(o("text", { [ae.path]: d }), { method: "GET", signal: p }, Aa, (g) => $e(g.reason, g.code));
5205
+ document: (u, { refresh: p }) => i(o("document", { [ae.path]: u }), p ? { method: "GET", headers: s } : { method: "GET" }, Ga, (m) => $e(m.reason, m.code)),
5206
+ text: async (u, p) => {
5207
+ const m = await i(o("text", { [ae.path]: u }), { method: "GET", signal: p }, Da, (g) => $e(g.reason, g.code));
5207
5208
  return p.aborted ? Ee : m;
5208
5209
  },
5209
- asset: async (d, p) => {
5210
+ asset: async (u, p) => {
5210
5211
  let m;
5211
5212
  try {
5212
- m = await r(d, { method: "GET", credentials: "same-origin", signal: p });
5213
+ m = await r(u, { method: "GET", credentials: "same-origin", signal: p });
5213
5214
  } catch {
5214
5215
  return p.aborted ? Ee : { status: "error", failure: { reason: "failed" } };
5215
5216
  }
@@ -5221,22 +5222,22 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5221
5222
  } catch {
5222
5223
  }
5223
5224
  if (p.aborted) return Ee;
5224
- const v = yr(g);
5225
+ const v = br(g);
5225
5226
  return { status: "error", failure: v === null ? { reason: qt(m.status) } : v };
5226
5227
  },
5227
- edit: (d, p) => w(o("edit", { [ae.path]: d }), { method: "GET", signal: p }, Va),
5228
- save: (d, p, m, g) => w(o("save", { [ae.path]: d, [ae.base]: p }), { method: "POST", headers: f, body: m, signal: g }, ja),
5229
- preview: (d, p, m) => w(o("preview", { [ae.path]: d }), { method: "POST", headers: f, body: p, signal: m }, Ua),
5230
- revisions: (d, p) => w(o("revisions", { [ae.path]: d }), { method: "GET", signal: p }, Ba),
5231
- revision: (d, p, m) => w(o("revision", { [ae.path]: d, [ae.revision]: p }), { method: "GET", signal: m }, qa),
5232
- refresh: (d) => i(o("refresh", { [ae.source]: d }), { method: "POST", headers: s }, Ln, (p) => ({ status: "error", failure: p })),
5233
- issueId: (d) => i(o("issue-id", { [ae.path]: d }), { method: "POST", headers: h }, Fa, (p) => ({ status: "error", failure: p })),
5234
- resolveId: async (d, p) => {
5235
- const m = await i(o("resolve-id", { [ae.id]: d }), { method: "GET", signal: p }, Ff, (g) => ({ status: "error", failure: g }));
5228
+ edit: (u, p) => w(o("edit", { [ae.path]: u }), { method: "GET", signal: p }, Za),
5229
+ save: (u, p, m, g) => w(o("save", { [ae.path]: u, [ae.base]: p }), { method: "POST", headers: f, body: m, signal: g }, Va),
5230
+ preview: (u, p, m) => w(o("preview", { [ae.path]: u }), { method: "POST", headers: f, body: p, signal: m }, Ha),
5231
+ revisions: (u, p) => w(o("revisions", { [ae.path]: u }), { method: "GET", signal: p }, Ua),
5232
+ revision: (u, p, m) => w(o("revision", { [ae.path]: u, [ae.revision]: p }), { method: "GET", signal: m }, Ba),
5233
+ refresh: (u) => i(o("refresh", { [ae.source]: u }), { method: "POST", headers: s }, Ln, (p) => ({ status: "error", failure: p })),
5234
+ issueId: (u) => i(o("issue-id", { [ae.path]: u }), { method: "POST", headers: h }, $a, (p) => ({ status: "error", failure: p })),
5235
+ resolveId: async (u, p) => {
5236
+ const m = await i(o("resolve-id", { [ae.id]: u }), { method: "GET", signal: p }, $f, (g) => ({ status: "error", failure: g }));
5236
5237
  return p.aborted ? Ee : m;
5237
5238
  }
5238
5239
  };
5239
- }, _f = () => {
5240
+ }, qf = () => {
5240
5241
  let e = null, t = null;
5241
5242
  return {
5242
5243
  settle: (n) => {
@@ -5251,19 +5252,19 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5251
5252
  return t = null, o;
5252
5253
  }
5253
5254
  };
5254
- }, qf = (e) => {
5255
+ }, Bf = (e) => {
5255
5256
  const t = rn(e);
5256
5257
  if (t === null) return Mn;
5257
5258
  try {
5258
- return ba(JSON.parse(t));
5259
+ return ka(JSON.parse(t));
5259
5260
  } catch (n) {
5260
5261
  return console.warn(`[markdown-explorer] localStorage key ${G(e)} does not hold JSON; using the default tree settings.`, n), Mn;
5261
5262
  }
5262
- }, br = (e, t) => {
5263
+ }, kr = (e, t) => {
5263
5264
  let n = null;
5264
5265
  const r = () => {
5265
5266
  if (n === null) {
5266
- const a = qf(e);
5267
+ const a = Bf(e);
5267
5268
  n = { changes: a, settings: Rn(t, a) };
5268
5269
  }
5269
5270
  return n;
@@ -5275,14 +5276,14 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5275
5276
  getServerSnapshot: () => t,
5276
5277
  subscribe: o.subscribe,
5277
5278
  advance: (a) => {
5278
- const { changes: i, settings: s } = r(), f = ga(i, a, va(s, a)[a], t);
5279
- return n = { changes: f, settings: Rn(t, f) }, o.emit(), nn(e, ya(f)), n.settings;
5279
+ const { changes: i, settings: s } = r(), f = va(i, a, ya(s, a)[a], t);
5280
+ return n = { changes: f, settings: Rn(t, f) }, o.emit(), nn(e, ba(f)), n.settings;
5280
5281
  }
5281
5282
  };
5282
- }, Bf = Object.freeze({ status: "refreshed" }), Uf = Object.freeze({ status: "superseded" }), Hf = Object.freeze({ status: "unshown" }), mn = Object.freeze({ status: "deferred" }), zf = Vr(mn), Wo = 4, jf = Wo - 1, kr = Object.freeze({ status: "loading" }), Vf = Object.freeze({ status: "error", failure: Object.freeze({ reason: "failed" }) }), Zf = (e) => {
5283
- const t = /* @__PURE__ */ new Map(), n = so(), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = it(), f = /* @__PURE__ */ new Set();
5283
+ }, Uf = Object.freeze({ status: "refreshed" }), Hf = Object.freeze({ status: "superseded" }), zf = Object.freeze({ status: "unshown" }), mn = Object.freeze({ status: "deferred" }), jf = Zr(mn), Ko = 4, Vf = Ko - 1, Er = Object.freeze({ status: "loading" }), Zf = Object.freeze({ status: "error", failure: Object.freeze({ reason: "failed" }) }), Gf = (e) => {
5284
+ const t = /* @__PURE__ */ new Map(), n = lo(), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = it(), f = /* @__PURE__ */ new Set();
5284
5285
  let h = 0, w = 0;
5285
- const d = { direct: null, bulk: null }, p = /* @__PURE__ */ new Set();
5286
+ const u = { direct: null, bulk: null }, p = /* @__PURE__ */ new Set();
5286
5287
  let m = !1, g = 0;
5287
5288
  const v = () => {
5288
5289
  g += 1, s.emit();
@@ -5310,13 +5311,13 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5310
5311
  let S = r.get(y);
5311
5312
  return S === void 0 && (S = /* @__PURE__ */ new Map(), r.set(y, S)), S;
5312
5313
  }, P = (y) => {
5313
- const S = [...i.keys()], L = d[y], A = L === null ? 0 : S.indexOf(L) + 1;
5314
+ const S = [...i.keys()], L = u[y], A = L === null ? 0 : S.indexOf(L) + 1;
5314
5315
  for (let q = 0; q < S.length; q += 1) {
5315
- const te = S[(A + q) % S.length], re = te === void 0 ? void 0 : i.get(te);
5316
- if (!(te === void 0 || re === void 0)) {
5316
+ const ee = S[(A + q) % S.length], re = ee === void 0 ? void 0 : i.get(ee);
5317
+ if (!(ee === void 0 || re === void 0)) {
5317
5318
  for (const X of re[y])
5318
5319
  if ((re.claims.get(X) ?? 0) !== 0)
5319
- return re[y].delete(X), d[y] = te, { sourceId: te, path: X };
5320
+ return re[y].delete(X), u[y] = ee, { sourceId: ee, path: X };
5320
5321
  }
5321
5322
  }
5322
5323
  return null;
@@ -5324,8 +5325,8 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5324
5325
  const q = i.get(y);
5325
5326
  if (q === void 0 || q.inFlight.get(S) !== L) return;
5326
5327
  M(q, S, L);
5327
- const te = (q.claims.get(S) ?? 0) > 0, re = I(y);
5328
- if (A.status === "ok" ? re.set(S, { status: "loaded", entries: A.entries }) : A.status === "error" && te ? re.set(S, { status: "failed", failure: A.failure }) : re.delete(S), v(), A.status === "error" && te) {
5328
+ const ee = (q.claims.get(S) ?? 0) > 0, re = I(y);
5329
+ if (A.status === "ok" ? re.set(S, { status: "loaded", entries: A.entries }) : A.status === "error" && ee ? re.set(S, { status: "failed", failure: A.failure }) : re.delete(S), v(), A.status === "error" && ee) {
5329
5330
  const X = { sourceId: y, path: S, failure: A.failure };
5330
5331
  for (const de of [...f]) de(X);
5331
5332
  }
@@ -5334,16 +5335,16 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5334
5335
  const A = { controller: new AbortController(), lane: L };
5335
5336
  k(y).inFlight.set(S, A), h += 1, L === "bulk" && (w += 1), e.children(y, S, A.controller.signal).then(
5336
5337
  (q) => U(y, S, A, q),
5337
- () => U(y, S, A, Vf)
5338
+ () => U(y, S, A, Zf)
5338
5339
  );
5339
5340
  }, H = () => {
5340
- for (; h < Wo; ) {
5341
+ for (; h < Ko; ) {
5341
5342
  const y = P("direct");
5342
5343
  if (y !== null) {
5343
5344
  N(y.sourceId, y.path, "direct");
5344
5345
  continue;
5345
5346
  }
5346
- const S = w < jf ? P("bulk") : null;
5347
+ const S = w < Vf ? P("bulk") : null;
5347
5348
  if (S === null) return;
5348
5349
  N(S.sourceId, S.path, "bulk");
5349
5350
  }
@@ -5368,7 +5369,7 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5368
5369
  t.set(y, R(nt(e.tree(y)), S));
5369
5370
  }, l = (y, S, L) => {
5370
5371
  C(y);
5371
- const A = R(Vr(S), L);
5372
+ const A = R(Zr(S), L);
5372
5373
  return t.set(y, A), r.delete(y), v(), H(), A;
5373
5374
  }, E = (y, S, L, A) => {
5374
5375
  if (L !== b(y) || t.get(y) !== S) return;
@@ -5391,7 +5392,7 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5391
5392
  const L = (a.get(y) ?? 0) + 1;
5392
5393
  a.set(y, L);
5393
5394
  const A = await e.refresh(y);
5394
- if (a.get(y) !== L) return Uf;
5395
+ if (a.get(y) !== L) return Hf;
5395
5396
  if (A.status === "error") return { status: "failed", failure: A.failure };
5396
5397
  const q = t.get(y);
5397
5398
  if (!(q !== void 0 && q.loadedAt !== null && x(y, "ok") && q.loadedAt > A.loadedAt)) {
@@ -5404,10 +5405,10 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5404
5405
  if (S)
5405
5406
  for (const [re, X] of t)
5406
5407
  re !== y && Je(X.promise)?.status === "ok" && (X.stale = !0);
5407
- return Bf;
5408
+ return Uf;
5408
5409
  };
5409
5410
  return {
5410
- read: (y) => t.get(y)?.promise ?? zf,
5411
+ read: (y) => t.get(y)?.promise ?? jf,
5411
5412
  open: (y) => {
5412
5413
  const S = n.resumes(y), L = n.hold(y), A = t.get(y);
5413
5414
  return A === void 0 || x(y, "deferred") ? (c(y, !0), v()) : S || (A.opened && x(y, "error") ? (c(y, !0), v()) : (A.opened = !0, A.stale && x(y, "ok") && O(y, A))), L;
@@ -5417,33 +5418,33 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5417
5418
  },
5418
5419
  seed: (y, S) => {
5419
5420
  const L = S.then(
5420
- (te) => te === null ? mn : te,
5421
+ (ee) => ee === null ? mn : ee,
5421
5422
  () => mn
5422
5423
  ), A = t.get(y);
5423
5424
  if (A !== void 0 && x(y, "ok")) {
5424
- const te = b(y);
5425
- L.then((re) => E(y, A, te, re));
5425
+ const ee = b(y);
5426
+ L.then((re) => E(y, A, ee, re));
5426
5427
  return;
5427
5428
  }
5428
5429
  C(y);
5429
5430
  const q = R(nt(L), A?.opened === !0);
5430
- t.set(y, q), r.delete(y), H(), L.then((te) => {
5431
- t.get(y) === q && (te.status === "deferred" && n.isHeld(y) && c(y, q.opened), v());
5431
+ t.set(y, q), r.delete(y), H(), L.then((ee) => {
5432
+ t.get(y) === q && (ee.status === "deferred" && n.isHeld(y) && c(y, q.opened), v());
5432
5433
  });
5433
5434
  },
5434
5435
  refresh: (y) => F(y, !0),
5435
5436
  reloadSource: (y) => {
5436
5437
  if (n.isHeld(y)) return F(y, !1);
5437
5438
  const S = t.get(y);
5438
- return S !== void 0 && (S.stale = !0), Promise.resolve(Hf);
5439
+ return S !== void 0 && (S.stale = !0), Promise.resolve(zf);
5439
5440
  },
5440
5441
  children: (y, S) => r.get(y)?.get(S),
5441
5442
  claimChildren: (y, S) => {
5442
5443
  const L = k(y), A = I(y);
5443
- let q = !1, te = !1;
5444
+ let q = !1, ee = !1;
5444
5445
  for (const [X, de] of S)
5445
- L.claims.set(X, (L.claims.get(X) ?? 0) + 1), A.get(X) === void 0 ? (A.set(X, kr), L[de].add(X), q = !0, te = !0) : de === "direct" && L.bulk.delete(X) && (L.direct.add(X), te = !0);
5446
- q && v(), te && H();
5446
+ L.claims.set(X, (L.claims.get(X) ?? 0) + 1), A.get(X) === void 0 ? (A.set(X, Er), L[de].add(X), q = !0, ee = !0) : de === "direct" && L.bulk.delete(X) && (L.direct.add(X), ee = !0);
5447
+ q && v(), ee && H();
5447
5448
  let re = !1;
5448
5449
  return () => {
5449
5450
  if (!re) {
@@ -5461,7 +5462,7 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5461
5462
  if (L === void 0 || L.get(S)?.status !== "failed") return;
5462
5463
  const A = k(y);
5463
5464
  if ((A.claims.get(S) ?? 0) > 0) {
5464
- L.set(S, kr), A.direct.add(S), v(), H();
5465
+ L.set(S, Er), A.direct.add(S), v(), H();
5465
5466
  return;
5466
5467
  }
5467
5468
  L.delete(S), v();
@@ -5481,7 +5482,7 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5481
5482
  subscribe: s.subscribe,
5482
5483
  version: () => g
5483
5484
  };
5484
- }, Gf = (e, t) => {
5485
+ }, Wf = (e, t) => {
5485
5486
  let n = e;
5486
5487
  const r = it();
5487
5488
  return {
@@ -5491,79 +5492,79 @@ const Sf = /* @__PURE__ */ T.forwardRef(Ef), xf = (e) => {
5491
5492
  n = { ...n, ...o }, t(n), r.emit();
5492
5493
  }
5493
5494
  };
5494
- }, Wf = Object.freeze({ kind: "loading" }), Kf = Object.freeze({ reason: "invalid" }), Xf = Object.freeze({ reason: "failed" }), Yf = (e, t) => {
5495
- const { config: n, data: r, sources: o } = $(), a = ze(), i = e.kind === "document-id" ? e : null, [s, f] = V(null), [h, w] = V(null), d = Q(() => i === null ? null : s !== null && s.opening === i ? s : { opening: i, retries: 0 }, [i, s]), p = d === null ? null : d.opening.id === null ? Kf : d.retries === 0 && t !== null && t.id === d.opening.id ? t.failure : h !== null && h.attempt === d ? h.failure : null, m = d !== null && p === null, { hash: g } = pn(), v = z(g);
5495
+ }, Kf = Object.freeze({ kind: "loading" }), Xf = Object.freeze({ reason: "invalid" }), Yf = Object.freeze({ reason: "failed" }), Jf = (e, t) => {
5496
+ const { config: n, data: r, sources: o } = $(), a = ze(), i = e.kind === "document-id" ? e : null, [s, f] = V(null), [h, w] = V(null), u = Q(() => i === null ? null : s !== null && s.opening === i ? s : { opening: i, retries: 0 }, [i, s]), p = u === null ? null : u.opening.id === null ? Xf : u.retries === 0 && t !== null && t.id === u.opening.id ? t.failure : h !== null && h.attempt === u ? h.failure : null, m = u !== null && p === null, { hash: g } = pn(), v = z(g);
5496
5497
  K(() => {
5497
5498
  v.current = g;
5498
5499
  }, [g]), ne(() => {
5499
- if (!m || d === null || d.opening.id === null) return;
5500
- const { opens: k, id: M } = d.opening, D = new AbortController();
5500
+ if (!m || u === null || u.opening.id === null) return;
5501
+ const { opens: k, id: M } = u.opening, D = new AbortController();
5501
5502
  return r.resolveId(M, D.signal).then((C) => {
5502
5503
  if (!(C.status === "cancelled" || D.signal.aborted)) {
5503
- if (C.status === "error") return w({ attempt: d, failure: C.failure });
5504
- if (!o.some((R) => R.id === C.source)) return w({ attempt: d, failure: Xf });
5505
- a(`${xe(n, ka(k, C.path, C.source))}${v.current}`, "browse");
5504
+ if (C.status === "error") return w({ attempt: u, failure: C.failure });
5505
+ if (!o.some((R) => R.id === C.source)) return w({ attempt: u, failure: Yf });
5506
+ a(`${xe(n, Ea(k, C.path, C.source))}${v.current}`, "browse");
5506
5507
  }
5507
5508
  }), () => D.abort();
5508
- }, [m, d, r, o, n, a]);
5509
+ }, [m, u, r, o, n, a]);
5509
5510
  const b = _(() => {
5510
- d !== null && f({ opening: d.opening, retries: d.retries + 1 });
5511
- }, [d]);
5512
- return Q(() => d === null ? null : p === null ? Wf : { kind: "document-id", failure: p, onRetry: b }, [d, p, b]);
5513
- }, Jf = 1;
5511
+ u !== null && f({ opening: u.opening, retries: u.retries + 1 });
5512
+ }, [u]);
5513
+ return Q(() => u === null ? null : p === null ? Kf : { kind: "document-id", failure: p, onRetry: b }, [u, p, b]);
5514
+ }, Qf = 1;
5514
5515
  let yt = 0, Me = null;
5515
- const Qf = () => {
5516
+ const em = () => {
5516
5517
  const { documentElement: e, body: t } = document;
5517
5518
  yt === 0 && (Me = { htmlOverflow: e.style.overflow, bodyOverflow: t.style.overflow, htmlGutter: e.style.scrollbarGutter, bodyGutter: t.style.scrollbarGutter }, e.style.overflow = "hidden", t.style.overflow = "hidden", e.style.scrollbarGutter = "auto", t.style.scrollbarGutter = "auto"), yt += 1;
5518
5519
  let n = !1;
5519
5520
  return () => {
5520
5521
  n || (n = !0, yt -= 1, !(yt > 0 || Me === null) && (e.style.overflow = Me.htmlOverflow, t.style.overflow = Me.bodyOverflow, e.style.scrollbarGutter = Me.htmlGutter, t.style.scrollbarGutter = Me.bodyGutter, Me = null));
5521
5522
  };
5522
- }, em = [
5523
+ }, tm = [
5523
5524
  { selector: '[data-aqmx-document-flow="fill"]', name: "document region" },
5524
5525
  { selector: "[data-aqmx-explorer-body]", name: "tree area" }
5525
- ], Er = 1, tm = 1e3, Sr = (e) => e.getClientRects().length > 0, en = "Give the explorer's container a definite block size (for example height: 100dvh, or a flex column of definite height whose item has flex: 1 and min-height: 0; in a fresh React Router app also html and body at height: 100%) instead of an auto or only a minimum height.", nm = (e) => {
5526
- if (!Sr(e)) return null;
5526
+ ], Sr = 1, nm = 1e3, xr = (e) => e.getClientRects().length > 0, en = "Give the explorer's container a definite block size (for example height: 100dvh, or a flex column of definite height whose item has flex: 1 and min-height: 0; in a fresh React Router app also html and body at height: 100%) instead of an auto or only a minimum height.", rm = (e) => {
5527
+ if (!xr(e)) return null;
5527
5528
  const t = e.getBoundingClientRect(), n = window.innerHeight;
5528
- if (t.bottom > n + Jf)
5529
+ if (t.bottom > n + Qf)
5529
5530
  return `[markdown-explorer] the explorer ends ${String(Math.round(t.bottom))}px down a ${String(n)}px viewport while lockDocumentScroll stops the page from scrolling, so the rest cannot be reached. ${en}`;
5530
- if (t.height < Er)
5531
+ if (t.height < Sr)
5531
5532
  return `[markdown-explorer] the explorer collapsed to ${String(Math.round(t.height))}px while lockDocumentScroll stops the page from scrolling, so nothing can be read. ${en}`;
5532
- for (const { selector: r, name: o } of em)
5533
+ for (const { selector: r, name: o } of tm)
5533
5534
  for (const a of e.querySelectorAll(r)) {
5534
- if (!Sr(a)) continue;
5535
+ if (!xr(a)) continue;
5535
5536
  const i = a.getBoundingClientRect().height;
5536
- if (i < Er)
5537
+ if (i < Sr)
5537
5538
  return `[markdown-explorer] the explorer's ${o} collapsed to ${String(Math.round(i))}px while lockDocumentScroll stops the page from scrolling, so it cannot be read. ${en}`;
5538
5539
  }
5539
5540
  return null;
5540
- }, rm = (e) => {
5541
+ }, om = (e) => {
5541
5542
  let t = !1, n;
5542
5543
  const r = () => {
5543
5544
  n = void 0;
5544
- const i = nm(e);
5545
+ const i = rm(e);
5545
5546
  i !== null && (t = !0, console.error(i));
5546
5547
  }, o = () => {
5547
- t || (clearTimeout(n), n = setTimeout(r, tm));
5548
+ t || (clearTimeout(n), n = setTimeout(r, nm));
5548
5549
  }, a = typeof ResizeObserver > "u" ? null : new ResizeObserver(o);
5549
5550
  return a?.observe(e), window.addEventListener("resize", o), o(), () => {
5550
5551
  clearTimeout(n), a?.disconnect(), window.removeEventListener("resize", o);
5551
5552
  };
5552
- }, om = (e) => (ne(() => e ? Qf() : void 0, [e]), _((t) => e ? rm(t) : void 0, [e])), xr = '[data-testid="markdown-explorer-view-switch"]', am = [
5553
- { control: xr, successors: [xr, '[data-testid="markdown-explorer-sheet-toggle"]', '[data-testid="markdown-explorer-rail-toggle"]'] },
5553
+ }, am = (e) => (ne(() => e ? em() : void 0, [e]), _((t) => e ? om(t) : void 0, [e])), Tr = '[data-testid="markdown-explorer-view-switch"]', im = [
5554
+ { control: Tr, successors: [Tr, '[data-testid="markdown-explorer-sheet-toggle"]', '[data-testid="markdown-explorer-rail-toggle"]'] },
5554
5555
  { control: '[data-testid="markdown-explorer-selection-open"]', successors: ['[data-testid="markdown-explorer-panel-frame"]'] }
5555
- ], im = (e) => {
5556
- for (const t of am) {
5556
+ ], sm = (e) => {
5557
+ for (const t of im) {
5557
5558
  const n = e.closest(t.control);
5558
5559
  if (n !== null) return { element: n, control: t };
5559
5560
  }
5560
5561
  return null;
5561
- }, sm = (e, t) => {
5562
+ }, lm = (e, t) => {
5562
5563
  const n = z(null);
5563
5564
  ne(() => {
5564
5565
  const o = (s) => {
5565
5566
  const f = e.current;
5566
- n.current = f !== null && s instanceof Element && f.contains(s) ? im(s) : null;
5567
+ n.current = f !== null && s instanceof Element && f.contains(s) ? sm(s) : null;
5567
5568
  }, a = (s) => o(s.target);
5568
5569
  o(document.activeElement);
5569
5570
  const i = (s) => {
@@ -5588,8 +5589,8 @@ const Qf = () => {
5588
5589
  const h = e.current;
5589
5590
  if (h === null) return !0;
5590
5591
  for (const w of o.control.successors)
5591
- for (const d of h.querySelectorAll(w))
5592
- if (d !== o.element && (d.focus({ preventScroll: !0 }), document.activeElement === d))
5592
+ for (const u of h.querySelectorAll(w))
5593
+ if (u !== o.element && (u.focus({ preventScroll: !0 }), document.activeElement === u))
5593
5594
  return !0;
5594
5595
  return !1;
5595
5596
  };
@@ -5601,37 +5602,37 @@ const Qf = () => {
5601
5602
  });
5602
5603
  return s.observe(i, { childList: !0, subtree: !0 }), () => s.disconnect();
5603
5604
  }, [t, e]);
5604
- }, lm = hn(() => import("./TreeLayout-Cc-ykewY.js").then((e) => ({ default: e.TreeLayout }))), cm = hn(() => import("./MultiLayout-DROxkTdD.js").then((e) => ({ default: e.MultiLayout }))), dm = 64, um = {
5605
+ }, cm = hn(() => import("./TreeLayout-9eEP62LF.js").then((e) => ({ default: e.TreeLayout }))), dm = hn(() => import("./MultiLayout-1rKm2Hzt.js").then((e) => ({ default: e.MultiLayout }))), um = 64, fm = {
5605
5606
  request: (e) => {
5606
5607
  requestAnimationFrame(e);
5607
5608
  }
5608
- }, Tr = (e) => {
5609
+ }, Cr = (e) => {
5609
5610
  e.documents.clear(), e.trees.clear();
5610
5611
  }, tn = (e, t) => {
5611
5612
  t.tree !== null && e.trees.seed(t.tree.sourceId, t.tree.result);
5612
5613
  for (const { path: n, document: r } of t.documents) e.documents.seed(n, r);
5613
- }, fm = (e, t) => {
5614
+ }, mm = (e, t) => {
5614
5615
  const [n, r] = V(() => ({ overrides: t, locale: e, labels: Fn(e, t) }));
5615
- if (n.locale === e && xi(n.overrides, t)) return n.labels;
5616
+ if (n.locale === e && Ti(n.overrides, t)) return n.labels;
5616
5617
  const o = { overrides: t, locale: e, labels: Fn(e, t) };
5617
5618
  return r(o), o.labels;
5618
- }, mm = (e, t, n) => {
5619
- const [r, o] = V(() => ({ scope: t, store: br(e, n) }));
5619
+ }, hm = (e, t, n) => {
5620
+ const [r, o] = V(() => ({ scope: t, store: kr(e, n) }));
5620
5621
  if (r.scope === t && r.store.storageKey === e && r.store.defaults === n) return r.store;
5621
- const a = { scope: t, store: br(e, n) };
5622
+ const a = { scope: t, store: kr(e, n) };
5622
5623
  return o(a), a.store;
5623
5624
  }, Xe = (e, t) => {
5624
5625
  const [n, r] = V(() => ({ scope: e, value: t() }));
5625
5626
  if (n.scope === e) return n.value;
5626
5627
  const o = { scope: e, value: t() };
5627
5628
  return r(o), o.value;
5628
- }, hm = () => Pf(um), Cr = "on", pm = "off", wm = Object.freeze({ kind: "unavailable" }), gm = (e) => {
5629
+ }, pm = () => Ff(fm), Rr = "on", wm = "off", gm = Object.freeze({ kind: "unavailable" }), vm = (e) => {
5629
5630
  if (e !== void 0 && (e === null || typeof e != "object" || typeof e.convert != "function"))
5630
5631
  throw new TypeError("[markdown-explorer] draftConverter must be an object with a convert function");
5631
- }, Rr = (e, t) => {
5632
+ }, Mr = (e, t) => {
5632
5633
  const n = Te(e.peek(t));
5633
5634
  return n === null || n.document.kind === "failure" ? ve(t) : n.document.name;
5634
- }, jm = ({
5635
+ }, Vm = ({
5635
5636
  data: e,
5636
5637
  config: t,
5637
5638
  storageNamespace: n,
@@ -5643,7 +5644,7 @@ const Qf = () => {
5643
5644
  accessFailure: f,
5644
5645
  lockDocumentScroll: h = !1,
5645
5646
  onMathDiagnostics: w,
5646
- onEditGrant: d,
5647
+ onEditGrant: u,
5647
5648
  draftConverter: p,
5648
5649
  fetch: m,
5649
5650
  persistSettings: g,
@@ -5655,33 +5656,33 @@ const Qf = () => {
5655
5656
  confirmUnversionedSaves: C = _n.confirmUnversionedSaves,
5656
5657
  paletteKey: R
5657
5658
  }) => {
5658
- ei(n), gm(p), ui({ fetch: m, persistSettings: g, subscribeHostChanges: v, onDraftChange: D, accessFailure: f, guardUnload: M, confirmUnversionedSaves: C, hostChangePolicy: b, paletteKey: R });
5659
- const I = _r(r), P = Ti(a), U = fm(I, o), { revalidate: N } = la(), H = z(() => {
5659
+ ti(n), vm(p), fi({ fetch: m, persistSettings: g, subscribeHostChanges: v, onDraftChange: D, accessFailure: f, guardUnload: M, confirmUnversionedSaves: C, hostChangePolicy: b, paletteKey: R });
5660
+ const I = qr(r), P = Ci(a), U = mm(I, o), { revalidate: N } = ca(), H = z(() => {
5660
5661
  }), W = at(t.dataPath), Y = z({ fetch: m, persistSettings: g, onDraftChange: D, hostChangePolicy: b });
5661
5662
  K(() => {
5662
5663
  Y.current = { fetch: m, persistSettings: g, onDraftChange: D, hostChangePolicy: b };
5663
5664
  }, [m, g, D, b]);
5664
5665
  const [c] = V(() => ({
5665
- fetch: (B, ee) => {
5666
+ fetch: (B, te) => {
5666
5667
  const le = Y.current.fetch;
5667
- return le === void 0 ? globalThis.fetch(B, ee) : le(B, ee);
5668
+ return le === void 0 ? globalThis.fetch(B, te) : le(B, te);
5668
5669
  }
5669
5670
  })), [l] = V(() => {
5670
- const B = $f({ dataPath: W, onScope: (le) => H.current(le), fetch: c.fetch }), ee = { documents: ml({ client: B, capacity: Math.max(dm, t.multiView.maxPanels * 2) }), trees: Zf(B) };
5671
- return tn(ee, e), Nn(n, e.scope), { data: B, ...ee, aligned: { pageData: e, storageNamespace: n, pendingReader: null } };
5671
+ const B = _f({ dataPath: W, onScope: (le) => H.current(le), fetch: c.fetch }), te = { documents: hl({ client: B, capacity: Math.max(um, t.multiView.maxPanels * 2) }), trees: Gf(B) };
5672
+ return tn(te, e), Nn(n, e.scope), { data: B, ...te, aligned: { pageData: e, storageNamespace: n, pendingReader: null } };
5672
5673
  });
5673
5674
  if (l.aligned.pageData !== e || l.aligned.storageNamespace !== n) {
5674
5675
  const B = l.aligned.pageData;
5675
5676
  l.aligned.pageData = e, l.aligned.storageNamespace = n, B !== e && (B.scope !== e.scope ? l.aligned.pendingReader = e : tn(l, e)), Nn(n, e.scope);
5676
5677
  }
5677
- const E = mm(Ze(n).treeSettings, e.scope, t.defaultTreeSettings);
5678
+ const E = hm(Ze(n).treeSettings, e.scope, t.defaultTreeSettings);
5678
5679
  K(() => {
5679
5680
  const B = l.aligned.pendingReader;
5680
- B !== null && (l.aligned.pendingReader = null, Tr(l), tn(l, B));
5681
+ B !== null && (l.aligned.pendingReader = null, Cr(l), tn(l, B));
5681
5682
  }, [e, l]), K(() => {
5682
5683
  let B = !1;
5683
- return H.current = (ee) => {
5684
- ee === e.scope || B || (B = !0, ee !== null && (Tr(l), ti(n)), N());
5684
+ return H.current = (te) => {
5685
+ te === e.scope || B || (B = !0, Cr(l), ni(n), N());
5685
5686
  }, () => {
5686
5687
  H.current = () => {
5687
5688
  };
@@ -5692,45 +5693,45 @@ const Qf = () => {
5692
5693
  x.current = t.settingsCookie;
5693
5694
  }, [t.settingsCookie]);
5694
5695
  const [O] = V(
5695
- () => Gf(e.settings, (B) => {
5696
- const ee = Y.current.persistSettings;
5697
- if (ee !== void 0) {
5698
- ee(Sa(B));
5696
+ () => Wf(e.settings, (B) => {
5697
+ const te = Y.current.persistSettings;
5698
+ if (te !== void 0) {
5699
+ te(xa(B));
5699
5700
  return;
5700
5701
  }
5701
- document.cookie = xa(x.current, B, window.location.protocol === "https:");
5702
+ document.cookie = Ta(x.current, B, window.location.protocol === "https:");
5702
5703
  })
5703
- ), F = Xe(e.scope, hm), y = Xe(e.scope, _f), S = Xe(e.scope, qi), L = Xe(e.scope, Ci), A = z(U);
5704
+ ), F = Xe(e.scope, pm), y = Xe(e.scope, qf), S = Xe(e.scope, Bi), L = Xe(e.scope, Ri), A = z(U);
5704
5705
  K(() => {
5705
5706
  A.current = U;
5706
5707
  }, [U]);
5707
5708
  const q = Xe(
5708
5709
  e.scope,
5709
- () => rs({
5710
+ () => os({
5710
5711
  data: l.data,
5711
5712
  conflictLabels: () => ({ ours: A.current.conflictOurs, theirs: A.current.conflictTheirs }),
5712
- onSaveSettled: (B, ee) => {
5713
- ee.kind === "saved" && l.documents.refresh(B);
5714
- const le = Wi(A.current, ee, Rr(l.documents, B));
5713
+ onSaveSettled: (B, te) => {
5714
+ te.kind === "saved" && l.documents.refresh(B);
5715
+ const le = Ki(A.current, te, Mr(l.documents, B));
5715
5716
  le !== null && F.announce(le);
5716
5717
  },
5717
5718
  sideBySideSetting: {
5718
- read: () => rn(Ze(n).editPreview) === Cr,
5719
- write: (B) => nn(Ze(n).editPreview, B ? Cr : pm)
5719
+ read: () => rn(Ze(n).editPreview) === Rr,
5720
+ write: (B) => nn(Ze(n).editPreview, B ? Rr : wm)
5720
5721
  },
5721
5722
  editorShareSetting: {
5722
- read: () => ns(rn(Ze(n).editSplit)),
5723
+ read: () => rs(rn(Ze(n).editSplit)),
5723
5724
  write: (B) => nn(Ze(n).editSplit, String(B))
5724
5725
  }
5725
5726
  })
5726
- ), te = Q(() => nt(e.notices.catch(() => [])), [e.notices]), re = e.sources.map((B) => B.id).join(`
5727
- `), X = Q(() => Ea(t, re.split(`
5727
+ ), ee = Q(() => nt(e.notices.catch(() => [])), [e.notices]), re = e.sources.map((B) => B.id).join(`
5728
+ `), X = Q(() => Sa(t, re.split(`
5728
5729
  `)), [t, re]), de = z(w);
5729
5730
  K(() => {
5730
5731
  de.current = w;
5731
5732
  }, [w]);
5732
- const [Ce] = V(() => (B, ee) => {
5733
- de.current?.(B, ee);
5733
+ const [Ce] = V(() => (B, te) => {
5734
+ de.current?.(B, te);
5734
5735
  }), he = w === void 0 ? void 0 : Ce, Re = z(p);
5735
5736
  K(() => {
5736
5737
  Re.current = p;
@@ -5738,16 +5739,16 @@ const Qf = () => {
5738
5739
  const [_t] = V(() => {
5739
5740
  let B = !1;
5740
5741
  return {
5741
- convert: (ee, le) => {
5742
+ convert: (te, le) => {
5742
5743
  const De = Re.current;
5743
- return De === void 0 ? Promise.resolve(wm) : De.convert(ee, le);
5744
+ return De === void 0 ? Promise.resolve(gm) : De.convert(te, le);
5744
5745
  },
5745
5746
  prepare: () => {
5746
5747
  try {
5747
5748
  Re.current?.prepare?.();
5748
- } catch (ee) {
5749
+ } catch (te) {
5749
5750
  if (B) return;
5750
- B = !0, console.error("[markdown-explorer] the draft converter's prepare threw", ee);
5751
+ B = !0, console.error("[markdown-explorer] the draft converter's prepare threw", te);
5751
5752
  }
5752
5753
  }
5753
5754
  };
@@ -5755,22 +5756,22 @@ const Qf = () => {
5755
5756
  ne(() => {
5756
5757
  if (v === void 0) return;
5757
5758
  let B = !0;
5758
- const ee = v((le) => {
5759
- B && Ss(le, {
5759
+ const te = v((le) => {
5760
+ B && xs(le, {
5760
5761
  trees: l.trees,
5761
5762
  documents: l.documents,
5762
5763
  edits: q,
5763
5764
  documentChanges: L,
5764
5765
  announcer: F,
5765
5766
  labels: A.current,
5766
- nameOf: (De) => Rr(l.documents, De),
5767
+ nameOf: (De) => Mr(l.documents, De),
5767
5768
  policy: Y.current.hostChangePolicy
5768
5769
  });
5769
5770
  });
5770
- if (typeof ee != "function")
5771
- throw B = !1, new TypeError(`[markdown-explorer] subscribeHostChanges must return its unsubscribe function; got ${G(ee)}`);
5771
+ if (typeof te != "function")
5772
+ throw B = !1, new TypeError(`[markdown-explorer] subscribeHostChanges must return its unsubscribe function; got ${G(te)}`);
5772
5773
  return () => {
5773
- B = !1, ee();
5774
+ B = !1, te();
5774
5775
  };
5775
5776
  }, [v, l, q, L, F]);
5776
5777
  const ut = D !== void 0;
@@ -5783,7 +5784,7 @@ const Qf = () => {
5783
5784
  be.current = { edits: q, announcer: F, mediaFailures: S };
5784
5785
  }, [q, F, S]);
5785
5786
  const Ve = z(null);
5786
- ea(
5787
+ ta(
5787
5788
  k,
5788
5789
  () => ({
5789
5790
  flushUnsaved: () => {
@@ -5791,17 +5792,17 @@ const Qf = () => {
5791
5792
  return B.flushDrafts(), B.dirtyPaths();
5792
5793
  },
5793
5794
  confirmDiscard: async (B) => {
5794
- fi("confirmDiscard", B);
5795
- const { edits: ee } = be.current, le = ee.unsavedAmong([...new Set(B)]);
5796
- return le.length === 0 ? !0 : ee.askToDiscard(le);
5795
+ mi("confirmDiscard", B);
5796
+ const { edits: te } = be.current, le = te.unsavedAmong([...new Set(B)]);
5797
+ return le.length === 0 ? !0 : te.askToDiscard(le);
5797
5798
  },
5798
- restoreDrafts: async (B) => (hi(B), be.current.edits.restoreDrafts(B)),
5799
+ restoreDrafts: async (B) => (pi(B), be.current.edits.restoreDrafts(B)),
5799
5800
  announce: (B) => {
5800
- pi(B), be.current.announcer.announce(B);
5801
+ wi(B), be.current.announcer.announce(B);
5801
5802
  },
5802
5803
  owns: (B) => Ve.current?.contains(B) === !0,
5803
5804
  reportMediaFailure: (B) => {
5804
- wi(B), be.current.mediaFailures.report(B);
5805
+ gi(B), be.current.mediaFailures.report(B);
5805
5806
  }
5806
5807
  }),
5807
5808
  []
@@ -5815,7 +5816,7 @@ const Qf = () => {
5815
5816
  storageNamespace: n,
5816
5817
  scope: e.scope,
5817
5818
  sources: e.sources,
5818
- notices: te,
5819
+ notices: ee,
5819
5820
  documents: l.documents,
5820
5821
  trees: l.trees,
5821
5822
  data: l.data,
@@ -5826,7 +5827,7 @@ const Qf = () => {
5826
5827
  edits: q,
5827
5828
  mediaFailures: S,
5828
5829
  documentChanges: L,
5829
- onEditGrant: d,
5830
+ onEditGrant: u,
5830
5831
  draftConverter: je,
5831
5832
  renderTreeFailure: s,
5832
5833
  accessFailure: f,
@@ -5844,7 +5845,7 @@ const Qf = () => {
5844
5845
  n,
5845
5846
  e.scope,
5846
5847
  e.sources,
5847
- te,
5848
+ ee,
5848
5849
  l,
5849
5850
  O,
5850
5851
  E,
@@ -5853,7 +5854,7 @@ const Qf = () => {
5853
5854
  q,
5854
5855
  S,
5855
5856
  L,
5856
- d,
5857
+ u,
5857
5858
  je,
5858
5859
  s,
5859
5860
  f,
@@ -5864,35 +5865,35 @@ const Qf = () => {
5864
5865
  R
5865
5866
  ]
5866
5867
  );
5867
- return /* @__PURE__ */ u(qr, { value: mt, children: /* @__PURE__ */ u(ym, { renderFrame: i, lockDocumentScroll: h, rootRef: Ve, documentIdAnswer: e.documentId }, e.scope) });
5868
- }, vm = ({ ref: e, theme: t, view: n, children: r }) => {
5869
- const [o] = V(dc);
5870
- return /* @__PURE__ */ u("div", { ref: e, className: "aqmx-root", "data-aqmx-theme": t, "data-aqmx-view": n, "data-testid": "markdown-explorer", onKeyDownCapture: o.onKeyDownCapture, onKeyUpCapture: o.onKeyUpCapture, onBlurCapture: o.onBlurCapture, children: r });
5871
- }, ym = ({ renderFrame: e, lockDocumentScroll: t, rootRef: n, documentIdAnswer: r }) => {
5872
- const { theme: o, labels: a, mediaFailures: i } = $(), s = At(), f = Yf(s, r), { hash: h } = pn(), w = ze(), d = om(t), p = _(
5868
+ return /* @__PURE__ */ d(Br, { value: mt, children: /* @__PURE__ */ d(bm, { renderFrame: i, lockDocumentScroll: h, rootRef: Ve, documentIdAnswer: e.documentId }, e.scope) });
5869
+ }, ym = ({ ref: e, theme: t, view: n, children: r }) => {
5870
+ const [o] = V(uc);
5871
+ return /* @__PURE__ */ d("div", { ref: e, className: "aqmx-root", "data-aqmx-theme": t, "data-aqmx-view": n, "data-testid": "markdown-explorer", onKeyDownCapture: o.onKeyDownCapture, onKeyUpCapture: o.onKeyUpCapture, onBlurCapture: o.onBlurCapture, children: r });
5872
+ }, bm = ({ renderFrame: e, lockDocumentScroll: t, rootRef: n, documentIdAnswer: r }) => {
5873
+ const { theme: o, labels: a, mediaFailures: i } = $(), s = At(), f = Jf(s, r), { hash: h } = pn(), w = ze(), u = am(t), p = _(
5873
5874
  (k) => {
5874
5875
  if (n.current = k, k === null) return;
5875
- const M = i.observe(k), D = d(k);
5876
+ const M = i.observe(k), D = u(k);
5876
5877
  return () => {
5877
5878
  D?.(), M(), n.current = null;
5878
5879
  };
5879
5880
  },
5880
- [i, n, d]
5881
+ [i, n, u]
5881
5882
  );
5882
5883
  K(() => {
5883
5884
  s.kind === "redirect" && w(`${s.href}${h}`, "browse");
5884
5885
  }, [s, h, w]);
5885
5886
  const { location: m } = s, g = m.view;
5886
- sm(n, g);
5887
- const v = m.view === "tree" ? /* @__PURE__ */ u(tt, { fallback: /* @__PURE__ */ u("section", { className: "aqmx-split-fallback", "aria-label": a.explorerRegion, "aria-busy": "true", "data-testid": "markdown-explorer-split-loading", ...sn }), children: /* @__PURE__ */ u(lm, { location: m, opening: f }) }) : m.view === "multi" ? /* @__PURE__ */ u(tt, { fallback: /* @__PURE__ */ u("section", { className: "aqmx-stage-fallback", "aria-label": a.multiRegion, "aria-busy": "true", "data-testid": "markdown-explorer-stage-loading", ...sn }), children: /* @__PURE__ */ u(cm, { location: m }) }) : /* @__PURE__ */ u(Nf, { location: m }), b = /* @__PURE__ */ j(vm, { ref: p, theme: o, view: g, children: [
5887
+ lm(n, g);
5888
+ const v = m.view === "tree" ? /* @__PURE__ */ d(tt, { fallback: /* @__PURE__ */ d("section", { className: "aqmx-split-fallback", "aria-label": a.explorerRegion, "aria-busy": "true", "data-testid": "markdown-explorer-split-loading", ...sn }), children: /* @__PURE__ */ d(cm, { location: m, opening: f }) }) : m.view === "multi" ? /* @__PURE__ */ d(tt, { fallback: /* @__PURE__ */ d("section", { className: "aqmx-stage-fallback", "aria-label": a.multiRegion, "aria-busy": "true", "data-testid": "markdown-explorer-stage-loading", ...sn }), children: /* @__PURE__ */ d(dm, { location: m }) }) : /* @__PURE__ */ d(If, { location: m }), b = /* @__PURE__ */ j(ym, { ref: p, theme: o, view: g, children: [
5888
5889
  v,
5889
- /* @__PURE__ */ u(ks, {}),
5890
- /* @__PURE__ */ u(If, { holds: !0, deferWhileFullscreenIn: n, testId: "markdown-explorer-announcer" })
5890
+ /* @__PURE__ */ d(Es, {}),
5891
+ /* @__PURE__ */ d(Pf, { holds: !0, deferWhileFullscreenIn: n, testId: "markdown-explorer-announcer" })
5891
5892
  ] });
5892
5893
  return e === void 0 ? b : e({ view: g, children: b });
5893
- }, Vm = (e) => {
5894
- if (e instanceof ni || e instanceof ri) return $e("too-large");
5895
- if (!(e instanceof oi)) throw e;
5894
+ }, Zm = (e) => {
5895
+ if (e instanceof ri || e instanceof oi) return $e("too-large");
5896
+ if (!(e instanceof ai)) throw e;
5896
5897
  switch (e.code) {
5897
5898
  case "unavailable":
5898
5899
  return { kind: "unavailable" };
@@ -5903,93 +5904,93 @@ const Qf = () => {
5903
5904
  default:
5904
5905
  throw e;
5905
5906
  }
5906
- }, Zm = (e) => ({
5907
+ }, Gm = (e) => ({
5907
5908
  timeoutMs: e.conversion.deadlineMs,
5908
5909
  options: { deniedPathSegments: [...e.deny], maxHtmlBytes: e.conversion.maxHtmlBytes, includeSourceLines: !0 }
5909
- }), Gm = ai({ submissions: "skip", otherPath: "skip", query: "skip", hashChange: "skip" });
5910
+ }), Wm = ii({ submissions: "skip", otherPath: "skip", query: "skip", hashChange: "skip" });
5910
5911
  export {
5911
- to as $,
5912
+ no as $,
5912
5913
  Dt as A,
5913
- ys as B,
5914
- Ki as C,
5915
- Af as D,
5916
- Qu as E,
5917
- us as F,
5918
- tf as G,
5919
- lf as H,
5920
- _m as I,
5921
- zm as J,
5914
+ bs as B,
5915
+ Xi as C,
5916
+ Df as D,
5917
+ ef as E,
5918
+ fs as F,
5919
+ nf as G,
5920
+ cf as H,
5921
+ qm as I,
5922
+ jm as J,
5922
5923
  un as K,
5923
- $m as L,
5924
- Hr as M,
5925
- Um as N,
5926
- of as O,
5927
- Lf as P,
5928
- rf as Q,
5929
- gr as R,
5930
- nf as S,
5931
- Hm as T,
5924
+ _m as L,
5925
+ zr as M,
5926
+ Hm as N,
5927
+ af as O,
5928
+ Af as P,
5929
+ of as Q,
5930
+ vr as R,
5931
+ rf as S,
5932
+ zm as T,
5932
5933
  it as U,
5933
- qm as V,
5934
- fc as W,
5935
- os as X,
5936
- Xr as Y,
5937
- Xs as Z,
5938
- Qr as _,
5939
- Xi as a,
5940
- zl as a0,
5941
- jl as a1,
5934
+ Bm as V,
5935
+ mc as W,
5936
+ as as X,
5937
+ Yr as Y,
5938
+ Ys as Z,
5939
+ eo as _,
5940
+ Yi as a,
5941
+ jl as a0,
5942
+ Vl as a1,
5942
5943
  cn as a2,
5943
- Ql as a3,
5944
- Zs as a4,
5945
- Nu as a5,
5946
- Gs as a6,
5947
- Js as a7,
5948
- Ys as a8,
5949
- Wu as a9,
5950
- $u as aa,
5951
- Fm as ab,
5944
+ ec as a3,
5945
+ Gs as a4,
5946
+ Iu as a5,
5947
+ Ws as a6,
5948
+ Qs as a7,
5949
+ Js as a8,
5950
+ Ku as a9,
5951
+ _u as aa,
5952
+ $m as ab,
5952
5953
  At as ac,
5953
- Bm as ad,
5954
- ji as ae,
5955
- If as af,
5954
+ Um as ad,
5955
+ Vi as ae,
5956
+ Pf as af,
5956
5957
  Be as ag,
5957
- Pm as ah,
5958
- zi as ai,
5959
- yf as aj,
5960
- gi as ak,
5961
- ii as al,
5958
+ Fm as ah,
5959
+ ji as ai,
5960
+ bf as aj,
5961
+ vi as ak,
5962
+ si as al,
5962
5963
  $n as am,
5963
- ki as an,
5964
- $r as ao,
5965
- vi as ap,
5964
+ Ei as an,
5965
+ _r as ao,
5966
+ yi as ap,
5966
5967
  Pn as aq,
5967
- jm as ar,
5968
- Vm as as,
5969
- Zm as at,
5968
+ Vm as ar,
5969
+ Zm as as,
5970
+ Gm as at,
5970
5971
  Fn as au,
5971
- Gm as av,
5972
- Yi as b,
5973
- io as c,
5974
- eo as d,
5975
- nl as e,
5972
+ Wm as av,
5973
+ Ji as b,
5974
+ so as c,
5975
+ to as d,
5976
+ rl as e,
5976
5977
  ze as f,
5977
- mu as g,
5978
- Vc as h,
5978
+ hu as g,
5979
+ Zc as h,
5979
5980
  sn as i,
5980
- Au as j,
5981
- qs as k,
5982
- Ji as l,
5983
- zs as m,
5984
- js as n,
5985
- _s as o,
5981
+ Du as j,
5982
+ Bs as k,
5983
+ Qi as l,
5984
+ js as m,
5985
+ Vs as n,
5986
+ qs as o,
5986
5987
  Te as p,
5987
- Fs as q,
5988
- hs as r,
5989
- Jr as s,
5990
- $s as t,
5988
+ $s as q,
5989
+ ps as r,
5990
+ Qr as s,
5991
+ _s as t,
5991
5992
  $ as u,
5992
- Bs as v,
5993
+ Us as v,
5993
5994
  me as w,
5994
5995
  we as x,
5995
5996
  Ue as y,