@aiquants/markdown-explorer 0.5.0 → 0.6.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.
- package/CHANGELOG.md +19 -0
- package/README.md +10 -2
- package/dist/{ExplorerSplit-CWcK1E4I.js → ExplorerSplit-CN5TvRj6.js} +2 -2
- package/dist/{ExplorerSplit-ajN3GSdA.cjs → ExplorerSplit-CUIbSLQm.cjs} +1 -1
- package/dist/{MultiLayout-DvkcdO9c.cjs → MultiLayout-BDcQSpa6.cjs} +1 -1
- package/dist/{MultiLayout-BtWtCzJV.js → MultiLayout-hPmV-bae.js} +4 -4
- package/dist/{NativeScrollBar-DbzyQ85y.cjs → NativeScrollBar-CHEQgaVx.cjs} +1 -1
- package/dist/{NativeScrollBar-apXjIKRW.js → NativeScrollBar-DYEv2GLV.js} +1 -1
- package/dist/{TreeLayout-rwhJfLmU.cjs → TreeLayout-BDaIyoGT.cjs} +1 -1
- package/dist/{TreeLayout-BcHsv9G8.js → TreeLayout-CqzxLpoM.js} +3 -3
- package/dist/core/contracts.d.cts +10 -7
- package/dist/core/contracts.d.ts +10 -7
- package/dist/core/labels.d.cts +4 -0
- package/dist/core/labels.d.ts +4 -0
- package/dist/dataRoute-CUXlMhUJ.cjs +1 -0
- package/dist/{dataRoute-Btg4w3vO.js → dataRoute-Ce6EIuu4.js} +41 -40
- package/dist/index-B3nShkkt.cjs +3 -0
- package/dist/{index-CIZw73j9.js → index-gJp1iXTc.js} +987 -903
- package/dist/index.cjs +1 -1
- package/dist/index.js +5 -5
- package/dist/{location-c1zdeySY.js → location-CtM94G0O.js} +1 -1
- package/dist/{location-CSIhx-L4.cjs → location-FavgY_gB.cjs} +1 -1
- package/dist/sanitizeWorker.cjs +1 -1
- package/dist/sanitizeWorker.js +1 -1
- package/dist/server/errors.d.cts +1 -1
- package/dist/server/errors.d.ts +1 -1
- package/dist/server/ports.d.cts +1 -0
- package/dist/server/ports.d.ts +1 -0
- package/dist/server.cjs +1 -1
- package/dist/server.js +670 -641
- package/dist/styles/markdown-explorer.css +1 -1
- package/docs/behavior/dom-hooks.md +6 -3
- package/docs/behavior/layout.md +6 -0
- package/docs/behavior/localization.md +4 -1
- package/docs/behavior/security.md +11 -4
- package/package.json +4 -3
- package/dist/dataRoute-DHpu0fg2.cjs +0 -1
- package/dist/index-Cie6WPiM.cjs +0 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
2
2
|
/*! @aiquants/markdown-explorer — component styles, layered in `components`. The layer order is pinned first (theme, base, components, utilities, as Tailwind CSS declares it), so a Tailwind host's preflight in `base` cannot override the explorer when this sheet is the first to name a layer. */
|
|
3
|
-
@layer theme,base;@layer components{.aqmx-root{--aqmx-space-1:.0625rem;--aqmx-space-2:.125rem;--aqmx-space-3:.1875rem;--aqmx-space-4:.3125rem;--aqmx-space-5:.5rem;--aqmx-space-6:.8125rem;--aqmx-space-7:1.3125rem;--aqmx-space-8:2.125rem;--aqmx-space-9:3.4375rem;--aqmx-control:2.125rem;--aqmx-focus-ring-width:var(--aqmx-space-2);--aqmx-focus-ring-offset:var(--aqmx-space-2);--aqmx-icon:1rem;--aqmx-radius-s:.3125rem;--aqmx-radius-m:.5rem;--aqmx-radius-l:.8125rem;--aqmx-duration-1:89ms;--aqmx-duration-2:.144s;--aqmx-duration-3:.233s;--aqmx-duration-4:.377s;--aqmx-delay-progress:.233s;--aqmx-ease:cubic-bezier(.2, 0, 0, 1);--aqmx-font-size-body:.8125rem;--aqmx-font-size-title:1rem;--aqmx-font-size-display:1.3125rem;--aqmx-line-height-compact:1.382;--aqmx-line-height-prose:1.618;--aqmx-column-measure:40ch;--aqmx-surface:#fff;--aqmx-surface-raised:#f8fafc;--aqmx-surface-sunken:#f1f5f9;--aqmx-border:#cbd5e1;--aqmx-border-strong:#94a3b8;--aqmx-text:#0f172a;--aqmx-text-muted:#475569;--aqmx-accent:#1d4ed8;--aqmx-accent-surface:#dbeafe;--aqmx-tree-line:#64748b;--aqmx-tree-row-tint:#0f172a0f;--aqmx-tree-row-accent-tint:#2563eb29;--aqmx-focus:#2563eb;--aqmx-info-surface:#eff6ff;--aqmx-info-border:#93c5fd;--aqmx-info-text:#1e3a8a;--aqmx-warning-surface:#fffbeb;--aqmx-warning-border:#fcd34d;--aqmx-warning-text:#78350f;--aqmx-danger-surface:#fef2f2;--aqmx-danger-border:#fca5a5;--aqmx-danger-text:#7f1d1d;--aqmx-shadow:0 .0625rem .1875rem #0f172a21, 0 .3125rem .8125rem #0f172a14}.aqmx-root[data-aqmx-theme=dark]{--aqmx-surface:#0f172a;--aqmx-surface-raised:#1e293b;--aqmx-surface-sunken:#020617;--aqmx-border:#334155;--aqmx-border-strong:#64748b;--aqmx-text:#e2e8f0;--aqmx-text-muted:#94a3b8;--aqmx-accent:#93c5fd;--aqmx-accent-surface:#1e3a8a;--aqmx-tree-line:#94a3b8;--aqmx-tree-row-tint:#e2e8f00f;--aqmx-tree-row-accent-tint:#2563eb70;--aqmx-focus:#60a5fa;--aqmx-info-surface:#172554;--aqmx-info-border:#1d4ed8;--aqmx-info-text:#bfdbfe;--aqmx-warning-surface:#422006;--aqmx-warning-border:#a16207;--aqmx-warning-text:#fde68a;--aqmx-danger-surface:#450a0a;--aqmx-danger-border:#b91c1c;--aqmx-danger-text:#fecaca;--aqmx-shadow:0 .0625rem .1875rem #0000008c, 0 .3125rem .8125rem #00000057}@media (pointer:coarse){.aqmx-root{--aqmx-control:2.75rem}}@media (forced-colors:active){.aqmx-root.aqmx-root[data-aqmx-theme]{--aqmx-tree-line:CanvasText}}@media (prefers-reduced-motion:reduce){.aqmx-root{--aqmx-duration-1:0s;--aqmx-duration-2:0s;--aqmx-duration-3:0s;--aqmx-duration-4:0s}}.aqmx-root{block-size:100%;min-block-size:0;inline-size:100%;min-inline-size:0;color:var(--aqmx-text);background:var(--aqmx-surface);font-size:var(--aqmx-font-size-body);line-height:var(--aqmx-line-height-compact);flex-direction:column;display:flex;position:relative}.aqmx-root *,.aqmx-root :before,.aqmx-root :after{box-sizing:border-box}.aqmx-icon-button{inline-size:var(--aqmx-control);block-size:var(--aqmx-control);border-radius:var(--aqmx-radius-m);color:var(--aqmx-text-muted);cursor:pointer;transition:background-color var(--aqmx-duration-2) var(--aqmx-ease), color var(--aqmx-duration-2) var(--aqmx-ease);background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.aqmx-icon-button:hover{color:var(--aqmx-text);background:var(--aqmx-surface-sunken)}.aqmx-icon-button[aria-pressed=true],.aqmx-icon-button[aria-expanded=true]{color:var(--aqmx-accent);background:var(--aqmx-accent-surface)}.aqmx-icon-button:disabled{opacity:.382;cursor:not-allowed}.aqmx-icon-button[aria-disabled=true]{cursor:not-allowed}.aqmx-icon-button[aria-disabled=true]:hover{color:var(--aqmx-text-muted);background:0 0}.aqmx-icon-button>svg{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon)}.aqmx-icon-button[aria-disabled=true]>svg{opacity:.382}.aqmx-root :focus-visible{outline:var(--aqmx-focus-ring-width) solid var(--aqmx-focus);outline-offset:var(--aqmx-focus-ring-offset)}.aqmx-callout{gap:var(--aqmx-space-5);padding:var(--aqmx-space-6);border:var(--aqmx-space-1) solid var(--aqmx-info-border);border-radius:var(--aqmx-radius-l);color:var(--aqmx-info-text);background:var(--aqmx-info-surface);line-height:var(--aqmx-line-height-prose);display:grid}.aqmx-callout[data-aqmx-tone=warning]{border-color:var(--aqmx-warning-border);color:var(--aqmx-warning-text);background:var(--aqmx-warning-surface)}.aqmx-callout[data-aqmx-tone=danger]{border-color:var(--aqmx-danger-border);color:var(--aqmx-danger-text);background:var(--aqmx-danger-surface)}.aqmx-callout-title{font-size:var(--aqmx-font-size-title);font-weight:600;line-height:var(--aqmx-line-height-compact);margin:0}.aqmx-callout-body{margin:0}.aqmx-callout-action{min-block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-6);border:var(--aqmx-space-1) solid currentColor;border-radius:var(--aqmx-radius-m);color:inherit;font:inherit;cursor:pointer;background:0 0;justify-self:start;align-items:center;font-weight:600;text-decoration:none;display:inline-flex}.aqmx-progress{z-index:2;block-size:var(--aqmx-space-3);pointer-events:none;position:absolute;inset-block-start:0;inset-inline:0;overflow:hidden}.aqmx-progress:before{content:"";background:var(--aqmx-accent);inline-size:38.1966%;animation:aqmx-progress calc(var(--aqmx-duration-4) * 3) var(--aqmx-ease) infinite;position:absolute;inset-block:0}@keyframes aqmx-progress{0%{inset-inline-start:-38.1966%}to{inset-inline-start:100%}}.aqmx-empty{place-content:center;justify-items:center;gap:var(--aqmx-space-6);block-size:100%;padding:var(--aqmx-space-8);color:var(--aqmx-text-muted);text-align:center;line-height:var(--aqmx-line-height-prose);display:grid}.aqmx-empty-title{color:var(--aqmx-text);font-size:var(--aqmx-font-size-title);margin:0;font-weight:600}.aqmx-skeleton{gap:var(--aqmx-space-6);padding:var(--aqmx-space-7);display:grid}.aqmx-skeleton>span{block-size:var(--aqmx-space-6);border-radius:var(--aqmx-radius-s);background:var(--aqmx-surface-sunken);animation:aqmx-pulse calc(var(--aqmx-duration-4) * 4) ease-in-out infinite;display:block}.aqmx-skeleton>span:nth-child(3n+1){inline-size:61.8034%}.aqmx-skeleton>span:nth-child(3n+2){inline-size:100%}.aqmx-skeleton>span:nth-child(3n){inline-size:85.4102%}@keyframes aqmx-pulse{50%{opacity:.618}}.aqmx-sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.aqmx-toast{z-index:60;max-inline-size:min(34rem, calc(100% - var(--aqmx-space-8)));padding:var(--aqmx-space-5) var(--aqmx-space-6);border:var(--aqmx-space-1) solid var(--aqmx-warning-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-warning-text);background:var(--aqmx-warning-surface);box-shadow:var(--aqmx-shadow);position:absolute;inset-block-start:var(--aqmx-space-6);inset-inline-end:var(--aqmx-space-7)}@media (prefers-reduced-motion:reduce){.aqmx-progress:before,.aqmx-skeleton>span{animation:none}}@media (forced-colors:active){.aqmx-icon-button[aria-pressed=true],.aqmx-icon-button[aria-expanded=true]{forced-color-adjust:none;color:highlighttext;background:highlight}.aqmx-icon-button[aria-disabled=true]{color:graytext}.aqmx-root :focus-visible{outline-color:highlight}.aqmx-progress:before{forced-color-adjust:none;background:highlight}.aqmx-skeleton>span{forced-color-adjust:none;background:graytext}}.aqmx-explorer{gap:var(--aqmx-space-5);block-size:100%;min-block-size:0;min-inline-size:0;padding:var(--aqmx-space-4);color:var(--aqmx-text);background:var(--aqmx-surface);flex-direction:column;display:flex;position:relative;overflow-y:auto}.aqmx-explorer-header{align-items:center;gap:var(--aqmx-space-4);min-block-size:var(--aqmx-control);flex-wrap:wrap;flex:none;display:flex}.aqmx-explorer-source{min-inline-size:min(100%,9rem);block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-5);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-text);background:var(--aqmx-surface-raised);font:inherit;text-overflow:ellipsis;cursor:pointer;flex:9rem}.aqmx-explorer-actions{justify-content:flex-end;align-items:center;gap:var(--aqmx-space-2);flex-wrap:wrap;flex:0 auto;min-inline-size:0;margin-inline-start:auto;display:flex}.aqmx-explorer-body{gap:var(--aqmx-space-5);flex-direction:column;flex:1 1 0;min-block-size:0;min-inline-size:0;display:flex;position:relative}.aqmx-labelled-button{gap:var(--aqmx-space-2);min-inline-size:var(--aqmx-control);inline-size:auto;padding-inline:var(--aqmx-space-3);white-space:nowrap;flex:0 auto;display:inline-flex}.aqmx-labelled-button>svg{flex:none}.aqmx-labelled-button>span{text-overflow:ellipsis;min-inline-size:0;overflow:hidden}.aqmx-explorer-refresh-failure,.aqmx-explorer-expand-all-stop{padding:var(--aqmx-space-4) var(--aqmx-space-5);border:var(--aqmx-space-1) solid;border-radius:var(--aqmx-radius-m);line-height:var(--aqmx-line-height-compact);overflow-wrap:anywhere;flex:none;margin:0}.aqmx-explorer-refresh-failure{border-color:var(--aqmx-danger-border);color:var(--aqmx-danger-text);background:var(--aqmx-danger-surface)}.aqmx-explorer-expand-all-stop{border-color:var(--aqmx-info-border);color:var(--aqmx-info-text);background:var(--aqmx-info-surface)}.aqmx-explorer-actions>.aqmx-labelled-button[data-aqmx-busy=true]>svg{animation:aqmx-explorer-spin calc(var(--aqmx-duration-4) * 3) linear infinite}@keyframes aqmx-explorer-spin{to{rotate:1turn}}.aqmx-explorer-actions>.aqmx-icon-button[aria-busy=true]{cursor:progress}.aqmx-explorer-menu{z-index:50;gap:var(--aqmx-space-1);max-block-size:100%;inline-size:min(21rem,100%);padding:var(--aqmx-space-3);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);background:var(--aqmx-surface-raised);box-shadow:var(--aqmx-shadow);display:grid;position:absolute;inset-block-start:0;inset-inline-end:0;overflow-y:auto}.aqmx-explorer-menu-item{align-items:center;gap:var(--aqmx-space-5);inline-size:100%;min-block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-5);border-radius:var(--aqmx-radius-s);color:var(--aqmx-text);font:inherit;text-align:start;cursor:pointer;transition:background-color var(--aqmx-duration-1) var(--aqmx-ease);background:0 0;border:0;display:flex}.aqmx-explorer-menu-item:hover,.aqmx-explorer-menu-item:focus-visible{background:var(--aqmx-surface-sunken)}.aqmx-explorer-menu-icon{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon);color:var(--aqmx-text-muted);flex:none}.aqmx-explorer-menu-name{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-inline-size:0;overflow:hidden}.aqmx-explorer-menu-value{color:var(--aqmx-accent);font-variant-numeric:tabular-nums;flex:none;font-weight:600}.aqmx-explorer-notices{gap:var(--aqmx-space-5);flex:none;display:grid}.aqmx-explorer-tree-area{min-block-size:calc(var(--aqmx-control) * 3);flex-direction:column;flex:1 1 0;min-inline-size:0;display:flex;position:relative}.aqmx-explorer-tree{flex:1 1 0;min-block-size:0;position:relative}.aqmx-explorer-tree-view{block-size:100%}.aqmx-explorer-tree-progress{z-index:1;align-items:center;gap:var(--aqmx-space-2) var(--aqmx-space-4);max-inline-size:calc(100% - var(--aqmx-space-5) * 3);padding:var(--aqmx-space-3) var(--aqmx-space-5);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-text-muted);background:var(--aqmx-surface-raised);box-shadow:var(--aqmx-shadow);line-height:var(--aqmx-line-height-compact);overflow-wrap:anywhere;pointer-events:none;animation:aqmx-appear var(--aqmx-duration-2) ease-out var(--aqmx-delay-progress) both;flex-wrap:wrap;margin:0;display:flex;position:absolute;inset-block-end:var(--aqmx-space-9);inset-inline-start:var(--aqmx-space-5)}.aqmx-explorer-tree-progress-icon{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon);animation:aqmx-explorer-spin calc(var(--aqmx-duration-4) * 3) linear infinite;flex:none}@keyframes aqmx-appear{0%{opacity:0}}.aqmx-explorer-tree-probe{inline-size:0;block-size:var(--aqmx-control);visibility:hidden;pointer-events:none;color:var(--aqmx-tree-line);forced-color-adjust:none;position:absolute;inset-block-start:0;inset-inline-start:0;overflow:hidden}.aqmx-explorer-loading{gap:var(--aqmx-space-5);padding:var(--aqmx-space-6) var(--aqmx-space-5);color:var(--aqmx-text-muted);display:grid}.aqmx-explorer-loading-text{margin:0}.aqmx-explorer-loading>.aqmx-skeleton{padding:0}.aqmx-explorer-tree-message{padding:var(--aqmx-space-5);overflow-y:auto}.aqmx-explorer-empty-icon{inline-size:var(--aqmx-space-8);block-size:var(--aqmx-space-8);color:var(--aqmx-border-strong)}.aqmx-explorer-empty-body{margin:0}.aqmx-explorer-tree [role=treeitem]{border-radius:var(--aqmx-radius-s);color:var(--aqmx-text);transition:background-color var(--aqmx-duration-1) var(--aqmx-ease)}.aqmx-explorer-tree [role=treeitem]:hover{color:var(--aqmx-text);background:var(--aqmx-tree-row-tint)}.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true]{color:var(--aqmx-text);background:var(--aqmx-tree-row-tint);box-shadow:inset var(--aqmx-space-2) 0 0 currentColor}.aqmx-explorer-tree [role=treeitem][data-entry-selected=true],.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true]{color:var(--aqmx-accent);background:var(--aqmx-tree-row-accent-tint)}.aqmx-explorer-tree [role=treeitem]:focus-visible{outline-offset:calc(-1 * var(--aqmx-focus-ring-width))}.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true]:focus-visible{box-shadow:inset calc(var(--aqmx-space-2) + var(--aqmx-focus-ring-width)) 0 0 currentColor}.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true]{font-weight:600}.aqmx-explorer-tree [role=treeitem][data-aqmx-children=loading]{animation:aqmx-pulse calc(var(--aqmx-duration-4) * 4) ease-in-out infinite}.aqmx-explorer-tree [role=treeitem][data-aqmx-loop]{color:var(--aqmx-text-muted);font-style:italic}.aqmx-explorer-folder-failed{--aqmx-folder-name-floor:3em;align-items:center;min-inline-size:0;max-inline-size:100%;display:flex}.aqmx-explorer-folder-name{flex:10000 1 var(--aqmx-folder-name-floor);text-overflow:ellipsis;white-space:nowrap;min-inline-size:0;max-inline-size:max-content;overflow:hidden}.aqmx-explorer-folder-error{min-inline-size:0;color:var(--aqmx-danger-text);text-indent:var(--aqmx-space-4);text-overflow:ellipsis;white-space:nowrap;flex:1 1 0;overflow:hidden}.aqmx-explorer-folder-retry{flex:1000000 0 calc(var(--aqmx-icon) + (var(--aqmx-space-3) + var(--aqmx-space-1)) * 2);min-inline-size:calc(var(--aqmx-icon) + (var(--aqmx-space-3) + var(--aqmx-space-1)) * 2);max-inline-size:max-content;min-block-size:var(--aqmx-control);padding:0 var(--aqmx-space-3);border:var(--aqmx-space-1) solid var(--aqmx-danger-border);border-radius:var(--aqmx-radius-s);color:var(--aqmx-danger-text);background:var(--aqmx-danger-surface);font:inherit;line-height:var(--aqmx-line-height-compact);cursor:pointer;justify-content:center;align-items:center;margin-inline-start:var(--aqmx-space-4);display:inline-flex;overflow:hidden}.aqmx-explorer-folder-retry:focus-visible{outline-offset:calc(-1 * (var(--aqmx-focus-ring-width) + var(--aqmx-space-1)))}.aqmx-explorer-folder-retry-icon{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon);flex:none}.aqmx-explorer-folder-retry-text{min-inline-size:0;text-indent:var(--aqmx-space-3);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.aqmx-explorer-tray{gap:var(--aqmx-space-4);min-block-size:calc(var(--aqmx-control) + (var(--aqmx-space-5) + var(--aqmx-space-1)) * 2);padding:var(--aqmx-space-5);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);background:var(--aqmx-surface-raised);box-shadow:var(--aqmx-shadow);flex-direction:column;flex:0 auto;display:flex;overflow-y:auto}.aqmx-explorer-tray-header{justify-content:space-between;align-items:center;gap:var(--aqmx-space-5);flex:none;display:flex}.aqmx-explorer-tray-title{margin:0;font-weight:600}.aqmx-explorer-tray-button{min-block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-5);border-radius:var(--aqmx-radius-m);color:var(--aqmx-accent);font:inherit;cursor:pointer;background:0 0;border:0;flex:none;font-weight:600}.aqmx-explorer-tray-button:hover{background:var(--aqmx-surface-sunken)}.aqmx-explorer-tray-list{gap:var(--aqmx-space-1);min-block-size:var(--aqmx-control);max-block-size:calc(var(--aqmx-control) * 3);flex:0 auto;margin:0;padding:0;list-style:none;display:grid;overflow-y:auto}.aqmx-explorer-tray-item{align-items:center;gap:var(--aqmx-space-4);display:flex}.aqmx-explorer-tray-name{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-inline-size:0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow:hidden}.aqmx-explorer-tray-open{min-block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-6);border-radius:var(--aqmx-radius-m);color:var(--aqmx-surface);background:var(--aqmx-accent);font:inherit;cursor:pointer;border:0;flex:none;font-weight:600}@media (forced-colors:active){.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true],.aqmx-explorer-tree [role=treeitem][data-entry-selected=true],.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true],.aqmx-explorer-menu-item[aria-checked=true]{forced-color-adjust:none;color:highlighttext;background:highlight}.aqmx-explorer-menu-item[aria-checked=true] *,.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true] *,.aqmx-explorer-tree [role=treeitem][data-entry-selected=true] *,.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true] *{color:inherit!important}.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true]:focus-visible,.aqmx-explorer-tree [role=treeitem][data-entry-selected=true]:focus-visible,.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true]:focus-visible{outline-color:highlighttext}.aqmx-explorer-tray-button,.aqmx-explorer-tray-open,.aqmx-explorer-tray-remove{border:var(--aqmx-space-1) solid ButtonText}}@media (prefers-reduced-motion:reduce){.aqmx-explorer-actions>.aqmx-labelled-button[data-aqmx-busy=true]>svg,.aqmx-explorer-tree-progress-icon,.aqmx-explorer-tree [role=treeitem][data-aqmx-children=loading]{animation:none}.aqmx-explorer-tree-view{transition-duration:0s!important}}.aqmx-document{contain:layout paint;--aqmd-toolbar-inset-block-start:calc(var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset));block-size:100%;min-block-size:0;inline-size:100%;min-inline-size:0;color:var(--aqmx-text);background:var(--aqmx-surface);flex-direction:column;display:flex;position:relative;overflow:hidden}.aqmx-document-viewer:has([data-aqmd-scroll-bar]){--aqmd-toolbar-inset-inline-end:calc(var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset))}.aqmx-document [data-theme]{background-color:#0000!important}.aqmx-document .markdown-body :is(sup,sub) a{outline-offset:var(--aqmx-focus-ring-offset)!important}.aqmx-document *{scroll-margin:calc(var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset))}.aqmx-document[aria-busy=true]>:not(.aqmx-progress){opacity:.618;transition:opacity var(--aqmx-duration-3) var(--aqmx-ease)}.aqmx-document-viewer{flex:1 1 0;min-block-size:0;min-inline-size:0}.aqmx-document-notice{margin:var(--aqmx-space-6) var(--aqmx-space-7) 0;overflow-wrap:anywhere;flex:none}.aqmx-document-scroll-row{flex:1 1 0;min-block-size:0}.aqmx-document-failure{min-block-size:0;padding:var(--aqmx-space-7);flex:1 1 0;overflow:auto}.aqmx-document-file{flex-direction:column;flex:1 1 0;min-block-size:0;min-inline-size:0;display:flex}.aqmx-document-toolbar{align-items:center;gap:var(--aqmx-space-3);padding:var(--aqmx-space-3) var(--aqmx-space-6);border-block-end:var(--aqmx-space-1) solid var(--aqmx-border);background:var(--aqmx-surface-raised);flex-wrap:wrap;flex:none;display:flex}.aqmx-document-file-icon{color:var(--aqmx-text-muted);flex:none;display:inline-flex}.aqmx-document-file-icon>svg{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon)}.aqmx-document-title{text-overflow:ellipsis;white-space:nowrap;flex:1 1 0;min-inline-size:0;font-weight:600;overflow:hidden}.aqmx-document-level{min-inline-size:var(--aqmx-space-9);color:var(--aqmx-text-muted);font-variant-numeric:tabular-nums;text-align:center;flex:none}.aqmx-document-canvas{min-block-size:0;padding:var(--aqmx-space-7);background-color:var(--aqmx-surface-sunken);background-image:radial-gradient(var(--aqmx-border) var(--aqmx-space-1), transparent var(--aqmx-space-1));background-size:var(--aqmx-space-6) var(--aqmx-space-6);flex:1 1 0;grid-template:minmax(0,1fr)/minmax(0,1fr);display:grid;overflow:auto}.aqmx-document-image{margin:auto;display:block}.aqmx-document-image[data-aqmx-image-mode=fit]{object-fit:contain;max-block-size:100%;max-inline-size:100%}.aqmx-document-image[data-aqmx-image-mode=level]{max-block-size:none;max-inline-size:none}.aqmx-document-stage{min-block-size:0;padding:var(--aqmx-space-7);background:var(--aqmx-surface-sunken);flex:1 1 0;grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:center;display:grid;overflow:auto}.aqmx-document-file[data-aqmx-media-type=pdf] .aqmx-document-stage{place-items:stretch stretch;padding:0}.aqmx-document-video{border-radius:var(--aqmx-radius-l);background:var(--aqmx-surface-raised);max-block-size:100%;max-inline-size:100%;box-shadow:var(--aqmx-shadow)}.aqmx-document-audio{inline-size:min(100%, var(--aqmx-column-measure))}.aqmx-document-frame{background:var(--aqmx-surface);border:0;block-size:100%;inline-size:100%}.aqmx-document-inert-link{color:var(--aqmx-text-muted);cursor:not-allowed;text-decoration-style:dotted}.aqmx-document[data-aqmx-document-flow=content]{contain:layout;block-size:auto;overflow:visible}.aqmx-document[data-aqmx-document-flow=content]>*,.aqmx-document[data-aqmx-document-flow=content] .aqmx-document-file>*{flex:none}.aqmx-document[data-aqmx-document-flow=content] .aqmx-document-frame{aspect-ratio:1/1.41421;block-size:auto}.aqmx-document-refresh-bar{flex-direction:column;flex:none;display:flex}.aqmx-document-refresh-row{padding:calc(var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset));justify-content:flex-end;align-items:center;display:flex}.aqmx-document-refresh-failure{margin:0 var(--aqmx-space-3) var(--aqmx-space-2);padding:var(--aqmx-space-4) var(--aqmx-space-5);border:var(--aqmx-space-1) solid var(--aqmx-danger-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-danger-text);background:var(--aqmx-danger-surface);line-height:var(--aqmx-line-height-compact);overflow-wrap:anywhere}.aqmx-document-refresh-row>.aqmx-icon-button[data-aqmx-busy=true]>svg{animation:aqmx-explorer-spin calc(var(--aqmx-duration-4) * 3) linear infinite}.aqmx-document-refresh-row>.aqmx-icon-button[aria-busy=true]{cursor:progress}@media (prefers-reduced-motion:reduce){.aqmx-document-refresh-row>.aqmx-icon-button[data-aqmx-busy=true]>svg{animation:none}}.aqmx-multi-stage{--aqmx-multi-panel-body-floor:calc(3rem * var(--aqmx-line-height-prose));--aqdd-stage-padding-block:var(--aqmx-space-7);--aqdd-stage-padding-inline:var(--aqmx-space-6) calc(var(--aqmx-space-6) + var(--aqmx-multi-stage-bar-gutter));--aqdd-column-gap:var(--aqmx-space-6);--aqdd-panel-surface:var(--aqmx-surface);--aqdd-panel-border:var(--aqmx-border);--aqdd-panel-title-color:var(--aqmx-text);--aqdd-header-button-color:var(--aqmx-text-muted);--aqdd-header-button-hover-color:var(--aqmx-text);--aqdd-header-button-hover-surface:var(--aqmx-surface-sunken);--aqdd-custom-badge-color:var(--aqmx-warning-text);--aqdd-custom-badge-surface:var(--aqmx-warning-surface);--aqdd-restore-button-color:var(--aqmx-surface);--aqdd-restore-button-surface:var(--aqmx-accent);--aqdd-restore-button-hover-surface:var(--aqmx-info-text);--aqdd-drop-placeholder-color:var(--aqmx-accent);--aqdd-drop-placeholder-surface:var(--aqmx-surface);--aqdd-drop-placeholder-target-surface:var(--aqmx-accent-surface);background:var(--aqmx-surface-sunken);block-size:100%;min-block-size:0;min-inline-size:0;color:var(--aqmx-text);flex-direction:column;display:flex;position:relative}.aqmx-multi-stage:focus-visible{outline:var(--aqmx-focus-ring-width) solid var(--aqmx-focus);outline-offset:calc(-1 * var(--aqmx-focus-ring-width))}.aqmx-multi-probe{inline-size:var(--aqmx-column-measure);visibility:hidden;pointer-events:none;block-size:0;font-size:1rem;position:absolute;inset-block-start:0;inset-inline-start:0;overflow:hidden}.aqmx-multi-layout{flex:auto;min-block-size:0}.aqmx-multi-skeleton{grid-template-columns:repeat(auto-fit, minmax(min(100%, var(--aqmx-column-measure)), 1fr));align-content:start;gap:var(--aqmx-space-7);padding:var(--aqmx-space-7);display:grid;overflow:hidden}.aqmx-multi-skeleton-column{border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-l);background:var(--aqmx-surface)}.aqmx-multi-column{min-inline-size:0}.aqmx-multi-panel{outline:var(--aqmx-space-1) solid var(--aqmx-border-strong);outline-offset:0;color:var(--aqmx-text)}.aqmx-multi-panel[data-maximized]{outline-color:var(--aqmx-focus)}.aqmx-multi-panel-frame{content-visibility:auto;contain-intrinsic-block-size:auto var(--aqmx-space-9);min-block-size:100%}.aqmx-multi-panel-frame:focus-visible{outline:var(--aqmx-focus-ring-width) solid var(--aqmx-focus);outline-offset:calc(-1 * var(--aqmx-focus-ring-width))}.aqmx-multi-panel-frame[data-aqmx-maximized=false]{-webkit-user-select:none;user-select:none}.aqmx-multi-panel-frame>.aqmx-document-refresh-bar{z-index:1;background:var(--aqmx-surface);position:sticky;inset-block-start:0}.aqmx-multi-panel-frame{--aqmx-multi-panel-pinned-block-size:0px}.aqmx-multi-panel-frame .aqmx-document *{scroll-margin-block-start:calc(var(--aqmx-multi-panel-pinned-block-size) + var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset))}.aqmx-multi-panel-frame .aqmx-document-toolbar>.aqmx-icon-button{flex-shrink:1;min-inline-size:0}.aqmx-multi-toast{animation:aqmx-multi-toast-in var(--aqmx-duration-3) var(--aqmx-ease)}.aqmx-multi-toast:popover-open{max-inline-size:min(34rem, calc(var(--aqmx-multi-toast-room) - var(--aqmx-space-8)));margin:0;position:fixed;inset:auto;inset-block-start:calc(var(--aqmx-multi-toast-block-start) + var(--aqmx-space-6));inset-inline-end:calc(var(--aqmx-multi-toast-inline-end) + var(--aqmx-space-7));overflow:visible}@keyframes aqmx-multi-toast-in{0%{opacity:0;translate:0 calc(var(--aqmx-space-5) * -1)}}@media (prefers-reduced-motion:reduce){.aqmx-multi-toast{animation:none}}@media (forced-colors:active){.aqmx-multi-stage:focus-visible,.aqmx-multi-stage :focus-visible,.aqmx-multi-panel[data-maximized]{outline-color:highlight}}.aqmx-split-frame{--aqmx-sheet-target:2.75rem;flex-direction:column;flex:auto;min-block-size:0;min-inline-size:0;display:flex;position:relative}.aqmx-rem-probe{visibility:hidden;pointer-events:none;block-size:0;inline-size:1rem;position:absolute;inset-block-start:0;inset-inline-start:0}.aqmx-split{flex:auto;min-block-size:0}.aqmx-split-explorer,.aqmx-split-content{background:var(--aqmx-surface);min-block-size:0}.aqmx-split-explorer{background:var(--aqmx-surface-raised)}.aqmx-split-handle{background:var(--aqmx-surface-raised);transition:background-color var(--aqmx-duration-2) var(--aqmx-ease)}.aqmx-split-handle:hover,.aqmx-split-handle:focus-visible{background:var(--aqmx-surface-sunken)}.aqmx-sheet-bar{padding:var(--aqmx-space-3) var(--aqmx-space-5);border-block-end:var(--aqmx-space-1) solid var(--aqmx-border);background:var(--aqmx-surface-raised);flex:none;align-items:center;display:flex}.aqmx-sheet-toggle,.aqmx-sheet-close{justify-content:center;align-items:center;gap:var(--aqmx-space-5);min-inline-size:var(--aqmx-sheet-target);min-block-size:var(--aqmx-sheet-target);padding:0 var(--aqmx-space-6);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-text);background:var(--aqmx-surface);font:inherit;cursor:pointer;transition:background-color var(--aqmx-duration-2) var(--aqmx-ease);display:inline-flex}.aqmx-sheet-close{z-index:1;color:var(--aqmx-text-muted);background:var(--aqmx-surface-raised);border-color:#0000;padding:0;position:relative}.aqmx-sheet-toggle:hover,.aqmx-sheet-close:hover{background:var(--aqmx-surface-sunken)}.aqmx-sheet-toggle>svg,.aqmx-sheet-close>svg{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon);flex:none}.aqmx-sheet{inline-size:min(calc(100vw - var(--aqmx-space-9)), 21rem);border:0;border-inline-end:var(--aqmx-space-1) solid var(--aqmx-border);block-size:100dvh;max-block-size:none;max-inline-size:none;color:var(--aqmx-text);background:var(--aqmx-surface-raised);box-shadow:var(--aqmx-shadow);margin:0;padding:0;position:fixed;inset-block:0;inset-inline:0 auto}.aqmx-sheet::backdrop{background:#0f172a61}.aqmx-sheet-panel{flex-direction:column;block-size:100%;display:flex}.aqmx-sheet-header{z-index:1;justify-content:flex-end;align-items:center;gap:var(--aqmx-space-3);padding:var(--aqmx-space-3);border-block-end:var(--aqmx-space-1) solid var(--aqmx-border);flex:none;display:flex;position:relative}.aqmx-sheet-notice-slot>.aqmx-toast{--aqmx-sheet-notice-band:calc(var(--aqmx-sheet-target) + var(--aqmx-space-3) * 2);--aqmx-sheet-notice-line:calc(var(--aqmx-line-height-compact) * 1em);--aqmx-sheet-notice-inset:calc((var(--aqmx-sheet-notice-band) - var(--aqmx-sheet-notice-line)) / 2);z-index:0;max-inline-size:none;padding-block:var(--aqmx-sheet-notice-inset) 0;padding-inline:var(--aqmx-space-6) var(--aqmx-space-3);border:0;border-block-end:var(--aqmx-space-1) solid var(--aqmx-warning-border);line-height:var(--aqmx-line-height-compact);overflow-wrap:anywhere;box-shadow:none;border-radius:0;position:absolute;inset-block:0 auto;inset-inline:0}.aqmx-sheet-notice-slot>.aqmx-toast:before{content:"";float:inline-end;inline-size:calc(var(--aqmx-sheet-target) + var(--aqmx-space-3));block-size:calc(var(--aqmx-sheet-notice-band) - var(--aqmx-sheet-notice-inset) - var(--aqmx-space-1))}.aqmx-sheet-notice-slot>.aqmx-toast:after{content:"";block-size:calc(var(--aqmx-sheet-notice-inset) - var(--aqmx-space-1));display:block}.aqmx-sheet-body{isolation:isolate;flex-direction:column;flex:auto;min-block-size:0;display:flex;position:relative;overflow:hidden}.aqmx-document-column{flex-direction:column;min-block-size:0;display:flex}.aqmx-document-column>.aqmx-document{flex:1 1 0;block-size:auto;min-block-size:0}.aqmx-single{flex:auto;position:relative}.aqmx-tree-document{block-size:100%;inline-size:100%}.aqmx-split-fallback,.aqmx-stage-fallback{background:var(--aqmx-surface-sunken);flex:auto;min-block-size:0}@media (forced-colors:active){.aqmx-sheet-toggle[aria-expanded=true]{forced-color-adjust:none;color:highlighttext;background:highlight}.aqmx-sheet-toggle:focus-visible,.aqmx-sheet-close:focus-visible{outline-color:highlight}.aqmx-split-handle:focus-visible{outline:var(--aqmx-focus-ring-width) solid Highlight!important;outline-offset:calc(-1 * var(--aqmx-focus-ring-width))!important}}@media (prefers-reduced-motion:reduce){.aqmx-split-handle,.aqmx-split-handle *{transition-duration:0s!important}}}@layer utilities;
|
|
3
|
+
@layer theme,base;@layer components{.aqmx-root{--aqmx-space-1:.0625rem;--aqmx-space-2:.125rem;--aqmx-space-3:.1875rem;--aqmx-space-4:.3125rem;--aqmx-space-5:.5rem;--aqmx-space-6:.8125rem;--aqmx-space-7:1.3125rem;--aqmx-space-8:2.125rem;--aqmx-space-9:3.4375rem;--aqmx-control:2.125rem;--aqmx-focus-ring-width:var(--aqmx-space-2);--aqmx-focus-ring-offset:var(--aqmx-space-2);--aqmx-icon:1rem;--aqmx-radius-s:.3125rem;--aqmx-radius-m:.5rem;--aqmx-radius-l:.8125rem;--aqmx-duration-1:89ms;--aqmx-duration-2:.144s;--aqmx-duration-3:.233s;--aqmx-duration-4:.377s;--aqmx-delay-progress:.233s;--aqmx-ease:cubic-bezier(.2, 0, 0, 1);--aqmx-font-size-body:.8125rem;--aqmx-font-size-title:1rem;--aqmx-font-size-display:1.3125rem;--aqmx-line-height-compact:1.382;--aqmx-line-height-prose:1.618;--aqmx-column-measure:40ch;--aqmx-surface:#fff;--aqmx-surface-raised:#f8fafc;--aqmx-surface-sunken:#f1f5f9;--aqmx-border:#cbd5e1;--aqmx-border-strong:#94a3b8;--aqmx-text:#0f172a;--aqmx-text-muted:#475569;--aqmx-accent:#1d4ed8;--aqmx-accent-surface:#dbeafe;--aqmx-tree-line:#64748b;--aqmx-tree-row-tint:#0f172a0f;--aqmx-tree-row-accent-tint:#2563eb29;--aqmx-focus:#2563eb;--aqmx-info-surface:#eff6ff;--aqmx-info-border:#93c5fd;--aqmx-info-text:#1e3a8a;--aqmx-warning-surface:#fffbeb;--aqmx-warning-border:#fcd34d;--aqmx-warning-text:#78350f;--aqmx-danger-surface:#fef2f2;--aqmx-danger-border:#fca5a5;--aqmx-danger-text:#7f1d1d;--aqmx-shadow:0 .0625rem .1875rem #0f172a21, 0 .3125rem .8125rem #0f172a14}.aqmx-root[data-aqmx-theme=dark]{--aqmx-surface:#0f172a;--aqmx-surface-raised:#1e293b;--aqmx-surface-sunken:#020617;--aqmx-border:#334155;--aqmx-border-strong:#64748b;--aqmx-text:#e2e8f0;--aqmx-text-muted:#94a3b8;--aqmx-accent:#93c5fd;--aqmx-accent-surface:#1e3a8a;--aqmx-tree-line:#94a3b8;--aqmx-tree-row-tint:#e2e8f00f;--aqmx-tree-row-accent-tint:#2563eb70;--aqmx-focus:#60a5fa;--aqmx-info-surface:#172554;--aqmx-info-border:#1d4ed8;--aqmx-info-text:#bfdbfe;--aqmx-warning-surface:#422006;--aqmx-warning-border:#a16207;--aqmx-warning-text:#fde68a;--aqmx-danger-surface:#450a0a;--aqmx-danger-border:#b91c1c;--aqmx-danger-text:#fecaca;--aqmx-shadow:0 .0625rem .1875rem #0000008c, 0 .3125rem .8125rem #00000057}@media (pointer:coarse){.aqmx-root{--aqmx-control:2.75rem}}@media (forced-colors:active){.aqmx-root.aqmx-root[data-aqmx-theme]{--aqmx-tree-line:CanvasText}}@media (prefers-reduced-motion:reduce){.aqmx-root{--aqmx-duration-1:0s;--aqmx-duration-2:0s;--aqmx-duration-3:0s;--aqmx-duration-4:0s}}.aqmx-root{block-size:100%;min-block-size:0;inline-size:100%;min-inline-size:0;color:var(--aqmx-text);background:var(--aqmx-surface);font-size:var(--aqmx-font-size-body);line-height:var(--aqmx-line-height-compact);flex-direction:column;display:flex;position:relative}.aqmx-root *,.aqmx-root :before,.aqmx-root :after{box-sizing:border-box}.aqmx-icon-button{inline-size:var(--aqmx-control);block-size:var(--aqmx-control);border-radius:var(--aqmx-radius-m);color:var(--aqmx-text-muted);cursor:pointer;transition:background-color var(--aqmx-duration-2) var(--aqmx-ease), color var(--aqmx-duration-2) var(--aqmx-ease);background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.aqmx-icon-button:hover{color:var(--aqmx-text);background:var(--aqmx-surface-sunken)}.aqmx-icon-button[aria-pressed=true],.aqmx-icon-button[aria-expanded=true]{color:var(--aqmx-accent);background:var(--aqmx-accent-surface)}.aqmx-icon-button:disabled{opacity:.382;cursor:not-allowed}.aqmx-icon-button[aria-disabled=true]{cursor:not-allowed}.aqmx-icon-button[aria-disabled=true]:hover{color:var(--aqmx-text-muted);background:0 0}.aqmx-icon-button>svg{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon)}.aqmx-icon-button[aria-disabled=true]>svg{opacity:.382}.aqmx-root :focus-visible{outline:var(--aqmx-focus-ring-width) solid var(--aqmx-focus);outline-offset:var(--aqmx-focus-ring-offset)}.aqmx-callout{gap:var(--aqmx-space-5);padding:var(--aqmx-space-6);border:var(--aqmx-space-1) solid var(--aqmx-info-border);border-radius:var(--aqmx-radius-l);color:var(--aqmx-info-text);background:var(--aqmx-info-surface);line-height:var(--aqmx-line-height-prose);display:grid}.aqmx-callout[data-aqmx-tone=warning]{border-color:var(--aqmx-warning-border);color:var(--aqmx-warning-text);background:var(--aqmx-warning-surface)}.aqmx-callout[data-aqmx-tone=danger]{border-color:var(--aqmx-danger-border);color:var(--aqmx-danger-text);background:var(--aqmx-danger-surface)}.aqmx-callout-title{font-size:var(--aqmx-font-size-title);font-weight:600;line-height:var(--aqmx-line-height-compact);margin:0}.aqmx-callout-body{margin:0}.aqmx-callout-action{min-block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-6);border:var(--aqmx-space-1) solid currentColor;border-radius:var(--aqmx-radius-m);color:inherit;font:inherit;cursor:pointer;background:0 0;justify-self:start;align-items:center;font-weight:600;text-decoration:none;display:inline-flex}.aqmx-progress{z-index:2;block-size:var(--aqmx-space-3);pointer-events:none;position:absolute;inset-block-start:0;inset-inline:0;overflow:hidden}.aqmx-progress:before{content:"";background:var(--aqmx-accent);inline-size:38.1966%;animation:aqmx-progress calc(var(--aqmx-duration-4) * 3) var(--aqmx-ease) infinite;position:absolute;inset-block:0}@keyframes aqmx-progress{0%{inset-inline-start:-38.1966%}to{inset-inline-start:100%}}.aqmx-empty{place-content:center;justify-items:center;gap:var(--aqmx-space-6);block-size:100%;padding:var(--aqmx-space-8);color:var(--aqmx-text-muted);text-align:center;line-height:var(--aqmx-line-height-prose);display:grid}.aqmx-empty-title{color:var(--aqmx-text);font-size:var(--aqmx-font-size-title);margin:0;font-weight:600}.aqmx-skeleton{gap:var(--aqmx-space-6);padding:var(--aqmx-space-7);display:grid}.aqmx-skeleton>span{block-size:var(--aqmx-space-6);border-radius:var(--aqmx-radius-s);background:var(--aqmx-surface-sunken);animation:aqmx-pulse calc(var(--aqmx-duration-4) * 4) ease-in-out infinite;display:block}.aqmx-skeleton>span:nth-child(3n+1){inline-size:61.8034%}.aqmx-skeleton>span:nth-child(3n+2){inline-size:100%}.aqmx-skeleton>span:nth-child(3n){inline-size:85.4102%}@keyframes aqmx-pulse{50%{opacity:.618}}.aqmx-sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.aqmx-toast{z-index:60;max-inline-size:min(34rem, calc(100% - var(--aqmx-space-8)));padding:var(--aqmx-space-5) var(--aqmx-space-6);border:var(--aqmx-space-1) solid var(--aqmx-warning-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-warning-text);background:var(--aqmx-warning-surface);box-shadow:var(--aqmx-shadow);position:absolute;inset-block-start:var(--aqmx-space-6);inset-inline-end:var(--aqmx-space-7)}@media (prefers-reduced-motion:reduce){.aqmx-progress:before,.aqmx-skeleton>span{animation:none}}@media (forced-colors:active){.aqmx-icon-button[aria-pressed=true],.aqmx-icon-button[aria-expanded=true]{forced-color-adjust:none;color:highlighttext;background:highlight}.aqmx-icon-button[aria-disabled=true]{color:graytext}.aqmx-root :focus-visible{outline-color:highlight}.aqmx-progress:before{forced-color-adjust:none;background:highlight}.aqmx-skeleton>span{forced-color-adjust:none;background:graytext}}.aqmx-explorer{gap:var(--aqmx-space-5);block-size:100%;min-block-size:0;min-inline-size:0;padding:var(--aqmx-space-4);color:var(--aqmx-text);background:var(--aqmx-surface);flex-direction:column;display:flex;position:relative;overflow-y:auto}.aqmx-explorer-header{align-items:center;gap:var(--aqmx-space-4);min-block-size:var(--aqmx-control);flex-wrap:wrap;flex:none;display:flex}.aqmx-explorer-source{min-inline-size:min(100%,9rem);block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-5);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-text);background:var(--aqmx-surface-raised);font:inherit;text-overflow:ellipsis;cursor:pointer;flex:9rem}.aqmx-explorer-actions{justify-content:flex-end;align-items:center;gap:var(--aqmx-space-2);flex-wrap:wrap;flex:0 auto;min-inline-size:0;margin-inline-start:auto;display:flex}.aqmx-explorer-body{gap:var(--aqmx-space-5);flex-direction:column;flex:1 1 0;min-block-size:0;min-inline-size:0;display:flex;position:relative}.aqmx-labelled-button{gap:var(--aqmx-space-2);min-inline-size:var(--aqmx-control);inline-size:auto;padding-inline:var(--aqmx-space-3);white-space:nowrap;flex:0 auto;display:inline-flex}.aqmx-labelled-button>svg{flex:none}.aqmx-labelled-button>span{text-overflow:ellipsis;min-inline-size:0;overflow:hidden}.aqmx-explorer-refresh-failure,.aqmx-explorer-expand-all-stop{padding:var(--aqmx-space-4) var(--aqmx-space-5);border:var(--aqmx-space-1) solid;border-radius:var(--aqmx-radius-m);line-height:var(--aqmx-line-height-compact);overflow-wrap:anywhere;flex:none;margin:0}.aqmx-explorer-refresh-failure{border-color:var(--aqmx-danger-border);color:var(--aqmx-danger-text);background:var(--aqmx-danger-surface)}.aqmx-explorer-expand-all-stop{border-color:var(--aqmx-info-border);color:var(--aqmx-info-text);background:var(--aqmx-info-surface)}.aqmx-explorer-actions>.aqmx-labelled-button[data-aqmx-busy=true]>svg{animation:aqmx-explorer-spin calc(var(--aqmx-duration-4) * 3) linear infinite}@keyframes aqmx-explorer-spin{to{rotate:1turn}}.aqmx-explorer-actions>.aqmx-icon-button[aria-busy=true]{cursor:progress}.aqmx-explorer-menu{z-index:50;gap:var(--aqmx-space-1);max-block-size:100%;inline-size:min(21rem,100%);padding:var(--aqmx-space-3);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);background:var(--aqmx-surface-raised);box-shadow:var(--aqmx-shadow);display:grid;position:absolute;inset-block-start:0;inset-inline-end:0;overflow-y:auto}.aqmx-explorer-menu-item{align-items:center;gap:var(--aqmx-space-5);inline-size:100%;min-block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-5);border-radius:var(--aqmx-radius-s);color:var(--aqmx-text);font:inherit;text-align:start;cursor:pointer;transition:background-color var(--aqmx-duration-1) var(--aqmx-ease);background:0 0;border:0;display:flex}.aqmx-explorer-menu-item:hover,.aqmx-explorer-menu-item:focus-visible{background:var(--aqmx-surface-sunken)}.aqmx-explorer-menu-icon{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon);color:var(--aqmx-text-muted);flex:none}.aqmx-explorer-menu-name{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-inline-size:0;overflow:hidden}.aqmx-explorer-menu-value{color:var(--aqmx-accent);font-variant-numeric:tabular-nums;flex:none;font-weight:600}.aqmx-explorer-notices{gap:var(--aqmx-space-5);flex:none;display:grid}.aqmx-explorer-tree-area{min-block-size:calc(var(--aqmx-control) * 3);flex-direction:column;flex:1 1 0;min-inline-size:0;display:flex;position:relative}.aqmx-explorer-tree{flex:1 1 0;min-block-size:0;position:relative}.aqmx-explorer-tree-view{block-size:100%}.aqmx-explorer-tree-progress{z-index:1;align-items:center;gap:var(--aqmx-space-2) var(--aqmx-space-4);max-inline-size:calc(100% - var(--aqmx-space-5) * 3);padding:var(--aqmx-space-3) var(--aqmx-space-5);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-text-muted);background:var(--aqmx-surface-raised);box-shadow:var(--aqmx-shadow);line-height:var(--aqmx-line-height-compact);overflow-wrap:anywhere;pointer-events:none;animation:aqmx-appear var(--aqmx-duration-2) ease-out var(--aqmx-delay-progress) both;flex-wrap:wrap;margin:0;display:flex;position:absolute;inset-block-end:var(--aqmx-space-9);inset-inline-start:var(--aqmx-space-5)}.aqmx-explorer-tree-progress-icon{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon);animation:aqmx-explorer-spin calc(var(--aqmx-duration-4) * 3) linear infinite;flex:none}@keyframes aqmx-appear{0%{opacity:0}}.aqmx-explorer-tree-probe{inline-size:0;block-size:var(--aqmx-control);visibility:hidden;pointer-events:none;color:var(--aqmx-tree-line);forced-color-adjust:none;position:absolute;inset-block-start:0;inset-inline-start:0;overflow:hidden}.aqmx-explorer-loading{gap:var(--aqmx-space-5);padding:var(--aqmx-space-6) var(--aqmx-space-5);color:var(--aqmx-text-muted);display:grid}.aqmx-explorer-loading-text{margin:0}.aqmx-explorer-loading>.aqmx-skeleton{padding:0}.aqmx-explorer-tree-message{padding:var(--aqmx-space-5);overflow-y:auto}.aqmx-explorer-empty-icon{inline-size:var(--aqmx-space-8);block-size:var(--aqmx-space-8);color:var(--aqmx-border-strong)}.aqmx-explorer-empty-body{margin:0}.aqmx-explorer-tree [role=treeitem]{border-radius:var(--aqmx-radius-s);color:var(--aqmx-text);transition:background-color var(--aqmx-duration-1) var(--aqmx-ease)}.aqmx-explorer-tree [role=treeitem]:hover{color:var(--aqmx-text);background:var(--aqmx-tree-row-tint)}.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true]{color:var(--aqmx-text);background:var(--aqmx-tree-row-tint);box-shadow:inset var(--aqmx-space-2) 0 0 currentColor}.aqmx-explorer-tree [role=treeitem][data-entry-selected=true],.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true]{color:var(--aqmx-accent);background:var(--aqmx-tree-row-accent-tint)}.aqmx-explorer-tree [role=treeitem]:focus-visible{outline-offset:calc(-1 * var(--aqmx-focus-ring-width))}.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true]:focus-visible{box-shadow:inset calc(var(--aqmx-space-2) + var(--aqmx-focus-ring-width)) 0 0 currentColor}.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true]{font-weight:600}.aqmx-explorer-tree [role=treeitem][data-aqmx-children=loading]{animation:aqmx-pulse calc(var(--aqmx-duration-4) * 4) ease-in-out infinite}.aqmx-explorer-tree [role=treeitem][data-aqmx-loop]{color:var(--aqmx-text-muted);font-style:italic}.aqmx-explorer-folder-failed{--aqmx-folder-name-floor:3em;align-items:center;min-inline-size:0;max-inline-size:100%;display:flex}.aqmx-explorer-folder-name{flex:10000 1 var(--aqmx-folder-name-floor);text-overflow:ellipsis;white-space:nowrap;min-inline-size:0;max-inline-size:max-content;overflow:hidden}.aqmx-explorer-folder-error{min-inline-size:0;color:var(--aqmx-danger-text);text-indent:var(--aqmx-space-4);text-overflow:ellipsis;white-space:nowrap;flex:1 1 0;overflow:hidden}.aqmx-explorer-folder-retry{flex:1000000 0 calc(var(--aqmx-icon) + (var(--aqmx-space-3) + var(--aqmx-space-1)) * 2);min-inline-size:calc(var(--aqmx-icon) + (var(--aqmx-space-3) + var(--aqmx-space-1)) * 2);max-inline-size:max-content;min-block-size:var(--aqmx-control);padding:0 var(--aqmx-space-3);border:var(--aqmx-space-1) solid var(--aqmx-danger-border);border-radius:var(--aqmx-radius-s);color:var(--aqmx-danger-text);background:var(--aqmx-danger-surface);font:inherit;line-height:var(--aqmx-line-height-compact);cursor:pointer;justify-content:center;align-items:center;margin-inline-start:var(--aqmx-space-4);display:inline-flex;overflow:hidden}.aqmx-explorer-folder-retry:focus-visible{outline-offset:calc(-1 * (var(--aqmx-focus-ring-width) + var(--aqmx-space-1)))}.aqmx-explorer-folder-retry-icon{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon);flex:none}.aqmx-explorer-folder-retry-text{min-inline-size:0;text-indent:var(--aqmx-space-3);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.aqmx-explorer-tray{gap:var(--aqmx-space-4);min-block-size:calc(var(--aqmx-control) + (var(--aqmx-space-5) + var(--aqmx-space-1)) * 2);padding:var(--aqmx-space-5);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);background:var(--aqmx-surface-raised);box-shadow:var(--aqmx-shadow);flex-direction:column;flex:0 auto;display:flex;overflow-y:auto}.aqmx-explorer-tray-header{justify-content:space-between;align-items:center;gap:var(--aqmx-space-5);flex:none;display:flex}.aqmx-explorer-tray-title{margin:0;font-weight:600}.aqmx-explorer-tray-button{min-block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-5);border-radius:var(--aqmx-radius-m);color:var(--aqmx-accent);font:inherit;cursor:pointer;background:0 0;border:0;flex:none;font-weight:600}.aqmx-explorer-tray-button:hover{background:var(--aqmx-surface-sunken)}.aqmx-explorer-tray-list{gap:var(--aqmx-space-1);min-block-size:var(--aqmx-control);max-block-size:calc(var(--aqmx-control) * 3);flex:0 auto;margin:0;padding:0;list-style:none;display:grid;overflow-y:auto}.aqmx-explorer-tray-item{align-items:center;gap:var(--aqmx-space-4);display:flex}.aqmx-explorer-tray-name{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-inline-size:0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow:hidden}.aqmx-explorer-tray-open{min-block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-6);border-radius:var(--aqmx-radius-m);color:var(--aqmx-surface);background:var(--aqmx-accent);font:inherit;cursor:pointer;border:0;flex:none;font-weight:600}@media (forced-colors:active){.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true],.aqmx-explorer-tree [role=treeitem][data-entry-selected=true],.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true],.aqmx-explorer-menu-item[aria-checked=true]{forced-color-adjust:none;color:highlighttext;background:highlight}.aqmx-explorer-menu-item[aria-checked=true] *,.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true] *,.aqmx-explorer-tree [role=treeitem][data-entry-selected=true] *,.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true] *{color:inherit!important}.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true]:focus-visible,.aqmx-explorer-tree [role=treeitem][data-entry-selected=true]:focus-visible,.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true]:focus-visible{outline-color:highlighttext}.aqmx-explorer-tray-button,.aqmx-explorer-tray-open,.aqmx-explorer-tray-remove{border:var(--aqmx-space-1) solid ButtonText}}@media (prefers-reduced-motion:reduce){.aqmx-explorer-actions>.aqmx-labelled-button[data-aqmx-busy=true]>svg,.aqmx-explorer-tree-progress-icon,.aqmx-explorer-tree [role=treeitem][data-aqmx-children=loading]{animation:none}.aqmx-explorer-tree-view{transition-duration:0s!important}}.aqmx-document{contain:layout paint;--aqmd-toolbar-inset-block-start:calc(var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset));block-size:100%;min-block-size:0;inline-size:100%;min-inline-size:0;color:var(--aqmx-text);background:var(--aqmx-surface);flex-direction:column;display:flex;position:relative;overflow:hidden}.aqmx-document-viewer:has([data-aqmd-scroll-bar]){--aqmd-toolbar-inset-inline-end:calc(var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset))}.aqmx-document [data-theme]{background-color:#0000!important}.aqmx-document .markdown-body :is(sup,sub) a{outline-offset:var(--aqmx-focus-ring-offset)!important}.aqmx-document *{scroll-margin:calc(var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset))}.aqmx-document[aria-busy=true]>:not(.aqmx-progress){opacity:.618;transition:opacity var(--aqmx-duration-3) var(--aqmx-ease)}.aqmx-document-viewer{flex:1 1 0;min-block-size:0;min-inline-size:0}.aqmx-document-notice{margin:var(--aqmx-space-6) var(--aqmx-space-7) 0;overflow-wrap:anywhere;flex:none}.aqmx-document-scroll-row{flex:1 1 0;min-block-size:0}.aqmx-document-failure{min-block-size:0;padding:var(--aqmx-space-7);flex:1 1 0;overflow:auto}.aqmx-document-file{flex-direction:column;flex:1 1 0;min-block-size:0;min-inline-size:0;display:flex}.aqmx-document-toolbar{align-items:center;gap:var(--aqmx-space-3);padding:var(--aqmx-space-3) var(--aqmx-space-6);border-block-end:var(--aqmx-space-1) solid var(--aqmx-border);background:var(--aqmx-surface-raised);flex-wrap:wrap;flex:none;display:flex}.aqmx-document-file-icon{color:var(--aqmx-text-muted);flex:none;display:inline-flex}.aqmx-document-file-icon>svg{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon)}.aqmx-document-title{text-overflow:ellipsis;white-space:nowrap;flex:1 1 0;min-inline-size:0;font-weight:600;overflow:hidden}.aqmx-document-level{min-inline-size:var(--aqmx-space-9);color:var(--aqmx-text-muted);font-variant-numeric:tabular-nums;text-align:center;flex:none}.aqmx-document-canvas{min-block-size:0;padding:var(--aqmx-space-7);background-color:var(--aqmx-surface-sunken);background-image:radial-gradient(var(--aqmx-border) var(--aqmx-space-1), transparent var(--aqmx-space-1));background-size:var(--aqmx-space-6) var(--aqmx-space-6);flex:1 1 0;grid-template:minmax(0,1fr)/minmax(0,1fr);display:grid;overflow:auto}.aqmx-document-image{margin:auto;display:block}.aqmx-document-image[data-aqmx-image-mode=fit]{object-fit:contain;max-block-size:100%;max-inline-size:100%}.aqmx-document-image[data-aqmx-image-mode=level]{max-block-size:none;max-inline-size:none}.aqmx-document-stage{min-block-size:0;padding:var(--aqmx-space-7);background:var(--aqmx-surface-sunken);flex:1 1 0;grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:center;display:grid;overflow:auto}.aqmx-document-file[data-aqmx-media-type=pdf] .aqmx-document-stage{place-items:stretch stretch;padding:0}.aqmx-document-video{border-radius:var(--aqmx-radius-l);background:var(--aqmx-surface-raised);max-block-size:100%;max-inline-size:100%;box-shadow:var(--aqmx-shadow)}.aqmx-document-audio{inline-size:min(100%, var(--aqmx-column-measure))}.aqmx-document-frame{background:var(--aqmx-surface);border:0;block-size:100%;inline-size:100%}.aqmx-document-inert-link{color:var(--aqmx-text-muted);cursor:not-allowed;text-decoration-style:dotted}.aqmx-document[data-aqmx-document-flow=content]{contain:layout;block-size:auto;overflow:visible}.aqmx-document[data-aqmx-document-flow=content]>*,.aqmx-document[data-aqmx-document-flow=content] .aqmx-document-file>*{flex:none}.aqmx-document[data-aqmx-document-flow=content] .aqmx-document-frame{aspect-ratio:1/1.41421;block-size:auto}.aqmx-document-refresh-bar{flex-direction:column;flex:none;display:flex}.aqmx-document-refresh-row{justify-content:flex-end;align-items:center;gap:var(--aqmx-space-2);padding:calc(var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset));display:flex}.aqmx-document-refresh-failure{margin:0 var(--aqmx-space-3) var(--aqmx-space-2);padding:var(--aqmx-space-4) var(--aqmx-space-5);border:var(--aqmx-space-1) solid var(--aqmx-danger-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-danger-text);background:var(--aqmx-danger-surface);line-height:var(--aqmx-line-height-compact);overflow-wrap:anywhere}.aqmx-document-refresh-row>.aqmx-icon-button[data-aqmx-busy=true]>svg{animation:aqmx-explorer-spin calc(var(--aqmx-duration-4) * 3) linear infinite}.aqmx-document-refresh-row>.aqmx-icon-button[aria-busy=true]{cursor:progress}@media (prefers-reduced-motion:reduce){.aqmx-document-refresh-row>.aqmx-icon-button[data-aqmx-busy=true]>svg{animation:none}}.aqmx-multi-stage{--aqmx-multi-panel-body-floor:calc(3rem * var(--aqmx-line-height-prose));--aqdd-stage-padding-block:var(--aqmx-space-7);--aqdd-stage-padding-inline:var(--aqmx-space-6) calc(var(--aqmx-space-6) + var(--aqmx-multi-stage-bar-gutter));--aqdd-column-gap:var(--aqmx-space-6);--aqdd-panel-surface:var(--aqmx-surface);--aqdd-panel-border:var(--aqmx-border);--aqdd-panel-title-color:var(--aqmx-text);--aqdd-header-button-color:var(--aqmx-text-muted);--aqdd-header-button-hover-color:var(--aqmx-text);--aqdd-header-button-hover-surface:var(--aqmx-surface-sunken);--aqdd-custom-badge-color:var(--aqmx-warning-text);--aqdd-custom-badge-surface:var(--aqmx-warning-surface);--aqdd-restore-button-color:var(--aqmx-surface);--aqdd-restore-button-surface:var(--aqmx-accent);--aqdd-restore-button-hover-surface:var(--aqmx-info-text);--aqdd-drop-placeholder-color:var(--aqmx-accent);--aqdd-drop-placeholder-surface:var(--aqmx-surface);--aqdd-drop-placeholder-target-surface:var(--aqmx-accent-surface);background:var(--aqmx-surface-sunken);block-size:100%;min-block-size:0;min-inline-size:0;color:var(--aqmx-text);flex-direction:column;display:flex;position:relative}.aqmx-multi-stage:focus-visible{outline:var(--aqmx-focus-ring-width) solid var(--aqmx-focus);outline-offset:calc(-1 * var(--aqmx-focus-ring-width))}.aqmx-multi-probe{inline-size:var(--aqmx-column-measure);visibility:hidden;pointer-events:none;block-size:0;font-size:1rem;position:absolute;inset-block-start:0;inset-inline-start:0;overflow:hidden}.aqmx-multi-layout{flex:auto;min-block-size:0}.aqmx-multi-skeleton{grid-template-columns:repeat(auto-fit, minmax(min(100%, var(--aqmx-column-measure)), 1fr));align-content:start;gap:var(--aqmx-space-7);padding:var(--aqmx-space-7);display:grid;overflow:hidden}.aqmx-multi-skeleton-column{border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-l);background:var(--aqmx-surface)}.aqmx-multi-column{min-inline-size:0}.aqmx-multi-panel{outline:var(--aqmx-space-1) solid var(--aqmx-border-strong);outline-offset:0;color:var(--aqmx-text)}.aqmx-multi-panel[data-maximized]{outline-color:var(--aqmx-focus)}.aqmx-multi-panel-frame{content-visibility:auto;contain-intrinsic-block-size:auto var(--aqmx-space-9);min-block-size:100%}.aqmx-multi-panel-frame:focus-visible{outline:var(--aqmx-focus-ring-width) solid var(--aqmx-focus);outline-offset:calc(-1 * var(--aqmx-focus-ring-width))}.aqmx-multi-panel-frame[data-aqmx-maximized=false]{-webkit-user-select:none;user-select:none}.aqmx-multi-panel-frame>.aqmx-document-refresh-bar{z-index:1;background:var(--aqmx-surface);position:sticky;inset-block-start:0}.aqmx-multi-panel-frame{--aqmx-multi-panel-pinned-block-size:0px}.aqmx-multi-panel-frame .aqmx-document *{scroll-margin-block-start:calc(var(--aqmx-multi-panel-pinned-block-size) + var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset))}.aqmx-multi-panel-frame .aqmx-document-toolbar>.aqmx-icon-button{flex-shrink:1;min-inline-size:0}.aqmx-multi-toast{animation:aqmx-multi-toast-in var(--aqmx-duration-3) var(--aqmx-ease)}.aqmx-multi-toast:popover-open{max-inline-size:min(34rem, calc(var(--aqmx-multi-toast-room) - var(--aqmx-space-8)));margin:0;position:fixed;inset:auto;inset-block-start:calc(var(--aqmx-multi-toast-block-start) + var(--aqmx-space-6));inset-inline-end:calc(var(--aqmx-multi-toast-inline-end) + var(--aqmx-space-7));overflow:visible}@keyframes aqmx-multi-toast-in{0%{opacity:0;translate:0 calc(var(--aqmx-space-5) * -1)}}@media (prefers-reduced-motion:reduce){.aqmx-multi-toast{animation:none}}@media (forced-colors:active){.aqmx-multi-stage:focus-visible,.aqmx-multi-stage :focus-visible,.aqmx-multi-panel[data-maximized]{outline-color:highlight}}.aqmx-split-frame{--aqmx-sheet-target:2.75rem;flex-direction:column;flex:auto;min-block-size:0;min-inline-size:0;display:flex;position:relative}.aqmx-rem-probe{visibility:hidden;pointer-events:none;block-size:0;inline-size:1rem;position:absolute;inset-block-start:0;inset-inline-start:0}.aqmx-split{flex:auto;min-block-size:0}.aqmx-split-explorer,.aqmx-split-content{background:var(--aqmx-surface);min-block-size:0}.aqmx-split-explorer{background:var(--aqmx-surface-raised)}.aqmx-split-handle{background:var(--aqmx-surface-raised);transition:background-color var(--aqmx-duration-2) var(--aqmx-ease)}.aqmx-split-handle:hover,.aqmx-split-handle:focus-visible{background:var(--aqmx-surface-sunken)}.aqmx-sheet-bar{padding:var(--aqmx-space-3) var(--aqmx-space-5);border-block-end:var(--aqmx-space-1) solid var(--aqmx-border);background:var(--aqmx-surface-raised);flex:none;align-items:center;display:flex}.aqmx-sheet-toggle,.aqmx-sheet-close{justify-content:center;align-items:center;gap:var(--aqmx-space-5);min-inline-size:var(--aqmx-sheet-target);min-block-size:var(--aqmx-sheet-target);padding:0 var(--aqmx-space-6);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-text);background:var(--aqmx-surface);font:inherit;cursor:pointer;transition:background-color var(--aqmx-duration-2) var(--aqmx-ease);display:inline-flex}.aqmx-sheet-close{z-index:1;color:var(--aqmx-text-muted);background:var(--aqmx-surface-raised);border-color:#0000;padding:0;position:relative}.aqmx-sheet-toggle:hover,.aqmx-sheet-close:hover{background:var(--aqmx-surface-sunken)}.aqmx-sheet-toggle>svg,.aqmx-sheet-close>svg{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon);flex:none}.aqmx-sheet{inline-size:min(calc(100vw - var(--aqmx-space-9)), 21rem);border:0;border-inline-end:var(--aqmx-space-1) solid var(--aqmx-border);block-size:100dvh;max-block-size:none;max-inline-size:none;color:var(--aqmx-text);background:var(--aqmx-surface-raised);box-shadow:var(--aqmx-shadow);margin:0;padding:0;position:fixed;inset-block:0;inset-inline:0 auto}.aqmx-sheet::backdrop{background:#0f172a61}.aqmx-sheet-panel{flex-direction:column;block-size:100%;display:flex}.aqmx-sheet-header{z-index:1;justify-content:flex-end;align-items:center;gap:var(--aqmx-space-3);padding:var(--aqmx-space-3);border-block-end:var(--aqmx-space-1) solid var(--aqmx-border);flex:none;display:flex;position:relative}.aqmx-sheet-notice-slot>.aqmx-toast{--aqmx-sheet-notice-band:calc(var(--aqmx-sheet-target) + var(--aqmx-space-3) * 2);--aqmx-sheet-notice-line:calc(var(--aqmx-line-height-compact) * 1em);--aqmx-sheet-notice-inset:calc((var(--aqmx-sheet-notice-band) - var(--aqmx-sheet-notice-line)) / 2);z-index:0;max-inline-size:none;padding-block:var(--aqmx-sheet-notice-inset) 0;padding-inline:var(--aqmx-space-6) var(--aqmx-space-3);border:0;border-block-end:var(--aqmx-space-1) solid var(--aqmx-warning-border);line-height:var(--aqmx-line-height-compact);overflow-wrap:anywhere;box-shadow:none;border-radius:0;position:absolute;inset-block:0 auto;inset-inline:0}.aqmx-sheet-notice-slot>.aqmx-toast:before{content:"";float:inline-end;inline-size:calc(var(--aqmx-sheet-target) + var(--aqmx-space-3));block-size:calc(var(--aqmx-sheet-notice-band) - var(--aqmx-sheet-notice-inset) - var(--aqmx-space-1))}.aqmx-sheet-notice-slot>.aqmx-toast:after{content:"";block-size:calc(var(--aqmx-sheet-notice-inset) - var(--aqmx-space-1));display:block}.aqmx-sheet-body{isolation:isolate;flex-direction:column;flex:auto;min-block-size:0;display:flex;position:relative;overflow:hidden}.aqmx-document-column{flex-direction:column;min-block-size:0;display:flex}.aqmx-document-column>.aqmx-document{flex:1 1 0;block-size:auto;min-block-size:0}.aqmx-single{flex:auto;position:relative}.aqmx-tree-document{block-size:100%;inline-size:100%}.aqmx-split-fallback,.aqmx-stage-fallback{background:var(--aqmx-surface-sunken);flex:auto;min-block-size:0}@media (forced-colors:active){.aqmx-sheet-toggle[aria-expanded=true]{forced-color-adjust:none;color:highlighttext;background:highlight}.aqmx-sheet-toggle:focus-visible,.aqmx-sheet-close:focus-visible{outline-color:highlight}.aqmx-split-handle:focus-visible{outline:var(--aqmx-focus-ring-width) solid Highlight!important;outline-offset:calc(-1 * var(--aqmx-focus-ring-width))!important}}@media (prefers-reduced-motion:reduce){.aqmx-split-handle,.aqmx-split-handle *{transition-duration:0s!important}}}@layer utilities;
|
|
@@ -18,7 +18,8 @@ Tests and host styling may rely on the `data-testid` values and `data-aqmx-*` at
|
|
|
18
18
|
| `data-testid="markdown-explorer-sheet-announcer"` | The sheet's polite live region (`role="status"`), inside the dialog | Holds the announcements while the sheet is open (the modal dialog hides the root's region), with the same text as the root's region would; empty while the sheet is closed and when it opens |
|
|
19
19
|
| `data-testid="markdown-explorer-split-loading"` | Placeholder while the tree view's code loads | |
|
|
20
20
|
| `data-testid="markdown-explorer-single"` | Single view frame | |
|
|
21
|
-
| `data-testid="markdown-explorer-document-refresh-bar"` | The document refresh bar | In the tree and single views, above the document region (the button at its inline end; absent while the tree view shows no document); in the multi view, the first row of each panel's body, inside the panel's scroll area and pinned (sticky) to its top while the document scrolls under it. Holds the button row and, below it, the failure notice |
|
|
21
|
+
| `data-testid="markdown-explorer-document-refresh-bar"` | The document refresh bar | In the tree and single views, above the document region (the button at its inline end; absent while the tree view shows no document); in the multi view, the first row of each panel's body, inside the panel's scroll area and pinned (sticky) to its top while the document scrolls under it. Holds the button row (the Source toggle while the document is Markdown, then the Refresh document button) and, below it, the failure notice |
|
|
22
|
+
| `data-testid="markdown-explorer-document-markup"` | The Source toggle, in the bar before Refresh document | Shown only while the bar's document is a loaded Markdown document. A toggle button: `aria-pressed="true"` while the document shows as written (its source), `"false"` while it shows rendered; a press switches the reader's choice for that document, which every view follows while the explorer is open and which is never saved. The page views name it by its visible label (`showMarkupLabel`; tooltip `showMarkup`); a panel's is icon-only, with `aria-label` and `title` set to `showMarkupNamed` (the panel title) |
|
|
22
23
|
| `data-testid="markdown-explorer-document-refresh"` | The Refresh document button, in the bar | Reads that document alone again past the host's caches. The page views name it by its visible label (`refreshDocumentLabel`; tooltip `refreshDocument`); a panel's is icon-only, with `aria-label` and `title` set to `refreshDocumentNamed` (the panel title). Carries `aria-busy="true"` and `data-aqmx-busy="true"` while it runs, and `aria-disabled="true"` then and while the document loads (never `disabled`) |
|
|
23
24
|
| `data-testid="markdown-explorer-document-refresh-failure"` | Notice of a document refresh that failed, inside the bar below its button row | No live role (the announcer speaks the same text); carries `data-aqmx-failure` (the reason). Shown while the copy of the document it kept stays on screen: a newer answer that replaces or confirms that copy, a move to another document (it does not come back on return) and that control's next refresh take it down |
|
|
24
25
|
| `data-aqmx-key-repeat="allow"` | A control inside the explorer, or an element around controls | Opts the control (or every control inside the element) in to the key repeat of a held Enter, which the explorer otherwise ignores: a press of Enter that began on the control keeps activating it once per repeat while the focus stays there, and a press that began elsewhere and handed the focus to it does not (see [Held keys](layout.md#held-keys)); the explorer sets it on Zoom in and Zoom out |
|
|
@@ -57,12 +58,14 @@ The tree is named by `treeRegion`, apart from the explorer `nav` (`explorerRegio
|
|
|
57
58
|
|
|
58
59
|
| Hook | Element | Meaning |
|
|
59
60
|
| --- | --- | --- |
|
|
60
|
-
| `data-testid="markdown-explorer-document"` | Document region (`role="region"`) | Carries `data-aqmx-document-kind`: `empty`, `loading`, `markdown`, `text`, `image`, `media`, `file` or `failure`. Named by `documentRegion` in the tree and single views, and in a multi-view panel by the document's name (the last segment of its path before it loads and for a failure). Not focusable: after a click in a document's text, PageDown, the arrow keys, Space, Home and End scroll the document |
|
|
61
|
+
| `data-testid="markdown-explorer-document"` | Document region (`role="region"`) | Carries `data-aqmx-document-kind`: `empty`, `loading`, `markdown`, `text`, `image`, `media`, `file` or `failure`. A Markdown document's region also carries `data-aqmx-document-view`: `rendered`, or `markup` while it shows as written (the Source toggle). Named by `documentRegion` in the tree and single views, and in a multi-view panel by the document's name (the last segment of its path before it loads and for a failure). Not focusable: after a click in a document's text, PageDown, the arrow keys, Space, Home and End scroll the document |
|
|
61
62
|
| `data-testid="markdown-explorer-document-empty"` | No document selected | |
|
|
62
63
|
| `data-testid="markdown-explorer-document-skeleton"` | Placeholder while a pane has no document to show yet (its first document, or one the server gave up on) | The region carries `aria-busy="true"` |
|
|
63
64
|
| `data-testid="markdown-explorer-document-progress"` | Progress bar while the next document (or a fresh copy of a failed one) loads over the one still shown | The region carries `aria-busy="true"` meanwhile, also during router navigations |
|
|
64
65
|
| `data-testid="markdown-explorer-document-failure"` | Document failure | Carries `data-aqmx-failure` (the reason); its callout has no role in every view (tree, single and multi-view panels): the announcer speaks the failure (`documentFailed`), once for each failed attempt |
|
|
65
|
-
| `data-testid="markdown-explorer-text-truncated"` | Notice under a cut text preview | |
|
|
66
|
+
| `data-testid="markdown-explorer-text-truncated"` | Notice under a cut text preview, or a cut source of a Markdown document shown as written | |
|
|
67
|
+
| `data-testid="markdown-explorer-markup-skeleton"` | Placeholder while the source of a Markdown document shown as written loads (until its first answer) | Hidden from assistive technology; the region holds the screen-reader text `markupLoading` beside it |
|
|
68
|
+
| `data-testid="markdown-explorer-markup-failure"` | Failure to read the source of a Markdown document shown as written | Carries `data-aqmx-failure` (the reason); its callout has no role: the announcer speaks the failure (`documentFailed`), once for each answer. A `failed` read offers Try again (`retry`) |
|
|
66
69
|
| `data-testid="markdown-explorer-image-view"` | Image viewer | |
|
|
67
70
|
| `data-testid="markdown-explorer-image-canvas"` | The image's scroll area | The element that scrolls. In the tree and single views it sits in `@aiquants/markdown`'s HostedScrollArea row (`data-aqmd-scroll-row`, inside its clipping cell `data-aqmd-scroll-clip`), whose bar slot (`data-aqmd-scroll-bar`) holds the explorer's pointer scroll bar; so do a medium's and a file view's stage and the failure view (`data-aqmx-document-scroller`). In a multi-view panel they have no row |
|
|
68
71
|
| `data-testid="markdown-explorer-image"` | The image (`img`) | Carries `data-aqmx-image-mode` (`fit` / `level`) |
|
package/docs/behavior/layout.md
CHANGED
|
@@ -139,6 +139,12 @@ Documents in the multi-panel view sit in `multiView.columns` logical columns (4
|
|
|
139
139
|
The region itself never takes focus, and focus outside the region, focus that was never in it, and focus the reader moved away from it are never taken. The reader moves it away by moving it to an element or into a frame outside the region, or by pressing anywhere outside the region — whenever the press happens, also after the focus had already fallen to the page, and whether or not the press moves the focus — unless the focus stays inside the region (a press whose default action the page prevented).
|
|
140
140
|
Focus that fell from the region to the page while the reader stayed with it (a press on the document's text, the browser's own fragment navigation, the focused content removed, the window losing the focus to another window or application) counts as inside.
|
|
141
141
|
So does focus in a frame inside the region (a PDF document's frame, an embedded frame of `iframeHosts`), also when it entered the frame straight from outside the region (a click from the tree, Tab), and a press outside the region moves it away from there as well.
|
|
142
|
+
- **Source of a Markdown document.** While the bar's document is a loaded Markdown document, the bar's button row holds a Source toggle before Refresh document: a toggle button (`aria-pressed`) labelled like its neighbour — visible text beside a page view's pane (`showMarkupLabel`, «Source» / 「ソース」, its accessible name; its tooltip is `showMarkup`), icon-only in a panel and named after the panel's document (`showMarkupNamed`, «Source of a.md» / 「a.md のソース」).
|
|
143
|
+
An image, media, text or file document and a failure show no toggle, and neither does a document still loading, which gets it once it is there.
|
|
144
|
+
Pressing it shows the document as written instead of rendered, in place and without moving the focus from the toggle: the pane reads the document's file through the data route's `text` operation (only once the toggle is pressed) and shows the text the way it shows a text file — the file header with Open and Download, the note `textTruncated` when the server cut the file at its `textMaxBytes`, and the text, which wraps and is never interpreted.
|
|
145
|
+
Until the first answer the region shows a skeleton (`markupLoading` for screen readers); a failure shows the failure callout, with Try again for a `failed` read, and is announced once (`documentFailed`), like a document's.
|
|
146
|
+
Every new answer for the document — Refresh document, Refresh tree, a background revalidation — reads the text again, the previous text staying on screen meanwhile. The next press shows the document rendered again.
|
|
147
|
+
The choice belongs to the reader and to the document, not to the view: every view that shows the document (the tree and single views' pane, a multi-view panel) shows it the same way, a document the reader comes back to keeps it, another document shows rendered until the reader chooses its source, and nothing is saved, so a reload (or another reader) starts with every document rendered. The region tells which way a Markdown document shows with `data-aqmx-document-view` (`rendered` / `markup`).
|
|
142
148
|
|
|
143
149
|
## Switching views
|
|
144
150
|
|
|
@@ -16,6 +16,8 @@ This page is part of the host-facing contract of `@aiquants/markdown-explorer`;
|
|
|
16
16
|
- `treeRegion` names the tree itself, apart from `explorerRegion`, which names the explorer's landmark (and the sheet on narrow frames).
|
|
17
17
|
- `refreshTreeLabel` is the visible text of the explorer's Refresh tree button and `refreshDocumentLabel` that of the page views' (tree and single) Refresh document button, each also its button's accessible name; `refreshTree` and `refreshDocument` are their tooltips.
|
|
18
18
|
A multi-view panel's Refresh document is icon-only, and `refreshDocumentNamed(name)` (the panel title) is its accessible name and its tooltip. A successful reload is announced with `treeRefreshed` or `documentRefreshed(name)`. A failed one is shown with `treeRefreshFailed(reason)` (an alert in the explorer) or `documentRefreshFailed(reason)` (a notice, which the announcer also speaks), where `reason` is the failure's title (the matching `failure…Title` label).
|
|
19
|
+
- `showMarkupLabel` is the visible text of the page views' Source toggle beside Refresh document (shown for a Markdown document), also its accessible name, and `showMarkup` its tooltip; a multi-view panel's toggle is icon-only, and `showMarkupNamed(name)` (the panel title) is its accessible name and its tooltip.
|
|
20
|
+
The toggle's pressed state, not its name, tells whether the source shows. `markupLoading` is the screen-reader text while the source loads; a source that cannot be read is announced with `documentFailed(name, title)`, like a document, and a cut source shows `textTruncated`, like a cut text file.
|
|
19
21
|
- `switchToTree` and `switchToMulti` name their destination with the README's view names ("Open in the tree view" / "ツリービューで開く", "Open in the multi-panel view" / "マルチビューで開く"); no label names the single view, which no control inside the explorer opens.
|
|
20
22
|
|
|
21
23
|
## Overrides
|
|
@@ -33,7 +35,8 @@ const HANDBOOK_LABELS = {
|
|
|
33
35
|
|
|
34
36
|
- Strings that embed a value are functions — `foldersLoadFailedNamed(names)` (the announcement of the folders whose children failed to load within one frame, named in one sentence with the language's list format;
|
|
35
37
|
`folderLoadFailed` is the text shown in a row), `announcementSequence(messages)` (the live region's text for two or more messages announced within one frame, as separate sentences), `selectionTitle(count)`, `openSelectionInMulti(count)`, `removeFromSelection(name)`, `expandIconSizeValue(pixels)`, `settingAnnouncement(setting, value)`, `documentShown(name)`, `foldersLoading(count)` (the tree's progress line: the source's folder listings queued or in flight), `expandAllProgress(opened, loading)` (the progress line during an Expand all press), `expandAllDone(opened, failed, complete)` (the end of a press that no limit stopped; `complete` is whether every folder is open at the end, false when the reader closed one during the press, so the sentence then claims nothing about the rest; nothing opened, nothing failed and complete means every folder was already open), `expandAllFolderLimit(opened, limit, expandAll)` (a press stopped at `expandAll.maxFolders`; `expandAll` is the Expand all button's own label, so a host that renames the button keeps the invitation to press it again consistent), `expandAllDepthLimit(opened, depth)` (a press that left folders deeper than `expandAll.maxDepth` closed), `loopFolderName(name)` (the name of a loop row, a folder met again among its own ancestors), `documentFailed(name, title)` (a document that could not be shown:
|
|
36
|
-
the path's last segment and the failure's title — the text of the matching `failure…Title` label, not the reason's code), `imageZoomLevel(percent)`, `treeRefreshFailed(reason)`, `documentRefreshed(name)`, `documentRefreshFailed(reason)`, `refreshDocumentNamed(name)` (a multi-view panel's icon-only Refresh document: its accessible name and tooltip, `name` being the panel title),
|
|
38
|
+
the path's last segment and the failure's title — the text of the matching `failure…Title` label, not the reason's code), `imageZoomLevel(percent)`, `treeRefreshFailed(reason)`, `documentRefreshed(name)`, `documentRefreshFailed(reason)`, `refreshDocumentNamed(name)` (a multi-view panel's icon-only Refresh document: its accessible name and tooltip, `name` being the panel title),
|
|
39
|
+
`showMarkupNamed(name)` (a multi-view panel's icon-only Source toggle: its accessible name and tooltip, `name` being the panel title), `panelLimit(max)`, `panelOpened(name)`, `panelClosed(name)`, `panelAlreadyOpen(name)`, `panelHidden(name)`, `panelShown(name)`, `panelMaximized(name)`, `panelRestored(name)` — so each language can place the value where its grammar needs it.
|
|
37
40
|
- The labels `@aiquants/drag-drop-panels` fills itself are templates instead, strings whose `{name}` placeholders mark where each value goes: `panelMoved` (`{title}` the panel's name, `{column}` its visible column, `{position}` its place among that column's shown panels), `panelMoveUnavailable` (`{title}`, and `{move}` the name of the move, one of the `panelMove…` labels), `panelDragStarted` and `panelDragCancelled` (`{title}`) and `multiColumnRegion` (`{column}`); columns and positions count from 1. `MARKDOWN_EXPLORER_LABEL_TEMPLATES` lists each template's placeholders, and braces in every other label are literal text.
|
|
38
41
|
- `labels` must be a plain object. An unknown key throws a `RangeError` that lists the valid keys, a value of the wrong type (a string where a function is expected, or the reverse) throws a `TypeError`, and a blank string throws a `RangeError`, because a blank name is neither shown nor announced. A template that uses a placeholder its key does not offer (`{name}` for `{title}`, say) throws a `RangeError` naming the placeholders it accepts, because a placeholder that is never filled would be read out as it is. A key set to `undefined` keeps the catalog's string.
|
|
39
42
|
- The overrides are compared by value, key by key: writing `labels={{ … }}` inline does not re-render the explorer on every render of the host, but a function created inline is a new value each time — hoist it, or memoize the object.
|
|
@@ -27,6 +27,8 @@ The explorer renders documents that the reader did not write, from storage the r
|
|
|
27
27
|
- A `contains` that throws or answers anything but a boolean is logged (operation `boundary`) and counts as outside (a promise it answers is not awaited, and its rejection is logged the same way); a malformed `confirm` answer is logged and counts as outside; a `readPath` that is not an acceptable document path or that the deny rules refuse is logged and answered `failed`. A broken boundary therefore never opens a document.
|
|
28
28
|
- The union is exactly what the deployment exposes: a source whose boundary admits every document a reader can read in a store opens every such document through every view, link and asset URL, so documents of that store are confined only when every source over it has a confined boundary.
|
|
29
29
|
- The bytes of a file take exactly the document admission: an `asset` request passes the deny rules (a refusal is logged once with the operation `asset`), then the same union of boundaries and confirmations, and the host's `asset` receives the admitting source's `readPath`. A boundary miss answers 403 without a log, since an embedded image outside every source is ordinary.
|
|
30
|
+
- The text of a file takes the same admission: a `text` request passes the deny rules (a refusal is logged once with the operation `text`, since the explorer asks it only for a document it rendered), then the same union of boundaries and confirmations, and the host's `asset` receives the admitting source's `readPath`; a boundary miss is answered `forbidden` without a log.
|
|
31
|
+
It serves nothing the `asset` operation does not already serve the same reader: the beginning of that file's bytes, at most `textMaxBytes`, decoded as UTF-8 and escaped as a JSON string, which the browser shows as text and never interprets.
|
|
30
32
|
|
|
31
33
|
## HTML
|
|
32
34
|
|
|
@@ -83,12 +85,17 @@ In a tree or children listing, an entry with an empty name, or with a path the b
|
|
|
83
85
|
- Every JSON data response of the explorer's own carries `Content-Type: application/json; charset=utf-8`, `Cache-Control: private, no-store`, `X-Content-Type-Options: nosniff`, `Content-Security-Policy: default-src 'none'; frame-ancestors 'none'; sandbox` and `Cross-Origin-Resource-Policy: same-origin`, and has a JSON body.
|
|
84
86
|
- The page loader's responses carry `Cache-Control: private, no-store` through the exported `headers`, to both the HTML document and the single-fetch data.
|
|
85
87
|
- The data route answers a React Router single-fetch request (`<dataPath>/<operation>.data`: its own URL path ends in `.data`, which React Router strips from the route's `url` argument and `params` but not from `request.url`) with a `not-found` failure (404) before authenticating or calling a source. React Router would run the route for it, read the whole response into memory and keep none of the headers above but `Set-Cookie`.
|
|
86
|
-
- Status codes: 200 for a tree, children, ancestors, reveal, document or refresh answer (a refresh answers the reloaded tree, as a tree request does, failures included), 400 for a missing or malformed parameter, 401 when the reader is signed out, 403 when the reader may not use the explorer (or a refresh, or a document request marked as one's, lacks its proof), 404 for an unknown operation or source for a children request to a source without `children()` and for an ancestors request to a source without `ancestors()`, 405 (with `Allow`) for a wrong method.
|
|
88
|
+
- Status codes: 200 for a tree, children, ancestors, reveal, document, text or refresh answer (a refresh answers the reloaded tree, as a tree request does, failures included), 400 for a missing or malformed parameter, 401 when the reader is signed out, 403 when the reader may not use the explorer (or a refresh, or a document request marked as one's, lacks its proof), 404 for an unknown operation or source for a children request to a source without `children()` and for an ancestors request to a source without `ancestors()`, 405 (with `Allow`) for a wrong method.
|
|
87
89
|
When `authenticate`, `principalKey` or the route itself throws, the answer is the failure the exception maps to, with that failure's status: an `ExplorerError` keeps its reason (`too-large` is 413; `not-configured`, `unsupported` and `failed` are 500; the other reasons take the statuses above), and any other exception is logged and answered `failed` with 500.
|
|
88
90
|
A document or folder that cannot be shown — missing, denied, too large — is answered with status 200 and a failure in the JSON, so one inaccessible document does not break the multi-panel view.
|
|
89
|
-
- The tree refresh (`POST {dataPath}/refresh`) requires the custom request header `X-Markdown-Explorer: refresh` and
|
|
91
|
+
- The tree refresh (`POST {dataPath}/refresh`) requires the custom request header `X-Markdown-Explorer: refresh` and passes the shared cross-origin check of server routes (`crossOriginRefusal` of `@aiquants/request-isolation`, serving no navigation from another origin).
|
|
92
|
+
That check refuses a request whose `Sec-Fetch-Site` is present and neither `same-origin` nor `none`, and a request without Fetch Metadata whose `Origin` is present and does not name the request's host (another host or port, `null`, or a value that is not a URL), so neither a cross-site form nor a page of a sibling subdomain can trigger it.
|
|
93
|
+
It reloads the tree from the source (the source receives `refresh: true`) and answers a tree whose walk began after the refresh arrived; refreshes arriving while a walk runs share one trailing walk, so repeated refreshes never run more than one walk of a tree at a time.
|
|
90
94
|
Once the reload settled and unless the request went away, `onTreeRefreshed` receives the tree's cache key, which a multi-process host relays to its other processes' `forgetTree`; the response does not wait for a promise it returns, and a throw or that promise's rejection is logged (operation `refresh`).
|
|
91
|
-
- A document GET carrying `X-Markdown-Explorer: refresh` marks a request a refresh triggered: the host's `document` (and the admitting source's `confirm`) receive `refresh: true` and skip their caches. Such a request must carry the header's exact value and
|
|
95
|
+
- A document GET carrying `X-Markdown-Explorer: refresh` marks a request a refresh triggered: the host's `document` (and the admitting source's `confirm`) receive `refresh: true` and skip their caches. Such a request must carry the header's exact value and pass the same cross-origin check as the refresh itself (as a `GET`, a request without Fetch Metadata passes whatever its `Origin`, since another origin's page cannot add the header without a CORS preflight), or it is answered 403 before any host call, so a cross-site page cannot make the host re-parse documents.
|
|
96
|
+
- The `text` operation (`GET {dataPath}/text?path=`) answers JSON like a document request: GET and HEAD only; a missing, repeated or unacceptable `path` is 400; signed out 401 and forbidden 403.
|
|
97
|
+
Everything else is status 200: a text document (`name`, `text`, `truncated`, and the file's asset `url` with its version), or a failure document — `forbidden` for a denied or unadmitted path, `unsupported` for a file whose kept bytes hold NUL, the reason of an `ExplorerError` the host's `asset` port throws, and otherwise `failed`, logged with the operation `text` (a stream that ends before the size the port reported included).
|
|
98
|
+
It carries no refresh mark: the host's `asset` port receives `refresh: false`. The file is opened as the asset operation opens it — the first `textMaxBytes` bytes as a range when the port reports a longer size, the whole file otherwise, an empty file never — and the stream is cancelled once enough was read.
|
|
92
99
|
- The `asset` operation answers bytes instead of JSON (its failures stay JSON failures with the statuses above). GET and HEAD only; a request whose own URL path ends in `.data` is 404 before authentication; signed out 401 and forbidden 403 with no redirect; a missing, repeated or unacceptable `path` 400; a denied or unadmitted path 403.
|
|
93
100
|
After admission it answers 304 for a matching `If-None-Match`, 200 for the whole file (without `Accept-Ranges` and `Content-Length` when the host reports no size; empty with `Content-Length: 0` for an empty file), 206 for one satisfiable byte range, and 416 (`Content-Range: bytes */<size>`, `Cache-Control: private, no-store`) for a range starting at or after the end; HEAD carries the GET's status and headers without a body.
|
|
94
101
|
`If-None-Match` matches the ETag (`"<version>"`) as RFC 9110 evaluates it: `*`, or a comma-separated list holding the ETag by the weak comparison, so `W/"<version>"` matches too, while a malformed element matches nothing; an `If-Range` counts only when it is the ETag itself (the strong comparison).
|
|
@@ -129,7 +136,7 @@ In a tree or children listing, an entry with an empty name, or with a path the b
|
|
|
129
136
|
- Set `scopeSecret` from configuration, kept out of the source code and the browser: at least 32 characters, the same on every server instance.
|
|
130
137
|
- Keep the package external in your server bundle, so the sanitizer's worker file stays next to the server entry.
|
|
131
138
|
- Implement the ports: `document` and `asset` (and `children` for lazy folders) read what the explorer admitted, with the `readPath` it hands them, and report the same `version` for the same file.
|
|
132
|
-
The explorer serves every file's bytes itself (see [What the explorer serves](#what-the-explorer-serves)), so the host writes no asset route; the `asset` port only finds the file and opens its bytes, through a handle it checked (for example by comparing the opened file's device, inode, size and modification time with those of the checked path, refusing a file that has changed since it was found) and aborting with the request's signal.
|
|
139
|
+
The explorer serves every file's bytes itself (see [What the explorer serves](#what-the-explorer-serves)), so the host writes no asset route (nor a route for a document's source, which the `text` operation reads through the same port); the `asset` port only finds the file and opens its bytes, through a handle it checked (for example by comparing the opened file's device, inode, size and modification time with those of the checked path, refusing a file that has changed since it was found) and aborting with the request's signal.
|
|
133
140
|
- Refuse React Router single-fetch requests in any code your data route module runs before it hands the request to `dataLoader` or `dataAction` (which refuse them themselves), and in every resource route of your own: answer 404 for a request whose own URL path (`new URL(request.url).pathname`) ends in `.data`, before authenticating or touching storage.
|
|
134
141
|
React Router strips that suffix from `params` and from the loader's `url` argument, runs the loader for such a request, reads the whole `Response` body into memory and drops every header but `Set-Cookie`.
|
|
135
142
|
- When a source addresses documents by ID rather than by name (a cloud drive, for example), the deny rules can only filter its listings by entry name; its `document` function must refuse denied names itself, since the request carries only the ID.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiquants/markdown-explorer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Markdown document explorer for React Router 8 (framework mode): a source tree with a single-document view and a multi-panel reading view, storage-agnostic server ports, golden-ratio layout and an en / ja UI.",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css"
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"LICENSE"
|
|
55
55
|
],
|
|
56
56
|
"dependencies": {
|
|
57
|
+
"@aiquants/request-isolation": "^0.1.0",
|
|
57
58
|
"isomorphic-dompurify": "^2.36.0",
|
|
58
59
|
"parse5": "^8.0.0"
|
|
59
60
|
},
|
|
@@ -62,7 +63,7 @@
|
|
|
62
63
|
"@aiquants/drag-drop-panels": "^0.10.0",
|
|
63
64
|
"@aiquants/markdown": "^6.2.0",
|
|
64
65
|
"@aiquants/resize-panels": "^2.1.0",
|
|
65
|
-
"@aiquants/virtualscroll": "^3.
|
|
66
|
+
"@aiquants/virtualscroll": "^3.17.0",
|
|
66
67
|
"react": "^19.2.7",
|
|
67
68
|
"react-dom": "^19.2.7",
|
|
68
69
|
"react-router": "^8.0.0"
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
"@aiquants/drag-drop-panels": "0.10.0",
|
|
73
74
|
"@aiquants/markdown": "6.2.0",
|
|
74
75
|
"@aiquants/resize-panels": "2.1.0",
|
|
75
|
-
"@aiquants/virtualscroll": "3.
|
|
76
|
+
"@aiquants/virtualscroll": "3.17.0",
|
|
76
77
|
"@heroicons/react": "^2.2.0",
|
|
77
78
|
"@playwright/test": "^1.59.1",
|
|
78
79
|
"@tailwindcss/cli": "^4.1.18",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const _=Object.freeze([".env*","*.env","*.env.*","*.env~*","*.env-*","*.env_*","*.env#*",".git",".git-credentials",".svn",".hg","node_modules","secrets",".secrets","secrets.json","secrets.yml","secrets.yaml","secrets.toml","secrets.ini","secrets.txt",".ssh",".aws",".gnupg",".docker",".kube",".terraform",".npmrc",".yarnrc",".yarnrc.yml",".netrc","_netrc",".pypirc",".pgpass",".my.cnf",".htpasswd",".vault-token","id_rsa*","id_dsa*","id_ecdsa*","id_ed25519*","*.pem","*.key","*.p8","*.p12","*.pfx","*.ppk","*.jks","*.keystore","*.kdbx","*credentials*.json","service-account*.json","*.tfstate","*.tfstate.*","*.tfvars","*.tfvars.json",".*_history","fish_history"]),x=/[\u0000-\u001f\u007f]/u,N=/\p{Cs}/u,C=e=>{const t=e.split("/").filter(n=>n!=="").at(-1);return t===void 0?e:t},f=e=>e.length>0&&e.length<=4096&&!N.test(e)&&!x.test(e)&&!e.includes("\\"),A=e=>e.normalize("NFKC").toUpperCase().toLowerCase(),U=/(?:%[0-9A-Fa-f]{2})+/gu,k=new TextDecoder("utf-8"),H=/[/\\]/u,j=e=>e.replace(U,t=>k.decode(Uint8Array.from(t.slice(1).split("%").map(n=>Number.parseInt(n,16))))),X=e=>{const t=[e];let n=e;for(let r=0;r<3&&n.includes("%");r+=1){const o=j(n);if(o===n)break;t.push(o),n=o}return t.map(A)},w=e=>{if(typeof e!="string"||e.trim()===""||e.includes("/")||e.includes("\\"))throw new RangeError(`[markdown-explorer] a deny pattern must be one non-blank path segment; got ${JSON.stringify(e)}`);const t=A(e).split("*").map(n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*");return new RegExp(`^${t}$`,"su")},d=e=>{if(!Array.isArray(e))throw new RangeError("[markdown-explorer] deny rules must be an array of segment patterns");const t=e.map(w),n=o=>o!==""&&t.some(s=>s.test(o)),r=o=>o!==""&&X(o).some(s=>n(s)||s.split(H).some(n));return{deniesPath:o=>o.split("/").some(r),deniesName:r}},I=d(_),$=Object.freeze({deniesPath:()=>!1,deniesName:()=>!1}),z=e=>e===void 0?I:e===!1?$:d(e),F=(e,t)=>d(e).deniesPath(t),p=Object.freeze(["unauthorized","forbidden","not-found","not-configured","invalid","too-large","unsupported","failed"]),v=Object.freeze(["file","directory"]),M=Object.freeze(["video","audio","pdf"]),V=Object.freeze(["info","warning","danger"]),G=Object.freeze(["markdown","text","image","media","file","failure"]),m=Object.freeze({min:1,max:6}),Y=1e4,u=e=>typeof e=="string"&&/^\/(?![/\\])[\x21-\x7E]*$/u.test(e),K=Object.freeze(["http:","https:","mailto:"]),J=/^[a-z0-9-]{1,64}$/u,Q="https://relative.invalid/",y=64,c=(e,t)=>typeof t=="string"&&e.includes(t),a=e=>typeof e=="string"?JSON.stringify(e.length>y?`${e.slice(0,y)}…`:e):typeof e,O=e=>c(p,e),B=e=>c(v,e),g=e=>c(M,e),W=e=>c(V,e),q=e=>c(G,e),R=e=>typeof e=="string"&&J.test(e),Z=(e,t)=>{if(typeof e!="string")return!1;try{return t.includes(new URL(e,Q).protocol)}catch{return!1}},l=e=>{if(e===null||typeof e!="object")return"a failure must be an object";const{reason:t,code:n}=e;return O(t)?n!==void 0&&!R(n)?`a failure code must be 1 to 64 lowercase letters, digits or hyphens; got ${a(n)}`:null:`unknown failure reason ${a(t)}`},h=e=>{if(e===null||typeof e!="object")return"an entry must be an object";const{name:t,path:n,type:r,mimeType:o,children:s,lazy:i}=e;return typeof t!="string"||t===""?"an entry needs a non-empty name":typeof n!="string"||!f(n)?"an entry needs an acceptable path":B(r)?o!==void 0&&typeof o!="string"?"an entry mimeType must be a string":i!==void 0&&typeof i!="boolean"?"an entry lazy flag must be a boolean":s!==void 0&&!Array.isArray(s)?"entry children must be an array":r==="file"&&(s!==void 0||i===!0)?"a file entry cannot have children or be lazy":i===!0&&Array.isArray(s)&&s.length>0?"a lazy directory must not list children":null:`an entry type must be "file" or "directory"; got ${a(r)}`},T=e=>{if(h(e)!==null)return!1;const{children:t}=e;return t===void 0||t.every(T)},L=e=>{if(e===null||typeof e!="object")return!1;const{status:t,entries:n,failure:r}=e;return t==="ok"?Array.isArray(n)&&n.every(T):t==="error"&&l(r)===null},ee=e=>{if(e===null||typeof e!="object")return!1;const{status:t,ancestors:n,failure:r}=e;return t==="ok"?n===null||P(n):t==="error"&&l(r)===null},P=e=>Array.isArray(e)&&e.every(t=>typeof t=="string"&&f(t))&&new Set(e).size===e.length,te=e=>{if(e===null||typeof e!="object")return!1;const{status:t,source:n,ancestors:r,failure:o}=e;return t==="ok"?n===null&&r===null||typeof n=="string"&&n!==""&&P(r):t==="error"&&l(o)===null},ne=e=>{if(e===null||typeof e!="object")return!1;const{status:t,loadedAt:n}=e;return t==="ok"&&!(Number.isSafeInteger(n)&&n>=0)?!1:L(e)},re=e=>{if(e===null||typeof e!="object")return"a heading must be an object";const{text:t,depth:n,id:r}=e;return typeof t!="string"||typeof r!="string"?"a heading needs text and id strings":typeof n!="number"||!Number.isInteger(n)||n<m.min||n>m.max?`a heading depth must be an integer in 1..6; got ${String(n)}`:null},b=e=>{if(e===null||typeof e!="object")return"a document must be an object";const t=e,{kind:n}=t;if(!q(n))return`unknown document kind ${a(n)}`;if(n==="failure")return l(t.failure);if(typeof t.name!="string")return"a document needs a name string";switch(n){case"markdown":{const{htmlContent:r,headings:o}=t;if(typeof r!="string"||!Array.isArray(o))return"a markdown document needs htmlContent and headings";for(const s of o){const i=re(s);if(i!==null)return i}return null}case"text":return typeof t.text!="string"||typeof t.truncated!="boolean"?"a text document needs text and truncated":u(t.url)?null:"a text document needs a root-relative url";case"image":return u(t.url)?null:"an image document needs a root-relative url";case"media":return u(t.url)?g(t.mediaType)?null:`unknown media type ${a(t.mediaType)}`:"a media document needs a root-relative url";case"file":return u(t.url)?null:"a file document needs a root-relative url"}},oe=e=>b(e)===null,se=(e,t)=>({kind:"failure",failure:S(e,t)}),S=(e,t)=>R(t)?{reason:e,code:t}:{reason:e},ie=Object.freeze(["tree","children","ancestors","reveal","document","refresh","asset","link-card"]),E=Object.freeze({source:"source",path:"path",version:"v"}),ae="asset",ce="link-card",le=(e,t,n)=>{const r=`${e}/${ae}?${E.path}=${encodeURIComponent(t)}`;return n===null?r:`${r}&${E.version}=${encodeURIComponent(n)}`},ue=e=>`${e}/${ce}`,Ee="X-Markdown-Explorer-Scope",fe="X-Markdown-Explorer",de="refresh",pe=e=>ie.includes(e),D=Object.freeze({invalid:400,unauthorized:401,forbidden:403,"not-found":404,"too-large":413,"not-configured":500,unsupported:500,failed:500}),Re=e=>{const[t,...n]=p.filter(r=>D[r]===e);return t!==void 0&&n.length===0?t:"failed"};exports.DEFAULT_DENIED_PATH_SEGMENTS=_;exports.EXPLORER_DATA_QUERY=E;exports.EXPLORER_FAILURE_REASONS=p;exports.EXPLORER_FAILURE_STATUS=D;exports.EXPLORER_LINK_PROTOCOLS=K;exports.EXPLORER_MAX_HEADINGS=Y;exports.EXPLORER_REFRESH_HEADER=fe;exports.EXPLORER_REFRESH_HEADER_VALUE=de;exports.EXPLORER_SCOPE_HEADER=Ee;exports.MAX_DOCUMENT_PATH_LENGTH=4096;exports.documentViolation=b;exports.entryViolation=h;exports.explorerAssetHref=le;exports.explorerLinkCardEndpoint=ue;exports.failureDocument=se;exports.failureOf=S;exports.failureReasonOfStatus=Re;exports.failureViolation=l;exports.isAcceptableDocumentPath=f;exports.isAcceptableUrl=Z;exports.isDeniedPath=F;exports.isExplorerAncestorsResult=ee;exports.isExplorerChildrenResult=L;exports.isExplorerDataOperation=pe;exports.isExplorerDocument=oe;exports.isExplorerFailureCode=R;exports.isExplorerFailureReason=O;exports.isExplorerMediaType=g;exports.isExplorerNoticeTone=W;exports.isExplorerRevealResult=te;exports.isExplorerTreeResult=ne;exports.lastPathSegment=C;exports.resolvePathRules=z;
|
package/dist/index-Cie6WPiM.cjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";const d=require("react/jsx-runtime"),i=require("react"),Z=require("react-router"),_=require("./location-CSIhx-L4.cjs"),J=require("@aiquants/markdown"),P=require("./dataRoute-DHpu0fg2.cjs"),Mt=require("@aiquants/markdown/viewer-settings"),X=require("./storage-Bkb2Axdi.cjs");function jt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const y=jt(i),Re=Object.freeze(["en","ja"]),et="en",tt=Object.freeze({panelMoved:Object.freeze(["title","column","position"]),panelMoveUnavailable:Object.freeze(["title","move"]),panelDragStarted:Object.freeze(["title"]),panelDragCancelled:Object.freeze(["title"]),multiColumnRegion:Object.freeze(["column"])}),Nt=/\{(\w+)\}/gu,nt={explorerRegion:"Explorer",sourceLabel:"Source",refreshTreeLabel:"Refresh tree",refreshTree:"Reload the tree and the open documents from the source",treeRefreshed:"Reloaded the tree from the source",treeRefreshFailed:e=>`Could not reload the tree: ${e}`,refreshDocumentLabel:"Refresh document",refreshDocument:"Reload the document from the source",refreshDocumentNamed:e=>`Refresh ${e}`,documentRefreshed:e=>`Reloaded ${e}`,documentRefreshFailed:e=>`Could not reload the document: ${e}`,expandAll:"Expand all folders",collapseAll:"Collapse all folders",treeSettings:"Tree settings",switchToMulti:"Open in the multi-panel view",switchToTree:"Open in the tree view",resizeExplorer:"Resize the explorer",showExplorer:"Show the explorer",hideExplorer:"Close the explorer",treeRegion:"Documents",treeLoading:"Loading the tree…",treeEmptyTitle:"Nothing to show",treeEmptyBody:"This source has no documents you can open.",folderLoadFailed:"This folder could not be loaded.",loopFolderName:e=>`${e} (already open above)`,foldersLoadFailedNamed:e=>`${new Intl.ListFormat("en",{type:"conjunction"}).format(e)} could not be loaded`,foldersLoading:e=>e===1?"Loading 1 folder…":`Loading ${String(e)} folders…`,expandAllStarted:"Opening all folders…",expandAllProgress:(e,t)=>`Opening all folders (${String(e)} opened, ${String(t)} loading)…`,expandAllDone:(e,t,n)=>{const r=`Opened ${String(e)} ${e===1?"folder":"folders"}`;return t>0?`${r}; ${String(t)} could not be loaded`:n?e===0?"All folders are already open":`${r}; every folder is open`:r},expandAllFolderLimit:(e,t,n)=>`Opened ${String(e)} ${e===1?"folder":"folders"} and stopped at the limit of ${String(t)} ${t===1?"folder":"folders"} to load. Choose "${n}" again to continue`,expandAllDepthLimit:(e,t)=>`Opened ${String(e)} ${e===1?"folder":"folders"}; folders more than ${String(t)} ${t===1?"level":"levels"} deep stay closed`,treeEntryKindDirectory:"directory",treeEntryKindFile:"file",treeScrollUp:"Scroll up",treeScrollDown:"Scroll down",treeScrollToTop:"Top",treeScrollToBottom:"Bottom",selectionTitle:e=>`Selected (${String(e)})`,clearSelection:"Clear the selection",openSelectionInMulti:e=>`Open ${String(e)} in panels`,removeFromSelection:e=>`Remove ${e} from the selection`,settingSortMode:"Sort order",sortNative:"Source order",sortAscending:"Name A→Z",sortDescending:"Name Z→A",settingFolderPlacement:"Folders",folderPlacementMixed:"Mixed",folderPlacementFirst:"First",folderPlacementLast:"Last",settingSelectionMode:"Selection",selectionSingle:"Single",selectionMultiple:"Multiple",selectionNone:"Off",settingDoubleClick:"Double-click",doubleClickRecursive:"Expand all levels",doubleClickToggle:"Toggle",settingExpandIconSize:"Expander size",expandIconSizeValue:e=>`${String(e)} px`,settingAlwaysExpanded:"Always expanded",settingRevealDocument:"Reveal the open document",settingRemoveRootIndent:"No root indent",settingTreeLines:"Tree lines",settingExpandIcons:"Expanders",settingDirectoryIcons:"Folder icons",settingFileIcons:"File icons",settingOn:"On",settingOff:"Off",settingAnnouncement:(e,t)=>`${e}: ${t}`,documentRegion:"Document",documentEmpty:"Select a document in the explorer.",documentLoading:"Loading the document…",documentShown:e=>`Showing ${e}`,documentFailed:(e,t)=>`${e}: ${t}`,announcementSequence:e=>e.map(t=>/[.!?]$/u.test(t)?t:`${t}.`).join(" "),textTruncated:"Only the beginning of this file is shown.",inertLink:"This link points outside the source and cannot be opened.",failureUnauthorizedTitle:"Your session has expired",failureUnauthorizedBody:"Reload the page to sign in again.",failureForbiddenTitle:"Access denied",failureForbiddenBody:"You do not have permission to open this.",failureNotFoundTitle:"Not found",failureNotFoundBody:"It may have been moved or deleted.",failureNotConfiguredTitle:"This source is not set up",failureNotConfiguredBody:"Ask your administrator to configure it.",failureInvalidTitle:"Invalid address",failureInvalidBody:"The document path in this address cannot be used.",failureTooLargeTitle:"Too large to display",failureTooLargeBody:"This file exceeds the size that can be displayed.",failureUnsupportedTitle:"Cannot be displayed",failureUnsupportedBody:"This type of file cannot be shown here.",failureFailedTitle:"Something went wrong",failureFailedBody:"Try again in a moment.",retry:"Try again",reloadPage:"Reload the page",imageZoomIn:"Zoom in",imageZoomOut:"Zoom out",imageFit:"Fit to the view",imageFitLevel:"Fit",imageZoomLevel:e=>`${String(e)}%`,openInNewTab:"Open in a new tab",download:"Download",mediaUnsupported:"Your browser cannot play this file.",fileNotShown:"This file cannot be shown here. Download it to open it.",viewerLoading:"Loading data...",viewerErrorPrefix:"Error: ",viewerStyleTitle:"Display Style",viewerSelectStyle:"Select display style",viewerPinStyle:"Pin style selector",viewerUnpinStyle:"Unpin style selector",viewerErrorTitle:"An error occurred",viewerMissingImage:"Image not found",viewerOpenToc:"Open table of contents",viewerTocTitle:"Table of contents",viewerPinToc:"Pin table of contents",viewerUnpinToc:"Unpin table of contents",viewerSelectAlign:"Select alignment",viewerAlignTitle:"Alignment",viewerPinAlign:"Pin alignment selector",viewerUnpinAlign:"Unpin alignment selector",viewerAlignLeft:"Align left",viewerAlignCenter:"Align center",viewerAlignRight:"Align right",viewerMermaidInteractionMode:"Mouse interaction mode",viewerMermaidModeNone:"No interaction",viewerMermaidModeZoom:"Zoom only",viewerMermaidModePan:"Pan only (drag)",viewerMermaidModePanShift:"Pan only (Shift+drag)",viewerMermaidModeBoth:"Zoom and pan (drag)",viewerMermaidModeBothShift:"Zoom and pan (Shift+drag)",viewerMermaidZoomIn:"Zoom In",viewerMermaidZoomOut:"Zoom Out",viewerMermaidResetView:"Reset View",viewerMermaidRetry:"Try again",viewerEmbeddedVideo:"embedded video",viewerEmbeddedPost:"embedded post",viewerEmbeddedFrame:"Embedded content",multiRegion:"Panels",multiEmpty:"Select documents in the explorer to open them side by side.",panelLimit:e=>`You can open up to ${String(e)} panels at once.`,panelOpened:e=>`Opened ${e}`,panelClosed:e=>`Closed ${e}`,panelAlreadyOpen:e=>`${e} is already open`,panelHidden:e=>`Hid ${e}`,panelShown:e=>`Showed ${e}`,panelMaximized:e=>`Maximized ${e}`,panelRestored:e=>`Restored ${e} to its size`,panelHide:"Hide the panel",panelMaximize:"Maximize the panel",panelRestore:"Restore the panel to its size",panelClose:"Close the panel",panelSwitchToCustomDrag:"Switch to the custom drag mode",panelSwitchToNormalDrag:"Back to the normal drag mode",panelCustomDragBadge:"Custom",panelMovePreviousColumn:"Move to the previous column",panelMoveNextColumn:"Move to the next column",panelMoveUp:"Move up",panelMoveDown:"Move down",panelMoved:"Moved {title} to column {column}, position {position}",panelMoveUnavailable:"{move} is not available for {title}",panelDragStarted:"Picked up {title}",panelDragCancelled:"Kept {title} where it was",hiddenPanelsTitle:"Hidden panels:",hiddenPanelBadge:"Hidden",hiddenPanelNotice:"This panel is hidden",multiColumnEmpty:"This column is empty",multiColumnRegion:"Column {column}",panelDropHere:"Drop the panel here"},Pt={explorerRegion:"エクスプローラー",sourceLabel:"ソース",refreshTreeLabel:"ツリーを更新",refreshTree:"ソースからツリーと開いている文書を読み込み直す",treeRefreshed:"ツリーをソースから読み込み直しました",treeRefreshFailed:e=>`ツリーを読み込み直せませんでした: ${e}`,refreshDocumentLabel:"文書を更新",refreshDocument:"ソースから文書を読み込み直す",refreshDocumentNamed:e=>`${e} を更新`,documentRefreshed:e=>`${e} を読み込み直しました`,documentRefreshFailed:e=>`文書を読み込み直せませんでした: ${e}`,expandAll:"すべてのフォルダーを展開",collapseAll:"すべてのフォルダーを折りたたむ",treeSettings:"ツリーの設定",switchToMulti:"マルチビューで開く",switchToTree:"ツリービューで開く",resizeExplorer:"エクスプローラーの幅を変更",showExplorer:"エクスプローラーを開く",hideExplorer:"エクスプローラーを閉じる",treeRegion:"文書の一覧",treeLoading:"ツリーを読み込み中…",treeEmptyTitle:"表示できるファイルがありません",treeEmptyBody:"このソースには開ける文書がありません。",folderLoadFailed:"このフォルダーを読み込めませんでした。",loopFolderName:e=>`${e} (上の階層で開いています)`,foldersLoadFailedNamed:e=>`${new Intl.ListFormat("ja",{type:"conjunction"}).format(e)} を読み込めませんでした`,foldersLoading:e=>`フォルダーを ${String(e)} 件読み込み中…`,expandAllStarted:"すべてのフォルダーを展開しています…",expandAllProgress:(e,t)=>`すべてのフォルダーを展開中 (展開 ${String(e)} 件、読み込み中 ${String(t)} 件)…`,expandAllDone:(e,t,n)=>{const r=`${String(e)} 件のフォルダーを展開しました`;return t>0?`${r}。うち ${String(t)} 件は読み込めませんでした`:n?e===0?"すべてのフォルダーが既に開いています":`${r}。すべてのフォルダーが開いています`:r},expandAllFolderLimit:(e,t,n)=>`${String(e)} 件のフォルダーを展開し、読み込みの上限 (${String(t)} 件) で止めました。続けるには「${n}」をもう一度押してください`,expandAllDepthLimit:(e,t)=>`${String(e)} 件のフォルダーを展開しました。深さ ${String(t)} 階層より下のフォルダーは閉じたままです`,treeEntryKindDirectory:"ディレクトリ",treeEntryKindFile:"ファイル",treeScrollUp:"上へスクロール",treeScrollDown:"下へスクロール",treeScrollToTop:"先頭へ",treeScrollToBottom:"末尾へ",selectionTitle:e=>`選択中 (${String(e)})`,clearSelection:"選択を解除",openSelectionInMulti:e=>`${String(e)} 件をパネルで開く`,removeFromSelection:e=>`${e} を選択から外す`,settingSortMode:"並び順",sortNative:"取得順",sortAscending:"名前の昇順",sortDescending:"名前の降順",settingFolderPlacement:"フォルダーの位置",folderPlacementMixed:"混ぜる",folderPlacementFirst:"先に",folderPlacementLast:"後に",settingSelectionMode:"選択",selectionSingle:"1 件",selectionMultiple:"複数",selectionNone:"オフ",settingDoubleClick:"ダブルクリック",doubleClickRecursive:"下の階層まで展開",doubleClickToggle:"開閉",settingExpandIconSize:"展開アイコンの大きさ",expandIconSizeValue:e=>`${String(e)} px`,settingAlwaysExpanded:"常に展開",settingRevealDocument:"開いた文書をツリーで表示",settingRemoveRootIndent:"最上位の字下げなし",settingTreeLines:"ツリーの線",settingExpandIcons:"展開アイコン",settingDirectoryIcons:"フォルダーのアイコン",settingFileIcons:"ファイルのアイコン",settingOn:"オン",settingOff:"オフ",settingAnnouncement:(e,t)=>`${e}: ${t}`,documentRegion:"文書",documentEmpty:"エクスプローラーで文書を選んでください。",documentLoading:"文書を読み込み中…",documentShown:e=>`${e} を表示しています`,documentFailed:(e,t)=>`${e}: ${t}`,announcementSequence:e=>e.map(t=>/[。!?]$/u.test(t)?t:`${t}。`).join(""),textTruncated:"このファイルは先頭だけを表示しています。",inertLink:"リンク先がソースの外にあるため開けません。",failureUnauthorizedTitle:"セッションの有効期限が切れました",failureUnauthorizedBody:"ページを再読み込みして、もう一度サインインしてください。",failureForbiddenTitle:"アクセスが許可されていません",failureForbiddenBody:"これを開く権限がありません。",failureNotFoundTitle:"見つかりません",failureNotFoundBody:"移動または削除された可能性があります。",failureNotConfiguredTitle:"このソースは設定されていません",failureNotConfiguredBody:"管理者に設定を依頼してください。",failureInvalidTitle:"アドレスが正しくありません",failureInvalidBody:"このアドレスに含まれる文書の経路は使えません。",failureTooLargeTitle:"大きすぎて表示できません",failureTooLargeBody:"このファイルは表示できる大きさを超えています。",failureUnsupportedTitle:"表示できない形式です",failureUnsupportedBody:"この種類のファイルはここでは表示できません。",failureFailedTitle:"読み込みに失敗しました",failureFailedBody:"しばらくしてからもう一度お試しください。",retry:"再試行",reloadPage:"ページを再読み込み",imageZoomIn:"拡大",imageZoomOut:"縮小",imageFit:"画面に合わせる",imageFitLevel:"全体",imageZoomLevel:e=>`${String(e)}%`,openInNewTab:"新しいタブで開く",download:"ダウンロード",mediaUnsupported:"このブラウザではこのファイルを再生できません。",fileNotShown:"このファイルはここでは表示できません。ダウンロードして開いてください。",viewerLoading:"データを読み込み中...",viewerErrorPrefix:"エラー: ",viewerStyleTitle:"表示スタイル",viewerSelectStyle:"表示スタイルを選択",viewerPinStyle:"スタイル選択をピン留め",viewerUnpinStyle:"スタイル選択のピン留めを解除",viewerErrorTitle:"エラーが発生しました",viewerMissingImage:"画像が見つかりません",viewerOpenToc:"目次を開く",viewerTocTitle:"目次",viewerPinToc:"目次をピン留め",viewerUnpinToc:"目次のピン留めを解除",viewerSelectAlign:"揃えを選択",viewerAlignTitle:"揃え",viewerPinAlign:"揃え選択をピン留め",viewerUnpinAlign:"揃え選択のピン留めを解除",viewerAlignLeft:"左揃え",viewerAlignCenter:"中央揃え",viewerAlignRight:"右揃え",viewerMermaidInteractionMode:"マウス操作モード",viewerMermaidModeNone:"操作なし",viewerMermaidModeZoom:"拡大縮小のみ",viewerMermaidModePan:"移動のみ (左ドラッグ)",viewerMermaidModePanShift:"移動のみ (Shift+ドラッグ)",viewerMermaidModeBoth:"拡大縮小+移動 (左ドラッグ)",viewerMermaidModeBothShift:"拡大縮小+移動 (Shift+ドラッグ)",viewerMermaidZoomIn:"拡大",viewerMermaidZoomOut:"縮小",viewerMermaidResetView:"表示を元に戻す",viewerMermaidRetry:"再試行",viewerEmbeddedVideo:"埋め込みの動画",viewerEmbeddedPost:"埋め込みの投稿",viewerEmbeddedFrame:"埋め込みのコンテンツ",multiRegion:"パネル",multiEmpty:"エクスプローラーで文書を選ぶと、ここに並べて開きます。",panelLimit:e=>`同時に開けるのは ${String(e)} パネルまでです。`,panelOpened:e=>`${e} を開きました`,panelClosed:e=>`${e} を閉じました`,panelAlreadyOpen:e=>`${e} は既に開いています`,panelHidden:e=>`${e} を隠しました`,panelShown:e=>`${e} を表示しました`,panelMaximized:e=>`${e} を最大化しました`,panelRestored:e=>`${e} を元のサイズに戻しました`,panelHide:"パネルを隠す",panelMaximize:"パネルを最大化",panelRestore:"パネルを元のサイズに戻す",panelClose:"パネルを閉じる",panelSwitchToCustomDrag:"カスタムのドラッグの方式に切り替え",panelSwitchToNormalDrag:"通常のドラッグの方式に戻す",panelCustomDragBadge:"カスタム",panelMovePreviousColumn:"前の列へ移動",panelMoveNextColumn:"次の列へ移動",panelMoveUp:"上へ移動",panelMoveDown:"下へ移動",panelMoved:"{title} を {column} 列目の {position} 番目へ移動しました",panelMoveUnavailable:"{title} は「{move}」できません",panelDragStarted:"{title} を持ち上げました",panelDragCancelled:"{title} の移動を取り消しました",hiddenPanelsTitle:"隠したパネル:",hiddenPanelBadge:"非表示",hiddenPanelNotice:"このパネルは隠しています",multiColumnEmpty:"この列は空です",multiColumnRegion:"{column} 列目",panelDropHere:"ここへパネルをドロップ"},rt=Object.freeze({en:Object.freeze(nt),ja:Object.freeze(Pt)}),Ce=Object.freeze(Object.keys(nt)),Dt=new Set(Ce),$t=e=>Dt.has(e),se=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,ot=e=>{if(e===void 0)return et;if(Re.includes(e))return e;throw new RangeError(`[markdown-explorer] locale is the UI language (${Re.map(t=>JSON.stringify(t)).join(" or ")}), not a BCP 47 tag; got ${se(e)}`)},ye=(e,t)=>{const n=rt[ot(e)];if(t===void 0)return n;if(t===null||typeof t!="object")throw new RangeError(`[markdown-explorer] labels must be an object; got ${se(t)}`);if(!_.isPlainObject(t))throw new RangeError(`[markdown-explorer] labels must be a plain object; got ${se(t)}`);const r=t,o={...n};for(const s of Object.keys(r)){if(!$t(s))throw new RangeError(`[markdown-explorer] labels.${s} is not a known label key; expected one of ${Ce.join(", ")}`);const a=r[s];if(a===void 0)continue;const c=typeof n[s];if(typeof a!==c)throw new TypeError(`[markdown-explorer] labels.${s} must be a ${c}; got ${se(a)}`);if(typeof a=="string"&&a.trim()==="")throw new RangeError(`[markdown-explorer] labels.${s} must be a non-blank string`);const m=tt[s];if(typeof a=="string"&&m!==void 0){for(const[,h]of a.matchAll(Nt))if(!m.includes(h??""))throw new RangeError(`[markdown-explorer] labels.${s} uses the unknown placeholder {${String(h)}}; it accepts ${m.map(g=>`{${g}}`).join(", ")}`)}o[s]=a}return Object.freeze(o)},Ft=(e,t)=>{if(Object.is(e,t))return!0;if(e===null||t===null||typeof e!="object"||typeof t!="object")return!1;const n=e,r=t,o=Object.keys(n),s=Object.keys(r);return o.length===s.length&&s.every(a=>Object.hasOwn(n,a)&&Object.is(n[a],r[a]))},ke=Object.freeze(["light","dark"]),_t=e=>{if(e===void 0)return"light";if(ke.includes(e))return e;throw new RangeError(`[markdown-explorer] theme must be ${ke.map(t=>JSON.stringify(t)).join(" or ")}; got ${typeof e=="string"?JSON.stringify(e):typeof e}`)},st=i.createContext(null),$=()=>{const e=i.use(st);if(e===null)throw new Error("[markdown-explorer] explorer components must be rendered inside <MarkdownExplorer>");return e},Q=e=>{const{viewSettings:t}=$(),n=()=>e(t.getSnapshot());return i.useSyncExternalStore(t.subscribe,n,n)},de=()=>{const{config:e}=$(),t=Z.useParams()["*"],[n]=Z.useSearchParams(),r=n.toString();return i.useMemo(()=>_.resolveExplorerLocation(e,t,new URLSearchParams(r)),[e,t,r])};function qt({title:e,titleId:t,...n},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?y.createElement("title",{id:t},e):null,y.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const Bt=y.forwardRef(qt),Me=Object.freeze({browse:Object.freeze({replace:!0,preventScrollReset:!0,defaultShouldRevalidate:!1}),"switch-source":Object.freeze({replace:!1,preventScrollReset:!0,defaultShouldRevalidate:!1}),"switch-view":Object.freeze({replace:!1,preventScrollReset:!1,defaultShouldRevalidate:!1}),"follow-link":Object.freeze({replace:!1,preventScrollReset:!1,defaultShouldRevalidate:!1})}),zt=e=>Me[e],ue=()=>{const e=Z.useNavigate();return i.useCallback((t,n)=>{e(t,Me[n])},[e])},lt=({navigation:e,...t})=>d.jsx(Z.Link,{...t,...Me[e]}),it={unauthorized:["failureUnauthorizedTitle","failureUnauthorizedBody"],forbidden:["failureForbiddenTitle","failureForbiddenBody"],"not-found":["failureNotFoundTitle","failureNotFoundBody"],"not-configured":["failureNotConfiguredTitle","failureNotConfiguredBody"],invalid:["failureInvalidTitle","failureInvalidBody"],"too-large":["failureTooLargeTitle","failureTooLargeBody"],unsupported:["failureUnsupportedTitle","failureUnsupportedBody"],failed:["failureFailedTitle","failureFailedBody"]},te=(e,t)=>e[it[t][0]],at=({failure:e,alert:t,onRetry:n,testId:r})=>{const{labels:o}=$(),s=te(o,e.reason),a=o[it[e.reason][1]],c=e.reason==="unauthorized"||e.reason==="forbidden"||e.reason==="failed"?"danger":"warning";return d.jsxs("div",{className:"aqmx-callout",role:t?"alert":void 0,"data-aqmx-tone":c,"data-testid":r===null?void 0:r,"data-aqmx-failure":r===null?void 0:e.reason,children:[d.jsx("p",{className:"aqmx-callout-title",children:s}),d.jsx("p",{className:"aqmx-callout-body",children:a}),e.reason==="unauthorized"?d.jsx("button",{type:"button",className:"aqmx-callout-action",onClick:()=>window.location.reload(),children:o.reloadPage}):n!==void 0&&e.reason==="failed"?d.jsx("button",{type:"button",className:"aqmx-callout-action",onClick:n,children:o.retry}):null]})},je=e=>{const t=e.ownerDocument;if(e.focus({preventScroll:!0}),t.activeElement===e)return!0;if(e.hasAttribute("tabindex"))return!1;if(e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0}),t.activeElement!==e)return e.removeAttribute("tabindex"),!1;const n=()=>{t.activeElement!==e&&(e.removeAttribute("tabindex"),e.removeEventListener("blur",n))};return e.addEventListener("blur",n),!0},ct=(e,t)=>{const n=i.useRef(null),r=i.useRef(null),o=i.useRef(null),s=i.useCallback(()=>{n.current!==null&&window.clearTimeout(n.current),n.current=null,r.current=null},[]);i.useEffect(()=>s,[s]);const a=i.useCallback(h=>{if(r.current!==h)return;const g=o.current;if(g!==null){g.then(()=>a(h));return}e.prefetch(h);const p=e.peek(h);if(p?.status!=="pending")return;const x=Promise.allSettled([p.promise]);o.current=x,x.then(()=>{o.current===x&&(o.current=null)})},[e]),c=i.useCallback(h=>{const g=t(h);g!==r.current&&(s(),g!==null&&(r.current=g,n.current=window.setTimeout(()=>{n.current=null,a(g)},_.PREFETCH_DWELL_MS)))},[s,t,a]),m=i.useCallback(h=>{t(h)!==r.current&&s()},[s,t]);return i.useMemo(()=>({onPointerOver:h=>c(h.target),onPointerOut:h=>m(h.relatedTarget),onFocus:h=>c(h.target),onBlur:h=>m(h.relatedTarget)}),[c,m])},Ht=i.lazy(()=>Promise.resolve().then(()=>require("./NativeScrollBar-DbzyQ85y.cjs")).then(e=>({default:e.NativeScrollBar})));class It extends i.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(t){console.error("[markdown-explorer] a scroll bar failed to load or render; its scroller keeps its native scrolling without it.",t)}render(){return this.state.failed?null:this.props.children}}const dt=({scroller:e,withCircle:t})=>d.jsx(It,{children:d.jsx(i.Suspense,{fallback:null,children:d.jsx(Ht,{scroller:e,withCircle:t})})}),ut=e=>d.jsx(dt,{scroller:e,withCircle:!0}),ne=()=>{const e=new Set;return{subscribe:t=>(e.add(t),()=>{e.delete(t)}),emit:()=>{for(const t of[...e])t()}}},ft=()=>{const e=new Map,t=new Set;let n=!1;const r=o=>{t.add(o),!n&&(n=!0,queueMicrotask(()=>{n=!1,t.clear()}))};return{hold:o=>{e.set(o,(e.get(o)??0)+1);let s=!1;return()=>{if(s)return;s=!0;const a=e.get(o);if(a!==void 0&&a>1){e.set(o,a-1);return}e.delete(o),r(o)}},isHeld:o=>e.has(o),resumes:o=>t.delete(o),heldKeys:()=>[...e.keys()]}},ie=(e,t)=>{if(Object.is(e,t))return!0;if(typeof e!="object"||typeof t!="object"||e===null||t===null)return!1;if(Array.isArray(e)||Array.isArray(t))return!(Array.isArray(e)&&Array.isArray(t))||e.length!==t.length?!1:e.every((s,a)=>ie(s,t[a]));const n=e,r=t,o=Object.keys(n);return o.length!==Object.keys(r).length?!1:o.every(s=>Object.hasOwn(r,s)&&ie(n[s],r[s]))},ee=e=>{const t=e;return t.status===void 0&&(t.status="pending",e.then(n=>{t.status="fulfilled",t.value=n},n=>{t.status="rejected",t.reason=n})),t},mt=e=>Object.assign(Promise.resolve(e),{status:"fulfilled",value:e}),re=e=>e.status==="fulfilled"?e.value:void 0,Ut=55e3,Fe=Object.freeze({status:"deferred"}),_e=Object.freeze({status:"refreshed"}),Ee=Object.freeze({status:"superseded"}),ae=e=>e===void 0||e.status==="deferred"?null:e.status==="loaded"?e:e.previous,gt=e=>e!==void 0&&e.status==="loaded"&&e.document.kind!=="failure",Zt=({client:e,capacity:t})=>{if(!Number.isInteger(t)||t<1)throw new RangeError(`[markdown-explorer] the document cache capacity must be a positive integer; got ${String(t)}`);const n=new Map,r=ft(),o=ne(),s=new WeakSet;let a=0;const c=o.emit,m=()=>(a+=1,a),h=()=>{if(!(n.size<=t))for(const f of[...n.keys()]){if(n.size<=t)return;r.isHeld(f)||n.delete(f)}},g=(f,w)=>{n.delete(f),n.set(f,w)},p=f=>performance.now()-f.validatedAt>=Ut,x=(f,w,S)=>{const b=n.get(f),R=ae(b?.snapshot),D=S||b?.refreshPending===!0,H=ee(e.document(f,{refresh:D}).then(q=>({status:"loaded",document:q}))),j={snapshot:{status:"pending",promise:H,previous:R},validatedAt:performance.now(),opened:w,background:null,refreshPending:!1,seeded:void 0,stamp:m()};return g(f,j),h(),H.then(q=>{n.get(f)===j&&(j.snapshot=q,j.stamp=m(),c())}),j},T=(f,w,S,b,R,D)=>{w.background===S&&(w.background=null,!(n.get(f)!==w||w.snapshot!==b)&&(R.kind==="failure"&&b.document.kind!=="failure"||(w.validatedAt=D,w.stamp=m(),ie(b.document,R)||(w.snapshot={status:"loaded",document:R}),c())))},k=async(f,w)=>{const S=w.snapshot;if(S.status!=="loaded")return null;const b={};w.background=b;const R=performance.now(),D=e.document(f,{refresh:w.refreshPending});w.refreshPending=!1;const H=await D,j=w.background===b&&n.get(f)===w&&w.snapshot===S;return T(f,w,b,S,H,R),j?H:null},L=(f,w)=>{const{snapshot:S}=w;return S.status==="pending"?!1:S.status==="loaded"&&S.document.kind!=="failure"?(k(f,w),!1):(S.status==="loaded"&&s.add(S),x(f,!0,!1),!0)},A=f=>{const w=r.hold(f);let S=!1;return()=>{if(S)return;S=!0,w();const b=n.get(f);b!==void 0&&g(f,b),h()}};return{peek:f=>n.get(f)?.snapshot,peekSeeded:f=>n.get(f)?.seeded,answerStampOf:f=>n.get(f)?.stamp,prefetch:f=>{const w=n.get(f);w!==void 0&&w.snapshot.status!=="deferred"||(x(f,!1,!1),c())},open:f=>{const w=r.resumes(f),S=A(f),b=n.get(f);if(b===void 0||b.snapshot.status==="deferred")return x(f,!0,!1),c(),S;if(g(f,b),w)return S;const{snapshot:R}=b;return R.status==="pending"?(b.opened=!0,S):R.document.kind==="failure"?(b.opened||p(b)?(s.add(R),x(f,!0,!1),c()):b.opened=!0,S):(b.opened=!0,b.background===null&&p(b)&&k(f,b),S)},retain:A,retry:f=>{const w=n.get(f);w===void 0||w.snapshot.status!=="loaded"||w.snapshot.document.kind!=="failure"||(x(f,!0,!1),c())},seed:(f,w)=>{const S=performance.now(),b=ee(w.then(q=>q===null?Fe:{status:"loaded",document:q},()=>Fe)),R=n.get(f);if(R!==void 0&&R.snapshot.status==="loaded"){const q=R.snapshot,U={};R.background=U,b.then(C=>{if(C.status==="loaded"){T(f,R,U,q,C.document,S);return}R.background===U&&(R.background=null)});return}const D=R!==void 0&&R.snapshot.status==="pending"?R.snapshot.previous:null,H={status:"pending",promise:b,previous:D},j={snapshot:H,validatedAt:S,opened:R?.opened===!0,background:null,refreshPending:R?.refreshPending===!0,seeded:H,stamp:m()};g(f,j),h(),b.then(q=>{n.get(f)===j&&(q.status==="deferred"&&r.isHeld(f)?x(f,j.opened,!1):(j.snapshot=q,j.stamp=m()),c())})},invalidate:()=>{let f=!1;for(const[w,S]of[...n]){if(S.validatedAt=Number.NEGATIVE_INFINITY,S.opened=!0,S.refreshPending=!0,!r.isHeld(w))continue;const{snapshot:b}=S;if(b.status!=="pending"){L(w,S)&&(f=!0);continue}b.promise.then(()=>{n.get(w)===S&&S.refreshPending&&r.isHeld(w)&&L(w,S)&&c()})}f&&c()},refresh:async f=>{const w=n.get(f);if(w!==void 0&>(w.snapshot)){w.refreshPending=!0;const b=await k(f,w);return b===null?Ee:b.kind==="failure"?{status:"failed",failure:b.failure}:_e}const S=x(f,!0,!0);return c(),S.snapshot.status!=="pending"?Ee:(await S.snapshot.promise,n.get(f)===S?_e:Ee)},clear:()=>{n.clear();for(const f of r.heldKeys())x(f,!0,!1);c()},subscribe:o.subscribe,noteFailureShown:f=>s.has(f)?!1:(s.add(f),!0)}},ce=i.createContext("fill"),Vt=Object.freeze({blockSize:"100%"}),fe=({scrollerProps:e,children:t})=>i.use(ce)==="content"?d.jsx(J.HostedScrollArea,{scrollerProps:e,children:t}):d.jsx(J.HostedScrollArea,{scrollerProps:{...e,style:Vt},rowClassName:"aqmx-document-scroll-row",renderScrollBar:ut,children:t});function Gt({title:e,titleId:t,...n},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?y.createElement("title",{id:t},e):null,y.createElement("path",{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"}),y.createElement("path",{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"}))}const Wt=y.forwardRef(Gt);function Kt({title:e,titleId:t,...n},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?y.createElement("title",{id:t},e):null,y.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}),y.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const Xt=y.forwardRef(Kt),me=({name:e,url:t,icon:n,children:r})=>{const{labels:o}=$();return d.jsxs("div",{className:"aqmx-document-toolbar",children:[d.jsx("span",{className:"aqmx-document-file-icon","aria-hidden":"true",children:n}),d.jsx("span",{className:"aqmx-document-title",title:e,"data-testid":"markdown-explorer-file-name",children:e}),r,d.jsx("a",{className:"aqmx-icon-button",href:t,target:"_blank",rel:"noopener noreferrer","aria-label":o.openInNewTab,title:o.openInNewTab,"data-testid":"markdown-explorer-file-open",children:d.jsx(Xt,{})}),d.jsx("a",{className:"aqmx-icon-button",href:t,download:e,"aria-label":o.download,title:o.download,"data-testid":"markdown-explorer-file-download",children:d.jsx(Wt,{})})]})};function Yt({title:e,titleId:t,...n},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?y.createElement("title",{id:t},e):null,y.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const Jt=y.forwardRef(Yt),Qt=Object.freeze({className:"aqmx-document-stage"}),en=({document:e})=>{const{labels:t}=$();return d.jsxs("div",{className:"aqmx-document-file","data-testid":"markdown-explorer-file-view",children:[d.jsx(me,{name:e.name,url:e.url,icon:d.jsx(Jt,{})}),d.jsx(fe,{scrollerProps:Qt,children:d.jsxs("div",{className:"aqmx-callout",role:"note","data-testid":"markdown-explorer-file-not-shown",children:[d.jsx("p",{className:"aqmx-callout-body",children:t.fileNotShown}),d.jsx("a",{className:"aqmx-callout-action",href:e.url,download:e.name,"data-testid":"markdown-explorer-file-not-shown-download",children:t.download})]})})]})},Ne="[data-aqmd-scroll-container], [data-aqmx-document-scroller]",tn=e=>{const t=e.indexOf("#");return t===-1?"":e.slice(t)},nn=/(%[0-9A-Fa-f]{2})/u,Pe=e=>{if(!e.startsWith("#")||e.length===1)return null;const t=new TextEncoder,n=e.slice(1).split(nn).flatMap((r,o)=>o%2===1?[Number.parseInt(r.slice(1),16)]:[...t.encode(r)]);return new TextDecoder("utf-8",{ignoreBOM:!0}).decode(Uint8Array.from(n))},pt=e=>`#${encodeURIComponent(e)}`,rn=e=>{if(e==="#")return!0;const t=Pe(e);return t!==null&&t.replace(/[A-Z]/gu,n=>n.toLowerCase())==="top"},ht=(e,t)=>{if(t==="")return null;for(const n of e.querySelectorAll("[id]"))if(n.id===t)return n;return null},on="http://www.w3.org/1999/xhtml",qe=(e,t)=>{if(t==="")return null;const n=ht(e,t);if(n!==null)return n;for(const r of e.querySelectorAll("a[name]"))if(r.localName==="a"&&r.namespaceURI===on&&r.getAttribute("name")===t)return r;return null},wt=(e,t)=>{if(e===null||!t.startsWith("#"))return null;const n=qe(e,t.slice(1));if(n!==null)return n;const r=Pe(t);return r===null?null:qe(e,r)},Be=e=>{const{body:t,documentElement:n}=e.ownerDocument;if(e===t){const o=getComputedStyle(n);if(o.overflowX==="visible"&&o.overflowY==="visible")return!1}const{overflowY:r}=getComputedStyle(e);return r==="auto"||r==="scroll"},sn=e=>{const{body:t,documentElement:n}=e,r=getComputedStyle(n),o=r.overflowX==="visible"&&r.overflowY==="visible"&&t!==null?getComputedStyle(t).overflowY:r.overflowY;return o!=="hidden"&&o!=="clip"},ln=(e,t)=>{const n=t.closest(Ne),r=n!==null&&e.contains(n)?n:e;if(r.scrollHeight>r.clientHeight&&Be(r))return r;const o=e.getBoundingClientRect().height,{documentElement:s,scrollingElement:a}=e.ownerDocument;for(let c=e.parentElement;c!==null&&c!==s;c=c.parentElement)if(Be(c)&&c.scrollHeight>c.clientHeight&&c.clientHeight<o)return c;return a instanceof Element&&sn(e.ownerDocument)&&a.scrollHeight>a.clientHeight&&a.clientHeight<o?a:r},an=Object.freeze({scrollerOf:ln,reveal:e=>{e.scrollIntoView(Te)}}),Te=Object.freeze({block:"nearest",inline:"nearest",behavior:"instant"}),cn=(e,t)=>{for(let n=t;n!==null&&n!==e;n=n.parentElement){const r=n.parentElement;if(r instanceof HTMLDetailsElement&&n!==r.querySelector(":scope > summary")&&(r.open=!0),n.getAttribute("hidden")?.toLowerCase()==="until-found"){if(n.dispatchEvent(new Event("beforematch",{bubbles:!0})),!n.isConnected)return;n.removeAttribute("hidden")}}},dn=(e,t)=>{if(t.getClientRects().length===0)return;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(),c=a.height+s+Number.parseFloat(o)>e.clientHeight;if(!c&&Math.abs(a.top-s-n)<1){t.scrollIntoView(Te);return}e.scrollBy({top:c?a.top-n-e.clientHeight:a.bottom-n+e.clientHeight,behavior:"instant"}),t.scrollIntoView(Te)},un=(e,t)=>{const n=t.scrollerOf(e,e.querySelector(Ne)??e);n.getClientRects().length!==0&&(n.scrollTo({top:0,left:0,behavior:"instant"}),t.reveal(n))},ze=(e,t,n)=>{if(e===null)return null;const r=wt(e,t);return r===null?(rn(t)&&un(e,n),null):(cn(e,r),dn(n.scrollerOf(e,r),r),n.reveal(r),r)};function fn({title:e,titleId:t,...n},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?y.createElement("title",{id:t},e):null,y.createElement("path",{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"}))}const mn=y.forwardRef(fn);function gn({title:e,titleId:t,...n},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?y.createElement("title",{id:t},e):null,y.createElement("path",{d:"M6.75 8.25a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-4.5Z"}),y.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const pn=y.forwardRef(gn);function hn({title:e,titleId:t,...n},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?y.createElement("title",{id:t},e):null,y.createElement("path",{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"}),y.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const wn=y.forwardRef(hn);function vn({title:e,titleId:t,...n},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?y.createElement("title",{id:t},e):null,y.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const En=y.forwardRef(vn),Ae="data-aqmx-key-repeat",Le=Object.freeze({[Ae]:"allow"}),xn=`[${Ae}="${Le[Ae]}"]`,bn=()=>{let e=null;return{onKeyDownCapture:t=>{if(t.key==="Enter"){if(!t.repeat){e=t.target instanceof Element?t.target:null;return}e!==null&&t.target===e&&e.closest(xn)!==null||(t.preventDefault(),t.stopPropagation())}},onKeyUpCapture:t=>{t.key==="Enter"&&(e=null)},onBlurCapture:t=>{t.target===e&&(e=null)}}},le=Object.freeze([1/_.GOLDEN_RATIO**2,1/_.GOLDEN_RATIO,1,_.GOLDEN_RATIO,_.GOLDEN_RATIO**2]),He=Object.freeze({mode:"fit"}),Sn=1,Rn=Object.freeze({className:"aqmx-document-canvas","data-testid":"markdown-explorer-image-canvas"}),vt=i.createContext(null),yn=(e,t)=>e.width>0&&e.height>0&&t.width-e.width<=Sn?{base:e,scale:t.width/e.width}:t.width>0&&t.height>0?{base:t,scale:1}:null,Ie=(e,t,n)=>{if(e.mode==="level"){const o=e.index+n;return o>=0&&o<le.length?o:null}if(t===null||!Number.isFinite(t)||t<=0)return null;const r=n===1?le.findIndex(o=>o>t):le.findLastIndex(o=>o<t);return r===-1?null:r},Ue=(e,t,n)=>{if(e.mode==="level"){const o=Ie(e,null,n);return o===null?null:{mode:"level",index:o,base:e.base}}if(t===null)return null;const r=Ie(e,t.scale,n);return r===null?null:{mode:"level",index:r,base:t.base}},kn=e=>{const t=le[e];if(t===void 0)throw new RangeError(`[markdown-explorer] no image zoom step ${String(e)}`);return t},Ze=(e,t,n)=>e!==null&&e.width===t&&e.height===n?e:{width:t,height:n},Tn=({document:e})=>{const{labels:t}=$(),n=i.use(vt),[r]=i.useState(()=>n===null?null:n.read(e.url)),[o,s]=i.useState(r===null?He:r.zoom),[a,c]=i.useState(r===null?null:r.reported),[m,h]=i.useState(null),g=i.useRef(null),p=i.useCallback(O=>{const{naturalWidth:f,naturalHeight:w}=O;c(S=>Ze(S,f,w))},[]),x=i.useCallback(O=>{g.current=O,!(O===null||!O.complete)&&(O.naturalWidth>0||O.naturalHeight>0?p(O):O.decode().then(()=>p(O),()=>{}))},[p]);i.useEffect(()=>{n!==null&&a!==null&&n.save(e.url,{zoom:o,reported:a})},[n,e.url,o,a]),i.useLayoutEffect(()=>{const O=g.current;if(O===null||a===null||o.mode!=="fit")return;const f=()=>h(S=>Ze(S,O.clientWidth,O.clientHeight));if(f(),typeof ResizeObserver>"u")return;const w=new ResizeObserver(f);return w.observe(O),()=>w.disconnect()},[a,o.mode]);const T=a===null||m===null?null:yn(a,m),k=Ue(o,T,-1),L=Ue(o,T,1),A=o.mode==="level"?kn(o.index):null,F=o.mode==="level"&&A!==null?{width:`${o.base.width*A}px`,height:`${o.base.height*A}px`}:void 0;return d.jsxs("div",{className:"aqmx-document-file","data-testid":"markdown-explorer-image-view",children:[d.jsxs(me,{name:e.name,url:e.url,icon:d.jsx(En,{}),children:[d.jsx("button",{type:"button",className:"aqmx-icon-button","aria-label":t.imageZoomOut,title:t.imageZoomOut,"aria-disabled":k===null,onClick:()=>{k!==null&&s(k)},...Le,children:d.jsx(pn,{})}),d.jsx("output",{className:"aqmx-document-level","aria-live":"polite","data-testid":"markdown-explorer-image-level",children:A===null?t.imageFitLevel:t.imageZoomLevel(Math.round(A*100))}),d.jsx("button",{type:"button",className:"aqmx-icon-button","aria-label":t.imageZoomIn,title:t.imageZoomIn,"aria-disabled":L===null,onClick:()=>{L!==null&&s(L)},...Le,children:d.jsx(wn,{})}),d.jsx("button",{type:"button",className:"aqmx-icon-button","aria-label":t.imageFit,title:t.imageFit,"aria-pressed":o.mode==="fit",onClick:()=>s(He),children:d.jsx(mn,{})})]}),d.jsx(fe,{scrollerProps:Rn,children:d.jsx("img",{ref:x,className:"aqmx-document-image",src:e.url,alt:e.name,"data-aqmx-image-mode":o.mode,style:F,onLoad:O=>p(O.currentTarget),"data-testid":"markdown-explorer-image"})})]})},Et=i.createContext(null),ge=i.createContext(void 0),xt=i.createContext(null),pe=()=>{const e=i.use(Et);if(e===null)throw new Error("[markdown-explorer] document links must be rendered inside a document pane");return e},An=()=>{const e=i.use(xt);if(e===null)throw new Error("[markdown-explorer] table-of-contents entries must be rendered inside a document pane's links");return e},he=(e,t,n,r)=>t.kind==="panel"?_.explorerHref(e,{view:"tree",source:n,doc:r}):t.view==="single"?_.explorerHref(e,{view:"single",source:n,doc:r,overrides:t.overrides,embed:t.embed}):_.explorerHref(e,{view:"tree",source:n,doc:r,overrides:t.overrides}),Ln=({children:e})=>{const{config:t}=$(),n=pe(),r=de(),o=r.kind==="location"?r.location.source:void 0,s=Z.useHref(he(t,n.navigation,o,n.currentPath));return d.jsx(ge,{value:o,children:d.jsx(xt,{value:s,children:e})})},On='a[data-link-kind="doc"][data-doc-path]:not([data-doc-exists="false"])',Cn=e=>{const t=e instanceof Element?e.closest(On):null;return t===null?null:t.getAttribute("data-doc-path")},we=e=>!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey,Mn=({to:e,docPath:t,fragment:n,exists:r,className:o,attributes:s,onDocumentLink:a,scope:c,children:m})=>{const h=Z.useHref(e),g=p=>{if(we(p)){if(p.preventDefault(),t===c.currentPath&&n!==""){c.scrollWithin(n);return}a(t,n)}};return d.jsx("a",{...s,href:h,className:o,"data-link-kind":"doc","data-doc-path":t,"data-doc-exists":r,onClick:g,children:m})},jn=({href:e,docPath:t,docExists:n,className:r,attributes:o,children:s})=>{const{config:a}=$(),c=pe(),m=i.use(ge),h=tn(e),{navigation:g}=c,p=`${he(a,g,m,t)}${h}`,x=n===!1?"false":void 0;return g.kind==="page"?d.jsx(lt,{...o,to:p,navigation:"follow-link",className:r,"data-link-kind":"doc","data-doc-path":t,"data-doc-exists":x,children:s}):d.jsx(Mn,{to:p,docPath:t,fragment:h,exists:x,className:r,attributes:o,onDocumentLink:g.onDocumentLink,scope:c,children:s})},Nn=({className:e,attributes:t,children:n})=>{const{labels:r}=$();return d.jsxs("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:[n,d.jsxs("span",{className:"aqmx-sr-only",children:[" (",r.inertLink,")"]})]})},Pn=({href:e,className:t,attributes:n,scope:r,children:o})=>{const{config:s}=$(),a=i.use(ge),c=Z.useHref(`${he(s,r.navigation,a,r.currentPath)}${e}`),m=h=>{we(h)&&(h.preventDefault(),r.scrollWithin(e))};return d.jsx("a",{...n,href:c,className:t,onClick:m,children:o})},Dn=({href:e,className:t,attributes:n,children:r})=>{const o=pe();if(o.navigation.kind==="page"){const s=a=>{if(!we(a))return;const c=a.currentTarget;e==="#"?o.followEmptyFragment(a.nativeEvent):c.href===c.ownerDocument.URL&&o.followSameUrlJump(e,a.nativeEvent)};return d.jsx("a",{...n,href:e,className:t,onClick:s,children:r})}return d.jsx(Pn,{href:e,className:t,attributes:n,scope:o,children:r})},$n=({href:e,kind:t,docPath:n,docExists:r,className:o,attributes:s,children:a})=>t==="doc"?n===void 0||!P.isAcceptableDocumentPath(n)?d.jsx(Nn,{className:o,attributes:s,children:a}):d.jsx(jn,{href:e,docPath:n,docExists:r,className:o,attributes:s,children:a}):e.startsWith("#")?d.jsx(Dn,{href:e,className:o,attributes:s,children:a}):d.jsx("a",{...s,href:e,className:o,children:a}),Fn=()=>{const{config:e}=$(),t=pe(),n=i.use(ge),r=ue();return i.useCallback((o,s)=>{if(!we(s))return!0;s.preventDefault();const a=pt(o.id),{navigation:c}=t;return c.kind==="panel"||Pe(s.currentTarget.ownerDocument.location.hash)===o.id?(t.scrollWithin(a),!0):(r(`${he(e,c,n,t.currentPath)}${a}`,"follow-link"),!0)},[e,t,n,r])},_n=()=>{const e=An();return i.useCallback(t=>`${e}${pt(t.id)}`,[e])};function qn({title:e,titleId:t,...n},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?y.createElement("title",{id:t},e):null,y.createElement("path",{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"}))}const Bn=y.forwardRef(qn);function zn({title:e,titleId:t,...n},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?y.createElement("title",{id:t},e):null,y.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const Hn=y.forwardRef(zn);function In({title:e,titleId:t,...n},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?y.createElement("title",{id:t},e):null,y.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const Un=y.forwardRef(In),Zn=Object.freeze({className:"aqmx-document-stage"}),Vn=e=>{switch(e){case"video":return d.jsx(Hn,{});case"audio":return d.jsx(Un,{});case"pdf":return d.jsx(Bn,{});default:{const t=e;throw new RangeError(`[markdown-explorer] unknown media type ${String(t)}`)}}},Gn=({document:e})=>{const{labels:t}=$();switch(e.mediaType){case"video":return d.jsx("video",{className:"aqmx-document-video",src:e.url,controls:!0,preload:"metadata","aria-label":e.name,"data-testid":"markdown-explorer-media-player",children:t.mediaUnsupported});case"audio":return d.jsx("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});case"pdf":return d.jsx("iframe",{className:"aqmx-document-frame",src:e.url,title:e.name,"data-testid":"markdown-explorer-media-player"});default:{const n=e.mediaType;throw new RangeError(`[markdown-explorer] unknown media type ${String(n)}`)}}},Wn=({document:e})=>d.jsxs("div",{className:"aqmx-document-file","data-testid":"markdown-explorer-media-view","data-aqmx-media-type":e.mediaType,children:[d.jsx(me,{name:e.name,url:e.url,icon:Vn(e.mediaType)}),d.jsx(fe,{scrollerProps:Zn,children:d.jsx(Gn,{document:e})})]}),Kn=e=>({loading:e.viewerLoading,errorPrefix:e.viewerErrorPrefix,styleTitle:e.viewerStyleTitle,selectStyleAria:e.viewerSelectStyle,pinStyleAria:e.viewerPinStyle,unpinStyleAria:e.viewerUnpinStyle,defaultErrorTitle:e.viewerErrorTitle,missingImage:e.viewerMissingImage,openTocAria:e.viewerOpenToc,tocTitle:e.viewerTocTitle,pinTocAria:e.viewerPinToc,unpinTocAria:e.viewerUnpinToc,selectAlignAria:e.viewerSelectAlign,alignTitle:e.viewerAlignTitle,pinAlignAria:e.viewerPinAlign,unpinAlignAria:e.viewerUnpinAlign,alignLeft:e.viewerAlignLeft,alignCenter:e.viewerAlignCenter,alignRight:e.viewerAlignRight,mermaidInteractionMode:e.viewerMermaidInteractionMode,mermaidModeNone:e.viewerMermaidModeNone,mermaidModeZoom:e.viewerMermaidModeZoom,mermaidModePan:e.viewerMermaidModePan,mermaidModePanShift:e.viewerMermaidModePanShift,mermaidModeBoth:e.viewerMermaidModeBoth,mermaidModeBothShift:e.viewerMermaidModeBothShift,mermaidZoomIn:e.viewerMermaidZoomIn,mermaidZoomOut:e.viewerMermaidZoomOut,mermaidResetView:e.viewerMermaidResetView,mermaidRetry:e.viewerMermaidRetry,embeddedVideo:e.viewerEmbeddedVideo,embeddedPost:e.viewerEmbeddedPost,embeddedFrame:e.viewerEmbeddedFrame}),bt=(e,t,n)=>{if(t!==void 0)return t;if(n!==void 0)return n;const[r]=e.documentStyles;if(r===void 0)throw new Error("[markdown-explorer] the configuration has no document style");return r.name},St=(e,t)=>e!==void 0?e:t!==void 0?t:Mt.DEFAULT_CONTENT_ALIGN,Xn=Object.freeze(["l1","l2","l3","l4","l5","l6","l7","l8"]),Yn=(e,t,n)=>{if(t.view==="multi"||t.overrides[n]===void 0)return null;const r=n==="style"?{align:t.overrides.align}:{style:t.overrides.style};return t.view==="single"?_.explorerHref(e,{view:"single",source:t.source,doc:t.doc,overrides:r,embed:t.embed}):_.explorerHref(e,{view:"tree",source:t.source,doc:t.doc,overrides:r})},De=({kind:e,label:t,stale:n,busy:r,frameRef:o,intent:s,children:a})=>{const c=i.use(ce);return d.jsxs("section",{ref:o,role:"region","aria-label":t,"aria-busy":r,"data-testid":"markdown-explorer-document","data-aqmx-document-kind":e,"data-aqmx-document-flow":c,className:"aqmx-document",...s,children:[n?d.jsx("div",{className:"aqmx-progress","aria-hidden":"true","data-testid":"markdown-explorer-document-progress"}):null,a]})},Jn=()=>{const{labels:e}=$();return d.jsx(De,{kind:"empty",label:e.documentRegion,stale:!1,busy:!1,children:d.jsx("div",{className:"aqmx-empty","data-testid":"markdown-explorer-document-empty",children:d.jsx("p",{className:"aqmx-empty-title",children:e.documentEmpty})})})},Rt=({label:e})=>{const{labels:t}=$();return d.jsxs(De,{kind:"loading",label:e,stale:!1,busy:!0,children:[d.jsx("div",{className:"aqmx-skeleton","aria-hidden":"true","data-testid":"markdown-explorer-document-skeleton",children:Xn.map(n=>d.jsx("span",{},n))}),d.jsx("p",{className:"aqmx-sr-only",children:t.documentLoading})]})},Qn=({path:e,document:t,viewer:n})=>{const{reportMathDiagnostics:r}=$(),o=i.useMemo(()=>({htmlContent:t.htmlContent,headings:[...t.headings]}),[t]),s=Fn(),a=_n(),c=i.useMemo(()=>r===void 0?void 0:m=>r(e,m),[r,e]);return d.jsx("div",{className:"aqmx-document-viewer",children:d.jsx(J.MarkdownViewer,{...n,onHeadingSelect:s,headingHref:a,onMathDiagnostics:c,parseResult:o,content:null})})},er=({document:e,viewer:t})=>{const{labels:n}=$();return d.jsxs(d.Fragment,{children:[d.jsx(me,{name:e.name,url:e.url,icon:d.jsx(Bt,{})}),e.truncated?d.jsx("p",{className:"aqmx-callout aqmx-document-notice",role:"note","data-testid":"markdown-explorer-text-truncated",children:n.textTruncated}):null,d.jsx("div",{className:"aqmx-document-viewer",children:d.jsx(J.MarkdownViewer,{...t,parseResult:null,content:e.text})})]})},tr=Object.freeze({className:"aqmx-document-failure","data-aqmx-document-scroller":""}),nr=({path:e,document:t,viewer:n,onRetry:r})=>{switch(t.kind){case"markdown":return d.jsx(Qn,{path:e,document:t,viewer:n});case"text":return d.jsx(er,{document:t,viewer:n});case"image":return d.jsx(Tn,{document:t});case"media":return d.jsx(Wn,{document:t});case"file":return d.jsx(en,{document:t});case"failure":return d.jsx(fe,{scrollerProps:tr,children:d.jsx(at,{failure:t.failure,alert:!1,onRetry:r,testId:"markdown-explorer-document-failure"})});default:{const o=t;throw new RangeError(`[markdown-explorer] unknown document kind in ${JSON.stringify(o)}`)}}},rr='a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), iframe, audio[controls], video[controls], [tabindex]:not([tabindex="-1"])',or=(e,t,n)=>{const[r]=t.kind==="markdown"?t.headings:[],o=[n===null?null:wt(e,n),r===void 0?null:ht(e,r.id),e.querySelector(Ne),e.querySelector(rr)];for(const s of o)if(s instanceof HTMLElement&&je(s))return s;return null},Ve=(e,t,n)=>{const{activeElement:r,body:o}=e.ownerDocument,s=r===null||r===o;t instanceof HTMLElement&&n&&(s||e.contains(r))&&je(t)},sr=e=>{const t=i.useRef(!1);return i.useLayoutEffect(()=>{const n=e.current;if(n===null)throw new Error("[markdown-explorer] the document region is not mounted");const r=n.ownerDocument,o=r.defaultView;if(o===null)throw new Error("[markdown-explorer] the document region's document has no window");let s=!1,a;const c=x=>{s=!(x.target instanceof Node&&n.contains(x.target)),s&&!n.contains(r.activeElement)&&(t.current=!1),clearTimeout(a),a=setTimeout(()=>{s=!1},0)},m=x=>{t.current=x.target instanceof Node&&n.contains(x.target)},h=x=>{x.relatedTarget===null&&s&&(t.current=!1)},g=()=>{const{activeElement:x,body:T}=r;x!==null&&x!==T&&(t.current=n.contains(x))},p=()=>{s&&!n.contains(r.activeElement)&&(t.current=!1)};return o.addEventListener("pointerdown",c,!0),o.addEventListener("mousedown",c,!0),o.addEventListener("focusin",m,!0),o.addEventListener("blur",g),o.addEventListener("focus",p),n.addEventListener("focusout",h),()=>{clearTimeout(a),o.removeEventListener("pointerdown",c,!0),o.removeEventListener("mousedown",c,!0),o.removeEventListener("focusin",m,!0),o.removeEventListener("blur",g),o.removeEventListener("focus",p),n.removeEventListener("focusout",h)}},[e]),t},lr=({path:e,snapshot:t,stale:n,viewer:r,regionLabel:o,navigation:s,fragment:a,paneScroll:c,announces:m,announceFailure:h,onDocumentShown:g})=>{const{labels:p,announcer:x,documents:T}=$(),{document:k}=t,L=i.useRef(null),A=i.useRef(null),F=i.useRef(null),O=i.useRef(0),f=sr(L),w=i.useRef({path:e,document:k}),S=i.useRef(null),b=i.useCallback(l=>{const u=L.current,v=ze(u,l,c);u!==null&&v!==null&&Ve(u,v,f.current)},[c,f]),R=i.useCallback((l,u)=>{const v=O.current;setTimeout(()=>{!u.defaultPrevented&&O.current===v&&b(l)},0)},[b]),D=i.useCallback(l=>{setTimeout(()=>{l.defaultPrevented||b("#")},0)},[b]),H=i.useMemo(()=>({navigation:s,currentPath:e,scrollWithin:b,followSameUrlJump:R,followEmptyFragment:D}),[s,e,b,R,D]),j=i.useCallback(()=>T.retry(e),[T,e]),q=ct(T,Cn),U=i.useEffectEvent((l,u)=>{const v=A.current;if(v!==null&&v.path===l&&v.snapshot===u)return;A.current={path:l,snapshot:u};const E=u.document;if(E.kind==="failure"){T.noteFailureShown(u)&&h(p.documentFailed(P.lastPathSegment(l),te(p,E.failure.reason)));return}g?.(l,E),m&&(v===null||v.path!==l||v.snapshot.document.kind==="failure")&&x.announce(p.documentShown(E.name))});i.useEffect(()=>{U(e,t)},[e,t]);const C=i.useEffectEvent(()=>{a.kind==="panel"&&a.consume()}),I=i.useEffectEvent(l=>{const u=L.current;if(u===null||!f.current)return null;const{activeElement:v,body:E}=u.ownerDocument;return v!==null&&v!==E?null:or(u,k,l)}),G=i.useEffectEvent(l=>{const u=L.current;u!==null&&Ve(u,l,f.current)}),V=i.useEffectEvent(l=>c.reveal(l)),ve=i.useEffectEvent(l=>ze(L.current,l,c));return i.useEffect(()=>{if(n)return;const l=w.current.path!==e,u=l||w.current.document!==k;w.current={path:e,document:k};const v=S.current!==e;S.current=e;let E=null;a.kind==="page"?F.current!==a.navigation&&(F.current=a.navigation,O.current+=1,E=a.fragment):a.fragment!==null&&(E=a.fragment,C());const M=()=>{const N=E===null?null:ve(E);if(!u){N!==null&&G(N);return}const B=I(a.fragment);l&&N===null&&B!==null&&V(B)};v?queueMicrotask(M):M()},[a,e,k,n]),d.jsx(De,{kind:k.kind,label:o(e,k),stale:n,busy:n,frameRef:L,intent:q,children:d.jsx(Et,{value:H,children:d.jsx(Ln,{children:d.jsx(nr,{path:e,document:k,viewer:r,onRetry:j},e)})})})},$e=Object.freeze({kind:"skeleton"}),ir=(e,t,n,r,o)=>{if(t?.status==="loaded")return{kind:"document",path:e,snapshot:t,stale:!1};const s=ae(t);if(s!==null)return{kind:"document",path:e,snapshot:s,stale:!0};if(o&&t?.status==="pending")return{kind:"streaming",path:e,promise:t.promise};const a=n===null||n===e?null:ae(r);return n===null||a===null?$e:{kind:"document",path:n,snapshot:a,stale:!0}},ar=(e,t)=>t.status==="deferred"?$e:{kind:"document",path:e,snapshot:t,stale:!1},cr=({requestedPath:e,content:t,...n})=>{const r=t.kind==="streaming"?ar(t.path,i.use(t.promise)):t;return r.kind!=="document"?d.jsx(Rt,{label:n.regionLabel(e,null)}):d.jsx(lr,{path:r.path,snapshot:r.snapshot,stale:r.stale,...n})},yt=({path:e,display:t,navigation:n,fragment:r,paneScroll:o,announces:s,announceFailure:a,onDocumentShown:c})=>{const{config:m,labels:h,theme:g,documents:p}=$(),x=J.useMarkdownToolbarState(),T=i.useRef(!1);i.useLayoutEffect(()=>{T.current=!0},[]);const[k,L]=i.useState(null),A=i.useCallback(()=>e===null?void 0:p.peek(e),[p,e]),F=i.useSyncExternalStore(p.subscribe,A,A),O=i.useCallback(()=>k===null?void 0:p.peek(k),[p,k]),f=i.useSyncExternalStore(p.subscribe,O,O);i.useLayoutEffect(()=>e===null?void 0:p.open(e),[p,e]),i.useLayoutEffect(()=>k===null?void 0:p.retain(k),[p,k]);const w=e===null?$e:ir(e,F,k,f,!T.current),S=e===null?null:w.kind==="document"&&!w.stale?w.path:k;S!==k&&L(S);const b=i.useMemo(()=>Kn(h),[h]),R=i.useMemo(()=>[...m.iframeHosts],[m]),D=n.kind==="panel",H=i.useMemo(()=>({labels:b,emptyMessage:h.documentEmpty,theme:g,availableStyles:m.documentStyles,iFrameAllowedDomains:R,embeds:m.embeds,linkComponent:$n,toolbar:x,style:t.style,onStyleChange:t.onStyleChange,align:t.align,onAlignChange:t.onAlignChange,showToc:t.showToc,showStyle:t.showStyle,showAlign:t.showAlign,padding:t.padding,width:t.width===void 0?void 0:`min(${t.width}, 100%)`,maxWidth:t.maxWidth===void 0?void 0:`min(${t.maxWidth}, 100%)`,renderScrollBar:D?void 0:ut}),[b,h.documentEmpty,g,m.documentStyles,R,m.embeds,x,t,D]),j=i.useCallback((U,C)=>D?C===null||C.kind==="failure"?P.lastPathSegment(U):C.name:h.documentRegion,[D,h.documentRegion]),q=D?"content":"fill";return e===null?d.jsx(ce,{value:q,children:d.jsx(Jn,{})}):d.jsx(ce,{value:q,children:d.jsx(i.Suspense,{fallback:d.jsx(Rt,{label:j(e,null)}),children:d.jsx(cr,{requestedPath:e,content:w,viewer:H,regionLabel:j,navigation:n,fragment:r,paneScroll:o,announces:s,announceFailure:a,onDocumentShown:c})})})},dr=({path:e,variant:t,onDocumentShown:n})=>{const{config:r,viewSettings:o,announcer:s}=$(),a=Q(R=>R.style),c=Q(R=>R.align),m=ue(),h=Z.useLocation(),g=de(),{view:p,overrides:x,embed:T}=t,k=i.useCallback(R=>{if(g.kind!=="location")return;const D=Yn(r,g.location,R);D!==null&&m(D,"browse")},[r,m,g]),L=i.useCallback(R=>{o.update({style:R}),k("style")},[o,k]),A=i.useCallback(R=>{o.update({align:R}),k("align")},[o,k]),F=bt(r,x.style,a),O=St(x.align,c),f=i.useMemo(()=>({style:F,onStyleChange:L,align:O,onAlignChange:A,showToc:T.showToc!==!1,showStyle:T.showStyle!==!1,showAlign:T.showAlign!==!1,padding:T.padding,width:T.width,maxWidth:T.maxWidth}),[F,L,O,A,T]),w=i.useMemo(()=>({kind:"page",view:p,overrides:x,embed:T}),[p,x,T]),S=i.useMemo(()=>({kind:"page",fragment:h.hash,navigation:h}),[h]),b=i.useCallback(R=>s.announce(R),[s]);return d.jsx(yt,{path:e,display:f,navigation:w,fragment:S,paneScroll:an,announces:!0,announceFailure:b,onDocumentShown:n})},ur=({path:e,variant:t,onDocumentShown:n})=>{const{config:r,viewSettings:o}=$(),s=Q(w=>w.style),a=Q(w=>w.align),[c,m]=i.useState(()=>bt(r,void 0,s)),h=St(void 0,a),g=i.useCallback(w=>o.update({align:w}),[o]),{maximized:p,onDocumentLink:x,pendingHash:T,onHashConsumed:k,announceFailure:L,paneScroll:A}=t,F=i.useMemo(()=>({style:c,onStyleChange:m,align:h,onAlignChange:g,showToc:p,showStyle:p,showAlign:p,padding:void 0,width:void 0,maxWidth:void 0}),[c,h,g,p]),O=i.useMemo(()=>({kind:"panel",onDocumentLink:x}),[x]),f=i.useMemo(()=>({kind:"panel",fragment:T,consume:k}),[T,k]);return d.jsx(yt,{path:e,display:F,navigation:O,fragment:f,paneScroll:A,announces:!1,announceFailure:L,onDocumentShown:n})},kt=({path:e,variant:t,onDocumentShown:n})=>t.kind==="page"?d.jsx(dr,{path:e,variant:t,onDocumentShown:n}):d.jsx(ur,{path:e,variant:t,onDocumentShown:n});function fr({title:e,titleId:t,...n},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?y.createElement("title",{id:t},e):null,y.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const Tt=y.forwardRef(fr),mr=new Set,gr=(e,t)=>{const{documents:n,announcer:r,labels:o}=$(),s=i.useCallback(()=>n.peek(e),[n,e]),a=i.useCallback(()=>n.peekSeeded(e),[n,e]),c=i.useSyncExternalStore(n.subscribe,s,a),m=i.useCallback(()=>n.answerStampOf(e),[n,e]),h=i.useSyncExternalStore(n.subscribe,m,m),[g]=i.useState(()=>new Set),[p,x]=i.useState(mr),[T,k]=i.useState(null);T!==null&&T.path!==e&&k(null);const L=i.useRef(null);i.useLayoutEffect(()=>(L.current=e,()=>{L.current=null}),[e]);const A=i.useCallback(()=>{const f=e,w=n.peek(f);if(g.has(f)||w?.status==="pending")return;const S=t&&!gt(w);g.add(f),x(new Set(g)),k(null),(async()=>{try{const b=await n.refresh(f);if(L.current!==f||b.status==="superseded")return;if(b.status==="failed"){k({path:f,failure:b.failure,stamp:n.answerStampOf(f)}),r.announce(o.documentRefreshFailed(te(o,b.failure.reason)));return}const R=ae(n.peek(f));if(S||R===null||R.document.kind==="failure")return;r.announce(o.documentRefreshed(R.document.name))}finally{g.delete(f),x(new Set(g))}})()},[e,t,g,n,r,o]),F=p.has(e),O=T!==null&&T.path===e&&T.stamp===h?T.failure:null;return{refreshing:F,unavailable:F||c?.status==="pending",failure:O,refresh:A}},At=Object.freeze({kind:"page"}),pr=e=>{e.stopPropagation()},Lt=({path:e,placement:t})=>{const{labels:n}=$(),{refreshing:r,unavailable:o,failure:s,refresh:a}=gr(e,t.kind==="page"),c=t.kind==="panel"?n.refreshDocumentNamed(t.documentName):null;return d.jsxs("div",{className:"aqmx-document-refresh-bar","data-testid":"markdown-explorer-document-refresh-bar",children:[d.jsx("div",{className:"aqmx-document-refresh-row",children:d.jsxs("button",{type:"button",className:c===null?"aqmx-icon-button aqmx-labelled-button":"aqmx-icon-button",title:c===null?n.refreshDocument:c,"aria-label":c===null?void 0:c,"aria-disabled":o,"aria-busy":r,"data-aqmx-busy":r?"true":void 0,"data-testid":"markdown-explorer-document-refresh",onClick:a,onDoubleClick:pr,children:[d.jsx(Tt,{"aria-hidden":"true"}),c===null?d.jsx("span",{children:n.refreshDocumentLabel}):null]})}),s===null?null:d.jsx("p",{className:"aqmx-document-refresh-failure","data-testid":"markdown-explorer-document-refresh-failure","data-aqmx-failure":s.reason,children:n.documentRefreshFailed(te(n,s.reason))})]})},hr=({location:e})=>{const t=e.doc,n=i.useMemo(()=>({kind:"page",view:"single",overrides:e.overrides,embed:e.embed}),[e.overrides,e.embed]);return d.jsxs("div",{className:"aqmx-single aqmx-document-column","data-testid":"markdown-explorer-single",children:[d.jsx(Lt,{path:t,placement:At}),d.jsx(kt,{path:t,variant:n})]})},Ot=({holds:e,testId:t})=>{const{labels:n,announcer:r}=$(),o=i.useId();i.useLayoutEffect(()=>e?r.claim(o):void 0,[e,r,o]);const s=i.useCallback(()=>r.shownIn(o),[r,o]),a=i.useSyncExternalStore(r.subscribe,s,s);return d.jsx("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]})},Y=Object.freeze([]),wr=e=>{const t=new Set;let n=Y,r=[],o=!1;const s=[],a=g=>{n=g;for(const p of[...t])p()},c=()=>s.at(-1)?.region,m=g=>{const p=c();g(),c()!==p&&n!==Y&&a(Y)},h=()=>{o=!1;const g=r.map(p=>"sentence"in p?p.sentence:p.list(p.items));r=[],a(Object.freeze(g))};return{announce:g=>{if(typeof g=="string")r.push({sentence:g});else{const p=r.find(x=>"list"in x&&x.list===g.list);p!==void 0&&"items"in p?p.items.push(g.item):r.push({list:g.list,items:[g.item]})}o||(o=!0,n!==Y&&a(Y),e.request(h))},subscribe:g=>(t.add(g),()=>{t.delete(g)}),claim:g=>{const p={region:g};return m(()=>s.push(p)),()=>m(()=>{const x=s.indexOf(p);x!==-1&&s.splice(x,1)})},shownIn:g=>c()===g?n:Y}},xe=Object.freeze({status:"cancelled"}),vr=e=>{if(e===null||typeof e!="object")return null;const{failure:t}=e;if(P.failureViolation(t)!==null)return null;const{reason:n,code:r}=t;return P.failureOf(n,r)},Er=({dataPath:e,onScope:t,fetch:n})=>{const r=n??((c,m)=>globalThis.fetch(c,m)),o=(c,m)=>`${e}/${c}?${new URLSearchParams(m).toString()}`,s=async(c,m,h,g)=>{let p;try{p=await r(c,{credentials:"same-origin",...m,headers:{Accept:"application/json",...m.headers}})}catch{return g({reason:"failed"})}p.status===401&&t(null);const x=p.headers.get(P.EXPLORER_SCOPE_HEADER);x!==null&&t(x);let T;try{T=await p.json()}catch{return g({reason:P.failureReasonOfStatus(p.status)})}let k;try{k=h(T)}catch{k=!1}if(k)return T;const L=vr(T);return g(L!==null?L:{reason:p.status===200?"failed":P.failureReasonOfStatus(p.status)})},a={[P.EXPLORER_REFRESH_HEADER]:P.EXPLORER_REFRESH_HEADER_VALUE};return{tree:c=>s(o("tree",{[P.EXPLORER_DATA_QUERY.source]:c}),{method:"GET"},P.isExplorerTreeResult,m=>({status:"error",failure:m})),children:async(c,m,h)=>{const g=await s(o("children",{[P.EXPLORER_DATA_QUERY.source]:c,[P.EXPLORER_DATA_QUERY.path]:m}),{method:"GET",signal:h},P.isExplorerChildrenResult,p=>({status:"error",failure:p}));return h.aborted?xe:g},ancestors:async(c,m,h)=>{const g=await s(o("ancestors",{[P.EXPLORER_DATA_QUERY.source]:c,[P.EXPLORER_DATA_QUERY.path]:m}),{method:"GET",signal:h},P.isExplorerAncestorsResult,p=>({status:"error",failure:p}));return h.aborted?xe:g},reveal:async(c,m,h)=>{const g=await s(o("reveal",{[P.EXPLORER_DATA_QUERY.source]:c,[P.EXPLORER_DATA_QUERY.path]:m}),{method:"GET",signal:h},P.isExplorerRevealResult,p=>({status:"error",failure:p}));return h.aborted?xe:g},document:(c,{refresh:m})=>s(o("document",{[P.EXPLORER_DATA_QUERY.path]:c}),m?{method:"GET",headers:a}:{method:"GET"},P.isExplorerDocument,h=>P.failureDocument(h.reason,h.code)),refresh:c=>s(o("refresh",{[P.EXPLORER_DATA_QUERY.source]:c}),{method:"POST",headers:a},P.isExplorerTreeResult,m=>({status:"error",failure:m}))}},xr=()=>{let e=null,t=null;return{settle:n=>{e=n},mayMove:n=>e!==n,move:(n,r,o)=>{e=r,t={sourceId:n,path:r,ancestors:o}},take:(n,r)=>{const o=t!==null&&t.sourceId===n&&t.path===r?t.ancestors:null;return t=null,o}}},br=e=>{const t=X.readStorage(e);if(t===null)return _.NO_TREE_SETTING_CHANGES;try{return _.readTreeSettingChanges(JSON.parse(t))}catch(n){return console.warn(`[markdown-explorer] localStorage key ${JSON.stringify(e)} does not hold JSON; using the default tree settings.`,n),_.NO_TREE_SETTING_CHANGES}},Ge=(e,t)=>{let n=null;const r=()=>{if(n===null){const s=br(e);n={changes:s,settings:_.applyTreeSettingChanges(t,s)}}return n},o=ne();return{storageKey:e,defaults:t,getSnapshot:()=>r().settings,getServerSnapshot:()=>t,subscribe:o.subscribe,advance:s=>{const{changes:a,settings:c}=r(),m=_.recordTreeSettingChange(a,s,_.advanceTreeSetting(c,s)[s],t);return n={changes:m,settings:_.applyTreeSettingChanges(t,m)},o.emit(),X.writeStorage(e,_.serializeTreeSettingChanges(m)),n.settings}}},Sr=Object.freeze({status:"refreshed"}),Rr=Object.freeze({status:"superseded"}),Oe=Object.freeze({status:"deferred"}),yr=mt(Oe),Ct=4,kr=Ct-1,We=Object.freeze({status:"loading"}),Tr=Object.freeze({status:"error",failure:Object.freeze({reason:"failed"})}),Ar=e=>{const t=new Map,n=ft(),r=new Map,o=new Map,s=new Map,a=new Map,c=ne(),m=new Set;let h=0,g=0;const p={direct:null,bulk:null},x=new Set;let T=!1,k=0;const L=()=>{k+=1,c.emit()},A=l=>o.get(l)??0,F=l=>{let u=a.get(l);return u===void 0&&(u={claims:new Map,unclaimed:new Set,direct:new Set,bulk:new Set,inFlight:new Map},a.set(l,u)),u},O=(l,u,v)=>{l.inFlight.delete(u),h-=1,v.lane==="bulk"&&(g-=1)},f=l=>{const u=a.get(l);if(u!==void 0){for(const[v,E]of[...u.inFlight])O(u,v,E),E.controller.abort();u.direct.clear(),u.bulk.clear(),u.unclaimed.clear()}},w=l=>{const u=A(l)+1;return o.set(l,u),f(l),u},S=(l,u)=>{const v=re(l),E={promise:l,opened:u,stale:!1,loadedAt:v?.status==="ok"?v.loadedAt:null};return l.status==="pending"&&l.then(M=>{M.status==="ok"&&(E.loadedAt=M.loadedAt)}),E},b=l=>{let u=r.get(l);return u===void 0&&(u=new Map,r.set(l,u)),u},R=l=>{const u=[...a.keys()],v=p[l],E=v===null?0:u.indexOf(v)+1;for(let M=0;M<u.length;M+=1){const N=u[(E+M)%u.length],B=N===void 0?void 0:a.get(N);if(!(N===void 0||B===void 0)){for(const z of B[l])if((B.claims.get(z)??0)!==0)return B[l].delete(z),p[l]=N,{sourceId:N,path:z}}}return null},D=(l,u,v,E)=>{const M=a.get(l);if(M===void 0||M.inFlight.get(u)!==v)return;O(M,u,v);const N=(M.claims.get(u)??0)>0,B=b(l);if(E.status==="ok"?B.set(u,{status:"loaded",entries:E.entries}):E.status==="error"&&N?B.set(u,{status:"failed",failure:E.failure}):B.delete(u),L(),E.status==="error"&&N){const z={sourceId:l,path:u,failure:E.failure};for(const W of[...m])W(z)}j()},H=(l,u,v)=>{const E={controller:new AbortController,lane:v};F(l).inFlight.set(u,E),h+=1,v==="bulk"&&(g+=1),e.children(l,u,E.controller.signal).then(M=>D(l,u,E,M),()=>D(l,u,E,Tr))},j=()=>{for(;h<Ct;){const l=R("direct");if(l!==null){H(l.sourceId,l.path,"direct");continue}const u=g<kr?R("bulk"):null;if(u===null)return;H(u.sourceId,u.path,"bulk")}},q=(l,u,v)=>{if(!(u.direct.delete(v)||u.bulk.delete(v))){const M=u.inFlight.get(v);if(M===void 0)return!1;O(u,v,M),M.controller.abort()}return r.get(l)?.delete(v),!0},U=()=>{T=!1;let l=!1;for(const u of x){const v=F(u);for(const E of v.unclaimed)(v.claims.get(E)??0)===0&&q(u,v,E)&&(l=!0);v.unclaimed.clear()}x.clear(),l&&(L(),j())},C=(l,u)=>{t.set(l,S(ee(e.tree(l)),u))},I=(l,u,v)=>{w(l);const E=S(mt(u),v);return t.set(l,E),r.delete(l),L(),j(),E},G=(l,u,v,E)=>{if(v!==A(l)||t.get(l)!==u)return;const M=re(u.promise);if(!(E.status!=="ok"||M?.status!=="ok"||u.loadedAt===null||E.loadedAt<=u.loadedAt)){if(ie(M.entries,E.entries)){u.loadedAt=E.loadedAt;return}I(l,E,u.opened)}},V=(l,u)=>{const v=t.get(l);return v!==void 0&&re(v.promise)?.status===u},ve=(l,u)=>{u.stale=!1;const v=A(l);e.tree(l).then(E=>G(l,u,v,E))};return{read:l=>t.get(l)?.promise??yr,open:l=>{const u=n.resumes(l),v=n.hold(l),E=t.get(l);return E===void 0||V(l,"deferred")?(C(l,!0),L()):u||(E.opened&&V(l,"error")?(C(l,!0),L()):(E.opened=!0,E.stale&&V(l,"ok")&&ve(l,E))),v},retry:l=>{V(l,"error")&&(C(l,!0),L())},seed:(l,u)=>{const v=u.then(N=>N===null?Oe:N,()=>Oe),E=t.get(l);if(E!==void 0&&V(l,"ok")){const N=A(l);v.then(B=>G(l,E,N,B));return}w(l);const M=S(ee(v),E?.opened===!0);t.set(l,M),r.delete(l),j(),v.then(N=>{t.get(l)===M&&(N.status==="deferred"&&n.isHeld(l)&&C(l,M.opened),L())})},refresh:async l=>{const u=(s.get(l)??0)+1;s.set(l,u);const v=await e.refresh(l);if(s.get(l)!==u)return Rr;if(v.status==="error")return{status:"failed",failure:v.failure};const E=t.get(l);if(!(E!==void 0&&E.loadedAt!==null&&V(l,"ok")&&E.loadedAt>v.loadedAt)){const N=I(l,v,!0);if(E!==void 0&&E.promise.status==="pending"){const B=A(l);E.promise.then(z=>G(l,N,B,z))}}for(const[N,B]of t)N!==l&&re(B.promise)?.status==="ok"&&(B.stale=!0);return Sr},children:(l,u)=>r.get(l)?.get(u),claimChildren:(l,u)=>{const v=F(l),E=b(l);let M=!1,N=!1;for(const[z,W]of u)v.claims.set(z,(v.claims.get(z)??0)+1),E.get(z)===void 0?(E.set(z,We),v[W].add(z),M=!0,N=!0):W==="direct"&&v.bulk.delete(z)&&(v.direct.add(z),N=!0);M&&L(),N&&j();let B=!1;return()=>{if(!B){B=!0;for(const z of u.keys()){const W=(v.claims.get(z)??0)-1;W>0?v.claims.set(z,W):(v.claims.delete(z),v.unclaimed.add(z))}x.add(l),!T&&(T=!0,queueMicrotask(U))}}},retryChildren:(l,u)=>{const v=r.get(l);if(v===void 0||v.get(u)?.status!=="failed")return;const E=F(l);if((E.claims.get(u)??0)>0){v.set(u,We),E.direct.add(u),L(),j();return}v.delete(u),L()},pendingChildren:l=>{const u=a.get(l);return u===void 0?0:u.direct.size+u.bulk.size+u.inFlight.size},clear:()=>{for(const l of new Set([...t.keys(),...r.keys(),...o.keys(),...a.keys()]))w(l);for(const[l,u]of s)s.set(l,u+1);t.clear(),r.clear(),L()},subscribeChildrenFailures:l=>(m.add(l),()=>{m.delete(l)}),subscribe:c.subscribe,version:()=>k}},Lr=(e,t)=>{let n=e;const r=ne();return{getSnapshot:()=>n,subscribe:r.subscribe,update:o=>{n={...n,...o},t(n),r.emit()}}},Or=1;let oe=0,K=null;const Cr=()=>{const{documentElement:e,body:t}=document;oe===0&&(K={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"),oe+=1;let n=!1;return()=>{n||(n=!0,oe-=1,!(oe>0||K===null)&&(e.style.overflow=K.htmlOverflow,t.style.overflow=K.bodyOverflow,e.style.scrollbarGutter=K.htmlGutter,t.style.scrollbarGutter=K.bodyGutter,K=null))}},Mr=[{selector:'[data-aqmx-document-flow="fill"]',name:"document region"},{selector:"[data-aqmx-explorer-body]",name:"tree area"}],Ke=1,Xe=e=>e.getClientRects().length>0,be="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.",jr=e=>{if(!Xe(e))return null;const t=e.getBoundingClientRect(),n=window.innerHeight;if(t.bottom>n+Or)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. ${be}`;if(t.height<Ke)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. ${be}`;for(const{selector:r,name:o}of Mr)for(const s of e.querySelectorAll(r)){if(!Xe(s))continue;const a=s.getBoundingClientRect().height;if(a<Ke)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. ${be}`}return null},Nr=e=>{let t=!1;const n=()=>{if(t)return;const o=jr(e);o!==null&&(t=!0,console.error(o))},r=typeof ResizeObserver>"u"?null:new ResizeObserver(n);return r?.observe(e),window.addEventListener("resize",n),n(),()=>{r?.disconnect(),window.removeEventListener("resize",n)}},Pr=(e,t)=>{i.useEffect(()=>e?Cr():void 0,[e]),i.useEffect(()=>{const n=t.current;if(!(!e||n===null))return Nr(n)},[e,t])},Ye='[data-testid="markdown-explorer-view-switch"]',Dr=[{control:Ye,successors:[Ye,'[data-testid="markdown-explorer-sheet-toggle"]']},{control:'[data-testid="markdown-explorer-selection-open"]',successors:['[data-testid="markdown-explorer-panel-frame"]']}],$r=e=>{for(const t of Dr){const n=e.closest(t.control);if(n!==null)return{element:n,control:t}}return null},Fr=(e,t)=>{const n=i.useRef(null);i.useEffect(()=>{const o=c=>{const m=e.current;n.current=m!==null&&c instanceof Element&&m.contains(c)?$r(c):null},s=c=>o(c.target);o(document.activeElement);const a=c=>{const m=c.target;c.relatedTarget!==null||!(m instanceof Element)||queueMicrotask(()=>{n.current?.element===m&&m.isConnected&&document.activeElement!==m&&(n.current=null)})};return document.addEventListener("focusin",s),document.addEventListener("focusout",a),()=>{document.removeEventListener("focusin",s),document.removeEventListener("focusout",a)}},[e]);const r=i.useRef(t);i.useLayoutEffect(()=>{if(r.current===t)return;r.current=t;const o=n.current;if(o===null)return;const s=()=>{const m=document.activeElement;if(m!==null&&m!==document.body&&m!==o.element)return!0;const h=e.current;if(h===null)return!0;for(const g of o.control.successors)for(const p of h.querySelectorAll(g))if(p!==o.element&&(p.focus({preventScroll:!0}),document.activeElement===p))return!0;return!1};if(s())return;const a=e.current;if(a===null)return;const c=new MutationObserver(()=>{s()&&c.disconnect()});return c.observe(a,{childList:!0,subtree:!0}),()=>c.disconnect()},[t,e])},_r=i.lazy(()=>Promise.resolve().then(()=>require("./TreeLayout-rwhJfLmU.cjs")).then(e=>({default:e.TreeLayout}))),qr=i.lazy(()=>Promise.resolve().then(()=>require("./MultiLayout-DvkcdO9c.cjs")).then(e=>({default:e.MultiLayout}))),Br=64,zr={request:e=>{requestAnimationFrame(e)}},Je=e=>{e.documents.clear(),e.trees.clear()},Se=(e,t)=>{t.tree!==null&&e.trees.seed(t.tree.sourceId,t.tree.result);for(const{path:n,document:r}of t.documents)e.documents.seed(n,r)},Hr=(e,t)=>{const[n,r]=i.useState(()=>({overrides:t,locale:e,labels:ye(e,t)}));if(n.locale===e&&Ft(n.overrides,t))return n.labels;const o={overrides:t,locale:e,labels:ye(e,t)};return r(o),o.labels},Ir=(e,t,n)=>{const[r,o]=i.useState(()=>({scope:t,store:Ge(e,n)}));if(r.scope===t&&r.store.storageKey===e&&r.store.defaults===n)return r.store;const s={scope:t,store:Ge(e,n)};return o(s),s.store},Qe=(e,t)=>{const[n,r]=i.useState(()=>({scope:e,value:t()}));if(n.scope===e)return n.value;const o={scope:e,value:t()};return r(o),o.value},Ur=()=>wr(zr),Zr=({data:e,config:t,storageNamespace:n,locale:r,labels:o,theme:s,renderFrame:a,renderTreeFailure:c,lockDocumentScroll:m=!1,onMathDiagnostics:h})=>{X.assertStorageNamespace(n);const g=ot(r),p=_t(s),x=Hr(g,o),{revalidate:T}=Z.useRevalidator(),k=i.useRef(()=>{}),L=Z.useHref(t.dataPath),[A]=i.useState(()=>{const C=Er({dataPath:L,onScope:G=>k.current(G)}),I={documents:Zt({client:C,capacity:Math.max(Br,t.multiView.maxPanels*2)}),trees:Ar(C)};return Se(I,e),X.syncStorageScope(n,e.scope),{data:C,...I,aligned:{pageData:e,storageNamespace:n,pendingReader:null}}});if(A.aligned.pageData!==e||A.aligned.storageNamespace!==n){const C=A.aligned.pageData;A.aligned.pageData=e,A.aligned.storageNamespace=n,C!==e&&(C.scope!==e.scope?A.aligned.pendingReader=e:Se(A,e)),X.syncStorageScope(n,e.scope)}const F=Ir(X.storageKeys(n).treeSettings,e.scope,t.defaultTreeSettings);i.useLayoutEffect(()=>{const C=A.aligned.pendingReader;C!==null&&(A.aligned.pendingReader=null,Je(A),Se(A,C))},[e,A]),i.useLayoutEffect(()=>{let C=!1;return k.current=I=>{I===e.scope||C||(C=!0,I!==null&&(Je(A),X.clearExplorerStorage(n)),T())},()=>{k.current=()=>{}}},[e,T,A,n]);const O=i.useRef(t.settingsCookie);i.useLayoutEffect(()=>{O.current=t.settingsCookie},[t.settingsCookie]);const[f]=i.useState(()=>Lr(e.settings,C=>{document.cookie=_.viewSettingsCookieString(O.current,C,window.location.protocol==="https:")})),w=Qe(e.scope,Ur),S=Qe(e.scope,xr),b=i.useMemo(()=>ee(e.notices.catch(()=>[])),[e.notices]),R=e.sources.map(C=>C.id).join(`
|
|
2
|
-
`),D=i.useMemo(()=>_.withExplorerSources(t,R.split(`
|
|
3
|
-
`)),[t,R]),H=i.useRef(h);i.useLayoutEffect(()=>{H.current=h},[h]);const[j]=i.useState(()=>(C,I)=>{H.current?.(C,I)}),q=h===void 0?void 0:j,U=i.useMemo(()=>({config:D,labels:x,locale:g,theme:p,storageNamespace:n,scope:e.scope,sources:e.sources,notices:b,documents:A.documents,trees:A.trees,data:A.data,viewSettings:f,treeSettings:F,announcer:w,reveals:S,renderTreeFailure:c,reportMathDiagnostics:q}),[D,x,g,p,n,e.scope,e.sources,b,A,f,F,w,S,c,q]);return d.jsx(st,{value:U,children:d.jsx(Gr,{renderFrame:a,lockDocumentScroll:m},e.scope)})},Vr=({ref:e,theme:t,view:n,children:r})=>{const[o]=i.useState(bn);return d.jsx("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})},Gr=({renderFrame:e,lockDocumentScroll:t})=>{const{theme:n,labels:r}=$(),o=de(),{hash:s}=Z.useLocation(),a=ue(),c=i.useRef(null);Pr(t,c),i.useLayoutEffect(()=>{o.kind==="redirect"&&a(`${o.href}${s}`,"browse")},[o,s,a]);const{location:m}=o,h=m.view;Fr(c,h);const g=m.view==="tree"?d.jsx(i.Suspense,{fallback:d.jsx("section",{className:"aqmx-split-fallback","aria-label":r.explorerRegion,"aria-busy":"true","data-testid":"markdown-explorer-split-loading"}),children:d.jsx(_r,{location:m})}):m.view==="multi"?d.jsx(i.Suspense,{fallback:d.jsx("section",{className:"aqmx-stage-fallback","aria-label":r.multiRegion,"aria-busy":"true","data-testid":"markdown-explorer-stage-loading"}),children:d.jsx(qr,{location:m})}):d.jsx(hr,{location:m}),p=d.jsxs(Vr,{ref:c,theme:n,view:h,children:[g,d.jsx(Ot,{holds:!0,testId:"markdown-explorer-announcer"})]});return e===void 0?p:e({view:h,children:p})},Wr=({currentUrl:e,nextUrl:t,formMethod:n,defaultShouldRevalidate:r})=>n===void 0&&e.href===t.href&&r;exports.DEFAULT_MARKDOWN_EXPLORER_LOCALE=et;exports.DocumentPane=kt;exports.DocumentRefreshBar=Lt;exports.EXPLORER_THEMES=ke;exports.ExplorerLink=lt;exports.FailureView=at;exports.ForwardRef=Tt;exports.ImageViewMemoryContext=vt;exports.LazyNativeScrollBar=dt;exports.LiveRegion=Ot;exports.MARKDOWN_EXPLORER_LABEL_CATALOGS=rt;exports.MARKDOWN_EXPLORER_LABEL_KEYS=Ce;exports.MARKDOWN_EXPLORER_LABEL_TEMPLATES=tt;exports.MARKDOWN_EXPLORER_LOCALES=Re;exports.MarkdownExplorer=Zr;exports.PAGE_DOCUMENT_REFRESH=At;exports.createEmitter=ne;exports.explorerNavigationOptions=zt;exports.failureTitleOf=te;exports.focusWithoutScroll=je;exports.resolveMarkdownExplorerLabels=ye;exports.shouldRevalidateExplorer=Wr;exports.useExplorer=$;exports.useExplorerLocation=de;exports.useExplorerNavigate=ue;exports.useIntentPrefetch=ct;exports.useViewSetting=Q;
|