staffa 0.18.1 → 0.18.2

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.
@@ -1 +1 @@
1
- import Z from"aberdeen";var _1=t=>`background: linear-gradient(${t}, color-mix(in oklab, $s-bg, white 9%), color-mix(in oklab, $s-bg, black 9%));`,j1=_1("170deg"),C1=_1("180deg"),L1="staffa:darkMode",Q1=Z.proxy({value:q2()});function q2(){try{let t=localStorage.getItem(L1);if(t==="dark")return!0;if(t==="light")return!1}catch{}}function T2(t){Q1.value=t;try{t===void 0?localStorage.removeItem(L1):localStorage.setItem(L1,t?"dark":"light")}catch{}}function J1(t=!1){let a=Q1.value;return a===void 0&&!t?Z.darkMode():a}Z(()=>{J1()?Z.insertGlobalCss({":root, .s-s.neutral":"--s-bg:#0e0f12 --s-text:#e9eaec",".s-s.neutral":"--s-bg:#191b1f --s-text:#e9eaec",".s-s.neutral .s-s.neutral":"--s-bg:#23262b"}):Z.insertGlobalCss({":root, .s-s.neutral":"--s-bg:#eef0f3 --s-text:#1d1f24",".s-s.neutral, .s-s.neutral":"--s-bg:#ffffff --s-text:#1d1f24",".s-s.neutral .s-s.neutral":"--s-bg:#f6f7f9"})});Z.setSpacingCssVars(1.1);Z.insertGlobalCss({"*, *::before, *::after":"box-sizing:border-box",html:"text-size-adjust:100%",body:"m:0 p:$3 line-height:1.5 font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing:antialiased background-color:$s-bg text:$s-text",a:"color: $s-link-fg; text-decoration:underline text-underline-offset:2px; transition: color 0.12s, filter 0.12s;","a:hover":"filter: brightness(1.15)","input, button, textarea, select, optgroup":"font:inherit color:inherit","input:where(:not([type=checkbox],[type=radio],[type=range],[type=file],[type=color],[type=image],[type=submit],[type=button],[type=reset],[type=hidden])), textarea, select":"background:$s-bg border: 1px solid $s-faint; r:$s-radius-sm padding: 0.45em 0.65em; max-width:100%","input:where([type=checkbox],[type=radio])":"width:1.15em height:1.15em cursor:pointer","input[type=range]":"appearance:none background:transparent cursor:pointer vertical-align:middle","input[type=range]::-webkit-slider-runnable-track":"height:4px r:99px background:$s-faint","input[type=range]::-moz-range-track":"height:4px r:99px background:$s-faint","input[type=range]::-moz-range-progress":"height:4px r:99px background:$s-accent","input[type=range]::-webkit-slider-thumb":"appearance:none width:16px height:16px margin-top:-6px r:50% background:$s-accent","input[type=range]::-moz-range-thumb":"width:16px height:16px border:0 r:50% background:$s-accent","input[type=file]":"cursor:pointer",progress:"appearance:none border:0 height:6px r:99px background:$s-faint overflow:hidden vertical-align:middle","progress::-webkit-progress-bar":"background:$s-faint r:99px","progress::-webkit-progress-value":"background:$s-accent r:99px","progress::-moz-progress-bar":"background:$s-accent r:99px",meter:"vertical-align:middle",fieldset:"border: 1px solid $s-faint; r:$s-radius-sm padding:$2 min-width:0",legend:"padding: 0 $1; font-weight:600","code, kbd, samp, pre":"font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;",code:"background: color-mix(in oklab, $s-text, $s-bg 86%); padding: 0.12em 0.34em; r:4px font-size:0.9em",pre:"background: color-mix(in oklab, $s-text, $s-bg 92%); p:$3 r: $s-radius; overflow:auto","pre code":"background:transparent p:0","img, svg, video, canvas":"max-width:100% h:auto",hr:"border:0 border-top: 1px solid $s-faint;","::placeholder":"color: $s-muted; opacity:1",":focus-visible":"outline: 2px solid $s-focus; outline-offset:2px",small:"color:$s-muted font-size:0.9em","@media (prefers-reduced-motion: reduce)":{"*, *::before, *::after":"transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important;"},":root":"--s-primary:#00a884 --s-danger:#dc5b41 --s-success:#00a884 --s-warning:#ef6b00 --s-link:#3f8cd8 --s-radius-sm:6px --s-radius:12px --s-radius-lg:18px --s-focus: color-mix(in srgb, $s-primary 38%, transparent); --s-gradient: linear-gradient(135deg, color-mix(in oklab, $s-primary, white 16%), color-mix(in oklab, $s-primary, black 14%));",":root, .s-s.neutral":"--s-accent:$s-primary --s-link-fg:$s-link",".s-s:not(.neutral)":"--s-bg:$s-primary border:0 --s-text:#eee --s-accent:#fff --s-link-fg:#eef --s-muted: color-mix(in srgb, #fff 70%, transparent); --s-faint: color-mix(in srgb, #fff 30%, transparent);",".s-s.danger":"--s-bg:$s-danger",".s-s.success":"--s-bg:$s-success",".s-s.warning":"--s-bg:$s-warning",".s-s.link":"--s-bg:$s-link",".s-s.primary":"--s-bg:$s-primary",":root, .s-s":"--s-muted: color-mix(in oklab, $s-text, $s-bg 42%); --s-faint: color-mix(in oklab, $s-text, $s-bg 80%); color:$s-text accent-color:$s-accent scrollbar-width:thin scrollbar-color: $s-faint transparent;",".s-s, body":j1,".s-s":"r:$s-radius",":where(.s-s.neutral)":"border: 1px solid $s-faint;",".s-s::-webkit-scrollbar, .s-s ::-webkit-scrollbar":"width:10px height:10px",".s-s::-webkit-scrollbar-track, .s-s ::-webkit-scrollbar-track":"background:transparent",".s-s::-webkit-scrollbar-thumb, .s-s ::-webkit-scrollbar-thumb":"background:$s-faint border-radius:99px border: 2px solid transparent; background-clip:padding-box",".s-s.shadow.neutral:not(.s-btn)":"box-shadow: 0 4px 14px rgba(0,0,0,0.13);",".s-s.extra-shadow.neutral:not(.s-btn)":"box-shadow: 0 18px 50px rgba(0,0,0,0.28);",".s-s.shadow:not(.neutral):not(.tonal):not(.outlined)":"box-shadow: 0 4px 14px color-mix(in srgb, $s-bg 30%, transparent);",".s-s.extra-shadow:not(.neutral):not(.tonal):not(.outlined)":"box-shadow: 0 14px 40px color-mix(in srgb, $s-bg 40%, transparent);",".s-s.no-shadow":"box-shadow: none !important;",".s-s:not(.neutral).tonal, .s-s:not(.neutral).outlined":"--s-text:$s-bg --s-accent:$s-bg --s-link-fg:$s-bg --s-faint: color-mix(in srgb, $s-bg 30%, transparent); --s-muted: color-mix(in srgb, $s-bg 70%, transparent);",".s-s:not(.neutral).tonal":"background: color-mix(in srgb, $s-bg 15%, transparent); border: 1px solid $s-faint;",".s-s:not(.neutral).outlined":"background: transparent; border: 1px solid color-mix(in srgb, $s-bg 45%, transparent);",".s-s:not(.neutral) .s-s.tonal, .s-s:not(.neutral) .s-s.outlined":"--s-text:#fff --s-accent:#fff --s-link-fg:#fff "+j1+" border-color: transparent;"});Z.insertGlobalCss({".s-preload, .s-preload *, .s-preload *::before, .s-preload *::after":"transition: none !important; animation: none !important;"});if(typeof document<"u"&&typeof requestAnimationFrame=="function"){let t=document.documentElement;t.classList.add("s-preload"),requestAnimationFrame(()=>requestAnimationFrame(()=>t.classList.remove("s-preload")))}Z.insertGlobalCss({":disabled, [aria-disabled=true]":"opacity:0.45 filter:saturate(0.6) user-select:none",":disabled, [aria-disabled=true], :disabled *, [aria-disabled=true] *":"pointer-events:none cursor:not-allowed"});var R2="p, ul, ol, dl, blockquote, pre, table, figure, hr, h1, h2, h3, h4, h5, h6";Z.insertGlobalCss({[`${R2}`]:{"&":"margin:0","&:not(:first-child)":"margin-top:$3"},"h1, h2, h3, h4, h5, h6":{"&":"line-height:1.15 font-weight:700 text-wrap:balance","&:not(:first-child)":"margin-top:1.4em"},h1:"font-size:2em font-weight:800 letter-spacing:-0.022em",h2:"font-size:1.55em letter-spacing:-0.018em",h3:"font-size:1.3em letter-spacing:-0.011em",h4:"font-size:1.1em",h5:"font-size:0.95em letter-spacing:0.005em",h6:"font-size:0.8em fg:$s-muted text-transform:uppercase letter-spacing:0.07em","ul, ol":{"&":"padding-left:1.5em","> li:not(:first-child), li > &:not(:first-child)":"margin-top:$1"},blockquote:"border-left: 3px solid $s-faint; padding-left: $3; fg: $s-muted",table:"border-collapse:collapse","th, td":"text-align:left padding: $1 $2; border-bottom: 1px solid $s-faint; vertical-align:top",th:"font-weight:600","thead th":"border-bottom: 2px solid $s-faint;",dt:"font-weight:600",dd:"margin-left: 1.5em",figcaption:"fg:$s-muted font-size:0.9em margin-top:$1 text-align:center"});import z1 from"aberdeen";var M1=typeof navigator<"u"&&/mac|iphone|ipad|ipod/i.test(navigator.platform||navigator.userAgent),D2={esc:"escape",space:" "},Z2={" ":"Space",escape:"Esc",arrowup:"\u2191",arrowdown:"\u2193",arrowleft:"\u2190",arrowright:"\u2192"},x1=new WeakMap,E=[];function t2(){let t=z1();if(!t)throw new Error("Staffa: claimKeyboard needs a current element");return E.push(t),()=>{let a=E.indexOf(t);a>=0&&E.splice(a,1)}}function a2(t){let[,a,e,h]=/^(mod\+)?(shift\+)?(.*)$/i.exec(t),p=h.toLowerCase();if(p=D2[p]??p,!p||p.length>1&&/[-+]/.test(p))throw new Error(`Staffa: can't parse key "${t}" \u2014 write "k", "f2", "mod+k" or "mod+shift+f2"`);if(e&&p.toUpperCase()===p)throw new Error(`Staffa: "${t}" \u2014 write the shifted character itself ("?", not "shift+/")`);return(a?"mod+":"")+(e?"shift+":"")+p}function B2(t){if(t.altKey||(M1?t.ctrlKey:t.metaKey))return null;let a=t.key.toLowerCase(),e=t.shiftKey&&(a.length>1||t.key.toUpperCase()!==a);return((M1?t.metaKey:t.ctrlKey)?"mod+":"")+(e?"shift+":"")+a}function e2(t,a){if(!(a instanceof HTMLElement))return!1;let e=t.startsWith("mod+"),h=t.replace(/^(mod\+)?(shift\+)?/,"");if(h==="enter"&&a.closest("a[href]")!=null||!e&&(h==="enter"||h===" ")&&a.closest("button, summary, [role=button]")!=null)return!0;let p=a.tagName;return!e&&h!=="escape"&&(p==="INPUT"||p==="TEXTAREA"||p==="SELECT"||a.isContentEditable)}function h2(t,a){let e=E[E.length-1];return a.global===!0||!e||e.contains(t)}function F2(t){for(let a=E.length-1;a>=0;a--)if(E[a].contains(t))return E[a]}function p2(){return E[E.length-1]??document.body}function r2(t){let a=E[E.length-1];return a&&!(t&&a.contains(t))?a:t??document.body}var Y1=!1;function I2(t){if(t.defaultPrevented||t.repeat||t.isComposing)return;let a=B2(t),e=t.target instanceof Element?t.target:null;if(!(a==null||e2(a,e)))for(let h=r2(e);h;h=h.parentElement){let p=x1.get(h)?.get(a);if(p&&h2(h,p)){p.press&&(t.preventDefault(),p.press(t));return}}}function o2(t){let a=new Map;for(let e=r2(t);e;e=e.parentElement){let h=x1.get(e);if(h)for(let[p,r]of h)!a.has(p)&&h2(e,r)&&!e2(p,t)&&a.set(p,r)}return[...a]}function S(t,a,e,h="normal"){let p=z1(),r=h==="global"?document.body:h==="local"?p:h==="normal"?(p&&F2(p))??document.body:h;if(!r)throw new Error("Staffa: a local key binding needs a current element");let o=a2(t),d=x1.get(r);d||x1.set(r,d=new Map);let c={description:a,press:e,global:h==="global",prev:d.get(o)};d.set(o,c),Y1||(Y1=!0,document.addEventListener("keydown",I2)),z1.clean(()=>{let n=d.get(o);if(n===c)c.prev?d.set(o,c.prev):d.delete(o);else for(;n;n=n.prev)if(n.prev===c){n.prev=c.prev;break}})}function q(t,a=!1){let e=a2(t),h=e.startsWith("mod+"),p=h?e.slice(4):e,r=p.startsWith("shift+"),o=r?p.slice(6):p,d=o.length===1?o.toUpperCase():o[0].toUpperCase()+o.slice(1);if(a){let n=o===" "?"Space":r||o.length>1?d:o;return(h?M1?"Meta+":"Control+":"")+(r?"Shift+":"")+n}let c=Z2[o]??d;return M1?(r?"\u21E7":"")+(h?"\u2318":"")+c:(h?"Ctrl+":"")+(r?"Shift+":"")+c}import G from"aberdeen";import d2 from"aberdeen";var v1=640,U2=0;function K(t="s"){return`${t}-${++U2}`}function M(t,...a){t!=null&&(typeof t=="function"?t(...a):d2("rich=",t))}var K2="a[href], button, input, select, textarea, [tabindex]";function Y(t,a){let e=p=>p instanceof HTMLElement&&!p.hasAttribute("disabled")&&p.getAttribute("aria-disabled")!=="true"&&p.tabIndex>=0&&p.getClientRects().length>0,h=(a?[...t.querySelectorAll(a)].find(e):void 0)??[...t.querySelectorAll(K2)].find(e);return h?.focus(),h!=null}function N(t){queueMicrotask(()=>d2(t))}import H from"aberdeen";import $ from"aberdeen";import T from"aberdeen";T.insertGlobalCss({".s-tt-tip":{"&":"position:fixed z-index:500 max-width:20rem w:max-content padding: 0.3em 0.65em; font-size:0.85em line-height:1.4 pointer-events:none"}});var t1=T.proxy(void 0),B=null;typeof window<"u"&&window.addEventListener("scroll",()=>{t1.value=void 0},{capture:!0,passive:!0});function N2(t,a,e,h){let r=window.innerWidth,o=window.innerHeight,d=0,c=0;return h==="bottom"?(d=t.left+(t.width-a)/2,c=t.bottom+7,c+e>o-8&&(c=t.top-e-7)):h==="left"?(d=t.left-a-7,c=t.top+(t.height-e)/2,d<8&&(d=t.right+7)):h==="right"?(d=t.right+7,c=t.top+(t.height-e)/2,d+a>r-8&&(d=t.left-a-7)):(d=t.left+(t.width-a)/2,c=t.top-e-7,c<8&&(c=t.bottom+7)),{x:Math.max(8,Math.min(d,r-a-8)),y:Math.max(8,Math.min(c,o-e-8))}}function S1(){B&&clearTimeout(B),B=setTimeout(()=>{t1.value=void 0,B=null},100)}N(()=>{let t=t1.value;if(!t)return;let{opts:a,anchor:e}=t,h=a.placement??"top",p=T("div.s-tt-tip.s-s.neutral.shadow role=tooltip visibility:hidden",a.attrs,()=>{T("mouseenter=",()=>{B&&(clearTimeout(B),B=null)}),T("mouseleave=",S1),M(a.tip)});requestAnimationFrame(()=>{if(!document.body.contains(p))return;let r=e.getBoundingClientRect(),{x:o,y:d}=N2(r,p.offsetWidth,p.offsetHeight,h);p.style.left=o+"px",p.style.top=d+"px",p.style.visibility=""})});function r1(t){let a=e=>{B&&(clearTimeout(B),B=null),t1.value={opts:t,anchor:e.currentTarget}};T("mouseenter=",a),T("mouseleave=",S1),T("focusin=",e=>{e.target.matches?.(":focus-visible")&&a(e)}),T("focusout=",S1),T.clean(()=>{T.unproxy(t1).value?.opts===t&&(t1.value=void 0)})}$.insertGlobalCss({".s-btn":{"&":"display:inline-flex align-items:center justify-content:center gap:$2 font-weight:450 line-height:1.1 white-space:nowrap cursor:pointer text-decoration:none padding: $m2 $m3; transition: background 0.15s, border-color 0.15s, color 0.15s, filter 0.15s, box-shadow 0.15s, transform 0.08s;","&:focus-visible":"outline: 3px solid $s-focus; outline-offset: 1px;","&:hover":"filter: brightness(1.06)","&.tonal:hover, &.outlined:hover":"background: color-mix(in srgb, $s-bg 24%, transparent);","&.neutral:hover":"filter:none background: color-mix(in srgb, $s-text 8%, $s-bg);","> svg":"width:1.25em height:1.25em","&:active:not(:disabled)":"transform: translateY(1px)","&.small, .small > &":"padding: $m1 $m2; font-size:0.85em border-radius:$s-radius-sm","&.large, .large > &":"font-size:1.4em border-radius:$s-radius-lg"},".s-icon-btn":{"&":"display:inline-flex align-items:center justify-content:center flex-shrink:0 width:2rem height:2rem p:0 border:0 background:transparent cursor:pointer fg:$s-muted r:$s-radius-sm line-height:1 font-size:1rem text-decoration:none transition: color 0.12s, background 0.12s;","> svg":"width:1.25em height:1.25em","&:hover:not(:disabled):not([aria-disabled=true])":"fg:$s-text background: color-mix(in srgb, $s-text 10%, transparent);","&:focus-visible":"outline: 3px solid $s-focus; outline-offset:1px","&.small, .small > &":"width:1.6rem height:1.6rem font-size:0.8rem","&.large, .large > &":"width:2.4rem height:2.4rem font-size:1.2rem"}});function o1(t){let a=t.href!=null?"a":"button";$(`${a}.s-icon-btn`,t.attrs,()=>{c2(t),$("aria-label=",t.ariaLabel),t.key&&n2(t.key,t.ariaLabel,void 0,t.disabled),M(t.icon)})}function c2(t){t.href!=null?($("role=button"),t.disabled?$("aria-disabled=true"):$("href=",t.href)):($("type=",t.type??"button"),t.disabled&&$("disabled=true")),t.click&&!t.disabled&&$("click=",t.click)}function n2(t,a,e,h){let p=$(),r=a?`${a} \xB7 ${q(t)}`:q(t);r1({tip:()=>$("#",r)}),h||($("aria-keyshortcuts=",q(t,!0)),S(t,typeof e=="string"?e:a,()=>p.click()))}function R(t={}){let a=typeof t=="string"||typeof t=="function"?{content:t}:t,e=a.href!=null?"a":"button";$(`${e}.s-btn.s-s.shadow`,a.attrs,()=>{c2(a),a.ariaLabel&&$("aria-label=",a.ariaLabel),a.key&&n2(a.key,a.ariaLabel,a.content,a.disabled),M(a.icon),M(a.content)})}import i2 from"aberdeen";i2.insertGlobalCss({".s-bgroup":{"&":"display:inline-flex align-items:stretch","&.s-spaced":"gap:$2 flex-wrap:wrap","&.s-vertical":"flex-direction:column","&.s-attached":"gap:0","&.s-attached:not(.s-vertical) > .s-btn:not(:first-child)":"margin-left:-1px","&.s-attached:not(.s-vertical) > .s-btn:not(:first-child):not(:last-child)":"r:0","&.s-attached:not(.s-vertical) > .s-btn:first-child:not(:last-child)":"border-top-right-radius:0 border-bottom-right-radius:0","&.s-attached:not(.s-vertical) > .s-btn:last-child:not(:first-child)":"border-top-left-radius:0 border-bottom-left-radius:0","&.s-attached.s-vertical > .s-btn:not(:first-child)":"margin-top:-1px","&.s-attached.s-vertical > .s-btn:not(:first-child):not(:last-child)":"r:0","&.s-attached.s-vertical > .s-btn:first-child:not(:last-child)":"border-bottom-left-radius:0 border-bottom-right-radius:0","&.s-attached.s-vertical > .s-btn:last-child:not(:first-child)":"border-top-left-radius:0 border-top-right-radius:0","&.s-attached > .s-btn:hover, &.s-attached > .s-btn:focus-visible":"z-index:1"}});function j(t={}){let e=`.s-${t.layout??"attached"}${t.vertical?".s-vertical":""}`;i2(`div.s-bgroup${e} role=group`,t.attrs,()=>{if(t.buttons)for(let h of t.buttons)R(h);M(t.content)})}import _ from"aberdeen";import C from"aberdeen";C.insertGlobalCss({".s-field":{"&":"display:flex flex-direction:column gap:$1","> label":"font-weight:600 font-size:0.9em fg:$s-text user-select:none"},".s-req":"fg:$s-danger margin-left:2px",".s-help":"font-size:0.82em fg:$s-muted",".s-error":"font-size:0.82em fg:$s-danger",".s-input":{"&":"w:100% background: color-mix(in oklab, $s-bg, $s-text 4%); color:$s-text border: 1px solid $s-faint; r:$s-radius padding: 0.55em 0.7em; transition: border-color 0.15s, box-shadow 0.15s;","&:hover:not(:disabled)":"border-color: color-mix(in oklab, $s-text, $s-bg 55%);","&:focus-visible":"border-color:$s-accent box-shadow: 0 0 0 3px $s-focus; outline:none","&[aria-invalid=true]":"border-color:$s-danger"}});function W(t,a){let e=t.id??K("field"),h=()=>!!t.error;C("div.s-field",t.attrs,()=>{C(()=>{t.label!=null&&C("label for=",e,()=>{M(t.label),t.required&&C("span.s-req aria-hidden=true #*")})}),a(e,h),C(()=>{t.help!=null&&!t.error&&C("div.s-help",()=>M(t.help))}),C(()=>{t.error&&C("div.s-error role=alert #",t.error)})})}function a1(t,a,e,h){C("id=",a),t.name&&C("name=",t.name),C(()=>{t.disabled&&C("disabled=true")}),C(()=>{t.required&&C("aria-required=true")}),C(()=>C("aria-invalid=",e()?"true":"false")),h&&C("bind=",h)}function $1(t={}){W(t,(a,e)=>{_("input.s-input",t.inputAttrs,()=>{_("type=",t.type??"text"),t.placeholder!=null&&_("placeholder=",t.placeholder),t.autocomplete!=null&&_("autocomplete=",t.autocomplete),t.value!=null&&!t.bind&&_("value=",t.value),t.input&&_("input=",t.input),t.change&&_("change=",t.change),a1(t,a,e,t.bind)})})}H.insertGlobalCss({".s-backdrop":{"&":"position:fixed inset:0 z-index:200 display:block background: rgba(0,0,0,0.55); transition: opacity 0.4s ease-in-out;","&.hidden":"opacity:0 pointer-events:none"},".s-dialog":{"&":"position:fixed z-index:200 top:50% left:50% display:flex flex-direction:column transform:translate(-50%,-50%) min-width:min(20rem,90vw) max-width:min(90vw,44rem) max-height:min(88vh,800px) r: $s-radius-lg; overflow:hidden transition: opacity 0.2s ease-out, transform 0.2s ease-out;","> header":"display:flex align-items:center gap:$2 padding: $2 $3; border:0 border-bottom: 1px solid $s-faint; r:0 font-weight:600 flex-shrink:0","> footer":"display:flex align-items:center justify-content:flex-end gap:$2 padding: $2 $3; border:0 border-top: 1px solid $s-faint; r:0 flex-shrink:0","> div":"p:$3 gap:$3 display:flex flex-direction:column overflow-y:auto flex:1 min-height:0","&.hidden":"opacity:0 pointer-events:none transform: translate(-50%, calc(-50% + 20px)); pointer-events:none"}});var d1=H.proxy({}),W2=0,s2=H.derive(()=>{let t=Object.keys(d1);if(t.length)return t[t.length-1]});function P1(){return s2.value!=null}N(()=>{H.onEach(d1,({resolve:t,opts:a},e)=>{let h=()=>{delete d1[e]};H.clean(()=>{a.onClose?.(),t()});let p=document.activeElement;H.clean(()=>{p instanceof HTMLElement&&document.contains(p)&&p.focus()});let r=H.derive(()=>s2.value!=e);H("div.s-backdrop create=hidden destroy=hidden .hidden=",r,"click=",()=>{a.allowCancel!==!1&&h()});let o=H("div.s-dialog.neutral.s-s.extra-shadow create=hidden destroy=hidden",a.attrs,()=>{a.keyboardTransparent||H.clean(t2());let d=p2();H(()=>{let c=a.allowCancel!==!1;S("esc",c?"Close this dialog":void 0,c?h:()=>{},d)}),H(()=>{a.header!=null&&H("header.s-s.neutral",a.headerAttrs,()=>M(a.header))}),H("div",a.contentAttrs,()=>{M(a.content,h)}),H(()=>{a.footer!=null&&H("footer.s-s.neutral",a.footerAttrs,()=>M(a.footer))})});requestAnimationFrame(()=>{document.body.contains(o)&&Y(o)})})});function e1(t){let a=++W2;return t.cancelWithScope!==!1&&H.clean(()=>{delete d1[a]}),new Promise(e=>{d1[a]={resolve:e,opts:t}})}function G2(t,a={}){return e1({header:"Alert",allowCancel:!0,content:e=>{H("p",()=>{H("#",t)}),j({layout:"spaced",attrs:"align-self:flex-end",content:()=>{R({content:"OK",click:e})}})},...a})}function X2(t,a={}){return new Promise(e=>{let h=!1;e1({header:"Confirm",allowCancel:!0,content:p=>{H("p",()=>{H("#",t)}),j({layout:"spaced",attrs:"align-self:flex-end",content:()=>{R({content:"Cancel",attrs:".neutral",click:p}),R({content:"OK",click:()=>{h=!0,p()}})}})},...a,onClose:()=>{e(h),a.onClose?.()}})})}function j2(t,a="",e={}){return new Promise(h=>{let p=null;e1({header:"Input",allowCancel:!0,content:r=>{H("p",()=>{H("#",t)});let o=H.proxy({value:a});H("form display:contents",()=>{H("submit=",d=>{d.preventDefault(),p=o.value,r()}),$1({bind:H.ref(o,"value")}),j({layout:"spaced",attrs:"align-self:flex-end",content:()=>{R({content:"Cancel",attrs:".neutral",type:"button",click:r}),R({content:"OK",type:"submit"})}})})},...e,onClose:()=>{h(p),e.onClose?.()}})})}G.insertGlobalCss({".s-keyhelp":{"&":"display:flex flex-direction:column gap:$1 min-width:14rem","> div":"display:flex align-items:baseline justify-content:space-between gap:$4",kbd:"font-family:inherit font-size:0.85em fg:$s-muted white-space:nowrap border: 1px solid $s-faint; r:$s-radius-sm padding: 0 0.4em;"}});var m1=null;function O1(){if(m1){m1();return}let t=o2(document.activeElement);e1({header:"Keyboard shortcuts",cancelWithScope:!1,keyboardTransparent:!0,onClose:()=>{m1=null},content:a=>{m1=a;let e=h=>{h.repeat||["Control","Shift","Alt","Meta","Escape","?"].includes(h.key)||a()};document.addEventListener("keydown",e,!0),G.clean(()=>document.removeEventListener("keydown",e,!0)),G("div.s-keyhelp",()=>{for(let[h,p]of t)p.description!==void 0&&G("div",()=>{G("span",()=>M(p.description)),G("kbd text=",q(h))})})}})}var l2=G.proxy(!0);function _2(t){l2.value=t}G(()=>{l2.value&&(S("?",void 0,O1,"global"),S("mod+?","This overview",O1,"global"))});import l from"aberdeen";l.insertGlobalCss({".s-ac":{"&":"position:relative","> .s-control":"display:flex flex-wrap:wrap align-items:center gap:$1 background: color-mix(in oklab, $s-bg, $s-text 4%); color:$s-text border: 1px solid $s-faint; r:$s-radius padding: 0.3em 0.4em; cursor:text; transition: border-color 0.15s, box-shadow 0.15s;","> .s-control:hover":"border-color: color-mix(in oklab, $s-text, $s-bg 55%);","> .s-control:focus-within":"border-color:$s-accent box-shadow: 0 0 0 3px $s-focus;","&[aria-invalid=true] > .s-control":"border-color:$s-danger",".s-chip":"display:inline-flex align-items:center gap:$1 font-size:0.85em background: color-mix(in oklab, $s-bg, $s-text 10%); border: 1px solid $s-faint; r:$s-radius padding: 0.1em 0.2em 0.1em 0.5em;",".s-chip > button":"cursor:pointer border:0 background:transparent fg:$s-muted font-size:1.1em line-height:1 padding: 0 0.2em; r:4px",".s-chip > button:hover":"fg:$s-text background:$s-faint",input:"flex:1 min-width:6ch border:0 background:transparent color:inherit outline:none padding:0.25em","> .s-menu":"position:absolute top:100% left:0 right:0 z-index:20 margin-top:4px max-height:15rem overflow-y:auto list-style:none p:$1 margin-bottom:0","> .s-menu li":"margin:0",".s-option":"padding: 0.45em 0.6em; r:6px cursor:pointer transition: background 0.1s;",".s-option[aria-selected=true]":"background: color-mix(in srgb, $s-text 10%, transparent);",".s-add":"fg:$s-accent font-style:italic",".s-empty":"padding: 0.45em 0.6em; fg:$s-muted"}});function Q2(t){return typeof t=="string"?{value:t,label:t}:{value:t.value,label:t.label??t.value}}function J2(t){let a=K("ac-menu"),e=l.proxy({query:"",open:!1,active:0}),h=()=>(typeof t.options=="function"?t.options():t.options).map(Q2),p=()=>{let s=t.bind?.value;return s==null||s===""?[]:Array.isArray(s)?s:[s]},r=s=>h().find(m=>m.value===s)?.label??s;if(!t.multi){let s=t.bind?l.peek(t.bind,"value"):void 0;typeof s=="string"&&s&&(e.query=l.peek(()=>r(s)))}let o=()=>{let s=new Set(p()),m=h();t.multi&&(m=m.filter(g=>!s.has(g.value)));let w=e.query.trim().toLowerCase();return w&&(m=m.filter(g=>g.label.toLowerCase().includes(w))),m},d=(s,m)=>{if(t.multi){let w=Array.isArray(t.bind?.value)?[...t.bind.value]:[];w.includes(s)||w.push(s),t.bind&&(t.bind.value=w),e.query=""}else t.bind&&(t.bind.value=s),e.query=r(s),e.open=!1;e.active=0,m?.focus()},c=s=>{if(!t.bind)return;let m=t.bind.value??[];t.bind.value=m.filter(w=>w!==s)};W(t,(s,m)=>{l("div.s-ac",t.inputAttrs,()=>{l(()=>l("aria-invalid=",m()?"true":"false"));let w;l("div.s-control",()=>{l("click=",()=>w?.focus()),l(()=>{if(t.multi)for(let g of p())l("span.s-chip",()=>{l("span #",l.peek(()=>r(g))),l("button type=button aria-label=",`Remove ${g}`,()=>{l("#\xD7"),l("click=",A=>{A.stopPropagation(),c(g),w?.focus()})})})}),w=l("input type=text role=combobox autocomplete=off",()=>{l("id=",s,`aria-controls=${a} aria-autocomplete=list`),t.placeholder!=null&&l("placeholder=",t.placeholder),t.disabled&&l("disabled=true"),t.required&&l("aria-required=true"),l("bind=",l.ref(e,"query")),l(()=>l("aria-expanded=",e.open?"true":"false")),l(()=>{let A=o()[e.active];l("aria-activedescendant=",e.open&&A?`${a}-opt-${e.active}`:"")}),l("input=",()=>{e.open=!0,e.active=0}),l("focus=",()=>{e.open=!0}),l("blur=",()=>{setTimeout(()=>f(),150)}),l("keydown=",g=>n(g,w))})}),l(()=>{if(!e.open)return;let g=o(),A=e.query.trim(),u=t.allowCustom!==!1&&A!==""&&!g.some(v=>v.label.toLowerCase()===A.toLowerCase());l("ul.s-menu.s-s.neutral.shadow role=listbox",`id=${a}`,()=>{g.forEach((v,z)=>{l("li.s-option role=option",`id=${a}-opt-${z}`,()=>{l(()=>l("aria-selected=",e.active===z?"true":"false")),l("#",v.label),l("mousedown=",D=>D.preventDefault()),l("click=",()=>d(v.value,w)),l("mousemove=",()=>{e.active=z})})}),u&&l("li.s-option.s-add role=option",()=>{l("#",`Add "${A}"`),l("mousedown=",v=>v.preventDefault()),l("click=",()=>d(A,w))}),g.length===0&&!u&&l("li.s-empty #No matches")})}),l(()=>{if(t.name)if(t.multi)for(let g of p())l("input type=hidden",()=>{l("name=",t.name),l("value=",g)});else l("input type=hidden",()=>{l("name=",t.name),l("value=",p()[0]??"")})})})});function n(s,m){let w=o(),g=w.length-1;if(s.key==="ArrowDown")s.preventDefault(),e.open=!0,e.active=Math.min(g,e.active+1);else if(s.key==="ArrowUp")s.preventDefault(),e.active=Math.max(0,e.active-1);else if(s.key==="Enter"){s.preventDefault();let A=w[e.active];A?d(A.value,m):t.allowCustom!==!1&&e.query.trim()?d(e.query.trim(),m):e.open&&(e.open=!1)}else if(s.key==="Escape")e.open&&(s.preventDefault(),e.open=!1,t.multi||(e.query=r(p()[0]??"")));else if(s.key==="Backspace"&&t.multi&&e.query===""){let A=p();A.length&&c(A[A.length-1])}}function f(){e.open=!1,t.multi?e.query="":t.allowCustom!==!1&&e.query.trim()?d(e.query.trim()):e.query=r(p()[0]??"")}}import Q from"aberdeen";import Y2 from"aberdeen";var c1={size:24,color:"currentColor",strokeWidth:2,cap:"round",join:"round"};function t0(t,a){let e=a.size??c1.size,h=Y2('svg.s-icon aria-hidden=true viewBox="0 0 24 24" fill=none',"width=",e,"height=",e,"stroke=",a.color??c1.color,"stroke-width=",a.strokeWidth??c1.strokeWidth,"stroke-linecap=",a.cap??c1.cap,"stroke-linejoin=",a.join??c1.join,a.attrs);h.innerHTML=t}function P(t){return(a={})=>t0(t,a)}var M2=P('<path d="m9 18 6-6-6-6" />');var x2=P('<circle cx="12" cy="12" r="10" />');var v2=P('<path d="M15 3h6v6" /><path d="M10 14 21 3" /><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />');var m2=P('<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />');var u1=P('<path d="M4 5h16" /><path d="M4 12h16" /><path d="M4 19h16" />');var u2=P('<path d="M12 17v5" /><path d="M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89" /><path d="m2 2 20 20" /><path d="M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11" />'),E1=P('<path d="M12 17v5" /><path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" />');var y2=P('<path d="M22 2 2 22" />');var h1=P('<path d="M18 6 6 18" /><path d="m6 6 12 12" />');Q.insertGlobalCss({".s-box":{"&":"display:flex flex-direction:column overflow:hidden r: $s-radius-lg; position:relative","&:not(:first-child)":"margin-top: $3","> header":"display:flex align-items:center gap:$2 padding: $2 $3; border:0 border-bottom: 1px solid $s-faint; r:0 font-weight:600","> footer":"display:flex align-items:center justify-content:flex-end gap:$2 padding: $2 $3; border:0 border-top: 1px solid $s-faint; r:0","> div":"p:$3 gap:$3","> header > .s-box-close":"margin-left:auto","> .s-box-close":"position:absolute top:$2 right:$2 z-index:1"}});function a0(t={}){let a=typeof t=="string"||typeof t=="function"?{content:t}:t;Q("section.s-box.s-s.neutral.shadow",a.attrs,()=>{Q(()=>{a.header!=null?Q("header.s-s.neutral",a.headerAttrs,()=>{M(a.header),typeof a.close=="function"&&f2(a.close)}):typeof a.close=="function"&&f2(a.close)}),Q("div",a.contentAttrs,()=>{M(a.content)}),Q(()=>{a.footer!=null&&Q("footer.s-s.neutral",a.footerAttrs,()=>M(a.footer))})})}function f2(t){o1({icon:h1,ariaLabel:"Close",click:t,attrs:".s-box-close"})}import q1 from"aberdeen";function e0(t){q1(()=>{let a=t.bind.value;j({attrs:t.attrs,buttons:Object.entries(t.options).map(([e,h])=>({content:h,ariaLabel:typeof h=="function"?e:void 0,attrs:a===e?".primary":".neutral",click:()=>{t.bind.value=t.allowDeselect&&a===e?void 0:e}}))})}),t.name&&q1(()=>q1("input type=hidden name=",t.name,"value=",t.bind.value??""))}import L from"aberdeen";L.insertGlobalCss({".s-check":{"&":"display:flex flex-direction:column gap:$1","> label":"display:flex align-items:center gap:$2 cursor:pointer user-select:none","> label:has(input:disabled)":"cursor:not-allowed opacity:0.45 filter:saturate(0.6)",input:"cursor:inherit m:0"}});function h0(t={}){let a=t.id??K("check");L("div.s-check",t.attrs,()=>{L("label for=",a,()=>{L("input type=checkbox",t.inputAttrs,()=>{L("id=",a),t.name&&L("name=",t.name),t.checked&&!t.bind&&L("checked=true"),t.change&&L("change=",t.change),L(()=>{t.disabled&&L("disabled=true")}),L(()=>{t.required&&L("aria-required=true")}),t.bind&&L("bind=",t.bind)}),L(()=>{t.label!=null&&M(t.label),t.required&&L("span.s-req aria-hidden=true #*")})}),L(()=>{t.help!=null&&!t.error&&L("div.s-help",()=>M(t.help))}),L(()=>{t.error&&L("div.s-error role=alert #",t.error)})})}import J from"aberdeen";J.insertGlobalCss({".s-form":{"&":"display:flex flex-direction:column gap:$3","&.grid":"display:grid grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap:$3","&.grid > .s-wide, &.grid > footer":"grid-column: 1 / -1;","> footer":"display:flex align-items:center justify-content:flex-end gap:$2 flex-wrap:wrap margin-top:$1"}});function p0(t={}){let a=typeof t=="string"||typeof t=="function"?{content:t}:t;J("form.s-form",a.attrs,()=>{J(()=>{J(".grid=",a.layout==="grid")}),J("submit=",e=>{if(e.preventDefault(),a.submit){let h=new FormData(e.target),p={};for(let r of new Set(h.keys())){let o=h.getAll(r);p[r]=o.length===1?o[0]:o}a.submit(p,e)}}),M(a.content),J(()=>{a.actions&&J("footer",a.actionsAttrs,()=>M(a.actions))})})}import x from"aberdeen";import{current as G1}from"aberdeen/route";import y from"aberdeen";import{matchCurrent as c0,current as f1,go as b2}from"aberdeen/route";import k from"aberdeen";import{grow as r0,shrink as o0}from"aberdeen/transitions";k.insertGlobalCss({".s-toasts":"position:fixed bottom:$3 right:$3 z-index:400 display:flex flex-direction:column gap:$2 pointer-events:none max-width:min(90vw,24rem) w:24rem",".s-toast":{"&":"display:flex align-items:flex-start gap:$2 padding: $3; pointer-events:auto position:relative overflow:hidden",".s-toast-body":"display:flex flex-direction:column gap:$1 flex:1 min-width:0",".s-toast-title":"font-weight:700 line-height:1.3",".s-toast-close":"cursor:pointer border:0 background:transparent fg:$s-muted font-size:1.1em line-height:1 padding: 0 0.15em; r:4px flex-shrink:0 align-self:flex-start",".s-toast-close:hover":"fg:$s-text",".s-toast-close:focus-visible":"outline:none box-shadow: 0 0 0 3px $s-focus; fg:$s-text",".s-toast-progress":"position:absolute bottom:0 left:0 right:0 height:2px background:$s-accent width:100%"}});var d0=0,n1=k.proxy({});N(()=>{k.peek(()=>k.isEmpty(n1))&&k.isEmpty(n1)||k("div.s-toasts",()=>{k.onEach(n1,t=>{let{opts:a,id:e}=t,h=a.type==="danger"||a.type==="warning"?"alert":"status",p=a.type==null||a.type==="neutral"?"neutral":a.type,r=a.duration??6e3,o,d=null,c=()=>{clearTimeout(o),d&&(d.style.transition="none",d.style.width="100%",d.offsetWidth,d.style.transition=`width ${r}ms linear`,d.style.width="0%"),o=setTimeout(()=>T1(e),r)},n=()=>{clearTimeout(o),o=void 0,d&&(d.style.transition="none",d.style.width="100%")};k.clean(()=>clearTimeout(o)),k(`div.s-toast.s-s.${p}.extra-shadow aria-live=polite role=${h}`,"create=",r0,"destroy=",o0,a.attrs,()=>{r>0&&(k("mouseenter=",n),k("mouseleave=",c)),k("div.s-toast-body",()=>{k(()=>{a.title!=null&&k("div.s-toast-title",()=>M(a.title))}),k("div.s-toast-msg",()=>M(a.message))}),k(()=>{a.dismissible!==!1&&k("button.s-toast-close type=button aria-label=Dismiss",()=>{k("#\xD7"),k("click=",()=>T1(e))})}),r>0&&(d=k("div.s-toast-progress"))}),r>0&&requestAnimationFrame(c)})})});function T1(t){delete n1[t]}function y1(t){let a=++d0;return n1[a]={id:a,opts:t},()=>T1(a)}y.insertGlobalCss({".s-menu-list":"position:fixed z-index:350 min-width:10rem display:flex flex-direction:column p:$1 r:$s-radius-lg max-width: calc(100vw - 16px); overflow-y:auto max-height:min(80vh,28rem) transition: opacity 0.15s, transform 0.15s, visibility 0s;",".s-menu-list.hidden":"opacity:0 pointer-events:none transform:translateY(-6px) visibility:hidden transition: opacity 0.15s, transform 0.15s, visibility 0.15s;",".s-menu-item":"display:flex align-items:center gap:$2 w:100% scroll-margin:$2 padding: $m2 0; line-height:1.1 r:$s-radius cursor:pointer text-align:left font-weight:450 font-size:0.9em border:0 background:transparent fg:$s-text text-decoration:none transition: color 0.12s, transform 0.12s, text-shadow 0.12s;",".s-menu-item:focus-visible:not([aria-current=page]), .s-menu-item:hover:not([aria-disabled=true]):not([aria-current=page])":"filter:none color: color-mix(in lab, $s-primary 33%, $s-text);",".s-menu-item:focus-visible":"outline-offset:-2px background: color-mix(in srgb, $s-accent 14%, transparent);",".s-menu-item[aria-current=page]":"color:$s-accent filter:none",".s-menu-list .s-menu-item":"padding-inline:$2",".s-menu-item[aria-disabled=true]":"opacity:0.45 cursor:not-allowed pointer-events:none",".s-menu-icon":"flex-shrink:0",".s-menu-list .s-menu-icon":"display:flex",".s-menu-list .s-menu-icon > svg":"width:1.25em height:1.25em","hr.s-menu-sep":"border:0 height:1px margin: $1 0.6rem; background: linear-gradient(to right, transparent, $s-faint 18%, $s-faint 82%, transparent);",".s-menu-key":"margin-left:auto padding-left:$2 font-family:inherit font-size:0.8em opacity:0.55 white-space:nowrap flex-shrink:0","@media (hover: none) and (pointer: coarse)":{".s-menu-key":"display:none"},".s-menu-tt-key":"font-family:inherit font-size:0.85em opacity:0.7 white-space:nowrap",".s-tt-tip hr.s-menu-sep":"margin: 0.35em 0;",".s-menu-chevron":"margin-left:auto flex-shrink:0 display:flex transition: transform 0.15s ease;",".s-menu-key + .s-menu-chevron":"margin-left:0",".s-menu-chevron > svg":"width:1em height:1em",".s-menu-details":{"> summary":"list-style:none","> summary::-webkit-details-marker":"display:none","&::details-content":"interpolate-size:allow-keywords block-size:0 overflow-y:clip transition: block-size 0.15s ease, content-visibility 0.15s allow-discrete;","&[open]::details-content":"block-size:auto","&[open] > summary .s-menu-chevron":"transform:rotate(90deg)"},".s-menu-sub":"display:flex flex-direction:column gap:$1 padding-left:$3",".s-menu-inline":"display:flex flex-direction:column gap:$1"});function i1(t,a,e){y("keydown=",h=>{if(h.key==="Enter"&&!h.ctrlKey&&!h.metaKey&&!h.shiftKey&&!h.altKey&&h.target.tagName==="A"){queueMicrotask(()=>a?.());return}if(h.key!=="ArrowDown"&&h.key!=="ArrowUp"&&h.key!=="Home"&&h.key!=="End")return;h.preventDefault();let r=[...h.currentTarget.querySelectorAll(".s-menu-item")].filter(n=>n.getAttribute("aria-disabled")!=="true"&&!s0(n));if(!r.length)return;let o=r.indexOf(document.activeElement),d=h.key==="ArrowUp"?-1:1,c=h.key==="Home"?0:h.key==="End"?r.length-1:o<0?d>0?0:r.length-1:(o+d+r.length)%r.length;r[c].focus()}),w2(t,{onLeafSelect:a,keyHints:e,$hasCurrent:y.derive(()=>R1(t))})}function w2(t,a){for(let e of t){if(typeof e=="string"||typeof e=="function"){M(e);continue}if("separator"in e){y("hr.s-menu-sep");continue}e.items?i0(e,a):n0(e,a)}}function n0(t,a){let e=!1,h=y(t.href?"a.s-menu-item data-panel=open":"button.s-menu-item type=button",t.attrs,()=>{t.href&&(y("href=",t.href),t.target&&y("target=",t.target),y(()=>{let p=!e;e=!0,D1(t)&&(y("aria-current=page"),requestAnimationFrame(()=>h.scrollIntoView({block:"nearest",behavior:p?"instant":"smooth"})))})),t.disabled&&y("aria-disabled=true"),t.key&&y("aria-keyshortcuts=",q(t.key,!0)),y("click=",p=>{if(t.disabled){p.preventDefault();return}a.onLeafSelect?.(),t.click?.(p)}),t.icon&&y("span.s-menu-icon",()=>M(t.icon)),M(t.label),V2(t,a)})}var H2=new Map;function g2(t,a){return H2.set(t,a),a}function i0(t,a){let e=t.href??A2(t.items),h=e!=null?y.derive(()=>Z1(t)?g2(e,!0):a.$hasCurrent.value?g2(e,!1):H2.get(e)??!1):null;y("details.s-menu-details",()=>{h&&y(()=>{h.value&&y("open=true")}),y("summary.s-menu-item.s-menu-branch",t.attrs,()=>{t.disabled&&y("aria-disabled=true"),t.key&&y("aria-keyshortcuts=",q(t.key,!0)),y(()=>{D1(t)&&y("aria-current=page")}),y("click=",p=>{if(t.disabled){p.preventDefault();return}e!=null&&(p.preventDefault(),M0(e),b2(e)),t.click?.(p)}),t.icon&&y("span.s-menu-icon",()=>M(t.icon)),M(t.label),V2(t,a),y("span.s-menu-chevron aria-hidden=true",()=>M2())}),y("div.s-menu-sub",()=>w2(t.items,a))})}function s0(t){for(let a=t.closest("details");a;a=a.parentElement&&a.parentElement.closest("details"))if(!a.open&&t.closest("summary")?.parentElement!==a)return!0;return!1}function R1(t){return t.some(a=>typeof a!="string"&&typeof a!="function"&&!("separator"in a)&&Z1(a))}function D1(t){if(t.href!=null&&c0(t.href))return!0;let a=t.match;if(a==null)return!1;let e=f1.path;if(typeof a=="function")return a(e);let h=a.replace(/\/+$/,"")||"/";return e===h||e.startsWith(h==="/"?"/":h+"/")}function Z1(t){if(D1(t))return!0;for(let a of t.items??[])if(!(typeof a=="string"||typeof a=="function"||"separator"in a)&&Z1(a))return!0;return!1}function A2(t){for(let a of t){if(typeof a=="string"||typeof a=="function"||"separator"in a)continue;let e=a.href??(a.items?A2(a.items):void 0);if(e!=null)return e}}function V2(t,a){let e=a.keyHints?void 0:t.key;t.key&&!e&&y("kbd.s-menu-key aria-hidden=true text=",q(t.key)),!(t.tooltip==null&&!e)&&r1({placement:"right",tip:()=>{M(t.tooltip),e&&(t.tooltip!=null&&y("hr.s-menu-sep"),y("kbd.s-menu-tt-key aria-hidden=true text=",q(e)))}})}function s1(t,a){y(()=>{for(let e of k2(t(),[]))S(e.key,e.label,h=>{L2(),a?.(),e.click?.(h),e.href!=null&&l0(e.href,e.target)})})}function k2(t,a){for(let e of t)typeof e=="string"||typeof e=="function"||"separator"in e||(e.key&&!e.disabled&&a.push(e),e.items&&k2(e.items,a));return a}function l0(t,a){let e=new URL(t,location.href);a?window.open(e.href,a,a==="_blank"?"noopener":""):e.origin!==location.origin?location.href=e.href:b2(t)}var g1=null;function M0(t){try{g1=new URL(t,location.href).pathname.replace(/\/+$/,"")||"/"}catch{g1=null}}function B1(t){return g1!==t?!1:(g1=null,!0)}var X=y.proxy({opts:null});function U(){let t=X.opts?.anchor;X.opts=null,t?.focus()}function b1(t){let a=X.opts;return a!=null&&(t==null||a.anchor===t)}function L2(t){b1(t)&&U()}function x0(t,a){let e=t.offsetWidth,h=t.offsetHeight,p=window.innerWidth,r=window.innerHeight,o=4,d=a.left;d+e>p-8&&(d=Math.max(8,a.right-e));let c=a.bottom+o;c+h>r-8&&a.top-h-o>=8&&(c=a.top-h-o),t.style.left=Math.max(8,d)+"px",t.style.top=Math.max(8,c)+"px"}function v0(t){return[{label:"Open in new tab",icon:v2,click:()=>{window.open(t,"_blank","noopener")}},{label:"Copy link",icon:m2,click:()=>{m0(t)}}]}async function m0(t){let a=new URL(t,location.href).href;try{await navigator.clipboard.writeText(a),y1({message:"Link copied."})}catch{y1({message:"Couldn't copy the link.",type:"danger"})}}N(()=>{let t=X.opts;if(!t)return;let a=y("div.s-menu-list.s-s.neutral.shadow create=hidden destroy=hidden",t.dropdownAttrs,()=>{i1(t.link!=null?[...v0(t.link),{separator:!0},...t.items]:t.items,U,!0)}),e=r=>{let o=r.target;!a.contains(o)&&(t.closeOnAnchorClick||!t.anchor.contains(o))&&U()},h=r=>{(r.key==="Escape"||r.key==="Tab")&&(r.preventDefault(),U())},p=y.peek(f1,"path");y(()=>{f1.path!==p&&!B1(f1.path)&&U()}),document.addEventListener("click",e,!0),document.addEventListener("keydown",h,!0),y.clean(()=>{document.removeEventListener("click",e,!0),document.removeEventListener("keydown",h,!0)}),requestAnimationFrame(()=>{if(!document.body.contains(a))return;let r=t.at?{left:t.at.x,right:t.at.x,top:t.at.y,bottom:t.at.y}:t.anchor.getBoundingClientRect();x0(a,r),Y(a,".s-menu-item[aria-current=page]")})});function u0(t){y("nav.s-menu-inline",t.attrs,()=>{s1(()=>t.items,()=>t.onLeafSelect?.()),i1(t.items,t.onLeafSelect)})}function F1(t){return X.opts=t,U}function I1(t){s1(()=>t.items);let a=null;y.clean(()=>{X.opts?.anchor===a&&U()}),y("contextmenu=",e=>{e.preventDefault(),a=e.currentTarget,F1({...t,anchor:a,at:{x:e.clientX,y:e.clientY},closeOnAnchorClick:!0})})}function y0(t){s1(()=>t.items);let a=null;y.clean(()=>{X.opts?.anchor===a&&U()}),R({icon:u1,...t.button?.content==null?{ariaLabel:"Open menu"}:null,attrs:".neutral",...t.button,click:e=>{if(a=e.currentTarget,X.opts?.anchor===a){U();return}F1({items:t.items,anchor:a,dropdownAttrs:t.dropdownAttrs})}})}import i,{OPAQUE as z2}from"aberdeen";import*as b from"aberdeen/route";import V from"aberdeen";var f0=P('<path d="m15 18-6-6 6-6"/>'),g0=P('<path d="m9 18 6-6-6-6"/>');V.insertGlobalCss({".s-strip":{"&":"position:relative display:flex min-width:0","> .s-strip-row":"display:flex align-items:center flex:1 min-width:0 overflow-x:auto overflow-y:hidden scrollbar-width:none scroll-behavior:smooth","> .s-strip-row::-webkit-scrollbar":"display:none","> .s-strip-btn":"position:absolute top:0 bottom:0 z-index:1 display:none align-items:center justify-content:center width:2.4em border:0 padding:0 cursor:pointer fg:$s-muted transition: color 0.15s;","> .s-strip-btn:hover":"fg:$s-text","> .s-strip-btn-left":"left:0 justify-content:flex-start background: linear-gradient(to right, $s-bg 45%, transparent)","> .s-strip-btn-right":"right:0 justify-content:flex-end background: linear-gradient(to left, $s-bg 45%, transparent)","&.s-can-left > .s-strip-btn-left, &.s-can-right > .s-strip-btn-right":"display:flex"},".s-tabs":{"&":"display:flex flex-direction:column gap:$3",".s-tabbar":"border-bottom: 1px solid $s-faint;",".s-tablist":"gap:$1 align-items:stretch margin-bottom:-1px",".s-tab":"display:inline-flex align-items:center gap:$2 cursor:pointer background:transparent border:0 color: $s-muted; font-weight:600 padding: 0.6em 0.9em; white-space:nowrap border-bottom: 3px solid transparent; transition: color 0.15s, background 0.15s, border-color 0.15s;",".s-tab:hover:not(:disabled), .s-tab[aria-selected=true]":"color: $s-text;",".s-tab:focus-visible":"outline:none box-shadow: inset 0 0 0 2px $s-focus; r: $s-radius;",".s-tab[aria-selected=true]":"border-image: $s-gradient 1;",".s-tabpanel":"display:block"}});function w1(t){V("div.s-strip",t.attrs,()=>{let a=V("div.s-strip-row",t.stripAttrs,()=>M(t.content));C2(a,-1),C2(a,1),w0(a)})}function H1(t){let a=t.parentElement;if(!a||!t.isConnected)return;let e=parseFloat(getComputedStyle(a).fontSize)*2.6,h=t.getBoundingClientRect(),p=a.getBoundingClientRect(),r=h.left-p.left,o=h.right-p.right;r<e?a.scrollBy({left:r-e,behavior:"smooth"}):o>-e&&a.scrollBy({left:o+e,behavior:"smooth"})}function b0(t){let a=K("tabs"),e=(r,o)=>r.id??String(o),h=t.bind??V.proxy(e(t.tabs[0]??{label:""},0));t.tabs.length>0&&!t.tabs.some((r,o)=>e(r,o)===V.peek(()=>h.value))&&(h.value=e(t.tabs[0],0));let p=(r,o)=>{r.disabled||(h.value=e(r,o))};V("div.s-tabs",t.attrs,()=>{w1({attrs:".s-tabbar",stripAttrs:".s-tablist role=tablist",content:()=>{t.tabs.forEach((r,o)=>{let d=e(r,o),c=V("button.s-tab type=button role=tab",()=>{V("id=",`${a}-tab-${d}`,"aria-controls=",`${a}-panel-${d}`),V(()=>{let n=h.value===d;V("aria-selected=",n?"true":"false"),V("tabindex=",n?"0":"-1"),n&&requestAnimationFrame(()=>H1(c))}),r.disabled&&V("disabled=true"),V("click=",()=>p(r,o)),V("keydown=",n=>H0(n,t.tabs,o,p)),M(r.icon),M(r.label)})})}}),V("div.s-tabpanel role=tabpanel",t.contentAttrs,()=>{V(()=>{let r=h.value,o=t.tabs.findIndex((c,n)=>e(c,n)===r),d=t.tabs[o]??t.tabs[0];d&&(V("id=",`${a}-panel-${e(d,o)}`,"aria-labelledby=",`${a}-tab-${e(d,o)}`),M(d.content))})})})}function C2(t,a){V(`button.s-strip-btn.s-strip-btn-${a<0?"left":"right"} type=button`,()=>{V("tabindex=-1 aria-hidden=true"),V("click=",()=>t.scrollBy({left:a*t.clientWidth*.8,behavior:"smooth"})),(a<0?f0:g0)({size:"1.1em"})})}function w0(t){let a=t.parentElement;if(!a||typeof ResizeObserver>"u")return;let e=()=>{let r=t.scrollWidth-t.clientWidth;a.classList.toggle("s-can-left",t.scrollLeft>1),a.classList.toggle("s-can-right",t.scrollLeft<r-1)};t.addEventListener("scroll",e,{passive:!0});let h=new ResizeObserver(e);h.observe(t);let p=typeof MutationObserver>"u"?void 0:new MutationObserver(r=>{for(let o of r){for(let d of o.addedNodes)d instanceof Element&&h.observe(d);for(let d of o.removedNodes)d instanceof Element&&h.unobserve(d)}e()});p?.observe(t,{childList:!0});for(let r of Array.from(t.children))h.observe(r);e(),V.clean(()=>{t.removeEventListener("scroll",e),h.disconnect(),p?.disconnect()})}function H0(t,a,e,h){let p=e;if(t.key==="ArrowRight"||t.key==="ArrowDown")p=(e+1)%a.length;else if(t.key==="ArrowLeft"||t.key==="ArrowUp")p=(e-1+a.length)%a.length;else if(t.key==="Home")p=0;else if(t.key==="End")p=a.length-1;else return;t.preventDefault();let r=p>=e?1:-1;for(let o=0;o<a.length;o++){let d=a[p];if(d&&!d.disabled){h(d,p),t.currentTarget?.parentElement?.children[p]?.focus();return}p=(p+r+a.length)%a.length}}var N1={integer(t){if(!/^(0|-?[1-9]\d*)$/.test(t))return;let a=Number(t);return Number.isSafeInteger(a)?a:void 0}};function F(t){let a=String(t).replace(/\/+$/,"");return a.startsWith("/")||(a=`/${a}`),a}function l1(t){let a=F(t);return a==="/"?[]:a.slice(1).split("/")}function S2(t){let a=l1(t),e=a.map((h,p)=>{if(!h.startsWith("[")||!h.endsWith("]"))return{kind:"lit",value:h};let r=/^\[\.\.\.([A-Za-z_$][\w$]*)\]$/.exec(h);if(r){if(p!==a.length-1)throw new Error(`Staffa: "${h}" must be the last segment of route "${t}"`);return{kind:"rest",name:r[1]}}let o=/^\[([A-Za-z_$][\w$]*)(?:=([A-Za-z_$][\w$]*))?\]$/.exec(h);if(!o)throw new Error(`Staffa: malformed param "${h}" in route "${t}"`);let[,d,c]=o;if(c&&!(c in N1))throw new Error(`Staffa: unknown matcher "${c}" in route "${t}" (known: ${Object.keys(N1).join(", ")})`);return{kind:"param",name:d,matcher:c}});return{key:t,segs:e}}function A0(t){try{return decodeURIComponent(t)}catch{return t}}function U1(t,a){let e={};for(let h=0;h<t.segs.length;h++){let p=t.segs[h];if(p.kind==="rest")return h>=a.length?null:(e[p.name]=a.slice(h).join("/"),e);if(h>=a.length)return null;let r=a[h];if(p.kind==="lit"){if(r!==p.value)return null}else if(p.matcher){let o=N1[p.matcher](r);if(o===void 0)return null;e[p.name]=o}else e[p.name]=A0(r)}return t.segs.length===a.length?e:null}var W1=250,V0=300,k0=360,A1=540;i.insertGlobalCss({":root":`--s-panel-ms:${W1}ms`,".s-panels":"flex:1 min-width:0 min-height:0 position:relative overflow:clip isolation:isolate "+C1,".s-panel":{"&":"position:absolute top:0 bottom:0 left:0 display:flex flex-direction:column "+C1+" z-index:2 transition: left var(--s-panel-ms) ease-out, opacity var(--s-panel-ms) linear;","&.s-panel-sep::before":"content:'' position:absolute left:0 top:0.6rem bottom:0.6rem width:1px z-index:1 background: linear-gradient(to bottom, transparent, $s-faint 18%, $s-faint 82%, transparent);","&.s-panel-new":"z-index:1","&.s-panel-closing":"z-index:0 opacity:0 pointer-events:none","&.s-panel-enter":"opacity:0","&.s-panel-hidden, &.s-panel-parked":"visibility:hidden transition: left var(--s-panel-ms) ease-out, opacity var(--s-panel-ms) linear, visibility var(--s-panel-ms);"},".s-panel > .s-content":"flex:1 min-height:0 overflow-y:auto overflow-x:hidden p:$3",".s-panel-actions":"display:flex align-items:center justify-content:flex-end gap:$1 flex-shrink:0 padding: $3 $3 0;",".s-crumbs > .s-strip-row":"gap:$m1",".s-crumb":{"&":"flex: 1 0 4rem; font-size:0.85em line-height:1.5 fg:$s-muted text-decoration:none white-space:nowrap max-width:max-content overflow:hidden text-overflow:ellipsis transition: color 0.12s;","&.s-crumb-on":"font-weight:600 fg:$s-text","a&:hover":"filter:none color: color-mix(in lab, $s-primary 33%, $s-text);","svg.s-crumb-pin":"vertical-align:-0.12em margin-right:0.3em opacity:0.8 fill:currentColor","svg.s-crumb-unsaved":"vertical-align:0.08em margin-right:0.3em fill:currentColor"},"svg.s-crumb-sep":"flex-shrink:0 opacity:0.4",".s-main.s-shell-snap .s-panel":"transition:none",".s-panel-loading":{"&":"position:absolute inset:0 display:flex align-items:center justify-content:center gap:$1 pointer-events:none",i:"width:0.5rem height:0.5rem r:50% background:$s-muted opacity:0.45 animation: s-panel-pulse 1s ease-in-out infinite;","i:nth-child(2)":"animation-delay:0.15s","i:nth-child(3)":"animation-delay:0.3s"},"@keyframes s-panel-pulse":{"0%, 100%":"opacity:0.25 transform:scale(0.8)","50%":"opacity:0.7 transform:scale(1)"}});var K1=!1,V1=class{[z2]=!0;compiled;ancestors;opts;$state=i.proxy({live:[],focus:0});$open=i.proxy({});nextOrder=0;containerEl;geom;lastGeom;layoutQueued=!1;timers=new Set;intent=null;settling=null;lastSeen=null;queued=null;constructor(a){if(K1)throw new Error("Staffa: only one routed S.main() (one with `routes`) can be active at a time");K1=!0,this.opts=a,this.compiled=Object.entries(a.routes).map(([e,h])=>({...S2(e),draw:h})),this.ancestors=Object.entries(a.ancestors??{}).filter(e=>e[1]!=null).map(([e,h])=>({...S2(e),fn:h})),i(()=>{let e=this.computeTarget(),h={...b.current.search},p=b.current.hash;i.peek(()=>{let r=this.lastSeen;if(r&&r.path!==b.current.path){let o=this.$state.live.find(d=>d.path===r.path);o&&(o.search=r.search,o.hash=r.hash)}this.lastSeen={path:b.current.path,search:h,hash:p},this.propose(e),Array.isArray(b.current.state.panels)||Object.assign(b.current.state,this.stateFor({stack:this.paths(),focus:this.$state.focus}))})}),this.interceptLinks(),this.watchTitle(),this.guardTabClose(),i.clean(()=>{for(let e of this.timers)clearTimeout(e);this.timers.clear(),this.queued?.settle(!1),this.queued=null,K1=!1})}resolve(a){let e=l1(a);for(let h of this.compiled){let p=U1(h,e);if(p)return{draw:h.draw,params:p}}return{draw:this.opts.notFound??C0,params:{}}}matches(a){let e=l1(a);return this.compiled.some(h=>U1(h,e)!=null)}deriveStack(a){let e=F(a),h=this.askAncestors(e),p=h?h.map(F):this.prefixesOf(e),r=[];for(let o of p)o!==e&&!r.includes(o)&&this.matches(o)&&r.push(o);return r.push(e),r}askAncestors(a){let e=l1(a);for(let h of this.ancestors){let p=U1(h,e);if(p)return h.fn(p,a)??void 0}}prefixesOf(a){let e=l1(a),h=[];for(let p=1;p<e.length;p++)h.push("/"+e.slice(0,p).join("/"));return h}pinnedIn(a,e){return a.filter(h=>e.includes(h)?!1:this.$state.live.find(p=>p.path===h)?.$panel.pinned===!0)}unsavedAt(a){return this.$state.live.find(e=>e.path===a)?.$panel.unsaved===!0}targetFor(a,e){let h=Array.isArray(e?.panels)?e.panels.map(String):null;if(h){let p=Array.isArray(e.parked)?e.parked.map(String):[],r=F(a),o=new Set([r]),d=n=>n.map(F).filter(f=>!o.has(f)&&!!o.add(f)),c=d(h);return{stack:[...c,r,...d(p)],focus:c.length}}return i.peek(()=>{let p=this.deriveStack(a).slice(0,-1),r=[...p,...this.pinnedIn(this.paths(),[...p,F(a)]),F(a)];return{stack:r,focus:r.length-1}})}computeTarget(){return this.targetFor(b.current.path,b.current.state)}paths(){return this.$state.live.map(a=>a.path)}propose(a){let e=this.$state.live.filter(h=>!a.stack.includes(h.path)&&h.$panel.unsaved).map(h=>h.path);e.length&&(a={stack:[...a.stack,...e],focus:a.focus}),!($2(this.paths(),a.stack)&&a.focus===this.$state.focus)&&this.commit(a,b.current.nav)}commit(a,e){this.geom=void 0;let h=b.current.state.pinned,p=new Set(Array.isArray(h)?h.map(String):[]),r=new Map(this.$state.live.map(d=>[d.path,d])),o=[];for(let d of a.stack){let c=r.get(d);if(c){r.delete(d),o.push(c);continue}let n=this.createEntry(d,o.length<=a.focus,p.has(d));e!=="load"&&(n.enter=!0),o.push(n),this.$open[d]=n}for(let d of r.values())this.beginClose(d);this.$state.live=o,this.$state.focus=Math.min(a.focus,o.length-1),this.scheduleLayout()}createEntry(a,e,h){let{draw:p,params:r}=this.resolve(a),o={[z2]:!0,order:this.nextOrder++,path:a,draw:p,$ui:i.proxy({holding:!1}),maxWidth:"medium",width:0};return o.$panel=i.proxy({stack:this,params:r,path:a,width:0,visible:e,pinned:h||void 0,close:()=>this.closePath(o.path),open:(d,c)=>this.navigate(d,{from:o.path,how:c})}),o}beginClose(a){a.closing=!0,a.$panel.visible=!1,delete this.$open[a.path]}playExit(a,e){if(!a.closing){e.remove();return}e.classList.add("s-panel-closing"),e.setAttribute("inert","");let h=()=>{clearTimeout(p),this.timers.delete(p),e.remove()};e.addEventListener("transitionend",r=>{r.target===e&&r.propertyName==="opacity"&&h()});let p=setTimeout(h,W1+80);this.timers.add(p)}intended(){return this.intent??{stack:this.paths(),focus:this.$state.focus}}stateFor(a){return{panels:a.stack.slice(0,a.focus),parked:a.stack.slice(a.focus+1),pinned:this.pinnedPaths()}}pinnedPaths(){return this.$state.live.filter(a=>a.$panel.pinned).map(a=>a.path)}issue(a,e){return this.intent=a,this.settling?(this.queued?.settle(!1),new Promise(h=>{this.queued={run:e,settle:h}})):this.start(e)}start(a){let e=p=>{this.settling=null;let r=this.queued;return this.queued=null,p&&r?this.start(r.run).then(r.settle,()=>r.settle(!1)):(this.intent=null,r?.settle(!1)),p},h=Promise.resolve(a()).then(e,p=>(console.error(p),e(!1)));return this.settling=h,h}focusAt(a){let e=this.intended();if(a<0||a>=e.stack.length||a===e.focus)return Promise.resolve(!1);let h={stack:e.stack,focus:a},p=e.stack[a];return this.issue(h,()=>{let r=this.$state.live.find(o=>o.path===p);return b.go({path:p,search:r?.search,hash:r?.hash,state:this.stateFor(h)})})}back(){return i.peek(()=>{let a=this.intended();return a.focus===a.stack.length-1&&!this.unsavedAt(a.stack[a.focus])?this.closePath(a.stack[a.focus]??""):a.focus===0?Promise.resolve(!1):this.focusAt(a.focus-1)})}closePath(a){return i.peek(()=>{let e=this.intended(),h=e.stack.indexOf(F(a));if(h<0||e.stack.length<2||this.unsavedAt(e.stack[h]))return Promise.resolve(!1);let p=e.stack.filter((n,f)=>f!==h),r=h===e.focus?Math.max(0,h-1):e.focus-(h<e.focus?1:0),o={stack:p,focus:r};if(h===e.focus&&h===e.stack.length-1){let n=this.$state.live.find(m=>m.path===p[r]),f={};n?.search&&(f.search=n.search),n?.hash&&(f.hash=n.hash);let s=p.filter(m=>this.$state.live.find(w=>w.path===m)?.$panel.pinned===!0);return this.issue(o,()=>Promise.resolve(b.back({path:p[r],state:{panels:p.slice(0,r),parked:[]}},f)).then(m=>(m&&(b.current.state.pinned=s),m)))}let d=p[r],c=d!==e.stack[e.focus];return this.issue(o,()=>{let n=c?this.$state.live.find(f=>f.path===d):void 0;return b.go({path:d,search:c?n?.search:{...b.current.search},hash:c?n?.hash:b.current.hash,state:this.stateFor(o)})})})}navigate(a,{from:e,how:h,beneath:p}={}){let r=h??this.opts.linkNavigation,o=r==="open"?null:e??null,d=r==="replace";return i.peek(()=>{let c;try{c=new URL(a,location.href)}catch{return Promise.resolve(!1)}let n=F(c.pathname),f=this.intended(),s=p?-1:f.stack.indexOf(n),m;if(s>=0&&r!=="replace"&&r!=="open"){let v=this.pinnedIn(f.stack.slice(s+1),[]);m={stack:[...f.stack.slice(0,s+1),...v],focus:s}}else{let v=o==null?-1:f.stack.indexOf(o),D=(p?p.map(F):v<0?this.deriveStack(n).slice(0,-1):f.stack.slice(0,d?v:v+1)).filter((X1,O2,E2)=>X1!==n&&E2.indexOf(X1)===O2),p1=[...D,...this.pinnedIn(f.stack,[...D,n,d?o:null])];m={stack:[...p1,n],focus:p1.length}}let w=s>=0?this.$state.live.find(v=>v.path===n):void 0,g=c.search?Object.fromEntries(new URLSearchParams(c.search)):w?.search??{},A=c.hash||w?.hash||"";if(m.focus===f.focus&&$2(m.stack,f.stack)&&c.search===location.search&&(c.hash||"")===(location.hash||""))return Promise.resolve(!0);let u=this.stateFor(m);return d?this.issue(m,()=>(b.current.path=n,b.current.search=g,b.current.hash=A,b.current.state=u,i.runQueue(),b.current.path===n)):this.issue(m,()=>b.go({path:n,search:g,hash:A,state:u}))})}pushPath(a,e){return i.peek(()=>{let h=this.intended();return this.navigate(a,{from:h.stack[h.focus],how:e?"replace":"push"})})}interceptLinks(){b.interceptLinks((a,e,h)=>{if(h instanceof KeyboardEvent&&(h.ctrlKey||h.metaKey||h.shiftKey||h.altKey))return!1;let p=e.getAttribute("data-panel")??void 0,r=e.closest(".s-panel"),o=r?this.$state.live.find(d=>d.el===r):e.closest(".s-panel-origin")?this.$state.live[this.$state.focus]:void 0;return this.navigate(a.href,{from:o?.path,how:p}),!0})}get currentPanel(){return this.$state.live[this.$state.focus]?.$panel}get panels(){return this.$state.live.map(a=>a.$panel)}get currentPanelIndex(){return this.$state.focus}pushPanel(a){return this.pushPath(a,!1)}replacePanel(a){return this.pushPath(a,!0)}openPanelStack(a,e){return this.navigate(a,{how:"open",beneath:e})}closePanel(a){return i.peek(()=>{let e=this.intended();return this.closePath(a??e.stack[e.focus]??"")})}setColumns(a){this.opts.columns!==a&&(this.opts.columns=a,this.scheduleLayout())}setLinkNavigation(a){this.opts.linkNavigation=a}drawCrumbs(){w1({attrs:".s-crumbs role=navigation aria-label=Breadcrumbs",content:()=>{i(()=>{let a=this.panels.map(p=>p.path),e=this.currentPanelIndex,h;for(let p=0;p<a.length;p++){p&&y2({size:"0.85em",attrs:".s-crumb-sep"});let r=this.drawCrumb(a[p],p,p===e);p===e&&(h=r)}requestAnimationFrame(()=>{h&&H1(h)})})}})}drawCrumb(a,e,h){let p=this.$state.live[e];return i(h?"span.s-crumb aria-current=page":"a.s-crumb",()=>{h||i("href=",a),i(()=>{p?.$panel.visible&&i(".s-crumb-on")}),i(()=>{p?.$panel.unsaved&&x2({size:"0.45em",attrs:".s-crumb-unsaved"})}),i(()=>{p?.$panel.pinned&&E1({size:"0.85em",attrs:".s-crumb-pin"})}),i(()=>{i("#",p?.$panel.title??p?.$ui.fallback??(a.split("/").pop()||a))}),I1({link:a,items:[{label:()=>{i(()=>{i("#",p?.$panel.pinned?"Unpin":"Pin")})},icon:()=>{i(()=>{(p?.$panel.pinned?u2:E1)()})},click:()=>{p&&this.togglePin(p)}},{label:"Close",icon:h1,disabled:p?.$panel.unsaved===!0,click:()=>{this.closePath(a)}}]})})}togglePin(a){a.$panel.pinned=!a.$panel.pinned||void 0,b.current.state.pinned=this.pinnedPaths()}watchTitle(){let a=document.title;i(()=>{let e=this.$state.live[this.$state.focus],h=e?.$panel.title??e?.$ui.fallback,p=typeof this.opts.title=="string"?this.opts.title:void 0,r=this.$state.live.some(d=>d.$panel.unsaved),o=h&&p?`${h} \xB7 ${p}`:h||p;o&&(document.title=(r?"\u2022 ":"")+o)}),i.clean(()=>{document.title=a})}guardTabClose(){if(typeof window>"u")return;let a=e=>{let h=this.$state.live.find(p=>p.$panel.unsaved);h&&(e.preventDefault(),e.returnValue=!0,this.flushLayout(),h.$panel.visible||this.focusAt(this.intended().stack.indexOf(h.path)))};i(()=>{this.$state.live.some(e=>e.$panel.unsaved)&&(window.addEventListener("beforeunload",a),i.clean(()=>window.removeEventListener("beforeunload",a)))})}drawColumns(){let a=i("div.s-panels role=main",()=>{this.containerEl=i(),i.onEach(this.$open,e=>this.drawPanel(e),e=>e.order)});if(typeof ResizeObserver<"u"){let e=new ResizeObserver(()=>this.layout());e.observe(a),i.clean(()=>e.disconnect())}i.clean(()=>{this.containerEl===a&&(this.containerEl=void 0)}),this.scheduleLayout()}drawPanel(a){let e;i(()=>{let h=a.$panel.maxWidth;a.maxWidth=h==="small"||h==="large"||h==="none"?h:"medium";let p=this.roomFor(a.maxWidth);p&&(a.width=p,i.peek(a.$panel,"width")!==p&&(a.$panel.width=p),e&&(e.style.width=`${p}px`,this.scheduleLayout()))}),e=i(`section.s-panel${a.width?` w:${a.width}px`:""}`,"destroy=",h=>this.playExit(a,h),()=>{i(()=>this.drawActions(a)),i("div.s-content",()=>{if(a.draw(a.$panel),b.persistScroll(a.path),i.peek(a.$panel,"title")==null){let h=L0(i());h&&i.peek(a.$ui,"fallback")!==h&&(a.$ui.fallback=h)}}),i(()=>{!a.$panel.loading||a.$ui.holding||i("div.s-panel-loading aria-hidden=true",()=>{i("i"),i("i"),i("i")})})}),a.el=e,a.placed=!1,e.style.transition="none",i.clean(()=>{a.el===e&&(a.el=void 0)}),i(()=>{a.$panel.loading,this.scheduleLayout()}),this.scheduleLayout()}drawActions(a){this.opts.$shell.narrow||a.$panel.actions==null||i("div.s-panel-actions",()=>M(a.$panel.actions))}scheduleLayout(){this.layoutQueued||(this.layoutQueued=!0,requestAnimationFrame(()=>this.flushLayout()))}flushLayout(){this.layoutQueued&&(this.layoutQueued=!1,this.layout())}measure(){let a=this.containerEl,e=a?a.getBoundingClientRect().width:0;if(!e)return;let h=Math.ceil(e/A1),p=e/h>=k0?e/h:Math.min(e,A1),r=o=>Math.min(o*p,e);return{area:e,size:{small:p,medium:r(2),large:r(3),none:e}}}geometry(){return this.geom??=this.measure()}roomFor(a){return this.geometry()?.size[a]??0}layout(){let a=this.containerEl,e=a?.closest(".s-main");if(!a||!e)return;let h=this.$state.live,p=h.length;if(!p||h.some(u=>!u.el))return;this.geom=void 0;let r=this.geometry();if(!r)return;let o=this.opts.columns==="single",d=this.lastGeom?.area!==r.area;d&&(this.lastGeom=r,e.classList.add("s-shell-snap"));let c=u=>r.size[u.maxWidth],n=Math.min(this.$state.focus,p-1),f=n,s=c(h[n]);if(!o)for(let u=n-1;u>=0;u--){let v=s+c(h[u]);if(v>r.area)break;s=v,f=u}let m=f>0?0:(r.area-s)/2;for(let u=f;u<=n;u++)h[u].width=c(h[u]);for(let u of h)u.width||(u.width=c(u));let w=[],g=m,A=0;for(let u=0;u<f;u++)g-=h[u].width;for(let u=0;u<p;u++){let v=h[u],z=v.el,D=u>=f&&u<=n;if(u===n+1&&(g=Math.max(g,r.area)),(v.enter||!v.placed)&&(!v.$panel.loading||v.holdDone?v.$ui.holding=!1:v.$ui.holding||(v.$ui.holding=!0,this.holdEnter(v))),v.placed)A=parseFloat(z.style.left)-g,z.style.left=`${g}px`,v.enter&&!v.$ui.holding&&this.releaseEnter(v);else{w.push({entry:v,x:g});let p1=v.enter&&D;z.style.left=`${p1?g+A:g}px`,p1&&z.classList.add("s-panel-enter","s-panel-new")}z.style.width=`${v.width}px`,g+=v.width,v.$panel.visible!==D&&(v.$panel.visible=D),v.$panel.width!==v.width&&(v.$panel.width=v.width),z.classList.toggle("s-panel-sep",D&&u>f),z.classList.toggle("s-panel-hidden",u<f),z.classList.toggle("s-panel-parked",u>n),z.toggleAttribute("inert",!D)}(w.length||d)&&a.offsetWidth,d&&e.classList.remove("s-shell-snap");for(let{entry:u,x:v}of w){let z=u.el;z.style.transition="",z.style.left=`${v}px`,u.placed=!0,u.$ui.holding||this.releaseEnter(u)}}releaseEnter(a){a.enter=!1;let e=a.el;if(!e||!e.classList.contains("s-panel-enter"))return;e.classList.remove("s-panel-enter");let h=setTimeout(()=>{this.timers.delete(h),e.classList.remove("s-panel-new")},W1+80);this.timers.add(h)}holdEnter(a){let e=setTimeout(()=>{this.timers.delete(e),a.holdDone=!0,a.$ui.holding&&(a.$ui.holding=!1,this.scheduleLayout())},V0);this.timers.add(e)}};function $2(t,a){return t.length===a.length&&t.every((e,h)=>e===a[h])}function L0(t){let a=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(let e=a.nextNode();e;e=a.nextNode()){let h=e.textContent.trim();if(h)return h.length>48?`${h.slice(0,47).trimEnd()}\u2026`:h}}function C0(t){i("p fg:$s-muted",()=>i("#",`No panel at ${t.path}`))}var z0=200;x.insertGlobalCss({".s-main":{"&":"display:flex flex-direction:column min-height:100vh max-height:100vh container-type:inline-size","body > &":"margin: calc(-1 * $3)","> header":"border:0 border-bottom: 1px solid $s-faint; r:0 position:sticky top:0 z-index:10","> footer":"border-top: 1px solid $s-faint; fg:$s-muted","> header > .s-bar, > footer > .s-bar":"display:flex align-items:center width:100% margin-inline:auto gap:$3 padding: $2 $3;","> header .s-logo, > header .s-nav-trigger":"display:flex align-items:center flex-shrink:0","> header .s-nav-trigger":"margin-left:-0.375rem","> header .s-logo":"font-size:1.4em background: $s-gradient; -webkit-background-clip:text; background-clip:text; color:transparent;","> header .s-titles":"display:flex flex-direction:column min-width:5rem flex: 0 1 auto;","> header .s-subtitle":"fg:$s-muted font-size:0.85em line-height:1.5 overflow:hidden text-overflow:ellipsis white-space:nowrap","> header .s-title":"font-weight:800 font-size:1.1em line-height:1.2 overflow:hidden text-overflow:ellipsis white-space:nowrap letter-spacing:-0.01em background: $s-gradient; -webkit-background-clip:text; background-clip:text; color:transparent; width:fit-content max-width:100%","> header a.s-logo, > header a.s-title":"text-decoration:none filter:none cursor:pointer","> header .s-menu":"display:flex align-items:center justify-content:flex-end gap:$2 flex: 1 1 auto;",".s-body":"flex:1 overflow:clip display:flex flex-direction:row min-height:0 justify-content:center position:relative",".s-body-inner":"flex:1 min-width:0 display:flex flex-direction:row min-height:0","&.s-nav-right .s-body-inner":"flex-direction:row-reverse",".s-nav-sep":"width:1px flex-shrink:0 align-self:stretch margin: 0.6rem 0; border:0 background: linear-gradient(to bottom, transparent, $s-faint 18%, $s-faint 82%, transparent);",".s-body main":"flex:1 min-width:0 min-height:0 overflow-x:hidden overflow-y:auto display:flex flex-direction:column transition: transform var(--s-panel-ms) ease;",".s-body main.s-slide-in":"transform: translateX(100%); transition:none",".s-body main > .s-content":"width:100% flex:1 p:$3",".s-body main.s-scroll-y":"margin-right:$3"},".s-nav-panel":{"&":"display:flex flex-direction:column overflow-y:auto flex-shrink:0 width: calc(var(--s-nav-w) - 1px); padding:$3 gap:$1"},".s-nav-page":{"&":"position:absolute inset:0 z-index:5 display:flex flex-direction:column overflow-y:auto overscroll-behavior:contain border:0 r:0 padding:$2 gap:$1 transition: transform var(--s-panel-ms) ease, visibility 0s;","&.s-nav-page-off":"transform:translateX(-100%) pointer-events:none visibility:hidden transition: transform var(--s-panel-ms) ease, visibility var(--s-panel-ms);",".s-menu-item":"padding: $2 $3; min-height:3rem font-size:1.05em gap:$3"},[`@container (max-width: ${v1}px)`]:{".s-main .s-nav-panel, .s-main .s-nav-sep":"display:none",".s-main > header > .s-bar":"gap:$1 padding: $1 $2;",".s-main .s-body main.s-scroll-y":"margin-right:0"},[`@container (max-width: ${A1}px)`]:{".s-content > .s-box":"margin-inline: calc(-1 * $3); r:0 border-inline:0"}});function S0(t={}){let a=t.nav,e=t.navPosition??"left",h=x.proxy({open:!1}),p=x.proxy({narrow:typeof document<"u"&&document.documentElement.clientWidth<=v1}),r=t.routes;if(r!=null&&t.content!=null)throw new Error("Staffa: S.main() takes either `content` or `routes`, not both");let o=r?new V1({routes:r,notFound:t.notFound,ancestors:t.ancestors,title:t.title,$shell:p}):null;o&&(x(()=>o.setColumns(t.columns)),x(()=>o.setLinkNavigation(t.linkNavigation)));let d=o&&t.home!==null?t.home??"/":null,c=()=>{t.maxWidth!=null&&x("max-width:",t.maxWidth)},n=x("div.s-main",t.attrs,()=>{x(()=>{a==null||!a.items.length?x("--s-nav-w: 0px"):x(`.s-nav-${e}`,`--s-nav-w: ${t.navWidth??z0}px`)}),x(()=>{(o!=null||t.title!=null||t.subtitle!=null||t.logo!=null||t.menu!=null||a!=null&&a.items.length>0)&&x("header.s-s.neutral",t.topbarAttrs,()=>{x("div.s-bar",()=>{x(c),x(()=>{if(p.narrow&&a!=null&&a.items.length){x("div.s-nav-trigger",()=>q0(a,h));return}t.logo!=null&&x(d!=null?"a.s-logo aria-label=Home":"div.s-logo",()=>{d!=null&&x("href=",d),M(t.logo)})}),x("div.s-titles",()=>{x(()=>{t.title!=null&&x(d!=null?"a.s-title":"div.s-title",()=>{d!=null&&x("href=",d),M(t.title)})}),P0(t,o,a,p)}),x(()=>{let s=p.narrow?o?.currentPanel?.actions:void 0,m=s??t.menu;m!=null&&x(`div.s-menu${s!=null?".s-panel-origin":""}`,()=>M(m))})})})}),x("div.s-body",()=>{x("div.s-body-inner",()=>{x(c),x(()=>{a==null||!a.items.length||(x(`nav.s-nav-panel.s-nav-${e}`,t.navAttrs,()=>{i1(a.items)}),x("div.s-nav-sep aria-hidden=true"))}),D0(t,o)}),x(()=>{a!=null&&a.items.length&&h.open&&T0(a,t.navPageAttrs,h,p)})}),x(()=>{t.footer!=null&&x("footer",()=>{x("div.s-bar",()=>{x(c),M(t.footer)})})})});return E0(n,p),a!=null&&s1(()=>a.items,()=>{h.open=!1}),(a!=null||o)&&x(()=>{let f=m=>()=>{P1()||b1()||m()},s=()=>n.querySelector(".s-nav-trigger button");h.open?S("Esc","Close the navigation",f(()=>{h.open=!1,s()?.focus()}),"global"):o&&o.currentPanelIndex>0?S("Esc","Back to the previous panel",f(()=>{o.back()}),"global"):S("Esc","Jump to the navigation",f(()=>{let m=n.querySelector(".s-nav-panel");m?.offsetParent!=null?(m.querySelector("[aria-current=page]")??m.querySelector(".s-menu-item:not([aria-disabled=true])"))?.focus():s()?.click()}),"global")}),o??void 0}var k1=null;function $0(){k1?.()}function P0(t,a,e,h){x(()=>{if(t.subtitle!=null&&(a==null||O0(a,e,h))){x("div.s-subtitle",()=>M(t.subtitle));return}a?.drawCrumbs()})}function O0(t,a,e){return e.narrow||a==null||t.panels.length>1?!1:R1(a.items)}function E0(t,a){if(typeof ResizeObserver>"u")return;let e=new ResizeObserver(h=>{let p=h[0]?.contentBoxSize?.[0],r=p?p.inlineSize:h[0]?.contentRect.width;r!=null&&(a.narrow=r<=v1)});e.observe(t),x.clean(()=>e.disconnect())}function q0(t,a){o1({icon:t.button?.icon??(()=>x(()=>(a.open?h1:u1)())),ariaLabel:t.button?.ariaLabel??"Open navigation",attrs:t.button?.attrs,click:()=>{a.open=!a.open}})}function T0(t,a,e,h){let p=!1,r=()=>{p=!0,e.open=!1},o=x("nav.s-nav-page.s-s.neutral aria-label=Navigation create=s-nav-page-off destroy=s-nav-page-off",a,()=>i1(t.items,r));k1=r,x.clean(()=>{k1===r&&(k1=null)});let d=x.peek(G1,"path");x(()=>{G1.path!==d&&!B1(G1.path)&&r()});let c=o.closest(".s-main"),n=o.parentElement?.querySelector(":scope > .s-body-inner"),f=n?.querySelector(":scope > main");n?.setAttribute("inert",""),x(()=>{h.narrow||(e.open=!1)}),x.clean(()=>{n?.removeAttribute("inert"),p&&(f&&R0(f),c?.querySelector(".s-nav-trigger button")?.focus())}),requestAnimationFrame(()=>{document.body.contains(o)&&Y(o,".s-menu-item[aria-current=page]")})}function R0(t){t.classList.add("s-slide-in"),t.offsetWidth,t.classList.remove("s-slide-in")}function D0(t,a){if(a){a.drawColumns();return}let e=x("main",()=>{x("div.s-content",t.contentAttrs,()=>{M(t.content)})});Z0(e)}function Z0(t){if(typeof ResizeObserver>"u")return;let a=()=>t.classList.toggle("s-scroll-y",t.offsetWidth>t.clientWidth),e=new ResizeObserver(a);e.observe(t),t.firstElementChild&&e.observe(t.firstElementChild),a(),x.clean(()=>e.disconnect())}import O from"aberdeen";O.insertGlobalCss({".s-select_wrap":{"&":"position:relative display:block",select:"w:100% cursor:pointer padding-right:2.2em; appearance:none","&::after":"content: '\u25BE'; position:absolute right:0.7em top:50%; transform: translateY(-50%); pointer-events:none fg:$s-muted font-size:0.85em"}});function B0(t){W(t,(a,e)=>{O("div.s-select_wrap",()=>{O("select.s-input",t.inputAttrs,()=>{a1(t,a,e),O("change=",h=>{t.bind&&(t.bind.value=h.target.value)}),O(()=>{let h=typeof t.options=="function"?t.options():t.options,p=t.bind?.value??"";t.placeholder!=null&&O("option",()=>{O("value= disabled=true hidden=true"),p||O("selected=true"),O("#",t.placeholder)});for(let r of h){let o=typeof r=="string"?{value:r,label:r}:{value:r.value,label:r.label??r.value};O("option",()=>{O("value=",o.value),o.value===p&&O("selected=true"),O("#",o.label)})}})})})})}import I from"aberdeen";I.insertGlobalCss({"textarea.s-input":"resize:vertical min-height:3em line-height:1.45","textarea.s-input.s-autoGrow":"resize:none min-height:2.5em overflow-y:hidden"});function F0(t={}){let a=t.autoGrow!==!1;W(t,(e,h)=>{let p=I("textarea.s-input",t.inputAttrs,()=>{a?(I(".s-autoGrow"),I("input=",r=>{P2(r.currentTarget),t.input&&t.input(r)})):(I("rows=",t.rows??4),I("resize:",t.resize??"vertical"),t.input&&I("input=",t.input)),t.placeholder!=null&&I("placeholder=",t.placeholder),t.value!=null&&!t.bind&&I("value=",t.value),t.change&&I("change=",t.change),a1(t,e,h,t.bind)});a&&requestAnimationFrame(()=>P2(p))})}function P2(t){t.style.height="auto",t.style.height=`${t.scrollHeight}px`}export{I1 as addContextMenu,r1 as addTooltip,G2 as alert,J2 as autocomplete,S as bindKey,a0 as box,R as button,e0 as buttonChooser,j as buttonGroup,h0 as checkbox,L2 as closeFloatingMenu,$0 as closeNav,X2 as confirm,e1 as dialog,p0 as form,q as formatKey,J1 as getDarkMode,o1 as iconButton,P1 as isDialogOpen,b1 as isFloatingMenuOpen,S0 as main,u0 as menu,y0 as menuButton,j2 as prompt,H1 as revealInStrip,w1 as scrollStrip,B0 as select,T2 as setDarkMode,_2 as setKeyHelp,F1 as showFloatingMenu,O1 as showKeyHelp,b0 as tabs,F0 as textarea,$1 as textline,y1 as toast};
1
+ import B from"aberdeen";var J1=t=>`background: $s-bg linear-gradient(${t}, color-mix(in oklab, $s-bg, white 9%), color-mix(in oklab, $s-bg, black 9%));`,$1=J1("170deg"),O1=J1("180deg"),P1="staffa:darkMode",Y1=B.proxy({value:q2()});function q2(){try{let t=localStorage.getItem(P1);if(t==="dark")return!0;if(t==="light")return!1}catch{}}function R2(t){Y1.value=t;try{t===void 0?localStorage.removeItem(P1):localStorage.setItem(P1,t?"dark":"light")}catch{}}function t2(t=!1){let a=Y1.value;return a===void 0&&!t?B.darkMode():a}B(()=>{t2()?B.insertGlobalCss({":root, .s-s.neutral":"--s-bg:#0e0f12 --s-text:#e9eaec",".s-s.neutral":"--s-bg:#191b1f --s-text:#e9eaec",".s-s.neutral .s-s.neutral":"--s-bg:#23262b"}):B.insertGlobalCss({":root, .s-s.neutral":"--s-bg:#eef0f3 --s-text:#1d1f24",".s-s.neutral, .s-s.neutral":"--s-bg:#ffffff --s-text:#1d1f24",".s-s.neutral .s-s.neutral":"--s-bg:#f6f7f9"})});B.setSpacingCssVars(1.1);B.insertGlobalCss({"*, *::before, *::after":"box-sizing:border-box",html:"text-size-adjust:100%",body:"m:0 p:$3 min-height:100dvh line-height:1.5 font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing:antialiased text:$s-text "+$1,a:"color: $s-link-fg; text-decoration:underline text-underline-offset:2px; transition: color 0.12s, filter 0.12s;","a:hover":"filter: brightness(1.15)","input, button, textarea, select, optgroup":"font:inherit color:inherit","input:where(:not([type=checkbox],[type=radio],[type=range],[type=file],[type=color],[type=image],[type=submit],[type=button],[type=reset],[type=hidden])), textarea, select":"background:$s-bg border: 1px solid $s-faint; r:$s-radius-sm padding: 0.45em 0.65em; max-width:100%","input:where([type=checkbox],[type=radio])":"width:1.15em height:1.15em cursor:pointer","input[type=range]":"appearance:none background:transparent cursor:pointer vertical-align:middle","input[type=range]::-webkit-slider-runnable-track":"height:4px r:99px background:$s-faint","input[type=range]::-moz-range-track":"height:4px r:99px background:$s-faint","input[type=range]::-moz-range-progress":"height:4px r:99px background:$s-accent","input[type=range]::-webkit-slider-thumb":"appearance:none width:16px height:16px margin-top:-6px r:50% background:$s-accent","input[type=range]::-moz-range-thumb":"width:16px height:16px border:0 r:50% background:$s-accent","input[type=file]":"cursor:pointer",progress:"appearance:none border:0 height:6px r:99px background:$s-faint overflow:hidden vertical-align:middle","progress::-webkit-progress-bar":"background:$s-faint r:99px","progress::-webkit-progress-value":"background:$s-accent r:99px","progress::-moz-progress-bar":"background:$s-accent r:99px",meter:"vertical-align:middle",fieldset:"border: 1px solid $s-faint; r:$s-radius-sm padding:$2 min-width:0",legend:"padding: 0 $1; font-weight:600","code, kbd, samp, pre":"font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;",code:"background: color-mix(in oklab, $s-text, $s-bg 86%); padding: 0.12em 0.34em; r:4px font-size:0.9em",pre:"background: color-mix(in oklab, $s-text, $s-bg 92%); p:$3 r: $s-radius; overflow:auto","pre code":"background:transparent p:0","img, svg, video, canvas":"max-width:100% h:auto",hr:"border:0 border-top: 1px solid $s-faint;","::placeholder":"color: $s-muted; opacity:1",":focus-visible":"outline: 2px solid $s-focus; outline-offset:2px",small:"color:$s-muted font-size:0.9em","@media (prefers-reduced-motion: reduce)":{"*, *::before, *::after":"transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important;"},":root":"--s-primary:#00a884 --s-danger:#dc5b41 --s-success:#00a884 --s-warning:#ef6b00 --s-link:#3f8cd8 --s-radius-sm:6px --s-radius:12px --s-radius-lg:18px --s-focus: color-mix(in srgb, $s-primary 38%, transparent); --s-gradient: linear-gradient(135deg, color-mix(in oklab, $s-primary, white 16%), color-mix(in oklab, $s-primary, black 14%));",":root, .s-s.neutral":"--s-accent:$s-primary --s-link-fg:$s-link",".s-s:not(.neutral)":"--s-bg:$s-primary border:0 --s-text:#eee --s-accent:#fff --s-link-fg:#eef --s-muted: color-mix(in srgb, #fff 70%, transparent); --s-faint: color-mix(in srgb, #fff 30%, transparent);",".s-s.danger":"--s-bg:$s-danger",".s-s.success":"--s-bg:$s-success",".s-s.warning":"--s-bg:$s-warning",".s-s.link":"--s-bg:$s-link",".s-s.primary":"--s-bg:$s-primary",":root, .s-s":"--s-muted: color-mix(in oklab, $s-text, $s-bg 42%); --s-faint: color-mix(in oklab, $s-text, $s-bg 80%); color:$s-text accent-color:$s-accent scrollbar-width:thin scrollbar-color: $s-faint transparent;",".s-s":$1+" r:$s-radius",":where(.s-s.neutral)":"border: 1px solid $s-faint;",".s-s::-webkit-scrollbar, .s-s ::-webkit-scrollbar":"width:10px height:10px",".s-s::-webkit-scrollbar-track, .s-s ::-webkit-scrollbar-track":"background:transparent",".s-s::-webkit-scrollbar-thumb, .s-s ::-webkit-scrollbar-thumb":"background:$s-faint border-radius:99px border: 2px solid transparent; background-clip:padding-box",".s-s.shadow.neutral:not(.s-btn)":"box-shadow: 0 4px 14px rgba(0,0,0,0.13);",".s-s.extra-shadow.neutral:not(.s-btn)":"box-shadow: 0 18px 50px rgba(0,0,0,0.28);",".s-s.shadow:not(.neutral):not(.tonal):not(.outlined)":"box-shadow: 0 4px 14px color-mix(in srgb, $s-bg 30%, transparent);",".s-s.extra-shadow:not(.neutral):not(.tonal):not(.outlined)":"box-shadow: 0 14px 40px color-mix(in srgb, $s-bg 40%, transparent);",".s-s.no-shadow":"box-shadow: none !important;",".s-s:not(.neutral).tonal, .s-s:not(.neutral).outlined":"--s-text:$s-bg --s-accent:$s-bg --s-link-fg:$s-bg --s-faint: color-mix(in srgb, $s-bg 30%, transparent); --s-muted: color-mix(in srgb, $s-bg 70%, transparent);",".s-s:not(.neutral).tonal":"background: color-mix(in srgb, $s-bg 15%, transparent); border: 1px solid $s-faint;",".s-s:not(.neutral).outlined":"background: transparent; border: 1px solid color-mix(in srgb, $s-bg 45%, transparent);",".s-s:not(.neutral) .s-s.tonal, .s-s:not(.neutral) .s-s.outlined":"--s-text:#fff --s-accent:#fff --s-link-fg:#fff "+$1+" border-color: transparent;"});B.insertGlobalCss({".s-preload, .s-preload *, .s-preload *::before, .s-preload *::after":"transition: none !important; animation: none !important;"});if(typeof document<"u"&&typeof requestAnimationFrame=="function"){let t=document.documentElement;t.classList.add("s-preload"),requestAnimationFrame(()=>requestAnimationFrame(()=>t.classList.remove("s-preload")))}B.insertGlobalCss({":disabled, [aria-disabled=true]":"opacity:0.45 filter:saturate(0.6) user-select:none",":disabled, [aria-disabled=true], :disabled *, [aria-disabled=true] *":"pointer-events:none cursor:not-allowed"});var D2="p, ul, ol, dl, blockquote, pre, table, figure, hr, h1, h2, h3, h4, h5, h6";B.insertGlobalCss({[`${D2}`]:{"&":"margin:0","&:not(:first-child)":"margin-top:$3"},"h1, h2, h3, h4, h5, h6":{"&":"line-height:1.15 font-weight:700 text-wrap:balance","&:not(:first-child)":"margin-top:1.4em"},h1:"font-size:2em font-weight:800 letter-spacing:-0.022em",h2:"font-size:1.55em letter-spacing:-0.018em",h3:"font-size:1.3em letter-spacing:-0.011em",h4:"font-size:1.1em",h5:"font-size:0.95em letter-spacing:0.005em",h6:"font-size:0.8em fg:$s-muted text-transform:uppercase letter-spacing:0.07em","ul, ol":{"&":"padding-left:1.5em","> li:not(:first-child), li > &:not(:first-child)":"margin-top:$1"},blockquote:"border-left: 3px solid $s-faint; padding-left: $3; fg: $s-muted",table:"border-collapse:collapse","th, td":"text-align:left padding: $1 $2; border-bottom: 1px solid $s-faint; vertical-align:top",th:"font-weight:600","thead th":"border-bottom: 2px solid $s-faint;",dt:"font-weight:600",dd:"margin-left: 1.5em",figcaption:"fg:$s-muted font-size:0.9em margin-top:$1 text-align:center"});import E1 from"aberdeen";var u1=typeof navigator<"u"&&/mac|iphone|ipad|ipod/i.test(navigator.platform||navigator.userAgent),Z2={esc:"escape",space:" "},B2={" ":"Space",escape:"Esc",arrowup:"\u2191",arrowdown:"\u2193",arrowleft:"\u2190",arrowright:"\u2192"},y1=new WeakMap,T=[];function e2(){let t=E1();if(!t)throw new Error("Staffa: claimKeyboard needs a current element");return T.push(t),()=>{let a=T.indexOf(t);a>=0&&T.splice(a,1)}}function h2(t){let[,a,e,h]=/^(mod\+)?(shift\+)?(.*)$/i.exec(t),p=h.toLowerCase();if(p=Z2[p]??p,!p||p.length>1&&/[-+]/.test(p))throw new Error(`Staffa: can't parse key "${t}" \u2014 write "k", "f2", "mod+k" or "mod+shift+f2"`);if(e&&p.toUpperCase()===p)throw new Error(`Staffa: "${t}" \u2014 write the shifted character itself ("?", not "shift+/")`);return(a?"mod+":"")+(e?"shift+":"")+p}function F2(t){if(t.altKey||(u1?t.ctrlKey:t.metaKey))return null;let a=t.key.toLowerCase(),e=t.shiftKey&&(a.length>1||t.key.toUpperCase()!==a);return((u1?t.metaKey:t.ctrlKey)?"mod+":"")+(e?"shift+":"")+a}function p2(t,a){if(!(a instanceof HTMLElement))return!1;let e=t.startsWith("mod+"),h=t.replace(/^(mod\+)?(shift\+)?/,"");if(h==="enter"&&a.closest("a[href]")!=null||!e&&(h==="enter"||h===" ")&&a.closest("button, summary, [role=button]")!=null)return!0;let p=a.tagName;return!e&&h!=="escape"&&(p==="INPUT"||p==="TEXTAREA"||p==="SELECT"||a.isContentEditable)}function r2(t,a){let e=T[T.length-1];return a.global===!0||!e||e.contains(t)}function I2(t){for(let a=T.length-1;a>=0;a--)if(T[a].contains(t))return T[a]}function o2(){return T[T.length-1]??document.body}function d2(t){let a=T[T.length-1];return a&&!(t&&a.contains(t))?a:t??document.body}var a2=!1;function U2(t){if(t.defaultPrevented||t.repeat||t.isComposing)return;let a=F2(t),e=t.target instanceof Element?t.target:null;if(!(a==null||p2(a,e)))for(let h=d2(e);h;h=h.parentElement){let p=y1.get(h)?.get(a);if(p&&r2(h,p)){p.press&&(t.preventDefault(),p.press(t));return}}}function n2(t){let a=new Map;for(let e=d2(t);e;e=e.parentElement){let h=y1.get(e);if(h)for(let[p,r]of h)!a.has(p)&&r2(e,r)&&!p2(p,t)&&a.set(p,r)}return[...a]}function $(t,a,e,h="normal"){let p=E1(),r=h==="global"?document.body:h==="local"?p:h==="normal"?(p&&I2(p))??document.body:h;if(!r)throw new Error("Staffa: a local key binding needs a current element");let o=h2(t),d=y1.get(r);d||y1.set(r,d=new Map);let n={description:a,press:e,global:h==="global",prev:d.get(o)};d.set(o,n),a2||(a2=!0,document.addEventListener("keydown",U2)),E1.clean(()=>{let c=d.get(o);if(c===n)n.prev?d.set(o,n.prev):d.delete(o);else for(;c;c=c.prev)if(c.prev===n){c.prev=n.prev;break}})}function q(t,a=!1){let e=h2(t),h=e.startsWith("mod+"),p=h?e.slice(4):e,r=p.startsWith("shift+"),o=r?p.slice(6):p,d=o.length===1?o.toUpperCase():o[0].toUpperCase()+o.slice(1);if(a){let c=o===" "?"Space":r||o.length>1?d:o;return(h?u1?"Meta+":"Control+":"")+(r?"Shift+":"")+c}let n=B2[o]??d;return u1?(r?"\u21E7":"")+(h?"\u2318":"")+n:(h?"Ctrl+":"")+(r?"Shift+":"")+n}import Q from"aberdeen";import c2 from"aberdeen";var f1=640,K2=0;function X(t="s"){return`${t}-${++K2}`}function x(t,...a){t!=null&&(typeof t=="function"?t(...a):c2("rich=",t))}var N2="a[href], button, input, select, textarea, [tabindex]";function p1(t,a){let e=p=>p instanceof HTMLElement&&!p.hasAttribute("disabled")&&p.getAttribute("aria-disabled")!=="true"&&p.tabIndex>=0&&p.getClientRects().length>0,h=(a?[...t.querySelectorAll(a)].find(e):void 0)??[...t.querySelectorAll(N2)].find(e);return h?.focus(),h!=null}function j(t){queueMicrotask(()=>c2(t))}import w from"aberdeen";import P from"aberdeen";import R from"aberdeen";R.insertGlobalCss({".s-tt-tip":{"&":"position:fixed z-index:500 max-width:20rem w:max-content padding: 0.3em 0.65em; font-size:0.85em line-height:1.4 pointer-events:none"}});var r1=R.proxy(void 0),F=null;typeof window<"u"&&window.addEventListener("scroll",()=>{r1.value=void 0},{capture:!0,passive:!0});function W2(t,a,e,h){let r=window.innerWidth,o=window.innerHeight,d=0,n=0;return h==="bottom"?(d=t.left+(t.width-a)/2,n=t.bottom+7,n+e>o-8&&(n=t.top-e-7)):h==="left"?(d=t.left-a-7,n=t.top+(t.height-e)/2,d<8&&(d=t.right+7)):h==="right"?(d=t.right+7,n=t.top+(t.height-e)/2,d+a>r-8&&(d=t.left-a-7)):(d=t.left+(t.width-a)/2,n=t.top-e-7,n<8&&(n=t.bottom+7)),{x:Math.max(8,Math.min(d,r-a-8)),y:Math.max(8,Math.min(n,o-e-8))}}function T1(){F&&clearTimeout(F),F=setTimeout(()=>{r1.value=void 0,F=null},100)}j(()=>{let t=r1.value;if(!t)return;let{opts:a,anchor:e}=t,h=a.placement??"top",p=R("div.s-tt-tip.s-s.neutral.shadow role=tooltip visibility:hidden",a.attrs,()=>{R("mouseenter=",()=>{F&&(clearTimeout(F),F=null)}),R("mouseleave=",T1),x(a.tip)});requestAnimationFrame(()=>{if(!document.body.contains(p))return;let r=e.getBoundingClientRect(),{x:o,y:d}=W2(r,p.offsetWidth,p.offsetHeight,h);p.style.left=o+"px",p.style.top=d+"px",p.style.visibility=""})});function c1(t){let a=e=>{F&&(clearTimeout(F),F=null),r1.value={opts:t,anchor:e.currentTarget}};R("mouseenter=",a),R("mouseleave=",T1),R("focusin=",e=>{e.target.matches?.(":focus-visible")&&a(e)}),R("focusout=",T1),R.clean(()=>{R.unproxy(r1).value?.opts===t&&(r1.value=void 0)})}P.insertGlobalCss({".s-btn":{"&":"display:inline-flex align-items:center justify-content:center gap:$2 font-weight:450 line-height:1.1 white-space:nowrap cursor:pointer text-decoration:none padding: $m2 $m3; transition: background 0.15s, border-color 0.15s, color 0.15s, filter 0.15s, box-shadow 0.15s, transform 0.08s;","&:focus-visible":"outline: 3px solid $s-focus; outline-offset: 1px;","&:hover":"filter: brightness(1.06)","&.tonal:hover, &.outlined:hover":"background: color-mix(in srgb, $s-bg 24%, transparent);","&.neutral:hover":"filter:none background: color-mix(in srgb, $s-text 8%, $s-bg);","> svg":"width:1.25em height:1.25em","&:active:not(:disabled)":"transform: translateY(1px)","&.small, .small > &":"padding: $m1 $m2; font-size:0.85em border-radius:$s-radius-sm","&.large, .large > &":"font-size:1.4em border-radius:$s-radius-lg"},".s-icon-btn":{"&":"display:inline-flex align-items:center justify-content:center flex-shrink:0 width:2rem height:2rem p:0 border:0 background:transparent cursor:pointer fg:$s-muted r:$s-radius-sm line-height:1 font-size:1rem text-decoration:none transition: color 0.12s, background 0.12s;","> svg":"width:1.25em height:1.25em","&:hover:not(:disabled):not([aria-disabled=true])":"fg:$s-text background: color-mix(in srgb, $s-text 10%, transparent);","&:focus-visible":"outline: 3px solid $s-focus; outline-offset:1px","&.small, .small > &":"width:1.6rem height:1.6rem font-size:0.8rem","&.large, .large > &":"width:2.4rem height:2.4rem font-size:1.2rem"}});function i1(t){let a=t.href!=null?"a":"button";P(`${a}.s-icon-btn`,t.attrs,()=>{i2(t),P("aria-label=",t.ariaLabel),t.key&&s2(t.key,t.ariaLabel,void 0,t.disabled),x(t.icon)})}function i2(t){t.href!=null?(P("role=button"),t.disabled?P("aria-disabled=true"):P("href=",t.href)):(P("type=",t.type??"button"),t.disabled&&P("disabled=true")),t.click&&!t.disabled&&P("click=",t.click)}function s2(t,a,e,h){let p=P(),r=a?`${a} \xB7 ${q(t)}`:q(t);c1({tip:()=>P("#",r)}),h||(P("aria-keyshortcuts=",q(t,!0)),$(t,typeof e=="string"?e:a,()=>p.click()))}function D(t={}){let a=typeof t=="string"||typeof t=="function"?{content:t}:t,e=a.href!=null?"a":"button";P(`${e}.s-btn.s-s.shadow`,a.attrs,()=>{i2(a),a.ariaLabel&&P("aria-label=",a.ariaLabel),a.key&&s2(a.key,a.ariaLabel,a.content,a.disabled),x(a.icon),x(a.content)})}import l2 from"aberdeen";l2.insertGlobalCss({".s-bgroup":{"&":"display:inline-flex align-items:stretch","&.s-spaced":"gap:$2 flex-wrap:wrap","&.s-vertical":"flex-direction:column","&.s-attached":"gap:0","&.s-attached:not(.s-vertical) > .s-btn:not(:first-child)":"margin-left:-1px","&.s-attached:not(.s-vertical) > .s-btn:not(:first-child):not(:last-child)":"r:0","&.s-attached:not(.s-vertical) > .s-btn:first-child:not(:last-child)":"border-top-right-radius:0 border-bottom-right-radius:0","&.s-attached:not(.s-vertical) > .s-btn:last-child:not(:first-child)":"border-top-left-radius:0 border-bottom-left-radius:0","&.s-attached.s-vertical > .s-btn:not(:first-child)":"margin-top:-1px","&.s-attached.s-vertical > .s-btn:not(:first-child):not(:last-child)":"r:0","&.s-attached.s-vertical > .s-btn:first-child:not(:last-child)":"border-bottom-left-radius:0 border-bottom-right-radius:0","&.s-attached.s-vertical > .s-btn:last-child:not(:first-child)":"border-top-left-radius:0 border-top-right-radius:0","&.s-attached > .s-btn:hover, &.s-attached > .s-btn:focus-visible":"z-index:1"}});function Y(t={}){let e=`.s-${t.layout??"attached"}${t.vertical?".s-vertical":""}`;l2(`div.s-bgroup${e} role=group`,t.attrs,()=>{if(t.buttons)for(let h of t.buttons)D(h);x(t.content)})}import t1 from"aberdeen";import S from"aberdeen";S.insertGlobalCss({".s-field":{"&":"display:flex flex-direction:column gap:$1","> label":"font-weight:600 font-size:0.9em fg:$s-text user-select:none"},".s-req":"fg:$s-danger margin-left:2px",".s-help":"font-size:0.82em fg:$s-muted",".s-error":"font-size:0.82em fg:$s-danger",".s-input":{"&":"w:100% background: color-mix(in oklab, $s-bg, $s-text 4%); color:$s-text border: 1px solid $s-faint; r:$s-radius padding: 0.55em 0.7em; transition: border-color 0.15s, box-shadow 0.15s;","&:hover:not(:disabled)":"border-color: color-mix(in oklab, $s-text, $s-bg 55%);","&:focus-visible":"border-color:$s-accent box-shadow: 0 0 0 3px $s-focus; outline:none","&[aria-invalid=true]":"border-color:$s-danger"}});function _(t,a){let e=t.id??X("field"),h=()=>!!t.error;S("div.s-field",t.attrs,()=>{S(()=>{t.label!=null&&S("label for=",e,()=>{x(t.label),t.required&&S("span.s-req aria-hidden=true #*")})}),a(e,h),S(()=>{t.help!=null&&!t.error&&S("div.s-help",()=>x(t.help))}),S(()=>{t.error&&S("div.s-error role=alert #",t.error)})})}function o1(t,a,e,h){S("id=",a),t.name&&S("name=",t.name),S(()=>{t.disabled&&S("disabled=true")}),S(()=>{t.required&&S("aria-required=true")}),S(()=>S("aria-invalid=",e()?"true":"false")),h&&S("bind=",h)}function q1(t={}){_(t,(a,e)=>{t1("input.s-input",t.inputAttrs,()=>{t1("type=",t.type??"text"),t.placeholder!=null&&t1("placeholder=",t.placeholder),t.autocomplete!=null&&t1("autocomplete=",t.autocomplete),t.value!=null&&!t.bind&&t1("value=",t.value),t.input&&t1("input=",t.input),t.change&&t1("change=",t.change),o1(t,a,e,t.bind)})})}w.insertGlobalCss({".s-backdrop":{"&":"position:fixed inset:0 z-index:200 display:block background: rgba(0,0,0,0.55); transition: opacity 0.4s ease-in-out;","&.hidden":"opacity:0 pointer-events:none"},".s-dialog":{"&":"position:fixed z-index:200 top:50% left:50% display:flex flex-direction:column transform:translate(-50%,-50%) min-width:min(20rem,90vw) max-width:min(90vw,44rem) max-height:min(88vh,800px) r: $s-radius-lg; overflow:hidden transition: opacity 0.2s ease-out, transform 0.2s ease-out;","> header":"display:flex align-items:center gap:$2 padding: $2 $3; border:0 border-bottom: 1px solid $s-faint; r:0 font-weight:600 flex-shrink:0","> footer":"display:flex align-items:center justify-content:flex-end gap:$2 padding: $2 $3; border:0 border-top: 1px solid $s-faint; r:0 flex-shrink:0","> div":"p:$3 gap:$3 display:flex flex-direction:column overflow-y:auto flex:1 min-height:0","&.hidden":"opacity:0 pointer-events:none transform: translate(-50%, calc(-50% + 20px)); pointer-events:none"}});var s1=w.proxy({}),G2=0,M2=w.derive(()=>{let t=Object.keys(s1);if(t.length)return t[t.length-1]});function R1(){return M2.value!=null}j(()=>{w.onEach(s1,({resolve:t,opts:a},e)=>{let h=()=>{delete s1[e]};w.clean(()=>{a.onClose?.(),t()});let p=document.activeElement;w.clean(()=>{p instanceof HTMLElement&&document.contains(p)&&p.focus()});let r=w.derive(()=>M2.value!=e);w("div.s-backdrop create=hidden destroy=hidden .hidden=",r,"click=",()=>{a.allowCancel!==!1&&h()});let o=w("div.s-dialog.neutral.s-s.extra-shadow create=hidden destroy=hidden",a.attrs,()=>{a.keyboardTransparent||w.clean(e2());let d=o2();w(()=>{let n=a.allowCancel!==!1;$("esc",n?"Close this dialog":void 0,n?h:()=>{},d)}),w(()=>{a.header!=null&&w("header.s-s.neutral",a.headerAttrs,()=>x(a.header))}),w("div",a.contentAttrs,()=>{x(a.content,h)}),w(()=>{a.footer!=null&&w("footer.s-s.neutral",a.footerAttrs,()=>x(a.footer))})});requestAnimationFrame(()=>{document.body.contains(o)&&p1(o)})})});function d1(t){let a=++G2;return t.cancelWithScope!==!1&&w.clean(()=>{delete s1[a]}),new Promise(e=>{s1[a]={resolve:e,opts:t}})}function X2(t,a={}){return d1({header:"Alert",allowCancel:!0,content:e=>{w("p",()=>{w("#",t)}),Y({layout:"spaced",attrs:"align-self:flex-end",content:()=>{D({content:"OK",click:e})}})},...a})}function j2(t,a={}){return new Promise(e=>{let h=!1;d1({header:"Confirm",allowCancel:!0,content:p=>{w("p",()=>{w("#",t)}),Y({layout:"spaced",attrs:"align-self:flex-end",content:()=>{D({content:"Cancel",attrs:".neutral",click:p}),D({content:"OK",click:()=>{h=!0,p()}})}})},...a,onClose:()=>{e(h),a.onClose?.()}})})}function _2(t,a="",e={}){return new Promise(h=>{let p=null;d1({header:"Input",allowCancel:!0,content:r=>{w("p",()=>{w("#",t)});let o=w.proxy({value:a});w("form display:contents",()=>{w("submit=",d=>{d.preventDefault(),p=o.value,r()}),q1({bind:w.ref(o,"value")}),Y({layout:"spaced",attrs:"align-self:flex-end",content:()=>{D({content:"Cancel",attrs:".neutral",type:"button",click:r}),D({content:"OK",type:"submit"})}})})},...e,onClose:()=>{h(p),e.onClose?.()}})})}Q.insertGlobalCss({".s-keyhelp":{"&":"display:flex flex-direction:column gap:$1 min-width:14rem","> div":"display:flex align-items:baseline justify-content:space-between gap:$4",kbd:"font-family:inherit font-size:0.85em fg:$s-muted white-space:nowrap border: 1px solid $s-faint; r:$s-radius-sm padding: 0 0.4em;"}});var g1=null;function D1(){if(g1){g1();return}let t=n2(document.activeElement);d1({header:"Keyboard shortcuts",cancelWithScope:!1,keyboardTransparent:!0,onClose:()=>{g1=null},content:a=>{g1=a;let e=h=>{h.repeat||["Control","Shift","Alt","Meta","Escape","?"].includes(h.key)||a()};document.addEventListener("keydown",e,!0),Q.clean(()=>document.removeEventListener("keydown",e,!0)),Q("div.s-keyhelp",()=>{for(let[h,p]of t)p.description!==void 0&&Q("div",()=>{Q("span",()=>x(p.description)),Q("kbd text=",q(h))})})}})}var x2=Q.proxy(!0);function Q2(t){x2.value=t}Q(()=>{x2.value&&($("?",void 0,D1,"global"),$("mod+?","This overview",D1,"global"))});import M from"aberdeen";M.insertGlobalCss({".s-ac":{"&":"position:relative","> .s-control":"display:flex flex-wrap:wrap align-items:center gap:$1 background: color-mix(in oklab, $s-bg, $s-text 4%); color:$s-text border: 1px solid $s-faint; r:$s-radius padding: 0.3em 0.4em; cursor:text; transition: border-color 0.15s, box-shadow 0.15s;","> .s-control:hover":"border-color: color-mix(in oklab, $s-text, $s-bg 55%);","> .s-control:focus-within":"border-color:$s-accent box-shadow: 0 0 0 3px $s-focus;","&[aria-invalid=true] > .s-control":"border-color:$s-danger",".s-chip":"display:inline-flex align-items:center gap:$1 font-size:0.85em background: color-mix(in oklab, $s-bg, $s-text 10%); border: 1px solid $s-faint; r:$s-radius padding: 0.1em 0.2em 0.1em 0.5em;",".s-chip > button":"cursor:pointer border:0 background:transparent fg:$s-muted font-size:1.1em line-height:1 padding: 0 0.2em; r:4px",".s-chip > button:hover":"fg:$s-text background:$s-faint",input:"flex:1 min-width:6ch border:0 background:transparent color:inherit outline:none padding:0.25em","> .s-menu":"position:absolute top:100% left:0 right:0 z-index:20 margin-top:4px max-height:15rem overflow-y:auto list-style:none p:$1 margin-bottom:0","> .s-menu li":"margin:0",".s-option":"padding: 0.45em 0.6em; r:6px cursor:pointer transition: background 0.1s;",".s-option[aria-selected=true]":"background: color-mix(in srgb, $s-text 10%, transparent);",".s-add":"fg:$s-accent font-style:italic",".s-empty":"padding: 0.45em 0.6em; fg:$s-muted"}});function J2(t){return typeof t=="string"?{value:t,label:t}:{value:t.value,label:t.label??t.value}}function Y2(t){let a=X("ac-menu"),e=M.proxy({query:"",open:!1,active:0}),h=()=>(typeof t.options=="function"?t.options():t.options).map(J2),p=()=>{let l=t.bind?.value;return l==null||l===""?[]:Array.isArray(l)?l:[l]},r=l=>h().find(u=>u.value===l)?.label??l;if(!t.multi){let l=t.bind?M.peek(t.bind,"value"):void 0;typeof l=="string"&&l&&(e.query=M.peek(()=>r(l)))}let o=()=>{let l=new Set(p()),u=h();t.multi&&(u=u.filter(H=>!l.has(H.value)));let b=e.query.trim().toLowerCase();return b&&(u=u.filter(H=>H.label.toLowerCase().includes(b))),u},d=(l,u)=>{if(t.multi){let b=Array.isArray(t.bind?.value)?[...t.bind.value]:[];b.includes(l)||b.push(l),t.bind&&(t.bind.value=b),e.query=""}else t.bind&&(t.bind.value=l),e.query=r(l),e.open=!1;e.active=0,u?.focus()},n=l=>{if(!t.bind)return;let u=t.bind.value??[];t.bind.value=u.filter(b=>b!==l)};_(t,(l,u)=>{M("div.s-ac",t.inputAttrs,()=>{M(()=>M("aria-invalid=",u()?"true":"false"));let b;M("div.s-control",()=>{M("click=",()=>b?.focus()),M(()=>{if(t.multi)for(let H of p())M("span.s-chip",()=>{M("span #",M.peek(()=>r(H))),M("button type=button aria-label=",`Remove ${H}`,()=>{M("#\xD7"),M("click=",k=>{k.stopPropagation(),n(H),b?.focus()})})})}),b=M("input type=text role=combobox autocomplete=off",()=>{M("id=",l,`aria-controls=${a} aria-autocomplete=list`),t.placeholder!=null&&M("placeholder=",t.placeholder),t.disabled&&M("disabled=true"),t.required&&M("aria-required=true"),M("bind=",M.ref(e,"query")),M(()=>M("aria-expanded=",e.open?"true":"false")),M(()=>{let k=o()[e.active];M("aria-activedescendant=",e.open&&k?`${a}-opt-${e.active}`:"")}),M("input=",()=>{e.open=!0,e.active=0}),M("focus=",()=>{e.open=!0}),M("blur=",()=>{setTimeout(()=>m(),150)}),M("keydown=",H=>c(H,b))})}),M(()=>{if(!e.open)return;let H=o(),k=e.query.trim(),G=t.allowCustom!==!1&&k!==""&&!H.some(V=>V.label.toLowerCase()===k.toLowerCase());M("ul.s-menu.s-s.neutral.shadow role=listbox",`id=${a}`,()=>{H.forEach((V,Z)=>{M("li.s-option role=option",`id=${a}-opt-${Z}`,()=>{M(()=>M("aria-selected=",e.active===Z?"true":"false")),M("#",V.label),M("mousedown=",s=>s.preventDefault()),M("click=",()=>d(V.value,b)),M("mousemove=",()=>{e.active=Z})})}),G&&M("li.s-option.s-add role=option",()=>{M("#",`Add "${k}"`),M("mousedown=",V=>V.preventDefault()),M("click=",()=>d(k,b))}),H.length===0&&!G&&M("li.s-empty #No matches")})}),M(()=>{if(t.name)if(t.multi)for(let H of p())M("input type=hidden",()=>{M("name=",t.name),M("value=",H)});else M("input type=hidden",()=>{M("name=",t.name),M("value=",p()[0]??"")})})})});function c(l,u){let b=o(),H=b.length-1;if(l.key==="ArrowDown")l.preventDefault(),e.open=!0,e.active=Math.min(H,e.active+1);else if(l.key==="ArrowUp")l.preventDefault(),e.active=Math.max(0,e.active-1);else if(l.key==="Enter"){l.preventDefault();let k=b[e.active];k?d(k.value,u):t.allowCustom!==!1&&e.query.trim()?d(e.query.trim(),u):e.open&&(e.open=!1)}else if(l.key==="Escape")e.open&&(l.preventDefault(),e.open=!1,t.multi||(e.query=r(p()[0]??"")));else if(l.key==="Backspace"&&t.multi&&e.query===""){let k=p();k.length&&n(k[k.length-1])}}function m(){e.open=!1,t.multi?e.query="":t.allowCustom!==!1&&e.query.trim()?d(e.query.trim()):e.query=r(p()[0]??"")}}import a1 from"aberdeen";import t0 from"aberdeen";var l1={size:24,color:"currentColor",strokeWidth:2,cap:"round",join:"round"};function a0(t,a){let e=a.size??l1.size,h=t0('svg.s-icon aria-hidden=true viewBox="0 0 24 24" fill=none',"width=",e,"height=",e,"stroke=",a.color??l1.color,"stroke-width=",a.strokeWidth??l1.strokeWidth,"stroke-linecap=",a.cap??l1.cap,"stroke-linejoin=",a.join??l1.join,a.attrs);h.innerHTML=t}function O(t){return(a={})=>a0(t,a)}var v2=O('<path d="m9 18 6-6-6-6" />');var m2=O('<circle cx="12" cy="12" r="10" />');var u2=O('<path d="M15 3h6v6" /><path d="M10 14 21 3" /><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />');var y2=O('<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />');var b1=O('<path d="M4 5h16" /><path d="M4 12h16" /><path d="M4 19h16" />');var f2=O('<path d="M12 17v5" /><path d="M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89" /><path d="m2 2 20 20" /><path d="M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11" />'),Z1=O('<path d="M12 17v5" /><path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" />');var g2=O('<path d="M22 2 2 22" />');var n1=O('<path d="M18 6 6 18" /><path d="m6 6 12 12" />');a1.insertGlobalCss({".s-box":{"&":"display:flex flex-direction:column overflow:hidden r: $s-radius-lg; position:relative","&:not(:first-child)":"margin-top: $3","> header":"display:flex align-items:center gap:$2 padding: $2 $3; border:0 border-bottom: 1px solid $s-faint; r:0 font-weight:600","> footer":"display:flex align-items:center justify-content:flex-end gap:$2 padding: $2 $3; border:0 border-top: 1px solid $s-faint; r:0","> div":"p:$3 gap:$3","> header > .s-box-close":"margin-left:auto","> .s-box-close":"position:absolute top:$2 right:$2 z-index:1"}});function e0(t={}){let a=typeof t=="string"||typeof t=="function"?{content:t}:t;a1("section.s-box.s-s.neutral.shadow",a.attrs,()=>{a1(()=>{a.header!=null?a1("header.s-s.neutral",a.headerAttrs,()=>{x(a.header),typeof a.close=="function"&&b2(a.close)}):typeof a.close=="function"&&b2(a.close)}),a1("div",a.contentAttrs,()=>{x(a.content)}),a1(()=>{a.footer!=null&&a1("footer.s-s.neutral",a.footerAttrs,()=>x(a.footer))})})}function b2(t){i1({icon:n1,ariaLabel:"Close",click:t,attrs:".s-box-close"})}import B1 from"aberdeen";function h0(t){B1(()=>{let a=t.bind.value;Y({attrs:t.attrs,buttons:Object.entries(t.options).map(([e,h])=>({content:h,ariaLabel:typeof h=="function"?e:void 0,attrs:a===e?".primary":".neutral",click:()=>{t.bind.value=t.allowDeselect&&a===e?void 0:e}}))})}),t.name&&B1(()=>B1("input type=hidden name=",t.name,"value=",t.bind.value??""))}import z from"aberdeen";z.insertGlobalCss({".s-check":{"&":"display:flex flex-direction:column gap:$1","> label":"display:flex align-items:center gap:$2 cursor:pointer user-select:none","> label:has(input:disabled)":"cursor:not-allowed opacity:0.45 filter:saturate(0.6)",input:"cursor:inherit m:0"}});function p0(t={}){let a=t.id??X("check");z("div.s-check",t.attrs,()=>{z("label for=",a,()=>{z("input type=checkbox",t.inputAttrs,()=>{z("id=",a),t.name&&z("name=",t.name),t.checked&&!t.bind&&z("checked=true"),t.change&&z("change=",t.change),z(()=>{t.disabled&&z("disabled=true")}),z(()=>{t.required&&z("aria-required=true")}),t.bind&&z("bind=",t.bind)}),z(()=>{t.label!=null&&x(t.label),t.required&&z("span.s-req aria-hidden=true #*")})}),z(()=>{t.help!=null&&!t.error&&z("div.s-help",()=>x(t.help))}),z(()=>{t.error&&z("div.s-error role=alert #",t.error)})})}import e1 from"aberdeen";e1.insertGlobalCss({".s-form":{"&":"display:flex flex-direction:column gap:$3","&.grid":"display:grid grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap:$3","&.grid > .s-wide, &.grid > footer":"grid-column: 1 / -1;","> footer":"display:flex align-items:center justify-content:flex-end gap:$2 flex-wrap:wrap margin-top:$1"}});function r0(t={}){let a=typeof t=="string"||typeof t=="function"?{content:t}:t;e1("form.s-form",a.attrs,()=>{e1(()=>{e1(".grid=",a.layout==="grid")}),e1("submit=",e=>{if(e.preventDefault(),a.submit){let h=new FormData(e.target),p={};for(let r of new Set(h.keys())){let o=h.getAll(r);p[r]=o.length===1?o[0]:o}a.submit(p,e)}}),x(a.content),e1(()=>{a.actions&&e1("footer",a.actionsAttrs,()=>x(a.actions))})})}import v from"aberdeen";import{current as Q1}from"aberdeen/route";import f from"aberdeen";import{matchCurrent as c0,current as H1,go as H2}from"aberdeen/route";import C from"aberdeen";import{grow as o0,shrink as d0}from"aberdeen/transitions";C.insertGlobalCss({".s-toasts":"position:fixed bottom:$3 right:$3 z-index:400 display:flex flex-direction:column gap:$2 pointer-events:none max-width:min(90vw,24rem) w:24rem",".s-toast":{"&":"display:flex align-items:flex-start gap:$2 padding: $3; pointer-events:auto position:relative overflow:hidden",".s-toast-body":"display:flex flex-direction:column gap:$1 flex:1 min-width:0",".s-toast-title":"font-weight:700 line-height:1.3",".s-toast-close":"cursor:pointer border:0 background:transparent fg:$s-muted font-size:1.1em line-height:1 padding: 0 0.15em; r:4px flex-shrink:0 align-self:flex-start",".s-toast-close:hover":"fg:$s-text",".s-toast-close:focus-visible":"outline:none box-shadow: 0 0 0 3px $s-focus; fg:$s-text",".s-toast-progress":"position:absolute bottom:0 left:0 right:0 height:2px background:$s-accent width:100%"}});var n0=0,M1=C.proxy({});j(()=>{C.peek(()=>C.isEmpty(M1))&&C.isEmpty(M1)||C("div.s-toasts",()=>{C.onEach(M1,t=>{let{opts:a,id:e}=t,h=a.type==="danger"||a.type==="warning"?"alert":"status",p=a.type==null||a.type==="neutral"?"neutral":a.type,r=a.duration??6e3,o,d=null,n=()=>{clearTimeout(o),d&&(d.style.transition="none",d.style.width="100%",d.offsetWidth,d.style.transition=`width ${r}ms linear`,d.style.width="0%"),o=setTimeout(()=>F1(e),r)},c=()=>{clearTimeout(o),o=void 0,d&&(d.style.transition="none",d.style.width="100%")};C.clean(()=>clearTimeout(o)),C(`div.s-toast.s-s.${p}.extra-shadow aria-live=polite role=${h}`,"create=",o0,"destroy=",d0,a.attrs,()=>{r>0&&(C("mouseenter=",c),C("mouseleave=",n)),C("div.s-toast-body",()=>{C(()=>{a.title!=null&&C("div.s-toast-title",()=>x(a.title))}),C("div.s-toast-msg",()=>x(a.message))}),C(()=>{a.dismissible!==!1&&C("button.s-toast-close type=button aria-label=Dismiss",()=>{C("#\xD7"),C("click=",()=>F1(e))})}),r>0&&(d=C("div.s-toast-progress"))}),r>0&&requestAnimationFrame(n)})})});function F1(t){delete M1[t]}function w1(t){let a=++n0;return M1[a]={id:a,opts:t},()=>F1(a)}f.insertGlobalCss({".s-menu-list":"position:fixed z-index:350 min-width:10rem display:flex flex-direction:column p:$1 r:$s-radius-lg max-width: calc(100vw - 16px); overflow-y:auto max-height:min(80vh,28rem) transition: opacity 0.15s, transform 0.15s, visibility 0s;",".s-menu-list.hidden":"opacity:0 pointer-events:none transform:translateY(-6px) visibility:hidden transition: opacity 0.15s, transform 0.15s, visibility 0.15s;",".s-menu-item":"display:flex align-items:center gap:$2 w:100% scroll-margin:$2 padding: $m2 0; line-height:1.1 r:$s-radius cursor:pointer text-align:left font-weight:450 font-size:0.9em border:0 background:transparent fg:$s-text text-decoration:none transition: color 0.12s, transform 0.12s, text-shadow 0.12s;",".s-menu-item:focus-visible:not([aria-current=page]), .s-menu-item:hover:not([aria-disabled=true]):not([aria-current=page])":"filter:none color: color-mix(in lab, $s-primary 33%, $s-text);",".s-menu-item:focus-visible":"outline-offset:-2px background: color-mix(in srgb, $s-accent 14%, transparent);",".s-menu-item[aria-current=page]":"color:$s-accent filter:none",".s-menu-list .s-menu-item":"padding-inline:$2",".s-menu-item[aria-disabled=true]":"opacity:0.45 cursor:not-allowed pointer-events:none",".s-menu-icon":"flex-shrink:0",".s-menu-list .s-menu-icon":"display:flex",".s-menu-list .s-menu-icon > svg":"width:1.25em height:1.25em","hr.s-menu-sep":"border:0 height:1px margin: $1 0.6rem; background: linear-gradient(to right, transparent, $s-faint 18%, $s-faint 82%, transparent);",".s-menu-key":"margin-left:auto padding-left:$2 font-family:inherit font-size:0.8em opacity:0.55 white-space:nowrap flex-shrink:0","@media (hover: none) and (pointer: coarse)":{".s-menu-key":"display:none"},".s-menu-tt-key":"font-family:inherit font-size:0.85em opacity:0.7 white-space:nowrap",".s-tt-tip hr.s-menu-sep":"margin: 0.35em 0;",".s-menu-chevron":"margin-left:auto flex-shrink:0 display:flex transition: transform 0.15s ease;",".s-menu-key + .s-menu-chevron":"margin-left:0",".s-menu-chevron > svg":"width:1em height:1em",".s-menu-details":{"> summary":"list-style:none","> summary::-webkit-details-marker":"display:none","&::details-content":"interpolate-size:allow-keywords block-size:0 overflow-y:clip transition: block-size 0.15s ease, content-visibility 0.15s allow-discrete;","&[open]::details-content":"block-size:auto","&[open] > summary .s-menu-chevron":"transform:rotate(90deg)"},".s-menu-sub":"display:flex flex-direction:column gap:$1 padding-left:$3",".s-menu-inline":"display:flex flex-direction:column gap:$1"});function x1(t,a,e){f("keydown=",h=>{if(h.key==="Enter"&&!h.ctrlKey&&!h.metaKey&&!h.shiftKey&&!h.altKey&&h.target.tagName==="A"){queueMicrotask(()=>a?.());return}if(h.key!=="ArrowDown"&&h.key!=="ArrowUp"&&h.key!=="Home"&&h.key!=="End")return;h.preventDefault();let r=[...h.currentTarget.querySelectorAll(".s-menu-item")].filter(c=>c.getAttribute("aria-disabled")!=="true"&&!l0(c));if(!r.length)return;let o=r.indexOf(document.activeElement),d=h.key==="ArrowUp"?-1:1,n=h.key==="Home"?0:h.key==="End"?r.length-1:o<0?d>0?0:r.length-1:(o+d+r.length)%r.length;r[n].focus()}),A2(t,{onLeafSelect:a,keyHints:e,$hasCurrent:f.derive(()=>I1(t))})}function A2(t,a){for(let e of t){if(typeof e=="string"||typeof e=="function"){x(e);continue}if("separator"in e){f("hr.s-menu-sep");continue}e.items?s0(e,a):i0(e,a)}}function i0(t,a){let e=!1,h=f(t.href?"a.s-menu-item data-panel=open":"button.s-menu-item type=button",t.attrs,()=>{t.href&&(f("href=",t.href),t.target&&f("target=",t.target),f(()=>{let p=!e;e=!0,U1(t)&&(f("aria-current=page"),requestAnimationFrame(()=>h.scrollIntoView({block:"nearest",behavior:p?"instant":"smooth"})))})),t.disabled&&f("aria-disabled=true"),t.key&&f("aria-keyshortcuts=",q(t.key,!0)),f("click=",p=>{if(t.disabled){p.preventDefault();return}a.onLeafSelect?.(),t.click?.(p)}),t.icon&&f("span.s-menu-icon",()=>x(t.icon)),x(t.label),L2(t,a)})}var V2=new Map;function w2(t,a){return V2.set(t,a),a}function s0(t,a){let e=t.href??k2(t.items),h=e!=null?f.derive(()=>K1(t)?w2(e,!0):a.$hasCurrent.value?w2(e,!1):V2.get(e)??!1):null;f("details.s-menu-details",()=>{h&&f(()=>{h.value&&f("open=true")}),f("summary.s-menu-item.s-menu-branch",t.attrs,()=>{t.disabled&&f("aria-disabled=true"),t.key&&f("aria-keyshortcuts=",q(t.key,!0)),f(()=>{U1(t)&&f("aria-current=page")}),f("click=",p=>{if(t.disabled){p.preventDefault();return}e!=null&&(p.preventDefault(),x0(e),H2(e)),t.click?.(p)}),t.icon&&f("span.s-menu-icon",()=>x(t.icon)),x(t.label),L2(t,a),f("span.s-menu-chevron aria-hidden=true",()=>v2())}),f("div.s-menu-sub",()=>A2(t.items,a))})}function l0(t){for(let a=t.closest("details");a;a=a.parentElement&&a.parentElement.closest("details"))if(!a.open&&t.closest("summary")?.parentElement!==a)return!0;return!1}function I1(t){return t.some(a=>typeof a!="string"&&typeof a!="function"&&!("separator"in a)&&K1(a))}function U1(t){if(t.href!=null&&c0(t.href))return!0;let a=t.match;if(a==null)return!1;let e=H1.path;if(typeof a=="function")return a(e);let h=a.replace(/\/+$/,"")||"/";return e===h||e.startsWith(h==="/"?"/":h+"/")}function K1(t){if(U1(t))return!0;for(let a of t.items??[])if(!(typeof a=="string"||typeof a=="function"||"separator"in a)&&K1(a))return!0;return!1}function k2(t){for(let a of t){if(typeof a=="string"||typeof a=="function"||"separator"in a)continue;let e=a.href??(a.items?k2(a.items):void 0);if(e!=null)return e}}function L2(t,a){let e=a.keyHints?void 0:t.key;t.key&&!e&&f("kbd.s-menu-key aria-hidden=true text=",q(t.key)),!(t.tooltip==null&&!e)&&c1({placement:"right",tip:()=>{x(t.tooltip),e&&(t.tooltip!=null&&f("hr.s-menu-sep"),f("kbd.s-menu-tt-key aria-hidden=true text=",q(e)))}})}function v1(t,a){f(()=>{for(let e of C2(t(),[]))$(e.key,e.label,h=>{z2(),a?.(),e.click?.(h),e.href!=null&&M0(e.href,e.target)})})}function C2(t,a){for(let e of t)typeof e=="string"||typeof e=="function"||"separator"in e||(e.key&&!e.disabled&&a.push(e),e.items&&C2(e.items,a));return a}function M0(t,a){let e=new URL(t,location.href);a?window.open(e.href,a,a==="_blank"?"noopener":""):e.origin!==location.origin?location.href=e.href:H2(t)}var A1=null;function x0(t){try{A1=new URL(t,location.href).pathname.replace(/\/+$/,"")||"/"}catch{A1=null}}function N1(t){return A1!==t?!1:(A1=null,!0)}var J=f.proxy({opts:null});function W(){let t=J.opts?.anchor;J.opts=null,t?.focus()}function V1(t){let a=J.opts;return a!=null&&(t==null||a.anchor===t)}function z2(t){V1(t)&&W()}function v0(t,a){let e=t.offsetWidth,h=t.offsetHeight,p=window.innerWidth,r=window.innerHeight,o=4,d=a.left;d+e>p-8&&(d=Math.max(8,a.right-e));let n=a.bottom+o;n+h>r-8&&a.top-h-o>=8&&(n=a.top-h-o),t.style.left=Math.max(8,d)+"px",t.style.top=Math.max(8,n)+"px"}function m0(t){return[{label:"Open in new tab",icon:u2,click:()=>{window.open(t,"_blank","noopener")}},{label:"Copy link",icon:y2,click:()=>{u0(t)}}]}async function u0(t){let a=new URL(t,location.href).href;try{await navigator.clipboard.writeText(a),w1({message:"Link copied."})}catch{w1({message:"Couldn't copy the link.",type:"danger"})}}j(()=>{let t=J.opts;if(!t)return;let a=f("div.s-menu-list.s-s.neutral.shadow create=hidden destroy=hidden",t.dropdownAttrs,()=>{x1(t.link!=null?[...m0(t.link),{separator:!0},...t.items]:t.items,W,!0)}),e=r=>{let o=r.target;!a.contains(o)&&(t.closeOnAnchorClick||!t.anchor.contains(o))&&W()},h=r=>{(r.key==="Escape"||r.key==="Tab")&&(r.preventDefault(),W())},p=f.peek(H1,"path");f(()=>{H1.path!==p&&!N1(H1.path)&&W()}),document.addEventListener("click",e,!0),document.addEventListener("keydown",h,!0),f.clean(()=>{document.removeEventListener("click",e,!0),document.removeEventListener("keydown",h,!0)}),requestAnimationFrame(()=>{if(!document.body.contains(a))return;let r=t.at?{left:t.at.x,right:t.at.x,top:t.at.y,bottom:t.at.y}:t.anchor.getBoundingClientRect();v0(a,r),p1(a,".s-menu-item[aria-current=page]")})});function y0(t){f("nav.s-menu-inline",t.attrs,()=>{v1(()=>t.items,()=>t.onLeafSelect?.()),x1(t.items,t.onLeafSelect)})}function W1(t){return J.opts=t,W}function G1(t){v1(()=>t.items);let a=null;f.clean(()=>{J.opts?.anchor===a&&W()}),f("contextmenu=",e=>{e.preventDefault(),a=e.currentTarget,W1({...t,anchor:a,at:{x:e.clientX,y:e.clientY},closeOnAnchorClick:!0})})}function f0(t){v1(()=>t.items);let a=null;f.clean(()=>{J.opts?.anchor===a&&W()}),D({icon:b1,...t.button?.content==null?{ariaLabel:"Open menu"}:null,attrs:".neutral",...t.button,click:e=>{if(a=e.currentTarget,J.opts?.anchor===a){W();return}W1({items:t.items,anchor:a,dropdownAttrs:t.dropdownAttrs})}})}import i,{OPAQUE as $2}from"aberdeen";import*as g from"aberdeen/route";import L from"aberdeen";var g0=O('<path d="m15 18-6-6 6-6"/>'),b0=O('<path d="m9 18 6-6-6-6"/>');L.insertGlobalCss({".s-strip":{"&":"position:relative display:flex min-width:0","> .s-strip-row":"display:flex align-items:center flex:1 min-width:0 overflow-x:auto overflow-y:hidden scrollbar-width:none scroll-behavior:smooth","> .s-strip-row::-webkit-scrollbar":"display:none","> .s-strip-btn":"position:absolute top:0 bottom:0 z-index:1 display:none align-items:center justify-content:center width:2.4em border:0 padding:0 cursor:pointer fg:$s-muted transition: color 0.15s;","> .s-strip-btn:hover":"fg:$s-text","> .s-strip-btn-left":"left:0 justify-content:flex-start background: linear-gradient(to right, $s-bg 45%, transparent)","> .s-strip-btn-right":"right:0 justify-content:flex-end background: linear-gradient(to left, $s-bg 45%, transparent)","&.s-can-left > .s-strip-btn-left, &.s-can-right > .s-strip-btn-right":"display:flex"},".s-tabs":{"&":"display:flex flex-direction:column gap:$3",".s-tabbar":"border-bottom: 1px solid $s-faint;",".s-tablist":"gap:$1 align-items:stretch margin-bottom:-1px",".s-tab":"display:inline-flex align-items:center gap:$2 cursor:pointer background:transparent border:0 color: $s-muted; font-weight:600 padding: 0.6em 0.9em; white-space:nowrap border-bottom: 3px solid transparent; transition: color 0.15s, background 0.15s, border-color 0.15s;",".s-tab:hover:not(:disabled), .s-tab[aria-selected=true]":"color: $s-text;",".s-tab:focus-visible":"outline:none box-shadow: inset 0 0 0 2px $s-focus; r: $s-radius;",".s-tab[aria-selected=true]":"border-image: $s-gradient 1;",".s-tabpanel":"display:block"}});function k1(t){L("div.s-strip",t.attrs,()=>{let a=L("div.s-strip-row",t.stripAttrs,()=>x(t.content));S2(a,-1),S2(a,1),H0(a)})}function L1(t){let a=t.parentElement;if(!a||!t.isConnected)return;let e=parseFloat(getComputedStyle(a).fontSize)*2.6,h=t.getBoundingClientRect(),p=a.getBoundingClientRect(),r=h.left-p.left,o=h.right-p.right;r<e?a.scrollBy({left:r-e,behavior:"smooth"}):o>-e&&a.scrollBy({left:o+e,behavior:"smooth"})}function w0(t){let a=X("tabs"),e=(r,o)=>r.id??String(o),h=t.bind??L.proxy(e(t.tabs[0]??{label:""},0));t.tabs.length>0&&!t.tabs.some((r,o)=>e(r,o)===L.peek(()=>h.value))&&(h.value=e(t.tabs[0],0));let p=(r,o)=>{r.disabled||(h.value=e(r,o))};L("div.s-tabs",t.attrs,()=>{k1({attrs:".s-tabbar",stripAttrs:".s-tablist role=tablist",content:()=>{t.tabs.forEach((r,o)=>{let d=e(r,o),n=L("button.s-tab type=button role=tab",()=>{L("id=",`${a}-tab-${d}`,"aria-controls=",`${a}-panel-${d}`),L(()=>{let c=h.value===d;L("aria-selected=",c?"true":"false"),L("tabindex=",c?"0":"-1"),c&&requestAnimationFrame(()=>L1(n))}),r.disabled&&L("disabled=true"),L("click=",()=>p(r,o)),L("keydown=",c=>A0(c,t.tabs,o,p)),x(r.icon),x(r.label)})})}}),L("div.s-tabpanel role=tabpanel",t.contentAttrs,()=>{L(()=>{let r=h.value,o=t.tabs.findIndex((n,c)=>e(n,c)===r),d=t.tabs[o]??t.tabs[0];d&&(L("id=",`${a}-panel-${e(d,o)}`,"aria-labelledby=",`${a}-tab-${e(d,o)}`),x(d.content))})})})}function S2(t,a){L(`button.s-strip-btn.s-strip-btn-${a<0?"left":"right"} type=button`,()=>{L("tabindex=-1 aria-hidden=true"),L("click=",()=>t.scrollBy({left:a*t.clientWidth*.8,behavior:"smooth"})),(a<0?g0:b0)({size:"1.1em"})})}function H0(t){let a=t.parentElement;if(!a||typeof ResizeObserver>"u")return;let e=()=>{let r=t.scrollWidth-t.clientWidth;a.classList.toggle("s-can-left",t.scrollLeft>1),a.classList.toggle("s-can-right",t.scrollLeft<r-1)};t.addEventListener("scroll",e,{passive:!0});let h=new ResizeObserver(e);h.observe(t);let p=typeof MutationObserver>"u"?void 0:new MutationObserver(r=>{for(let o of r){for(let d of o.addedNodes)d instanceof Element&&h.observe(d);for(let d of o.removedNodes)d instanceof Element&&h.unobserve(d)}e()});p?.observe(t,{childList:!0});for(let r of Array.from(t.children))h.observe(r);e(),L.clean(()=>{t.removeEventListener("scroll",e),h.disconnect(),p?.disconnect()})}function A0(t,a,e,h){let p=e;if(t.key==="ArrowRight"||t.key==="ArrowDown")p=(e+1)%a.length;else if(t.key==="ArrowLeft"||t.key==="ArrowUp")p=(e-1+a.length)%a.length;else if(t.key==="Home")p=0;else if(t.key==="End")p=a.length-1;else return;t.preventDefault();let r=p>=e?1:-1;for(let o=0;o<a.length;o++){let d=a[p];if(d&&!d.disabled){h(d,p),t.currentTarget?.parentElement?.children[p]?.focus();return}p=(p+r+a.length)%a.length}}var _1={integer(t){if(!/^(0|-?[1-9]\d*)$/.test(t))return;let a=Number(t);return Number.isSafeInteger(a)?a:void 0}};function I(t){let a=String(t).replace(/\/+$/,"");return a.startsWith("/")||(a=`/${a}`),a}function m1(t){let a=I(t);return a==="/"?[]:a.slice(1).split("/")}function P2(t){let a=m1(t),e=a.map((h,p)=>{if(!h.startsWith("[")||!h.endsWith("]"))return{kind:"lit",value:h};let r=/^\[\.\.\.([A-Za-z_$][\w$]*)\]$/.exec(h);if(r){if(p!==a.length-1)throw new Error(`Staffa: "${h}" must be the last segment of route "${t}"`);return{kind:"rest",name:r[1]}}let o=/^\[([A-Za-z_$][\w$]*)(?:=([A-Za-z_$][\w$]*))?\]$/.exec(h);if(!o)throw new Error(`Staffa: malformed param "${h}" in route "${t}"`);let[,d,n]=o;if(n&&!(n in _1))throw new Error(`Staffa: unknown matcher "${n}" in route "${t}" (known: ${Object.keys(_1).join(", ")})`);return{kind:"param",name:d,matcher:n}});return{key:t,segs:e}}function V0(t){try{return decodeURIComponent(t)}catch{return t}}function X1(t,a){let e={};for(let h=0;h<t.segs.length;h++){let p=t.segs[h];if(p.kind==="rest")return h>=a.length?null:(e[p.name]=a.slice(h).join("/"),e);if(h>=a.length)return null;let r=a[h];if(p.kind==="lit"){if(r!==p.value)return null}else if(p.matcher){let o=_1[p.matcher](r);if(o===void 0)return null;e[p.name]=o}else e[p.name]=V0(r)}return t.segs.length===a.length?e:null}var U=250,k0=300,L0=360,C1=540;i.insertGlobalCss({":root":`--s-panel-ms:${U}ms`,".s-panels":"flex:1 min-width:0 min-height:0 position:relative overflow:clip isolation:isolate "+O1,".s-panel":{"&":"position:absolute top:0 bottom:0 left:0 display:flex flex-direction:column "+O1+` z-index:2 transition: transform ${U}ms ease-out, opacity ${U}ms linear;`,"&.s-panel-sep::before":"content:'' position:absolute left:0 top:0.6rem bottom:0.6rem width:1px z-index:1 background: linear-gradient(to bottom, transparent, $s-faint 18%, $s-faint 82%, transparent);","&.s-panel-new":"z-index:1","&.s-panel-closing":"z-index:0 opacity:0 pointer-events:none","&.s-panel-enter":"opacity:0","&.s-panel-hidden, &.s-panel-parked":"visibility:hidden"},".s-panel > .s-content":"flex:1 min-height:0 overflow-y:auto overflow-x:hidden p:$3",".s-panel-actions":"display:flex align-items:center justify-content:flex-end gap:$1 flex-shrink:0 padding: $3 $3 0;",".s-crumbs > .s-strip-row":"gap:$m1",".s-crumb":{"&":"flex: 1 0 4rem; font-size:0.85em line-height:1.5 fg:$s-muted text-decoration:none white-space:nowrap max-width:max-content overflow:hidden text-overflow:ellipsis transition: color 0.12s;","&.s-crumb-on":"font-weight:600 fg:$s-text","a&:hover":"filter:none color: color-mix(in lab, $s-primary 33%, $s-text);","svg.s-crumb-pin":"vertical-align:-0.12em margin-right:0.3em opacity:0.8 fill:currentColor","svg.s-crumb-unsaved":"vertical-align:0.08em margin-right:0.3em fill:currentColor"},"svg.s-crumb-sep":"flex-shrink:0 opacity:0.4",".s-main.s-shell-snap .s-panel":"transition:none",".s-panel-loading":{"&":"position:absolute inset:0 display:flex align-items:center justify-content:center gap:$1 pointer-events:none",i:"width:0.5rem height:0.5rem r:50% background:$s-muted opacity:0.45 animation: s-panel-pulse 1s ease-in-out infinite;","i:nth-child(2)":"animation-delay:0.15s","i:nth-child(3)":"animation-delay:0.3s"},"@keyframes s-panel-pulse":{"0%, 100%":"opacity:0.25 transform:scale(0.8)","50%":"opacity:0.7 transform:scale(1)"}});var j1=!1,z1=class{[$2]=!0;compiled;ancestors;opts;$state=i.proxy({live:[],focus:0});$open=i.proxy({});nextOrder=0;containerEl;geom;lastGeom;layoutQueued=!1;timers=new Set;exiting=new Set;intent=null;settling=null;lastSeen=null;queued=null;constructor(a){if(j1)throw new Error("Staffa: only one routed S.main() (one with `routes`) can be active at a time");j1=!0,this.opts=a,this.compiled=Object.entries(a.routes).map(([e,h])=>({...P2(e),draw:h})),this.ancestors=Object.entries(a.ancestors??{}).filter(e=>e[1]!=null).map(([e,h])=>({...P2(e),fn:h})),i(()=>{let e=this.computeTarget(),h={...g.current.search},p=g.current.hash;i.peek(()=>{let r=this.lastSeen;if(r&&r.path!==g.current.path){let o=this.$state.live.find(d=>d.path===r.path);o&&(o.search=r.search,o.hash=r.hash)}this.lastSeen={path:g.current.path,search:h,hash:p},this.propose(e),Array.isArray(g.current.state.panels)||Object.assign(g.current.state,this.stateFor({stack:this.paths(),focus:this.$state.focus}))})}),this.interceptLinks(),this.watchTitle(),this.guardTabClose(),i.clean(()=>{for(let e of this.timers)clearTimeout(e);this.timers.clear(),this.queued?.settle(!1),this.queued=null,j1=!1})}resolve(a){let e=m1(a);for(let h of this.compiled){let p=X1(h,e);if(p)return{draw:h.draw,params:p}}return{draw:this.opts.notFound??S0,params:{}}}matches(a){let e=m1(a);return this.compiled.some(h=>X1(h,e)!=null)}deriveStack(a){let e=I(a),h=this.askAncestors(e),p=h?h.map(I):this.prefixesOf(e),r=[];for(let o of p)o!==e&&!r.includes(o)&&this.matches(o)&&r.push(o);return r.push(e),r}askAncestors(a){let e=m1(a);for(let h of this.ancestors){let p=X1(h,e);if(p)return h.fn(p,a)??void 0}}prefixesOf(a){let e=m1(a),h=[];for(let p=1;p<e.length;p++)h.push("/"+e.slice(0,p).join("/"));return h}pinnedIn(a,e){return a.filter(h=>e.includes(h)?!1:this.$state.live.find(p=>p.path===h)?.$panel.pinned===!0)}unsavedAt(a){return this.$state.live.find(e=>e.path===a)?.$panel.unsaved===!0}targetFor(a,e){let h=Array.isArray(e?.panels)?e.panels.map(String):null;if(h){let p=Array.isArray(e.parked)?e.parked.map(String):[],r=I(a),o=new Set([r]),d=c=>c.map(I).filter(m=>!o.has(m)&&!!o.add(m)),n=d(h);return{stack:[...n,r,...d(p)],focus:n.length}}return i.peek(()=>{let p=this.deriveStack(a).slice(0,-1),r=[...p,...this.pinnedIn(this.paths(),[...p,I(a)]),I(a)];return{stack:r,focus:r.length-1}})}computeTarget(){return this.targetFor(g.current.path,g.current.state)}paths(){return this.$state.live.map(a=>a.path)}propose(a){let e=this.$state.live.filter(h=>!a.stack.includes(h.path)&&h.$panel.unsaved).map(h=>h.path);e.length&&(a={stack:[...a.stack,...e],focus:a.focus}),!(O2(this.paths(),a.stack)&&a.focus===this.$state.focus)&&this.commit(a,g.current.nav)}commit(a,e){this.geom=void 0;let h=g.current.state.pinned,p=new Set(Array.isArray(h)?h.map(String):[]),r=new Map(this.$state.live.map(n=>[n.path,n])),o=[];for(let n of a.stack){let c=r.get(n);if(c){r.delete(n),o.push(c);continue}let m=this.createEntry(n,o.length<=a.focus,p.has(n));e!=="load"&&(m.enter=!0),o.push(m),this.$open[n]=m}let d;for(let n of this.$state.live)r.has(n.path)?this.beginClose(n,d):d=n.path;this.$state.live=o,this.$state.focus=Math.min(a.focus,o.length-1),this.scheduleLayout()}createEntry(a,e,h){let{draw:p,params:r}=this.resolve(a),o={[$2]:!0,order:this.nextOrder++,path:a,draw:p,$ui:i.proxy({holding:!1}),maxWidth:"medium",width:0};return o.$panel=i.proxy({stack:this,params:r,path:a,width:0,visible:e,pinned:h||void 0,close:()=>this.closePath(o.path),open:(d,n)=>this.navigate(d,{from:o.path,how:n})}),o}beginClose(a,e){a.closing=!0,a.anchor=e,a.$panel.visible=!1,delete this.$open[a.path]}playExit(a,e){if(!a.closing){e.remove();return}e.classList.add("s-panel-closing"),e.setAttribute("inert","");let h=a.placed?{el:e,anchor:a.anchor,ride:0}:null;h&&this.exiting.add(h),this.afterTransition(e,"opacity",()=>{h&&this.exiting.delete(h),e.remove()})}afterTransition(a,e,h){let p=!1,r=setTimeout(()=>d(),U+80);this.timers.add(r);let o=()=>{clearTimeout(r),this.timers.delete(r)},d=()=>{o(),p||(p=!0,h())},n=c=>m=>{m.target===a&&m.propertyName===e&&c()};a.addEventListener("transitionrun",n(o)),a.addEventListener("transitionend",n(d)),a.addEventListener("transitioncancel",n(d))}intended(){return this.intent??{stack:this.paths(),focus:this.$state.focus}}stateFor(a){return{panels:a.stack.slice(0,a.focus),parked:a.stack.slice(a.focus+1),pinned:this.pinnedPaths()}}pinnedPaths(){return this.$state.live.filter(a=>a.$panel.pinned).map(a=>a.path)}issue(a,e){return this.intent=a,this.settling?(this.queued?.settle(!1),new Promise(h=>{this.queued={run:e,settle:h}})):this.start(e)}start(a){let e=p=>{this.settling=null;let r=this.queued;return this.queued=null,p&&r?this.start(r.run).then(r.settle,()=>r.settle(!1)):(this.intent=null,r?.settle(!1)),p},h=Promise.resolve(a()).then(e,p=>(console.error(p),e(!1)));return this.settling=h,h}focusAt(a){let e=this.intended();if(a<0||a>=e.stack.length||a===e.focus)return Promise.resolve(!1);let h={stack:e.stack,focus:a},p=e.stack[a];return this.issue(h,()=>{let r=this.$state.live.find(o=>o.path===p);return g.go({path:p,search:r?.search,hash:r?.hash,state:this.stateFor(h)})})}back(){return i.peek(()=>{let a=this.intended();return a.focus===a.stack.length-1&&!this.unsavedAt(a.stack[a.focus])?this.closePath(a.stack[a.focus]??""):a.focus===0?Promise.resolve(!1):this.focusAt(a.focus-1)})}closePath(a){return i.peek(()=>{let e=this.intended(),h=e.stack.indexOf(I(a));if(h<0||e.stack.length<2||this.unsavedAt(e.stack[h]))return Promise.resolve(!1);let p=e.stack.filter((c,m)=>m!==h),r=h===e.focus?Math.max(0,h-1):e.focus-(h<e.focus?1:0),o={stack:p,focus:r};if(h===e.focus&&h===e.stack.length-1){let c=this.$state.live.find(u=>u.path===p[r]),m={};c?.search&&(m.search=c.search),c?.hash&&(m.hash=c.hash);let l=p.filter(u=>this.$state.live.find(b=>b.path===u)?.$panel.pinned===!0);return this.issue(o,()=>Promise.resolve(g.back({path:p[r],state:{panels:p.slice(0,r),parked:[]}},m)).then(u=>(u&&(g.current.state.pinned=l),u)))}let d=p[r],n=d!==e.stack[e.focus];return this.issue(o,()=>{let c=n?this.$state.live.find(m=>m.path===d):void 0;return g.go({path:d,search:n?c?.search:{...g.current.search},hash:n?c?.hash:g.current.hash,state:this.stateFor(o)})})})}navigate(a,{from:e,how:h,beneath:p}={}){let r=h??this.opts.linkNavigation,o=r==="open"?null:e??null,d=r==="replace";return i.peek(()=>{let n;try{n=new URL(a,location.href)}catch{return Promise.resolve(!1)}let c=I(n.pathname),m=this.intended(),l=p?-1:m.stack.indexOf(c),u;if(l>=0&&r!=="replace"&&r!=="open"){let V=this.pinnedIn(m.stack.slice(l+1),[]);u={stack:[...m.stack.slice(0,l+1),...V],focus:l}}else{let V=o==null?-1:m.stack.indexOf(o),s=(p?p.map(I):V<0?this.deriveStack(c).slice(0,-1):m.stack.slice(0,d?V:V+1)).filter((A,N,h1)=>A!==c&&h1.indexOf(A)===N),y=[...s,...this.pinnedIn(m.stack,[...s,c,d?o:null])];u={stack:[...y,c],focus:y.length}}let b=l>=0?this.$state.live.find(V=>V.path===c):void 0,H=n.search?Object.fromEntries(new URLSearchParams(n.search)):b?.search??{},k=n.hash||b?.hash||"";if(u.focus===m.focus&&O2(u.stack,m.stack)&&n.search===location.search&&(n.hash||"")===(location.hash||""))return Promise.resolve(!0);let G=this.stateFor(u);return d?this.issue(u,()=>(g.current.path=c,g.current.search=H,g.current.hash=k,g.current.state=G,i.runQueue(),g.current.path===c)):this.issue(u,()=>g.go({path:c,search:H,hash:k,state:G}))})}pushPath(a,e){return i.peek(()=>{let h=this.intended();return this.navigate(a,{from:h.stack[h.focus],how:e?"replace":"push"})})}interceptLinks(){g.interceptLinks((a,e,h)=>{if(h instanceof KeyboardEvent&&(h.ctrlKey||h.metaKey||h.shiftKey||h.altKey))return!1;let p=e.getAttribute("data-panel")??void 0,r=e.closest(".s-panel"),o=r?this.$state.live.find(d=>d.el===r):e.closest(".s-panel-origin")?this.$state.live[this.$state.focus]:void 0;return this.navigate(a.href,{from:o?.path,how:p}),!0})}get currentPanel(){return this.$state.live[this.$state.focus]?.$panel}get panels(){return this.$state.live.map(a=>a.$panel)}get currentPanelIndex(){return this.$state.focus}pushPanel(a){return this.pushPath(a,!1)}replacePanel(a){return this.pushPath(a,!0)}openPanelStack(a,e){return this.navigate(a,{how:"open",beneath:e})}closePanel(a){return i.peek(()=>{let e=this.intended();return this.closePath(a??e.stack[e.focus]??"")})}setColumns(a){this.opts.columns!==a&&(this.opts.columns=a,this.scheduleLayout())}setLinkNavigation(a){this.opts.linkNavigation=a}drawCrumbs(){k1({attrs:".s-crumbs role=navigation aria-label=Breadcrumbs",content:()=>{i(()=>{let a=this.panels.map(p=>p.path),e=this.currentPanelIndex,h;for(let p=0;p<a.length;p++){p&&g2({size:"0.85em",attrs:".s-crumb-sep"});let r=this.drawCrumb(a[p],p,p===e);p===e&&(h=r)}requestAnimationFrame(()=>{h&&L1(h)})})}})}drawCrumb(a,e,h){let p=this.$state.live[e];return i(h?"span.s-crumb aria-current=page":"a.s-crumb",()=>{h||i("href=",a),i(()=>{p?.$panel.visible&&i(".s-crumb-on")}),i(()=>{p?.$panel.unsaved&&m2({size:"0.45em",attrs:".s-crumb-unsaved"})}),i(()=>{p?.$panel.pinned&&Z1({size:"0.85em",attrs:".s-crumb-pin"})}),i(()=>{i("#",p?.$panel.title??p?.$ui.fallback??(a.split("/").pop()||a))}),G1({link:a,items:[{label:()=>{i(()=>{i("#",p?.$panel.pinned?"Unpin":"Pin")})},icon:()=>{i(()=>{(p?.$panel.pinned?f2:Z1)()})},click:()=>{p&&this.togglePin(p)}},{label:"Close",icon:n1,disabled:p?.$panel.unsaved===!0,click:()=>{this.closePath(a)}}]})})}togglePin(a){a.$panel.pinned=!a.$panel.pinned||void 0,g.current.state.pinned=this.pinnedPaths()}watchTitle(){let a=document.title;i(()=>{let e=this.$state.live[this.$state.focus],h=e?.$panel.title??e?.$ui.fallback,p=typeof this.opts.title=="string"?this.opts.title:void 0,r=this.$state.live.some(d=>d.$panel.unsaved),o=h&&p?`${h} \xB7 ${p}`:h||p;o&&(document.title=(r?"\u2022 ":"")+o)}),i.clean(()=>{document.title=a})}guardTabClose(){if(typeof window>"u")return;let a=e=>{let h=this.$state.live.find(p=>p.$panel.unsaved);h&&(e.preventDefault(),e.returnValue=!0,this.flushLayout(),h.$panel.visible||this.focusAt(this.intended().stack.indexOf(h.path)))};i(()=>{this.$state.live.some(e=>e.$panel.unsaved)&&(window.addEventListener("beforeunload",a),i.clean(()=>window.removeEventListener("beforeunload",a)))})}drawColumns(){let a=i("div.s-panels role=main",()=>{this.containerEl=i(),i.onEach(this.$open,e=>this.drawPanel(e),e=>e.order)});if(typeof ResizeObserver<"u"){let e=new ResizeObserver(()=>this.layout());e.observe(a),i.clean(()=>e.disconnect())}i.clean(()=>{this.containerEl===a&&(this.containerEl=void 0)}),this.scheduleLayout()}drawPanel(a){let e;i(()=>{let h=a.$panel.maxWidth;a.maxWidth=h==="small"||h==="large"||h==="none"?h:"medium";let p=this.roomFor(a.maxWidth);p&&(a.width=p,i.peek(a.$panel,"width")!==p&&(a.$panel.width=p),e&&(e.style.width=`${p}px`,this.scheduleLayout()))}),e=i(`section.s-panel${a.width?` w:${a.width}px`:""}`,"destroy=",h=>this.playExit(a,h),()=>{i(()=>this.drawActions(a)),i("div.s-content",()=>{if(a.draw(a.$panel),g.persistScroll(a.path),i.peek(a.$panel,"title")==null){let h=z0(i());h&&i.peek(a.$ui,"fallback")!==h&&(a.$ui.fallback=h)}}),i(()=>{!a.$panel.loading||a.$ui.holding||i("div.s-panel-loading aria-hidden=true",()=>{i("i"),i("i"),i("i")})})}),a.el=e,a.placed=!1,e.style.transition="none",i.clean(()=>{a.el===e&&(a.el=void 0)}),i(()=>{a.$panel.loading,this.scheduleLayout()}),this.scheduleLayout()}drawActions(a){this.opts.$shell.narrow||a.$panel.actions==null||i("div.s-panel-actions",()=>x(a.$panel.actions))}scheduleLayout(){this.layoutQueued||(this.layoutQueued=!0,requestAnimationFrame(()=>this.flushLayout()))}flushLayout(){this.layoutQueued&&(this.layoutQueued=!1,this.layout())}measure(){let a=this.containerEl,e=a?a.getBoundingClientRect().width:0;if(!e)return;let h=Math.ceil(e/C1),p=e/h>=L0?e/h:Math.min(e,C1),r=o=>Math.min(o*p,e);return{area:e,size:{small:p,medium:r(2),large:r(3),none:e}}}geometry(){return this.geom??=this.measure()}roomFor(a){return this.geometry()?.size[a]??0}layout(){let a=this.containerEl,e=a?.closest(".s-main");if(!a||!e)return;let h=this.$state.live,p=h.length;if(!p||h.some(s=>!s.el))return;this.geom=void 0;let r=this.geometry();if(!r)return;let o=this.opts.columns==="single",d=this.lastGeom?.area!==r.area;d&&(this.lastGeom=r,e.classList.add("s-shell-snap"));let n=s=>r.size[s.maxWidth],c=Math.min(this.$state.focus,p-1),m=c,l=n(h[c]);if(!o)for(let s=c-1;s>=0;s--){let y=l+n(h[s]);if(y>r.area)break;l=y,m=s}let u=m>0?0:(r.area-l)/2;for(let s=m;s<=c;s++)h[s].width=n(h[s]);for(let s of h)s.width||(s.width=n(s));let b=[],H=[],k=new Map,G=new Map;if(!d)for(let s of h)s.placed&&G.set(s,C0(s.el));let V=u,Z=0;for(let s=0;s<m;s++)V-=h[s].width;for(let s=0;s<p;s++){let y=h[s],A=y.el,N=s>=m&&s<=c;s===c+1&&(V=Math.max(V,r.area)),(y.enter||!y.placed)&&(!y.$panel.loading||y.holdDone?y.$ui.holding=!1:y.$ui.holding||(y.$ui.holding=!0,this.holdEnter(y))),y.placed?(Z=parseFloat(A.style.left)-V,k.set(y.path,Z),Z&&!d&&(A.style.transition=`opacity ${U}ms linear`,A.style.transform=`translateX(${(G.get(y)??0)+Z}px)`,H.push(A)),A.style.left=`${V}px`,y.enter&&!y.$ui.holding&&this.releaseEnter(y)):(b.push(y),A.style.left=`${V}px`,y.enter&&N&&(A.style.transform=`translateX(${Z}px)`,A.classList.add("s-panel-enter","s-panel-new"))),A.style.width=`${y.width}px`,V+=y.width,y.$panel.visible!==N&&(y.$panel.visible=N),y.$panel.width!==y.width&&(y.$panel.width=y.width),A.classList.toggle("s-panel-sep",N&&s>m);let h1=s<m,T2=A.classList.contains("s-panel-hidden")||A.classList.contains("s-panel-parked");N?A.classList.remove("s-panel-hidden","s-panel-parked"):T2||!y.placed||d?(A.classList.toggle("s-panel-hidden",h1),A.classList.toggle("s-panel-parked",!h1)):this.afterTransition(A,"transform",()=>{y.el!==A||!y.offstage||(A.classList.toggle("s-panel-hidden",h1),A.classList.toggle("s-panel-parked",!h1))}),y.offstage=!N,A.toggleAttribute("inert",!N)}for(let s of this.exiting){let y=s.anchor==null?void 0:k.get(s.anchor);y&&(s.ride-=y,s.el.style.transform=`translateX(${s.ride}px)`)}(b.length||H.length||d)&&a.offsetWidth,d&&e.classList.remove("s-shell-snap");for(let s of H)s.style.transition="",s.style.transform="";for(let s of b){let y=s.el;y.style.transition="",y.style.transform="",s.placed=!0,s.$ui.holding||this.releaseEnter(s)}}releaseEnter(a){a.enter=!1;let e=a.el;!e||!e.classList.contains("s-panel-enter")||(e.classList.remove("s-panel-enter"),this.afterTransition(e,"opacity",()=>e.classList.remove("s-panel-new")))}holdEnter(a){let e=setTimeout(()=>{this.timers.delete(e),a.holdDone=!0,a.$ui.holding&&(a.$ui.holding=!1,this.scheduleLayout())},k0);this.timers.add(e)}};function O2(t,a){return t.length===a.length&&t.every((e,h)=>e===a[h])}function C0(t){let a=getComputedStyle(t).transform;return a&&a!=="none"?new DOMMatrixReadOnly(a).m41:0}function z0(t){let a=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(let e=a.nextNode();e;e=a.nextNode()){let h=e.textContent.trim();if(h)return h.length>48?`${h.slice(0,47).trimEnd()}\u2026`:h}}function S0(t){i("p fg:$s-muted",()=>i("#",`No panel at ${t.path}`))}var $0=200;v.insertGlobalCss({".s-main":{"&":"display:flex flex-direction:column min-height:100vh max-height:100vh container-type:inline-size","body > &":"margin: calc(-1 * $3)","> header":"border:0 border-bottom: 1px solid $s-faint; r:0 position:sticky top:0 z-index:10","> footer":"border-top: 1px solid $s-faint; fg:$s-muted","> header > .s-bar, > footer > .s-bar":"display:flex align-items:center width:100% margin-inline:auto gap:$3 padding: $2 $3;","> header .s-logo, > header .s-nav-trigger":"display:flex align-items:center flex-shrink:0","> header .s-nav-trigger":"margin-left:-0.375rem","> header .s-logo":"font-size:1.4em background: $s-gradient; -webkit-background-clip:text; background-clip:text; color:transparent;","> header .s-titles":"display:flex flex-direction:column min-width:5rem flex: 0 1 auto;","> header .s-subtitle":"fg:$s-muted font-size:0.85em line-height:1.5 overflow:hidden text-overflow:ellipsis white-space:nowrap","> header .s-title":"font-weight:800 font-size:1.1em line-height:1.2 overflow:hidden text-overflow:ellipsis white-space:nowrap letter-spacing:-0.01em background: $s-gradient; -webkit-background-clip:text; background-clip:text; color:transparent; width:fit-content max-width:100%","> header a.s-logo, > header a.s-title":"text-decoration:none filter:none cursor:pointer","> header .s-menu":"display:flex align-items:center justify-content:flex-end gap:$2 flex: 1 1 auto;",".s-body":"flex:1 overflow:clip display:flex flex-direction:row min-height:0 justify-content:center position:relative",".s-body-inner":"flex:1 min-width:0 display:flex flex-direction:row min-height:0","&.s-nav-right .s-body-inner":"flex-direction:row-reverse",".s-nav-sep":"width:1px flex-shrink:0 align-self:stretch margin: 0.6rem 0; border:0 background: linear-gradient(to bottom, transparent, $s-faint 18%, $s-faint 82%, transparent);",".s-body main":`flex:1 min-width:0 min-height:0 overflow-x:hidden overflow-y:auto display:flex flex-direction:column transition: transform ${U}ms ease;`,".s-body main.s-slide-in":"transform: translateX(100%); transition:none",".s-body main > .s-content":"width:100% flex:1 p:$3",".s-body main.s-scroll-y":"margin-right:$3"},".s-nav-panel":{"&":"display:flex flex-direction:column overflow-y:auto flex-shrink:0 width: calc(var(--s-nav-w) - 1px); padding:$3 gap:$1"},".s-nav-page":{"&":`position:absolute inset:0 z-index:5 display:flex flex-direction:column overflow-y:auto overscroll-behavior:contain border:0 r:0 padding:$2 gap:$1 transition: transform ${U}ms ease, visibility 0s;`,"&.s-nav-page-off":`transform:translateX(-100%) pointer-events:none visibility:hidden transition: transform ${U}ms ease, visibility 0s ${U}ms;`,".s-menu-item":"padding: $2 $3; min-height:3rem font-size:1.05em gap:$3"},[`@container (max-width: ${f1}px)`]:{".s-main .s-nav-panel, .s-main .s-nav-sep":"display:none",".s-main > header > .s-bar":"gap:$1 padding: $1 $2;",".s-main .s-body main.s-scroll-y":"margin-right:0"},[`@container (max-width: ${C1}px)`]:{".s-content > .s-box":"margin-inline: calc(-1 * $3); r:0 border-inline:0"}});function P0(t={}){let a=t.nav,e=t.navPosition??"left",h=v.proxy({open:!1}),p=v.proxy({narrow:typeof document<"u"&&document.documentElement.clientWidth<=f1}),r=t.routes;if(r!=null&&t.content!=null)throw new Error("Staffa: S.main() takes either `content` or `routes`, not both");let o=r?new z1({routes:r,notFound:t.notFound,ancestors:t.ancestors,title:t.title,$shell:p}):null;o&&(v(()=>o.setColumns(t.columns)),v(()=>o.setLinkNavigation(t.linkNavigation)));let d=o&&t.home!==null?t.home??"/":null,n=()=>{t.maxWidth!=null&&v("max-width:",t.maxWidth)},c=v("div.s-main",t.attrs,()=>{v(()=>{a==null||!a.items.length?v("--s-nav-w: 0px"):v(`.s-nav-${e}`,`--s-nav-w: ${t.navWidth??$0}px`)}),v(()=>{(o!=null||t.title!=null||t.subtitle!=null||t.logo!=null||t.menu!=null||a!=null&&a.items.length>0)&&v("header.s-s.neutral",t.topbarAttrs,()=>{v("div.s-bar",()=>{v(n),v(()=>{if(p.narrow&&a!=null&&a.items.length){v("div.s-nav-trigger",()=>R0(a,h));return}t.logo!=null&&v(d!=null?"a.s-logo aria-label=Home":"div.s-logo",()=>{d!=null&&v("href=",d),x(t.logo)})}),v("div.s-titles",()=>{v(()=>{t.title!=null&&v(d!=null?"a.s-title":"div.s-title",()=>{d!=null&&v("href=",d),x(t.title)})}),E0(t,o,a,p)}),v(()=>{let l=p.narrow?o?.currentPanel?.actions:void 0,u=l??t.menu;u!=null&&v(`div.s-menu${l!=null?".s-panel-origin":""}`,()=>x(u))})})})}),v("div.s-body",()=>{v("div.s-body-inner",()=>{v(n),v(()=>{a==null||!a.items.length||(v(`nav.s-nav-panel.s-nav-${e}`,t.navAttrs,()=>{x1(a.items)}),v("div.s-nav-sep aria-hidden=true"))}),B0(t,o)}),v(()=>{a!=null&&a.items.length&&h.open&&D0(a,t.navPageAttrs,h,p)})}),v(()=>{t.footer!=null&&v("footer",()=>{v("div.s-bar",()=>{v(n),x(t.footer)})})})});return q0(c,p),a!=null&&v1(()=>a.items,()=>{h.open=!1}),(a!=null||o)&&v(()=>{let m=u=>()=>{R1()||V1()||u()},l=()=>c.querySelector(".s-nav-trigger button");h.open?$("Esc","Close the navigation",m(()=>{h.open=!1,l()?.focus()}),"global"):o&&o.currentPanelIndex>0?$("Esc","Back to the previous panel",m(()=>{o.back()}),"global"):$("Esc","Jump to the navigation",m(()=>{let u=c.querySelector(".s-nav-panel");u?.offsetParent!=null?(u.querySelector("[aria-current=page]")??u.querySelector(".s-menu-item:not([aria-disabled=true])"))?.focus():l()?.click()}),"global")}),o??void 0}var S1=null;function O0(){S1?.()}function E0(t,a,e,h){v(()=>{if(t.subtitle!=null&&(a==null||T0(a,e,h))){v("div.s-subtitle",()=>x(t.subtitle));return}a?.drawCrumbs()})}function T0(t,a,e){return e.narrow||a==null||t.panels.length>1?!1:I1(a.items)}function q0(t,a){if(typeof ResizeObserver>"u")return;let e=new ResizeObserver(h=>{let p=h[0]?.contentBoxSize?.[0],r=p?p.inlineSize:h[0]?.contentRect.width;r!=null&&(a.narrow=r<=f1)});e.observe(t),v.clean(()=>e.disconnect())}function R0(t,a){i1({icon:t.button?.icon??(()=>v(()=>(a.open?n1:b1)())),ariaLabel:t.button?.ariaLabel??"Open navigation",attrs:t.button?.attrs,click:()=>{a.open=!a.open}})}function D0(t,a,e,h){let p=!1,r=()=>{p=!0,e.open=!1},o=v("nav.s-nav-page.s-s.neutral aria-label=Navigation create=s-nav-page-off destroy=s-nav-page-off",a,()=>x1(t.items,r));S1=r,v.clean(()=>{S1===r&&(S1=null)});let d=v.peek(Q1,"path");v(()=>{Q1.path!==d&&!N1(Q1.path)&&r()});let n=o.closest(".s-main"),c=o.parentElement?.querySelector(":scope > .s-body-inner"),m=c?.querySelector(":scope > main");c?.setAttribute("inert",""),v(()=>{h.narrow||(e.open=!1)}),v.clean(()=>{c?.removeAttribute("inert"),p&&(m&&Z0(m),n?.querySelector(".s-nav-trigger button")?.focus())}),requestAnimationFrame(()=>{document.body.contains(o)&&p1(o,".s-menu-item[aria-current=page]")})}function Z0(t){t.classList.add("s-slide-in"),t.offsetWidth,t.classList.remove("s-slide-in")}function B0(t,a){if(a){a.drawColumns();return}let e=v("main",()=>{v("div.s-content",t.contentAttrs,()=>{x(t.content)})});F0(e)}function F0(t){if(typeof ResizeObserver>"u")return;let a=()=>t.classList.toggle("s-scroll-y",t.offsetWidth>t.clientWidth),e=new ResizeObserver(a);e.observe(t),t.firstElementChild&&e.observe(t.firstElementChild),a(),v.clean(()=>e.disconnect())}import E from"aberdeen";E.insertGlobalCss({".s-select_wrap":{"&":"position:relative display:block",select:"w:100% cursor:pointer padding-right:2.2em; appearance:none","&::after":"content: '\u25BE'; position:absolute right:0.7em top:50%; transform: translateY(-50%); pointer-events:none fg:$s-muted font-size:0.85em"}});function I0(t){_(t,(a,e)=>{E("div.s-select_wrap",()=>{E("select.s-input",t.inputAttrs,()=>{o1(t,a,e),E("change=",h=>{t.bind&&(t.bind.value=h.target.value)}),E(()=>{let h=typeof t.options=="function"?t.options():t.options,p=t.bind?.value??"";t.placeholder!=null&&E("option",()=>{E("value= disabled=true hidden=true"),p||E("selected=true"),E("#",t.placeholder)});for(let r of h){let o=typeof r=="string"?{value:r,label:r}:{value:r.value,label:r.label??r.value};E("option",()=>{E("value=",o.value),o.value===p&&E("selected=true"),E("#",o.label)})}})})})})}import K from"aberdeen";K.insertGlobalCss({"textarea.s-input":"resize:vertical min-height:3em line-height:1.45","textarea.s-input.s-autoGrow":"resize:none min-height:2.5em overflow-y:hidden"});function U0(t={}){let a=t.autoGrow!==!1;_(t,(e,h)=>{let p=K("textarea.s-input",t.inputAttrs,()=>{a?(K(".s-autoGrow"),K("input=",r=>{E2(r.currentTarget),t.input&&t.input(r)})):(K("rows=",t.rows??4),K("resize:",t.resize??"vertical"),t.input&&K("input=",t.input)),t.placeholder!=null&&K("placeholder=",t.placeholder),t.value!=null&&!t.bind&&K("value=",t.value),t.change&&K("change=",t.change),o1(t,e,h,t.bind)});a&&requestAnimationFrame(()=>E2(p))})}function E2(t){t.style.height="auto",t.style.height=`${t.scrollHeight}px`}export{G1 as addContextMenu,c1 as addTooltip,X2 as alert,Y2 as autocomplete,$ as bindKey,e0 as box,D as button,h0 as buttonChooser,Y as buttonGroup,p0 as checkbox,z2 as closeFloatingMenu,O0 as closeNav,j2 as confirm,d1 as dialog,r0 as form,q as formatKey,t2 as getDarkMode,i1 as iconButton,R1 as isDialogOpen,V1 as isFloatingMenuOpen,P0 as main,y0 as menu,f0 as menuButton,_2 as prompt,L1 as revealInStrip,k1 as scrollStrip,I0 as select,R2 as setDarkMode,Q2 as setKeyHelp,W1 as showFloatingMenu,D1 as showKeyHelp,w0 as tabs,U0 as textarea,q1 as textline,w1 as toast};
package/dist/theme.js CHANGED
@@ -30,8 +30,10 @@ import A from "aberdeen";
30
30
  * declaration, at the given angle. A shared constant rather than a `--s-sheen`
