@aiquants/markdown-explorer 0.17.0 → 0.19.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 (34) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +7 -5
  3. package/dist/{EditSurface-D-nhilRk.cjs → EditSurface-4VX20isB.cjs} +1 -1
  4. package/dist/{EditSurface-0owpPyLE.js → EditSurface-Ckg-3iTA.js} +3 -3
  5. package/dist/ExplorerSplit-BDkBN8A0.cjs +1 -0
  6. package/dist/{ExplorerSplit-8c93p1hy.js → ExplorerSplit-LiI3IUZn.js} +4 -4
  7. package/dist/{MultiLayout-BXfzR6XC.cjs → MultiLayout-BOaQK8fp.cjs} +1 -1
  8. package/dist/{MultiLayout-Dy3DD_09.js → MultiLayout-KWacTPP8.js} +251 -247
  9. package/dist/{NativeScrollBar-Ddn0iHjv.cjs → NativeScrollBar-BPgV3kp-.cjs} +1 -1
  10. package/dist/{NativeScrollBar-CI9fTvkt.js → NativeScrollBar-zzpty31a.js} +1 -1
  11. package/dist/{TreeLayout-eFQmzpNj.js → TreeLayout-C8IP4cjY.js} +3 -3
  12. package/dist/{TreeLayout-CKZ-XQgn.cjs → TreeLayout-S5TMf8_A.cjs} +1 -1
  13. package/dist/core/geometry.d.cts +1 -1
  14. package/dist/core/geometry.d.ts +1 -1
  15. package/dist/core/labels.d.cts +1 -0
  16. package/dist/core/labels.d.ts +1 -0
  17. package/dist/{index-5gwNJ8CB.cjs → index-DrKHJNY4.cjs} +4 -4
  18. package/dist/{index-h9e3p5Pd.js → index-Dz01kBab.js} +7 -5
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.js +2 -2
  21. package/dist/{location-G7psbmv_.js → location-B-m9scLf.js} +82 -82
  22. package/dist/{location-D85EXiPt.cjs → location-BVEN_Ihk.cjs} +1 -1
  23. package/dist/{merge-C_g05UGC.cjs → merge-B7Lkcdz0.cjs} +1 -1
  24. package/dist/{merge-CS3p9BVw.js → merge-ClVgYrkS.js} +1 -1
  25. package/dist/server.cjs +1 -1
  26. package/dist/server.js +1 -1
  27. package/dist/styles/markdown-explorer.css +1 -1
  28. package/dist/{useSplitPersistence-DRjsPZdH.cjs → useSplitPersistence-Ba-v64n-.cjs} +1 -1
  29. package/dist/{useSplitPersistence-B1b5Lg5E.js → useSplitPersistence-Cc4tDxB4.js} +1 -1
  30. package/docs/behavior/dom-hooks.md +1 -1
  31. package/docs/behavior/layout.md +16 -11
  32. package/docs/behavior/localization.md +2 -1
  33. package/package.json +9 -9
  34. package/dist/ExplorerSplit-bpEvHrCo.cjs +0 -1
@@ -2,7 +2,7 @@ import { jsxs as F, jsx as c, Fragment as Pe } from "react/jsx-runtime";
2
2
  import * as y from "react";
3
3
  import { createContext as pe, use as ne, useMemo as G, useSyncExternalStore as ee, useRef as _, useLayoutEffect as H, useCallback as P, useId as Se, useEffect as te, Component as tn, Suspense as ke, lazy as it, useState as B, useEffectEvent as le } from "react";
4
4
  import { useParams as _n, useSearchParams as In, matchPath as Bn, useBlocker as zn, useNavigate as jn, Link as Hn, useHref as $e, useLocation as nn, useRevalidator as Vn } from "react-router";
5
- import { j as Un, g as rn, z as Zn, E as on, a as ln, B as Gn, D as wt, G as Wn, H as be, e as ye, I as Kn, J as Xn, K as gt, L as Yn, M as bt, O as Jn, w as Qn, Q as er } from "./location-G7psbmv_.js";
5
+ import { j as Un, g as rn, z as Zn, E as on, a as ln, B as Gn, D as wt, G as Wn, H as be, e as ye, I as Kn, J as Xn, K as gt, L as Yn, M as bt, O as Jn, w as Qn, Q as er } from "./location-B-m9scLf.js";
6
6
  import { F as se, i as tr, G as nr, y as J, x as rr, H as Et, z as Ve, I as or, J as ir, K as lr, L as ar, N as sr, f as cr, O as yt, v as dr, P as ur, Q as fr, R as mr, B as hr, w as pr, S as vr, T as wr, U as gr, u as xt } from "./dataRoute-CObbjNxG.js";
7
7
  import { HostedScrollArea as St, useMarkdownToolbarState as br, MarkdownViewer as an } from "@aiquants/markdown";
8
8
  import { SOURCE_LINES_ATTRIBUTE as sn, parseSourceLines as Er } from "@aiquants/markdown/source-lines";
