@aiquants/markdown-explorer 0.30.0 → 0.32.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 (36) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +12 -8
  3. package/dist/{EditSurface-Cw0kbedj.cjs → EditSurface-BPqqykro.cjs} +3 -3
  4. package/dist/{EditSurface-DY1VNM9L.js → EditSurface-BmbDSrrw.js} +187 -187
  5. package/dist/{ExplorerSplit-x9Qkldh6.cjs → ExplorerSplit-CQxr6b0v.cjs} +1 -1
  6. package/dist/{ExplorerSplit-D3f1FiZ7.js → ExplorerSplit-DPuXOBqs.js} +4 -4
  7. package/dist/{MultiLayout-B0dfZlpx.js → MultiLayout-DKgZ1sBK.js} +238 -232
  8. package/dist/MultiLayout-TXbet9k3.cjs +1 -0
  9. package/dist/{NativeScrollBar-C4vkvdGz.js → NativeScrollBar-C1CtjwBm.js} +2 -2
  10. package/dist/{NativeScrollBar-C2UoYO3i.cjs → NativeScrollBar-UpjxjLlB.cjs} +1 -1
  11. package/dist/{TreeLayout-Bak1y1m4.js → TreeLayout-BpazybVQ.js} +3 -3
  12. package/dist/{TreeLayout-DsFH17x_.cjs → TreeLayout-C0O1OGi4.cjs} +1 -1
  13. package/dist/core/config.d.cts +2 -0
  14. package/dist/core/config.d.ts +2 -0
  15. package/dist/core/labels.d.cts +7 -0
  16. package/dist/core/labels.d.ts +7 -0
  17. package/dist/{index-auQVKY4M.js → index-CcXMPCRS.js} +919 -903
  18. package/dist/{index-DgaTEKsI.cjs → index-DSkK8iLE.cjs} +6 -6
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.js +6 -6
  21. package/dist/location-BxiJRTyw.cjs +1 -0
  22. package/dist/{location-CKuabtKl.js → location-perTmwct.js} +253 -245
  23. package/dist/{merge-D1jbIOPw.js → merge-3xGYZqbE.js} +1 -1
  24. package/dist/{merge-BEa-lale.cjs → merge-DZI4pkWI.cjs} +1 -1
  25. package/dist/server.cjs +1 -1
  26. package/dist/server.js +2 -2
  27. package/dist/{tapScrollCircle-BSb6lisN.cjs → tapScrollCircle-Cbf17x8g.cjs} +1 -1
  28. package/dist/{tapScrollCircle-DYQ8P2ag.js → tapScrollCircle-DacgW2F_.js} +1 -1
  29. package/dist/{useSplitPersistence-Bf4M35Il.js → useSplitPersistence-Du01PHNg.js} +1 -1
  30. package/dist/{useSplitPersistence-9Nu6J1WF.cjs → useSplitPersistence-pPmE4GTT.cjs} +1 -1
  31. package/docs/behavior/layout.md +19 -9
  32. package/docs/behavior/localization.md +4 -4
  33. package/docs/behavior/url-contract.md +1 -1
  34. package/package.json +12 -12
  35. package/dist/MultiLayout-BXr2UAvl.cjs +0 -1
  36. package/dist/location-l_HysaZR.cjs +0 -1
@@ -1,26 +1,27 @@
1
1
  import { jsxs as B, jsx as d, Fragment as pe } from "react/jsx-runtime";
2
- import * as E from "react";
2
+ import * as k from "react";
3
3
  import { createContext as ve, use as se, useMemo as X, useSyncExternalStore as re, useRef as U, useLayoutEffect as Y, useCallback as F, useId as Te, useEffect as ee, Component as nr, Suspense as Ie, lazy as Ft, useState as V, useEffectEvent as le } from "react";
4
- import { useParams as ko, useSearchParams as Eo, matchPath as So, useBlocker as xo, useNavigate as To, Link as Ro, useHref as ot, useLocation as rr, useRevalidator as Co } from "react-router";
5
- import { k as Oo, h as or, H as Lo, E as sr, a as ar, I as Mo, J as on, K as Ao, s as No, L as Do, M as Me, e as Ne, m as Po, O as Io, Q as $o, R as _o, T as sn, U as Fo, V as an, W as qo, w as Bo, X as Uo } from "./location-CKuabtKl.js";
4
+ import { useParams as ko, useSearchParams as So, matchPath as xo, useBlocker as To, useNavigate as Ro, Link as Co, useHref as ot, useLocation as rr, useRevalidator as Oo } from "react-router";
5
+ import { k as Lo, h as or, H as Mo, E as sr, a as ar, I as Ao, J as on, K as No, s as Do, L as Po, M as Me, e as Ne, m as Io, O as $o, Q as _o, R as Fo, T as sn, U as qo, V as an, W as Bo, w as Uo, X as Ho } from "./location-perTmwct.js";
6
6
  import { SPREADSHEET_BLOCK_LABEL_PLACEHOLDERS as ln, SPREADSHEET_BLOCK_LABEL_CATALOGS as Je } from "@aiquants/markdown/code-blocks";
7
- import { H as fe, i as Ho, I as st, J as zo, A as te, K as ft, B as mt, z as jo, L as Vo, f as Zo, N as Wo, O as Go, P as Ko, Q as Yo, R as cn, x as Xo, S as Jo, T as Qo, U as es, D as ts, y as ns, V as rs, W as os, X as ss, w as dn } from "./dataRoute-DLhQfdoW.js";
8
- import { HostedScrollArea as un, SpreadsheetBlock as as, useMarkdownToolbarState as is, MarkdownViewer as ir } from "@aiquants/markdown";
9
- import { SOURCE_LINES_ATTRIBUTE as lr, parseSourceLines as ls } from "@aiquants/markdown/source-lines";
10
- import { iterateTsvRows as cs, iterateTsvPrefixRows as ds, serializeTsv as us } from "@aiquants/spreadsheet/tsv";
7
+ import { H as fe, i as zo, I as st, J as jo, A as te, K as ft, B as mt, z as Vo, L as Zo, f as Wo, N as Go, O as Ko, P as Yo, Q as Xo, R as cn, x as Jo, S as Qo, T as es, U as ts, D as ns, y as rs, V as os, W as ss, X as as, w as dn } from "./dataRoute-DLhQfdoW.js";
8
+ import { HostedScrollArea as un, SpreadsheetBlock as is, useMarkdownToolbarState as ls, MarkdownViewer as ir } from "@aiquants/markdown";
9
+ import { SOURCE_LINES_ATTRIBUTE as lr, parseSourceLines as cs } from "@aiquants/markdown/source-lines";
10
+ import { iterateTsvRows as ds, iterateTsvPrefixRows as us, serializeTsv as fs } from "@aiquants/spreadsheet/tsv";
11
11
  import { SPREADSHEET_MAX_OPERATION_CELLS as fn } from "@aiquants/spreadsheet/view";
12
- import { DEFAULT_CONTENT_ALIGN as fs } from "@aiquants/markdown/viewer-settings";
13
- import { w as Lt, r as Mt, a as ms, b as mn, s as Oe, c as hs } from "./storage-CmGHg7OA.js";
14
- import { createShouldRevalidate as ps } from "@aiquants/route-revalidation";
15
- const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadsheet${e.charAt(0).toUpperCase()}${e.slice(1)}`, cr = Object.freeze(Object.keys(Je.en)), dr = (e) => Object.fromEntries(cr.map((t) => [qt(t), Je[e][t].text])), ws = Object.freeze({
12
+ import { DEFAULT_CONTENT_ALIGN as ms } from "@aiquants/markdown/viewer-settings";
13
+ import { w as Lt, r as Mt, a as hs, b as mn, s as Oe, c as ps } from "./storage-CmGHg7OA.js";
14
+ import { createShouldRevalidate as gs } from "@aiquants/route-revalidation";
15
+ const hn = Object.freeze(["en", "ja"]), ws = "en", qt = (e) => `viewerSpreadsheet${e.charAt(0).toUpperCase()}${e.slice(1)}`, cr = Object.freeze(Object.keys(Je.en)), dr = (e) => Object.fromEntries(cr.map((t) => [qt(t), Je[e][t].text])), vs = Object.freeze({
16
16
  panelMoved: Object.freeze(["title", "column", "position"]),
17
17
  panelMoveUnavailable: Object.freeze(["title", "move"]),
18
18
  panelDragStarted: Object.freeze(["title"]),
19
19
  panelDragCancelled: Object.freeze(["title"]),
20
20
  multiColumnRegion: Object.freeze(["column"]),
21
21
  viewerSvgImageSourceRegion: Object.freeze(["name"]),
22
+ viewerSvgImageFullscreenDialog: Object.freeze(["name"]),
22
23
  ...Object.fromEntries(cr.filter((e) => ln[e].length > 0).map((e) => [qt(e), ln[e]]))
23
- }), vs = /\{(\w+)\}/gu, ur = {
24
+ }), bs = /\{(\w+)\}/gu, ur = {
24
25
  ...dr("en"),
25
26
  explorerRegion: "Explorer",
26
27
  sourceLabel: "Source",
@@ -265,6 +266,9 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
265
266
  viewerMermaidPanDown: "Pan Down",
266
267
  viewerMermaidPanLeft: "Pan Left",
267
268
  viewerMermaidPanRight: "Pan Right",
269
+ viewerMermaidFullscreen: "View full screen",
270
+ viewerMermaidExitFullscreen: "Exit full screen",
271
+ viewerMermaidFullscreenDialog: "Diagram (full screen)",
268
272
  viewerMermaidDiagram: "Diagram (arrow keys pan, + and - zoom, 0 resets)",
269
273
  viewerMermaidRetry: "Try again",
270
274
  viewerEmbeddedVideo: "embedded video",
@@ -284,6 +288,9 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
284
288
  viewerSvgImageCopyImage: "Copy the image",
285
289
  viewerSvgImageCopiedImage: "Copied the image.",
286
290
  viewerSvgImageCopyImageFailed: "Could not copy the image.",
291
+ viewerSvgImageFullscreen: "View full screen",
292
+ viewerSvgImageExitFullscreen: "Exit full screen",
293
+ viewerSvgImageFullscreenDialog: "{name} (full screen)",
287
294
  multiRegion: "Panels",
288
295
  multiEmpty: "Select documents in the explorer to open them side by side.",
289
296
  panelLimit: (e) => `You can open up to ${String(e)} panels at once.`,
@@ -306,6 +313,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
306
313
  panelMoveNextColumn: "Move to the next column",
307
314
  panelMoveUp: "Move up",
308
315
  panelMoveDown: "Move down",
316
+ panelMoreActions: "More actions",
309
317
  panelMoved: "Moved {title} to column {column}, position {position}",
310
318
  panelMoveUnavailable: "{move} is not available for {title}",
311
319
  panelDragStarted: "Picked up {title}",
@@ -316,7 +324,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
316
324
  multiColumnEmpty: "This column is empty",
317
325
  multiColumnRegion: "Column {column}",
318
326
  panelDropHere: "Drop the panel here"
319
- }, bs = {
327
+ }, Es = {
320
328
  ...dr("ja"),
321
329
  explorerRegion: "エクスプローラー",
322
330
  sourceLabel: "ソース",
@@ -561,6 +569,9 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
561
569
  viewerMermaidPanDown: "下へ移動",
562
570
  viewerMermaidPanLeft: "左へ移動",
563
571
  viewerMermaidPanRight: "右へ移動",
572
+ viewerMermaidFullscreen: "全画面で見る",
573
+ viewerMermaidExitFullscreen: "全画面を閉じる",
574
+ viewerMermaidFullscreenDialog: "図 (全画面)",
564
575
  viewerMermaidDiagram: "図 (矢印キーで移動、+ と - で拡大縮小、0 で元に戻す)",
565
576
  viewerMermaidRetry: "再試行",
566
577
  viewerEmbeddedVideo: "埋め込みの動画",
@@ -580,6 +591,9 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
580
591
  viewerSvgImageCopyImage: "画像をコピー",
581
592
  viewerSvgImageCopiedImage: "画像をコピーしました。",
582
593
  viewerSvgImageCopyImageFailed: "画像をコピーできませんでした。",
594
+ viewerSvgImageFullscreen: "全画面で見る",
595
+ viewerSvgImageExitFullscreen: "全画面を閉じる",
596
+ viewerSvgImageFullscreenDialog: "{name} (全画面)",
583
597
  multiRegion: "パネル",
584
598
  multiEmpty: "エクスプローラーで文書を選ぶと、ここに並べて開きます。",
585
599
  panelLimit: (e) => `同時に開けるのは ${String(e)} パネルまでです。`,
@@ -602,6 +616,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
602
616
  panelMoveNextColumn: "次の列へ移動",
603
617
  panelMoveUp: "上へ移動",
604
618
  panelMoveDown: "下へ移動",
619
+ panelMoreActions: "その他の操作",
605
620
  panelMoved: "{title} を {column} 列目の {position} 番目へ移動しました",
606
621
  panelMoveUnavailable: "{title} は「{move}」できません",
607
622
  panelDragStarted: "{title} を持ち上げました",
@@ -614,9 +629,9 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
614
629
  panelDropHere: "ここへパネルをドロップ"
615
630
  }, ys = Object.freeze({
616
631
  en: Object.freeze(ur),
617
- ja: Object.freeze(bs)
618
- }), fr = Object.freeze(Object.keys(ur)), ks = new Set(fr), Es = (e) => ks.has(e), Ge = (e) => e === null ? "null" : typeof e == "string" ? JSON.stringify(e.length > 40 ? `${e.slice(0, 40)}…` : e) : typeof e == "function" ? "a function" : Array.isArray(e) ? "an array" : typeof e, mr = (e) => {
619
- if (e === void 0) return gs;
632
+ ja: Object.freeze(Es)
633
+ }), fr = Object.freeze(Object.keys(ur)), ks = new Set(fr), Ss = (e) => ks.has(e), Ge = (e) => e === null ? "null" : typeof e == "string" ? JSON.stringify(e.length > 40 ? `${e.slice(0, 40)}…` : e) : typeof e == "function" ? "a function" : Array.isArray(e) ? "an array" : typeof e, mr = (e) => {
634
+ if (e === void 0) return ws;
620
635
  if (hn.includes(e)) return e;
621
636
  throw new RangeError(`[markdown-explorer] locale is the UI language (${hn.map((t) => JSON.stringify(t)).join(" or ")}), not a BCP 47 tag; got ${Ge(e)}`);
622
637
  }, pn = (e, t) => {
@@ -624,11 +639,11 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
624
639
  if (t === void 0) return n;
625
640
  if (t === null || typeof t != "object")
626
641
  throw new RangeError(`[markdown-explorer] labels must be an object; got ${Ge(t)}`);
627
- if (!Oo(t))
642
+ if (!Lo(t))
628
643
  throw new RangeError(`[markdown-explorer] labels must be a plain object; got ${Ge(t)}`);
629
644
  const r = t, o = { ...n };
630
645
  for (const s of Object.keys(r)) {
631
- if (!Es(s))
646
+ if (!Ss(s))
632
647
  throw new RangeError(`[markdown-explorer] labels.${s} is not a known label key; expected one of ${fr.join(", ")}`);
633
648
  const a = r[s];
634
649
  if (a === void 0) continue;
@@ -637,21 +652,21 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
637
652
  throw new TypeError(`[markdown-explorer] labels.${s} must be a ${i}; got ${Ge(a)}`);
638
653
  if (typeof a == "string" && a.trim() === "")
639
654
  throw new RangeError(`[markdown-explorer] labels.${s} must be a non-blank string`);
640
- const f = ws[s];
655
+ const f = vs[s];
641
656
  if (typeof a == "string" && f !== void 0) {
642
- for (const [, u] of a.matchAll(vs))
657
+ for (const [, u] of a.matchAll(bs))
643
658
  if (!f.includes(u ?? ""))
644
659
  throw new RangeError(`[markdown-explorer] labels.${s} uses the unknown placeholder {${String(u)}}; it accepts ${f.map((l) => `{${l}}`).join(", ")}`);
645
660
  }
646
661
  o[s] = a;
647
662
  }
648
663
  return Object.freeze(o);
649
- }, Ss = (e, t) => {
664
+ }, xs = (e, t) => {
650
665
  if (Object.is(e, t)) return !0;
651
666
  if (e === null || t === null || typeof e != "object" || typeof t != "object") return !1;
652
667
  const n = e, r = t, o = Object.keys(n), s = Object.keys(r);
653
668
  return o.length === s.length && s.every((a) => Object.hasOwn(n, a) && Object.is(n[a], r[a]));
654
- }, gn = Object.freeze(["light", "dark"]), xs = (e) => {
669
+ }, gn = Object.freeze(["light", "dark"]), Ts = (e) => {
655
670
  if (e === void 0) return "light";
656
671
  if (gn.includes(e)) return e;
657
672
  throw new RangeError(`[markdown-explorer] theme must be ${gn.map((t) => JSON.stringify(t)).join(" or ")}; got ${typeof e == "string" ? JSON.stringify(e) : typeof e}`);
@@ -663,7 +678,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
663
678
  const { viewSettings: t } = $(), n = () => e(t.getSnapshot());
664
679
  return re(t.subscribe, n, n);
665
680
  }, Bt = () => {
666
- const { config: e } = $(), t = ko()["*"], [n] = Eo(), r = n.toString();
681
+ const { config: e } = $(), t = ko()["*"], [n] = So(), r = n.toString();
667
682
  return X(() => or(e, t, new URLSearchParams(r)), [e, t, r]);
668
683
  }, pr = {
669
684
  unauthorized: ["failureUnauthorizedTitle", "failureUnauthorizedBody"],
@@ -681,7 +696,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
681
696
  /* @__PURE__ */ d("p", { className: "aqmx-callout-body", children: a }),
682
697
  e.reason === "unauthorized" ? /* @__PURE__ */ d("button", { type: "button", className: "aqmx-callout-action", onClick: () => window.location.reload(), children: o.reloadPage }) : n !== void 0 && e.reason === "failed" ? /* @__PURE__ */ d("button", { type: "button", className: "aqmx-callout-action", onClick: n, children: o.retry }) : null
683
698
  ] });
684
- }, Ts = (e, t) => {
699
+ }, Rs = (e, t) => {
685
700
  const { phase: n, save: r, dirty: o } = t;
686
701
  switch (n.kind) {
687
702
  case "opening":
@@ -707,7 +722,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
707
722
  break;
708
723
  }
709
724
  return o ? e.draftUnsaved : "";
710
- }, Rs = (e, t, n) => {
725
+ }, Cs = (e, t, n) => {
711
726
  switch (t.kind) {
712
727
  case "draft":
713
728
  return e.draftNotSaved;
@@ -733,38 +748,38 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
733
748
  for (const t of [...e]) t();
734
749
  }
735
750
  };
736
- }, Cs = "<<<<<<<", Os = "=======", Ls = ">>>>>>>", wn = (e, t) => e === t || e.startsWith(`${t} `), vn = (e) => Ms(e.split(`
737
- `)), Ms = (e) => {
751
+ }, Os = "<<<<<<<", Ls = "=======", Ms = ">>>>>>>", wn = (e, t) => e === t || e.startsWith(`${t} `), vn = (e) => As(e.split(`
752
+ `)), As = (e) => {
738
753
  const t = [];
739
754
  let n = null, r = null, o = 0;
740
755
  for (const s of e) {
741
756
  o += 1;
742
757
  const a = s.charCodeAt(0);
743
- a !== 60 && a !== 61 && a !== 62 || (wn(s, Cs) ? (n = o, r = null) : s === Os ? n !== null && r === null ? r = o : n = null : wn(s, Ls) && (n !== null && r !== null && t.push({ start: n, separator: r, end: o }), n = null, r = null));
758
+ a !== 60 && a !== 61 && a !== 62 || (wn(s, Os) ? (n = o, r = null) : s === Ls ? n !== null && r === null ? r = o : n = null : wn(s, Ms) && (n !== null && r !== null && t.push({ start: n, separator: r, end: o }), n = null, r = null));
744
759
  }
745
760
  return t;
746
761
  }, bn = (e) => e.includes(`\r
747
762
  `) ? `\r
748
763
  ` : `
749
764
  `, ht = (e) => e.replace(/\r\n?/gu, `
750
- `), As = (e, t) => t === `
765
+ `), Ns = (e, t) => t === `
751
766
  ` ? e : e.replaceAll(`
752
767
  `, `\r
753
- `), Ns = 3, Ds = /^\d+(?:\.\d+)?$/u, Ps = (e) => {
754
- if (e === null || !Ds.test(e)) return null;
768
+ `), Ds = 3, Ps = /^\d+(?:\.\d+)?$/u, Is = (e) => {
769
+ if (e === null || !Ps.test(e)) return null;
755
770
  const t = Number(e);
756
771
  return t >= ar && t <= sr ? t : null;
757
- }, pt = Object.freeze({ kind: "idle" }), yn = Object.freeze({ kind: "draft" }), Is = ({ data: e, conflictLabels: t, onSaveSettled: n, sideBySideSetting: r, editorShareSetting: o }) => {
772
+ }, pt = Object.freeze({ kind: "idle" }), En = Object.freeze({ kind: "draft" }), $s = ({ data: e, conflictLabels: t, onSaveSettled: n, sideBySideSetting: r, editorShareSetting: o }) => {
758
773
  const s = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), l = qe();
759
774
  let c = null, m = null, g = null;
760
775
  const v = (h, p) => {
761
776
  h.value = { ...h.value, ...p }, l.emit();
762
- }, y = (h, p) => s.get(h) === p, T = async (h, p) => {
777
+ }, E = (h, p) => s.get(h) === p, T = async (h, p) => {
763
778
  p.controller.abort(), p.controller = new AbortController();
764
779
  const { signal: x } = p.controller;
765
780
  v(p, { phase: { kind: "opening" } });
766
781
  const A = await e.edit(h, x);
767
- if (!y(h, p) || x.aborted || !("kind" in A)) return;
782
+ if (!E(h, p) || x.aborted || !("kind" in A)) return;
768
783
  if (A.kind === "grant") {
769
784
  v(p, { phase: { kind: "grant", href: A.href } });
770
785
  return;
@@ -774,7 +789,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
774
789
  return;
775
790
  }
776
791
  const I = ht(A.text), _ = A.kind === "draft";
777
- p.base = { text: I, version: _ ? null : A.version }, p.draft = I, p.ending = bn(A.text), v(p, { phase: { kind: "editing" }, history: _ ? !1 : A.history, dirty: !1, save: _ ? yn : pt, generation: p.value.generation + 1 });
792
+ p.base = { text: I, version: _ ? null : A.version }, p.draft = I, p.ending = bn(A.text), v(p, { phase: { kind: "editing" }, history: _ ? !1 : A.history, dirty: !1, save: _ ? En : pt, generation: p.value.generation + 1 });
778
793
  }, O = (h) => {
779
794
  const p = s.get(h);
780
795
  p !== void 0 && (p.controller.abort(), s.delete(h), i.delete(h));
@@ -788,7 +803,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
788
803
  if (p === void 0 || p.value.phase.kind !== "editing" || p.base === null || p.value.save.kind === "saving") return;
789
804
  const { version: x } = p.base;
790
805
  if (x === null) {
791
- n(h, yn);
806
+ n(h, En);
792
807
  return;
793
808
  }
794
809
  const A = vn(p.draft).length;
@@ -800,9 +815,9 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
800
815
  const { signal: I } = p.controller;
801
816
  let _ = { text: p.base.text, version: x }, b = p.draft, S = !1;
802
817
  v(p, { save: { kind: "saving" } });
803
- for (let L = 0; L < Ns; L += 1) {
804
- const M = await e.save(h, _.version, As(b, p.ending), I);
805
- if (!y(h, p) || I.aborted || !("kind" in M)) return;
818
+ for (let L = 0; L < Ds; L += 1) {
819
+ const M = await e.save(h, _.version, Ns(b, p.ending), I);
820
+ if (!E(h, p) || I.aborted || !("kind" in M)) return;
806
821
  if (M.kind === "saved") {
807
822
  f.get(h)?.flush(), p.base = { text: b, version: M.version }, q(h, p, { kind: "saved", merged: S }, { dirty: p.draft !== b });
808
823
  return;
@@ -815,8 +830,8 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
815
830
  q(h, p, { kind: "failed", failure: M.failure });
816
831
  return;
817
832
  }
818
- const { mergeDraft: P } = await import("./merge-D1jbIOPw.js");
819
- if (!y(h, p) || I.aborted) return;
833
+ const { mergeDraft: P } = await import("./merge-3xGYZqbE.js");
834
+ if (!E(h, p) || I.aborted) return;
820
835
  const H = f.get(h);
821
836
  H?.flush();
822
837
  const K = ht(M.text), w = P(_.text, p.draft, K, t());
@@ -940,7 +955,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
940
955
  setSideBySide: (h) => {
941
956
  c !== h && (c = h, r.write(h), l.emit());
942
957
  },
943
- editorShare: () => (m ??= o.read() ?? Lo, m),
958
+ editorShare: () => (m ??= o.read() ?? Mo, m),
944
959
  setEditorShare: (h) => {
945
960
  if (!Number.isFinite(h)) throw new RangeError(`[markdown-explorer] an editor share must be a finite number; got ${String(h)}`);
946
961
  const p = Math.min(sr, Math.max(ar, h));
@@ -957,16 +972,16 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
957
972
  };
958
973
  }, gr = (e) => {
959
974
  e.preventDefault(), e.stopPropagation();
960
- }, $s = (e) => e.endsWith("px") ? Number.parseFloat(e) : Number.NaN, wr = "data-aqmx-content-pane", At = Object.freeze({ [wr]: "" }), _s = "--aqmx-dialog-left", Fs = "--aqmx-dialog-top", qs = '[data-testid="markdown-explorer"]', Bs = (e) => {
961
- const t = e.closest(qs)?.querySelectorAll(`[${wr}]`), n = t?.item(t.length - 1);
975
+ }, _s = (e) => e.endsWith("px") ? Number.parseFloat(e) : Number.NaN, wr = "data-aqmx-content-pane", At = Object.freeze({ [wr]: "" }), Fs = "--aqmx-dialog-left", qs = "--aqmx-dialog-top", Bs = '[data-testid="markdown-explorer"]', Us = (e) => {
976
+ const t = e.closest(Bs)?.querySelectorAll(`[${wr}]`), n = t?.item(t.length - 1);
962
977
  if (!(n instanceof HTMLElement)) throw new Error("[markdown-explorer] a dialog opened where the explorer marks no content pane");
963
978
  return n;
964
- }, Us = (e) => {
965
- const t = $s(getComputedStyle(e).marginTop);
979
+ }, Hs = (e) => {
980
+ const t = _s(getComputedStyle(e).marginTop);
966
981
  if (Number.isNaN(t)) return null;
967
- const n = Bs(e), r = e.getBoundingClientRect(), o = e.ownerDocument.documentElement, { left: s, top: a } = Mo(n.getBoundingClientRect(), { width: r.width + 2 * t, height: r.height + 2 * t }, { width: o.clientWidth, height: o.clientHeight });
968
- return e.style.setProperty(_s, `${String(s)}px`), e.style.setProperty(Fs, `${String(a)}px`), n;
969
- }, Hs = (e) => e.preventDefault(), vr = ({ open: e, onOpen: t, onDismiss: n }) => {
982
+ const n = Us(e), r = e.getBoundingClientRect(), o = e.ownerDocument.documentElement, { left: s, top: a } = Ao(n.getBoundingClientRect(), { width: r.width + 2 * t, height: r.height + 2 * t }, { width: o.clientWidth, height: o.clientHeight });
983
+ return e.style.setProperty(Fs, `${String(s)}px`), e.style.setProperty(qs, `${String(a)}px`), n;
984
+ }, zs = (e) => e.preventDefault(), vr = ({ open: e, onOpen: t, onDismiss: n }) => {
970
985
  const r = U(null), o = U(null), s = U(!1), a = U(t);
971
986
  Y(() => {
972
987
  a.current = t;
@@ -984,8 +999,8 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
984
999
  const c = new ResizeObserver(() => g());
985
1000
  let m = null;
986
1001
  const g = () => {
987
- const y = Us(l);
988
- y === null || y === m || (m !== null && c.unobserve(m), c.observe(y), m = y);
1002
+ const E = Hs(l);
1003
+ E === null || E === m || (m !== null && c.unobserve(m), c.observe(E), m = E);
989
1004
  };
990
1005
  g(), c.observe(l);
991
1006
  const v = l.ownerDocument.defaultView;
@@ -1006,7 +1021,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
1006
1021
  ), u = F(() => {
1007
1022
  s.current && n();
1008
1023
  }, [n]);
1009
- return { ref: r, onKeyDown: i, onClick: f, onCancel: Hs, onClose: u };
1024
+ return { ref: r, onKeyDown: i, onClick: f, onCancel: zs, onClose: u };
1010
1025
  }, br = ({ open: e, title: t, body: n, confirmLabel: r, cancelLabel: o, onConfirm: s, onCancel: a, testId: i }) => {
1011
1026
  const f = U(null), u = Te(), l = Te(), c = F(() => f.current?.focus(), []), m = vr({ open: e, onOpen: c, onDismiss: a });
1012
1027
  return /* @__PURE__ */ d("dialog", { ...m, className: "aqmx-confirm", "aria-labelledby": u, "aria-describedby": l, "data-testid": i, children: /* @__PURE__ */ B("div", { className: "aqmx-confirm-panel", children: [
@@ -1027,7 +1042,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
1027
1042
  t.status = "rejected", t.reason = n;
1028
1043
  }
1029
1044
  )), t;
1030
- }, yr = (e) => Object.assign(Promise.resolve(e), { status: "fulfilled", value: e }), Ae = (e) => e.status === "fulfilled" ? e.value : void 0, zs = Object.freeze({ readme: Object.freeze({ status: "loading" }), claim: !1 }), js = Object.freeze({ readme: Object.freeze({ status: "loading" }), claim: !0 }), Vs = (e, t, n) => {
1045
+ }, Er = (e) => Object.assign(Promise.resolve(e), { status: "fulfilled", value: e }), Ae = (e) => e.status === "fulfilled" ? e.value : void 0, js = Object.freeze({ readme: Object.freeze({ status: "loading" }), claim: !1 }), Vs = Object.freeze({ readme: Object.freeze({ status: "loading" }), claim: !0 }), Zs = (e, t, n) => {
1031
1046
  const r = /* @__PURE__ */ new Set(), o = [...e].reverse();
1032
1047
  for (let s = o.pop(); s !== void 0; s = o.pop()) {
1033
1048
  if (s.type !== "directory" || r.has(s.path)) continue;
@@ -1037,19 +1052,19 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
1037
1052
  if (i !== null) for (const f of [...i].reverse()) o.push(f);
1038
1053
  }
1039
1054
  return null;
1040
- }, Zs = (e, t, n) => {
1055
+ }, Ws = (e, t, n) => {
1041
1056
  const r = Ae(e.read(t));
1042
- if (r === void 0 || r.status === "deferred") return zs;
1057
+ if (r === void 0 || r.status === "deferred") return js;
1043
1058
  if (r.status === "error") return { readme: { status: "failed", failure: r.failure, retry: () => e.retry(t) }, claim: !1 };
1044
- const o = Vs(r.entries, n, (a) => e.children(t, a));
1059
+ const o = Zs(r.entries, n, (a) => e.children(t, a));
1045
1060
  if (o !== null) return { readme: { status: "ok", readme: on(o) }, claim: !1 };
1046
1061
  const s = e.children(t, n);
1047
- return s === void 0 || s.status === "loading" ? js : s.status === "failed" ? { readme: { status: "failed", failure: s.failure, retry: () => e.retryChildren(t, n) }, claim: !0 } : { readme: { status: "ok", readme: on(s.entries) }, claim: !0 };
1048
- }, Ws = (e, t, n) => {
1049
- const { readme: r } = Zs(e, t, n);
1050
- return r.status === "ok" ? r.readme : null;
1062
+ return s === void 0 || s.status === "loading" ? Vs : s.status === "failed" ? { readme: { status: "failed", failure: s.failure, retry: () => e.retryChildren(t, n) }, claim: !0 } : { readme: { status: "ok", readme: on(s.entries) }, claim: !0 };
1051
1063
  }, Gs = (e, t, n) => {
1052
- const r = So({ path: `${e.basePath}/*`, end: !0 }, t.pathname);
1064
+ const { readme: r } = Ws(e, t, n);
1065
+ return r.status === "ok" ? r.readme : null;
1066
+ }, Ks = (e, t, n) => {
1067
+ const r = xo({ path: `${e.basePath}/*`, end: !0 }, t.pathname);
1053
1068
  if (r === null) return /* @__PURE__ */ new Set();
1054
1069
  const { location: o } = or(e, r.params["*"], new URLSearchParams(t.search));
1055
1070
  switch (o.view) {
@@ -1062,24 +1077,24 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
1062
1077
  case "multi":
1063
1078
  return new Set(o.docs);
1064
1079
  }
1065
- }, kr = (e) => {
1080
+ }, yr = (e) => {
1066
1081
  const { edits: t } = $(), n = F(() => t.session(e), [t, e]);
1067
- return re(t.subscribe, n, Ks);
1068
- }, Er = () => !1, Ks = () => {
1069
- }, Ys = () => {
1070
- const { edits: e } = $();
1071
- return re(e.subscribe, e.hasSessions, Er);
1082
+ return re(t.subscribe, n, Ys);
1083
+ }, kr = () => !1, Ys = () => {
1072
1084
  }, Xs = () => {
1073
1085
  const { edits: e } = $();
1074
- return re(e.subscribe, e.sideBySide, Er);
1075
- }, Js = () => null, Qs = () => {
1086
+ return re(e.subscribe, e.hasSessions, kr);
1087
+ }, Js = () => {
1088
+ const { edits: e } = $();
1089
+ return re(e.subscribe, e.sideBySide, kr);
1090
+ }, Qs = () => null, ea = () => {
1076
1091
  const { edits: e, labels: t, config: n, trees: r } = $(), o = U([]), s = F(
1077
1092
  ({ nextLocation: g }) => {
1078
- const v = Gs(n, g, (y, T) => Ws(r, y, T));
1079
- return e.flushDrafts(), o.current = e.dirtyPaths().filter((y) => !v.has(y)), o.current.length > 0;
1093
+ const v = Ks(n, g, (E, T) => Gs(r, E, T));
1094
+ return e.flushDrafts(), o.current = e.dirtyPaths().filter((E) => !v.has(E)), o.current.length > 0;
1080
1095
  },
1081
1096
  [e, n, r]
1082
- ), a = xo(s), i = Ys();
1097
+ ), a = To(s), i = Xs();
1083
1098
  ee(() => {
1084
1099
  if (!i) return;
1085
1100
  const g = (v) => {
@@ -1087,7 +1102,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
1087
1102
  };
1088
1103
  return window.addEventListener("beforeunload", g), () => window.removeEventListener("beforeunload", g);
1089
1104
  }, [i, e]);
1090
- const f = re(e.subscribe, e.discardRequest, Js), u = a.state === "blocked", l = u ? o.current : f === null ? [] : f.paths, c = l.map((g) => fe(g)).join(", "), m = l.length > 0 && l.every((g) => e.session(g)?.save.kind === "draft");
1105
+ const f = re(e.subscribe, e.discardRequest, Qs), u = a.state === "blocked", l = u ? o.current : f === null ? [] : f.paths, c = l.map((g) => fe(g)).join(", "), m = l.length > 0 && l.every((g) => e.session(g)?.save.kind === "draft");
1091
1106
  return /* @__PURE__ */ d(
1092
1107
  br,
1093
1108
  {
@@ -1114,12 +1129,12 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
1114
1129
  }
1115
1130
  );
1116
1131
  };
1117
- function ea({
1132
+ function ta({
1118
1133
  title: e,
1119
1134
  titleId: t,
1120
1135
  ...n
1121
1136
  }, r) {
1122
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1137
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1123
1138
  xmlns: "http://www.w3.org/2000/svg",
1124
1139
  viewBox: "0 0 20 20",
1125
1140
  fill: "currentColor",
@@ -1127,26 +1142,26 @@ function ea({
1127
1142
  "data-slot": "icon",
1128
1143
  ref: r,
1129
1144
  "aria-labelledby": t
1130
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1145
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1131
1146
  id: t
1132
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1147
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1133
1148
  fillRule: "evenodd",
1134
1149
  d: "M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm2.25 8.5a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Zm0 3a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Z",
1135
1150
  clipRule: "evenodd"
1136
1151
  }));
1137
1152
  }
1138
- const ta = /* @__PURE__ */ E.forwardRef(ea);
1153
+ const na = /* @__PURE__ */ k.forwardRef(ta);
1139
1154
  let gt = null;
1140
- const Sr = () => (gt ??= import("./EditSurface-DY1VNM9L.js").catch((e) => {
1155
+ const Sr = () => (gt ??= import("./EditSurface-BmbDSrrw.js").catch((e) => {
1141
1156
  throw gt = null, e;
1142
- }), gt), na = () => {
1157
+ }), gt), ra = () => {
1143
1158
  Sr().catch(() => {
1144
1159
  });
1145
- }, ra = (e) => {
1160
+ }, oa = (e) => {
1146
1161
  const { default: t } = se(Sr());
1147
1162
  return /* @__PURE__ */ d(t, { ...e });
1148
1163
  };
1149
- class oa extends nr {
1164
+ class sa extends nr {
1150
1165
  state = { failed: !1 };
1151
1166
  static getDerivedStateFromError() {
1152
1167
  return { failed: !0 };
@@ -1156,7 +1171,7 @@ class oa extends nr {
1156
1171
  return this.state.failed ? this.props.fallback(this.retry) : this.props.children;
1157
1172
  }
1158
1173
  }
1159
- const Ut = `[${lr}]`, sa = "[data-aqmd-content]", aa = 'a[href], button, input, select, textarea, summary, label, [contenteditable], [role="menu"], iframe, video, audio, object, embed, svg, [data-aqmd-spreadsheet-editable], [data-aqmd-spreadsheet-fullscreen], [data-aqmd-svg-image-source]', ia = 200, _e = (e) => ls(e.getAttribute(lr)), la = (e, t) => {
1174
+ const xr = "[data-aqmd-fullscreen]", Cu = (e) => e instanceof Element && e.closest(xr) !== null, Ut = `[${lr}]`, aa = "[data-aqmd-content]", ia = `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]`, la = 200, _e = (e) => cs(e.getAttribute(lr)), ca = (e, t) => {
1160
1175
  for (let r = e; r !== null && t.contains(r); r = r.parentElement) {
1161
1176
  const o = _e(r);
1162
1177
  if (o !== null) return { block: r, lines: o, own: !0 };
@@ -1168,43 +1183,43 @@ const Ut = `[${lr}]`, sa = "[data-aqmd-content]", aa = 'a[href], button, input,
1168
1183
  o !== null && (n = { block: r, lines: o });
1169
1184
  }
1170
1185
  return n === null ? null : { ...n, own: !1 };
1171
- }, ca = (e, t) => {
1186
+ }, da = (e, t) => {
1172
1187
  let n = 0;
1173
1188
  for (let r = e.indexOf(t); r >= 0; r = e.indexOf(t, r + t.length)) n += 1;
1174
1189
  return n;
1175
- }, da = (e) => e.closest(sa) !== null && e.closest(aa) === null, ua = (e, t, n) => {
1176
- const r = la(e, t);
1190
+ }, ua = (e) => e.closest(aa) !== null && e.closest(ia) === null, fa = (e, t, n) => {
1191
+ const r = ca(e, t);
1177
1192
  if (r === null) return null;
1178
1193
  const { block: o, own: s } = r;
1179
1194
  if (!s) {
1180
1195
  const i = r.lines.last + 1;
1181
1196
  return { lines: { first: i, last: i }, word: null, occurrence: 0, clientTop: et(e) };
1182
1197
  }
1183
- const a = pa(o, n);
1198
+ const a = ga(o, n);
1184
1199
  return a === null ? { lines: r.lines, word: null, occurrence: 0, clientTop: et(o) } : { lines: r.lines, word: a.text, occurrence: a.occurrence, clientTop: a.clientTop };
1185
- }, fa = (e, t) => {
1200
+ }, ma = (e, t) => {
1186
1201
  let n = null, r = null, o = null;
1187
1202
  for (const a of e.querySelectorAll(Ut)) {
1188
1203
  const i = _e(a);
1189
1204
  if (i === null) continue;
1190
- n ??= ha(t, a);
1205
+ n ??= pa(t, a);
1191
1206
  const { top: f, bottom: u } = a.getBoundingClientRect();
1192
1207
  f <= n && n < u ? r = { lines: i, block: a } : o === null && f >= n && (o = { lines: i, block: a });
1193
1208
  }
1194
1209
  const s = r === null ? o : r;
1195
1210
  return s === null ? null : { lines: s.lines, word: null, occurrence: 0, clientTop: et(s.block) };
1196
- }, ma = (e) => e === e.ownerDocument.scrollingElement ? 0 : e.getBoundingClientRect().top + e.clientTop, ha = (e, t) => {
1211
+ }, ha = (e) => e === e.ownerDocument.scrollingElement ? 0 : e.getBoundingClientRect().top + e.clientTop, pa = (e, t) => {
1197
1212
  const n = Number.parseFloat(getComputedStyle(t).scrollMarginTop);
1198
- return ma(e) + (Number.isFinite(n) ? n : 0);
1199
- }, pa = (e, t) => {
1213
+ return ha(e) + (Number.isFinite(n) ? n : 0);
1214
+ }, ga = (e, t) => {
1200
1215
  if (t === null || t.rangeCount === 0) return null;
1201
1216
  const n = t.getRangeAt(0);
1202
1217
  if (!(e.contains(n.startContainer) && e.contains(n.endContainer))) return null;
1203
1218
  const r = n.toString().trim();
1204
- if (r === "" || r.length > ia || /[\r\n]/u.test(r)) return null;
1219
+ if (r === "" || r.length > la || /[\r\n]/u.test(r)) return null;
1205
1220
  const o = e.ownerDocument.createRange();
1206
- return o.setStart(e, 0), o.setEnd(n.startContainer, n.startOffset), { text: r, occurrence: ca(o.toString(), r), clientTop: n.getBoundingClientRect().top };
1207
- }, Ru = (e, t) => {
1221
+ return o.setStart(e, 0), o.setEnd(n.startContainer, n.startOffset), { text: r, occurrence: da(o.toString(), r), clientTop: n.getBoundingClientRect().top };
1222
+ }, Ou = (e, t) => {
1208
1223
  const n = e.split(`
1209
1224
  `), r = Math.min(t.lines.first, n.length), o = Math.min(t.lines.last, n.length), s = { line: r, column: 0 };
1210
1225
  if (t.word === null) return s;
@@ -1216,21 +1231,21 @@ const Ut = `[${lr}]`, sa = "[data-aqmd-content]", aa = 'a[href], button, input,
1216
1231
  a += 1;
1217
1232
  }
1218
1233
  }
1219
- return a > 0 ? ga(n, r, o, t.word) ?? s : s;
1220
- }, ga = (e, t, n, r) => {
1234
+ return a > 0 ? wa(n, r, o, t.word) ?? s : s;
1235
+ }, wa = (e, t, n, r) => {
1221
1236
  for (let o = n; o >= t; o -= 1) {
1222
1237
  const s = (e[o - 1] ?? "").lastIndexOf(r);
1223
1238
  if (s >= 0) return { line: o, column: s };
1224
1239
  }
1225
1240
  return null;
1226
- }, wa = (e, t) => {
1241
+ }, va = (e, t) => {
1227
1242
  let n = null, r = null;
1228
1243
  for (const o of e.querySelectorAll(Ut)) {
1229
1244
  const s = _e(o);
1230
1245
  s === null || s.first > t || (s.last >= t ? n = o : (r === null || s.last >= r.last) && (r = { element: o, last: s.last }));
1231
1246
  }
1232
1247
  return n !== null ? n : r === null ? null : r.element;
1233
- }, va = (e, t) => {
1248
+ }, ba = (e, t) => {
1234
1249
  const { bottom: n } = e.getBoundingClientRect(), r = et(e), o = _e(e);
1235
1250
  if (o === null) return r;
1236
1251
  const s = Math.min(Math.max(t - o.first, 0) / (o.last - o.first + 1), 1);
@@ -1251,15 +1266,15 @@ const Ut = `[${lr}]`, sa = "[data-aqmd-content]", aa = 'a[href], button, input,
1251
1266
  "switch-source": Object.freeze({ replace: !1, preventScrollReset: !0, defaultShouldRevalidate: !1 }),
1252
1267
  "switch-view": Object.freeze({ replace: !1, preventScrollReset: !1, defaultShouldRevalidate: !1 }),
1253
1268
  "follow-link": Object.freeze({ replace: !1, preventScrollReset: !1, defaultShouldRevalidate: !1 })
1254
- }), Cu = (e) => Ht[e], at = () => {
1255
- const e = To();
1269
+ }), Lu = (e) => Ht[e], at = () => {
1270
+ const e = Ro();
1256
1271
  return F(
1257
1272
  (t, n) => {
1258
1273
  e(t, Ht[n]);
1259
1274
  },
1260
1275
  [e]
1261
1276
  );
1262
- }, ba = ({ navigation: e, ...t }) => /* @__PURE__ */ d(Ro, { ...t, ...Ht[e] }), xr = (e) => {
1277
+ }, Ea = ({ navigation: e, ...t }) => /* @__PURE__ */ d(Co, { ...t, ...Ht[e] }), Tr = (e) => {
1263
1278
  const t = e.ownerDocument;
1264
1279
  if (e.focus({ preventScroll: !0 }), t.activeElement === e) return !0;
1265
1280
  if (e.hasAttribute("tabindex")) return !1;
@@ -1296,7 +1311,7 @@ const Ut = `[${lr}]`, sa = "[data-aqmd-content]", aa = 'a[href], button, input,
1296
1311
  const l = t(u);
1297
1312
  l !== r.current && (s(), l !== null && (r.current = l, n.current = window.setTimeout(() => {
1298
1313
  n.current = null, a(l);
1299
- }, Ao)));
1314
+ }, No)));
1300
1315
  },
1301
1316
  [s, t, a]
1302
1317
  ), f = F(
@@ -1314,8 +1329,8 @@ const Ut = `[${lr}]`, sa = "[data-aqmd-content]", aa = 'a[href], button, input,
1314
1329
  }),
1315
1330
  [i, f]
1316
1331
  );
1317
- }, ka = Ft(() => import("./NativeScrollBar-C4vkvdGz.js").then((e) => ({ default: e.NativeScrollBar })));
1318
- class Ea extends nr {
1332
+ }, ka = Ft(() => import("./NativeScrollBar-C1CtjwBm.js").then((e) => ({ default: e.NativeScrollBar })));
1333
+ class Sa extends nr {
1319
1334
  state = { failed: !1 };
1320
1335
  static getDerivedStateFromError() {
1321
1336
  return { failed: !0 };
@@ -1327,33 +1342,33 @@ class Ea extends nr {
1327
1342
  return this.state.failed ? null : this.props.children;
1328
1343
  }
1329
1344
  }
1330
- const Sa = ({ scroller: e, withCircle: t }) => /* @__PURE__ */ d(Ea, { children: /* @__PURE__ */ d(Ie, { fallback: null, children: /* @__PURE__ */ d(ka, { scroller: e, withCircle: t }) }) }), Tr = (e) => /* @__PURE__ */ d(Sa, { scroller: e, withCircle: !0 }), Ou = 8, zt = No, Rr = Do[3], Cr = zt + 2 * Rr, Lu = -(zt + Rr), xa = Object.freeze({ minSpeedMultiplier: 0.25, maxSpeedMultiplier: 18 });
1331
- let Or = null, wt = null;
1332
- const Nt = /* @__PURE__ */ new Set(), Ta = (e) => (Nt.add(e), () => {
1345
+ const xa = ({ scroller: e, withCircle: t }) => /* @__PURE__ */ d(Sa, { children: /* @__PURE__ */ d(Ie, { fallback: null, children: /* @__PURE__ */ d(ka, { scroller: e, withCircle: t }) }) }), Rr = (e) => /* @__PURE__ */ d(xa, { scroller: e, withCircle: !0 }), Mu = 8, zt = Do, Cr = Po[3], Or = zt + 2 * Cr, Au = -(zt + Cr), Ta = Object.freeze({ minSpeedMultiplier: 0.25, maxSpeedMultiplier: 18 });
1346
+ let Lr = null, wt = null;
1347
+ const Nt = /* @__PURE__ */ new Set(), Ra = (e) => (Nt.add(e), () => {
1333
1348
  Nt.delete(e);
1334
- }), Ra = () => {
1335
- wt === null && (wt = import("./tapScrollCircle-DYQ8P2ag.js").then((e) => {
1349
+ }), Ca = () => {
1350
+ wt === null && (wt = import("./tapScrollCircle-DacgW2F_.js").then((e) => {
1336
1351
  const t = e.TAP_SCROLL_CIRCLE.renderVisual;
1337
1352
  if (t === void 0) throw new TypeError("[markdown-explorer] the bars' tap-scroll circle has no look to share");
1338
- Or = t;
1353
+ Lr = t;
1339
1354
  for (const n of [...Nt]) n();
1340
1355
  }).catch((e) => {
1341
1356
  wt = null, console.error("[markdown-explorer] the look of a table's tap-scroll circle failed to load; the circle still scrolls without it.", e);
1342
1357
  }));
1343
- }, Ca = ({ look: e, state: t }) => e(t), Oa = (e) => {
1358
+ }, Oa = ({ look: e, state: t }) => e(t), La = (e) => {
1344
1359
  const t = re(
1345
- Ta,
1346
- () => Or,
1360
+ Ra,
1361
+ () => Lr,
1347
1362
  () => null
1348
1363
  );
1349
1364
  return ee(() => {
1350
- t === null && Ra();
1351
- }, [t]), t === null ? null : /* @__PURE__ */ d(Ca, { look: t, state: e });
1352
- }, Lr = Object.freeze({
1353
- renderVisual: (e) => /* @__PURE__ */ d(Oa, { ...e }),
1354
- ...xa,
1365
+ t === null && Ca();
1366
+ }, [t]), t === null ? null : /* @__PURE__ */ d(Oa, { look: t, state: e });
1367
+ }, Mr = Object.freeze({
1368
+ renderVisual: (e) => /* @__PURE__ */ d(La, { ...e }),
1369
+ ...Ta,
1355
1370
  size: zt
1356
- }), Mr = () => {
1371
+ }), Ar = () => {
1357
1372
  const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set();
1358
1373
  let n = !1;
1359
1374
  const r = (o) => {
@@ -1387,9 +1402,9 @@ const Nt = /* @__PURE__ */ new Set(), Ta = (e) => (Nt.add(e), () => {
1387
1402
  return !(Array.isArray(e) && Array.isArray(t)) || e.length !== t.length ? !1 : e.every((s, a) => tt(s, t[a]));
1388
1403
  const n = e, r = t, o = Object.keys(n);
1389
1404
  return o.length !== Object.keys(r).length ? !1 : o.every((s) => Object.hasOwn(r, s) && tt(n[s], r[s]));
1390
- }, La = 55e3, kn = Object.freeze({ status: "deferred" }), vt = Object.freeze({ status: "refreshed" }), bt = Object.freeze({ status: "shown", failed: !1 }), je = Object.freeze({ status: "shown", failed: !0 }), Ve = Object.freeze({ status: "superseded" }), ge = (e) => e === void 0 || e.status === "deferred" ? null : e.status === "loaded" ? e : e.previous, Ma = (e) => e !== void 0 && e.status === "loaded" && e.document.kind !== "failure", Aa = ({ client: e, capacity: t }) => {
1405
+ }, Ma = 55e3, yn = Object.freeze({ status: "deferred" }), vt = Object.freeze({ status: "refreshed" }), bt = Object.freeze({ status: "shown", failed: !1 }), je = Object.freeze({ status: "shown", failed: !0 }), Ve = Object.freeze({ status: "superseded" }), ge = (e) => e === void 0 || e.status === "deferred" ? null : e.status === "loaded" ? e : e.previous, Aa = (e) => e !== void 0 && e.status === "loaded" && e.document.kind !== "failure", Na = ({ client: e, capacity: t }) => {
1391
1406
  if (!Number.isInteger(t) || t < 1) throw new RangeError(`[markdown-explorer] the document cache capacity must be a positive integer; got ${String(t)}`);
1392
- const n = /* @__PURE__ */ new Map(), r = Mr(), o = qe(), s = /* @__PURE__ */ new WeakSet(), a = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
1407
+ const n = /* @__PURE__ */ new Map(), r = Ar(), o = qe(), s = /* @__PURE__ */ new WeakSet(), a = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
1393
1408
  let u = 0;
1394
1409
  const l = o.emit, c = () => (u += 1, u), m = () => {
1395
1410
  if (!(n.size <= t))
@@ -1399,10 +1414,10 @@ const Nt = /* @__PURE__ */ new Set(), Ta = (e) => (Nt.add(e), () => {
1399
1414
  }
1400
1415
  }, g = (b, S) => {
1401
1416
  n.delete(b), n.set(b, S);
1402
- }, v = (b) => performance.now() - b.validatedAt >= La, y = (b, S, L) => {
1403
- const M = n.get(b), P = ge(M?.snapshot), H = L || M?.refreshPending === !0, K = $e(e.document(b, { refresh: H }).then((k) => ({ status: "loaded", document: k }))), w = { snapshot: { status: "pending", promise: K, previous: P }, validatedAt: performance.now(), opened: S, background: null, refreshPending: !1, seeded: void 0, stamp: c() };
1404
- return g(b, w), m(), K.then((k) => {
1405
- n.get(b) === w && (w.snapshot = k, w.stamp = c(), l());
1417
+ }, v = (b) => performance.now() - b.validatedAt >= Ma, E = (b, S, L) => {
1418
+ const M = n.get(b), P = ge(M?.snapshot), H = L || M?.refreshPending === !0, K = $e(e.document(b, { refresh: H }).then((y) => ({ status: "loaded", document: y }))), w = { snapshot: { status: "pending", promise: K, previous: P }, validatedAt: performance.now(), opened: S, background: null, refreshPending: !1, seeded: void 0, stamp: c() };
1419
+ return g(b, w), m(), K.then((y) => {
1420
+ n.get(b) === w && (w.snapshot = y, w.stamp = c(), l());
1406
1421
  }), w;
1407
1422
  }, T = (b, S, L, M, P, H) => {
1408
1423
  S.background === L && (S.background = null, !(n.get(b) !== S || S.snapshot !== M) && (P.kind === "failure" && M.document.kind !== "failure" || (S.validatedAt = H, S.stamp = c(), tt(M.document, P) || (S.snapshot = { status: "loaded", document: P }), l())));
@@ -1417,7 +1432,7 @@ const Nt = /* @__PURE__ */ new Set(), Ta = (e) => (Nt.add(e), () => {
1417
1432
  return T(b, S, M, L, K, P), w ? K : null;
1418
1433
  }, R = (b, S) => {
1419
1434
  const { snapshot: L } = S;
1420
- return L.status === "pending" ? !1 : L.status === "loaded" && L.document.kind !== "failure" ? (O(b, S), !1) : (L.status === "loaded" && s.add(L), y(b, !0, !1), !0);
1435
+ return L.status === "pending" ? !1 : L.status === "loaded" && L.document.kind !== "failure" ? (O(b, S), !1) : (L.status === "loaded" && s.add(L), E(b, !0, !1), !0);
1421
1436
  }, q = (b) => {
1422
1437
  i.delete(b);
1423
1438
  const S = f.get(b);
@@ -1495,33 +1510,33 @@ const Nt = /* @__PURE__ */ new Set(), Ta = (e) => (Nt.add(e), () => {
1495
1510
  answerStampOf: (b) => n.get(b)?.stamp,
1496
1511
  prefetch: (b) => {
1497
1512
  const S = n.get(b);
1498
- S !== void 0 && S.snapshot.status !== "deferred" || (y(b, !1, !1), l());
1513
+ S !== void 0 && S.snapshot.status !== "deferred" || (E(b, !1, !1), l());
1499
1514
  },
1500
1515
  open: (b) => {
1501
1516
  const S = r.resumes(b), L = A(b), M = n.get(b);
1502
1517
  if (M === void 0 || M.snapshot.status === "deferred")
1503
- return y(b, !0, !1), l(), L;
1518
+ return E(b, !0, !1), l(), L;
1504
1519
  if (g(b, M), S) return L;
1505
1520
  const { snapshot: P } = M;
1506
- return P.status === "pending" ? (M.opened = !0, L) : P.document.kind === "failure" ? (M.opened || v(M) ? (s.add(P), y(b, !0, !1), l()) : M.opened = !0, L) : (M.opened = !0, M.background === null && v(M) && O(b, M), L);
1521
+ return P.status === "pending" ? (M.opened = !0, L) : P.document.kind === "failure" ? (M.opened || v(M) ? (s.add(P), E(b, !0, !1), l()) : M.opened = !0, L) : (M.opened = !0, M.background === null && v(M) && O(b, M), L);
1507
1522
  },
1508
1523
  retain: A,
1509
1524
  retry: (b) => {
1510
1525
  const S = n.get(b);
1511
- S === void 0 || S.snapshot.status !== "loaded" || S.snapshot.document.kind !== "failure" || (y(b, !0, !1), l());
1526
+ S === void 0 || S.snapshot.status !== "loaded" || S.snapshot.document.kind !== "failure" || (E(b, !0, !1), l());
1512
1527
  },
1513
1528
  seed: (b, S) => {
1514
1529
  const L = performance.now(), M = $e(
1515
1530
  S.then(
1516
- (k) => k === null ? kn : { status: "loaded", document: k },
1517
- () => kn
1531
+ (y) => y === null ? yn : { status: "loaded", document: y },
1532
+ () => yn
1518
1533
  )
1519
1534
  ), P = n.get(b);
1520
1535
  if (P !== void 0 && P.snapshot.status === "loaded") {
1521
- const k = P.snapshot, C = {};
1536
+ const y = P.snapshot, C = {};
1522
1537
  P.background = C, M.then((N) => {
1523
1538
  if (N.status === "loaded") {
1524
- T(b, P, C, k, N.document, L);
1539
+ T(b, P, C, y, N.document, L);
1525
1540
  return;
1526
1541
  }
1527
1542
  P.background === C && (P.background = null);
@@ -1529,8 +1544,8 @@ const Nt = /* @__PURE__ */ new Set(), Ta = (e) => (Nt.add(e), () => {
1529
1544
  return;
1530
1545
  }
1531
1546
  const H = P !== void 0 && P.snapshot.status === "pending" ? P.snapshot.previous : null, K = { status: "pending", promise: M, previous: H }, w = { snapshot: K, validatedAt: L, opened: P?.opened === !0, background: null, refreshPending: P?.refreshPending === !0, seeded: K, stamp: c() };
1532
- g(b, w), m(), M.then((k) => {
1533
- n.get(b) === w && (k.status === "deferred" && r.isHeld(b) ? y(b, w.opened, !1) : (w.snapshot = k, w.stamp = c()), l());
1547
+ g(b, w), m(), M.then((y) => {
1548
+ n.get(b) === w && (y.status === "deferred" && r.isHeld(b) ? E(b, w.opened, !1) : (w.snapshot = y, w.stamp = c()), l());
1534
1549
  });
1535
1550
  },
1536
1551
  invalidate: () => {
@@ -1550,19 +1565,19 @@ const Nt = /* @__PURE__ */ new Set(), Ta = (e) => (Nt.add(e), () => {
1550
1565
  },
1551
1566
  refresh: async (b) => {
1552
1567
  const S = n.get(b);
1553
- if (S !== void 0 && Ma(S.snapshot)) {
1568
+ if (S !== void 0 && Aa(S.snapshot)) {
1554
1569
  S.refreshPending = !0;
1555
1570
  const P = await O(b, S);
1556
1571
  return P === null ? Ve : P.kind === "failure" ? { status: "failed", failure: P.failure } : p(b, S, !0);
1557
1572
  }
1558
- const L = y(b, !0, !0);
1573
+ const L = E(b, !0, !0);
1559
1574
  if (l(), L.snapshot.status !== "pending") return Ve;
1560
1575
  const M = await L.snapshot.promise;
1561
1576
  return n.get(b) !== L || M.status !== "loaded" ? Ve : M.document.kind === "failure" ? je : (await D(b, M), p(b, L, !1));
1562
1577
  },
1563
1578
  clear: () => {
1564
1579
  n.clear();
1565
- for (const b of r.heldKeys()) y(b, !0, !1);
1580
+ for (const b of r.heldKeys()) E(b, !0, !1);
1566
1581
  l();
1567
1582
  },
1568
1583
  subscribe: o.subscribe,
@@ -1577,16 +1592,16 @@ const Nt = /* @__PURE__ */ new Set(), Ta = (e) => (Nt.add(e), () => {
1577
1592
  },
1578
1593
  noteFailureShown: (b) => s.has(b) ? !1 : (s.add(b), !0)
1579
1594
  };
1580
- }, we = ve("fill"), Na = "--aqmx-tap-circle-gutter", Da = Object.freeze({ blockSize: "100%", [Na]: `${String(Cr)}px` }), Be = ({ scrollerProps: e, children: t }) => se(we) === "content" ? /* @__PURE__ */ d(un, { scrollerProps: e, children: t }) : /* @__PURE__ */ d(un, { scrollerProps: { ...e, style: Da }, rowClassName: "aqmx-document-scroll-row", renderScrollBar: Tr, children: t }), Pa = Object.freeze(["l1", "l2", "l3", "l4", "l5", "l6", "l7", "l8"]), Ia = Object.freeze({ className: "aqmx-document-failure", "data-aqmx-document-scroller": "" }), Ce = ({ label: e, testId: t }) => /* @__PURE__ */ B(pe, { children: [
1581
- /* @__PURE__ */ d("div", { className: "aqmx-skeleton", "aria-hidden": "true", "data-testid": t, children: Pa.map((n) => /* @__PURE__ */ d("span", {}, n)) }),
1595
+ }, we = ve("fill"), Da = "--aqmx-tap-circle-gutter", Pa = Object.freeze({ blockSize: "100%", [Da]: `${String(Or)}px` }), Be = ({ scrollerProps: e, children: t }) => se(we) === "content" ? /* @__PURE__ */ d(un, { scrollerProps: e, children: t }) : /* @__PURE__ */ d(un, { scrollerProps: { ...e, style: Pa }, rowClassName: "aqmx-document-scroll-row", renderScrollBar: Rr, children: t }), Ia = Object.freeze(["l1", "l2", "l3", "l4", "l5", "l6", "l7", "l8"]), $a = Object.freeze({ className: "aqmx-document-failure", "data-aqmx-document-scroller": "" }), Ce = ({ label: e, testId: t }) => /* @__PURE__ */ B(pe, { children: [
1596
+ /* @__PURE__ */ d("div", { className: "aqmx-skeleton", "aria-hidden": "true", "data-testid": t, children: Ia.map((n) => /* @__PURE__ */ d("span", {}, n)) }),
1582
1597
  /* @__PURE__ */ d("p", { className: "aqmx-sr-only", children: e })
1583
- ] }), jt = ({ failure: e, onRetry: t, testId: n }) => /* @__PURE__ */ d(Be, { scrollerProps: Ia, children: /* @__PURE__ */ d(Re, { failure: e, alert: !1, onRetry: t, testId: n }) });
1584
- function $a({
1598
+ ] }), jt = ({ failure: e, onRetry: t, testId: n }) => /* @__PURE__ */ d(Be, { scrollerProps: $a, children: /* @__PURE__ */ d(Re, { failure: e, alert: !1, onRetry: t, testId: n }) });
1599
+ function _a({
1585
1600
  title: e,
1586
1601
  titleId: t,
1587
1602
  ...n
1588
1603
  }, r) {
1589
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1604
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1590
1605
  xmlns: "http://www.w3.org/2000/svg",
1591
1606
  viewBox: "0 0 20 20",
1592
1607
  fill: "currentColor",
@@ -1594,25 +1609,25 @@ function $a({
1594
1609
  "data-slot": "icon",
1595
1610
  ref: r,
1596
1611
  "aria-labelledby": t
1597
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1612
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1598
1613
  id: t
1599
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1614
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1600
1615
  fillRule: "evenodd",
1601
1616
  d: "M18 5.25a2.25 2.25 0 0 0-2.012-2.238A2.25 2.25 0 0 0 13.75 1h-1.5a2.25 2.25 0 0 0-2.238 2.012c-.875.092-1.6.686-1.884 1.488H11A2.5 2.5 0 0 1 13.5 7v7h2.25A2.25 2.25 0 0 0 18 11.75v-6.5ZM12.25 2.5a.75.75 0 0 0-.75.75v.25h3v-.25a.75.75 0 0 0-.75-.75h-1.5Z",
1602
1617
  clipRule: "evenodd"
1603
- }), /* @__PURE__ */ E.createElement("path", {
1618
+ }), /* @__PURE__ */ k.createElement("path", {
1604
1619
  fillRule: "evenodd",
1605
1620
  d: "M3 6a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H3Zm6.874 4.166a.75.75 0 1 0-1.248-.832l-2.493 3.739-.853-.853a.75.75 0 0 0-1.06 1.06l1.5 1.5a.75.75 0 0 0 1.154-.114l3-4.5Z",
1606
1621
  clipRule: "evenodd"
1607
1622
  }));
1608
1623
  }
1609
- const _a = /* @__PURE__ */ E.forwardRef($a);
1610
- function Fa({
1624
+ const Fa = /* @__PURE__ */ k.forwardRef(_a);
1625
+ function qa({
1611
1626
  title: e,
1612
1627
  titleId: t,
1613
1628
  ...n
1614
1629
  }, r) {
1615
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1630
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1616
1631
  xmlns: "http://www.w3.org/2000/svg",
1617
1632
  viewBox: "0 0 20 20",
1618
1633
  fill: "currentColor",
@@ -1620,23 +1635,23 @@ function Fa({
1620
1635
  "data-slot": "icon",
1621
1636
  ref: r,
1622
1637
  "aria-labelledby": t
1623
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1638
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1624
1639
  id: t
1625
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1640
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1626
1641
  fillRule: "evenodd",
1627
1642
  d: "M15.988 3.012A2.25 2.25 0 0 1 18 5.25v6.5A2.25 2.25 0 0 1 15.75 14H13.5v-3.379a3 3 0 0 0-.879-2.121l-3.12-3.121a3 3 0 0 0-1.402-.791 2.252 2.252 0 0 1 1.913-1.576A2.25 2.25 0 0 1 12.25 1h1.5a2.25 2.25 0 0 1 2.238 2.012ZM11.5 3.25a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 .75.75v.25h-3v-.25Z",
1628
1643
  clipRule: "evenodd"
1629
- }), /* @__PURE__ */ E.createElement("path", {
1644
+ }), /* @__PURE__ */ k.createElement("path", {
1630
1645
  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"
1631
1646
  }));
1632
1647
  }
1633
- const qa = /* @__PURE__ */ E.forwardRef(Fa);
1634
- function Ba({
1648
+ const Ba = /* @__PURE__ */ k.forwardRef(qa);
1649
+ function Ua({
1635
1650
  title: e,
1636
1651
  titleId: t,
1637
1652
  ...n
1638
1653
  }, r) {
1639
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1654
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1640
1655
  xmlns: "http://www.w3.org/2000/svg",
1641
1656
  viewBox: "0 0 20 20",
1642
1657
  fill: "currentColor",
@@ -1644,46 +1659,46 @@ function Ba({
1644
1659
  "data-slot": "icon",
1645
1660
  ref: r,
1646
1661
  "aria-labelledby": t
1647
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1662
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1648
1663
  id: t
1649
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1664
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1650
1665
  fillRule: "evenodd",
1651
1666
  d: "M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",
1652
1667
  clipRule: "evenodd"
1653
1668
  }));
1654
1669
  }
1655
- const Ua = /* @__PURE__ */ E.forwardRef(Ba), Ha = 2e3, En = Object.freeze({ outcome: "idle" }), za = (e) => {
1670
+ const Ha = /* @__PURE__ */ k.forwardRef(Ua), za = 2e3, kn = Object.freeze({ outcome: "idle" }), ja = (e) => {
1656
1671
  const t = navigator.clipboard;
1657
1672
  return t === void 0 ? Promise.reject(new Error("[markdown-explorer] this browser has no asynchronous clipboard")) : t.writeText(e);
1658
- }, ja = ({ text: e }) => {
1659
- const { announcer: t, labels: n } = $(), [r, o] = V(En);
1673
+ }, Va = ({ text: e }) => {
1674
+ const { announcer: t, labels: n } = $(), [r, o] = V(kn);
1660
1675
  ee(() => {
1661
1676
  if (r.outcome === "idle") return;
1662
- const f = setTimeout(() => o(En), Ha);
1677
+ const f = setTimeout(() => o(kn), za);
1663
1678
  return () => clearTimeout(f);
1664
1679
  }, [r]);
1665
1680
  const s = (f) => {
1666
1681
  o({ outcome: f }), t.announce(f === "copied" ? n.copiedText : n.copyTextFailed);
1667
1682
  }, a = () => {
1668
- za(e).then(
1683
+ ja(e).then(
1669
1684
  () => s("copied"),
1670
1685
  () => s("failed")
1671
1686
  );
1672
1687
  }, i = r.outcome === "copied" ? n.copiedText : r.outcome === "failed" ? n.copyTextFailed : n.copyText;
1673
1688
  return (
1674
- /* @__PURE__ */ d("button", { type: "button", className: "aqmx-icon-button", "aria-label": n.copyText, title: i, onClick: a, "data-aqmx-copy-outcome": r.outcome, "data-testid": "markdown-explorer-file-copy", children: r.outcome === "copied" ? /* @__PURE__ */ d(_a, {}) : r.outcome === "failed" ? /* @__PURE__ */ d(Ua, {}) : /* @__PURE__ */ d(qa, {}) })
1689
+ /* @__PURE__ */ d("button", { type: "button", className: "aqmx-icon-button", "aria-label": n.copyText, title: i, onClick: a, "data-aqmx-copy-outcome": r.outcome, "data-testid": "markdown-explorer-file-copy", children: r.outcome === "copied" ? /* @__PURE__ */ d(Fa, {}) : r.outcome === "failed" ? /* @__PURE__ */ d(Ha, {}) : /* @__PURE__ */ d(Ba, {}) })
1675
1690
  );
1676
- }, Ar = ve(null), Va = () => {
1677
- const e = se(Ar);
1691
+ }, Nr = ve(null), Za = () => {
1692
+ const e = se(Nr);
1678
1693
  if (e === null) throw new Error("[markdown-explorer] a document's content reads its own part only inside a document pane (DocumentContentChannelContext)");
1679
1694
  return e;
1680
1695
  };
1681
- function Za({
1696
+ function Wa({
1682
1697
  title: e,
1683
1698
  titleId: t,
1684
1699
  ...n
1685
1700
  }, r) {
1686
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1701
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1687
1702
  xmlns: "http://www.w3.org/2000/svg",
1688
1703
  viewBox: "0 0 20 20",
1689
1704
  fill: "currentColor",
@@ -1691,21 +1706,21 @@ function Za({
1691
1706
  "data-slot": "icon",
1692
1707
  ref: r,
1693
1708
  "aria-labelledby": t
1694
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1709
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1695
1710
  id: t
1696
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1711
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1697
1712
  d: "M10.75 2.75a.75.75 0 0 0-1.5 0v8.614L6.295 8.235a.75.75 0 1 0-1.09 1.03l4.25 4.5a.75.75 0 0 0 1.09 0l4.25-4.5a.75.75 0 0 0-1.09-1.03l-2.955 3.129V2.75Z"
1698
- }), /* @__PURE__ */ E.createElement("path", {
1713
+ }), /* @__PURE__ */ k.createElement("path", {
1699
1714
  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"
1700
1715
  }));
1701
1716
  }
1702
- const Wa = /* @__PURE__ */ E.forwardRef(Za);
1703
- function Ga({
1717
+ const Ga = /* @__PURE__ */ k.forwardRef(Wa);
1718
+ function Ka({
1704
1719
  title: e,
1705
1720
  titleId: t,
1706
1721
  ...n
1707
1722
  }, r) {
1708
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1723
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1709
1724
  xmlns: "http://www.w3.org/2000/svg",
1710
1725
  viewBox: "0 0 20 20",
1711
1726
  fill: "currentColor",
@@ -1713,34 +1728,34 @@ function Ga({
1713
1728
  "data-slot": "icon",
1714
1729
  ref: r,
1715
1730
  "aria-labelledby": t
1716
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1731
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1717
1732
  id: t
1718
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1733
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1719
1734
  fillRule: "evenodd",
1720
1735
  d: "M4.25 5.5a.75.75 0 0 0-.75.75v8.5c0 .414.336.75.75.75h8.5a.75.75 0 0 0 .75-.75v-4a.75.75 0 0 1 1.5 0v4A2.25 2.25 0 0 1 12.75 17h-8.5A2.25 2.25 0 0 1 2 14.75v-8.5A2.25 2.25 0 0 1 4.25 4h5a.75.75 0 0 1 0 1.5h-5Z",
1721
1736
  clipRule: "evenodd"
1722
- }), /* @__PURE__ */ E.createElement("path", {
1737
+ }), /* @__PURE__ */ k.createElement("path", {
1723
1738
  fillRule: "evenodd",
1724
1739
  d: "M6.194 12.753a.75.75 0 0 0 1.06.053L16.5 4.44v2.81a.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.553l-9.056 8.194a.75.75 0 0 0-.053 1.06Z",
1725
1740
  clipRule: "evenodd"
1726
1741
  }));
1727
1742
  }
1728
- const Ka = /* @__PURE__ */ E.forwardRef(Ga), Ue = ({ name: e, openUrl: t, downloadUrl: n, icon: r, children: o }) => {
1743
+ const Ya = /* @__PURE__ */ k.forwardRef(Ka), Ue = ({ name: e, openUrl: t, downloadUrl: n, icon: r, children: o }) => {
1729
1744
  const { labels: s } = $();
1730
1745
  return /* @__PURE__ */ B("div", { className: "aqmx-document-toolbar", children: [
1731
1746
  /* @__PURE__ */ d("span", { className: "aqmx-document-file-icon", "aria-hidden": "true", children: r }),
1732
1747
  /* @__PURE__ */ d("span", { className: "aqmx-document-title", title: e, "data-testid": "markdown-explorer-file-name", children: e }),
1733
1748
  o,
1734
- /* @__PURE__ */ d("a", { className: "aqmx-icon-button", href: t, target: "_blank", rel: "noopener noreferrer", "aria-label": s.openInNewTab, title: s.openInNewTab, "data-testid": "markdown-explorer-file-open", children: /* @__PURE__ */ d(Ka, {}) }),
1735
- /* @__PURE__ */ d("a", { className: "aqmx-icon-button", href: n, download: e, "aria-label": s.download, title: s.download, "data-testid": "markdown-explorer-file-download", children: /* @__PURE__ */ d(Wa, {}) })
1749
+ /* @__PURE__ */ d("a", { className: "aqmx-icon-button", href: t, target: "_blank", rel: "noopener noreferrer", "aria-label": s.openInNewTab, title: s.openInNewTab, "data-testid": "markdown-explorer-file-open", children: /* @__PURE__ */ d(Ya, {}) }),
1750
+ /* @__PURE__ */ d("a", { className: "aqmx-icon-button", href: n, download: e, "aria-label": s.download, title: s.download, "data-testid": "markdown-explorer-file-download", children: /* @__PURE__ */ d(Ga, {}) })
1736
1751
  ] });
1737
1752
  };
1738
- function Ya({
1753
+ function Xa({
1739
1754
  title: e,
1740
1755
  titleId: t,
1741
1756
  ...n
1742
1757
  }, r) {
1743
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1758
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1744
1759
  xmlns: "http://www.w3.org/2000/svg",
1745
1760
  viewBox: "0 0 20 20",
1746
1761
  fill: "currentColor",
@@ -1748,55 +1763,55 @@ function Ya({
1748
1763
  "data-slot": "icon",
1749
1764
  ref: r,
1750
1765
  "aria-labelledby": t
1751
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1766
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1752
1767
  id: t
1753
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1768
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1754
1769
  fillRule: "evenodd",
1755
1770
  d: "M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm4.75 6.75a.75.75 0 0 1 1.5 0v2.546l.943-1.048a.75.75 0 0 1 1.114 1.004l-2.25 2.5a.75.75 0 0 1-1.114 0l-2.25-2.5a.75.75 0 1 1 1.114-1.004l.943 1.048V8.75Z",
1756
1771
  clipRule: "evenodd"
1757
1772
  }));
1758
1773
  }
1759
- const Xa = /* @__PURE__ */ E.forwardRef(Ya), Ja = Object.freeze({ className: "aqmx-document-stage" }), Qa = ({ document: e }) => {
1774
+ const Ja = /* @__PURE__ */ k.forwardRef(Xa), Qa = Object.freeze({ className: "aqmx-document-stage" }), ei = ({ document: e }) => {
1760
1775
  const { labels: t } = $();
1761
1776
  return /* @__PURE__ */ B("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-file-view", children: [
1762
- /* @__PURE__ */ d(Ue, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: /* @__PURE__ */ d(Xa, {}) }),
1763
- /* @__PURE__ */ d(Be, { scrollerProps: Ja, children: /* @__PURE__ */ B("div", { className: "aqmx-callout", role: "note", "data-testid": "markdown-explorer-file-not-shown", children: [
1777
+ /* @__PURE__ */ d(Ue, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: /* @__PURE__ */ d(Ja, {}) }),
1778
+ /* @__PURE__ */ d(Be, { scrollerProps: Qa, children: /* @__PURE__ */ B("div", { className: "aqmx-callout", role: "note", "data-testid": "markdown-explorer-file-not-shown", children: [
1764
1779
  /* @__PURE__ */ d("p", { className: "aqmx-callout-body", children: t.fileNotShown }),
1765
1780
  /* @__PURE__ */ d("a", { className: "aqmx-callout-action", href: e.url, download: e.name, "data-testid": "markdown-explorer-file-not-shown-download", children: t.download })
1766
1781
  ] }) })
1767
1782
  ] });
1768
- }, Sn = ["keydown", "pointerdown", "wheel", "touchstart"], Ke = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), ei = (e) => {
1783
+ }, Sn = ["keydown", "pointerdown", "wheel", "touchstart"], Ke = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), ti = (e) => {
1769
1784
  const t = nt.get(e);
1770
1785
  if (t !== void 0) {
1771
1786
  t.count += 1;
1772
1787
  return;
1773
1788
  }
1774
1789
  nt.set(e, { count: 1, original: e.style.overflowAnchor }), e.style.overflowAnchor = "none";
1775
- }, ti = (e) => {
1790
+ }, ni = (e) => {
1776
1791
  const t = nt.get(e);
1777
1792
  t !== void 0 && (t.count -= 1, !(t.count > 0) && (nt.delete(e), e.style.overflowAnchor = t.original));
1778
- }, ni = (e, t, n) => {
1793
+ }, ri = (e, t, n) => {
1779
1794
  for (let r = t; r !== null && r !== n; r = r.parentElement) {
1780
1795
  e.observe(r);
1781
1796
  for (let o = r.previousElementSibling; o !== null; o = o.previousElementSibling) e.observe(o);
1782
1797
  }
1783
- }, ri = (e) => {
1798
+ }, oi = (e) => {
1784
1799
  const t = /* @__PURE__ */ new Map();
1785
1800
  for (let n = e.parentElement; n !== null; n = n.parentElement) t.set(n, { top: n.scrollTop, left: n.scrollLeft });
1786
1801
  return t;
1787
- }, oi = (e) => {
1802
+ }, si = (e) => {
1788
1803
  Ke.get(e)?.();
1789
- }, si = (e, t, n) => {
1790
- oi(e);
1804
+ }, ai = (e, t, n) => {
1805
+ si(e);
1791
1806
  let r = /* @__PURE__ */ new Map();
1792
1807
  const o = /* @__PURE__ */ new Set(), s = () => {
1793
1808
  const c = t();
1794
- return c === null ? !1 : (r = ri(c), !0);
1809
+ return c === null ? !1 : (r = oi(c), !0);
1795
1810
  };
1796
1811
  if (!s() || typeof ResizeObserver > "u") return;
1797
1812
  const a = () => {
1798
1813
  for (const c of r.keys())
1799
- !(c instanceof HTMLElement) || o.has(c) || (o.add(c), ei(c));
1814
+ !(c instanceof HTMLElement) || o.has(c) || (o.add(c), ti(c));
1800
1815
  };
1801
1816
  a();
1802
1817
  const { ownerDocument: i } = e, f = new ResizeObserver(() => {
@@ -1806,7 +1821,7 @@ const Xa = /* @__PURE__ */ E.forwardRef(Ya), Ja = Object.freeze({ className: "aq
1806
1821
  }
1807
1822
  a();
1808
1823
  });
1809
- for (const { element: c, boundary: m } of n) ni(f, c, m);
1824
+ for (const { element: c, boundary: m } of n) ri(f, c, m);
1810
1825
  const u = (c) => {
1811
1826
  const m = c.target === i ? i.scrollingElement : c.target;
1812
1827
  if (!(m instanceof Element)) return;
@@ -1816,35 +1831,35 @@ const Xa = /* @__PURE__ */ E.forwardRef(Ya), Ja = Object.freeze({ className: "aq
1816
1831
  f.disconnect();
1817
1832
  for (const c of Sn) i.removeEventListener(c, l, !0);
1818
1833
  i.removeEventListener("scroll", u, !0);
1819
- for (const c of o) ti(c);
1834
+ for (const c of o) ni(c);
1820
1835
  o.clear(), Ke.get(e) === l && Ke.delete(e);
1821
1836
  };
1822
1837
  for (const c of Sn) i.addEventListener(c, l, { capture: !0, passive: !0 });
1823
1838
  i.addEventListener("scroll", u, { capture: !0, passive: !0 }), Ke.set(e, l);
1824
- }, it = "[data-aqmd-scroll-container], [data-aqmx-document-scroller]", ai = (e) => {
1839
+ }, it = "[data-aqmd-scroll-container], [data-aqmx-document-scroller]", ii = (e) => {
1825
1840
  const t = e.indexOf("#");
1826
1841
  return t === -1 ? "" : e.slice(t);
1827
- }, ii = /(%[0-9A-Fa-f]{2})/u, Vt = (e) => {
1842
+ }, li = /(%[0-9A-Fa-f]{2})/u, Vt = (e) => {
1828
1843
  if (!e.startsWith("#") || e.length === 1) return null;
1829
- const t = new TextEncoder(), n = e.slice(1).split(ii).flatMap((r, o) => o % 2 === 1 ? [Number.parseInt(r.slice(1), 16)] : [...t.encode(r)]);
1844
+ const t = new TextEncoder(), n = e.slice(1).split(li).flatMap((r, o) => o % 2 === 1 ? [Number.parseInt(r.slice(1), 16)] : [...t.encode(r)]);
1830
1845
  return new TextDecoder("utf-8", { ignoreBOM: !0 }).decode(Uint8Array.from(n));
1831
- }, Nr = (e) => `#${encodeURIComponent(e)}`, li = (e) => {
1846
+ }, Dr = (e) => `#${encodeURIComponent(e)}`, ci = (e) => {
1832
1847
  if (e === "#") return !0;
1833
1848
  const t = Vt(e);
1834
1849
  return t !== null && t.replace(/[A-Z]/gu, (n) => n.toLowerCase()) === "top";
1835
- }, Dr = (e, t) => {
1850
+ }, Pr = (e, t) => {
1836
1851
  if (t === "") return null;
1837
1852
  for (const n of e.querySelectorAll("[id]"))
1838
1853
  if (n.id === t) return n;
1839
1854
  return null;
1840
- }, ci = "http://www.w3.org/1999/xhtml", xn = (e, t) => {
1855
+ }, di = "http://www.w3.org/1999/xhtml", xn = (e, t) => {
1841
1856
  if (t === "") return null;
1842
- const n = Dr(e, t);
1857
+ const n = Pr(e, t);
1843
1858
  if (n !== null) return n;
1844
1859
  for (const r of e.querySelectorAll("a[name]"))
1845
- if (r.localName === "a" && r.namespaceURI === ci && r.getAttribute("name") === t) return r;
1860
+ if (r.localName === "a" && r.namespaceURI === di && r.getAttribute("name") === t) return r;
1846
1861
  return null;
1847
- }, Pr = (e, t) => {
1862
+ }, Ir = (e, t) => {
1848
1863
  if (e === null || !t.startsWith("#")) return null;
1849
1864
  const n = xn(e, t.slice(1));
1850
1865
  if (n !== null) return n;
@@ -1858,25 +1873,25 @@ const Xa = /* @__PURE__ */ E.forwardRef(Ya), Ja = Object.freeze({ className: "aq
1858
1873
  }
1859
1874
  const { overflowY: r } = getComputedStyle(e);
1860
1875
  return r === "auto" || r === "scroll";
1861
- }, di = (e) => {
1876
+ }, ui = (e) => {
1862
1877
  const { body: t, documentElement: n } = e, r = getComputedStyle(n), o = r.overflowX === "visible" && r.overflowY === "visible" && t !== null ? getComputedStyle(t).overflowY : r.overflowY;
1863
1878
  return o !== "hidden" && o !== "clip";
1864
- }, ui = (e, t) => {
1879
+ }, fi = (e, t) => {
1865
1880
  const n = t.closest(it), r = n !== null && e.contains(n) ? n : e;
1866
1881
  if (r.scrollHeight > r.clientHeight && Tn(r)) return r;
1867
1882
  const o = e.getBoundingClientRect().height, { documentElement: s, scrollingElement: a } = e.ownerDocument;
1868
1883
  for (let i = e.parentElement; i !== null && i !== s; i = i.parentElement)
1869
1884
  if (Tn(i) && i.scrollHeight > i.clientHeight && i.clientHeight < o) return i;
1870
- return a instanceof Element && di(e.ownerDocument) && a.scrollHeight > a.clientHeight && a.clientHeight < o ? a : r;
1871
- }, fi = Object.freeze({
1872
- scrollerOf: ui,
1885
+ return a instanceof Element && ui(e.ownerDocument) && a.scrollHeight > a.clientHeight && a.clientHeight < o ? a : r;
1886
+ }, mi = Object.freeze({
1887
+ scrollerOf: fi,
1873
1888
  reveal: (e) => {
1874
1889
  e.scrollIntoView(Dt);
1875
1890
  },
1876
1891
  keepAtStart: (e, t) => {
1877
- si(e, () => t.isConnected ? (hi(e, t), t) : null, [{ element: t, boundary: e }]);
1892
+ ai(e, () => t.isConnected ? (pi(e, t), t) : null, [{ element: t, boundary: e }]);
1878
1893
  }
1879
- }), Dt = Object.freeze({ block: "nearest", inline: "nearest", behavior: "instant" }), mi = (e, t) => {
1894
+ }), Dt = Object.freeze({ block: "nearest", inline: "nearest", behavior: "instant" }), hi = (e, t) => {
1880
1895
  for (let n = t; n !== null && n !== e; n = n.parentElement) {
1881
1896
  const r = n.parentElement;
1882
1897
  if (r instanceof HTMLDetailsElement && n !== r.querySelector(":scope > summary") && (r.open = !0), n.getAttribute("hidden")?.toLowerCase() === "until-found") {
@@ -1884,7 +1899,7 @@ const Xa = /* @__PURE__ */ E.forwardRef(Ya), Ja = Object.freeze({ className: "aq
1884
1899
  n.removeAttribute("hidden");
1885
1900
  }
1886
1901
  }
1887
- }, hi = (e, t) => {
1902
+ }, pi = (e, t) => {
1888
1903
  if (t.getClientRects().length === 0) return;
1889
1904
  const n = e === e.ownerDocument.scrollingElement ? 0 : e.getBoundingClientRect().top + e.clientTop, { scrollMarginTop: r, scrollMarginBottom: o } = getComputedStyle(t), s = Number.parseFloat(r), a = t.getBoundingClientRect(), i = a.height + s + Number.parseFloat(o) > e.clientHeight;
1890
1905
  if (!i && Math.abs(a.top - s - n) < 1) {
@@ -1892,20 +1907,20 @@ const Xa = /* @__PURE__ */ E.forwardRef(Ya), Ja = Object.freeze({ className: "aq
1892
1907
  return;
1893
1908
  }
1894
1909
  e.scrollBy({ top: i ? a.top - n - e.clientHeight : a.bottom - n + e.clientHeight, behavior: "instant" }), t.scrollIntoView(Dt);
1895
- }, pi = (e, t) => {
1910
+ }, gi = (e, t) => {
1896
1911
  const n = t.scrollerOf(e, e.querySelector(it) ?? e);
1897
1912
  n.getClientRects().length !== 0 && (n.scrollTo({ top: 0, left: 0, behavior: "instant" }), t.reveal(n));
1898
1913
  }, Rn = (e, t, n) => {
1899
1914
  if (e === null) return null;
1900
- const r = Pr(e, t);
1901
- return r === null ? (li(t) && pi(e, n), null) : (mi(e, r), n.keepAtStart(n.scrollerOf(e, r), r), r);
1915
+ const r = Ir(e, t);
1916
+ return r === null ? (ci(t) && gi(e, n), null) : (hi(e, r), n.keepAtStart(n.scrollerOf(e, r), r), r);
1902
1917
  };
1903
- function gi({
1918
+ function wi({
1904
1919
  title: e,
1905
1920
  titleId: t,
1906
1921
  ...n
1907
1922
  }, r) {
1908
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1923
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1909
1924
  xmlns: "http://www.w3.org/2000/svg",
1910
1925
  viewBox: "0 0 20 20",
1911
1926
  fill: "currentColor",
@@ -1913,19 +1928,19 @@ function gi({
1913
1928
  "data-slot": "icon",
1914
1929
  ref: r,
1915
1930
  "aria-labelledby": t
1916
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1931
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1917
1932
  id: t
1918
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1933
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1919
1934
  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"
1920
1935
  }));
1921
1936
  }
1922
- const wi = /* @__PURE__ */ E.forwardRef(gi);
1923
- function vi({
1937
+ const vi = /* @__PURE__ */ k.forwardRef(wi);
1938
+ function bi({
1924
1939
  title: e,
1925
1940
  titleId: t,
1926
1941
  ...n
1927
1942
  }, r) {
1928
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1943
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1929
1944
  xmlns: "http://www.w3.org/2000/svg",
1930
1945
  viewBox: "0 0 20 20",
1931
1946
  fill: "currentColor",
@@ -1933,23 +1948,23 @@ function vi({
1933
1948
  "data-slot": "icon",
1934
1949
  ref: r,
1935
1950
  "aria-labelledby": t
1936
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1951
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1937
1952
  id: t
1938
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1953
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1939
1954
  d: "M6.75 8.25a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-4.5Z"
1940
- }), /* @__PURE__ */ E.createElement("path", {
1955
+ }), /* @__PURE__ */ k.createElement("path", {
1941
1956
  fillRule: "evenodd",
1942
1957
  d: "M9 2a7 7 0 1 0 4.391 12.452l3.329 3.328a.75.75 0 1 0 1.06-1.06l-3.328-3.329A7 7 0 0 0 9 2ZM3.5 9a5.5 5.5 0 1 1 11 0 5.5 5.5 0 0 1-11 0Z",
1943
1958
  clipRule: "evenodd"
1944
1959
  }));
1945
1960
  }
1946
- const bi = /* @__PURE__ */ E.forwardRef(vi);
1961
+ const Ei = /* @__PURE__ */ k.forwardRef(bi);
1947
1962
  function yi({
1948
1963
  title: e,
1949
1964
  titleId: t,
1950
1965
  ...n
1951
1966
  }, r) {
1952
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1967
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1953
1968
  xmlns: "http://www.w3.org/2000/svg",
1954
1969
  viewBox: "0 0 20 20",
1955
1970
  fill: "currentColor",
@@ -1957,23 +1972,23 @@ function yi({
1957
1972
  "data-slot": "icon",
1958
1973
  ref: r,
1959
1974
  "aria-labelledby": t
1960
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1975
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1961
1976
  id: t
1962
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1977
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1963
1978
  d: "M9 6a.75.75 0 0 1 .75.75v1.5h1.5a.75.75 0 0 1 0 1.5h-1.5v1.5a.75.75 0 0 1-1.5 0v-1.5h-1.5a.75.75 0 0 1 0-1.5h1.5v-1.5A.75.75 0 0 1 9 6Z"
1964
- }), /* @__PURE__ */ E.createElement("path", {
1979
+ }), /* @__PURE__ */ k.createElement("path", {
1965
1980
  fillRule: "evenodd",
1966
1981
  d: "M2 9a7 7 0 1 1 12.452 4.391l3.328 3.329a.75.75 0 1 1-1.06 1.06l-3.329-3.328A7 7 0 0 1 2 9Zm7-5.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11Z",
1967
1982
  clipRule: "evenodd"
1968
1983
  }));
1969
1984
  }
1970
- const ki = /* @__PURE__ */ E.forwardRef(yi);
1971
- function Ei({
1985
+ const ki = /* @__PURE__ */ k.forwardRef(yi);
1986
+ function Si({
1972
1987
  title: e,
1973
1988
  titleId: t,
1974
1989
  ...n
1975
1990
  }, r) {
1976
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1991
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1977
1992
  xmlns: "http://www.w3.org/2000/svg",
1978
1993
  viewBox: "0 0 20 20",
1979
1994
  fill: "currentColor",
@@ -1981,15 +1996,15 @@ function Ei({
1981
1996
  "data-slot": "icon",
1982
1997
  ref: r,
1983
1998
  "aria-labelledby": t
1984
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1999
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1985
2000
  id: t
1986
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
2001
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1987
2002
  fillRule: "evenodd",
1988
2003
  d: "M1 5.25A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25v9.5A2.25 2.25 0 0 1 16.75 17H3.25A2.25 2.25 0 0 1 1 14.75v-9.5Zm1.5 5.81v3.69c0 .414.336.75.75.75h13.5a.75.75 0 0 0 .75-.75v-2.69l-2.22-2.219a.75.75 0 0 0-1.06 0l-1.91 1.909.47.47a.75.75 0 1 1-1.06 1.06L6.53 8.091a.75.75 0 0 0-1.06 0l-2.97 2.97ZM12 7a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",
1989
2004
  clipRule: "evenodd"
1990
2005
  }));
1991
2006
  }
1992
- const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = Object.freeze({ [Pt]: "allow" }), xi = `[${Pt}="${It[Pt]}"]`, Ti = () => {
2007
+ const xi = /* @__PURE__ */ k.forwardRef(Si), Pt = "data-aqmx-key-repeat", It = Object.freeze({ [Pt]: "allow" }), Ti = `[${Pt}="${It[Pt]}"]`, Ri = () => {
1993
2008
  let e = null;
1994
2009
  return {
1995
2010
  onKeyDownCapture: (t) => {
@@ -1998,7 +2013,7 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
1998
2013
  e = t.target instanceof Element ? t.target : null;
1999
2014
  return;
2000
2015
  }
2001
- e !== null && t.target === e && e.closest(xi) !== null || (t.preventDefault(), t.stopPropagation());
2016
+ e !== null && t.target === e && e.closest(Ti) !== null || (t.preventDefault(), t.stopPropagation());
2002
2017
  }
2003
2018
  },
2004
2019
  onKeyUpCapture: (t) => {
@@ -2008,7 +2023,7 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
2008
2023
  t.target === e && (e = null);
2009
2024
  }
2010
2025
  };
2011
- }, Ye = Object.freeze([1 / Me ** 2, 1 / Me, 1, Me, Me ** 2]), Cn = Object.freeze({ mode: "fit" }), Ri = 1, Ir = Object.freeze({ className: "aqmx-document-canvas", "data-testid": "markdown-explorer-image-canvas" }), On = `[data-testid="${Ir["data-testid"]}"]`, Ci = ve(null), Oi = (e, t) => e.width > 0 && e.height > 0 && t.width - e.width <= Ri ? { base: e, scale: t.width / e.width } : t.width > 0 && t.height > 0 ? { base: t, scale: 1 } : null, Ln = (e, t, n) => {
2026
+ }, Ye = Object.freeze([1 / Me ** 2, 1 / Me, 1, Me, Me ** 2]), Cn = Object.freeze({ mode: "fit" }), Ci = 1, $r = Object.freeze({ className: "aqmx-document-canvas", "data-testid": "markdown-explorer-image-canvas" }), On = `[data-testid="${$r["data-testid"]}"]`, Oi = ve(null), Li = (e, t) => e.width > 0 && e.height > 0 && t.width - e.width <= Ci ? { base: e, scale: t.width / e.width } : t.width > 0 && t.height > 0 ? { base: t, scale: 1 } : null, Ln = (e, t, n) => {
2012
2027
  if (e.mode === "level") {
2013
2028
  const o = e.index + n;
2014
2029
  return o >= 0 && o < Ye.length ? o : null;
@@ -2024,19 +2039,19 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
2024
2039
  if (t === null) return null;
2025
2040
  const r = Ln(e, t.scale, n);
2026
2041
  return r === null ? null : { mode: "level", index: r, base: t.base };
2027
- }, Li = (e, t) => {
2042
+ }, Mi = (e, t) => {
2028
2043
  if (e <= 0 || t <= 0) return 0;
2029
2044
  const n = Math.trunc(Math.log(t / e) / Math.log(Me));
2030
2045
  return n === 0 ? 0 : n;
2031
2046
  }, An = (e) => {
2032
2047
  const t = e[0], n = e[1];
2033
2048
  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 } };
2034
- }, Mi = (e) => {
2049
+ }, Ai = (e) => {
2035
2050
  const t = Ye[e];
2036
2051
  if (t === void 0) throw new RangeError(`[markdown-explorer] no image zoom step ${String(e)}`);
2037
2052
  return t;
2038
- }, Nn = (e, t, n) => e !== null && e.width === t && e.height === n ? e : { width: t, height: n }, Ai = ({ document: e }) => {
2039
- const { labels: t } = $(), n = se(Ci), [r] = V(() => n === null ? null : n.read(e.url)), [o, s] = V(r === null ? Cn : r.zoom), [a, i] = V(r === null ? null : r.reported), [f, u] = V(null), l = U(null), c = F((D) => {
2053
+ }, Nn = (e, t, n) => e !== null && e.width === t && e.height === n ? e : { width: t, height: n }, Ni = ({ document: e }) => {
2054
+ const { labels: t } = $(), n = se(Oi), [r] = V(() => n === null ? null : n.read(e.url)), [o, s] = V(r === null ? Cn : r.zoom), [a, i] = V(r === null ? null : r.reported), [f, u] = V(null), l = U(null), c = F((D) => {
2040
2055
  const { naturalWidth: h, naturalHeight: p } = D;
2041
2056
  i((x) => Nn(x, h, p));
2042
2057
  }, []), m = F(
@@ -2059,9 +2074,9 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
2059
2074
  const p = new ResizeObserver(h);
2060
2075
  return p.observe(D), () => p.disconnect();
2061
2076
  }, [a, o.mode]);
2062
- const g = a === null || f === null ? null : Oi(a, f), v = Mn(o, g, -1), y = Mn(o, g, 1), T = o.mode === "level" ? Mi(o.index) : null, O = U({ zoomIn: y, zoomOut: v });
2077
+ const g = a === null || f === null ? null : Li(a, f), v = Mn(o, g, -1), E = Mn(o, g, 1), T = o.mode === "level" ? Ai(o.index) : null, O = U({ zoomIn: E, zoomOut: v });
2063
2078
  Y(() => {
2064
- O.current = { zoomIn: y, zoomOut: v };
2079
+ O.current = { zoomIn: E, zoomOut: v };
2065
2080
  });
2066
2081
  const R = U(null);
2067
2082
  Y(() => {
@@ -2078,7 +2093,7 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
2078
2093
  const _ = An(I.touches);
2079
2094
  if (h === null || _ === null) return;
2080
2095
  I.preventDefault();
2081
- const b = Li(h.distance, _.distance);
2096
+ const b = Mi(h.distance, _.distance);
2082
2097
  if (b === h.steps) return;
2083
2098
  const S = b > h.steps ? 1 : -1, L = S === 1 ? O.current.zoomIn : O.current.zoomOut;
2084
2099
  if (L === null) return;
@@ -2094,7 +2109,7 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
2094
2109
  }, []);
2095
2110
  const q = o.mode === "level" && T !== null ? { width: `${o.base.width * T}px`, height: `${o.base.height * T}px` } : void 0;
2096
2111
  return /* @__PURE__ */ B("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-image-view", children: [
2097
- /* @__PURE__ */ B(Ue, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: /* @__PURE__ */ d(Si, {}), children: [
2112
+ /* @__PURE__ */ B(Ue, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: /* @__PURE__ */ d(xi, {}), children: [
2098
2113
  /* @__PURE__ */ d(
2099
2114
  "button",
2100
2115
  {
@@ -2107,7 +2122,7 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
2107
2122
  v !== null && s(v);
2108
2123
  },
2109
2124
  ...It,
2110
- children: /* @__PURE__ */ d(bi, {})
2125
+ children: /* @__PURE__ */ d(Ei, {})
2111
2126
  }
2112
2127
  ),
2113
2128
  /* @__PURE__ */ d("output", { className: "aqmx-document-level", "aria-live": "polite", "data-testid": "markdown-explorer-image-level", children: T === null ? t.imageFitLevel : t.imageZoomLevel(Math.round(T * 100)) }),
@@ -2118,37 +2133,37 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
2118
2133
  className: "aqmx-icon-button",
2119
2134
  "aria-label": t.imageZoomIn,
2120
2135
  title: t.imageZoomIn,
2121
- "aria-disabled": y === null,
2136
+ "aria-disabled": E === null,
2122
2137
  onClick: () => {
2123
- y !== null && s(y);
2138
+ E !== null && s(E);
2124
2139
  },
2125
2140
  ...It,
2126
2141
  children: /* @__PURE__ */ d(ki, {})
2127
2142
  }
2128
2143
  ),
2129
- /* @__PURE__ */ d("button", { type: "button", className: "aqmx-icon-button", "aria-label": t.imageFit, title: t.imageFit, "aria-pressed": o.mode === "fit", onClick: () => s(Cn), children: /* @__PURE__ */ d(wi, {}) })
2144
+ /* @__PURE__ */ d("button", { type: "button", className: "aqmx-icon-button", "aria-label": t.imageFit, title: t.imageFit, "aria-pressed": o.mode === "fit", onClick: () => s(Cn), children: /* @__PURE__ */ d(vi, {}) })
2130
2145
  ] }),
2131
- /* @__PURE__ */ d(Be, { scrollerProps: Ir, children: /* @__PURE__ */ d("img", { ref: m, className: "aqmx-document-image", src: e.url, alt: e.name, "data-aqmx-image-mode": o.mode, style: q, onLoad: (D) => c(D.currentTarget), "data-testid": "markdown-explorer-image" }) })
2146
+ /* @__PURE__ */ d(Be, { scrollerProps: $r, children: /* @__PURE__ */ d("img", { ref: m, className: "aqmx-document-image", src: e.url, alt: e.name, "data-aqmx-image-mode": o.mode, style: q, onLoad: (D) => c(D.currentTarget), "data-testid": "markdown-explorer-image" }) })
2132
2147
  ] });
2133
- }, Ni = async (e, t, n) => {
2148
+ }, Di = async (e, t, n) => {
2134
2149
  const r = await e.text(t, n);
2135
2150
  if (!("kind" in r)) throw n.reason;
2136
2151
  return r.kind === "text" ? { kind: "text", text: r.text, truncated: r.truncated } : { kind: "failure", retryable: r.failure.reason === "failed" };
2137
- }, $r = ve(null), lt = ve(void 0), _r = ve(null), ct = () => {
2138
- const e = se($r);
2152
+ }, _r = ve(null), lt = ve(void 0), Fr = ve(null), ct = () => {
2153
+ const e = se(_r);
2139
2154
  if (e === null) throw new Error("[markdown-explorer] document links must be rendered inside a document pane");
2140
2155
  return e;
2141
- }, Di = () => {
2142
- const e = se(_r);
2156
+ }, Pi = () => {
2157
+ const e = se(Fr);
2143
2158
  if (e === null) throw new Error("[markdown-explorer] table-of-contents entries must be rendered inside a document pane's links");
2144
2159
  return e;
2145
- }, dt = (e, t, n, r) => t.kind === "panel" ? Ne(e, { view: "tree", source: n, doc: r }) : t.view === "single" ? Ne(e, { view: "single", source: n, doc: r, overrides: t.overrides, embed: t.embed }) : Ne(e, { view: "tree", source: n, doc: r, overrides: t.overrides }), Pi = ({ children: e }) => {
2160
+ }, dt = (e, t, n, r) => t.kind === "panel" ? Ne(e, { view: "tree", source: n, doc: r }) : t.view === "single" ? Ne(e, { view: "single", source: n, doc: r, overrides: t.overrides, embed: t.embed }) : Ne(e, { view: "tree", source: n, doc: r, overrides: t.overrides }), Ii = ({ children: e }) => {
2146
2161
  const { config: t } = $(), n = ct(), r = Bt(), o = r.kind === "location" ? r.location.source : void 0, s = ot(dt(t, n.navigation, o, n.currentPath));
2147
- return /* @__PURE__ */ d(lt, { value: o, children: /* @__PURE__ */ d(_r, { value: s, children: e }) });
2148
- }, Ii = 'a[data-link-kind="doc"][data-doc-path]:not([data-doc-exists="false"])', $i = (e) => {
2149
- const t = e instanceof Element ? e.closest(Ii) : null;
2162
+ return /* @__PURE__ */ d(lt, { value: o, children: /* @__PURE__ */ d(Fr, { value: s, children: e }) });
2163
+ }, $i = 'a[data-link-kind="doc"][data-doc-path]:not([data-doc-exists="false"])', _i = (e) => {
2164
+ const t = e instanceof Element ? e.closest($i) : null;
2150
2165
  return t === null ? null : t.getAttribute("data-doc-path");
2151
- }, ut = (e) => !e.defaultPrevented && e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey, _i = ({ to: e, docPath: t, fragment: n, exists: r, className: o, attributes: s, onDocumentLink: a, scope: i, children: f }) => {
2166
+ }, ut = (e) => !e.defaultPrevented && e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey, Fi = ({ to: e, docPath: t, fragment: n, exists: r, className: o, attributes: s, onDocumentLink: a, scope: i, children: f }) => {
2152
2167
  const u = ot(e);
2153
2168
  return /* @__PURE__ */ d("a", { ...s, href: u, className: o, "data-link-kind": "doc", "data-doc-path": t, "data-doc-exists": r, onClick: (c) => {
2154
2169
  if (ut(c)) {
@@ -2159,10 +2174,10 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
2159
2174
  a(t, n);
2160
2175
  }
2161
2176
  }, children: f });
2162
- }, Fi = ({ href: e, docPath: t, docExists: n, className: r, attributes: o, children: s }) => {
2163
- const { config: a } = $(), i = ct(), f = se(lt), u = ai(e), { navigation: l } = i, c = `${dt(a, l, f, t)}${u}`, m = n === !1 ? "false" : void 0;
2164
- return l.kind === "page" ? /* @__PURE__ */ d(ba, { ...o, to: c, navigation: "follow-link", className: r, "data-link-kind": "doc", "data-doc-path": t, "data-doc-exists": m, children: s }) : /* @__PURE__ */ d(_i, { to: c, docPath: t, fragment: u, exists: m, className: r, attributes: o, onDocumentLink: l.onDocumentLink, scope: i, children: s });
2165
- }, qi = ({ className: e, attributes: t, children: n }) => {
2177
+ }, qi = ({ href: e, docPath: t, docExists: n, className: r, attributes: o, children: s }) => {
2178
+ const { config: a } = $(), i = ct(), f = se(lt), u = ii(e), { navigation: l } = i, c = `${dt(a, l, f, t)}${u}`, m = n === !1 ? "false" : void 0;
2179
+ return l.kind === "page" ? /* @__PURE__ */ d(Ea, { ...o, to: c, navigation: "follow-link", className: r, "data-link-kind": "doc", "data-doc-path": t, "data-doc-exists": m, children: s }) : /* @__PURE__ */ d(Fi, { to: c, docPath: t, fragment: u, exists: m, className: r, attributes: o, onDocumentLink: l.onDocumentLink, scope: i, children: s });
2180
+ }, Bi = ({ className: e, attributes: t, children: n }) => {
2166
2181
  const { labels: r } = $();
2167
2182
  return (
2168
2183
  /* @__PURE__ */ B("a", { ...t, className: e === void 0 ? "aqmx-document-inert-link" : `${e} aqmx-document-inert-link`, title: r.inertLink, "data-link-kind": "doc", "data-doc-exists": "false", children: [
@@ -2174,39 +2189,39 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
2174
2189
  ] })
2175
2190
  ] })
2176
2191
  );
2177
- }, Bi = ({ href: e, className: t, attributes: n, scope: r, children: o }) => {
2192
+ }, Ui = ({ href: e, className: t, attributes: n, scope: r, children: o }) => {
2178
2193
  const { config: s } = $(), a = se(lt), i = ot(`${dt(s, r.navigation, a, r.currentPath)}${e}`);
2179
2194
  return /* @__PURE__ */ d("a", { ...n, href: i, className: t, onClick: (u) => {
2180
2195
  ut(u) && (u.preventDefault(), r.scrollWithin(e));
2181
2196
  }, children: o });
2182
- }, Ui = ({ href: e, className: t, attributes: n, children: r }) => {
2197
+ }, Hi = ({ href: e, className: t, attributes: n, children: r }) => {
2183
2198
  const o = ct();
2184
2199
  return o.navigation.kind === "page" ? /* @__PURE__ */ d("a", { ...n, href: e, className: t, onClick: (a) => {
2185
2200
  if (!ut(a)) return;
2186
2201
  const i = a.currentTarget;
2187
2202
  e === "#" ? o.followEmptyFragment(a.nativeEvent) : i.href === i.ownerDocument.URL && o.followSameUrlJump(e, a.nativeEvent);
2188
- }, children: r }) : /* @__PURE__ */ d(Bi, { href: e, className: t, attributes: n, scope: o, children: r });
2189
- }, Hi = ({ href: e, kind: t, docPath: n, docExists: r, className: o, attributes: s, children: a }) => t === "doc" ? n === void 0 || !Ho(n) ? /* @__PURE__ */ d(qi, { className: o, attributes: s, children: a }) : /* @__PURE__ */ d(Fi, { href: e, docPath: n, docExists: r, className: o, attributes: s, children: a }) : e.startsWith("#") ? /* @__PURE__ */ d(Ui, { href: e, className: o, attributes: s, children: a }) : /* @__PURE__ */ d("a", { ...s, href: e, className: o, children: a }), zi = () => {
2203
+ }, children: r }) : /* @__PURE__ */ d(Ui, { href: e, className: t, attributes: n, scope: o, children: r });
2204
+ }, zi = ({ href: e, kind: t, docPath: n, docExists: r, className: o, attributes: s, children: a }) => t === "doc" ? n === void 0 || !zo(n) ? /* @__PURE__ */ d(Bi, { className: o, attributes: s, children: a }) : /* @__PURE__ */ d(qi, { href: e, docPath: n, docExists: r, className: o, attributes: s, children: a }) : e.startsWith("#") ? /* @__PURE__ */ d(Hi, { href: e, className: o, attributes: s, children: a }) : /* @__PURE__ */ d("a", { ...s, href: e, className: o, children: a }), ji = () => {
2190
2205
  const { config: e } = $(), t = ct(), n = se(lt), r = at();
2191
2206
  return F(
2192
2207
  (o, s) => {
2193
2208
  if (!ut(s)) return !0;
2194
2209
  s.preventDefault();
2195
- const a = Nr(o.id), { navigation: i } = t;
2210
+ const a = Dr(o.id), { navigation: i } = t;
2196
2211
  return i.kind === "panel" || Vt(s.currentTarget.ownerDocument.location.hash) === o.id ? (t.scrollWithin(a), !0) : (r(`${dt(e, i, n, t.currentPath)}${a}`, "follow-link"), !0);
2197
2212
  },
2198
2213
  [e, t, n, r]
2199
2214
  );
2200
- }, ji = () => {
2201
- const e = Di();
2202
- return F((t) => `${e}${Nr(t.id)}`, [e]);
2215
+ }, Vi = () => {
2216
+ const e = Pi();
2217
+ return F((t) => `${e}${Dr(t.id)}`, [e]);
2203
2218
  };
2204
- function Vi({
2219
+ function Zi({
2205
2220
  title: e,
2206
2221
  titleId: t,
2207
2222
  ...n
2208
2223
  }, r) {
2209
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
2224
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
2210
2225
  xmlns: "http://www.w3.org/2000/svg",
2211
2226
  viewBox: "0 0 20 20",
2212
2227
  fill: "currentColor",
@@ -2214,19 +2229,19 @@ function Vi({
2214
2229
  "data-slot": "icon",
2215
2230
  ref: r,
2216
2231
  "aria-labelledby": t
2217
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
2232
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
2218
2233
  id: t
2219
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
2234
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
2220
2235
  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"
2221
2236
  }));
2222
2237
  }
2223
- const Zi = /* @__PURE__ */ E.forwardRef(Vi);
2224
- function Wi({
2238
+ const Wi = /* @__PURE__ */ k.forwardRef(Zi);
2239
+ function Gi({
2225
2240
  title: e,
2226
2241
  titleId: t,
2227
2242
  ...n
2228
2243
  }, r) {
2229
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
2244
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
2230
2245
  xmlns: "http://www.w3.org/2000/svg",
2231
2246
  viewBox: "0 0 20 20",
2232
2247
  fill: "currentColor",
@@ -2234,21 +2249,21 @@ function Wi({
2234
2249
  "data-slot": "icon",
2235
2250
  ref: r,
2236
2251
  "aria-labelledby": t
2237
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
2252
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
2238
2253
  id: t
2239
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
2254
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
2240
2255
  fillRule: "evenodd",
2241
2256
  d: "M1 4.75C1 3.784 1.784 3 2.75 3h14.5c.966 0 1.75.784 1.75 1.75v10.515a1.75 1.75 0 0 1-1.75 1.75h-1.5c-.078 0-.155-.005-.23-.015H4.48c-.075.01-.152.015-.23.015h-1.5A1.75 1.75 0 0 1 1 15.265V4.75Zm16.5 7.385V11.01a.25.25 0 0 0-.25-.25h-1.5a.25.25 0 0 0-.25.25v1.125c0 .138.112.25.25.25h1.5a.25.25 0 0 0 .25-.25Zm0 2.005a.25.25 0 0 0-.25-.25h-1.5a.25.25 0 0 0-.25.25v1.125c0 .108.069.2.165.235h1.585a.25.25 0 0 0 .25-.25v-1.11Zm-15 1.11v-1.11a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v1.125a.25.25 0 0 1-.164.235H2.75a.25.25 0 0 1-.25-.25Zm2-4.24v1.125a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25V11.01a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25Zm13-2.005V7.88a.25.25 0 0 0-.25-.25h-1.5a.25.25 0 0 0-.25.25v1.125c0 .138.112.25.25.25h1.5a.25.25 0 0 0 .25-.25ZM4.25 7.63a.25.25 0 0 1 .25.25v1.125a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25V7.88a.25.25 0 0 1 .25-.25h1.5Zm0-3.13a.25.25 0 0 1 .25.25v1.125a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25V4.75a.25.25 0 0 1 .25-.25h1.5Zm11.5 1.625a.25.25 0 0 1-.25-.25V4.75a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v1.125a.25.25 0 0 1-.25.25h-1.5Zm-9 3.125a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Z",
2242
2257
  clipRule: "evenodd"
2243
2258
  }));
2244
2259
  }
2245
- const Gi = /* @__PURE__ */ E.forwardRef(Wi);
2246
- function Ki({
2260
+ const Ki = /* @__PURE__ */ k.forwardRef(Gi);
2261
+ function Yi({
2247
2262
  title: e,
2248
2263
  titleId: t,
2249
2264
  ...n
2250
2265
  }, r) {
2251
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
2266
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
2252
2267
  xmlns: "http://www.w3.org/2000/svg",
2253
2268
  viewBox: "0 0 20 20",
2254
2269
  fill: "currentColor",
@@ -2256,17 +2271,17 @@ function Ki({
2256
2271
  "data-slot": "icon",
2257
2272
  ref: r,
2258
2273
  "aria-labelledby": t
2259
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
2274
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
2260
2275
  id: t
2261
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
2276
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
2262
2277
  fillRule: "evenodd",
2263
2278
  d: "M17.721 1.599a.75.75 0 0 1 .279.583v11.29a2.25 2.25 0 0 1-1.774 2.2l-2.041.44a2.216 2.216 0 0 1-.938-4.332l2.662-.577a.75.75 0 0 0 .591-.733V6.112l-8 1.73v7.684a2.25 2.25 0 0 1-1.774 2.2l-2.042.44a2.216 2.216 0 1 1-.935-4.331l2.659-.573A.75.75 0 0 0 7 12.529V4.236a.75.75 0 0 1 .591-.733l9.5-2.054a.75.75 0 0 1 .63.15Z",
2264
2279
  clipRule: "evenodd"
2265
2280
  }));
2266
2281
  }
2267
- const Yi = /* @__PURE__ */ E.forwardRef(Ki), Xi = Object.freeze({ className: "aqmx-document-stage" }), Ji = () => () => {
2268
- }, Qi = () => navigator.pdfViewerEnabled !== !1, el = () => null, tl = ({ document: e }) => {
2269
- const { labels: t } = $(), n = re(Ji, Qi, el);
2282
+ const Xi = /* @__PURE__ */ k.forwardRef(Yi), Ji = Object.freeze({ className: "aqmx-document-stage" }), Qi = () => () => {
2283
+ }, el = () => navigator.pdfViewerEnabled !== !1, tl = () => null, nl = ({ document: e }) => {
2284
+ const { labels: t } = $(), n = re(Qi, el, tl);
2270
2285
  return n === null ? null : n ? /* @__PURE__ */ d("iframe", { className: "aqmx-document-frame", src: e.url, title: e.name, "data-testid": "markdown-explorer-media-player" }) : /* @__PURE__ */ B("div", { className: "aqmx-callout", role: "note", "data-testid": "markdown-explorer-pdf-not-shown", children: [
2271
2286
  /* @__PURE__ */ d("p", { className: "aqmx-callout-body", children: t.pdfNotShown }),
2272
2287
  /* @__PURE__ */ B("div", { className: "aqmx-callout-actions", children: [
@@ -2274,20 +2289,20 @@ const Yi = /* @__PURE__ */ E.forwardRef(Ki), Xi = Object.freeze({ className: "aq
2274
2289
  /* @__PURE__ */ d("a", { className: "aqmx-callout-action", href: e.url, download: e.name, "data-testid": "markdown-explorer-pdf-not-shown-download", children: t.download })
2275
2290
  ] })
2276
2291
  ] });
2277
- }, nl = (e) => {
2292
+ }, rl = (e) => {
2278
2293
  switch (e) {
2279
2294
  case "video":
2280
- return /* @__PURE__ */ d(Gi, {});
2295
+ return /* @__PURE__ */ d(Ki, {});
2281
2296
  case "audio":
2282
- return /* @__PURE__ */ d(Yi, {});
2297
+ return /* @__PURE__ */ d(Xi, {});
2283
2298
  case "pdf":
2284
- return /* @__PURE__ */ d(Zi, {});
2299
+ return /* @__PURE__ */ d(Wi, {});
2285
2300
  default: {
2286
2301
  const t = e;
2287
2302
  throw new RangeError(`[markdown-explorer] unknown media type ${String(t)}`);
2288
2303
  }
2289
2304
  }
2290
- }, rl = ({ document: e }) => {
2305
+ }, ol = ({ document: e }) => {
2291
2306
  const { labels: t } = $();
2292
2307
  switch (e.mediaType) {
2293
2308
  case "video":
@@ -2299,15 +2314,15 @@ const Yi = /* @__PURE__ */ E.forwardRef(Ki), Xi = Object.freeze({ className: "aq
2299
2314
  /* @__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 })
2300
2315
  );
2301
2316
  case "pdf":
2302
- return /* @__PURE__ */ d(tl, { document: e });
2317
+ return /* @__PURE__ */ d(nl, { document: e });
2303
2318
  default: {
2304
2319
  const n = e.mediaType;
2305
2320
  throw new RangeError(`[markdown-explorer] unknown media type ${String(n)}`);
2306
2321
  }
2307
2322
  }
2308
- }, ol = ({ document: e }) => /* @__PURE__ */ B("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-media-view", "data-aqmx-media-type": e.mediaType, children: [
2309
- /* @__PURE__ */ d(Ue, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: nl(e.mediaType) }),
2310
- /* @__PURE__ */ d(Be, { scrollerProps: Xi, children: /* @__PURE__ */ d(rl, { document: e }) })
2323
+ }, sl = ({ document: e }) => /* @__PURE__ */ B("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-media-view", "data-aqmx-media-type": e.mediaType, children: [
2324
+ /* @__PURE__ */ d(Ue, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: rl(e.mediaType) }),
2325
+ /* @__PURE__ */ d(Be, { scrollerProps: Ji, children: /* @__PURE__ */ d(ol, { document: e }) })
2311
2326
  ] }), Zt = (e) => {
2312
2327
  switch (e.kind) {
2313
2328
  case "markdown":
@@ -2319,19 +2334,19 @@ const Yi = /* @__PURE__ */ E.forwardRef(Ki), Xi = Object.freeze({ className: "aq
2319
2334
  default:
2320
2335
  return null;
2321
2336
  }
2322
- }, sl = (e) => {
2337
+ }, al = (e) => {
2323
2338
  const { documents: t } = $(), n = F(() => t.peek(e), [t, e]), r = F(() => t.peekSeeded(e), [t, e]), o = re(t.subscribe, n, r), s = ge(o);
2324
2339
  return s === null ? null : Zt(s.document);
2325
- }, al = (e) => {
2340
+ }, il = (e) => {
2326
2341
  const { config: t } = $(), n = at(), r = F(() => n(Ne(t, { ...e, markup: !e.markup }), "browse"), [t, n, e]);
2327
2342
  return X(() => ({ shown: e.markup, toggle: r }), [e.markup, r]);
2328
2343
  };
2329
- function il({
2344
+ function ll({
2330
2345
  title: e,
2331
2346
  titleId: t,
2332
2347
  ...n
2333
2348
  }, r) {
2334
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
2349
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
2335
2350
  xmlns: "http://www.w3.org/2000/svg",
2336
2351
  viewBox: "0 0 20 20",
2337
2352
  fill: "currentColor",
@@ -2339,24 +2354,24 @@ function il({
2339
2354
  "data-slot": "icon",
2340
2355
  ref: r,
2341
2356
  "aria-labelledby": t
2342
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
2357
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
2343
2358
  id: t
2344
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
2359
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
2345
2360
  fillRule: "evenodd",
2346
2361
  d: "M.99 5.24A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25l.01 9.5A2.25 2.25 0 0 1 16.76 17H3.26A2.267 2.267 0 0 1 1 14.74l-.01-9.5Zm8.26 9.52v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75v.615c0 .414.336.75.75.75h5.373a.75.75 0 0 0 .627-.74Zm1.5 0a.75.75 0 0 0 .627.74h5.373a.75.75 0 0 0 .75-.75v-.615a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75v.625Zm6.75-3.63v-.625a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75v.625c0 .414.336.75.75.75h5.25a.75.75 0 0 0 .75-.75Zm-8.25 0v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75v.625c0 .414.336.75.75.75H8.5a.75.75 0 0 0 .75-.75ZM17.5 7.5v-.625a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75V7.5c0 .414.336.75.75.75h5.25a.75.75 0 0 0 .75-.75Zm-8.25 0v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75V7.5c0 .414.336.75.75.75H8.5a.75.75 0 0 0 .75-.75Z",
2347
2362
  clipRule: "evenodd"
2348
2363
  }));
2349
2364
  }
2350
- const ll = /* @__PURE__ */ E.forwardRef(il), cl = 100, dl = 32767, Xe = Object.freeze({ maxCells: fn, maxColumns: fn / cl, maxCellLength: dl }), Fr = 44, qr = 10, Br = 13, Ze = '"', Dn = (e, t) => {
2365
+ const cl = /* @__PURE__ */ k.forwardRef(ll), dl = 100, ul = 32767, Xe = Object.freeze({ maxCells: fn, maxColumns: fn / dl, maxCellLength: ul }), qr = 44, Br = 10, Ur = 13, Ze = '"', Dn = (e, t) => {
2351
2366
  let n = t;
2352
2367
  for (; n < e.length; ) {
2353
2368
  const r = e.charCodeAt(n);
2354
- if (r === Fr || r === qr || r === Br) return n;
2369
+ if (r === qr || r === Br || r === Ur) return n;
2355
2370
  n += 1;
2356
2371
  }
2357
2372
  return n;
2358
2373
  };
2359
- function* ul(e, t) {
2374
+ function* fl(e, t) {
2360
2375
  let n = [], r = 0;
2361
2376
  for (; ; ) {
2362
2377
  let o;
@@ -2387,15 +2402,15 @@ function* ul(e, t) {
2387
2402
  return;
2388
2403
  }
2389
2404
  const s = e.charCodeAt(r);
2390
- if (r += 1, s !== Fr && (yield n, n = [], s === Br && e.charCodeAt(r) === qr && (r += 1), r >= e.length))
2405
+ if (r += 1, s !== qr && (yield n, n = [], s === Ur && e.charCodeAt(r) === Br && (r += 1), r >= e.length))
2391
2406
  return;
2392
2407
  }
2393
2408
  }
2394
- const fl = (e, t, n) => t === "csv" ? ul(e, n) : n === "whole" ? cs(e) : ds(e), ml = (e, t) => {
2409
+ const ml = (e, t, n) => t === "csv" ? fl(e, n) : n === "whole" ? ds(e) : us(e), hl = (e, t) => {
2395
2410
  if (e.length <= t) return e;
2396
2411
  const n = e.charCodeAt(t - 1);
2397
2412
  return e.slice(0, n >= 55296 && n <= 56319 ? t - 1 : t);
2398
- }, Ur = (e, t) => {
2413
+ }, Hr = (e, t) => {
2399
2414
  const n = [];
2400
2415
  let r = 0, o = !1, s = !1;
2401
2416
  for (const i of e) {
@@ -2404,17 +2419,17 @@ const fl = (e, t, n) => t === "csv" ? ul(e, n) : n === "whole" ? cs(e) : ds(e),
2404
2419
  s = !0;
2405
2420
  break;
2406
2421
  }
2407
- const l = f.some((c) => c.length > t.maxCellLength) ? f.map((c) => ml(c, t.maxCellLength)) : f;
2422
+ const l = f.some((c) => c.length > t.maxCellLength) ? f.map((c) => hl(c, t.maxCellLength)) : f;
2408
2423
  l !== i && (o = !0), n.push(l), r = u;
2409
2424
  }
2410
2425
  return { rows: n.map((i) => i.length === r ? i : [...i, ...Array(r - i.length).fill("")]), truncated: s || o, full: s };
2411
- }, yt = (e, t, n, r, o) => {
2412
- const s = Po(e, t, r);
2413
- if (s === null) return { kind: "unreadable", code: "encoding", encodings: Io(e, t, r) };
2426
+ }, Et = (e, t, n, r, o) => {
2427
+ const s = Io(e, t, r);
2428
+ if (s === null) return { kind: "unreadable", code: "encoding", encodings: $o(e, t, r) };
2414
2429
  if (s.includes("\0")) return { kind: "unreadable", code: "binary" };
2415
- const a = Ur(fl(s, n, t ? "whole" : "prefix"), o);
2430
+ const a = Hr(ml(s, n, t ? "whole" : "prefix"), o);
2416
2431
  return t ? a.truncated || a.rows.some((i) => i.some((f) => f !== "")) ? { kind: "table", table: a } : { kind: "empty" } : a.rows.length === 0 ? { kind: "unreadable", code: "long-row" } : { kind: "table", table: { ...a, truncated: !0 } };
2417
- }, hl = Object.freeze({ maxPartBytes: 64 * 1024 * 1024, maxSheets: 256 }), Hr = (e) => {
2432
+ }, pl = Object.freeze({ maxPartBytes: 64 * 1024 * 1024, maxSheets: 256 }), zr = (e) => {
2418
2433
  const t = [];
2419
2434
  let n = 0, r = !1;
2420
2435
  const o = (s) => {
@@ -2440,14 +2455,14 @@ const fl = (e, t, n) => t === "csv" ? ul(e, n) : n === "whole" ? cs(e) : ds(e),
2440
2455
  for (let c = 0; c < i && !r; c += 1) o(c === 0 ? u : [...u]);
2441
2456
  },
2442
2457
  full: () => r,
2443
- table: () => Ur(t, e)
2458
+ table: () => Hr(t, e)
2444
2459
  };
2445
- }, pl = (e) => {
2460
+ }, gl = (e) => {
2446
2461
  const t = Array.from(e.currentTarget.querySelectorAll('[role="tab"]')), n = e.target instanceof HTMLButtonElement ? t.indexOf(e.target) : -1;
2447
2462
  if (n === -1) return;
2448
2463
  const r = getComputedStyle(e.currentTarget).direction === "rtl" ? "ArrowRight" : "ArrowLeft", o = r === "ArrowLeft" ? "ArrowRight" : "ArrowLeft", s = 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;
2449
2464
  s !== null && (e.preventDefault(), t[s]?.focus());
2450
- }, gl = ({ names: e, selected: t, onSelect: n, label: r, tabIdOf: o, panelId: s }) => /* @__PURE__ */ d("div", { role: "tablist", "aria-label": r, className: "aqmx-sheet-tabs", "data-testid": "markdown-explorer-spreadsheet-sheets", onKeyDown: pl, children: e.map((a, i) => /* @__PURE__ */ d(
2465
+ }, wl = ({ names: e, selected: t, onSelect: n, label: r, tabIdOf: o, panelId: s }) => /* @__PURE__ */ d("div", { role: "tablist", "aria-label": r, className: "aqmx-sheet-tabs", "data-testid": "markdown-explorer-spreadsheet-sheets", onKeyDown: gl, children: e.map((a, i) => /* @__PURE__ */ d(
2451
2466
  "button",
2452
2467
  {
2453
2468
  type: "button",
@@ -2462,8 +2477,8 @@ const fl = (e, t, n) => t === "csv" ? ul(e, n) : n === "whole" ? cs(e) : ds(e),
2462
2477
  children: a
2463
2478
  },
2464
2479
  i
2465
- )) }), zr = 64 * 1024, wl = (e) => {
2466
- let t = new Uint8Array(Math.min(e, zr)), n = 0;
2480
+ )) }), jr = 64 * 1024, vl = (e) => {
2481
+ let t = new Uint8Array(Math.min(e, jr)), n = 0;
2467
2482
  return {
2468
2483
  append: (r) => {
2469
2484
  if (n + r.byteLength > t.byteLength) {
@@ -2475,46 +2490,46 @@ const fl = (e, t, n) => t === "csv" ? ul(e, n) : n === "whole" ? cs(e) : ds(e),
2475
2490
  bytes: () => t.subarray(0, n),
2476
2491
  length: () => n
2477
2492
  };
2478
- }, vl = async (e) => {
2493
+ }, bl = async (e) => {
2479
2494
  for (; ; ) {
2480
2495
  const { done: t, value: n } = await e.read();
2481
2496
  if (t) return !0;
2482
2497
  if (n.byteLength > 0) return !1;
2483
2498
  }
2484
- }, bl = async (e, t) => {
2485
- const { format: n, legacyEncoding: r, maxBytes: o, budget: s } = t, a = e.getReader(), i = wl(o);
2486
- let f = zr;
2499
+ }, El = async (e, t) => {
2500
+ const { format: n, legacyEncoding: r, maxBytes: o, budget: s } = t, a = e.getReader(), i = vl(o);
2501
+ let f = jr;
2487
2502
  try {
2488
2503
  for (; ; ) {
2489
2504
  const { done: u, value: l } = await a.read();
2490
- if (u) return yt(i.bytes(), !0, n, r, s);
2505
+ if (u) return Et(i.bytes(), !0, n, r, s);
2491
2506
  const c = o - i.length();
2492
2507
  if (i.append(l.byteLength > c ? l.subarray(0, c) : l), i.length() === o) {
2493
- const g = l.byteLength <= c && await vl(a);
2494
- return yt(i.bytes(), g, n, r, s);
2508
+ const g = l.byteLength <= c && await bl(a);
2509
+ return Et(i.bytes(), g, n, r, s);
2495
2510
  }
2496
2511
  if (i.length() < f) continue;
2497
2512
  f = i.length() * 2;
2498
- const m = yt(i.bytes(), !1, n, r, s);
2513
+ const m = Et(i.bytes(), !1, n, r, s);
2499
2514
  if (m.kind === "unreadable" && m.code !== "long-row" || m.kind === "table" && m.table.full) return m;
2500
2515
  }
2501
2516
  } finally {
2502
2517
  a.cancel().catch(() => {
2503
2518
  });
2504
2519
  }
2505
- }, jr = async (e, t, n, r) => {
2520
+ }, Vr = async (e, t, n, r) => {
2506
2521
  const o = await e.asset(st(t), r);
2507
2522
  if (o.status === "cancelled") return null;
2508
2523
  if (o.status === "error") return { kind: "failure", failure: o.failure };
2509
2524
  let s;
2510
2525
  try {
2511
- s = await bl(o.body, n);
2526
+ s = await El(o.body, n);
2512
2527
  } catch {
2513
2528
  return r.aborted ? null : { kind: "failure", failure: { reason: "failed" } };
2514
2529
  }
2515
2530
  return r.aborted ? null : s.kind === "table" ? { kind: "table", rows: s.table.rows, truncated: s.table.truncated } : s;
2516
2531
  }, Wt = (e, t, n) => {
2517
- const { documents: r, labels: o } = $(), s = Va(), a = F(() => r.answerStampOf(e), [r, e]), i = re(r.subscribe, a, a), [f, u] = V(0), l = X(() => ({ read: n, stamp: i, attempt: f }), [n, i, f]), [c, m] = V({ settled: null, shown: null, failure: null }), g = U(null), v = le((O, R) => {
2532
+ const { documents: r, labels: o } = $(), s = Za(), a = F(() => r.answerStampOf(e), [r, e]), i = re(r.subscribe, a, a), [f, u] = V(0), l = X(() => ({ read: n, stamp: i, attempt: f }), [n, i, f]), [c, m] = V({ settled: null, shown: null, failure: null }), g = U(null), v = le((O, R) => {
2518
2533
  if (g.current?.settle(R.stamp, O.kind === "failure" ? O.failure : null), O.kind === "read") {
2519
2534
  m({ settled: R, shown: O.value, failure: null });
2520
2535
  return;
@@ -2536,18 +2551,18 @@ const fl = (e, t, n) => t === "csv" ? ul(e, n) : n === "whole" ? cs(e) : ds(e),
2536
2551
  R !== null && !O.signal.aborted && v(R, l);
2537
2552
  }), () => O.abort();
2538
2553
  }, [l]);
2539
- const y = c.settled !== l && (c.shown !== null || c.failure !== null);
2540
- Y(() => y ? s.holdBusy() : void 0, [y, s]);
2554
+ const E = c.settled !== l && (c.shown !== null || c.failure !== null);
2555
+ Y(() => E ? s.holdBusy() : void 0, [E, s]);
2541
2556
  const T = F(() => u((O) => O + 1), []);
2542
2557
  return { shown: c.shown, failure: c.failure, retry: T };
2543
- }, Vr = (e, t) => {
2558
+ }, Zr = (e, t) => {
2544
2559
  const n = {};
2545
2560
  for (const r of Object.keys(Je[t])) {
2546
2561
  const o = e[qt(r)];
2547
2562
  o !== Je[t][r].text && (n[r] = o);
2548
2563
  }
2549
2564
  return n;
2550
- }, yl = (e, t) => Object.fromEntries(Object.entries(Vr(e, t)).map(([n, r]) => [`spreadsheet${n.charAt(0).toUpperCase()}${n.slice(1)}`, r])), kl = (e, t) => ({
2565
+ }, yl = (e, t) => Object.fromEntries(Object.entries(Zr(e, t)).map(([n, r]) => [`spreadsheet${n.charAt(0).toUpperCase()}${n.slice(1)}`, r])), kl = (e, t) => ({
2551
2566
  ...yl(e, t),
2552
2567
  loading: e.viewerLoading,
2553
2568
  errorPrefix: e.viewerErrorPrefix,
@@ -2587,6 +2602,9 @@ const fl = (e, t, n) => t === "csv" ? ul(e, n) : n === "whole" ? cs(e) : ds(e),
2587
2602
  mermaidPanDown: e.viewerMermaidPanDown,
2588
2603
  mermaidPanLeft: e.viewerMermaidPanLeft,
2589
2604
  mermaidPanRight: e.viewerMermaidPanRight,
2605
+ mermaidFullscreen: e.viewerMermaidFullscreen,
2606
+ mermaidExitFullscreen: e.viewerMermaidExitFullscreen,
2607
+ mermaidFullscreenDialog: e.viewerMermaidFullscreenDialog,
2590
2608
  mermaidDiagram: e.viewerMermaidDiagram,
2591
2609
  mermaidRetry: e.viewerMermaidRetry,
2592
2610
  embeddedVideo: e.viewerEmbeddedVideo,
@@ -2605,29 +2623,26 @@ const fl = (e, t, n) => t === "csv" ? ul(e, n) : n === "whole" ? cs(e) : ds(e),
2605
2623
  svgImageCopyFailed: e.viewerSvgImageCopyFailed,
2606
2624
  svgImageCopyImage: e.viewerSvgImageCopyImage,
2607
2625
  svgImageCopiedImage: e.viewerSvgImageCopiedImage,
2608
- svgImageCopyImageFailed: e.viewerSvgImageCopyImageFailed
2609
- }), Zr = (e, t, n) => {
2610
- if (t !== void 0) return t;
2611
- if (n !== void 0) return n;
2612
- const [r] = e.documentStyles;
2613
- if (r === void 0) throw new Error("[markdown-explorer] the configuration has no document style");
2614
- return r.name;
2615
- }, Wr = (e, t) => e !== void 0 ? e : t !== void 0 ? t : fs;
2626
+ svgImageCopyImageFailed: e.viewerSvgImageCopyImageFailed,
2627
+ svgImageFullscreen: e.viewerSvgImageFullscreen,
2628
+ svgImageExitFullscreen: e.viewerSvgImageExitFullscreen,
2629
+ svgImageFullscreenDialog: e.viewerSvgImageFullscreenDialog
2630
+ }), Wr = (e, t, n) => t !== void 0 ? t : n !== void 0 ? n : e.defaultDocumentStyle, Gr = (e, t) => e !== void 0 ? e : t !== void 0 ? t : ms;
2616
2631
  class ne extends Error {
2617
2632
  refusal;
2618
2633
  constructor(t, n) {
2619
2634
  super(n), this.name = "WorkbookError", this.refusal = t;
2620
2635
  }
2621
2636
  }
2622
- const El = /* @__PURE__ */ new Map([
2637
+ const Sl = /* @__PURE__ */ new Map([
2623
2638
  ["lt", "<"],
2624
2639
  ["gt", ">"],
2625
2640
  ["amp", "&"],
2626
2641
  ["quot", '"'],
2627
2642
  ["apos", "'"]
2628
- ]), Sl = /&(#x[0-9A-Fa-f]+|#[0-9]+|[A-Za-z_][A-Za-z0-9._-]*);/gu, xl = /([^\s=/>]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/gu, Tl = /^[^\s/>]+/u, Se = (e) => {
2643
+ ]), xl = /&(#x[0-9A-Fa-f]+|#[0-9]+|[A-Za-z_][A-Za-z0-9._-]*);/gu, Tl = /([^\s=/>]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/gu, Rl = /^[^\s/>]+/u, Se = (e) => {
2629
2644
  throw new ne("not-workbook", `the XML ${e}`);
2630
- }, Pn = (e) => Number.isInteger(e) && e >= 0 && e <= 1114111 ? String.fromCodePoint(e) : Se(`refers to the code point ${e}`), Gr = (e) => e.includes("&") ? e.replace(Sl, (t, n) => n.startsWith("#x") ? Pn(Number.parseInt(n.slice(2), 16)) : n.startsWith("#") ? Pn(Number.parseInt(n.slice(1), 10)) : El.get(n) ?? Se(`names the undeclared entity ${t}`)) : e, $t = (e) => e.slice(e.indexOf(":") + 1), Rl = (e, t) => {
2645
+ }, Pn = (e) => Number.isInteger(e) && e >= 0 && e <= 1114111 ? String.fromCodePoint(e) : Se(`refers to the code point ${e}`), Kr = (e) => e.includes("&") ? e.replace(xl, (t, n) => n.startsWith("#x") ? Pn(Number.parseInt(n.slice(2), 16)) : n.startsWith("#") ? Pn(Number.parseInt(n.slice(1), 10)) : Sl.get(n) ?? Se(`names the undeclared entity ${t}`)) : e, $t = (e) => e.slice(e.indexOf(":") + 1), Cl = (e, t) => {
2631
2646
  let n = "";
2632
2647
  for (let r = t; r < e.length; r += 1) {
2633
2648
  const o = e[r];
@@ -2639,18 +2654,18 @@ const El = /* @__PURE__ */ new Map([
2639
2654
  return r;
2640
2655
  }
2641
2656
  return -1;
2642
- }, Cl = (e) => {
2657
+ }, Ol = (e) => {
2643
2658
  const t = /* @__PURE__ */ new Map();
2644
- for (const n of e.matchAll(xl)) t.set($t(n[1] ?? ""), Gr(n[2] ?? n[3] ?? ""));
2659
+ for (const n of e.matchAll(Tl)) t.set($t(n[1] ?? ""), Kr(n[2] ?? n[3] ?? ""));
2645
2660
  return t;
2646
- }, Kr = (e, t) => {
2661
+ }, Yr = (e, t) => {
2647
2662
  let n = "";
2648
2663
  const r = () => {
2649
2664
  let o = 0;
2650
2665
  for (; !t(); ) {
2651
2666
  const s = n.indexOf("<", o);
2652
2667
  if (s === -1) break;
2653
- if (s > o && (e.text?.(Gr(n.slice(o, s))), o = s), n.startsWith("<!--", s)) {
2668
+ if (s > o && (e.text?.(Kr(n.slice(o, s))), o = s), n.startsWith("<!--", s)) {
2654
2669
  const u = n.indexOf("-->", s + 4);
2655
2670
  if (u === -1) break;
2656
2671
  o = u + 3;
@@ -2670,14 +2685,14 @@ const El = /* @__PURE__ */ new Map([
2670
2685
  o = u + 2;
2671
2686
  continue;
2672
2687
  }
2673
- const i = Rl(n, s + 1);
2688
+ const i = Cl(n, s + 1);
2674
2689
  if (i === -1) break;
2675
2690
  const f = n.slice(s + 1, i);
2676
2691
  if (f.startsWith("/"))
2677
2692
  e.end?.($t(f.slice(1).trim()));
2678
2693
  else {
2679
- const u = f.endsWith("/"), l = u ? f.slice(0, -1) : f, c = Tl.exec(l)?.[0] ?? Se("has a tag without a name"), m = $t(c);
2680
- e.start?.(m, Cl(l.slice(c.length)), u), u && e.end?.(m);
2694
+ const u = f.endsWith("/"), l = u ? f.slice(0, -1) : f, c = Rl.exec(l)?.[0] ?? Se("has a tag without a name"), m = $t(c);
2695
+ e.start?.(m, Ol(l.slice(c.length)), u), u && e.end?.(m);
2681
2696
  }
2682
2697
  o = i + 1;
2683
2698
  }
@@ -2692,7 +2707,7 @@ const El = /* @__PURE__ */ new Map([
2692
2707
  }
2693
2708
  };
2694
2709
  }, He = async (e, t, n) => {
2695
- const r = Kr(t, n), o = new TextDecoder("utf-8", { fatal: !0 }), s = e.getReader();
2710
+ const r = Yr(t, n), o = new TextDecoder("utf-8", { fatal: !0 }), s = e.getReader();
2696
2711
  try {
2697
2712
  for (; !n(); ) {
2698
2713
  const { done: a, value: i } = await s.read();
@@ -2709,44 +2724,44 @@ const El = /* @__PURE__ */ new Map([
2709
2724
  s.cancel().catch(() => {
2710
2725
  });
2711
2726
  }
2712
- }, Ol = 101010256, Ll = 33639248, Ml = 67324752, Yr = 22, Al = 65535, In = 46, $n = 30, Nl = 1, _n = 0, Dl = 8, Pl = 65535, Le = 4294967295, Il = new TextDecoder("utf-8"), ae = (e) => {
2727
+ }, Ll = 101010256, Ml = 33639248, Al = 67324752, Xr = 22, Nl = 65535, In = 46, $n = 30, Dl = 1, _n = 0, Pl = 8, Il = 65535, Le = 4294967295, $l = new TextDecoder("utf-8"), ae = (e) => {
2713
2728
  throw new ne("not-workbook", `the ZIP package ${e}`);
2714
- }, $l = (e) => {
2715
- const t = e.byteLength - Yr, n = Math.max(0, t - Al);
2729
+ }, _l = (e) => {
2730
+ const t = e.byteLength - Xr, n = Math.max(0, t - Nl);
2716
2731
  for (let r = t; r >= n; r -= 1)
2717
- if (e.getUint32(r, !0) === Ol) return r;
2732
+ if (e.getUint32(r, !0) === Ll) return r;
2718
2733
  return ae("has no end of central directory record");
2719
- }, _l = (e) => {
2720
- if (e.byteLength < Yr) return ae("is shorter than its end record");
2721
- const t = new DataView(e.buffer, e.byteOffset, e.byteLength), n = $l(t), r = t.getUint16(n + 4, !0), o = t.getUint16(n + 6, !0), s = t.getUint16(n + 10, !0), a = t.getUint32(n + 12, !0), i = t.getUint32(n + 16, !0);
2734
+ }, Fl = (e) => {
2735
+ if (e.byteLength < Xr) return ae("is shorter than its end record");
2736
+ const t = new DataView(e.buffer, e.byteOffset, e.byteLength), n = _l(t), r = t.getUint16(n + 4, !0), o = t.getUint16(n + 6, !0), s = t.getUint16(n + 10, !0), a = t.getUint32(n + 12, !0), i = t.getUint32(n + 16, !0);
2722
2737
  if (r !== 0 || o !== 0) return ae("spans several disks");
2723
- if (s === Pl || a === Le || i === Le) return ae("is a ZIP64 package");
2738
+ if (s === Il || a === Le || i === Le) return ae("is a ZIP64 package");
2724
2739
  if (i + a > n) return ae("has a central directory past its end record");
2725
2740
  const f = /* @__PURE__ */ new Map();
2726
2741
  let u = i;
2727
2742
  for (let l = 0; l < s; l += 1) {
2728
- if (u + In > n || t.getUint32(u, !0) !== Ll) return ae("has a malformed central directory");
2729
- const c = t.getUint16(u + 8, !0), m = t.getUint16(u + 10, !0), g = t.getUint32(u + 20, !0), v = t.getUint32(u + 24, !0), y = t.getUint16(u + 28, !0), T = t.getUint16(u + 30, !0), O = t.getUint16(u + 32, !0), R = t.getUint32(u + 42, !0), q = u + In;
2730
- if (q + y > n) return ae("has a name past its central directory");
2731
- const D = Il.decode(e.subarray(q, q + y));
2743
+ if (u + In > n || t.getUint32(u, !0) !== Ml) return ae("has a malformed central directory");
2744
+ const c = t.getUint16(u + 8, !0), m = t.getUint16(u + 10, !0), g = t.getUint32(u + 20, !0), v = t.getUint32(u + 24, !0), E = t.getUint16(u + 28, !0), T = t.getUint16(u + 30, !0), O = t.getUint16(u + 32, !0), R = t.getUint32(u + 42, !0), q = u + In;
2745
+ if (q + E > n) return ae("has a name past its central directory");
2746
+ const D = $l.decode(e.subarray(q, q + E));
2732
2747
  if (g === Le || v === Le || R === Le) return ae("has a ZIP64 entry");
2733
2748
  if (!D.endsWith("/")) {
2734
2749
  if (f.has(D)) return ae(`names ${D} twice`);
2735
- f.set(D, { name: D, encrypted: (c & Nl) !== 0, method: m, compressedSize: g, uncompressedSize: v, localHeaderOffset: R });
2750
+ f.set(D, { name: D, encrypted: (c & Dl) !== 0, method: m, compressedSize: g, uncompressedSize: v, localHeaderOffset: R });
2736
2751
  }
2737
- u = q + y + T + O;
2752
+ u = q + E + T + O;
2738
2753
  }
2739
2754
  return { bytes: e, entries: f };
2740
- }, Fl = (e, t) => {
2755
+ }, ql = (e, t) => {
2741
2756
  const { bytes: n } = e, r = new DataView(n.buffer, n.byteOffset, n.byteLength), o = t.localHeaderOffset;
2742
- if (o + $n > n.byteLength || r.getUint32(o, !0) !== Ml) return ae(`has no local header for ${t.name}`);
2757
+ if (o + $n > n.byteLength || r.getUint32(o, !0) !== Al) return ae(`has no local header for ${t.name}`);
2743
2758
  const s = o + $n + r.getUint16(o + 26, !0) + r.getUint16(o + 28, !0), a = s + t.compressedSize;
2744
2759
  return a > n.byteLength ? ae(`has the data of ${t.name} past its end`) : { start: s, end: a };
2745
- }, Xr = (e) => new ReadableStream({
2760
+ }, Jr = (e) => new ReadableStream({
2746
2761
  start(t) {
2747
2762
  e.byteLength > 0 && t.enqueue(e), t.close();
2748
2763
  }
2749
- }), ql = (e) => Xr(e).pipeThrough(new DecompressionStream("deflate-raw")), Bl = (e, t) => {
2764
+ }), Bl = (e) => Jr(e).pipeThrough(new DecompressionStream("deflate-raw")), Ul = (e, t) => {
2750
2765
  let n = 0;
2751
2766
  return new TransformStream({
2752
2767
  transform(r, o) {
@@ -2761,10 +2776,10 @@ const El = /* @__PURE__ */ new Map([
2761
2776
  const r = e.entries.get(t);
2762
2777
  if (r === void 0) return null;
2763
2778
  if (r.encrypted) throw new ne("encrypted", `${t} is encrypted`);
2764
- if (r.method !== _n && r.method !== Dl) return ae(`compresses ${t} with method ${r.method}`);
2779
+ if (r.method !== _n && r.method !== Pl) return ae(`compresses ${t} with method ${r.method}`);
2765
2780
  if (r.uncompressedSize > n) throw new ne("too-large", `${t} declares ${r.uncompressedSize} bytes`);
2766
- const { start: o, end: s } = Fl(e, r), a = e.bytes.subarray(o, s);
2767
- return (r.method === _n ? Xr(a) : ql(a)).pipeThrough(Bl(t, n));
2781
+ const { start: o, end: s } = ql(e, r), a = e.bytes.subarray(o, s);
2782
+ return (r.method === _n ? Jr(a) : Bl(a)).pipeThrough(Ul(t, n));
2768
2783
  }, rt = async (e, t, n) => {
2769
2784
  const r = Fe(e, t, n);
2770
2785
  if (r === null) return null;
@@ -2783,10 +2798,10 @@ const El = /* @__PURE__ */ new Map([
2783
2798
  } finally {
2784
2799
  s.releaseLock();
2785
2800
  }
2786
- }, Fn = "content.xml", Ul = "META-INF/manifest.xml", Jr = (e) => {
2801
+ }, Fn = "content.xml", Hl = "META-INF/manifest.xml", Qr = (e) => {
2787
2802
  throw new ne("not-workbook", `the spreadsheet ${e}`);
2788
- }, qn = (e, t) => Fe(e, Fn, t.maxPartBytes) ?? Jr(`has no ${Fn}`), Hl = async (e, t) => {
2789
- const n = Fe(e, Ul, t.maxPartBytes);
2803
+ }, qn = (e, t) => Fe(e, Fn, t.maxPartBytes) ?? Qr(`has no ${Fn}`), zl = async (e, t) => {
2804
+ const n = Fe(e, Hl, t.maxPartBytes);
2790
2805
  if (n === null) return !1;
2791
2806
  let r = !1;
2792
2807
  return await He(
@@ -2798,7 +2813,7 @@ const El = /* @__PURE__ */ new Map([
2798
2813
  },
2799
2814
  () => r
2800
2815
  ), r;
2801
- }, zl = async (e) => {
2816
+ }, jl = async (e) => {
2802
2817
  const t = [], n = /* @__PURE__ */ new Set();
2803
2818
  let r = null, o = 0;
2804
2819
  return await He(
@@ -2813,22 +2828,22 @@ const El = /* @__PURE__ */ new Map([
2813
2828
  },
2814
2829
  () => !1
2815
2830
  ), { tables: t, hidingStyles: n };
2816
- }, kt = (e) => {
2831
+ }, yt = (e) => {
2817
2832
  const t = Number(e);
2818
2833
  return Number.isInteger(t) && t > 0 ? t : 1;
2819
- }, jl = async (e, t, n) => {
2820
- const r = Hr(n);
2834
+ }, Vl = async (e, t, n) => {
2835
+ const r = zr(n);
2821
2836
  let o = 0, s = 0, a = !1, i = !1, f = 0, u = 1, l = /* @__PURE__ */ new Map(), c = 0, m = null;
2822
2837
  return await He(
2823
2838
  e,
2824
2839
  {
2825
- start: (g, v, y) => {
2840
+ start: (g, v, E) => {
2826
2841
  if (g === "table") {
2827
- s === 0 && (a = o === t, o += 1), y || (s += 1);
2842
+ s === 0 && (a = o === t, o += 1), E || (s += 1);
2828
2843
  return;
2829
2844
  }
2830
- !a || s !== 1 || (g === "table-row" ? (u = kt(v.get("number-rows-repeated")), l = /* @__PURE__ */ new Map(), c = 0) : g === "table-cell" || g === "covered-table-cell" ? m = { repeat: kt(v.get("number-columns-repeated")), covered: g === "covered-table-cell", parts: [], paragraphs: 0, paragraphDepth: 0, annotationDepth: 0 } : m !== null && m.annotationDepth === 0 && (g === "annotation" && !y ? m.annotationDepth += 1 : g === "p" || g === "h" ? (m.paragraphs > 0 && m.parts.push(`
2831
- `), m.paragraphs += 1, y || (m.paragraphDepth += 1)) : m.paragraphDepth > 0 && (g === "s" ? m.parts.push(" ".repeat(kt(v.get("c")))) : g === "tab" ? m.parts.push(" ") : g === "line-break" && m.parts.push(`
2845
+ !a || s !== 1 || (g === "table-row" ? (u = yt(v.get("number-rows-repeated")), l = /* @__PURE__ */ new Map(), c = 0) : g === "table-cell" || g === "covered-table-cell" ? m = { repeat: yt(v.get("number-columns-repeated")), covered: g === "covered-table-cell", parts: [], paragraphs: 0, paragraphDepth: 0, annotationDepth: 0 } : m !== null && m.annotationDepth === 0 && (g === "annotation" && !E ? m.annotationDepth += 1 : g === "p" || g === "h" ? (m.paragraphs > 0 && m.parts.push(`
2846
+ `), m.paragraphs += 1, E || (m.paragraphDepth += 1)) : m.paragraphDepth > 0 && (g === "s" ? m.parts.push(" ".repeat(yt(v.get("c")))) : g === "tab" ? m.parts.push(" ") : g === "line-break" && m.parts.push(`
2832
2847
  `))));
2833
2848
  },
2834
2849
  end: (g) => {
@@ -2844,8 +2859,8 @@ const El = /* @__PURE__ */ new Map([
2844
2859
  if ((g === "table-cell" || g === "covered-table-cell") && m !== null) {
2845
2860
  const v = m.covered ? "" : m.parts.join("");
2846
2861
  if (v !== "") {
2847
- const y = Math.min(c + m.repeat, n.maxColumns + 1);
2848
- for (let T = c; T < y; T += 1) l.set(T, v);
2862
+ const E = Math.min(c + m.repeat, n.maxColumns + 1);
2863
+ for (let T = c; T < E; T += 1) l.set(T, v);
2849
2864
  }
2850
2865
  c += m.repeat, m = null;
2851
2866
  } else g === "table-row" ? (r.addRow(f, l, u), f += u) : (g === "p" || g === "h") && m !== null && (m.paragraphDepth = Math.max(0, m.paragraphDepth - 1));
@@ -2856,18 +2871,18 @@ const El = /* @__PURE__ */ new Map([
2856
2871
  },
2857
2872
  () => i || r.full()
2858
2873
  ), r.table();
2859
- }, Vl = async (e, t) => {
2860
- if (await Hl(e, t)) throw new ne("encrypted", "the spreadsheet's manifest names encryption data");
2861
- const { tables: n, hidingStyles: r } = await zl(qn(e, t)), o = [];
2874
+ }, Zl = async (e, t) => {
2875
+ if (await zl(e, t)) throw new ne("encrypted", "the spreadsheet's manifest names encryption data");
2876
+ const { tables: n, hidingStyles: r } = await jl(qn(e, t)), o = [];
2862
2877
  let s = 0;
2863
2878
  return n.forEach((a, i) => {
2864
2879
  if (r.has(a.style)) {
2865
2880
  s += 1;
2866
2881
  return;
2867
2882
  }
2868
- o.push({ name: a.name, read: async (f) => jl(qn(e, t), i, f) });
2869
- }), o.length === 0 && Jr("shows no table"), { sheets: o.slice(0, t.maxSheets), unshownSheets: s, unlistedSheets: Math.max(0, o.length - t.maxSheets) };
2870
- }, Ee = Object.freeze({ kind: "general" }), Zl = new Map([
2883
+ o.push({ name: a.name, read: async (f) => Vl(qn(e, t), i, f) });
2884
+ }), o.length === 0 && Qr("shows no table"), { sheets: o.slice(0, t.maxSheets), unshownSheets: s, unlistedSheets: Math.max(0, o.length - t.maxSheets) };
2885
+ }, ke = Object.freeze({ kind: "general" }), Wl = new Map([
2871
2886
  [0, "General"],
2872
2887
  [1, "0"],
2873
2888
  [2, "0.00"],
@@ -2899,7 +2914,7 @@ const El = /* @__PURE__ */ new Map([
2899
2914
  [47, "mmss.0"],
2900
2915
  [48, "##0.0E+0"],
2901
2916
  [49, "@"]
2902
- ]), Wl = /^\[(h+|m+|s+)\]$/iu, Gl = (e) => {
2917
+ ]), Gl = /^\[(h+|m+|s+)\]$/iu, Kl = (e) => {
2903
2918
  let t = "", n = !1;
2904
2919
  for (let r = 0; r < e.length; r += 1) {
2905
2920
  const o = e[r];
@@ -2911,24 +2926,24 @@ const El = /* @__PURE__ */ new Map([
2911
2926
  r += 1;
2912
2927
  else if (o === "[") {
2913
2928
  const s = e.indexOf("]", r + 1), a = e.slice(r, s === -1 ? e.length : s + 1);
2914
- Wl.test(a) && (t += a.slice(1, -1), n = !0), r = s === -1 ? e.length : s;
2929
+ Gl.test(a) && (t += a.slice(1, -1), n = !0), r = s === -1 ? e.length : s;
2915
2930
  } else
2916
2931
  t += o;
2917
2932
  }
2918
2933
  return { text: t.toLowerCase(), elapsed: n };
2919
- }, Kl = (e) => {
2920
- const { text: t, elapsed: n } = Gl(e);
2921
- if (t === "" || t === "general" || t.includes("@") || /[0#?.]e[+-]/u.test(t)) return Ee;
2934
+ }, Yl = (e) => {
2935
+ const { text: t, elapsed: n } = Kl(e);
2936
+ if (t === "" || t === "general" || t.includes("@") || /[0#?.]e[+-]/u.test(t)) return ke;
2922
2937
  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;
2923
2938
  if (o || r) return { kind: "date-time", date: o, time: r, seconds: t.includes("s"), elapsed: n };
2924
- if (/[0#?]\s*\/\s*[0#?]/u.test(t)) return Ee;
2939
+ if (/[0#?]\s*\/\s*[0#?]/u.test(t)) return ke;
2925
2940
  const s = /[0#?][0#?,]*(?:\.[0#?]*)?,*/u.exec(t)?.[0];
2926
- if (s === void 0) return Ee;
2941
+ if (s === void 0) return ke;
2927
2942
  const a = /,*$/u.exec(s)?.[0].length ?? 0, [i = "", f = ""] = s.slice(0, s.length - a).split("."), u = (f.match(/[0#?]/gu) ?? []).length;
2928
2943
  return t.includes("%") ? { kind: "percent", decimals: u } : { kind: "fixed", decimals: u, grouping: i.includes(","), scale: 1e3 ** a };
2929
- }, Yl = (e, t) => {
2930
- const n = t.get(e) ?? Zl.get(e);
2931
- return n === void 0 ? Ee : Kl(n);
2944
+ }, Xl = (e, t) => {
2945
+ const n = t.get(e) ?? Wl.get(e);
2946
+ return n === void 0 ? ke : Yl(n);
2932
2947
  }, Gt = (e) => {
2933
2948
  if (Number.isInteger(e) && Math.abs(e) < 1e15) return String(e);
2934
2949
  const [t = "", n] = e.toPrecision(15).split("e"), r = t.includes(".") ? t.replace(/0+$/u, "").replace(/\.$/u, "") : t;
@@ -2938,62 +2953,62 @@ const El = /* @__PURE__ */ new Map([
2938
2953
  if (r.includes("e")) return Gt(e);
2939
2954
  const [o = "", s] = r.split("."), a = n ? o.replace(/\B(?=(\d{3})+(?!\d))/gu, ",") : o;
2940
2955
  return `${e < 0 && /[1-9]/u.test(r) ? "-" : ""}${a}${s === void 0 ? "" : `.${s}`}`;
2941
- }, Xl = 864e5, Un = 86400, Jl = 2958465, xe = (e, t) => String(e).padStart(t, "0"), Ql = (e, t) => {
2956
+ }, Jl = 864e5, Un = 86400, Ql = 2958465, xe = (e, t) => String(e).padStart(t, "0"), ec = (e, t) => {
2942
2957
  if (!t && e === 0) return "1900-01-00";
2943
2958
  if (!t && e === 60) return "1900-02-29";
2944
- 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 * Xl);
2959
+ 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 * Jl);
2945
2960
  return `${xe(r.getUTCFullYear(), 4)}-${xe(r.getUTCMonth() + 1, 2)}-${xe(r.getUTCDate(), 2)}`;
2946
- }, ec = (e, t, n) => {
2947
- if (e < 0 || e >= Jl + 1) return Gt(e);
2961
+ }, tc = (e, t, n) => {
2962
+ if (e < 0 || e >= Ql + 1) return Gt(e);
2948
2963
  let r = Math.floor(e), o = Math.round((e - r) * Un);
2949
2964
  o === Un && (r += 1, o = 0);
2950
2965
  const s = Math.floor(o / 3600), a = Math.floor(o % 3600 / 60), i = `${xe(t.elapsed ? r * 24 + s : s, 2)}:${xe(a, 2)}${t.seconds ? `:${xe(o % 60, 2)}` : ""}`;
2951
2966
  if (t.elapsed || !t.date) return i;
2952
- const f = Ql(r, n);
2967
+ const f = ec(r, n);
2953
2968
  return t.time ? `${f} ${i}` : f;
2954
- }, tc = (e, t, n) => {
2969
+ }, nc = (e, t, n) => {
2955
2970
  switch (t.kind) {
2956
2971
  case "general":
2957
2972
  return Gt(e);
2958
2973
  case "date-time":
2959
- return ec(e, t, n);
2974
+ return tc(e, t, n);
2960
2975
  case "percent":
2961
2976
  return `${Bn(e * 100, t.decimals, !1)}%`;
2962
2977
  case "fixed":
2963
2978
  return Bn(e / t.scale, t.decimals, t.grouping);
2964
2979
  }
2965
- }, Qr = "_rels/.rels", ce = (e) => {
2980
+ }, eo = "_rels/.rels", ce = (e) => {
2966
2981
  throw new ne("not-workbook", `the workbook ${e}`);
2967
2982
  }, Kt = (e, t) => {
2968
- const n = Kr(t, () => !1);
2983
+ const n = Yr(t, () => !1);
2969
2984
  n.write(e), n.finish();
2970
- }, nc = (e, t) => {
2985
+ }, rc = (e, t) => {
2971
2986
  try {
2972
2987
  return decodeURIComponent(e);
2973
2988
  } catch {
2974
2989
  return ce(`points to a malformed part name (${t})`);
2975
2990
  }
2976
- }, rc = (e, t) => {
2991
+ }, oc = (e, t) => {
2977
2992
  const r = [...t.startsWith("/") ? [] : e.split("/").slice(0, -1)];
2978
2993
  for (const o of t.split("/"))
2979
- o === "" || o === "." || (o === ".." ? (r.length === 0 && ce(`points above its root (${t})`), r.pop()) : r.push(nc(o, t)));
2994
+ o === "" || o === "." || (o === ".." ? (r.length === 0 && ce(`points above its root (${t})`), r.pop()) : r.push(rc(o, t)));
2980
2995
  return r.join("/");
2981
- }, oc = (e) => {
2996
+ }, sc = (e) => {
2982
2997
  const t = e.lastIndexOf("/");
2983
2998
  return `${e.slice(0, t + 1)}_rels/${e.slice(t + 1)}.rels`;
2984
2999
  }, Hn = async (e, t, n) => {
2985
- const r = await rt(e, t === "" ? Qr : oc(t), n.maxPartBytes), o = /* @__PURE__ */ new Map();
3000
+ const r = await rt(e, t === "" ? eo : sc(t), n.maxPartBytes), o = /* @__PURE__ */ new Map();
2986
3001
  return r === null || Kt(r, {
2987
3002
  start: (s, a) => {
2988
3003
  if (s !== "Relationship") return;
2989
3004
  const i = a.get("Id"), f = a.get("Type"), u = a.get("Target");
2990
- i === void 0 || f === void 0 || u === void 0 || a.get("TargetMode") === "External" || o.set(i, { type: f, target: rc(t, u) });
3005
+ i === void 0 || f === void 0 || u === void 0 || a.get("TargetMode") === "External" || o.set(i, { type: f, target: oc(t, u) });
2991
3006
  }
2992
3007
  }), o;
2993
- }, Et = (e, t) => {
3008
+ }, kt = (e, t) => {
2994
3009
  for (const n of e.values()) if (n.type.endsWith(`/${t}`)) return n.target;
2995
3010
  return null;
2996
- }, sc = (e) => {
3011
+ }, ac = (e) => {
2997
3012
  const t = [];
2998
3013
  let n = !1;
2999
3014
  return Kt(e, {
@@ -3004,7 +3019,7 @@ const El = /* @__PURE__ */ new Map([
3004
3019
  } else r === "sheet" && t.push({ name: o.get("name") ?? "", state: o.get("state") ?? "visible", relationship: o.get("id") ?? "" });
3005
3020
  }
3006
3021
  }), { sheets: t, date1904: n };
3007
- }, ac = async (e) => {
3022
+ }, ic = async (e) => {
3008
3023
  const t = [];
3009
3024
  let n = null, r = !1, o = 0;
3010
3025
  return await He(
@@ -3022,7 +3037,7 @@ const El = /* @__PURE__ */ new Map([
3022
3037
  },
3023
3038
  () => !1
3024
3039
  ), t;
3025
- }, ic = (e) => {
3040
+ }, lc = (e) => {
3026
3041
  const t = /* @__PURE__ */ new Map(), n = [];
3027
3042
  let r = !1;
3028
3043
  return Kt(e, {
@@ -3040,19 +3055,19 @@ const El = /* @__PURE__ */ new Map([
3040
3055
  end: (o) => {
3041
3056
  o === "cellXfs" && (r = !1);
3042
3057
  }
3043
- }), n.map((o) => Yl(o, t));
3044
- }, lc = /^(\d{4}-\d{2}-\d{2})(?:T(\d{2}:\d{2}(?::\d{2})?)(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?$/u, cc = (e) => {
3045
- const t = lc.exec(e);
3058
+ }), n.map((o) => Xl(o, t));
3059
+ }, cc = /^(\d{4}-\d{2}-\d{2})(?:T(\d{2}:\d{2}(?::\d{2})?)(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?$/u, dc = (e) => {
3060
+ const t = cc.exec(e);
3046
3061
  if (t === null) return e;
3047
3062
  const [, n, r] = t;
3048
3063
  return r === void 0 || /^00:00(?::00)?$/u.test(r) ? n ?? e : `${n} ${r}`;
3049
- }, dc = /^([A-Za-z]{1,3})(\d+)$/u, uc = (e) => {
3050
- const t = dc.exec(e)?.[1];
3064
+ }, uc = /^([A-Za-z]{1,3})(\d+)$/u, fc = (e) => {
3065
+ const t = uc.exec(e)?.[1];
3051
3066
  if (t === void 0) return null;
3052
3067
  let n = 0;
3053
3068
  for (const r of t.toUpperCase()) n = n * 26 + (r.charCodeAt(0) - 64);
3054
3069
  return n - 1;
3055
- }, fc = (e, t, n, r) => {
3070
+ }, mc = (e, t, n, r) => {
3056
3071
  const o = e.value.join("");
3057
3072
  switch (e.type) {
3058
3073
  case "s":
@@ -3065,16 +3080,16 @@ const El = /* @__PURE__ */ new Map([
3065
3080
  case "e":
3066
3081
  return o;
3067
3082
  case "d":
3068
- return cc(o.trim());
3083
+ return dc(o.trim());
3069
3084
  default: {
3070
3085
  const s = o.trim();
3071
3086
  if (s === "") return "";
3072
3087
  const a = Number(s);
3073
- return Number.isFinite(a) ? tc(a, n[e.style] ?? Ee, r) : s;
3088
+ return Number.isFinite(a) ? nc(a, n[e.style] ?? ke, r) : s;
3074
3089
  }
3075
3090
  }
3076
- }, mc = async (e, t, n, r, o) => {
3077
- const s = Hr(t);
3091
+ }, hc = async (e, t, n, r, o) => {
3092
+ const s = zr(t);
3078
3093
  let a = -1, i = /* @__PURE__ */ new Map(), f = 0, u = null;
3079
3094
  return await He(
3080
3095
  e,
@@ -3084,13 +3099,13 @@ const El = /* @__PURE__ */ new Map([
3084
3099
  const g = Number(c.get("r"));
3085
3100
  a = Number.isInteger(g) && g > a + 1 ? g - 1 : a + 1, i = /* @__PURE__ */ new Map(), f = 0;
3086
3101
  } else if (l === "c") {
3087
- const g = uc(c.get("r") ?? "") ?? f, v = Number(c.get("s") ?? "0");
3102
+ const g = fc(c.get("r") ?? "") ?? f, v = Number(c.get("s") ?? "0");
3088
3103
  u = { column: g, type: c.get("t") ?? "n", style: Number.isInteger(v) ? v : 0, value: [], inline: [], inValue: !1, inInlineText: !1, phoneticDepth: 0 };
3089
3104
  } else u !== null && (l === "v" ? u.inValue = !m : l === "rPh" && !m ? u.phoneticDepth += 1 : l === "t" && u.type === "inlineStr" && u.phoneticDepth === 0 && (u.inInlineText = !m));
3090
3105
  },
3091
3106
  end: (l) => {
3092
3107
  if (l === "c" && u !== null) {
3093
- const c = fc(u, n, r, o);
3108
+ const c = mc(u, n, r, o);
3094
3109
  c !== "" && i.set(u.column, c), f = u.column + 1, u = null;
3095
3110
  } else l === "row" ? s.addRow(a, i, 1) : u !== null && (l === "v" ? u.inValue = !1 : l === "rPh" ? u.phoneticDepth = Math.max(0, u.phoneticDepth - 1) : l === "t" && (u.inInlineText = !1));
3096
3111
  },
@@ -3100,36 +3115,36 @@ const El = /* @__PURE__ */ new Map([
3100
3115
  },
3101
3116
  s.full
3102
3117
  ), s.table();
3103
- }, hc = async (e, t) => {
3104
- const n = Et(await Hn(e, "", t), "officeDocument") ?? ce("has no officeDocument relationship"), r = await rt(e, n, t.maxPartBytes) ?? ce(`has no part ${n}`), { sheets: o, date1904: s } = sc(r), a = await Hn(e, n, t), i = Et(a, "sharedStrings"), f = i === null ? null : Fe(e, i, t.maxPartBytes), u = f === null ? [] : await ac(f), l = Et(a, "styles"), c = l === null ? null : await rt(e, l, t.maxPartBytes), m = c === null ? [] : ic(c), g = [];
3118
+ }, pc = async (e, t) => {
3119
+ const n = kt(await Hn(e, "", t), "officeDocument") ?? ce("has no officeDocument relationship"), r = await rt(e, n, t.maxPartBytes) ?? ce(`has no part ${n}`), { sheets: o, date1904: s } = ac(r), a = await Hn(e, n, t), i = kt(a, "sharedStrings"), f = i === null ? null : Fe(e, i, t.maxPartBytes), u = f === null ? [] : await ic(f), l = kt(a, "styles"), c = l === null ? null : await rt(e, l, t.maxPartBytes), m = c === null ? [] : lc(c), g = [];
3105
3120
  let v = 0;
3106
- for (const y of o) {
3107
- const T = a.get(y.relationship) ?? ce(`lists the sheet ${y.name} without its relationship`);
3108
- if (y.state !== "visible" || !T.type.endsWith("/worksheet")) {
3121
+ for (const E of o) {
3122
+ const T = a.get(E.relationship) ?? ce(`lists the sheet ${E.name} without its relationship`);
3123
+ if (E.state !== "visible" || !T.type.endsWith("/worksheet")) {
3109
3124
  v += 1;
3110
3125
  continue;
3111
3126
  }
3112
- e.entries.has(T.target) || ce(`has no part ${T.target} for the sheet ${y.name}`), g.push({
3113
- name: y.name,
3127
+ e.entries.has(T.target) || ce(`has no part ${T.target} for the sheet ${E.name}`), g.push({
3128
+ name: E.name,
3114
3129
  read: async (O) => {
3115
3130
  const R = Fe(e, T.target, t.maxPartBytes) ?? ce(`has no part ${T.target}`);
3116
- return mc(R, O, u, m, s);
3131
+ return hc(R, O, u, m, s);
3117
3132
  }
3118
3133
  });
3119
3134
  }
3120
3135
  return g.length === 0 && ce("shows no sheet"), { sheets: g.slice(0, t.maxSheets), unshownSheets: v, unlistedSheets: Math.max(0, g.length - t.maxSheets) };
3121
- }, pc = Object.freeze([80, 75, 3, 4]), gc = Object.freeze([208, 207, 17, 224, 161, 177, 26, 225]), St = Uint8Array.from([..."EncryptedPackage"].flatMap((e) => [e.charCodeAt(0), 0])), wc = /* @__PURE__ */ new Set(["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template"]), vc = "mimetype", eo = (e, t) => e.byteLength >= t.length && t.every((n, r) => e[r] === n), to = (e) => eo(e, pc), no = (e) => eo(e, gc), bc = (e) => {
3136
+ }, gc = Object.freeze([80, 75, 3, 4]), wc = Object.freeze([208, 207, 17, 224, 161, 177, 26, 225]), St = Uint8Array.from([..."EncryptedPackage"].flatMap((e) => [e.charCodeAt(0), 0])), vc = /* @__PURE__ */ new Set(["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template"]), bc = "mimetype", to = (e, t) => e.byteLength >= t.length && t.every((n, r) => e[r] === n), no = (e) => to(e, gc), ro = (e) => to(e, wc), Ec = (e) => {
3122
3137
  const t = e.byteLength - St.byteLength;
3123
3138
  for (let n = 0; n <= t; n += 1)
3124
3139
  if (e[n] === St[0] && St.every((r, o) => e[n + o] === r)) return !0;
3125
3140
  return !1;
3126
3141
  }, yc = async (e, t) => {
3127
- if (no(e))
3128
- throw bc(e) ? new ne("encrypted", "the bytes are a password-protected workbook") : new ne("not-workbook", "the bytes are a compound file (a legacy .xls)");
3129
- if (!to(e)) throw new ne("not-workbook", "the bytes are no ZIP package");
3130
- const n = _l(e), r = await rt(n, vc, t.maxPartBytes);
3131
- if (r !== null && wc.has(r.trim())) return Vl(n, t);
3132
- if (n.entries.has(Qr)) return hc(n, t);
3142
+ if (ro(e))
3143
+ throw Ec(e) ? new ne("encrypted", "the bytes are a password-protected workbook") : new ne("not-workbook", "the bytes are a compound file (a legacy .xls)");
3144
+ if (!no(e)) throw new ne("not-workbook", "the bytes are no ZIP package");
3145
+ const n = Fl(e), r = await rt(n, bc, t.maxPartBytes);
3146
+ if (r !== null && vc.has(r.trim())) return Zl(n, t);
3147
+ if (n.entries.has(eo)) return pc(n, t);
3133
3148
  throw new ne("not-workbook", "the ZIP package is neither an OpenDocument spreadsheet nor an Office Open XML package");
3134
3149
  }, kc = async (e, t) => {
3135
3150
  const n = e.getReader(), r = [];
@@ -3150,14 +3165,14 @@ const El = /* @__PURE__ */ new Map([
3150
3165
  for (const i of r)
3151
3166
  s.set(i, a), a += i.byteLength;
3152
3167
  return s;
3153
- }, ro = async (e, t) => {
3168
+ }, oo = async (e, t) => {
3154
3169
  try {
3155
3170
  return { kind: "table", table: await e.read(t) };
3156
3171
  } catch (n) {
3157
3172
  return { kind: "refused", refusal: n instanceof ne ? n.refusal : "not-workbook" };
3158
3173
  }
3159
- }, Ec = async (e, t, n, r, o) => {
3160
- const s = await e.asset(zo(t), o);
3174
+ }, Sc = async (e, t, n, r, o) => {
3175
+ const s = await e.asset(jo(t), o);
3161
3176
  if (s.status === "cancelled") return null;
3162
3177
  if (s.status === "error") return { kind: "failure", failure: s.failure };
3163
3178
  let a;
@@ -3168,16 +3183,16 @@ const El = /* @__PURE__ */ new Map([
3168
3183
  }
3169
3184
  if (o.aborted) return null;
3170
3185
  if (a === null) return { kind: "refused", refusal: "too-large" };
3171
- if (!(to(a) || no(a))) return { kind: "not-package" };
3186
+ if (!(no(a) || ro(a))) return { kind: "not-package" };
3172
3187
  try {
3173
3188
  const i = await yc(a, n.limits), f = r === null ? -1 : i.sheets.findIndex((m) => m.name === r), u = Math.max(f, 0), l = i.sheets[u];
3174
3189
  if (l === void 0) return { kind: "refused", refusal: "not-workbook" };
3175
- const c = await ro(l, n.budget);
3190
+ const c = await oo(l, n.budget);
3176
3191
  return o.aborted ? null : { kind: "workbook", workbook: i, selected: u, sheet: c };
3177
3192
  } catch (i) {
3178
3193
  return i instanceof ne ? { kind: "refused", refusal: i.refusal } : o.aborted ? null : { kind: "failure", failure: { reason: "failed" } };
3179
3194
  }
3180
- }, Sc = Object.freeze({ className: "aqmx-document-spreadsheet-body", "data-aqmx-document-scroller": "" }), xc = (e, t) => {
3195
+ }, xc = Object.freeze({ className: "aqmx-document-spreadsheet-body", "data-aqmx-document-scroller": "" }), Tc = (e, t) => {
3181
3196
  switch (t.code) {
3182
3197
  case "encoding":
3183
3198
  return e.spreadsheetUnreadableEncoding(t.encodings);
@@ -3195,13 +3210,13 @@ const El = /* @__PURE__ */ new Map([
3195
3210
  case "too-large":
3196
3211
  return e.spreadsheetWorkbookTooLarge;
3197
3212
  }
3198
- }, xt = (e) => e.every((t) => t.every((n) => n === "")), oo = ({ name: e, url: t, openUrl: n, state: r, children: o }) => /* @__PURE__ */ B("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-spreadsheet-view", "data-aqmx-spreadsheet": r, children: [
3199
- /* @__PURE__ */ d(Ue, { name: e, openUrl: n, downloadUrl: t, icon: /* @__PURE__ */ d(ll, {}) }),
3200
- /* @__PURE__ */ d(Be, { scrollerProps: Sc, children: /* @__PURE__ */ d("div", { className: "aqmx-document-spreadsheet-column", children: o }) })
3201
- ] }), so = ({ rows: e, title: t }) => {
3202
- const { labels: n, locale: r, theme: o } = $(), s = se(we), a = X(() => ({ ...Vr(n, r), table: t, fullscreenDialog: n.spreadsheetFullscreen(t) }), [n, r, t]), i = X(() => us(e), [e]);
3213
+ }, xt = (e) => e.every((t) => t.every((n) => n === "")), so = ({ name: e, url: t, openUrl: n, state: r, children: o }) => /* @__PURE__ */ B("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-spreadsheet-view", "data-aqmx-spreadsheet": r, children: [
3214
+ /* @__PURE__ */ d(Ue, { name: e, openUrl: n, downloadUrl: t, icon: /* @__PURE__ */ d(cl, {}) }),
3215
+ /* @__PURE__ */ d(Be, { scrollerProps: xc, children: /* @__PURE__ */ d("div", { className: "aqmx-document-spreadsheet-column", children: o }) })
3216
+ ] }), ao = ({ rows: e, title: t }) => {
3217
+ const { labels: n, locale: r, theme: o } = $(), s = se(we), a = X(() => ({ ...Zr(n, r), table: t, fullscreenDialog: n.spreadsheetFullscreen(t) }), [n, r, t]), i = X(() => fs(e), [e]);
3203
3218
  return (
3204
- /* @__PURE__ */ d("div", { className: "aqmx-document-spreadsheet", "data-theme": o, children: /* @__PURE__ */ d(as, { tsv: i, layout: s === "fill" ? "fill" : "inline", locale: r, labels: a, tapScrollCircle: Lr }) })
3219
+ /* @__PURE__ */ d("div", { className: "aqmx-document-spreadsheet", "data-theme": o, children: /* @__PURE__ */ d(is, { tsv: i, layout: s === "fill" ? "fill" : "inline", locale: r, labels: a, tapScrollCircle: Mr }) })
3205
3220
  );
3206
3221
  }, De = ({ note: e, testId: t, code: n, download: r }) => {
3207
3222
  const { labels: o } = $();
@@ -3209,46 +3224,46 @@ const El = /* @__PURE__ */ new Map([
3209
3224
  /* @__PURE__ */ d("p", { className: "aqmx-callout-body", children: e }),
3210
3225
  /* @__PURE__ */ d("a", { className: "aqmx-callout-action", href: r.url, download: r.name, "data-testid": "markdown-explorer-spreadsheet-unreadable-download", children: o.download })
3211
3226
  ] }) });
3212
- }, ao = ({ reading: e, name: t, url: n }) => {
3227
+ }, io = ({ reading: e, name: t, url: n }) => {
3213
3228
  const { labels: r } = $();
3214
3229
  switch (e.kind) {
3215
3230
  case "table":
3216
3231
  return /* @__PURE__ */ B(pe, { children: [
3217
3232
  e.truncated ? /* @__PURE__ */ d("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-truncated", children: r.spreadsheetTruncated }) : null,
3218
- /* @__PURE__ */ d(so, { rows: e.rows, title: t })
3233
+ /* @__PURE__ */ d(ao, { rows: e.rows, title: t })
3219
3234
  ] });
3220
3235
  case "empty":
3221
3236
  return /* @__PURE__ */ d(De, { note: r.spreadsheetEmpty, testId: "markdown-explorer-spreadsheet-empty" });
3222
3237
  case "unreadable":
3223
- return /* @__PURE__ */ d(De, { note: xc(r, e), testId: "markdown-explorer-spreadsheet-unreadable", code: e.code, download: { url: n, name: t } });
3238
+ return /* @__PURE__ */ d(De, { note: Tc(r, e), testId: "markdown-explorer-spreadsheet-unreadable", code: e.code, download: { url: n, name: t } });
3224
3239
  }
3225
- }, Tc = ({ path: e, document: t }) => t.format === "workbook" ? /* @__PURE__ */ d(Cc, { path: e, document: t }) : /* @__PURE__ */ d(Rc, { path: e, document: t, format: t.format }), Rc = ({ path: e, document: t, format: n }) => {
3240
+ }, Rc = ({ path: e, document: t }) => t.format === "workbook" ? /* @__PURE__ */ d(Oc, { path: e, document: t }) : /* @__PURE__ */ d(Cc, { path: e, document: t, format: t.format }), Cc = ({ path: e, document: t, format: n }) => {
3226
3241
  const { config: r, data: o, labels: s } = $(), { name: a, url: i } = t, f = F(
3227
3242
  async (m) => {
3228
- const g = await jr(o, i, { format: n, legacyEncoding: r.legacyTextEncoding, maxBytes: r.spreadsheets.maxBytes, budget: Xe }, m);
3243
+ const g = await Vr(o, i, { format: n, legacyEncoding: r.legacyTextEncoding, maxBytes: r.spreadsheets.maxBytes, budget: Xe }, m);
3229
3244
  return g === null || g.kind === "failure" ? g : { kind: "read", value: g };
3230
3245
  },
3231
3246
  [o, i, n, r.legacyTextEncoding, r.spreadsheets.maxBytes]
3232
3247
  ), { shown: u, failure: l, retry: c } = Wt(e, a, f);
3233
- return /* @__PURE__ */ B(oo, { name: a, url: i, openUrl: st(i), state: u === null ? l === null ? "loading" : "failure" : u.kind, children: [
3248
+ return /* @__PURE__ */ B(so, { name: a, url: i, openUrl: st(i), state: u === null ? l === null ? "loading" : "failure" : u.kind, children: [
3234
3249
  u === null && l === null ? /* @__PURE__ */ d(Ce, { label: s.spreadsheetLoading, testId: "markdown-explorer-spreadsheet-skeleton" }) : null,
3235
3250
  u === null && l !== null ? /* @__PURE__ */ d("div", { className: "aqmx-document-spreadsheet-failure", children: /* @__PURE__ */ d(Re, { failure: l, alert: !1, onRetry: c, testId: "markdown-explorer-spreadsheet-failure" }) }) : null,
3236
- u === null ? null : /* @__PURE__ */ d(ao, { reading: u, name: a, url: i })
3251
+ u === null ? null : /* @__PURE__ */ d(io, { reading: u, name: a, url: i })
3237
3252
  ] });
3238
- }, Cc = ({ path: e, document: t }) => {
3253
+ }, Oc = ({ path: e, document: t }) => {
3239
3254
  const { config: n, data: r, labels: o } = $(), { name: s, url: a, firstSheetText: i } = t, f = Te(), u = U(null), l = F(
3240
3255
  async (b) => {
3241
- const S = await Ec(r, a, { maxBytes: n.spreadsheets.maxWorkbookBytes, limits: hl, budget: Xe }, u.current, b);
3256
+ const S = await Sc(r, a, { maxBytes: n.spreadsheets.maxWorkbookBytes, limits: pl, budget: Xe }, u.current, b);
3242
3257
  if (S === null || S.kind === "failure") return S;
3243
3258
  if (S.kind === "workbook") return { kind: "read", value: S };
3244
3259
  if (i !== null) {
3245
- const L = await jr(r, a, { format: i, legacyEncoding: n.legacyTextEncoding, maxBytes: n.spreadsheets.maxBytes, budget: Xe }, b);
3260
+ const L = await Vr(r, a, { format: i, legacyEncoding: n.legacyTextEncoding, maxBytes: n.spreadsheets.maxBytes, budget: Xe }, b);
3246
3261
  return L === null || L.kind === "failure" ? L : { kind: "read", value: { kind: "first-sheet", reading: L } };
3247
3262
  }
3248
3263
  return { kind: "read", value: { kind: "refused", refusal: S.kind === "not-package" ? "not-workbook" : S.refusal } };
3249
3264
  },
3250
3265
  [r, a, i, n.legacyTextEncoding, n.spreadsheets.maxBytes, n.spreadsheets.maxWorkbookBytes]
3251
- ), { shown: c, failure: m, retry: g } = Wt(e, s, l), [v, y] = V(null), T = U(/* @__PURE__ */ new WeakMap()), O = c?.kind === "workbook" ? c : null, R = O === null ? null : v !== null && v.workbook === O.workbook ? v : { workbook: O.workbook, index: O.selected, reading: O.sheet }, q = (b) => {
3266
+ ), { shown: c, failure: m, retry: g } = Wt(e, s, l), [v, E] = V(null), T = U(/* @__PURE__ */ new WeakMap()), O = c?.kind === "workbook" ? c : null, R = O === null ? null : v !== null && v.workbook === O.workbook ? v : { workbook: O.workbook, index: O.selected, reading: O.sheet }, q = (b) => {
3252
3267
  if (O === null) return;
3253
3268
  const S = O.workbook.sheets[b];
3254
3269
  if (S === void 0) return;
@@ -3256,34 +3271,34 @@ const El = /* @__PURE__ */ new Map([
3256
3271
  let L = T.current.get(O.workbook);
3257
3272
  L === void 0 && (L = /* @__PURE__ */ new Map([[O.selected, O.sheet]]), T.current.set(O.workbook, L));
3258
3273
  const M = L.get(b), P = { workbook: O.workbook, index: b, reading: M ?? null };
3259
- if (y(P), M !== void 0) return;
3274
+ if (E(P), M !== void 0) return;
3260
3275
  const H = L;
3261
- ro(S, Xe).then((K) => {
3262
- H.set(b, K), y((w) => w === P ? { ...P, reading: K } : w);
3276
+ oo(S, Xe).then((K) => {
3277
+ H.set(b, K), E((w) => w === P ? { ...P, reading: K } : w);
3263
3278
  });
3264
3279
  }, D = R === null ? null : R.reading === null ? "loading" : R.reading.kind === "refused" ? "unreadable" : xt(R.reading.table.rows) ? "empty" : "table", h = c === null ? m === null ? "loading" : "failure" : c.kind === "first-sheet" ? c.reading.kind : c.kind === "refused" ? "unreadable" : D ?? "loading", p = i === null ? a : st(a), x = (b) => `${f}-sheet-${b}`, A = `${f}-panel`, I = R === null ? null : O?.workbook.sheets[R.index]?.name ?? null, _ = O !== null && O.workbook.sheets.length > 1;
3265
- return /* @__PURE__ */ B(oo, { name: s, url: a, openUrl: p, state: h, children: [
3280
+ return /* @__PURE__ */ B(so, { name: s, url: a, openUrl: p, state: h, children: [
3266
3281
  c === null && m === null ? /* @__PURE__ */ d(Ce, { label: o.spreadsheetLoading, testId: "markdown-explorer-spreadsheet-skeleton" }) : null,
3267
3282
  c === null && m !== null ? /* @__PURE__ */ d("div", { className: "aqmx-document-spreadsheet-failure", children: /* @__PURE__ */ d(Re, { failure: m, alert: !1, onRetry: g, testId: "markdown-explorer-spreadsheet-failure" }) }) : null,
3268
3283
  c?.kind === "refused" ? /* @__PURE__ */ d(De, { note: zn(o, c.refusal), testId: "markdown-explorer-spreadsheet-unreadable", code: c.refusal, download: { url: a, name: s } }) : null,
3269
3284
  c?.kind === "first-sheet" ? /* @__PURE__ */ B(pe, { children: [
3270
3285
  /* @__PURE__ */ d("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-first-sheet", children: o.spreadsheetWorkbookFirstSheet }),
3271
- /* @__PURE__ */ d(ao, { reading: c.reading, name: s, url: a })
3286
+ /* @__PURE__ */ d(io, { reading: c.reading, name: s, url: a })
3272
3287
  ] }) : null,
3273
3288
  O === null || R === null || I === null ? null : /* @__PURE__ */ B(pe, { children: [
3274
3289
  O.workbook.unshownSheets > 0 ? /* @__PURE__ */ d("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-unshown-sheets", children: o.spreadsheetUnshownSheets(O.workbook.unshownSheets) }) : null,
3275
3290
  O.workbook.unlistedSheets > 0 ? /* @__PURE__ */ d("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-unlisted-sheets", children: o.spreadsheetUnlistedSheets(O.workbook.sheets.length) }) : null,
3276
- _ ? /* @__PURE__ */ d(gl, { names: O.workbook.sheets.map((b) => b.name), selected: R.index, onSelect: q, label: o.spreadsheetSheets(s), tabIdOf: x, panelId: A }) : null,
3291
+ _ ? /* @__PURE__ */ d(wl, { names: O.workbook.sheets.map((b) => b.name), selected: R.index, onSelect: q, label: o.spreadsheetSheets(s), tabIdOf: x, panelId: A }) : null,
3277
3292
  /* @__PURE__ */ B("div", { className: "aqmx-document-spreadsheet-sheet", "data-testid": "markdown-explorer-spreadsheet-sheet", "data-aqmx-sheet": R.index, ..._ ? { role: "tabpanel", id: A, "aria-labelledby": x(R.index) } : {}, children: [
3278
3293
  R.reading === null ? /* @__PURE__ */ d(Ce, { label: o.spreadsheetSheetLoading, testId: "markdown-explorer-spreadsheet-sheet-skeleton" }) : null,
3279
3294
  R.reading?.kind === "table" && R.reading.table.truncated ? /* @__PURE__ */ d("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-truncated", children: o.spreadsheetTruncated }) : null,
3280
3295
  R.reading?.kind === "refused" ? /* @__PURE__ */ d(De, { note: zn(o, R.reading.refusal), testId: "markdown-explorer-spreadsheet-unreadable", code: R.reading.refusal, download: { url: a, name: s } }) : null,
3281
3296
  R.reading?.kind === "table" && xt(R.reading.table.rows) ? /* @__PURE__ */ d(De, { note: o.spreadsheetSheetEmpty, testId: "markdown-explorer-spreadsheet-empty" }) : null,
3282
- R.reading?.kind === "table" && !xt(R.reading.table.rows) ? /* @__PURE__ */ d(so, { rows: R.reading.table.rows, title: o.spreadsheetSheetName(s, I) }, R.index) : null
3297
+ R.reading?.kind === "table" && !xt(R.reading.table.rows) ? /* @__PURE__ */ d(ao, { rows: R.reading.table.rows, title: o.spreadsheetSheetName(s, I) }, R.index) : null
3283
3298
  ] })
3284
3299
  ] })
3285
3300
  ] });
3286
- }, Oc = Object.freeze({ kind: "empty" }), Lc = (e, t, n) => {
3301
+ }, Lc = Object.freeze({ kind: "empty" }), Mc = (e, t, n) => {
3287
3302
  if (t.view === "multi" || t.overrides[n] === void 0) return null;
3288
3303
  const r = n === "style" ? { align: t.overrides.align } : { style: t.overrides.style };
3289
3304
  return Ne(e, { ...t, overrides: r });
@@ -3295,7 +3310,7 @@ const El = /* @__PURE__ */ new Map([
3295
3310
  i
3296
3311
  ] })
3297
3312
  );
3298
- }, Mc = ({ absence: e, announces: t, announceFailure: n }) => {
3313
+ }, Ac = ({ absence: e, announces: t, announceFailure: n }) => {
3299
3314
  const { labels: r, announcer: o } = $(), s = e.kind === "no-readme" ? e.folder : null, a = e.kind === "failure" ? e.folder : null, i = e.kind === "failure" ? e.failure : null;
3300
3315
  switch (ee(() => {
3301
3316
  t && s !== null && o.announce(r.folderReadmeMissing(fe(s)));
@@ -3314,29 +3329,29 @@ const El = /* @__PURE__ */ new Map([
3314
3329
  }, Yt = ({ label: e }) => {
3315
3330
  const { labels: t } = $();
3316
3331
  return /* @__PURE__ */ d(Pe, { kind: "loading", label: e, stale: !1, busy: !0, children: /* @__PURE__ */ d(Ce, { label: t.documentLoading, testId: "markdown-explorer-document-skeleton" }) });
3317
- }, jn = Object.freeze(["wheel", "touchstart", "pointerdown", "keydown"]), Ac = ({ path: e, document: t, viewer: n, editing: r }) => {
3318
- const { reportMathDiagnostics: o, edits: s } = $(), a = X(() => ({ htmlContent: t.htmlContent, headings: [...t.headings] }), [t]), i = zi(), f = ji(), u = X(() => o === void 0 ? void 0 : (h) => o(e, h), [o, e]), l = U(null), { editable: c, doubleClick: m, region: g, paneScroll: v, stale: y } = r;
3332
+ }, jn = Object.freeze(["wheel", "touchstart", "pointerdown", "keydown"]), Nc = ({ path: e, document: t, viewer: n, editing: r }) => {
3333
+ const { reportMathDiagnostics: o, edits: s } = $(), a = X(() => ({ htmlContent: t.htmlContent, headings: [...t.headings] }), [t]), i = ji(), f = Vi(), u = X(() => o === void 0 ? void 0 : (h) => o(e, h), [o, e]), l = U(null), { editable: c, doubleClick: m, region: g, paneScroll: v, stale: E } = r;
3319
3334
  Y(() => {
3320
3335
  if (c)
3321
3336
  return s.bindView(e, {
3322
3337
  anchor: () => {
3323
3338
  const h = l.current, p = g(), x = h === null ? null : h.querySelector(it);
3324
- return h === null || p === null || x === null ? null : fa(h, v.scrollerOf(p, x));
3339
+ return h === null || p === null || x === null ? null : ma(h, v.scrollerOf(p, x));
3325
3340
  }
3326
3341
  });
3327
3342
  }, [s, e, c, g, v]);
3328
3343
  const T = (h) => {
3329
3344
  const p = l.current, { target: x } = h;
3330
- !m || p === null || !(x instanceof Element) || !da(x) || (h.stopPropagation(), s.start(e, ua(x, p, p.ownerDocument.getSelection())));
3331
- }, O = U(null), R = U(y);
3345
+ !m || p === null || !(x instanceof Element) || !ua(x) || (h.stopPropagation(), s.start(e, fa(x, p, p.ownerDocument.getSelection())));
3346
+ }, O = U(null), R = U(E);
3332
3347
  Y(() => {
3333
- R.current = y;
3348
+ R.current = E;
3334
3349
  });
3335
3350
  const q = le((h) => {
3336
- const p = l.current, x = g(), A = p === null ? null : wa(p, h.line);
3351
+ const p = l.current, x = g(), A = p === null ? null : va(p, h.line);
3337
3352
  if (x === null || A === null) return !1;
3338
3353
  const I = v.scrollerOf(x, A);
3339
- return I.scrollTop += va(A, h.line) - h.clientTop, !0;
3354
+ return I.scrollTop += ba(A, h.line) - h.clientTop, !0;
3340
3355
  }), D = le((h) => {
3341
3356
  const p = g();
3342
3357
  if (p === null) return;
@@ -3355,13 +3370,13 @@ const El = /* @__PURE__ */ new Map([
3355
3370
  }), () => O.current?.release();
3356
3371
  }, [s, e]), Y(() => {
3357
3372
  const h = O.current;
3358
- h === null || y || (h.release(), q(h.point));
3359
- }, [t, y]),
3373
+ h === null || E || (h.release(), q(h.point));
3374
+ }, [t, E]),
3360
3375
  /* @__PURE__ */ d("div", { ref: l, className: "aqmx-document-viewer", onDoubleClick: T, children: /* @__PURE__ */ d(ir, { ...n, onHeadingSelect: i, headingHref: f, onMathDiagnostics: u, parseResult: a, content: null }) });
3361
- }, io = ({ document: e, viewer: t }) => {
3376
+ }, lo = ({ document: e, viewer: t }) => {
3362
3377
  const { labels: n } = $();
3363
3378
  return /* @__PURE__ */ B(pe, { children: [
3364
- /* @__PURE__ */ d(Ue, { name: e.name, openUrl: st(e.url), downloadUrl: e.url, icon: /* @__PURE__ */ d(ta, {}), children: e.truncated ? null : /* @__PURE__ */ d(ja, { text: e.text }) }),
3379
+ /* @__PURE__ */ d(Ue, { name: e.name, openUrl: st(e.url), downloadUrl: e.url, icon: /* @__PURE__ */ d(na, {}), children: e.truncated ? null : /* @__PURE__ */ d(Va, { text: e.text }) }),
3365
3380
  e.truncated ? /* @__PURE__ */ d("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-text-truncated", children: n.textTruncated }) : null,
3366
3381
  /* @__PURE__ */ d("div", { className: "aqmx-document-viewer", children: /* @__PURE__ */ d(ir, { ...t, parseResult: null, content: e.text }) })
3367
3382
  ] });
@@ -3373,35 +3388,35 @@ const El = /* @__PURE__ */ new Map([
3373
3388
  },
3374
3389
  [r, e]
3375
3390
  ), { shown: a, failure: i, retry: f } = Wt(e, t, s);
3376
- return a !== null ? /* @__PURE__ */ d(io, { document: a, viewer: n }) : i !== null ? /* @__PURE__ */ d(jt, { failure: i, onRetry: f, testId: "markdown-explorer-markup-failure" }) : /* @__PURE__ */ d(Ce, { label: o.markupLoading, testId: "markdown-explorer-markup-skeleton" });
3377
- }, Nc = Object.freeze({ reason: "failed" }), Dc = (e) => {
3391
+ return a !== null ? /* @__PURE__ */ d(lo, { document: a, viewer: n }) : i !== null ? /* @__PURE__ */ d(jt, { failure: i, onRetry: f, testId: "markdown-explorer-markup-failure" }) : /* @__PURE__ */ d(Ce, { label: o.markupLoading, testId: "markdown-explorer-markup-skeleton" });
3392
+ }, Dc = Object.freeze({ reason: "failed" }), Pc = (e) => {
3378
3393
  const { labels: t } = $();
3379
3394
  return /* @__PURE__ */ d(
3380
- oa,
3395
+ sa,
3381
3396
  {
3382
- fallback: (n) => /* @__PURE__ */ d("div", { className: "aqmx-edit-message", children: /* @__PURE__ */ d(Re, { failure: Nc, alert: !1, onRetry: n, testId: "markdown-explorer-edit-load-failure" }) }),
3383
- children: /* @__PURE__ */ d(Ie, { fallback: /* @__PURE__ */ d(Ce, { label: t.editLoading, testId: "markdown-explorer-edit-skeleton" }), children: /* @__PURE__ */ d(ra, { ...e }) })
3397
+ fallback: (n) => /* @__PURE__ */ d("div", { className: "aqmx-edit-message", children: /* @__PURE__ */ d(Re, { failure: Dc, alert: !1, onRetry: n, testId: "markdown-explorer-edit-load-failure" }) }),
3398
+ children: /* @__PURE__ */ d(Ie, { fallback: /* @__PURE__ */ d(Ce, { label: t.editLoading, testId: "markdown-explorer-edit-skeleton" }), children: /* @__PURE__ */ d(oa, { ...e }) })
3384
3399
  }
3385
3400
  );
3386
- }, Pc = ({ path: e, document: t, view: n, viewer: r, onRetry: o, editing: s }) => {
3401
+ }, Ic = ({ path: e, document: t, view: n, viewer: r, onRetry: o, editing: s }) => {
3387
3402
  switch (t.kind) {
3388
3403
  case "markdown": {
3389
3404
  const { session: a, layout: i, region: f, paneScroll: u, stale: l } = s;
3390
- if (n === "edit" && a !== void 0) return /* @__PURE__ */ d(Dc, { path: e, name: t.name, session: a, layout: i, viewer: r, region: f, paneScroll: u });
3405
+ if (n === "edit" && a !== void 0) return /* @__PURE__ */ d(Pc, { path: e, name: t.name, session: a, layout: i, viewer: r, region: f, paneScroll: u });
3391
3406
  if (n === "markup") return /* @__PURE__ */ d(Tt, { path: e, name: t.name, viewer: r });
3392
3407
  const c = t.edit !== null && (t.edit.kind === "inline" || t.edit.kind === "draft");
3393
- return /* @__PURE__ */ d(Ac, { path: e, document: t, viewer: r, editing: { editable: c, doubleClick: c && i === "fill", region: f, paneScroll: u, stale: l } });
3408
+ return /* @__PURE__ */ d(Nc, { path: e, document: t, viewer: r, editing: { editable: c, doubleClick: c && i === "fill", region: f, paneScroll: u, stale: l } });
3394
3409
  }
3395
3410
  case "text":
3396
- return /* @__PURE__ */ d(io, { document: t, viewer: r });
3411
+ return /* @__PURE__ */ d(lo, { document: t, viewer: r });
3397
3412
  case "image":
3398
- return n === "markup" && Zt(t) === "svg" ? /* @__PURE__ */ d(Tt, { path: e, name: t.name, viewer: r }) : /* @__PURE__ */ d(Ai, { document: t });
3413
+ return n === "markup" && Zt(t) === "svg" ? /* @__PURE__ */ d(Tt, { path: e, name: t.name, viewer: r }) : /* @__PURE__ */ d(Ni, { document: t });
3399
3414
  case "media":
3400
- return /* @__PURE__ */ d(ol, { document: t });
3415
+ return /* @__PURE__ */ d(sl, { document: t });
3401
3416
  case "spreadsheet":
3402
- return n === "markup" ? /* @__PURE__ */ d(Tt, { path: e, name: t.name, viewer: r }) : /* @__PURE__ */ d(Tc, { path: e, document: t });
3417
+ return n === "markup" ? /* @__PURE__ */ d(Tt, { path: e, name: t.name, viewer: r }) : /* @__PURE__ */ d(Rc, { path: e, document: t });
3403
3418
  case "file":
3404
- return /* @__PURE__ */ d(Qa, { document: t });
3419
+ return /* @__PURE__ */ d(ei, { document: t });
3405
3420
  case "failure":
3406
3421
  return /* @__PURE__ */ d(jt, { failure: t.failure, onRetry: o, testId: "markdown-explorer-document-failure" });
3407
3422
  default: {
@@ -3409,15 +3424,15 @@ const El = /* @__PURE__ */ new Map([
3409
3424
  throw new RangeError(`[markdown-explorer] unknown document kind in ${JSON.stringify(a)}`);
3410
3425
  }
3411
3426
  }
3412
- }, Ic = 'a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), iframe, audio[controls], video[controls], [tabindex]:not([tabindex="-1"])', $c = (e, t, n) => {
3413
- const [r] = t.kind === "markdown" ? t.headings : [], o = [n === null ? null : Pr(e, n), r === void 0 ? null : Dr(e, r.id), e.querySelector(it), e.querySelector(Ic)];
3427
+ }, $c = 'a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), iframe, audio[controls], video[controls], [tabindex]:not([tabindex="-1"])', _c = (e, t, n) => {
3428
+ const [r] = t.kind === "markdown" ? t.headings : [], o = [n === null ? null : Ir(e, n), r === void 0 ? null : Pr(e, r.id), e.querySelector(it), e.querySelector($c)];
3414
3429
  for (const s of o)
3415
- if (s instanceof HTMLElement && xr(s)) return s;
3430
+ if (s instanceof HTMLElement && Tr(s)) return s;
3416
3431
  return null;
3417
3432
  }, Vn = (e, t, n) => {
3418
3433
  const { activeElement: r, body: o } = e.ownerDocument, s = r === null || r === o;
3419
- t instanceof HTMLElement && n && (s || e.contains(r)) && xr(t);
3420
- }, _c = (e) => {
3434
+ t instanceof HTMLElement && n && (s || e.contains(r)) && Tr(t);
3435
+ }, Fc = (e) => {
3421
3436
  const t = U(!1);
3422
3437
  return Y(() => {
3423
3438
  const n = e.current;
@@ -3443,8 +3458,8 @@ const El = /* @__PURE__ */ new Map([
3443
3458
  clearTimeout(a), o.removeEventListener("pointerdown", i, !0), o.removeEventListener("mousedown", i, !0), o.removeEventListener("focusin", f, !0), o.removeEventListener("blur", l), o.removeEventListener("focus", c), n.removeEventListener("focusout", u);
3444
3459
  };
3445
3460
  }, [e]), t;
3446
- }, Fc = Object.freeze({ count: 0, recovered: !1 }), qc = ({ path: e, snapshot: t, markup: n, stale: r, viewer: o, editLayout: s, regionLabel: a, navigation: i, fragment: f, paneScroll: u, announces: l, announceFailure: c, onDocumentShown: m }) => {
3447
- const { labels: g, announcer: v, documents: y } = $(), { document: T } = t, O = U(null), R = U(null), q = U(null), D = U(0), h = _c(O), p = U({ path: e, document: T }), x = U(null), A = F(
3461
+ }, qc = Object.freeze({ count: 0, recovered: !1 }), Bc = ({ path: e, snapshot: t, markup: n, stale: r, viewer: o, editLayout: s, regionLabel: a, navigation: i, fragment: f, paneScroll: u, announces: l, announceFailure: c, onDocumentShown: m }) => {
3462
+ const { labels: g, announcer: v, documents: E } = $(), { document: T } = t, O = U(null), R = U(null), q = U(null), D = U(0), h = Fc(O), p = U({ path: e, document: T }), x = U(null), A = F(
3448
3463
  (j) => {
3449
3464
  const Z = O.current, Q = Rn(Z, j, u);
3450
3465
  Z !== null && Q !== null && Vn(Z, Q, h.current);
@@ -3465,23 +3480,23 @@ const El = /* @__PURE__ */ new Map([
3465
3480
  }, 0);
3466
3481
  },
3467
3482
  [A]
3468
- ), b = X(() => ({ navigation: i, currentPath: e, scrollWithin: A, followSameUrlJump: I, followEmptyFragment: _ }), [i, e, A, I, _]), S = F(() => y.retry(e), [y, e]), L = ya(y, $i), M = kr(e), P = M !== void 0 ? "edit" : n ? "markup" : "rendered", H = Zt(T) === null ? void 0 : P, K = F(() => O.current, []), w = X(() => ({ session: M, layout: s, region: K, paneScroll: u, stale: r }), [M, s, K, u, r]), k = H === "edit" ? !1 : r, C = se(we), N = H === "edit" && s === "fill" ? "fill" : C, [z, W] = V(0), J = U(0), G = U(!1), [ie, Jt] = V(Fc), [Qt, fo] = V(0), en = U(c), tn = U(r);
3483
+ ), b = X(() => ({ navigation: i, currentPath: e, scrollWithin: A, followSameUrlJump: I, followEmptyFragment: _ }), [i, e, A, I, _]), S = F(() => E.retry(e), [E, e]), L = ya(E, _i), M = yr(e), P = M !== void 0 ? "edit" : n ? "markup" : "rendered", H = Zt(T) === null ? void 0 : P, K = F(() => O.current, []), w = X(() => ({ session: M, layout: s, region: K, paneScroll: u, stale: r }), [M, s, K, u, r]), y = H === "edit" ? !1 : r, C = se(we), N = H === "edit" && s === "fill" ? "fill" : C, [z, W] = V(0), J = U(0), G = U(!1), [ie, Jt] = V(qc), [Qt, mo] = V(0), en = U(c), tn = U(r);
3469
3484
  Y(() => {
3470
3485
  en.current = c, tn.current = r;
3471
3486
  }, [c, r]);
3472
- const mo = X(
3487
+ const ho = X(
3473
3488
  () => ({
3474
3489
  announceFailure: (j) => {
3475
3490
  tn.current || en.current(j);
3476
3491
  },
3477
3492
  readPart: () => {
3478
- const j = y.readPart(e);
3493
+ const j = E.readPart(e);
3479
3494
  J.current += 1;
3480
3495
  let Z = !1, Q = !1, oe = !1;
3481
3496
  return {
3482
- settle: (be, ye) => {
3483
- if (j.settle(be, ye), !(oe || Z)) {
3484
- if (ye !== null) {
3497
+ settle: (be, Ee) => {
3498
+ if (j.settle(be, Ee), !(oe || Z)) {
3499
+ if (Ee !== null) {
3485
3500
  Q = !0, G.current = !1;
3486
3501
  return;
3487
3502
  }
@@ -3489,7 +3504,7 @@ const El = /* @__PURE__ */ new Map([
3489
3504
  }
3490
3505
  },
3491
3506
  release: () => {
3492
- oe || (oe = !0, j.release(), J.current -= 1, Z || fo((be) => be + 1));
3507
+ oe || (oe = !0, j.release(), J.current -= 1, Z || mo((be) => be + 1));
3493
3508
  }
3494
3509
  };
3495
3510
  },
@@ -3501,45 +3516,45 @@ const El = /* @__PURE__ */ new Map([
3501
3516
  };
3502
3517
  }
3503
3518
  }),
3504
- [y, e]
3505
- ), nn = k || z > 0, ho = le((j, Z) => {
3519
+ [E, e]
3520
+ ), nn = y || z > 0, po = le((j, Z) => {
3506
3521
  const Q = R.current;
3507
3522
  if (Q !== null && Q.path === j && Q.snapshot === Z) return;
3508
- R.current = { path: j, snapshot: Z }, y.noteShown(j, Z);
3523
+ R.current = { path: j, snapshot: Z }, E.noteShown(j, Z);
3509
3524
  const oe = Z.document;
3510
3525
  if (oe.kind === "failure") {
3511
- G.current = !1, y.noteFailureShown(Z) && c(g.documentFailed(fe(j), de(g, oe.failure.reason)));
3526
+ G.current = !1, E.noteFailureShown(Z) && c(g.documentFailed(fe(j), de(g, oe.failure.reason)));
3512
3527
  return;
3513
3528
  }
3514
3529
  m?.(j, oe), !(!l || Q !== null && Q.path === j && Q.snapshot.document.kind !== "failure") && (G.current = J.current > 0, G.current || v.announce(g.documentShown(oe.name)));
3515
3530
  });
3516
3531
  ee(() => {
3517
- ho(e, t);
3532
+ po(e, t);
3518
3533
  }, [e, t]);
3519
- const po = le(() => {
3534
+ const go = le(() => {
3520
3535
  f.kind === "panel" && f.consume();
3521
3536
  }), rn = le((j) => {
3522
3537
  const Z = O.current;
3523
3538
  if (Z === null || !h.current) return null;
3524
3539
  const { activeElement: Q, body: oe } = Z.ownerDocument;
3525
- return Q !== null && Q !== oe ? null : $c(Z, T, j);
3526
- }), go = le((j) => {
3540
+ return Q !== null && Q !== oe ? null : _c(Z, T, j);
3541
+ }), wo = le((j) => {
3527
3542
  const Z = G.current;
3528
3543
  G.current = !1, !r && (j && rn(null), l && (j || Z) && T.kind !== "failure" && v.announce(g.documentShown(T.name)));
3529
3544
  });
3530
3545
  ee(() => {
3531
- ie.count > 0 && go(ie.recovered);
3546
+ ie.count > 0 && wo(ie.recovered);
3532
3547
  }, [ie]);
3533
- const wo = le(() => {
3548
+ const vo = le(() => {
3534
3549
  J.current > 0 || !G.current || (G.current = !1, l && !r && T.kind !== "failure" && v.announce(g.documentShown(T.name)));
3535
3550
  });
3536
3551
  ee(() => {
3537
- Qt > 0 && wo();
3552
+ Qt > 0 && vo();
3538
3553
  }, [Qt]);
3539
- const vo = le((j) => {
3554
+ const bo = le((j) => {
3540
3555
  const Z = O.current;
3541
3556
  Z !== null && Vn(Z, j, h.current);
3542
- }), bo = le((j) => u.reveal(j)), yo = le((j) => Rn(O.current, j, u));
3557
+ }), Eo = le((j) => u.reveal(j)), yo = le((j) => Rn(O.current, j, u));
3543
3558
  return ee(() => {
3544
3559
  if (r) return;
3545
3560
  const j = p.current.path !== e, Z = j || p.current.document !== T;
@@ -3547,50 +3562,50 @@ const El = /* @__PURE__ */ new Map([
3547
3562
  const Q = x.current !== e;
3548
3563
  x.current = e;
3549
3564
  let oe = null;
3550
- f.kind === "page" ? q.current !== f.navigation && (q.current = f.navigation, D.current += 1, oe = f.fragment) : f.fragment !== null && (oe = f.fragment, po());
3565
+ f.kind === "page" ? q.current !== f.navigation && (q.current = f.navigation, D.current += 1, oe = f.fragment) : f.fragment !== null && (oe = f.fragment, go());
3551
3566
  const be = () => {
3552
- const ye = oe === null ? null : yo(oe);
3567
+ const Ee = oe === null ? null : yo(oe);
3553
3568
  if (!Z) {
3554
- ye !== null && vo(ye);
3569
+ Ee !== null && bo(Ee);
3555
3570
  return;
3556
3571
  }
3557
3572
  const ze = rn(f.fragment);
3558
- j && ye === null && ze !== null && bo(ze);
3573
+ j && Ee === null && ze !== null && Eo(ze);
3559
3574
  };
3560
3575
  Q ? queueMicrotask(be) : be();
3561
- }, [f, e, T, r]), /* @__PURE__ */ d(we, { value: N, children: /* @__PURE__ */ d(Pe, { kind: T.kind, view: H, label: a(e, T), stale: nn, busy: nn, frameRef: O, intent: L, children: /* @__PURE__ */ d($r, { value: b, children: /* @__PURE__ */ d(Pi, { children: /* @__PURE__ */ d(Ar, { value: mo, children: /* @__PURE__ */ d(Pc, { path: e, document: T, view: P, viewer: o, onRetry: S, editing: w }, e) }) }) }) }) });
3562
- }, Xt = Object.freeze({ kind: "skeleton" }), Bc = (e, t, n, r, o) => {
3576
+ }, [f, e, T, r]), /* @__PURE__ */ d(we, { value: N, children: /* @__PURE__ */ d(Pe, { kind: T.kind, view: H, label: a(e, T), stale: nn, busy: nn, frameRef: O, intent: L, children: /* @__PURE__ */ d(_r, { value: b, children: /* @__PURE__ */ d(Ii, { children: /* @__PURE__ */ d(Nr, { value: ho, children: /* @__PURE__ */ d(Ic, { path: e, document: T, view: P, viewer: o, onRetry: S, editing: w }, e) }) }) }) }) });
3577
+ }, Xt = Object.freeze({ kind: "skeleton" }), Uc = (e, t, n, r, o) => {
3563
3578
  if (t?.status === "loaded") return { kind: "document", path: e, snapshot: t, stale: !1 };
3564
3579
  const s = ge(t);
3565
3580
  if (s !== null) return { kind: "document", path: e, snapshot: s, stale: !0 };
3566
3581
  if (o && t?.status === "pending") return { kind: "streaming", path: e, promise: t.promise };
3567
3582
  const a = n === null || n === e ? null : ge(r);
3568
3583
  return n === null || a === null ? Xt : { kind: "document", path: n, snapshot: a, stale: !0 };
3569
- }, Uc = (e, t) => t.status === "deferred" ? Xt : { kind: "document", path: e, snapshot: t, stale: !1 }, Hc = ({ requestedPath: e, content: t, markup: n, ...r }) => {
3570
- const o = t.kind === "streaming" ? Uc(t.path, se(t.promise)) : t;
3571
- return o.kind !== "document" ? /* @__PURE__ */ d(Yt, { label: r.regionLabel(e, null) }) : /* @__PURE__ */ d(qc, { path: o.path, snapshot: o.snapshot, markup: n, stale: o.stale, ...r });
3572
- }, lo = ({ path: e, absence: t, markup: n, display: r, navigation: o, fragment: s, paneScroll: a, announces: i, announceFailure: f, onDocumentShown: u }) => {
3573
- const { config: l, labels: c, locale: m, theme: g, documents: v, data: y } = $(), T = is(), O = U(!1);
3584
+ }, Hc = (e, t) => t.status === "deferred" ? Xt : { kind: "document", path: e, snapshot: t, stale: !1 }, zc = ({ requestedPath: e, content: t, markup: n, ...r }) => {
3585
+ const o = t.kind === "streaming" ? Hc(t.path, se(t.promise)) : t;
3586
+ return o.kind !== "document" ? /* @__PURE__ */ d(Yt, { label: r.regionLabel(e, null) }) : /* @__PURE__ */ d(Bc, { path: o.path, snapshot: o.snapshot, markup: n, stale: o.stale, ...r });
3587
+ }, co = ({ path: e, absence: t, markup: n, display: r, navigation: o, fragment: s, paneScroll: a, announces: i, announceFailure: f, onDocumentShown: u }) => {
3588
+ const { config: l, labels: c, locale: m, theme: g, documents: v, data: E } = $(), T = ls(), O = U(!1);
3574
3589
  Y(() => {
3575
3590
  O.current = !0;
3576
3591
  }, []);
3577
3592
  const [R, q] = V(null), [D, h] = V(n), p = F(() => e === null ? void 0 : v.peek(e), [v, e]), x = re(v.subscribe, p, p), A = F(() => R === null ? void 0 : v.peek(R), [v, R]), I = re(v.subscribe, A, A);
3578
3593
  Y(() => e === null ? void 0 : v.open(e), [v, e]), Y(() => R === null ? void 0 : v.retain(R), [v, R]);
3579
- const _ = e === null ? Xt : Bc(e, x, R, I, !O.current), b = e === null ? null : _.kind === "document" && !_.stale ? _.path : R;
3594
+ const _ = e === null ? Xt : Uc(e, x, R, I, !O.current), b = e === null ? null : _.kind === "document" && !_.stale ? _.path : R;
3580
3595
  b !== R && q(b);
3581
3596
  const S = _.kind !== "document" || _.path === e;
3582
3597
  S && n !== D && h(n);
3583
- const L = X(() => kl(c, m), [c, m]), M = X(() => ({ read: (C, N) => Ni(y, C, N) }), [y]), P = X(() => [...l.iframeHosts], [l]), H = o.kind === "panel", K = X(
3598
+ const L = X(() => kl(c, m), [c, m]), M = X(() => ({ read: (C, N) => Di(E, C, N) }), [E]), P = X(() => [...l.iframeHosts], [l]), H = o.kind === "panel", K = X(
3584
3599
  () => ({
3585
3600
  labels: L,
3586
3601
  spreadsheetLocale: m,
3587
- spreadsheetTapScrollCircle: Lr,
3602
+ spreadsheetTapScrollCircle: Mr,
3588
3603
  emptyMessage: c.documentEmpty,
3589
3604
  theme: g,
3590
3605
  availableStyles: l.documentStyles,
3591
3606
  iFrameAllowedDomains: P,
3592
3607
  embeds: l.embeds,
3593
- linkComponent: Hi,
3608
+ linkComponent: zi,
3594
3609
  toolbar: T,
3595
3610
  style: r.style,
3596
3611
  onStyleChange: r.onStyleChange,
@@ -3602,14 +3617,14 @@ const El = /* @__PURE__ */ new Map([
3602
3617
  padding: r.padding,
3603
3618
  width: r.width === void 0 ? void 0 : `min(${r.width}, 100%)`,
3604
3619
  maxWidth: r.maxWidth === void 0 ? void 0 : `min(${r.maxWidth}, 100%)`,
3605
- renderScrollBar: H ? void 0 : Tr,
3606
- scrollBarGutter: H ? void 0 : Cr,
3620
+ renderScrollBar: H ? void 0 : Rr,
3621
+ scrollBarGutter: H ? void 0 : Or,
3607
3622
  imageSource: M
3608
3623
  }),
3609
3624
  [L, m, c.documentEmpty, g, l.documentStyles, P, l.embeds, T, r, H, M]
3610
- ), w = F((C, N) => H ? N === null || N.kind === "failure" ? fe(C) : N.name : c.documentRegion, [H, c.documentRegion]), k = H ? "content" : "fill";
3611
- return e === null ? /* @__PURE__ */ d(we, { value: k, children: /* @__PURE__ */ d(Mc, { absence: t, announces: i, announceFailure: f }) }) : /* @__PURE__ */ d(we, { value: k, children: /* @__PURE__ */ d(Ie, { fallback: /* @__PURE__ */ d(Yt, { label: w(e, null) }), children: /* @__PURE__ */ d(
3612
- Hc,
3625
+ ), w = F((C, N) => H ? N === null || N.kind === "failure" ? fe(C) : N.name : c.documentRegion, [H, c.documentRegion]), y = H ? "content" : "fill";
3626
+ return e === null ? /* @__PURE__ */ d(we, { value: y, children: /* @__PURE__ */ d(Ac, { absence: t, announces: i, announceFailure: f }) }) : /* @__PURE__ */ d(we, { value: y, children: /* @__PURE__ */ d(Ie, { fallback: /* @__PURE__ */ d(Yt, { label: w(e, null) }), children: /* @__PURE__ */ d(
3627
+ zc,
3613
3628
  {
3614
3629
  requestedPath: e,
3615
3630
  content: _,
@@ -3625,11 +3640,11 @@ const El = /* @__PURE__ */ new Map([
3625
3640
  onDocumentShown: u
3626
3641
  }
3627
3642
  ) }) });
3628
- }, zc = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => {
3629
- const { config: s, viewSettings: a, announcer: i } = $(), f = Qe((I) => I.style), u = Qe((I) => I.align), l = at(), c = rr(), m = Bt(), { view: g, overrides: v, embed: y } = r, T = F(
3643
+ }, jc = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => {
3644
+ const { config: s, viewSettings: a, announcer: i } = $(), f = Qe((I) => I.style), u = Qe((I) => I.align), l = at(), c = rr(), m = Bt(), { view: g, overrides: v, embed: E } = r, T = F(
3630
3645
  (I) => {
3631
3646
  if (m.kind !== "location") return;
3632
- const _ = Lc(s, m.location, I);
3647
+ const _ = Mc(s, m.location, I);
3633
3648
  _ !== null && l(_, "browse");
3634
3649
  },
3635
3650
  [s, l, m]
@@ -3643,25 +3658,25 @@ const El = /* @__PURE__ */ new Map([
3643
3658
  a.update({ align: I }), T("align");
3644
3659
  },
3645
3660
  [a, T]
3646
- ), q = Zr(s, v.style, f), D = Wr(v.align, u), h = X(
3661
+ ), q = Wr(s, v.style, f), D = Gr(v.align, u), h = X(
3647
3662
  () => ({
3648
3663
  style: q,
3649
3664
  onStyleChange: O,
3650
3665
  align: D,
3651
3666
  onAlignChange: R,
3652
- showToc: y.showToc !== !1,
3653
- showStyle: y.showStyle !== !1,
3654
- showAlign: y.showAlign !== !1,
3655
- padding: y.padding,
3656
- width: y.width,
3657
- maxWidth: y.maxWidth,
3667
+ showToc: E.showToc !== !1,
3668
+ showStyle: E.showStyle !== !1,
3669
+ showAlign: E.showAlign !== !1,
3670
+ padding: E.padding,
3671
+ width: E.width,
3672
+ maxWidth: E.maxWidth,
3658
3673
  editLayout: "fill"
3659
3674
  }),
3660
- [q, O, D, R, y]
3661
- ), p = X(() => ({ kind: "page", view: g, overrides: v, embed: y }), [g, v, y]), x = X(() => ({ kind: "page", fragment: c.hash, navigation: c }), [c]), A = F((I) => i.announce(I), [i]);
3662
- return /* @__PURE__ */ d(lo, { path: e, absence: t, markup: n, display: h, navigation: p, fragment: x, paneScroll: fi, announces: !0, announceFailure: A, onDocumentShown: o });
3663
- }, jc = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => {
3664
- const { config: s, viewSettings: a } = $(), i = Qe((p) => p.style), f = Qe((p) => p.align), [u, l] = V(() => Zr(s, void 0, i)), c = Wr(void 0, f), m = F((p) => a.update({ align: p }), [a]), { maximized: g, onDocumentLink: v, pendingHash: y, onHashConsumed: T, announceFailure: O, paneScroll: R } = r, q = X(
3675
+ [q, O, D, R, E]
3676
+ ), p = X(() => ({ kind: "page", view: g, overrides: v, embed: E }), [g, v, E]), x = X(() => ({ kind: "page", fragment: c.hash, navigation: c }), [c]), A = F((I) => i.announce(I), [i]);
3677
+ return /* @__PURE__ */ d(co, { path: e, absence: t, markup: n, display: h, navigation: p, fragment: x, paneScroll: mi, announces: !0, announceFailure: A, onDocumentShown: o });
3678
+ }, Vc = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => {
3679
+ const { config: s, viewSettings: a } = $(), i = Qe((p) => p.style), f = Qe((p) => p.align), [u, l] = V(() => Wr(s, void 0, i)), c = Gr(void 0, f), m = F((p) => a.update({ align: p }), [a]), { maximized: g, onDocumentLink: v, pendingHash: E, onHashConsumed: T, announceFailure: O, paneScroll: R } = r, q = X(
3665
3680
  () => ({
3666
3681
  style: u,
3667
3682
  onStyleChange: l,
@@ -3676,15 +3691,15 @@ const El = /* @__PURE__ */ new Map([
3676
3691
  editLayout: g ? "fill" : "content"
3677
3692
  }),
3678
3693
  [u, c, m, g]
3679
- ), D = X(() => ({ kind: "panel", onDocumentLink: v }), [v]), h = X(() => ({ kind: "panel", fragment: y, consume: T }), [y, T]);
3680
- return /* @__PURE__ */ d(lo, { path: e, absence: t, markup: n, display: q, navigation: D, fragment: h, paneScroll: R, announces: !1, announceFailure: O, onDocumentShown: o });
3681
- }, Vc = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => r.kind === "page" ? /* @__PURE__ */ d(zc, { path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) : /* @__PURE__ */ d(jc, { path: e, absence: t, markup: n, variant: r, onDocumentShown: o });
3682
- function Zc({
3694
+ ), D = X(() => ({ kind: "panel", onDocumentLink: v }), [v]), h = X(() => ({ kind: "panel", fragment: E, consume: T }), [E, T]);
3695
+ return /* @__PURE__ */ d(co, { path: e, absence: t, markup: n, display: q, navigation: D, fragment: h, paneScroll: R, announces: !1, announceFailure: O, onDocumentShown: o });
3696
+ }, Zc = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => r.kind === "page" ? /* @__PURE__ */ d(jc, { path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) : /* @__PURE__ */ d(Vc, { path: e, absence: t, markup: n, variant: r, onDocumentShown: o });
3697
+ function Wc({
3683
3698
  title: e,
3684
3699
  titleId: t,
3685
3700
  ...n
3686
3701
  }, r) {
3687
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
3702
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
3688
3703
  xmlns: "http://www.w3.org/2000/svg",
3689
3704
  viewBox: "0 0 24 24",
3690
3705
  fill: "currentColor",
@@ -3692,21 +3707,21 @@ function Zc({
3692
3707
  "data-slot": "icon",
3693
3708
  ref: r,
3694
3709
  "aria-labelledby": t
3695
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
3710
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
3696
3711
  id: t
3697
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
3712
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
3698
3713
  fillRule: "evenodd",
3699
3714
  d: "M4.755 10.059a7.5 7.5 0 0 1 12.548-3.364l1.903 1.903h-3.183a.75.75 0 1 0 0 1.5h4.992a.75.75 0 0 0 .75-.75V4.356a.75.75 0 0 0-1.5 0v3.18l-1.9-1.9A9 9 0 0 0 3.306 9.67a.75.75 0 1 0 1.45.388Zm15.408 3.352a.75.75 0 0 0-.919.53 7.5 7.5 0 0 1-12.548 3.364l-1.902-1.903h3.183a.75.75 0 0 0 0-1.5H2.984a.75.75 0 0 0-.75.75v4.992a.75.75 0 0 0 1.5 0v-3.18l1.9 1.9a9 9 0 0 0 15.059-4.035.75.75 0 0 0-.53-.918Z",
3700
3715
  clipRule: "evenodd"
3701
3716
  }));
3702
3717
  }
3703
- const Wc = /* @__PURE__ */ E.forwardRef(Zc);
3704
- function Gc({
3718
+ const Gc = /* @__PURE__ */ k.forwardRef(Wc);
3719
+ function Kc({
3705
3720
  title: e,
3706
3721
  titleId: t,
3707
3722
  ...n
3708
3723
  }, r) {
3709
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
3724
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
3710
3725
  xmlns: "http://www.w3.org/2000/svg",
3711
3726
  viewBox: "0 0 24 24",
3712
3727
  fill: "currentColor",
@@ -3714,21 +3729,21 @@ function Gc({
3714
3729
  "data-slot": "icon",
3715
3730
  ref: r,
3716
3731
  "aria-labelledby": t
3717
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
3732
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
3718
3733
  id: t
3719
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
3734
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
3720
3735
  fillRule: "evenodd",
3721
3736
  d: "M14.447 3.026a.75.75 0 0 1 .527.921l-4.5 16.5a.75.75 0 0 1-1.448-.394l4.5-16.5a.75.75 0 0 1 .921-.527ZM16.72 6.22a.75.75 0 0 1 1.06 0l5.25 5.25a.75.75 0 0 1 0 1.06l-5.25 5.25a.75.75 0 1 1-1.06-1.06L21.44 12l-4.72-4.72a.75.75 0 0 1 0-1.06Zm-9.44 0a.75.75 0 0 1 0 1.06L2.56 12l4.72 4.72a.75.75 0 0 1-1.06 1.06L.97 12.53a.75.75 0 0 1 0-1.06l5.25-5.25a.75.75 0 0 1 1.06 0Z",
3722
3737
  clipRule: "evenodd"
3723
3738
  }));
3724
3739
  }
3725
- const co = /* @__PURE__ */ E.forwardRef(Gc);
3726
- function Kc({
3740
+ const uo = /* @__PURE__ */ k.forwardRef(Kc);
3741
+ function Yc({
3727
3742
  title: e,
3728
3743
  titleId: t,
3729
3744
  ...n
3730
3745
  }, r) {
3731
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
3746
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
3732
3747
  xmlns: "http://www.w3.org/2000/svg",
3733
3748
  viewBox: "0 0 24 24",
3734
3749
  fill: "currentColor",
@@ -3736,21 +3751,21 @@ function Kc({
3736
3751
  "data-slot": "icon",
3737
3752
  ref: r,
3738
3753
  "aria-labelledby": t
3739
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
3754
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
3740
3755
  id: t
3741
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
3756
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
3742
3757
  fillRule: "evenodd",
3743
3758
  d: "M15.75 2.25H21a.75.75 0 0 1 .75.75v5.25a.75.75 0 0 1-1.5 0V4.81L8.03 17.03a.75.75 0 0 1-1.06-1.06L19.19 3.75h-3.44a.75.75 0 0 1 0-1.5Zm-10.5 4.5a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h10.5a1.5 1.5 0 0 0 1.5-1.5V10.5a.75.75 0 0 1 1.5 0v8.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V8.25a3 3 0 0 1 3-3h8.25a.75.75 0 0 1 0 1.5H5.25Z",
3744
3759
  clipRule: "evenodd"
3745
3760
  }));
3746
3761
  }
3747
- const Yc = /* @__PURE__ */ E.forwardRef(Kc);
3748
- function Xc({
3762
+ const Xc = /* @__PURE__ */ k.forwardRef(Yc);
3763
+ function Jc({
3749
3764
  title: e,
3750
3765
  titleId: t,
3751
3766
  ...n
3752
3767
  }, r) {
3753
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
3768
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
3754
3769
  xmlns: "http://www.w3.org/2000/svg",
3755
3770
  viewBox: "0 0 24 24",
3756
3771
  fill: "currentColor",
@@ -3758,25 +3773,25 @@ function Xc({
3758
3773
  "data-slot": "icon",
3759
3774
  ref: r,
3760
3775
  "aria-labelledby": t
3761
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
3776
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
3762
3777
  id: t
3763
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
3778
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
3764
3779
  fillRule: "evenodd",
3765
3780
  d: "M11.47 13.28a.75.75 0 0 0 1.06 0l7.5-7.5a.75.75 0 0 0-1.06-1.06L12 11.69 5.03 4.72a.75.75 0 0 0-1.06 1.06l7.5 7.5Z",
3766
3781
  clipRule: "evenodd"
3767
- }), /* @__PURE__ */ E.createElement("path", {
3782
+ }), /* @__PURE__ */ k.createElement("path", {
3768
3783
  fillRule: "evenodd",
3769
3784
  d: "M11.47 19.28a.75.75 0 0 0 1.06 0l7.5-7.5a.75.75 0 1 0-1.06-1.06L12 17.69l-6.97-6.97a.75.75 0 0 0-1.06 1.06l7.5 7.5Z",
3770
3785
  clipRule: "evenodd"
3771
3786
  }));
3772
3787
  }
3773
- const Jc = /* @__PURE__ */ E.forwardRef(Xc);
3774
- function Qc({
3788
+ const Qc = /* @__PURE__ */ k.forwardRef(Jc);
3789
+ function ed({
3775
3790
  title: e,
3776
3791
  titleId: t,
3777
3792
  ...n
3778
3793
  }, r) {
3779
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
3794
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
3780
3795
  xmlns: "http://www.w3.org/2000/svg",
3781
3796
  viewBox: "0 0 24 24",
3782
3797
  fill: "currentColor",
@@ -3784,21 +3799,21 @@ function Qc({
3784
3799
  "data-slot": "icon",
3785
3800
  ref: r,
3786
3801
  "aria-labelledby": t
3787
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
3802
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
3788
3803
  id: t
3789
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
3804
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
3790
3805
  fillRule: "evenodd",
3791
3806
  d: "M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25ZM12.75 6a.75.75 0 0 0-1.5 0v6c0 .414.336.75.75.75h4.5a.75.75 0 0 0 0-1.5h-3.75V6Z",
3792
3807
  clipRule: "evenodd"
3793
3808
  }));
3794
3809
  }
3795
- const ed = /* @__PURE__ */ E.forwardRef(Qc);
3796
- function td({
3810
+ const td = /* @__PURE__ */ k.forwardRef(ed);
3811
+ function nd({
3797
3812
  title: e,
3798
3813
  titleId: t,
3799
3814
  ...n
3800
3815
  }, r) {
3801
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
3816
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
3802
3817
  xmlns: "http://www.w3.org/2000/svg",
3803
3818
  viewBox: "0 0 24 24",
3804
3819
  fill: "currentColor",
@@ -3806,23 +3821,23 @@ function td({
3806
3821
  "data-slot": "icon",
3807
3822
  ref: r,
3808
3823
  "aria-labelledby": t
3809
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
3824
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
3810
3825
  id: t
3811
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
3826
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
3812
3827
  fillRule: "evenodd",
3813
3828
  d: "M9 1.5H5.625c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5Zm6.61 10.936a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 14.47a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",
3814
3829
  clipRule: "evenodd"
3815
- }), /* @__PURE__ */ E.createElement("path", {
3830
+ }), /* @__PURE__ */ k.createElement("path", {
3816
3831
  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"
3817
3832
  }));
3818
3833
  }
3819
- const nd = /* @__PURE__ */ E.forwardRef(td);
3820
- function rd({
3834
+ const rd = /* @__PURE__ */ k.forwardRef(nd);
3835
+ function od({
3821
3836
  title: e,
3822
3837
  titleId: t,
3823
3838
  ...n
3824
3839
  }, r) {
3825
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
3840
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
3826
3841
  xmlns: "http://www.w3.org/2000/svg",
3827
3842
  viewBox: "0 0 24 24",
3828
3843
  fill: "currentColor",
@@ -3830,23 +3845,23 @@ function rd({
3830
3845
  "data-slot": "icon",
3831
3846
  ref: r,
3832
3847
  "aria-labelledby": t
3833
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
3848
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
3834
3849
  id: t
3835
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
3850
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
3836
3851
  d: "M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"
3837
- }), /* @__PURE__ */ E.createElement("path", {
3852
+ }), /* @__PURE__ */ k.createElement("path", {
3838
3853
  fillRule: "evenodd",
3839
3854
  d: "M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 0 1 0-1.113ZM17.25 12a5.25 5.25 0 1 1-10.5 0 5.25 5.25 0 0 1 10.5 0Z",
3840
3855
  clipRule: "evenodd"
3841
3856
  }));
3842
3857
  }
3843
- const od = /* @__PURE__ */ E.forwardRef(rd);
3844
- function sd({
3858
+ const sd = /* @__PURE__ */ k.forwardRef(od);
3859
+ function ad({
3845
3860
  title: e,
3846
3861
  titleId: t,
3847
3862
  ...n
3848
3863
  }, r) {
3849
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
3864
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
3850
3865
  xmlns: "http://www.w3.org/2000/svg",
3851
3866
  viewBox: "0 0 24 24",
3852
3867
  fill: "currentColor",
@@ -3854,21 +3869,21 @@ function sd({
3854
3869
  "data-slot": "icon",
3855
3870
  ref: r,
3856
3871
  "aria-labelledby": t
3857
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
3872
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
3858
3873
  id: t
3859
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
3874
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
3860
3875
  d: "M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"
3861
- }), /* @__PURE__ */ E.createElement("path", {
3876
+ }), /* @__PURE__ */ k.createElement("path", {
3862
3877
  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"
3863
3878
  }));
3864
3879
  }
3865
- const ad = /* @__PURE__ */ E.forwardRef(sd);
3866
- function id({
3880
+ const id = /* @__PURE__ */ k.forwardRef(ad);
3881
+ function ld({
3867
3882
  title: e,
3868
3883
  titleId: t,
3869
3884
  ...n
3870
3885
  }, r) {
3871
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
3886
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
3872
3887
  xmlns: "http://www.w3.org/2000/svg",
3873
3888
  viewBox: "0 0 24 24",
3874
3889
  fill: "currentColor",
@@ -3876,13 +3891,13 @@ function id({
3876
3891
  "data-slot": "icon",
3877
3892
  ref: r,
3878
3893
  "aria-labelledby": t
3879
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
3894
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
3880
3895
  id: t
3881
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
3896
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
3882
3897
  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"
3883
3898
  }));
3884
3899
  }
3885
- const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId: n }) => {
3900
+ const cd = /* @__PURE__ */ k.forwardRef(ld), dd = ({ href: e, onRetry: t, testId: n }) => {
3886
3901
  const { labels: r, onEditGrant: o } = $(), [s, a] = V(!1), i = () => {
3887
3902
  o === void 0 || s || (a(!0), o(e).then((f) => {
3888
3903
  f && t();
@@ -3898,22 +3913,22 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
3898
3913
  /* @__PURE__ */ d("button", { type: "button", className: "aqmx-callout-action", "data-testid": `${n}-retry`, onClick: t, children: r.editGrantRetry })
3899
3914
  ] })
3900
3915
  ] });
3901
- }, dd = "Control+E Meta+E", ud = (e, t, n) => n && t ? "split" : e.view, Zn = (e, t, n, r) => {
3916
+ }, ud = "Control+E Meta+E", fd = (e, t, n) => n && t ? "split" : e.view, Zn = (e, t, n, r) => {
3902
3917
  if (n === "split") {
3903
3918
  e.setSideBySide(!0);
3904
3919
  return;
3905
3920
  }
3906
3921
  e.setView(t, n), r && e.sideBySide() && e.setSideBySide(!1);
3907
- }, Mu = (e) => e === "split" ? null : e, fd = (e) => e === "preview" ? "editor" : "preview", md = (e) => /Mac|iPhone|iPad|iPod/u.test(e), hd = (e, t) => {
3922
+ }, Nu = (e) => e === "split" ? null : e, md = (e) => e === "preview" ? "editor" : "preview", hd = (e) => /Mac|iPhone|iPad|iPod/u.test(e), pd = (e, t) => {
3908
3923
  if (e.isComposing || e.altKey || e.shiftKey || (t ? !e.metaKey || e.ctrlKey : !e.ctrlKey || e.metaKey)) return !1;
3909
3924
  const n = e.key.toLowerCase();
3910
3925
  return n === "e" || e.code === "KeyE" && /^\p{L}$/u.test(n) && !/^[a-z]$/u.test(n);
3911
3926
  }, Wn = (e, t, n) => {
3912
3927
  const r = e.modifiedAt === null ? Number.NaN : Date.parse(e.modifiedAt);
3913
3928
  return n(Number.isNaN(r) ? e.id : t.format(r), e.author === null ? "" : e.author);
3914
- }, pd = ({ path: e, documentName: t, open: n, onClose: r }) => {
3915
- const { data: o, edits: s, labels: a, locale: i, announcer: f } = $(), u = Te(), [l, c] = V(null), [m, g] = V(0), [v, y] = V(null), [T, O] = V(null), R = X(() => new Intl.DateTimeFormat(i, { dateStyle: "medium", timeStyle: "short" }), [i]), q = F(() => {
3916
- y(null), O(null);
3929
+ }, gd = ({ path: e, documentName: t, open: n, onClose: r }) => {
3930
+ const { data: o, edits: s, labels: a, locale: i, announcer: f } = $(), u = Te(), [l, c] = V(null), [m, g] = V(0), [v, E] = V(null), [T, O] = V(null), R = X(() => new Intl.DateTimeFormat(i, { dateStyle: "medium", timeStyle: "short" }), [i]), q = F(() => {
3931
+ E(null), O(null);
3917
3932
  }, []), D = vr({ open: n, onOpen: q, onDismiss: r });
3918
3933
  ee(() => {
3919
3934
  if (!n) return;
@@ -3933,7 +3948,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
3933
3948
  }, p = l !== null && l.kind === "revisions" ? l.revisions.find((x) => x.id === v) : void 0;
3934
3949
  return /* @__PURE__ */ d("dialog", { ...D, className: "aqmx-confirm aqmx-history", "aria-labelledby": u, "data-testid": "markdown-explorer-history", children: /* @__PURE__ */ B("div", { className: "aqmx-confirm-panel aqmx-history-panel", children: [
3935
3950
  /* @__PURE__ */ d("p", { id: u, className: "aqmx-confirm-title", children: a.historyTitle(t) }),
3936
- l === null ? /* @__PURE__ */ d("p", { className: "aqmx-history-note", "data-testid": "markdown-explorer-history-loading", children: a.historyLoading }) : l.kind === "failure" ? /* @__PURE__ */ d(Re, { failure: l.failure, alert: !1, onRetry: () => g((x) => x + 1), testId: "markdown-explorer-history-failure" }) : l.revisions.length === 0 ? /* @__PURE__ */ d("p", { className: "aqmx-history-note", "data-testid": "markdown-explorer-history-empty", children: a.historyEmpty }) : /* @__PURE__ */ d("ul", { className: "aqmx-history-list", "data-testid": "markdown-explorer-history-list", children: l.revisions.map((x) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ B("button", { type: "button", className: "aqmx-history-entry", "aria-pressed": x.id === v, "data-testid": "markdown-explorer-history-entry", onClick: () => y(x.id), children: [
3951
+ l === null ? /* @__PURE__ */ d("p", { className: "aqmx-history-note", "data-testid": "markdown-explorer-history-loading", children: a.historyLoading }) : l.kind === "failure" ? /* @__PURE__ */ d(Re, { failure: l.failure, alert: !1, onRetry: () => g((x) => x + 1), testId: "markdown-explorer-history-failure" }) : l.revisions.length === 0 ? /* @__PURE__ */ d("p", { className: "aqmx-history-note", "data-testid": "markdown-explorer-history-empty", children: a.historyEmpty }) : /* @__PURE__ */ d("ul", { className: "aqmx-history-list", "data-testid": "markdown-explorer-history-list", children: l.revisions.map((x) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ B("button", { type: "button", className: "aqmx-history-entry", "aria-pressed": x.id === v, "data-testid": "markdown-explorer-history-entry", onClick: () => E(x.id), children: [
3937
3952
  /* @__PURE__ */ d("span", { children: Wn(x, R, a.historyEntry) }),
3938
3953
  x.current ? /* @__PURE__ */ d("span", { className: "aqmx-history-mark", children: a.historyCurrent }) : null,
3939
3954
  x.kept ? /* @__PURE__ */ d("span", { className: "aqmx-history-mark", children: a.historyKept }) : null
@@ -3946,12 +3961,12 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
3946
3961
  /* @__PURE__ */ d("button", { type: "button", className: "aqmx-callout-action", "aria-disabled": T === null || T.kind !== "revision", "data-testid": "markdown-explorer-history-restore", onClick: h, children: a.historyRestore })
3947
3962
  ] })
3948
3963
  ] }) });
3949
- }, gd = (e) => {
3964
+ }, wd = (e) => {
3950
3965
  const { documents: t } = $(), n = F(() => t.peek(e), [t, e]), r = F(() => t.peekSeeded(e), [t, e]), o = re(t.subscribe, n, r), s = ge(o)?.document;
3951
3966
  return s === void 0 || s.kind === "failure" ? { edit: null, name: fe(e) } : { edit: s.kind === "markdown" || s.kind === "spreadsheet" ? s.edit : null, name: s.name };
3952
3967
  }, me = (e) => {
3953
3968
  e.stopPropagation();
3954
- }, wd = ({ path: e, documentName: t, iconOnly: n, previewAvailable: r, draft: o }) => {
3969
+ }, vd = ({ path: e, documentName: t, iconOnly: n, previewAvailable: r, draft: o }) => {
3955
3970
  const { draftConverter: s, edits: a, labels: i } = $(), f = re(
3956
3971
  a.subscribe,
3957
3972
  () => a.session(e) !== void 0,
@@ -3962,10 +3977,10 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
3962
3977
  return;
3963
3978
  }
3964
3979
  a.flush(e);
3965
- const y = a.session(e);
3966
- y?.dirty === !0 ? l(y.save.kind === "draft" ? "draft" : "unsaved") : a.close(e);
3980
+ const E = a.session(e);
3981
+ E?.dirty === !0 ? l(E.save.kind === "draft" ? "draft" : "unsaved") : a.close(e);
3967
3982
  }, m = () => {
3968
- f || (na(), r && a.sideBySide() && s?.prepare?.());
3983
+ f || (ra(), r && a.sideBySide() && s?.prepare?.());
3969
3984
  }, g = n ? o ? i.editDraftDocumentNamed(t) : i.editDocumentNamed(t) : null, v = o ? i.editDraftDocument : i.editDocument;
3970
3985
  return /* @__PURE__ */ B(pe, { children: [
3971
3986
  /* @__PURE__ */ B(
@@ -3982,7 +3997,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
3982
3997
  onPointerEnter: m,
3983
3998
  onFocus: m,
3984
3999
  children: [
3985
- /* @__PURE__ */ d(ad, { "aria-hidden": "true" }),
4000
+ /* @__PURE__ */ d(id, { "aria-hidden": "true" }),
3986
4001
  g === null ? /* @__PURE__ */ d("span", { children: i.editDocumentLabel }) : null
3987
4002
  ]
3988
4003
  }
@@ -4003,7 +4018,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4003
4018
  }
4004
4019
  )
4005
4020
  ] });
4006
- }, vd = ({ href: e, documentName: t, iconOnly: n }) => {
4021
+ }, bd = ({ href: e, documentName: t, iconOnly: n }) => {
4007
4022
  const { labels: r } = $(), o = n ? r.editExternallyNamed(t) : null;
4008
4023
  return /* @__PURE__ */ B(
4009
4024
  "a",
@@ -4017,29 +4032,29 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4017
4032
  "data-testid": "markdown-explorer-document-edit-external",
4018
4033
  onDoubleClick: me,
4019
4034
  children: [
4020
- /* @__PURE__ */ d(Yc, { "aria-hidden": "true" }),
4035
+ /* @__PURE__ */ d(Xc, { "aria-hidden": "true" }),
4021
4036
  o === null ? /* @__PURE__ */ d("span", { children: r.editExternallyLabel }) : null
4022
4037
  ]
4023
4038
  }
4024
4039
  );
4025
- }, bd = ({ session: e }) => {
4026
- const { labels: t } = $(), n = Ts(t, e);
4040
+ }, Ed = ({ session: e }) => {
4041
+ const { labels: t } = $(), n = Rs(t, e);
4027
4042
  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 });
4028
- }, yd = Object.freeze(["editor", "split", "preview"]), kd = Object.freeze(["editor", "preview"]), Ed = Object.freeze({ editor: co, split: ld, preview: od }), Sd = ({ path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }) => {
4029
- const { draftConverter: s, edits: a, labels: i } = $(), f = Xs(), u = ud(r, f, o), l = o ? yd : kd, c = Te(), m = U(/* @__PURE__ */ new Map()), g = {
4043
+ }, yd = Object.freeze(["editor", "split", "preview"]), kd = Object.freeze(["editor", "preview"]), Sd = Object.freeze({ editor: uo, split: cd, preview: sd }), xd = ({ path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }) => {
4044
+ const { draftConverter: s, edits: a, labels: i } = $(), f = Js(), u = fd(r, f, o), l = o ? yd : kd, c = Te(), m = U(/* @__PURE__ */ new Map()), g = {
4030
4045
  editor: { label: i.editViewEditor, tooltip: i.editViewEditorTooltip },
4031
4046
  split: { label: i.editViewSplit, tooltip: i.editViewSplitTooltip },
4032
4047
  preview: { label: i.editViewPreview, tooltip: i.editViewPreviewTooltip }
4033
4048
  }, v = () => {
4034
4049
  a.preparePreview(e), s?.prepare?.();
4035
- }, y = (T) => {
4036
- if (!hd(T.nativeEvent, md(navigator.platform))) return;
4050
+ }, E = (T) => {
4051
+ if (!pd(T.nativeEvent, hd(navigator.platform))) return;
4037
4052
  gr(T);
4038
- const O = fd(u);
4053
+ const O = md(u);
4039
4054
  Zn(a, e, O, o), m.current.get(O)?.focus();
4040
4055
  };
4041
- return /* @__PURE__ */ d("div", { role: "radiogroup", "aria-label": n ? i.editViewNamed(t) : i.editView, className: "aqmx-edit-view", "data-testid": "markdown-explorer-edit-view", onKeyDown: y, children: l.map((T) => {
4042
- const O = Ed[T], { label: R, tooltip: q } = g[T], D = T === "preview" ? v : void 0;
4056
+ return /* @__PURE__ */ d("div", { role: "radiogroup", "aria-label": n ? i.editViewNamed(t) : i.editView, className: "aqmx-edit-view", "data-testid": "markdown-explorer-edit-view", onKeyDown: E, children: l.map((T) => {
4057
+ const O = Sd[T], { label: R, tooltip: q } = g[T], D = T === "preview" ? v : void 0;
4043
4058
  return /* @__PURE__ */ B("label", { className: n ? "aqmx-icon-button" : "aqmx-icon-button aqmx-labelled-button", children: [
4044
4059
  /* @__PURE__ */ d(
4045
4060
  "input",
@@ -4052,7 +4067,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4052
4067
  value: T,
4053
4068
  checked: T === u,
4054
4069
  "aria-label": R,
4055
- "aria-keyshortcuts": T === "split" ? void 0 : dd,
4070
+ "aria-keyshortcuts": T === "split" ? void 0 : ud,
4056
4071
  title: q,
4057
4072
  "data-testid": `markdown-explorer-edit-view-${T}`,
4058
4073
  onChange: () => Zn(a, e, T, o),
@@ -4065,7 +4080,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4065
4080
  n ? null : /* @__PURE__ */ d("span", { children: R })
4066
4081
  ] }, T);
4067
4082
  }) });
4068
- }, xd = ({ path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }) => {
4083
+ }, Td = ({ path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }) => {
4069
4084
  const { edits: s, labels: a } = $(), [i, f] = V(!1);
4070
4085
  if (r.phase.kind !== "editing") return null;
4071
4086
  const u = r.save.kind === "saving", l = u || !r.dirty, c = () => {
@@ -4075,28 +4090,28 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4075
4090
  }, m = (g) => n ? { className: "aqmx-icon-button", "aria-label": g } : { className: "aqmx-icon-button aqmx-labelled-button" };
4076
4091
  return /* @__PURE__ */ B(pe, { children: [
4077
4092
  r.save.kind === "conflicts" ? /* @__PURE__ */ B("button", { type: "button", ...m(a.conflictNext), title: a.conflictNext, "data-testid": "markdown-explorer-edit-next-conflict", onClick: () => s.nextConflict(e), onDoubleClick: me, children: [
4078
- /* @__PURE__ */ d(Jc, { "aria-hidden": "true" }),
4093
+ /* @__PURE__ */ d(Qc, { "aria-hidden": "true" }),
4079
4094
  n ? null : /* @__PURE__ */ d("span", { children: a.conflictNext })
4080
4095
  ] }) : null,
4081
- /* @__PURE__ */ d(Sd, { path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }),
4096
+ /* @__PURE__ */ d(xd, { path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }),
4082
4097
  r.history ? /* @__PURE__ */ B("button", { type: "button", ...m(a.historyOpen), title: a.historyOpen, "aria-haspopup": "dialog", "data-testid": "markdown-explorer-edit-history", onClick: () => f(!0), onDoubleClick: me, children: [
4083
- /* @__PURE__ */ d(ed, { "aria-hidden": "true" }),
4098
+ /* @__PURE__ */ d(td, { "aria-hidden": "true" }),
4084
4099
  n ? null : /* @__PURE__ */ d("span", { children: a.historyOpen })
4085
4100
  ] }) : null,
4086
4101
  r.save.kind === "draft" ? null : /* @__PURE__ */ B("button", { type: "button", ...m(a.saveDraft), title: a.saveDraftTooltip, "aria-disabled": l, "aria-busy": u, "aria-keyshortcuts": "Control+S Meta+S", "data-testid": "markdown-explorer-edit-save", onClick: c, onDoubleClick: me, children: [
4087
- /* @__PURE__ */ d(nd, { "aria-hidden": "true" }),
4102
+ /* @__PURE__ */ d(rd, { "aria-hidden": "true" }),
4088
4103
  n ? null : /* @__PURE__ */ d("span", { children: a.saveDraft })
4089
4104
  ] }),
4090
- r.history ? /* @__PURE__ */ d(pd, { path: e, documentName: t, open: i, onClose: () => f(!1) }) : null
4105
+ r.history ? /* @__PURE__ */ d(gd, { path: e, documentName: t, open: i, onClose: () => f(!1) }) : null
4091
4106
  ] });
4092
- }, Td = ({ path: e, session: t }) => {
4107
+ }, Rd = ({ path: e, session: t }) => {
4093
4108
  const { edits: n } = $();
4094
- return t.save.kind !== "grant" ? null : /* @__PURE__ */ d(cd, { href: t.save.href, onRetry: () => {
4109
+ return t.save.kind !== "grant" ? null : /* @__PURE__ */ d(dd, { href: t.save.href, onRetry: () => {
4095
4110
  n.save(e);
4096
4111
  }, testId: "markdown-explorer-save-grant" });
4097
- }, Rd = /* @__PURE__ */ new Set(), Cd = (e, t, n) => {
4098
- const { documents: r, announcer: o, labels: s } = $(), a = F(() => r.peek(e), [r, e]), i = F(() => r.peekSeeded(e), [r, e]), f = re(r.subscribe, a, i), u = F(() => r.answerStampOf(e), [r, e]), l = re(r.subscribe, u, u), [c] = V(() => /* @__PURE__ */ new Set()), [m, g] = V(Rd), [v, y] = V(null);
4099
- v !== null && (v.path !== e || v.markup !== n) && y(null);
4112
+ }, Cd = /* @__PURE__ */ new Set(), Od = (e, t, n) => {
4113
+ const { documents: r, announcer: o, labels: s } = $(), a = F(() => r.peek(e), [r, e]), i = F(() => r.peekSeeded(e), [r, e]), f = re(r.subscribe, a, i), u = F(() => r.answerStampOf(e), [r, e]), l = re(r.subscribe, u, u), [c] = V(() => /* @__PURE__ */ new Set()), [m, g] = V(Cd), [v, E] = V(null);
4114
+ v !== null && (v.path !== e || v.markup !== n) && E(null);
4100
4115
  const T = U(null);
4101
4116
  Y(() => (T.current = e, () => {
4102
4117
  T.current = null;
@@ -4107,12 +4122,12 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4107
4122
  }, [n]);
4108
4123
  const R = F(() => {
4109
4124
  const h = e, p = r.peek(h);
4110
- c.has(h) || p?.status === "pending" || (c.add(h), g(new Set(c)), y(null), (async () => {
4125
+ c.has(h) || p?.status === "pending" || (c.add(h), g(new Set(c)), E(null), (async () => {
4111
4126
  try {
4112
4127
  const x = await r.refresh(h);
4113
4128
  if (T.current !== h || x.status === "superseded") return;
4114
4129
  if (x.status === "failed") {
4115
- y({ path: h, failure: x.failure, stamp: r.answerStampOf(h), markup: O.current }), o.announce(s.documentRefreshFailed(de(s, x.failure.reason)));
4130
+ E({ path: h, failure: x.failure, stamp: r.answerStampOf(h), markup: O.current }), o.announce(s.documentRefreshFailed(de(s, x.failure.reason)));
4116
4131
  return;
4117
4132
  }
4118
4133
  if (x.status === "shown" && (t || x.failed)) return;
@@ -4125,7 +4140,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4125
4140
  })());
4126
4141
  }, [e, t, c, r, o, s]), q = m.has(e), D = v !== null && v.path === e && v.stamp === l && v.markup === n ? v.failure : null;
4127
4142
  return { refreshing: q, unavailable: q || f?.status === "pending", failure: D, refresh: R };
4128
- }, Od = (e, t) => {
4143
+ }, Ld = (e, t) => {
4129
4144
  switch (t) {
4130
4145
  case "markdown":
4131
4146
  return e.showMarkup;
@@ -4135,30 +4150,30 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4135
4150
  case "tsv":
4136
4151
  return e.showSpreadsheetMarkup(t.toUpperCase());
4137
4152
  }
4138
- }, Ld = Object.freeze({ kind: "page" }), Md = ({ path: e, placement: t, markup: n }) => {
4139
- const { labels: r } = $(), { refreshing: o, unavailable: s, failure: a, refresh: i } = Cd(e, t.kind === "page", n.shown), f = sl(e), u = gd(e), l = kr(e), c = t.kind === "panel" ? r.refreshDocumentNamed(t.documentName) : null, m = t.kind === "panel" ? r.showMarkupNamed(t.documentName) : null, g = t.kind === "panel", v = t.kind === "panel" ? t.documentName : u.name, y = t.kind === "page" || t.maximized;
4153
+ }, Md = Object.freeze({ kind: "page" }), Ad = ({ path: e, placement: t, markup: n }) => {
4154
+ const { labels: r } = $(), { refreshing: o, unavailable: s, failure: a, refresh: i } = Od(e, t.kind === "page", n.shown), f = al(e), u = wd(e), l = yr(e), c = t.kind === "panel" ? r.refreshDocumentNamed(t.documentName) : null, m = t.kind === "panel" ? r.showMarkupNamed(t.documentName) : null, g = t.kind === "panel", v = t.kind === "panel" ? t.documentName : u.name, E = t.kind === "page" || t.maximized;
4140
4155
  return /* @__PURE__ */ B("div", { className: "aqmx-document-refresh-bar", "data-testid": "markdown-explorer-document-refresh-bar", "data-aqmx-editing": l === void 0 ? void 0 : "true", children: [
4141
4156
  /* @__PURE__ */ B("div", { className: "aqmx-document-refresh-row", children: [
4142
- l === void 0 ? null : /* @__PURE__ */ d(bd, { session: l }),
4143
- l === void 0 ? null : /* @__PURE__ */ d(xd, { path: e, documentName: v, iconOnly: g, session: l, previewAvailable: y }),
4157
+ l === void 0 ? null : /* @__PURE__ */ d(Ed, { session: l }),
4158
+ l === void 0 ? null : /* @__PURE__ */ d(Td, { path: e, documentName: v, iconOnly: g, session: l, previewAvailable: E }),
4144
4159
  l === void 0 && f !== null ? /* @__PURE__ */ B(
4145
4160
  "button",
4146
4161
  {
4147
4162
  type: "button",
4148
4163
  className: m === null ? "aqmx-icon-button aqmx-labelled-button" : "aqmx-icon-button",
4149
- title: m === null ? Od(r, f) : m,
4164
+ title: m === null ? Ld(r, f) : m,
4150
4165
  "aria-label": m === null ? void 0 : m,
4151
4166
  "aria-pressed": n.shown,
4152
4167
  "data-testid": "markdown-explorer-document-markup",
4153
4168
  onClick: n.toggle,
4154
4169
  onDoubleClick: me,
4155
4170
  children: [
4156
- /* @__PURE__ */ d(co, { "aria-hidden": "true" }),
4171
+ /* @__PURE__ */ d(uo, { "aria-hidden": "true" }),
4157
4172
  m === null ? /* @__PURE__ */ d("span", { children: r.showMarkupLabel }) : null
4158
4173
  ]
4159
4174
  }
4160
4175
  ) : null,
4161
- l !== void 0 || u.edit?.kind === "inline" || u.edit?.kind === "draft" ? /* @__PURE__ */ d(wd, { path: e, documentName: v, iconOnly: g, previewAvailable: y, draft: u.edit?.kind === "draft" }) : u.edit?.kind === "external" ? /* @__PURE__ */ d(vd, { href: u.edit.href, documentName: v, iconOnly: g }) : null,
4176
+ l !== void 0 || u.edit?.kind === "inline" || u.edit?.kind === "draft" ? /* @__PURE__ */ d(vd, { path: e, documentName: v, iconOnly: g, previewAvailable: E, draft: u.edit?.kind === "draft" }) : u.edit?.kind === "external" ? /* @__PURE__ */ d(bd, { href: u.edit.href, documentName: v, iconOnly: g }) : null,
4162
4177
  l === void 0 ? /* @__PURE__ */ B(
4163
4178
  "button",
4164
4179
  {
@@ -4173,35 +4188,35 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4173
4188
  onClick: i,
4174
4189
  onDoubleClick: me,
4175
4190
  children: [
4176
- /* @__PURE__ */ d(Wc, { "aria-hidden": "true" }),
4191
+ /* @__PURE__ */ d(Gc, { "aria-hidden": "true" }),
4177
4192
  c === null ? /* @__PURE__ */ d("span", { children: r.refreshDocumentLabel }) : null
4178
4193
  ]
4179
4194
  }
4180
4195
  ) : null
4181
4196
  ] }),
4182
4197
  l !== void 0 || a === null ? null : /* @__PURE__ */ d("p", { className: "aqmx-document-refresh-failure", "data-testid": "markdown-explorer-document-refresh-failure", "data-aqmx-failure": a.reason, children: r.documentRefreshFailed(de(r, a.reason)) }),
4183
- l === void 0 ? null : /* @__PURE__ */ d(Td, { path: e, session: l })
4198
+ l === void 0 ? null : /* @__PURE__ */ d(Rd, { path: e, session: l })
4184
4199
  ] });
4185
- }, Ad = ({ location: e }) => {
4186
- const t = e.doc, n = X(() => ({ kind: "page", view: "single", overrides: e.overrides, embed: e.embed }), [e.overrides, e.embed]), r = al(e);
4200
+ }, Nd = ({ location: e }) => {
4201
+ const t = e.doc, n = X(() => ({ kind: "page", view: "single", overrides: e.overrides, embed: e.embed }), [e.overrides, e.embed]), r = il(e);
4187
4202
  return /* @__PURE__ */ B("div", { className: "aqmx-single aqmx-document-column", "data-testid": "markdown-explorer-single", ...At, children: [
4188
- /* @__PURE__ */ d(Md, { path: t, placement: Ld, markup: r }),
4189
- /* @__PURE__ */ d(Vc, { path: t, absence: Oc, markup: e.markup, variant: n })
4203
+ /* @__PURE__ */ d(Ad, { path: t, placement: Md, markup: r }),
4204
+ /* @__PURE__ */ d(Zc, { path: t, absence: Lc, markup: e.markup, variant: n })
4190
4205
  ] });
4191
- }, Nd = ({ holds: e, testId: t }) => {
4206
+ }, Dd = ({ holds: e, testId: t }) => {
4192
4207
  const { labels: n, announcer: r } = $(), o = Te();
4193
4208
  Y(() => e ? r.claim(o) : void 0, [e, r, o]);
4194
4209
  const s = F(() => r.shownIn(o), [r, o]), a = re(r.subscribe, s, s);
4195
4210
  return /* @__PURE__ */ d("div", { className: "aqmx-sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", "data-testid": t, children: a.length > 1 ? n.announcementSequence(a) : a[0] });
4196
- }, ke = Object.freeze([]), Dd = (e) => {
4211
+ }, ye = Object.freeze([]), Pd = (e) => {
4197
4212
  const t = /* @__PURE__ */ new Set();
4198
- let n = ke, r = [], o = !1;
4213
+ let n = ye, r = [], o = !1;
4199
4214
  const s = [], a = (l) => {
4200
4215
  n = l;
4201
4216
  for (const c of [...t]) c();
4202
4217
  }, i = () => s.at(-1)?.region, f = (l) => {
4203
4218
  const c = i();
4204
- l(), i() !== c && n !== ke && a(ke);
4219
+ l(), i() !== c && n !== ye && a(ye);
4205
4220
  }, u = () => {
4206
4221
  o = !1;
4207
4222
  const l = r.map((c) => "sentence" in c ? c.sentence : c.list(c.items));
@@ -4214,7 +4229,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4214
4229
  const c = r.find((m) => "list" in m && m.list === l.list);
4215
4230
  c !== void 0 && "items" in c ? c.items.push(l.item) : r.push({ list: l.list, items: [l.item] });
4216
4231
  }
4217
- o || (o = !0, n !== ke && a(ke), e.request(u));
4232
+ o || (o = !0, n !== ye && a(ye), e.request(u));
4218
4233
  },
4219
4234
  subscribe: (l) => (t.add(l), () => {
4220
4235
  t.delete(l);
@@ -4226,18 +4241,18 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4226
4241
  m !== -1 && s.splice(m, 1);
4227
4242
  });
4228
4243
  },
4229
- shownIn: (l) => i() === l ? n : ke
4244
+ shownIn: (l) => i() === l ? n : ye
4230
4245
  };
4231
4246
  }, ue = Object.freeze({ status: "cancelled" }), Gn = (e) => {
4232
4247
  if (e === null || typeof e != "object") return null;
4233
4248
  const { failure: t } = e;
4234
- if (Vo(t) !== null) return null;
4249
+ if (Zo(t) !== null) return null;
4235
4250
  const { reason: n, code: r } = t;
4236
- return Zo(n, r);
4237
- }, Pd = ({ dataPath: e, onScope: t, fetch: n }) => {
4251
+ return Wo(n, r);
4252
+ }, Id = ({ dataPath: e, onScope: t, fetch: n }) => {
4238
4253
  const r = n ?? ((l, c) => globalThis.fetch(l, c)), o = (l, c) => `${e}/${l}?${new URLSearchParams(c).toString()}`, s = (l) => {
4239
4254
  l.status === 401 && t(null);
4240
- const c = l.headers.get(jo);
4255
+ const c = l.headers.get(Vo);
4241
4256
  c !== null && t(c);
4242
4257
  }, a = async (l, c, m, g) => {
4243
4258
  let v;
@@ -4247,42 +4262,42 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4247
4262
  return g({ reason: "failed" });
4248
4263
  }
4249
4264
  s(v);
4250
- let y;
4265
+ let E;
4251
4266
  try {
4252
- y = await v.json();
4267
+ E = await v.json();
4253
4268
  } catch {
4254
4269
  return g({ reason: ft(v.status) });
4255
4270
  }
4256
4271
  let T;
4257
4272
  try {
4258
- T = m(y);
4273
+ T = m(E);
4259
4274
  } catch {
4260
4275
  T = !1;
4261
4276
  }
4262
- if (T) return y;
4263
- const O = Gn(y);
4277
+ if (T) return E;
4278
+ const O = Gn(E);
4264
4279
  return g(O !== null ? O : { reason: v.status === 200 ? "failed" : ft(v.status) });
4265
- }, i = { [dn]: Xo }, f = { [dn]: ns, "Content-Type": `${ts}; charset=utf-8` }, u = async (l, c, m) => {
4280
+ }, i = { [dn]: Jo }, f = { [dn]: rs, "Content-Type": `${ns}; charset=utf-8` }, u = async (l, c, m) => {
4266
4281
  const g = await a(l, c, m, (v) => mt(v.reason, v.code));
4267
4282
  return c.signal.aborted ? ue : g;
4268
4283
  };
4269
4284
  return {
4270
4285
  tree: (l) => a(o("tree", { [te.source]: l }), { method: "GET" }, cn, (c) => ({ status: "error", failure: c })),
4271
4286
  children: async (l, c, m) => {
4272
- const g = await a(o("children", { [te.source]: l, [te.path]: c }), { method: "GET", signal: m }, Yo, (v) => ({ status: "error", failure: v }));
4287
+ const g = await a(o("children", { [te.source]: l, [te.path]: c }), { method: "GET", signal: m }, Xo, (v) => ({ status: "error", failure: v }));
4273
4288
  return m.aborted ? ue : g;
4274
4289
  },
4275
4290
  ancestors: async (l, c, m) => {
4276
- const g = await a(o("ancestors", { [te.source]: l, [te.path]: c }), { method: "GET", signal: m }, Ko, (v) => ({ status: "error", failure: v }));
4291
+ const g = await a(o("ancestors", { [te.source]: l, [te.path]: c }), { method: "GET", signal: m }, Yo, (v) => ({ status: "error", failure: v }));
4277
4292
  return m.aborted ? ue : g;
4278
4293
  },
4279
4294
  reveal: async (l, c, m) => {
4280
- const g = await a(o("reveal", { [te.source]: l, [te.path]: c }), { method: "GET", signal: m }, Go, (v) => ({ status: "error", failure: v }));
4295
+ const g = await a(o("reveal", { [te.source]: l, [te.path]: c }), { method: "GET", signal: m }, Ko, (v) => ({ status: "error", failure: v }));
4281
4296
  return m.aborted ? ue : g;
4282
4297
  },
4283
- document: (l, { refresh: c }) => a(o("document", { [te.path]: l }), c ? { method: "GET", headers: i } : { method: "GET" }, ss, (m) => mt(m.reason, m.code)),
4298
+ document: (l, { refresh: c }) => a(o("document", { [te.path]: l }), c ? { method: "GET", headers: i } : { method: "GET" }, as, (m) => mt(m.reason, m.code)),
4284
4299
  text: async (l, c) => {
4285
- const m = await a(o("text", { [te.path]: l }), { method: "GET", signal: c }, Wo, (g) => mt(g.reason, g.code));
4300
+ const m = await a(o("text", { [te.path]: l }), { method: "GET", signal: c }, Go, (g) => mt(g.reason, g.code));
4286
4301
  return c.aborted ? ue : m;
4287
4302
  },
4288
4303
  asset: async (l, c) => {
@@ -4293,7 +4308,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4293
4308
  return c.aborted ? ue : { status: "error", failure: { reason: "failed" } };
4294
4309
  }
4295
4310
  if (s(m), m.ok)
4296
- return c.aborted ? ue : { status: "ok", body: m.body === null ? new ReadableStream({ start: (y) => y.close() }) : m.body };
4311
+ return c.aborted ? ue : { status: "ok", body: m.body === null ? new ReadableStream({ start: (E) => E.close() }) : m.body };
4297
4312
  let g = null;
4298
4313
  try {
4299
4314
  g = await m.json();
@@ -4303,14 +4318,14 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4303
4318
  const v = Gn(g);
4304
4319
  return { status: "error", failure: v === null ? { reason: ft(m.status) } : v };
4305
4320
  },
4306
- edit: (l, c) => u(o("edit", { [te.path]: l }), { method: "GET", signal: c }, os),
4307
- save: (l, c, m, g) => u(o("save", { [te.path]: l, [te.base]: c }), { method: "POST", headers: f, body: m, signal: g }, rs),
4308
- preview: (l, c, m) => u(o("preview", { [te.path]: l }), { method: "POST", headers: f, body: c, signal: m }, es),
4309
- revisions: (l, c) => u(o("revisions", { [te.path]: l }), { method: "GET", signal: c }, Qo),
4310
- revision: (l, c, m) => u(o("revision", { [te.path]: l, [te.revision]: c }), { method: "GET", signal: m }, Jo),
4321
+ edit: (l, c) => u(o("edit", { [te.path]: l }), { method: "GET", signal: c }, ss),
4322
+ save: (l, c, m, g) => u(o("save", { [te.path]: l, [te.base]: c }), { method: "POST", headers: f, body: m, signal: g }, os),
4323
+ preview: (l, c, m) => u(o("preview", { [te.path]: l }), { method: "POST", headers: f, body: c, signal: m }, ts),
4324
+ revisions: (l, c) => u(o("revisions", { [te.path]: l }), { method: "GET", signal: c }, es),
4325
+ revision: (l, c, m) => u(o("revision", { [te.path]: l, [te.revision]: c }), { method: "GET", signal: m }, Qo),
4311
4326
  refresh: (l) => a(o("refresh", { [te.source]: l }), { method: "POST", headers: i }, cn, (c) => ({ status: "error", failure: c }))
4312
4327
  };
4313
- }, Id = () => {
4328
+ }, $d = () => {
4314
4329
  let e = null, t = null;
4315
4330
  return {
4316
4331
  settle: (n) => {
@@ -4325,11 +4340,11 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4325
4340
  return t = null, o;
4326
4341
  }
4327
4342
  };
4328
- }, $d = (e) => {
4343
+ }, _d = (e) => {
4329
4344
  const t = Mt(e);
4330
4345
  if (t === null) return an;
4331
4346
  try {
4332
- return qo(JSON.parse(t));
4347
+ return Bo(JSON.parse(t));
4333
4348
  } catch (n) {
4334
4349
  return console.warn(`[markdown-explorer] localStorage key ${JSON.stringify(e)} does not hold JSON; using the default tree settings.`, n), an;
4335
4350
  }
@@ -4337,7 +4352,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4337
4352
  let n = null;
4338
4353
  const r = () => {
4339
4354
  if (n === null) {
4340
- const s = $d(e);
4355
+ const s = _d(e);
4341
4356
  n = { changes: s, settings: sn(t, s) };
4342
4357
  }
4343
4358
  return n;
@@ -4349,44 +4364,44 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4349
4364
  getServerSnapshot: () => t,
4350
4365
  subscribe: o.subscribe,
4351
4366
  advance: (s) => {
4352
- const { changes: a, settings: i } = r(), f = $o(a, s, _o(i, s)[s], t);
4353
- return n = { changes: f, settings: sn(t, f) }, o.emit(), Lt(e, Fo(f)), n.settings;
4367
+ const { changes: a, settings: i } = r(), f = _o(a, s, Fo(i, s)[s], t);
4368
+ return n = { changes: f, settings: sn(t, f) }, o.emit(), Lt(e, qo(f)), n.settings;
4354
4369
  }
4355
4370
  };
4356
- }, _d = Object.freeze({ status: "refreshed" }), Fd = Object.freeze({ status: "superseded" }), _t = Object.freeze({ status: "deferred" }), qd = yr(_t), uo = 4, Bd = uo - 1, Yn = Object.freeze({ status: "loading" }), Ud = Object.freeze({ status: "error", failure: Object.freeze({ reason: "failed" }) }), Hd = (e) => {
4357
- const t = /* @__PURE__ */ new Map(), n = Mr(), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), i = qe(), f = /* @__PURE__ */ new Set();
4371
+ }, Fd = Object.freeze({ status: "refreshed" }), qd = Object.freeze({ status: "superseded" }), _t = Object.freeze({ status: "deferred" }), Bd = Er(_t), fo = 4, Ud = fo - 1, Yn = Object.freeze({ status: "loading" }), Hd = Object.freeze({ status: "error", failure: Object.freeze({ reason: "failed" }) }), zd = (e) => {
4372
+ const t = /* @__PURE__ */ new Map(), n = Ar(), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), i = qe(), f = /* @__PURE__ */ new Set();
4358
4373
  let u = 0, l = 0;
4359
4374
  const c = { direct: null, bulk: null }, m = /* @__PURE__ */ new Set();
4360
4375
  let g = !1, v = 0;
4361
- const y = () => {
4376
+ const E = () => {
4362
4377
  v += 1, i.emit();
4363
4378
  }, T = (w) => o.get(w) ?? 0, O = (w) => {
4364
- let k = a.get(w);
4365
- return k === void 0 && (k = { claims: /* @__PURE__ */ new Map(), unclaimed: /* @__PURE__ */ new Set(), direct: /* @__PURE__ */ new Set(), bulk: /* @__PURE__ */ new Set(), inFlight: /* @__PURE__ */ new Map() }, a.set(w, k)), k;
4366
- }, R = (w, k, C) => {
4367
- w.inFlight.delete(k), u -= 1, C.lane === "bulk" && (l -= 1);
4379
+ let y = a.get(w);
4380
+ return y === void 0 && (y = { claims: /* @__PURE__ */ new Map(), unclaimed: /* @__PURE__ */ new Set(), direct: /* @__PURE__ */ new Set(), bulk: /* @__PURE__ */ new Set(), inFlight: /* @__PURE__ */ new Map() }, a.set(w, y)), y;
4381
+ }, R = (w, y, C) => {
4382
+ w.inFlight.delete(y), u -= 1, C.lane === "bulk" && (l -= 1);
4368
4383
  }, q = (w) => {
4369
- const k = a.get(w);
4370
- if (k !== void 0) {
4371
- for (const [C, N] of [...k.inFlight])
4372
- R(k, C, N), N.controller.abort();
4373
- k.direct.clear(), k.bulk.clear(), k.unclaimed.clear();
4384
+ const y = a.get(w);
4385
+ if (y !== void 0) {
4386
+ for (const [C, N] of [...y.inFlight])
4387
+ R(y, C, N), N.controller.abort();
4388
+ y.direct.clear(), y.bulk.clear(), y.unclaimed.clear();
4374
4389
  }
4375
4390
  }, D = (w) => {
4376
- const k = T(w) + 1;
4377
- return o.set(w, k), q(w), k;
4378
- }, h = (w, k) => {
4379
- const C = Ae(w), N = { promise: w, opened: k, stale: !1, loadedAt: C?.status === "ok" ? C.loadedAt : null };
4391
+ const y = T(w) + 1;
4392
+ return o.set(w, y), q(w), y;
4393
+ }, h = (w, y) => {
4394
+ const C = Ae(w), N = { promise: w, opened: y, stale: !1, loadedAt: C?.status === "ok" ? C.loadedAt : null };
4380
4395
  return w.status === "pending" && w.then((z) => {
4381
4396
  z.status === "ok" && (N.loadedAt = z.loadedAt);
4382
4397
  }), N;
4383
4398
  }, p = (w) => {
4384
- let k = r.get(w);
4385
- return k === void 0 && (k = /* @__PURE__ */ new Map(), r.set(w, k)), k;
4399
+ let y = r.get(w);
4400
+ return y === void 0 && (y = /* @__PURE__ */ new Map(), r.set(w, y)), y;
4386
4401
  }, x = (w) => {
4387
- const k = [...a.keys()], C = c[w], N = C === null ? 0 : k.indexOf(C) + 1;
4388
- for (let z = 0; z < k.length; z += 1) {
4389
- const W = k[(N + z) % k.length], J = W === void 0 ? void 0 : a.get(W);
4402
+ const y = [...a.keys()], C = c[w], N = C === null ? 0 : y.indexOf(C) + 1;
4403
+ for (let z = 0; z < y.length; z += 1) {
4404
+ const W = y[(N + z) % y.length], J = W === void 0 ? void 0 : a.get(W);
4390
4405
  if (!(W === void 0 || J === void 0)) {
4391
4406
  for (const G of J[w])
4392
4407
  if ((J.claims.get(G) ?? 0) !== 0)
@@ -4394,85 +4409,85 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4394
4409
  }
4395
4410
  }
4396
4411
  return null;
4397
- }, A = (w, k, C, N) => {
4412
+ }, A = (w, y, C, N) => {
4398
4413
  const z = a.get(w);
4399
- if (z === void 0 || z.inFlight.get(k) !== C) return;
4400
- R(z, k, C);
4401
- const W = (z.claims.get(k) ?? 0) > 0, J = p(w);
4402
- if (N.status === "ok" ? J.set(k, { status: "loaded", entries: N.entries }) : N.status === "error" && W ? J.set(k, { status: "failed", failure: N.failure }) : J.delete(k), y(), N.status === "error" && W) {
4403
- const G = { sourceId: w, path: k, failure: N.failure };
4414
+ if (z === void 0 || z.inFlight.get(y) !== C) return;
4415
+ R(z, y, C);
4416
+ const W = (z.claims.get(y) ?? 0) > 0, J = p(w);
4417
+ if (N.status === "ok" ? J.set(y, { status: "loaded", entries: N.entries }) : N.status === "error" && W ? J.set(y, { status: "failed", failure: N.failure }) : J.delete(y), E(), N.status === "error" && W) {
4418
+ const G = { sourceId: w, path: y, failure: N.failure };
4404
4419
  for (const ie of [...f]) ie(G);
4405
4420
  }
4406
4421
  _();
4407
- }, I = (w, k, C) => {
4422
+ }, I = (w, y, C) => {
4408
4423
  const N = { controller: new AbortController(), lane: C };
4409
- O(w).inFlight.set(k, N), u += 1, C === "bulk" && (l += 1), e.children(w, k, N.controller.signal).then(
4410
- (z) => A(w, k, N, z),
4411
- () => A(w, k, N, Ud)
4424
+ O(w).inFlight.set(y, N), u += 1, C === "bulk" && (l += 1), e.children(w, y, N.controller.signal).then(
4425
+ (z) => A(w, y, N, z),
4426
+ () => A(w, y, N, Hd)
4412
4427
  );
4413
4428
  }, _ = () => {
4414
- for (; u < uo; ) {
4429
+ for (; u < fo; ) {
4415
4430
  const w = x("direct");
4416
4431
  if (w !== null) {
4417
4432
  I(w.sourceId, w.path, "direct");
4418
4433
  continue;
4419
4434
  }
4420
- const k = l < Bd ? x("bulk") : null;
4421
- if (k === null) return;
4422
- I(k.sourceId, k.path, "bulk");
4435
+ const y = l < Ud ? x("bulk") : null;
4436
+ if (y === null) return;
4437
+ I(y.sourceId, y.path, "bulk");
4423
4438
  }
4424
- }, b = (w, k, C) => {
4425
- if (!(k.direct.delete(C) || k.bulk.delete(C))) {
4426
- const z = k.inFlight.get(C);
4439
+ }, b = (w, y, C) => {
4440
+ if (!(y.direct.delete(C) || y.bulk.delete(C))) {
4441
+ const z = y.inFlight.get(C);
4427
4442
  if (z === void 0) return !1;
4428
- R(k, C, z), z.controller.abort();
4443
+ R(y, C, z), z.controller.abort();
4429
4444
  }
4430
4445
  return r.get(w)?.delete(C), !0;
4431
4446
  }, S = () => {
4432
4447
  g = !1;
4433
4448
  let w = !1;
4434
- for (const k of m) {
4435
- const C = O(k);
4449
+ for (const y of m) {
4450
+ const C = O(y);
4436
4451
  for (const N of C.unclaimed)
4437
- (C.claims.get(N) ?? 0) === 0 && b(k, C, N) && (w = !0);
4452
+ (C.claims.get(N) ?? 0) === 0 && b(y, C, N) && (w = !0);
4438
4453
  C.unclaimed.clear();
4439
4454
  }
4440
- m.clear(), w && (y(), _());
4441
- }, L = (w, k) => {
4442
- t.set(w, h($e(e.tree(w)), k));
4443
- }, M = (w, k, C) => {
4455
+ m.clear(), w && (E(), _());
4456
+ }, L = (w, y) => {
4457
+ t.set(w, h($e(e.tree(w)), y));
4458
+ }, M = (w, y, C) => {
4444
4459
  D(w);
4445
- const N = h(yr(k), C);
4446
- return t.set(w, N), r.delete(w), y(), _(), N;
4447
- }, P = (w, k, C, N) => {
4448
- if (C !== T(w) || t.get(w) !== k) return;
4449
- const z = Ae(k.promise);
4450
- if (!(N.status !== "ok" || z?.status !== "ok" || k.loadedAt === null || N.loadedAt <= k.loadedAt)) {
4460
+ const N = h(Er(y), C);
4461
+ return t.set(w, N), r.delete(w), E(), _(), N;
4462
+ }, P = (w, y, C, N) => {
4463
+ if (C !== T(w) || t.get(w) !== y) return;
4464
+ const z = Ae(y.promise);
4465
+ if (!(N.status !== "ok" || z?.status !== "ok" || y.loadedAt === null || N.loadedAt <= y.loadedAt)) {
4451
4466
  if (tt(z.entries, N.entries)) {
4452
- k.loadedAt = N.loadedAt;
4467
+ y.loadedAt = N.loadedAt;
4453
4468
  return;
4454
4469
  }
4455
- M(w, N, k.opened);
4470
+ M(w, N, y.opened);
4456
4471
  }
4457
- }, H = (w, k) => {
4472
+ }, H = (w, y) => {
4458
4473
  const C = t.get(w);
4459
- return C !== void 0 && Ae(C.promise)?.status === k;
4460
- }, K = (w, k) => {
4461
- k.stale = !1;
4474
+ return C !== void 0 && Ae(C.promise)?.status === y;
4475
+ }, K = (w, y) => {
4476
+ y.stale = !1;
4462
4477
  const C = T(w);
4463
- e.tree(w).then((N) => P(w, k, C, N));
4478
+ e.tree(w).then((N) => P(w, y, C, N));
4464
4479
  };
4465
4480
  return {
4466
- read: (w) => t.get(w)?.promise ?? qd,
4481
+ read: (w) => t.get(w)?.promise ?? Bd,
4467
4482
  open: (w) => {
4468
- const k = n.resumes(w), C = n.hold(w), N = t.get(w);
4469
- return N === void 0 || H(w, "deferred") ? (L(w, !0), y()) : k || (N.opened && H(w, "error") ? (L(w, !0), y()) : (N.opened = !0, N.stale && H(w, "ok") && K(w, N))), C;
4483
+ const y = n.resumes(w), C = n.hold(w), N = t.get(w);
4484
+ return N === void 0 || H(w, "deferred") ? (L(w, !0), E()) : y || (N.opened && H(w, "error") ? (L(w, !0), E()) : (N.opened = !0, N.stale && H(w, "ok") && K(w, N))), C;
4470
4485
  },
4471
4486
  retry: (w) => {
4472
- H(w, "error") && (L(w, !0), y());
4487
+ H(w, "error") && (L(w, !0), E());
4473
4488
  },
4474
- seed: (w, k) => {
4475
- const C = k.then(
4489
+ seed: (w, y) => {
4490
+ const C = y.then(
4476
4491
  (W) => W === null ? _t : W,
4477
4492
  () => _t
4478
4493
  ), N = t.get(w);
@@ -4484,14 +4499,14 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4484
4499
  D(w);
4485
4500
  const z = h($e(C), N?.opened === !0);
4486
4501
  t.set(w, z), r.delete(w), _(), C.then((W) => {
4487
- t.get(w) === z && (W.status === "deferred" && n.isHeld(w) && L(w, z.opened), y());
4502
+ t.get(w) === z && (W.status === "deferred" && n.isHeld(w) && L(w, z.opened), E());
4488
4503
  });
4489
4504
  },
4490
4505
  refresh: async (w) => {
4491
- const k = (s.get(w) ?? 0) + 1;
4492
- s.set(w, k);
4506
+ const y = (s.get(w) ?? 0) + 1;
4507
+ s.set(w, y);
4493
4508
  const C = await e.refresh(w);
4494
- if (s.get(w) !== k) return Fd;
4509
+ if (s.get(w) !== y) return qd;
4495
4510
  if (C.status === "error") return { status: "failed", failure: C.failure };
4496
4511
  const N = t.get(w);
4497
4512
  if (!(N !== void 0 && N.loadedAt !== null && H(w, "ok") && N.loadedAt > C.loadedAt)) {
@@ -4503,20 +4518,20 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4503
4518
  }
4504
4519
  for (const [W, J] of t)
4505
4520
  W !== w && Ae(J.promise)?.status === "ok" && (J.stale = !0);
4506
- return _d;
4521
+ return Fd;
4507
4522
  },
4508
- children: (w, k) => r.get(w)?.get(k),
4509
- claimChildren: (w, k) => {
4523
+ children: (w, y) => r.get(w)?.get(y),
4524
+ claimChildren: (w, y) => {
4510
4525
  const C = O(w), N = p(w);
4511
4526
  let z = !1, W = !1;
4512
- for (const [G, ie] of k)
4527
+ for (const [G, ie] of y)
4513
4528
  C.claims.set(G, (C.claims.get(G) ?? 0) + 1), N.get(G) === void 0 ? (N.set(G, Yn), C[ie].add(G), z = !0, W = !0) : ie === "direct" && C.bulk.delete(G) && (C.direct.add(G), W = !0);
4514
- z && y(), W && _();
4529
+ z && E(), W && _();
4515
4530
  let J = !1;
4516
4531
  return () => {
4517
4532
  if (!J) {
4518
4533
  J = !0;
4519
- for (const G of k.keys()) {
4534
+ for (const G of y.keys()) {
4520
4535
  const ie = (C.claims.get(G) ?? 0) - 1;
4521
4536
  ie > 0 ? C.claims.set(G, ie) : (C.claims.delete(G), C.unclaimed.add(G));
4522
4537
  }
@@ -4524,24 +4539,24 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4524
4539
  }
4525
4540
  };
4526
4541
  },
4527
- retryChildren: (w, k) => {
4542
+ retryChildren: (w, y) => {
4528
4543
  const C = r.get(w);
4529
- if (C === void 0 || C.get(k)?.status !== "failed") return;
4544
+ if (C === void 0 || C.get(y)?.status !== "failed") return;
4530
4545
  const N = O(w);
4531
- if ((N.claims.get(k) ?? 0) > 0) {
4532
- C.set(k, Yn), N.direct.add(k), y(), _();
4546
+ if ((N.claims.get(y) ?? 0) > 0) {
4547
+ C.set(y, Yn), N.direct.add(y), E(), _();
4533
4548
  return;
4534
4549
  }
4535
- C.delete(k), y();
4550
+ C.delete(y), E();
4536
4551
  },
4537
4552
  pendingChildren: (w) => {
4538
- const k = a.get(w);
4539
- return k === void 0 ? 0 : k.direct.size + k.bulk.size + k.inFlight.size;
4553
+ const y = a.get(w);
4554
+ return y === void 0 ? 0 : y.direct.size + y.bulk.size + y.inFlight.size;
4540
4555
  },
4541
4556
  clear: () => {
4542
4557
  for (const w of /* @__PURE__ */ new Set([...t.keys(), ...r.keys(), ...o.keys(), ...a.keys()])) D(w);
4543
- for (const [w, k] of s) s.set(w, k + 1);
4544
- t.clear(), r.clear(), y();
4558
+ for (const [w, y] of s) s.set(w, y + 1);
4559
+ t.clear(), r.clear(), E();
4545
4560
  },
4546
4561
  subscribeChildrenFailures: (w) => (f.add(w), () => {
4547
4562
  f.delete(w);
@@ -4549,7 +4564,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4549
4564
  subscribe: i.subscribe,
4550
4565
  version: () => v
4551
4566
  };
4552
- }, zd = (e, t) => {
4567
+ }, jd = (e, t) => {
4553
4568
  let n = e;
4554
4569
  const r = qe();
4555
4570
  return {
@@ -4559,26 +4574,26 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4559
4574
  n = { ...n, ...o }, t(n), r.emit();
4560
4575
  }
4561
4576
  };
4562
- }, jd = 1;
4577
+ }, Vd = 1;
4563
4578
  let We = 0, he = null;
4564
- const Vd = () => {
4579
+ const Zd = () => {
4565
4580
  const { documentElement: e, body: t } = document;
4566
4581
  We === 0 && (he = { 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"), We += 1;
4567
4582
  let n = !1;
4568
4583
  return () => {
4569
4584
  n || (n = !0, We -= 1, !(We > 0 || he === null) && (e.style.overflow = he.htmlOverflow, t.style.overflow = he.bodyOverflow, e.style.scrollbarGutter = he.htmlGutter, t.style.scrollbarGutter = he.bodyGutter, he = null));
4570
4585
  };
4571
- }, Zd = [
4586
+ }, Wd = [
4572
4587
  { selector: '[data-aqmx-document-flow="fill"]', name: "document region" },
4573
4588
  { selector: "[data-aqmx-explorer-body]", name: "tree area" }
4574
- ], Xn = 1, Wd = 1e3, Jn = (e) => e.getClientRects().length > 0, Rt = "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.", Gd = (e) => {
4589
+ ], Xn = 1, Gd = 1e3, Jn = (e) => e.getClientRects().length > 0, Rt = "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.", Kd = (e) => {
4575
4590
  if (!Jn(e)) return null;
4576
4591
  const t = e.getBoundingClientRect(), n = window.innerHeight;
4577
- if (t.bottom > n + jd)
4592
+ if (t.bottom > n + Vd)
4578
4593
  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. ${Rt}`;
4579
4594
  if (t.height < Xn)
4580
4595
  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. ${Rt}`;
4581
- for (const { selector: r, name: o } of Zd)
4596
+ for (const { selector: r, name: o } of Wd)
4582
4597
  for (const s of e.querySelectorAll(r)) {
4583
4598
  if (!Jn(s)) continue;
4584
4599
  const a = s.getBoundingClientRect().height;
@@ -4586,39 +4601,39 @@ const Vd = () => {
4586
4601
  return `[markdown-explorer] the explorer's ${o} collapsed to ${String(Math.round(a))}px while lockDocumentScroll stops the page from scrolling, so it cannot be read. ${Rt}`;
4587
4602
  }
4588
4603
  return null;
4589
- }, Kd = (e) => {
4604
+ }, Yd = (e) => {
4590
4605
  let t = !1, n;
4591
4606
  const r = () => {
4592
4607
  n = void 0;
4593
- const a = Gd(e);
4608
+ const a = Kd(e);
4594
4609
  a !== null && (t = !0, console.error(a));
4595
4610
  }, o = () => {
4596
- t || (clearTimeout(n), n = setTimeout(r, Wd));
4611
+ t || (clearTimeout(n), n = setTimeout(r, Gd));
4597
4612
  }, s = typeof ResizeObserver > "u" ? null : new ResizeObserver(o);
4598
4613
  return s?.observe(e), window.addEventListener("resize", o), o(), () => {
4599
4614
  clearTimeout(n), s?.disconnect(), window.removeEventListener("resize", o);
4600
4615
  };
4601
- }, Yd = (e, t) => {
4602
- ee(() => e ? Vd() : void 0, [e]), ee(() => {
4616
+ }, Xd = (e, t) => {
4617
+ ee(() => e ? Zd() : void 0, [e]), ee(() => {
4603
4618
  const n = t.current;
4604
4619
  if (!(!e || n === null))
4605
- return Kd(n);
4620
+ return Yd(n);
4606
4621
  }, [e, t]);
4607
- }, Qn = '[data-testid="markdown-explorer-view-switch"]', Xd = [
4622
+ }, Qn = '[data-testid="markdown-explorer-view-switch"]', Jd = [
4608
4623
  { control: Qn, successors: [Qn, '[data-testid="markdown-explorer-sheet-toggle"]'] },
4609
4624
  { control: '[data-testid="markdown-explorer-selection-open"]', successors: ['[data-testid="markdown-explorer-panel-frame"]'] }
4610
- ], Jd = (e) => {
4611
- for (const t of Xd) {
4625
+ ], Qd = (e) => {
4626
+ for (const t of Jd) {
4612
4627
  const n = e.closest(t.control);
4613
4628
  if (n !== null) return { element: n, control: t };
4614
4629
  }
4615
4630
  return null;
4616
- }, Qd = (e, t) => {
4631
+ }, eu = (e, t) => {
4617
4632
  const n = U(null);
4618
4633
  ee(() => {
4619
4634
  const o = (i) => {
4620
4635
  const f = e.current;
4621
- n.current = f !== null && i instanceof Element && f.contains(i) ? Jd(i) : null;
4636
+ n.current = f !== null && i instanceof Element && f.contains(i) ? Qd(i) : null;
4622
4637
  }, s = (i) => o(i.target);
4623
4638
  o(document.activeElement);
4624
4639
  const a = (i) => {
@@ -4656,7 +4671,7 @@ const Vd = () => {
4656
4671
  });
4657
4672
  return i.observe(a, { childList: !0, subtree: !0 }), () => i.disconnect();
4658
4673
  }, [t, e]);
4659
- }, eu = Ft(() => import("./TreeLayout-Bak1y1m4.js").then((e) => ({ default: e.TreeLayout }))), tu = Ft(() => import("./MultiLayout-B0dfZlpx.js").then((e) => ({ default: e.MultiLayout }))), nu = 64, ru = {
4674
+ }, tu = Ft(() => import("./TreeLayout-BpazybVQ.js").then((e) => ({ default: e.TreeLayout }))), nu = Ft(() => import("./MultiLayout-DKgZ1sBK.js").then((e) => ({ default: e.MultiLayout }))), ru = 64, ou = {
4660
4675
  request: (e) => {
4661
4676
  requestAnimationFrame(e);
4662
4677
  }
@@ -4665,12 +4680,12 @@ const Vd = () => {
4665
4680
  }, Ct = (e, t) => {
4666
4681
  t.tree !== null && e.trees.seed(t.tree.sourceId, t.tree.result);
4667
4682
  for (const { path: n, document: r } of t.documents) e.documents.seed(n, r);
4668
- }, ou = (e, t) => {
4683
+ }, su = (e, t) => {
4669
4684
  const [n, r] = V(() => ({ overrides: t, locale: e, labels: pn(e, t) }));
4670
- if (n.locale === e && Ss(n.overrides, t)) return n.labels;
4685
+ if (n.locale === e && xs(n.overrides, t)) return n.labels;
4671
4686
  const o = { overrides: t, locale: e, labels: pn(e, t) };
4672
4687
  return r(o), o.labels;
4673
- }, su = (e, t, n) => {
4688
+ }, au = (e, t, n) => {
4674
4689
  const [r, o] = V(() => ({ scope: t, store: Kn(e, n) }));
4675
4690
  if (r.scope === t && r.store.storageKey === e && r.store.defaults === n) return r.store;
4676
4691
  const s = { scope: t, store: Kn(e, n) };
@@ -4680,13 +4695,13 @@ const Vd = () => {
4680
4695
  if (n.scope === e) return n.value;
4681
4696
  const o = { scope: e, value: t() };
4682
4697
  return r(o), o.value;
4683
- }, au = () => Dd(ru), tr = "on", iu = "off", lu = Object.freeze({ kind: "unavailable" }), cu = (e) => {
4698
+ }, iu = () => Pd(ou), tr = "on", lu = "off", cu = Object.freeze({ kind: "unavailable" }), du = (e) => {
4684
4699
  if (e !== void 0 && (e === null || typeof e != "object" || typeof e.convert != "function"))
4685
4700
  throw new TypeError("[markdown-explorer] draftConverter must be an object with a convert function");
4686
- }, du = (e, t) => {
4701
+ }, uu = (e, t) => {
4687
4702
  const n = ge(e.peek(t));
4688
4703
  return n === null || n.document.kind === "failure" ? fe(t) : n.document.name;
4689
- }, Au = ({
4704
+ }, Du = ({
4690
4705
  data: e,
4691
4706
  config: t,
4692
4707
  storageNamespace: n,
@@ -4700,62 +4715,62 @@ const Vd = () => {
4700
4715
  onEditGrant: l,
4701
4716
  draftConverter: c
4702
4717
  }) => {
4703
- ms(n), cu(c);
4704
- const m = mr(r), g = xs(s), v = ou(m, o), { revalidate: y } = Co(), T = U(() => {
4718
+ hs(n), du(c);
4719
+ const m = mr(r), g = Ts(s), v = su(m, o), { revalidate: E } = Oo(), T = U(() => {
4705
4720
  }), O = ot(t.dataPath), [R] = V(() => {
4706
- const C = Pd({ dataPath: O, onScope: (z) => T.current(z) }), N = { documents: Aa({ client: C, capacity: Math.max(nu, t.multiView.maxPanels * 2) }), trees: Hd(C) };
4721
+ const C = Id({ dataPath: O, onScope: (z) => T.current(z) }), N = { documents: Na({ client: C, capacity: Math.max(ru, t.multiView.maxPanels * 2) }), trees: zd(C) };
4707
4722
  return Ct(N, e), mn(n, e.scope), { data: C, ...N, aligned: { pageData: e, storageNamespace: n, pendingReader: null } };
4708
4723
  });
4709
4724
  if (R.aligned.pageData !== e || R.aligned.storageNamespace !== n) {
4710
4725
  const C = R.aligned.pageData;
4711
4726
  R.aligned.pageData = e, R.aligned.storageNamespace = n, C !== e && (C.scope !== e.scope ? R.aligned.pendingReader = e : Ct(R, e)), mn(n, e.scope);
4712
4727
  }
4713
- const q = su(Oe(n).treeSettings, e.scope, t.defaultTreeSettings);
4728
+ const q = au(Oe(n).treeSettings, e.scope, t.defaultTreeSettings);
4714
4729
  Y(() => {
4715
4730
  const C = R.aligned.pendingReader;
4716
4731
  C !== null && (R.aligned.pendingReader = null, er(R), Ct(R, C));
4717
4732
  }, [e, R]), Y(() => {
4718
4733
  let C = !1;
4719
4734
  return T.current = (N) => {
4720
- N === e.scope || C || (C = !0, N !== null && (er(R), hs(n)), y());
4735
+ N === e.scope || C || (C = !0, N !== null && (er(R), ps(n)), E());
4721
4736
  }, () => {
4722
4737
  T.current = () => {
4723
4738
  };
4724
4739
  };
4725
- }, [e, y, R, n]);
4740
+ }, [e, E, R, n]);
4726
4741
  const D = U(t.settingsCookie);
4727
4742
  Y(() => {
4728
4743
  D.current = t.settingsCookie;
4729
4744
  }, [t.settingsCookie]);
4730
4745
  const [h] = V(
4731
- () => zd(e.settings, (C) => {
4732
- document.cookie = Uo(D.current, C, window.location.protocol === "https:");
4746
+ () => jd(e.settings, (C) => {
4747
+ document.cookie = Ho(D.current, C, window.location.protocol === "https:");
4733
4748
  })
4734
- ), p = Ot(e.scope, au), x = Ot(e.scope, Id), A = U(v);
4749
+ ), p = Ot(e.scope, iu), x = Ot(e.scope, $d), A = U(v);
4735
4750
  Y(() => {
4736
4751
  A.current = v;
4737
4752
  }, [v]);
4738
4753
  const I = Ot(
4739
4754
  e.scope,
4740
- () => Is({
4755
+ () => $s({
4741
4756
  data: R.data,
4742
4757
  conflictLabels: () => ({ ours: A.current.conflictOurs, theirs: A.current.conflictTheirs }),
4743
4758
  onSaveSettled: (C, N) => {
4744
4759
  N.kind === "saved" && R.documents.refresh(C);
4745
- const z = Rs(A.current, N, du(R.documents, C));
4760
+ const z = Cs(A.current, N, uu(R.documents, C));
4746
4761
  z !== null && p.announce(z);
4747
4762
  },
4748
4763
  sideBySideSetting: {
4749
4764
  read: () => Mt(Oe(n).editPreview) === tr,
4750
- write: (C) => Lt(Oe(n).editPreview, C ? tr : iu)
4765
+ write: (C) => Lt(Oe(n).editPreview, C ? tr : lu)
4751
4766
  },
4752
4767
  editorShareSetting: {
4753
- read: () => Ps(Mt(Oe(n).editSplit)),
4768
+ read: () => Is(Mt(Oe(n).editSplit)),
4754
4769
  write: (C) => Lt(Oe(n).editSplit, String(C))
4755
4770
  }
4756
4771
  })
4757
4772
  ), _ = X(() => $e(e.notices.catch(() => [])), [e.notices]), b = e.sources.map((C) => C.id).join(`
4758
- `), S = X(() => Bo(t, b.split(`
4773
+ `), S = X(() => Uo(t, b.split(`
4759
4774
  `)), [t, b]), L = U(u);
4760
4775
  Y(() => {
4761
4776
  L.current = u;
@@ -4771,7 +4786,7 @@ const Vd = () => {
4771
4786
  return {
4772
4787
  convert: (N, z) => {
4773
4788
  const W = H.current;
4774
- return W === void 0 ? Promise.resolve(lu) : W.convert(N, z);
4789
+ return W === void 0 ? Promise.resolve(cu) : W.convert(N, z);
4775
4790
  },
4776
4791
  prepare: () => {
4777
4792
  try {
@@ -4782,7 +4797,7 @@ const Vd = () => {
4782
4797
  }
4783
4798
  }
4784
4799
  };
4785
- }), w = c === void 0 ? void 0 : K, k = X(
4800
+ }), w = c === void 0 ? void 0 : K, y = X(
4786
4801
  () => ({
4787
4802
  config: S,
4788
4803
  labels: v,
@@ -4807,90 +4822,91 @@ const Vd = () => {
4807
4822
  }),
4808
4823
  [S, v, m, g, n, e.scope, e.sources, _, R, h, q, p, x, I, l, w, i, P]
4809
4824
  );
4810
- return /* @__PURE__ */ d(hr, { value: k, children: /* @__PURE__ */ d(fu, { renderFrame: a, lockDocumentScroll: f }, e.scope) });
4811
- }, uu = ({ ref: e, theme: t, view: n, children: r }) => {
4812
- const [o] = V(Ti);
4825
+ return /* @__PURE__ */ d(hr, { value: y, children: /* @__PURE__ */ d(mu, { renderFrame: a, lockDocumentScroll: f }, e.scope) });
4826
+ }, fu = ({ ref: e, theme: t, view: n, children: r }) => {
4827
+ const [o] = V(Ri);
4813
4828
  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 });
4814
- }, fu = ({ renderFrame: e, lockDocumentScroll: t }) => {
4829
+ }, mu = ({ renderFrame: e, lockDocumentScroll: t }) => {
4815
4830
  const { theme: n, labels: r } = $(), o = Bt(), { hash: s } = rr(), a = at(), i = U(null);
4816
- Yd(t, i), Y(() => {
4831
+ Xd(t, i), Y(() => {
4817
4832
  o.kind === "redirect" && a(`${o.href}${s}`, "browse");
4818
4833
  }, [o, s, a]);
4819
4834
  const { location: f } = o, u = f.view;
4820
- Qd(i, u);
4821
- const l = f.view === "tree" ? /* @__PURE__ */ d(Ie, { fallback: /* @__PURE__ */ d("section", { className: "aqmx-split-fallback", "aria-label": r.explorerRegion, "aria-busy": "true", "data-testid": "markdown-explorer-split-loading", ...At }), children: /* @__PURE__ */ d(eu, { location: f }) }) : f.view === "multi" ? /* @__PURE__ */ d(Ie, { fallback: /* @__PURE__ */ d("section", { className: "aqmx-stage-fallback", "aria-label": r.multiRegion, "aria-busy": "true", "data-testid": "markdown-explorer-stage-loading", ...At }), children: /* @__PURE__ */ d(tu, { location: f }) }) : /* @__PURE__ */ d(Ad, { location: f }), c = /* @__PURE__ */ B(uu, { ref: i, theme: n, view: u, children: [
4835
+ eu(i, u);
4836
+ const l = f.view === "tree" ? /* @__PURE__ */ d(Ie, { fallback: /* @__PURE__ */ d("section", { className: "aqmx-split-fallback", "aria-label": r.explorerRegion, "aria-busy": "true", "data-testid": "markdown-explorer-split-loading", ...At }), children: /* @__PURE__ */ d(tu, { location: f }) }) : f.view === "multi" ? /* @__PURE__ */ d(Ie, { fallback: /* @__PURE__ */ d("section", { className: "aqmx-stage-fallback", "aria-label": r.multiRegion, "aria-busy": "true", "data-testid": "markdown-explorer-stage-loading", ...At }), children: /* @__PURE__ */ d(nu, { location: f }) }) : /* @__PURE__ */ d(Nd, { location: f }), c = /* @__PURE__ */ B(fu, { ref: i, theme: n, view: u, children: [
4822
4837
  l,
4823
- /* @__PURE__ */ d(Qs, {}),
4824
- /* @__PURE__ */ d(Nd, { holds: !0, testId: "markdown-explorer-announcer" })
4838
+ /* @__PURE__ */ d(ea, {}),
4839
+ /* @__PURE__ */ d(Dd, { holds: !0, testId: "markdown-explorer-announcer" })
4825
4840
  ] });
4826
4841
  return e === void 0 ? c : e({ view: u, children: c });
4827
- }, Nu = ps({ submissions: "skip", otherPath: "skip", query: "skip", hashChange: "skip" });
4842
+ }, Pu = gs({ submissions: "skip", otherPath: "skip", query: "skip", hashChange: "skip" });
4828
4843
  export {
4829
- od as $,
4830
- Mu as A,
4844
+ ya as $,
4845
+ Nu as A,
4831
4846
  It as B,
4832
- Cs as C,
4833
- Md as D,
4834
- cd as E,
4835
- zs as F,
4836
- gr as G,
4837
- hd as H,
4838
- md as I,
4839
- Zn as J,
4840
- fd as K,
4841
- qe as L,
4842
- Cu as M,
4843
- Ou as N,
4844
- Ci as O,
4845
- Ld as P,
4846
- $s as Q,
4847
- xr as R,
4848
- Sa as S,
4849
- Lu as T,
4850
- Cr as U,
4851
- oi as V,
4847
+ Os as C,
4848
+ Ad as D,
4849
+ dd as E,
4850
+ js as F,
4851
+ Cu as G,
4852
+ gr as H,
4853
+ pd as I,
4854
+ hd as J,
4855
+ Zn as K,
4856
+ md as L,
4857
+ qe as M,
4858
+ Mu as N,
4859
+ Lu as O,
4860
+ Md as P,
4861
+ Oi as Q,
4862
+ _s as R,
4863
+ Tr as S,
4864
+ Au as T,
4865
+ xa as U,
4866
+ Or as V,
4852
4867
  si as W,
4853
- Dt as X,
4854
- hi as Y,
4855
- Wc as Z,
4856
- ya as _,
4857
- Os as a,
4858
- ba as a0,
4859
- Bt as a1,
4860
- Nd as a2,
4861
- Qe as a3,
4862
- gs as a4,
4863
- gn as a5,
4864
- ys as a6,
4865
- fr as a7,
4866
- ws as a8,
4867
- hn as a9,
4868
- Au as aa,
4869
- pn as ab,
4870
- Nu as ac,
4871
- Ls as b,
4868
+ ai as X,
4869
+ Dt as Y,
4870
+ pi as Z,
4871
+ Gc as _,
4872
+ Ls as a,
4873
+ sd as a0,
4874
+ Ea as a1,
4875
+ Bt as a2,
4876
+ Dd as a3,
4877
+ Qe as a4,
4878
+ ws as a5,
4879
+ gn as a6,
4880
+ ys as a7,
4881
+ fr as a8,
4882
+ vs as a9,
4883
+ hn as aa,
4884
+ Du as ab,
4885
+ pn as ac,
4886
+ Pu as ad,
4887
+ Ms as b,
4872
4888
  zt as c,
4873
- xa as d,
4889
+ Ta as d,
4874
4890
  at as e,
4875
- Oc as f,
4876
- al as g,
4891
+ Lc as f,
4892
+ il as g,
4877
4893
  At as h,
4878
- Vc as i,
4879
- ma as j,
4880
- Ms as k,
4881
- wa as l,
4882
- va as m,
4883
- fa as n,
4894
+ Zc as i,
4895
+ ha as j,
4896
+ As as k,
4897
+ va as l,
4898
+ ba as m,
4899
+ ma as n,
4884
4900
  de as o,
4885
4901
  ge as p,
4886
- da as q,
4887
- Zs as r,
4888
- ua as s,
4902
+ ua as q,
4903
+ Ws as r,
4904
+ fa as s,
4889
4905
  Re as t,
4890
4906
  $ as u,
4891
- ha as v,
4907
+ pa as v,
4892
4908
  Ce as w,
4893
- Xs as x,
4894
- ud as y,
4895
- Ru as z
4909
+ Js as x,
4910
+ fd as y,
4911
+ Ou as z
4896
4912
  };