31
31
  * custom property: `var()`s inside a custom property resolve where it is
32
32
  * *defined*, so every surface would get the page's wash instead of its own.
33
+ * The shorthand names `$s-bg` as well as the gradient: a `background:` that
34
+ * gave only an image would reset the colour under it to transparent.
33
35
  */
34
- const sheen = (angle) => `background: linear-gradient(${angle}, color-mix(in oklab, $s-bg, white 9%), color-mix(in oklab, $s-bg, black 9%));`;
36
+ const sheen = (angle) => `background: $s-bg linear-gradient(${angle}, color-mix(in oklab, $s-bg, white 9%), color-mix(in oklab, $s-bg, black 9%));`;
35
37
  /** The surface sheen: the wash every surface (and the page) is painted with. */
36
38
  export const SURFACE_SHEEN = sheen("170deg");
37
39
  /**
@@ -113,7 +115,14 @@ A.insertGlobalCss({
113
115
  // A lightweight reset: bare semantic HTML, with less ugly defaults.
114
116
  "*, *::before, *::after": "box-sizing:border-box",
115
117
  html: "text-size-adjust:100%",
116
- body: "m:0 p:$3 line-height:1.5 font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing:antialiased background-color:$s-bg text:$s-text",
118
+ // The page wears the same wash as a surface, on a page at least as tall as
119
+ // what that wash is painted on: <body>'s background is propagated to the
120
+ // canvas, which covers the whole viewport, while the gradient is still
121
+ // *sized* from the root box. So a page shorter than the viewport — a bare
122
+ // spinner while an app boots — would tile its wash down the rest of the
123
+ // canvas in bands. `dvh`, not `vh`: a mobile viewport that grows as the URL
124
+ // bar retracts would open a band again.
125
+ body: "m:0 p:$3 min-height:100dvh line-height:1.5 font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing:antialiased text:$s-text " + SURFACE_SHEEN,
117
126
  // The contextual link colour: `--s-link` on neutral surfaces, the ink on accent ones.
118
127
  a: "color: $s-link-fg; text-decoration:underline text-underline-offset:2px; transition: color 0.12s, filter 0.12s;",
119
128
  "a:hover": "filter: brightness(1.15)",
@@ -182,9 +191,9 @@ A.insertGlobalCss({
182
191
  ":root, .s-s": "--s-muted: color-mix(in oklab, $s-text, $s-bg 42%); " +
183
192
  "--s-faint: color-mix(in oklab, $s-text, $s-bg 80%); " +
184
193
  "color:$s-text accent-color:$s-accent scrollbar-width:thin scrollbar-color: $s-faint transparent;",
185
- // Subtle single-colour gradient sheen, painted on every surface (and the page).
186
- ".s-s, body": SURFACE_SHEEN,
187
- ".s-s": "r:$s-radius",
194
+ // Subtle single-colour gradient sheen, painted on every surface (the page
195
+ // gets its own, up in the reset).
196
+ ".s-s": SURFACE_SHEEN + " r:$s-radius",
188
197
  // A neutral surface owns a hairline border, so a card reads as a card without
189
198
  // any component help. `:where()` keeps it zero-specificity, so a bar that wants
190
199
  // only a divider overrides it with a single plain rule.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "staffa",
3
- "version": "0.18.1",
3
+ "version": "0.18.2",
4
4
  "description": "An opinionated component library for the Aberdeen reactive UI library.",
5
5
  "license": "ISC",
6
6
  "author": "",
@@ -7,7 +7,7 @@ import { type MenuOptions, drawMenu, isFloatingMenuOpen, consumeBranchNav, anyCu
7
7
  import { menu as menuIcon, x as closeIcon } from "../icons.js";
8
8
  import { iconButton } from "./button.js";
9
9
  import { isDialogOpen } from "./dialog.js";
10
- import { PanelStackController, SMALL_MAX_PX, type PanelStack, type AncestorTable, type Panel, type RouteHandler, type RouteTable, type Routes } from "./panels.js";
10
+ import { PAGE_MS, PanelStackController, SMALL_MAX_PX, type PanelStack, type AncestorTable, type Panel, type RouteHandler, type RouteTable, type Routes } from "./panels.js";
11
11
 
12
12
  /** Options for {@link main}. */