@@ -261,6 +261,7 @@ const Tt = Object.freeze(["en", "ja"]), Tr = "en", Rr = Object.freeze({
261
261
  panelSwitchToCustomDrag: "Switch to the custom drag mode",
262
262
  panelSwitchToNormalDrag: "Back to the normal drag mode",
263
263
  panelCustomDragBadge: "Custom",
264
+ panelMove: "Move the panel",
264
265
  panelMovePreviousColumn: "Move to the previous column",
265
266
  panelMoveNextColumn: "Move to the next column",
266
267
  panelMoveUp: "Move up",
@@ -521,6 +522,7 @@ const Tt = Object.freeze(["en", "ja"]), Tr = "en", Rr = Object.freeze({
521
522
  panelSwitchToCustomDrag: "カスタムのドラッグの方式に切り替え",
522
523
  panelSwitchToNormalDrag: "通常のドラッグの方式に戻す",
523
524
  panelCustomDragBadge: "カスタム",
525
+ panelMove: "パネルを移動",
524
526
  panelMovePreviousColumn: "前の列へ移動",
525
527
  panelMoveNextColumn: "次の列へ移動",
526
528
  panelMoveUp: "上へ移動",
@@ -738,7 +740,7 @@ const Tt = Object.freeze(["en", "ja"]), Tr = "en", Rr = Object.freeze({
738
740
  E(a, s, { kind: "failed", failure: j.failure });
739
741
  return;
740
742
  }
741
- const { mergeDraft: Y } = await import("./merge-CS3p9BVw.js");
743
+ const { mergeDraft: Y } = await import("./merge-ClVgYrkS.js");
742
744
  if (!R(a, s) || C.aborted) return;
743
745
  const V = m.get(a);
744
746
  V?.flush();
@@ -1060,7 +1062,7 @@ function co({
1060
1062
  }
1061
1063
  const uo = /* @__PURE__ */ y.forwardRef(co);
1062
1064
  let Ge = null;
1063
- const yn = () => (Ge ??= import("./EditSurface-0owpPyLE.js").catch((e) => {
1065
+ const yn = () => (Ge ??= import("./EditSurface-Ckg-3iTA.js").catch((e) => {
1064
1066
  throw Ge = null, e;
1065
1067
  }), Ge), fo = () => {
1066
1068
  yn().catch(() => {
@@ -1237,7 +1239,7 @@ const at = `[${sn}]`, po = "[data-aqmd-content]", vo = 'a[href], button, input,
1237
1239
  }),
1238
1240
  [u, m]
1239
1241
  );
1240
- }, Ao = it(() => import("./NativeScrollBar-CI9fTvkt.js").then((e) => ({ default: e.NativeScrollBar })));
1242
+ }, Ao = it(() => import("./NativeScrollBar-zzpty31a.js").then((e) => ({ default: e.NativeScrollBar })));
1241
1243
  class No extends tn {
1242
1244
  state = { failed: !1 };
1243
1245
  static getDerivedStateFromError() {
@@ -3415,7 +3417,7 @@ const ga = () => {
3415
3417
  });
3416
3418
  return u.observe(l, { childList: !0, subtree: !0 }), () => u.disconnect();
3417
3419
  }, [t, e]);
3418
- }, Ma = it(() => import("./TreeLayout-eFQmzpNj.js").then((e) => ({ default: e.TreeLayout }))), Oa = it(() => import("./MultiLayout-Dy3DD_09.js").then((e) => ({ default: e.MultiLayout }))), Ca = 64, La = {
3420
+ }, Ma = it(() => import("./TreeLayout-C8IP4cjY.js").then((e) => ({ default: e.TreeLayout }))), Oa = it(() => import("./MultiLayout-KWacTPP8.js").then((e) => ({ default: e.MultiLayout }))), Ca = 64, La = {
3419
3421
  request: (e) => {
3420
3422
  requestAnimationFrame(e);
3421
3423
  }
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index-5gwNJ8CB.cjs"),e=require("./storage-DM0EvkVf.cjs"),E=require("./location-D85EXiPt.cjs"),_=require("./dataRoute-BONacTPi.cjs");exports.DEFAULT_MARKDOWN_EXPLORER_LOCALE=L.DEFAULT_MARKDOWN_EXPLORER_LOCALE;exports.EXPLORER_THEMES=L.EXPLORER_THEMES;exports.MARKDOWN_EXPLORER_LABEL_CATALOGS=L.MARKDOWN_EXPLORER_LABEL_CATALOGS;exports.MARKDOWN_EXPLORER_LABEL_KEYS=L.MARKDOWN_EXPLORER_LABEL_KEYS;exports.MARKDOWN_EXPLORER_LABEL_TEMPLATES=L.MARKDOWN_EXPLORER_LABEL_TEMPLATES;exports.MARKDOWN_EXPLORER_LOCALES=L.MARKDOWN_EXPLORER_LOCALES;exports.MarkdownExplorer=L.MarkdownExplorer;exports.resolveMarkdownExplorerLabels=L.resolveMarkdownExplorerLabels;exports.shouldRevalidateExplorer=L.shouldRevalidateExplorer;exports.clearExplorerStorage=e.clearExplorerStorage;exports.COLUMN_MIN_MEASURE=E.COLUMN_MIN_MEASURE;exports.DEFAULT_TREE_SETTINGS=E.DEFAULT_TREE_SETTINGS;exports.DEFAULT_VIEW_SLUGS=E.DEFAULT_VIEW_SLUGS;exports.EXPAND_ALL_DEPTH_LIMITS=E.EXPAND_ALL_DEPTH_LIMITS;exports.EXPAND_ALL_FOLDER_LIMITS=E.EXPAND_ALL_FOLDER_LIMITS;exports.EXPLORER_DEFAULT_PERCENT=E.EXPLORER_DEFAULT_PERCENT;exports.EXPLORER_MAX_PERCENT=E.EXPLORER_MAX_PERCENT;exports.EXPLORER_MIN_REM=E.EXPLORER_MIN_REM;exports.EXPLORER_MULTI_DEFAULT_PERCENT=E.EXPLORER_MULTI_DEFAULT_PERCENT;exports.GOLDEN_RATIO=E.GOLDEN_RATIO;exports.MULTI_VIEW_COLUMN_LIMITS=E.MULTI_VIEW_COLUMN_LIMITS;exports.MULTI_VIEW_PANEL_LIMITS=E.MULTI_VIEW_PANEL_LIMITS;exports.REVEAL_DOCUMENT_DEPTH_LIMITS=E.REVEAL_DOCUMENT_DEPTH_LIMITS;exports.defineExplorerConfig=E.defineExplorerConfig;exports.explorerHref=E.explorerHref;exports.isExplorerSourceId=E.isExplorerSourceId;exports.resolveExplorerLocation=E.resolveExplorerLocation;exports.withExplorerSources=E.withExplorerSources;exports.DEFAULT_DENIED_PATH_SEGMENTS=_.DEFAULT_DENIED_PATH_SEGMENTS;exports.EXPLORER_EDIT_TOKEN_MAX_LENGTH=_.EXPLORER_EDIT_TOKEN_MAX_LENGTH;exports.EXPLORER_FAILURE_REASONS=_.EXPLORER_FAILURE_REASONS;exports.EXPLORER_MAX_HEADINGS=_.EXPLORER_MAX_HEADINGS;exports.MAX_DOCUMENT_PATH_LENGTH=_.MAX_DOCUMENT_PATH_LENGTH;exports.failureDocument=_.failureDocument;exports.failureOf=_.failureOf;exports.isAcceptableDocumentPath=_.isAcceptableDocumentPath;exports.isDeniedPath=_.isDeniedPath;exports.isExplorerChildrenResult=_.isExplorerChildrenResult;exports.isExplorerFailureCode=_.isExplorerFailureCode;exports.isExplorerFailureReason=_.isExplorerFailureReason;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index-DrKHJNY4.cjs"),e=require("./storage-DM0EvkVf.cjs"),E=require("./location-BVEN_Ihk.cjs"),_=require("./dataRoute-BONacTPi.cjs");exports.DEFAULT_MARKDOWN_EXPLORER_LOCALE=L.DEFAULT_MARKDOWN_EXPLORER_LOCALE;exports.EXPLORER_THEMES=L.EXPLORER_THEMES;exports.MARKDOWN_EXPLORER_LABEL_CATALOGS=L.MARKDOWN_EXPLORER_LABEL_CATALOGS;exports.MARKDOWN_EXPLORER_LABEL_KEYS=L.MARKDOWN_EXPLORER_LABEL_KEYS;exports.MARKDOWN_EXPLORER_LABEL_TEMPLATES=L.MARKDOWN_EXPLORER_LABEL_TEMPLATES;exports.MARKDOWN_EXPLORER_LOCALES=L.MARKDOWN_EXPLORER_LOCALES;exports.MarkdownExplorer=L.MarkdownExplorer;exports.resolveMarkdownExplorerLabels=L.resolveMarkdownExplorerLabels;exports.shouldRevalidateExplorer=L.shouldRevalidateExplorer;exports.clearExplorerStorage=e.clearExplorerStorage;exports.COLUMN_MIN_MEASURE=E.COLUMN_MIN_MEASURE;exports.DEFAULT_TREE_SETTINGS=E.DEFAULT_TREE_SETTINGS;exports.DEFAULT_VIEW_SLUGS=E.DEFAULT_VIEW_SLUGS;exports.EXPAND_ALL_DEPTH_LIMITS=E.EXPAND_ALL_DEPTH_LIMITS;exports.EXPAND_ALL_FOLDER_LIMITS=E.EXPAND_ALL_FOLDER_LIMITS;exports.EXPLORER_DEFAULT_PERCENT=E.EXPLORER_DEFAULT_PERCENT;exports.EXPLORER_MAX_PERCENT=E.EXPLORER_MAX_PERCENT;exports.EXPLORER_MIN_REM=E.EXPLORER_MIN_REM;exports.EXPLORER_MULTI_DEFAULT_PERCENT=E.EXPLORER_MULTI_DEFAULT_PERCENT;exports.GOLDEN_RATIO=E.GOLDEN_RATIO;exports.MULTI_VIEW_COLUMN_LIMITS=E.MULTI_VIEW_COLUMN_LIMITS;exports.MULTI_VIEW_PANEL_LIMITS=E.MULTI_VIEW_PANEL_LIMITS;exports.REVEAL_DOCUMENT_DEPTH_LIMITS=E.REVEAL_DOCUMENT_DEPTH_LIMITS;exports.defineExplorerConfig=E.defineExplorerConfig;exports.explorerHref=E.explorerHref;exports.isExplorerSourceId=E.isExplorerSourceId;exports.resolveExplorerLocation=E.resolveExplorerLocation;exports.withExplorerSources=E.withExplorerSources;exports.DEFAULT_DENIED_PATH_SEGMENTS=_.DEFAULT_DENIED_PATH_SEGMENTS;exports.EXPLORER_EDIT_TOKEN_MAX_LENGTH=_.EXPLORER_EDIT_TOKEN_MAX_LENGTH;exports.EXPLORER_FAILURE_REASONS=_.EXPLORER_FAILURE_REASONS;exports.EXPLORER_MAX_HEADINGS=_.EXPLORER_MAX_HEADINGS;exports.MAX_DOCUMENT_PATH_LENGTH=_.MAX_DOCUMENT_PATH_LENGTH;exports.failureDocument=_.failureDocument;exports.failureOf=_.failureOf;exports.isAcceptableDocumentPath=_.isAcceptableDocumentPath;exports.isDeniedPath=_.isDeniedPath;exports.isExplorerChildrenResult=_.isExplorerChildrenResult;exports.isExplorerFailureCode=_.isExplorerFailureCode;exports.isExplorerFailureReason=_.isExplorerFailureReason;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { W as a, X as L, Y as s, Z as e, _ as r, $ as R, a0 as A, a1 as T, a2 as o } from "./index-h9e3p5Pd.js";
1
+ import { W as a, X as L, Y as s, Z as e, _ as r, $ as R, a0 as A, a1 as T, a2 as o } from "./index-Dz01kBab.js";
2
2
  import { c as O } from "./storage-CmGHg7OA.js";
3
- import { R as N, T as P, U as l, V as I, W as S, x as X, u as i, X as p, y as x, H as U, Y as t, Z as C, _ as f, $ as u, e as W, i as c, g as n, w as F } from "./location-G7psbmv_.js";
3
+ import { R as N, T as P, U as l, V as I, W as S, x as X, u as i, X as p, y as x, H as U, Y as t, Z as C, _ as f, $ as u, e as W, i as c, g as n, w as F } from "./location-B-m9scLf.js";
4
4
  import { D as d, V as G, W as K, E as m, M as V, z as h, f as w, i as b, C as g, L as v, c as B, b as Y } from "./dataRoute-CObbjNxG.js";
5
5
  export {
6
6
  N as COLUMN_MIN_MEASURE,
@@ -15,7 +15,7 @@ const J = (e) => {
15
15
  if (n !== 0) return n;
16
16
  const o = I.compare(e.name, t.name);
17
17
  return o !== 0 ? o : I.compare(e.path, t.path);
18
- }, pt = (e) => {
18
+ }, ht = (e) => {
19
19
  let t = null;
20
20
  for (const r of e)
21
21
  V(r) && (t === null || Oe(r, t) < 0) && (t = r);
@@ -90,25 +90,25 @@ const J = (e) => {
90
90
  h("expandIcons", "settingExpandIcons"),
91
91
  h("directoryIcons", "settingDirectoryIcons"),
92
92
  h("fileIcons", "settingFileIcons")
93
- ]), ht = (e) => e ? x : x.filter((t) => !t.requiresItemSelection), oe = (e) => {
93
+ ]), Et = (e) => e ? x : x.filter((t) => !t.requiresItemSelection), oe = (e) => {
94
94
  const t = x.find((r) => r.key === e);
95
95
  if (t === void 0) throw new RangeError(`[markdown-explorer] no tree setting descriptor for ${e}`);
96
96
  return t;
97
- }, Et = (e, t) => {
97
+ }, St = (e, t) => {
98
98
  const r = oe(t).values, n = r[(r.indexOf(e[t]) + 1) % r.length];
99
99
  return { ...e, [t]: n };
100
- }, St = (e, t, r) => oe(r).formatValue(e, t[r]), se = 2, B = Object.freeze({}), X = (e, t) => Object.freeze(Object.fromEntries(x.filter((r) => t(r, e[r.key])).map((r) => [r.key, e[r.key]]))), Z = "directoriesFirst", Te = (e) => {
100
+ }, xt = (e, t, r) => oe(r).formatValue(e, t[r]), se = 2, B = Object.freeze({}), X = (e, t) => Object.freeze(Object.fromEntries(x.filter((r) => t(r, e[r.key])).map((r) => [r.key, e[r.key]]))), Z = "directoriesFirst", Te = (e) => {
101
101
  if (!Object.hasOwn(e, Z)) return e;
102
102
  const { [Z]: t, ...r } = e;
103
103
  return Object.hasOwn(r, "folderPlacement") || typeof t != "boolean" ? r : { ...r, folderPlacement: t ? "first" : "mixed" };
104
- }, xt = (e) => {
104
+ }, bt = (e) => {
105
105
  if (e === null || typeof e != "object" || Array.isArray(e)) return B;
106
106
  const t = e;
107
107
  return t.version !== se || t.settings === null || typeof t.settings != "object" || Array.isArray(t.settings) ? B : X(Te(t.settings), (r, n) => r.values.includes(n));
108
- }, bt = (e, t) => {
108
+ }, yt = (e, t) => {
109
109
  const r = X(t, (n, o) => o !== void 0 && o !== e[n.key]);
110
110
  return Object.keys(r).length === 0 ? e : Object.freeze({ ...e, ...r });
111
- }, yt = (e, t, r, n) => X({ ...e, [t]: r }, (o, s) => s !== void 0 && !(o.key === t && s === n[t])), Ot = (e) => JSON.stringify({ version: se, settings: e }), Ne = (e, t, r) => e === void 0 || t === void 0 ? e === t ? 0 : e === void 0 ? 1 : -1 : r * (e - t), kt = (e) => {
111
+ }, Ot = (e, t, r, n) => X({ ...e, [t]: r }, (o, s) => s !== void 0 && !(o.key === t && s === n[t])), kt = (e) => JSON.stringify({ version: se, settings: e }), Ne = (e, t, r) => e === void 0 || t === void 0 ? e === t ? 0 : e === void 0 ? 1 : -1 : r * (e - t), Rt = (e) => {
112
112
  const { sortMode: t, folderPlacement: r, readmePlacement: n } = e;
113
113
  if (t === "native" && r === "mixed" && n === "mixed") return;
114
114
  const o = (s, i) => {
@@ -127,13 +127,13 @@ const J = (e) => {
127
127
  const l = Ne(s.modifiedAt, i.modifiedAt, t === "oldest" ? 1 : -1);
128
128
  return l !== 0 ? l : o(s, i);
129
129
  };
130
- }, g = (1 + Math.sqrt(5)) / 2, Rt = 100 / g ** 3, _t = 100 / g ** 4, ie = 100 / g ** 2, Ae = 13, Tt = 16, Nt = Object.freeze({ gripThickness: 5, gripLength: 34, barThickness: 2, barLength: 21 }), Ie = Object.freeze([89, 144, 233, 377]), At = 34, It = 44, Pt = 24, vt = 1 / g, $t = 1 / g ** 3, Mt = "40ch", Pe = (e) => {
130
+ }, g = (1 + Math.sqrt(5)) / 2, _t = 100 / g ** 3, Tt = 100 / g ** 4, ie = 100 / g ** 2, Ae = 13, Nt = 16, At = Object.freeze({ gripThickness: 5, gripLength: 34, barThickness: 2, barLength: 21 }), Ie = Object.freeze([89, 144, 233, 377]), Pe = 44, It = Pe, Pt = 24, vt = 1 / g, $t = 1 / g ** 3, Mt = "40ch", ve = (e) => {
131
131
  if (!Number.isFinite(e) || e <= 0)
132
132
  throw new RangeError(`[markdown-explorer] rootFontPixels must be a finite number > 0; got ${String(e)}`);
133
- }, ve = (e) => (Pe(e), Ae * e), Ct = (e) => ve(e) * g ** 2, Lt = 233, Dt = 50, $e = 100 / g ** 3, zt = 100 - $e, jt = Ie[0], w = (e, t) => {
133
+ }, $e = (e) => (ve(e), Ae * e), Ct = (e) => $e(e) * g ** 2, Lt = 233, Dt = 50, Me = 100 / g ** 3, zt = 100 - Me, jt = Ie[0], w = (e, t) => {
134
134
  if (!Number.isFinite(t) || t < 0)
135
135
  throw new RangeError(`[markdown-explorer] ${e} must be a finite number >= 0; got ${String(t)}`);
136
- }, Me = ({ trackInlineSize: e, gap: t, minColumnInlineSize: r, logicalColumns: n }) => {
136
+ }, Ce = ({ trackInlineSize: e, gap: t, minColumnInlineSize: r, logicalColumns: n }) => {
137
137
  if (w("trackInlineSize", e), w("gap", t), !Number.isFinite(r) || r <= 0)
138
138
  throw new RangeError(`[markdown-explorer] minColumnInlineSize must be a finite number > 0; got ${String(r)}`);
139
139
  if (!Number.isInteger(n) || n < 1)
@@ -143,7 +143,7 @@ const J = (e) => {
143
143
  }, Ft = (e, t) => {
144
144
  const { trackInlineSize: r, gap: n, minColumnInlineSize: o, logicalColumns: s } = t;
145
145
  if (!([r, n, o].every(Number.isFinite) && r > 0 && n >= 0 && o > 0)) return e;
146
- const l = Me(t);
146
+ const l = Ce(t);
147
147
  if (e === null || l === e) return l;
148
148
  const a = Math.min(s, Math.max(1, e));
149
149
  if (l > a) {
@@ -169,10 +169,10 @@ const J = (e) => {
169
169
  left: Y(e.left, e.right, r.width, t.width),
170
170
  top: Y(e.top, e.bottom, r.height, t.height)
171
171
  };
172
- }, Ce = 31536e3, Le = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/u, De = (e) => {
173
- if (typeof e != "string" || !Le.test(e))
172
+ }, Le = 31536e3, De = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/u, ze = (e) => {
173
+ if (typeof e != "string" || !De.test(e))
174
174
  throw new RangeError(`[markdown-explorer] settingsCookie must be a cookie-name token; got ${JSON.stringify(e)}`);
175
- }, Q = (e) => typeof e == "number" && Number.isFinite(e) && e > 0 && e <= ie, ze = (e, t) => {
175
+ }, Q = (e) => typeof e == "number" && Number.isFinite(e) && e > 0 && e <= ie, je = (e, t) => {
176
176
  if (e === null || typeof e != "object" || Array.isArray(e)) return {};
177
177
  const r = e, { treeExplorer: n, multiExplorer: o, style: s, align: i } = r;
178
178
  return {
@@ -191,12 +191,12 @@ const J = (e) => {
191
191
  }, Gt = (e, t) => {
192
192
  if (e === void 0 || e === "") return {};
193
193
  try {
194
- return ze(JSON.parse(decodeURIComponent(e)), t);
194
+ return je(JSON.parse(decodeURIComponent(e)), t);
195
195
  } catch {
196
196
  return {};
197
197
  }
198
- }, P = 100, je = Math.floor(ie * P) / P, Fe = (e) => {
199
- const t = (r) => Math.min(je, Math.max(1, Math.round(r * P)) / P);
198
+ }, P = 100, Fe = Math.floor(ie * P) / P, Ve = (e) => {
199
+ const t = (r) => Math.min(Fe, Math.max(1, Math.round(r * P)) / P);
200
200
  return encodeURIComponent(
201
201
  JSON.stringify({
202
202
  ...e.treeExplorer === void 0 ? {} : { treeExplorer: t(e.treeExplorer) },
@@ -205,9 +205,9 @@ const J = (e) => {
205
205
  ...e.align === void 0 ? {} : { align: e.align }
206
206
  })
207
207
  );
208
- }, Wt = (e, t, r) => `${e}=${Fe(t)}; Path=/; Max-Age=${String(Ce)}; SameSite=Lax${r ? "; Secure" : ""}`, ee = Object.freeze({ tree: "tree", multi: "multi", single: "single" }), Ve = Object.freeze({ default: 12, min: 1, max: 64 }), Ue = Object.freeze({ default: 4, min: 1, max: 6 }), Je = Object.freeze({ default: 500, min: 1, max: 1e4 }), Xe = Object.freeze({ default: 16, min: 1, max: 64 }), Ge = Object.freeze({ default: 16, min: 1, max: 64 }), We = /^\/(?:[A-Za-z0-9._~-]+\/)*[A-Za-z0-9._~-]+$/u, He = /^[A-Za-z0-9][A-Za-z0-9_-]*$/u, Ke = /^[a-z0-9][a-z0-9-]*$/u, qe = /^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/u, te = (e, t) => {
208
+ }, Wt = (e, t, r) => `${e}=${Ve(t)}; Path=/; Max-Age=${String(Le)}; SameSite=Lax${r ? "; Secure" : ""}`, ee = Object.freeze({ tree: "tree", multi: "multi", single: "single" }), Ue = Object.freeze({ default: 12, min: 1, max: 64 }), Je = Object.freeze({ default: 4, min: 1, max: 6 }), Xe = Object.freeze({ default: 500, min: 1, max: 1e4 }), Ge = Object.freeze({ default: 16, min: 1, max: 64 }), We = Object.freeze({ default: 16, min: 1, max: 64 }), He = /^\/(?:[A-Za-z0-9._~-]+\/)*[A-Za-z0-9._~-]+$/u, Ke = /^[A-Za-z0-9][A-Za-z0-9_-]*$/u, qe = /^[a-z0-9][a-z0-9-]*$/u, Be = /^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/u, te = (e, t) => {
209
209
  if (typeof t != "string") throw new TypeError(`[markdown-explorer] ${e} must be a string; got ${typeof t}`);
210
- if (!We.test(t) || t.split("/").some((r) => r === "." || r === ".."))
210
+ if (!He.test(t) || t.split("/").some((r) => r === "." || r === ".."))
211
211
  throw new RangeError(`[markdown-explorer] ${e} must start with "/", have no trailing "/", and use only letters, digits and "._~-" in each segment; got ${JSON.stringify(t)}`);
212
212
  }, d = (e) => typeof e == "string" ? JSON.stringify(e) : typeof e == "bigint" ? `${String(e)}n` : Object.is(e, -0) ? "-0" : typeof e == "function" ? "a function" : Array.isArray(e) ? "an array" : e !== null && typeof e == "object" ? J(e) ? "a plain object" : `a non-plain object (${Object.prototype.toString.call(e)})` : String(e), S = (e, t, r) => {
213
213
  if (t === void 0) return [];
@@ -216,11 +216,11 @@ const J = (e) => {
216
216
  for (const [o] of n)
217
217
  if (!r.includes(o)) throw new RangeError(`[markdown-explorer] ${e}.${o} is not an option; expected ${r.join(", ")}`);
218
218
  return n.filter(([, o]) => o !== void 0);
219
- }, Be = (e) => {
219
+ }, Ze = (e) => {
220
220
  const t = { ...ee };
221
221
  for (const [r, n] of S("views", e, Object.keys(ee))) t[r] = n;
222
222
  for (const [r, n] of Object.entries(t))
223
- if (typeof n != "string" || !He.test(n))
223
+ if (typeof n != "string" || !Ke.test(n))
224
224
  throw new RangeError(`[markdown-explorer] views.${r} must start with a letter or digit and use only letters, digits, "_" and "-"; got ${JSON.stringify(n)}`);
225
225
  return Object.freeze(t);
226
226
  }, R = (e, t, r) => {
@@ -228,7 +228,7 @@ const J = (e) => {
228
228
  if (typeof t != "number" || !Number.isInteger(t) || t < r.min || t > r.max)
229
229
  throw new RangeError(`[markdown-explorer] ${e} must be an integer in ${String(r.min)}..${String(r.max)}; got ${d(t)}`);
230
230
  return t;
231
- }, Ze = (e, t) => {
231
+ }, Ye = (e, t) => {
232
232
  const r = new Map(S("embeds", e, ["providers", "linkCards", "linkCardSize"]));
233
233
  if (r.size === 0) return we;
234
234
  const n = r.has("providers") ? r.get("providers") : [];
@@ -243,7 +243,7 @@ const J = (e) => {
243
243
  if (!he(i)) throw new RangeError(`[markdown-explorer] embeds.linkCardSize must be one of ${Ee.join(", ")}; got ${d(i)}`);
244
244
  if (!o) throw new RangeError(`[markdown-explorer] embeds.linkCardSize needs embeds.linkCards: true; got linkCardSize ${d(i)} with linkCards ${d(o)}`);
245
245
  return Object.freeze({ ...s, linkCardSize: i });
246
- }, Ye = (e) => {
246
+ }, Qe = (e) => {
247
247
  const t = new Map(
248
248
  S(
249
249
  "defaultTreeSettings",
@@ -260,10 +260,10 @@ const J = (e) => {
260
260
  r[n.key] = o;
261
261
  }
262
262
  return Object.freeze(r);
263
- }, Qe = (e) => {
263
+ }, et = (e) => {
264
264
  if (e === null || typeof e != "object") throw new TypeError("[markdown-explorer] the explorer configuration must be an object");
265
265
  te("basePath", e.basePath), te("dataPath", e.dataPath);
266
- const t = Be(e.views);
266
+ const t = Ze(e.views);
267
267
  if ((/* @__PURE__ */ new Set([t.tree, t.multi, t.single])).size !== 3)
268
268
  throw new RangeError(`[markdown-explorer] the view slugs must differ; got ${JSON.stringify(t)}`);
269
269
  if (e.dataPath === e.basePath) throw new RangeError("[markdown-explorer] dataPath must differ from basePath");
@@ -272,9 +272,9 @@ const J = (e) => {
272
272
  if (a === t.tree || a === t.multi || a === t.single)
273
273
  throw new RangeError(`[markdown-explorer] dataPath must not start with a view slug under basePath; got ${JSON.stringify(e.dataPath)}`);
274
274
  }
275
- De(e.settingsCookie);
275
+ ze(e.settingsCookie);
276
276
  const r = e.iframeHosts ?? [];
277
- if (!Array.isArray(r) || r.some((a) => typeof a != "string" || !qe.test(a)))
277
+ if (!Array.isArray(r) || r.some((a) => typeof a != "string" || !Be.test(a)))
278
278
  throw new RangeError(`[markdown-explorer] iframeHosts must be lowercase host names without scheme, port or path; got ${JSON.stringify(r)}`);
279
279
  const n = Object.fromEntries(S("multiView", e.multiView, ["maxPanels", "columns"])), o = Object.fromEntries(S("expandAll", e.expandAll, ["maxFolders", "maxDepth"])), s = Object.fromEntries(S("revealDocument", e.revealDocument, ["maxDepth"])), i = e.documentStyles ?? Se;
280
280
  if (!Array.isArray(i) || i.length === 0) throw new RangeError("[markdown-explorer] documentStyles must be a non-empty array");
@@ -291,33 +291,33 @@ const J = (e) => {
291
291
  settingsCookie: e.settingsCookie,
292
292
  views: t,
293
293
  multiView: Object.freeze({
294
- maxPanels: R("multiView.maxPanels", n.maxPanels, Ve),
295
- columns: R("multiView.columns", n.columns, Ue)
294
+ maxPanels: R("multiView.maxPanels", n.maxPanels, Ue),
295
+ columns: R("multiView.columns", n.columns, Je)
296
296
  }),
297
297
  expandAll: Object.freeze({
298
- maxFolders: R("expandAll.maxFolders", o.maxFolders, Je),
299
- maxDepth: R("expandAll.maxDepth", o.maxDepth, Xe)
298
+ maxFolders: R("expandAll.maxFolders", o.maxFolders, Xe),
299
+ maxDepth: R("expandAll.maxDepth", o.maxDepth, Ge)
300
300
  }),
301
- revealDocument: Object.freeze({ maxDepth: R("revealDocument.maxDepth", s.maxDepth, Ge) }),
301
+ revealDocument: Object.freeze({ maxDepth: R("revealDocument.maxDepth", s.maxDepth, We) }),
302
302
  documentStyles: Object.freeze(i.map((a) => Object.freeze({ name: a.name, className: a.className }))),
303
303
  iframeHosts: Object.freeze([...new Set(r)]),
304
- embeds: Ze(e.embeds, e.dataPath),
305
- defaultTreeSettings: Ye(e.defaultTreeSettings)
304
+ embeds: Ye(e.embeds, e.dataPath),
305
+ defaultTreeSettings: Qe(e.defaultTreeSettings)
306
306
  });
307
307
  }, Ht = (e) => {
308
308
  const t = e.embeds;
309
309
  if (!J(t)) throw new TypeError(`[markdown-explorer] config.embeds must be the embeds defineExplorerConfig resolved; got ${d(t)}`);
310
310
  if (Object.hasOwn(t, "linkCards"))
311
311
  throw new RangeError(`[markdown-explorer] config.embeds.linkCards is an option of defineExplorerConfig, not a key of the embeds it resolves; pass the option to defineExplorerConfig (got linkCards ${d(t.linkCards)})`);
312
- const { linkCardEndpoint: r, ...n } = t, o = Qe({ ...e, embeds: { ...n, linkCards: r !== null } });
312
+ const { linkCardEndpoint: r, ...n } = t, o = et({ ...e, embeds: { ...n, linkCards: r !== null } });
313
313
  if (o.embeds.linkCardEndpoint !== r)
314
314
  throw new RangeError(`[markdown-explorer] config.embeds.linkCardEndpoint must be ${d(o.embeds.linkCardEndpoint)} (the data route's link-card path) or null; got ${d(r)}`);
315
315
  return o;
316
- }, et = (e) => typeof e == "string" && Ke.test(e), Kt = (e, t) => {
316
+ }, tt = (e) => typeof e == "string" && qe.test(e), Kt = (e, t) => {
317
317
  if (e === null || typeof e != "object") throw new TypeError(`[markdown-explorer] withExplorerSources needs the configuration of defineExplorerConfig; got ${d(e)}`);
318
318
  if (!Array.isArray(t) || t.length === 0) throw new RangeError(`[markdown-explorer] sourceIds must be a non-empty array; got ${d(t)}`);
319
319
  for (const r of t)
320
- if (!et(r)) throw new RangeError(`[markdown-explorer] each source id must use lowercase letters, digits and "-" and start with a letter or digit; got ${d(r)}`);
320
+ if (!tt(r)) throw new RangeError(`[markdown-explorer] each source id must use lowercase letters, digits and "-" and start with a letter or digit; got ${d(r)}`);
321
321
  if (new Set(t).size !== t.length) throw new RangeError(`[markdown-explorer] source ids must be unique; got ${JSON.stringify(t)}`);
322
322
  return Object.freeze({ ...e, sourceIds: Object.freeze([...t]) });
323
323
  }, qt = (e) => e.documentStyles.map((t) => t.name), c = Object.freeze({
@@ -336,22 +336,22 @@ const J = (e) => {
336
336
  }), ae = "true", v = "/", re = ".data", le = 256, ce = /^\d+(?:\.\d+)?$/u, U = /^\d+(?:\.\d+)?(?:px|rem|em|ch|vw|%)$/u, de = Object.freeze(["showToc", "showStyle", "showAlign"]), ne = (e) => {
337
337
  const t = encodeURIComponent(e.replaceAll("%", "%25"));
338
338
  return t.endsWith(re) ? `${t.slice(0, -re.length)}%2Edata` : t;
339
- }, tt = (e) => e.replaceAll("%25", "%"), me = (e) => {
339
+ }, rt = (e) => e.replaceAll("%25", "%"), me = (e) => {
340
340
  const { sourceIds: t } = e;
341
341
  if (t === void 0) throw new TypeError("[markdown-explorer] the configuration has no source ids; join the server's sources with withExplorerSources(config, sourceIds)");
342
342
  return t;
343
- }, rt = (e, t, r) => {
343
+ }, nt = (e, t, r) => {
344
344
  const n = r.getAll(c.source);
345
345
  if (n.length === 0) return t;
346
346
  const [o] = n;
347
347
  return n.length > 1 || o === void 0 || o === t || !e.includes(o) ? null : o;
348
- }, nt = (e, t) => {
348
+ }, ot = (e, t) => {
349
349
  const r = t.get(c.style), n = t.get(c.align);
350
350
  return {
351
351
  ...r !== null && e.documentStyles.some((o) => o.name === r) ? { style: r } : {},
352
352
  ...n !== null && N.includes(n) ? { align: n } : {}
353
353
  };
354
- }, ue = (e) => Number.isFinite(e) && e >= 0 && e <= le && ce.test(String(e)), ot = (e) => {
354
+ }, ue = (e) => Number.isFinite(e) && e >= 0 && e <= le && ce.test(String(e)), st = (e) => {
355
355
  const t = e.get(c.padding), r = t !== null && ce.test(t) ? Number(t) : Number.NaN, n = e.get(c.width), o = e.get(c.maxWidth);
356
356
  return {
357
357
  ...e.get(c.showToc) === "false" ? { showToc: !1 } : {},
@@ -361,7 +361,7 @@ const J = (e) => {
361
361
  ...n !== null && U.test(n) ? { width: n } : {},
362
362
  ...o !== null && U.test(o) ? { maxWidth: o } : {}
363
363
  };
364
- }, st = (e, t) => [...new Set(t.filter(A))].slice(0, e.multiView.maxPanels), it = (e, t, r, n) => {
364
+ }, it = (e, t) => [...new Set(t.filter(A))].slice(0, e.multiView.maxPanels), at = (e, t, r, n) => {
365
365
  for (const s of t) G(s);
366
366
  if (new Set(t).size !== t.length) throw new RangeError(`[markdown-explorer] multi-view documents must each appear once; got ${String(t.length)} with repeats`);
367
367
  if (t.length > e.multiView.maxPanels) throw new RangeError(`[markdown-explorer] the multi view opens at most ${String(e.multiView.maxPanels)} documents; got ${String(t.length)}`);
@@ -372,15 +372,15 @@ const J = (e) => {
372
372
  }, G = (e) => {
373
373
  if (!A(e)) throw new RangeError(`[markdown-explorer] not an acceptable document path: ${JSON.stringify(String(e).slice(0, 80))}`);
374
374
  return e;
375
- }, at = (e) => {
375
+ }, lt = (e) => {
376
376
  if (G(e).endsWith(v)) throw new RangeError(`[markdown-explorer] a document path ending in a slash has no URL (its segment would name a folder): ${JSON.stringify(e.slice(0, 80))}`);
377
377
  return e;
378
- }, lt = (e, t) => {
378
+ }, ct = (e, t) => {
379
379
  if (t.style !== void 0 && !e.documentStyles.some((r) => r.name === t.style))
380
380
  throw new RangeError(`[markdown-explorer] overrides.style must name a configured document style (${e.documentStyles.map((r) => JSON.stringify(r.name)).join(", ")}); got ${JSON.stringify(t.style)}`);
381
381
  if (t.align !== void 0 && !N.includes(t.align))
382
382
  throw new RangeError(`[markdown-explorer] overrides.align must be one of ${N.join(", ")}; got ${JSON.stringify(t.align)}`);
383
- }, ct = (e) => {
383
+ }, dt = (e) => {
384
384
  for (const t of de)
385
385
  if (e[t] !== void 0 && typeof e[t] != "boolean") throw new RangeError(`[markdown-explorer] embed.${t} must be a boolean; got ${JSON.stringify(e[t])}`);
386
386
  if (e.padding !== void 0 && !ue(e.padding)) throw new RangeError(`[markdown-explorer] embed.padding must be 0..${String(le)} px in plain decimal digits; got ${String(e.padding)}`);
@@ -388,112 +388,112 @@ const J = (e) => {
388
388
  const r = e[t];
389
389
  if (r !== void 0 && !U.test(r)) throw new RangeError(`[markdown-explorer] embed.${t} must be a CSS length in px, rem, em, ch, vw or %; got ${JSON.stringify(r)}`);
390
390
  }
391
- }, dt = (e, t) => {
391
+ }, mt = (e, t) => {
392
392
  const r = new URLSearchParams();
393
393
  let n = `${e.basePath}/${e.views[t.view]}`;
394
394
  if (t.view === "multi") {
395
395
  const s = t.docs ?? [], i = t.maximized ?? null, l = t.markup ?? [];
396
- it(e, s, i, l);
396
+ at(e, s, i, l);
397
397
  for (const a of s) r.append(c.doc, a);
398
398
  i !== null && r.set(c.maximized, i);
399
399
  for (const a of s) l.includes(a) && r.append(c.markup, a);
400
400
  } else {
401
401
  const s = t.doc ?? null, i = t.view === "tree" ? t.folder ?? null : null;
402
402
  if (s !== null && i !== null) throw new RangeError("[markdown-explorer] a tree view shows a document or a folder, not both");
403
- s !== null && (n += `/${ne(at(s))}`), i !== null && (n += `/${ne(`${G(i)}${v}`)}`);
403
+ s !== null && (n += `/${ne(lt(s))}`), i !== null && (n += `/${ne(`${G(i)}${v}`)}`);
404
404
  }
405
405
  if (t.source !== void 0) {
406
406
  const s = me(e);
407
407
  if (!s.includes(t.source)) throw new RangeError(`[markdown-explorer] unknown source ${JSON.stringify(t.source)}; expected one of ${s.join(", ")}`);
408
408
  t.source !== s[0] && r.set(c.source, t.source);
409
409
  }
410
- if (t.view !== "multi" && t.overrides !== void 0 && (lt(e, t.overrides), t.overrides.style !== void 0 && r.set(c.style, t.overrides.style), t.overrides.align !== void 0 && r.set(c.align, t.overrides.align)), t.view !== "multi" && t.markup === !0) {
410
+ if (t.view !== "multi" && t.overrides !== void 0 && (ct(e, t.overrides), t.overrides.style !== void 0 && r.set(c.style, t.overrides.style), t.overrides.align !== void 0 && r.set(c.align, t.overrides.align)), t.view !== "multi" && t.markup === !0) {
411
411
  if (!(t.doc !== void 0 && t.doc !== null || t.view === "tree" && t.folder !== void 0 && t.folder !== null)) throw new RangeError("[markdown-explorer] a tree view without a document or a folder has nothing to show as written");
412
412
  r.set(c.markup, ae);
413
413
  }
414
414
  if (t.view === "single" && t.embed !== void 0) {
415
415
  const { embed: s } = t;
416
- ct(s);
416
+ dt(s);
417
417
  for (const i of de) s[i] === !1 && r.set(c[i], "false");
418
418
  s.padding !== void 0 && r.set(c.padding, String(s.padding)), s.width !== void 0 && r.set(c.width, s.width), s.maxWidth !== void 0 && r.set(c.maxWidth, s.maxWidth);
419
419
  }
420
420
  const o = r.toString();
421
421
  return o === "" ? n : `${n}?${o}`;
422
- }, mt = (e, t) => Object.keys(e.views).find((r) => e.views[r] === t), Bt = (e, t, r) => {
422
+ }, ut = (e, t) => Object.keys(e.views).find((r) => e.views[r] === t), Bt = (e, t, r) => {
423
423
  const n = me(e), [o] = n;
424
424
  if (o === void 0) throw new RangeError("[markdown-explorer] the configuration has no source");
425
- const s = rt(n, o, r), i = s === null ? o : s, l = (m) => ({ kind: "redirect", href: dt(e, m), location: m }), a = () => l({ view: "tree", source: i, doc: null, folder: null, overrides: {}, markup: !1 });
425
+ const s = nt(n, o, r), i = s === null ? o : s, l = (m) => ({ kind: "redirect", href: mt(e, m), location: m }), a = () => l({ view: "tree", source: i, doc: null, folder: null, overrides: {}, markup: !1 });
426
426
  if (t === void 0 || t === "") return a();
427
- const b = t.indexOf("/"), $ = b < 0 ? t : t.slice(0, b), M = b < 0 ? null : t.slice(b + 1), p = mt(e, $);
427
+ const b = t.indexOf("/"), $ = b < 0 ? t : t.slice(0, b), M = b < 0 ? null : t.slice(b + 1), p = ut(e, $);
428
428
  if (p === void 0) return a();
429
429
  if (p === "multi") {
430
- const m = r.getAll(c.doc), E = st(e, m), C = r.getAll(c.maximized), [L] = C, D = C.length === 1 && L !== void 0 && E.includes(L) ? L : null, z = r.getAll(c.markup), T = E.filter((k) => z.includes(k)), fe = T.length === z.length && T.every((k, j) => k === z[j]);
430
+ const m = r.getAll(c.doc), E = it(e, m), C = r.getAll(c.maximized), [L] = C, D = C.length === 1 && L !== void 0 && E.includes(L) ? L : null, z = r.getAll(c.markup), T = E.filter((k) => z.includes(k)), fe = T.length === z.length && T.every((k, j) => k === z[j]);
431
431
  return M === null && s !== null && E.length === m.length && E.every((k, j) => k === m[j]) && (C.length === 0 || D !== null) && fe ? { kind: "location", location: { view: "multi", source: i, docs: E, maximized: D, markup: T } } : l({ view: "multi", source: i, docs: E, maximized: D, markup: T });
432
432
  }
433
- const _ = M === null ? null : tt(M), u = _?.endsWith(v) === !0 ? _.slice(0, -v.length) : null, f = _ !== null && u === null ? _ : null;
433
+ const _ = M === null ? null : rt(M), u = _?.endsWith(v) === !0 ? _.slice(0, -v.length) : null, f = _ !== null && u === null ? _ : null;
434
434
  if (f !== null && !A(f) || u !== null && !A(u)) return a();
435
- const y = nt(e, r), O = (f !== null || u !== null) && r.get(c.markup) === ae;
435
+ const y = ot(e, r), O = (f !== null || u !== null) && r.get(c.markup) === ae;
436
436
  if (p === "single") {
437
437
  if (u !== null) return l({ view: "tree", source: i, doc: null, folder: u, overrides: y, markup: O });
438
438
  if (f === null) return a();
439
- const m = ot(r);
439
+ const m = st(r);
440
440
  return s === null ? l({ view: p, source: i, doc: f, overrides: y, embed: m, markup: O }) : { kind: "location", location: { view: p, source: i, doc: f, overrides: y, embed: m, markup: O } };
441
441
  }
442
442
  return s === null ? l({ view: p, source: i, doc: f, folder: u, overrides: y, markup: O }) : { kind: "location", location: { view: p, source: i, doc: f, folder: u, overrides: y, markup: O } };
443
443
  };
444
444
  export {
445
- Qe as $,
446
- Tt as A,
445
+ et as $,
446
+ Nt as A,
447
447
  Jt as B,
448
448
  It as C,
449
- pt as D,
449
+ ht as D,
450
450
  zt as E,
451
451
  Pt as F,
452
452
  jt as G,
453
453
  g as H,
454
- yt as I,
455
- Et as J,
456
- bt as K,
457
- Ot as L,
454
+ Ot as I,
455
+ St as J,
456
+ yt as K,
457
+ kt as L,
458
458
  B as M,
459
459
  I as N,
460
- xt as O,
460
+ bt as O,
461
461
  vt as P,
462
462
  Wt as Q,
463
463
  Mt as R,
464
464
  Lt as S,
465
465
  q as T,
466
466
  ee as U,
467
- Xe as V,
468
- Je as W,
467
+ Ge as V,
468
+ Xe as W,
469
469
  Ae as X,
470
- Ue as Y,
471
- Ve as Z,
472
- Ge as _,
473
- $e as a,
474
- Nt as b,
475
- st as c,
470
+ Je as Y,
471
+ Ue as Z,
472
+ We as _,
473
+ Me as a,
474
+ At as b,
475
+ it as c,
476
476
  Ut as d,
477
- dt as e,
477
+ mt as e,
478
478
  qt as f,
479
479
  Bt as g,
480
480
  Xt as h,
481
- et as i,
481
+ tt as i,
482
482
  J as j,
483
483
  Vt as k,
484
484
  Ft as l,
485
485
  $t as m,
486
- At as n,
487
- kt as o,
486
+ Pe as n,
487
+ Rt as o,
488
488
  Gt as p,
489
- St as q,
489
+ xt as q,
490
490
  Ht as r,
491
491
  Ct as s,
492
- ve as t,
492
+ $e as t,
493
493
  ie as u,
494
- ht as v,
494
+ Et as v,
495
495
  Kt as w,
496
- Rt as x,
497
- _t as y,
496
+ _t as x,
497
+ Tt as y,
498
498
  Dt as z
499
499
  };