13
13
  export interface MainOptions<R = Routes> {
@@ -334,7 +334,7 @@ A.insertGlobalCss({
334
334
  // incoming half of the nav-panel hand-off (see `slideContentIn`).
335
335
  ".s-body main":
336
336
  "flex:1 min-width:0 min-height:0 overflow-x:hidden overflow-y:auto display:flex flex-direction:column " +
337
- "transition: transform var(--s-panel-ms) ease;",
337
+ `transition: transform ${PAGE_MS}ms ease;`,
338
338
  // A one-shot starting position: parked one screen to the right, with the
339
339
  // transition off so it snaps there. Removing the class animates it home.
340
340
  ".s-body main.s-slide-in": "transform: translateX(100%); transition:none",
@@ -363,15 +363,17 @@ A.insertGlobalCss({
363
363
  // Under the sticky header's 10: they never overlap, but the bar should win.
364
364
  "position:absolute inset:0 z-index:5 display:flex flex-direction:column " +
365
365
  "overflow-y:auto overscroll-behavior:contain border:0 r:0 padding:$2 gap:$1 " +
366
- "transition: transform var(--s-panel-ms) ease, visibility 0s;",
366
+ `transition: transform ${PAGE_MS}ms ease, visibility 0s;`,
367
367
  // Parked one screen left: what the `create=`/`destroy=` hooks transition out
368
368
  // of and back into. On dismissal (this rule's transition) `visibility` flips
369
- // only at the slide's end, so the dismissed page isn't reachable while it
370
- // waits for Aberdeen's removal timer; on entry it flips instantly (the `0s`
371
- // above), or the opening page would refuse the focus handed to it mid-slide.
369
+ // only at the slide's end a delayed zero-length transition, whose constant
370
+ // start value costs nothing per frame so the dismissed page isn't
371
+ // reachable while it waits for Aberdeen's removal timer; on entry it flips
372
+ // instantly (the `0s` above), or the opening page would refuse the focus
373
+ // handed to it mid-slide.
372
374
  "&.s-nav-page-off":
373
375
  "transform:translateX(-100%) pointer-events:none visibility:hidden " +
374
- "transition: transform var(--s-panel-ms) ease, visibility var(--s-panel-ms);",
376
+ `transition: transform ${PAGE_MS}ms ease, visibility 0s ${PAGE_MS}ms;`,
375
377
  // Roomier than the dropdown's: every row here is a thumb target.
376
378
  ".s-menu-item": "padding: $2 $3; min-height:3rem font-size:1.05em gap:$3",
377
379
  },