@dogsbay/ssg 0.2.0-beta.149 → 0.2.0-beta.151.1

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.
@@ -18,7 +18,7 @@ import {
18
18
 
19
19
  // src/core/build.ts
20
20
  import { dogsbayMdToTree, splitFrontmatter as splitFrontmatter2, treeToDogsbayMd } from "@dogsbay/format-dogsbay-md/browser";
21
- import { isPassiveStaticFile, limitVersionRows, mergeHeaders, staticFolderPlan, staticRobotsWarnings, mergeRedirects, PASSIVE_SVG_MAX_BYTES, passiveSvgBytes, productRootRedirects, productSwitcher, siteFiles, siteRootTarget, toScript, unitOf } from "@dogsbay/site-files";
21
+ import { isPassiveStaticFile, limitVersionRows, mergeHeaders, staticFolderPlan, staticPathServed, staticRobotsWarnings, mergeRedirects, PASSIVE_SVG_MAX_BYTES, passiveSvgBytes, productRootRedirects, productSwitcher, siteFiles, siteRootTarget, toScript, unitOf } from "@dogsbay/site-files";
22
22
  import { buildHreflangLinks, isMountRoot, missingTranslations, mountRefs, mountRootNote, namespaceNavGroup, namespacePrefixes, placeMountedNav, prefixSlug as prefixSlug2, rewriteContentRefs } from "@dogsbay/site-files";
23
23
 
24
24
  // src/core/canonical.ts
@@ -27,7 +27,7 @@ import { declaresParams, splitFrontmatter } from "@dogsbay/format-dogsbay-md/bro
27
27
 
28
28
  // src/core/config.ts
29
29
  import { scriptUrl } from "@dogsbay/render-html";
30
- import { readVersionBadge, readVersionMenu, assertLeafSitemap, checkVersionSeo, isNamespaceAxisActive, namespaceSegments, parseMount, ProductConfigError, productModel, productOf, sourceNamespace, sourceUnit, unitSegments } from "@dogsbay/site-files";
30
+ import { readVersionBadge, readVersionMenu, siteChrome, assertLeafSitemap, checkVersionSeo, isNamespaceAxisActive, namespaceSegments, parseMount, ProductConfigError, productModel, productOf, sourceNamespace, sourceUnit, unitSegments } from "@dogsbay/site-files";
31
31
 
32
32
  // src/core/yaml.ts
33
33
  import { load } from "js-yaml";
@@ -93,7 +93,10 @@ function sourceFrom(v, path) {
93
93
  }
94
94
  var strOrUndef = (v) => v == null ? void 0 : String(v);
95
95
  function versionMenuOf(raw, where) {
96
- return raw == null ? void 0 : shared(() => readVersionMenu(raw, where));
96
+ return shared(() => readVersionMenu(raw, where));
97
+ }
98
+ function chromeOf(raw) {
99
+ return shared(() => siteChrome({ site: raw.site, header: raw.header, footer: raw.footer }));
97
100
  }
98
101
  function stringsOf(raw) {
99
102
  const out = { all: {}, byLocale: {} };
@@ -216,6 +219,7 @@ function parseConfig(text, overrides = {}) {
216
219
  repoUrl: site.repoUrl,
217
220
  editUri: site.editUri,
218
221
  copyright: site.copyright,
222
+ chrome: chromeOf(raw),
219
223
  linkStyle: ssg.linkStyle === "pretty" ? "pretty" : "html",
220
224
  attributes: { ...raw.attributes ?? {} },
221
225
  sources,
@@ -456,8 +460,7 @@ function productsOf(content, raw, cfg) {
456
460
  const siteVersions = content.versions ?? raw.versions;
457
461
  const written = (Array.isArray(content.sources) ? content.sources : []).filter((s) => typeof s?.path === "string");
458
462
  const sources = written.length ? written : [{ path: "content" }];
459
- const products = content.products && typeof content.products === "object" && !Array.isArray(content.products) ? Object.fromEntries(Object.entries(content.products).map(([k, p]) => [k, p && typeof p === "object" && p.versionMenu === null ? (({ versionMenu: _, ...rest }) => rest)(p) : p])) : content.products;
460
- const model = shared(() => productModel({ products, sources, versions: siteVersions, defaultVersion: content.defaultVersion ?? raw.defaultVersion, versionMenu: content.versionMenu ?? void 0, locales: cfg.locales, defaultLocale: cfg.defaultLocale }));
463
+ const model = shared(() => productModel({ products: content.products, sources, versions: siteVersions, defaultVersion: content.defaultVersion ?? raw.defaultVersion, versionMenu: content.versionMenu, locales: cfg.locales, defaultLocale: cfg.defaultLocale }));
461
464
  if (!model) return {};
462
465
  const productVersions = /* @__PURE__ */ new Map();
463
466
  for (const p of model.products) {
@@ -628,7 +631,8 @@ function projectRoots(cfg) {
628
631
  if (roots.includes("")) return [""];
629
632
  const navDirs = cfg.sources.flatMap((s) => s.nav ? [s.nav.includes("/") ? s.nav.slice(0, s.nav.lastIndexOf("/")) : s.nav] : []);
630
633
  const dataDirs = [cfg.dataDir, ...cfg.sources.flatMap((s) => s.data ? [s.data] : [])];
631
- return [.../* @__PURE__ */ new Set([...roots, cfg.themeDir, ...cfg.css, ...navDirs, ...dataDirs, ...cfg.staticDir ? [cfg.staticDir] : []])].filter(Boolean);
634
+ const logos = cfg.chrome.logo ? [cfg.chrome.logo.light, ...cfg.chrome.logo.dark ? [cfg.chrome.logo.dark] : []] : [];
635
+ return [.../* @__PURE__ */ new Set([...roots, cfg.themeDir, ...cfg.css, ...navDirs, ...dataDirs, ...cfg.staticDir ? [cfg.staticDir] : [], ...logos])].filter(Boolean);
632
636
  }
633
637
  function dataFolder(what, v) {
634
638
  if (typeof v !== "string" || !v.trim()) throw new ConfigError(`${what} must be a folder inside the project, such as ./data; got ${JSON.stringify(v)}`);
@@ -732,6 +736,16 @@ function createResolver(table, page) {
732
736
  }
733
737
  };
734
738
  }
739
+ var MENU_FILE = /\.(html?|pdf|txt|md|xml|json|ya?ml|csv|zip|gz|tgz|epub|svg|png|jpe?g|gif|webp)$/i;
740
+ function menuHref(href, siteRoot, style, basePath = "") {
741
+ if (/^(https?|mailto):/i.test(href)) return href;
742
+ const m = /^\/([^?#]*)(.*)$/.exec(href);
743
+ let path = m[1];
744
+ if (basePath && (path === basePath || path.startsWith(basePath + "/"))) path = path.slice(basePath.length + 1);
745
+ if (path === "" || path.endsWith("/")) path = style === "pretty" ? path : `${path}index.html`;
746
+ else if (!MENU_FILE.test(path) && style !== "pretty") path = `${path}.html`;
747
+ return `${siteRoot || "./"}${path}${m[2]}`;
748
+ }
735
749
 
736
750
  // src/core/openapi-pages.ts
737
751
  import { mountSlug, prefixSlug } from "@dogsbay/site-files";
@@ -1193,15 +1207,12 @@ function renderRedirectPage(rule, cfg) {
1193
1207
  const canonical = isExternal(rule.to) ? rule.to : rule.toOut ? absoluteUrl(cfg, "", servedPath(rule.toOut, cfg.linkStyle)) : void 0;
1194
1208
  return renderRedirectStub(href, canonical);
1195
1209
  }
1196
- function renderRedirectsFile(rules, cfg) {
1210
+ function servedRedirect(r, cfg) {
1197
1211
  const served = (sitePathOrOut) => "/" + [cfg.basePath, sitePathOrOut].filter(Boolean).join("/");
1198
- return renderRedirectsLines(
1199
- rules.map((r) => ({
1200
- from: served(r.from),
1201
- to: isExternal(r.to) ? r.to : served(r.toOut ? servedPath(r.toOut, cfg.linkStyle) : r.to) + (r.suffix ?? ""),
1202
- status: r.status
1203
- }))
1204
- );
1212
+ return { from: served(r.from), to: isExternal(r.to) ? r.to : served(r.toOut ? servedPath(r.toOut, cfg.linkStyle) : r.to) + (r.suffix ?? ""), status: r.status };
1213
+ }
1214
+ function renderRedirectsFile(rules, cfg) {
1215
+ return renderRedirectsLines(rules.map((r) => servedRedirect(r, cfg)));
1205
1216
  }
1206
1217
 
1207
1218
  // src/core/canonical.ts
@@ -1343,8 +1354,25 @@ import { parseMeta as parseMeta3 } from "@dogsbay/types";
1343
1354
  import { directoryChildren, hasChildLinks, navKey, realizeChildLinks } from "@dogsbay/serialize-core";
1344
1355
 
1345
1356
  // src/generated/assets.ts
1346
- var CLIENT_JS = '/*! dogsbay-ssg site client (Apache-2.0). Third-party notices: THIRD-PARTY-NOTICES.txt */\n"use strict";(()=>{var vn=Object.defineProperty;var yn=(i,t,e)=>t in i?vn(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var h=(i,t,e)=>yn(i,typeof t!="symbol"?t+"":t,e);var z=class extends HTMLElement{constructor(){super(...arguments);h(this,"_initialized",!1);h(this,"_deferred",!1)}connectedCallback(){if(!this._initialized&&!this.firstElementChild&&typeof document<"u"&&document.readyState==="loading"){this._deferred||(this._deferred=!0,document.addEventListener("DOMContentLoaded",()=>{this._deferred=!1,this.isConnected&&this.connectedCallback()},{once:!0}));return}this._initialized||(this.setup(),this._initialized=!0),this.connect()}disconnectedCallback(){this.disconnect()}setup(){}connect(){}disconnect(){}},wn={"db-tabs":"block","db-accordion":"block","db-collapsible":"block","db-details-sheet":"block","db-card":"block","db-steps":"block","db-code-block":"block","db-link-button":"inline-block","db-dialog":"contents","db-popover":"inline-block","db-tooltip":"inline-block","db-select":"inline-block","db-combobox":"block","db-nav-tree":"block","db-toc":"block"},Ie="dogsbay-elements-display";function N(){if(typeof document>"u"||document.getElementById(Ie))return;let i=Object.entries(wn).map(([e,n])=>`:where(${e}){display:${n}}`).join(""),t=document.createElement("style");t.id=Ie,t.textContent=i,document.head.prepend(t)}function En(i){return i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"}function gt(i,t,e){let n=t;do n+=e?-1:1;while(n>=0&&n<i.length&&En(i[n]));return n}var Dt=class{constructor(i,t,e={}){h(this,"container");h(this,"itemSelector");h(this,"opts");h(this,"keydownHandler",null);h(this,"active",!1);this.container=i,this.itemSelector=t,this.opts={orientation:e.orientation??"horizontal",loop:e.loop??!0,homeEnd:e.homeEnd??!0,onHighlightedIndexChange:e.onHighlightedIndexChange??(()=>{})}}getItems(){return Array.from(this.container.querySelectorAll(this.itemSelector))}isForwardKey(i,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&i===(t?"ArrowLeft":"ArrowRight")||(e==="vertical"||e==="both")&&i==="ArrowDown"}isBackwardKey(i,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&i===(t?"ArrowRight":"ArrowLeft")||(e==="vertical"||e==="both")&&i==="ArrowUp"}activate(){this.active||(this.active=!0,this.keydownHandler=i=>{let t=this.getItems();if(t.length===0||i.ctrlKey||i.altKey||i.metaKey)return;let e=getComputedStyle(this.container).direction==="rtl",n=t.indexOf(document.activeElement);if(n===-1)return;let s=null;this.isForwardKey(i.key,e)?(s=gt(t,n,!1),s>=t.length&&(s=this.opts.loop?gt(t,-1,!1):n)):this.isBackwardKey(i.key,e)?(s=gt(t,n,!0),s<0&&(s=this.opts.loop?gt(t,t.length,!0):n)):this.opts.homeEnd&&i.key==="Home"?s=gt(t,-1,!1):this.opts.homeEnd&&i.key==="End"&&(s=gt(t,t.length,!0)),s!==null&&(s<0||s>=t.length||s!==n&&(i.preventDefault(),t[n].setAttribute("tabindex","-1"),t[s].setAttribute("tabindex","0"),t[s].focus(),this.opts.onHighlightedIndexChange(s)))},this.container.addEventListener("keydown",this.keydownHandler))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(this.container.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null))}setActiveIndex(i,t){i.forEach((e,n)=>{e.setAttribute("tabindex",n===t?"0":"-1")})}isActive(){return this.active}};var xn=0;function Me(i){return`${i}-${++xn}`}var He=class extends z{constructor(){super(...arguments);h(this,"list");h(this,"triggers",[]);h(this,"panels",[]);h(this,"nav",null);h(this,"value","");h(this,"syncKey",null);h(this,"orientation","horizontal");h(this,"handleClick",t=>{let e=t.target.closest("[data-part=\'trigger\']");if(!e||e.hasAttribute("disabled"))return;let n=e.dataset.value;n&&this.select(n)});h(this,"handleStorage",t=>{if(!this.syncKey||t.key!==`db-tabs-sync:${this.syncKey}`)return;let e=t.newValue;e&&this.value!==e&&this.has(e)&&this.select(e)});h(this,"handleSyncEvent",(t=>{let e=t.detail.value;e&&this.value!==e&&this.has(e)&&this.select(e)}))}has(t){return this.triggers.some(e=>e.dataset.value===t)}own(t){return Array.from(this.querySelectorAll(t)).filter(e=>e.closest("db-tabs")===this)}setup(){var o;let t=this.own("[data-part=\'list\']")[0]??null;if(!t)return;this.list=t,this.triggers=this.own("[data-part=\'trigger\']"),this.panels=this.own("[data-part=\'content\']"),this.orientation=this.getAttribute("orientation")||"horizontal",this.syncKey=this.getAttribute("sync-key")||null,t.setAttribute("role","tablist"),t.setAttribute("aria-orientation",this.orientation),this.triggers.forEach(r=>{let a=r.dataset.value;r.setAttribute("role","tab");let l=r.id||Me("db-tab");r.id=l;let c=this.panels.find(d=>d.dataset.value===a);if(c){c.setAttribute("role","tabpanel");let d=c.id||Me("db-tabpanel");c.id=d,r.setAttribute("aria-controls",d),c.setAttribute("aria-labelledby",l)}}),this.nav=new Dt(t,"[data-part=\'trigger\']",{orientation:this.orientation,loop:!0,homeEnd:!0,onHighlightedIndexChange:()=>{var l;let r=document.activeElement,a=(l=r==null?void 0:r.dataset)==null?void 0:l.value;a&&this.select(a)}}),this.nav.activate();let n=this.getAttribute("default-value")||((o=this.triggers[0])==null?void 0:o.dataset.value)||"";if(this.syncKey){let r=localStorage.getItem(`db-tabs-sync:${this.syncKey}`);r&&this.triggers.some(a=>a.dataset.value===r)&&(n=r)}let s=window.location.hash.slice(1);s&&this.triggers.some(r=>r.dataset.value===s)&&(n=s),this.select(n)}connect(){var t;(t=this.list)==null||t.addEventListener("click",this.handleClick),this.syncKey&&(window.addEventListener("storage",this.handleStorage),document.addEventListener(`db-tabs-sync:${this.syncKey}`,this.handleSyncEvent))}disconnect(){var t;(t=this.list)==null||t.removeEventListener("click",this.handleClick),this.syncKey&&(window.removeEventListener("storage",this.handleStorage),document.removeEventListener(`db-tabs-sync:${this.syncKey}`,this.handleSyncEvent))}select(t){this.value!==t&&(this.value=t,this.triggers.forEach(e=>{let n=e.dataset.value===t;e.setAttribute("aria-selected",String(n)),e.setAttribute("tabindex",n?"0":"-1"),n?e.setAttribute("data-state","active"):e.removeAttribute("data-state")}),this.panels.forEach(e=>{let n=e.dataset.value===t;e.hidden=!n,n?(e.setAttribute("data-state","active"),e.hasAttribute("tabindex")||e.setAttribute("tabindex","0")):e.removeAttribute("data-state")}),this.syncKey&&(localStorage.setItem(`db-tabs-sync:${this.syncKey}`,t),document.dispatchEvent(new CustomEvent(`db-tabs-sync:${this.syncKey}`,{detail:{value:t,source:this}}))),this.dispatchEvent(new CustomEvent("db-tabs:change",{detail:{value:t},bubbles:!0})))}};N();customElements.get("db-tabs")||customElements.define("db-tabs",He);var An=0;function Sn(i){return`${i}-${++An}`}var ze=class{constructor(i,t,e={}){h(this,"trigger");h(this,"content");h(this,"_open",!1);h(this,"opts");this.trigger=i,this.content=t,this.opts=e;let n=Sn("base-collapsible");i.id||(i.id=`${n}-trigger`),t.id||(t.id=`${n}-content`),i.setAttribute("aria-controls",t.id),t.setAttribute("aria-labelledby",i.id),t.setAttribute("role","region"),i.setAttribute("aria-expanded","false"),i.addEventListener("click",()=>{i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"||this.toggle()})}get isOpen(){return this._open}toggle(){this._open?this.collapse():this.expand()}expand(){var i,t;this._open||(this._open=!0,this.trigger.setAttribute("aria-expanded","true"),this.content.hidden=!1,this.content.setAttribute("data-state","open"),(t=(i=this.opts).onToggle)==null||t.call(i,!0))}collapse(){var i,t;this._open&&(this._open=!1,this.trigger.setAttribute("aria-expanded","false"),this.content.hidden=!0,this.content.removeAttribute("data-state"),(t=(i=this.opts).onToggle)==null||t.call(i,!1))}};var Ne=class extends z{constructor(){super(...arguments);h(this,"items",[]);h(this,"nav",null);h(this,"openValues",new Set);h(this,"type","single")}setup(){this.type=this.getAttribute("type")||"single";let t=this.getAttribute("default-value")||"",e=t?t.split(","):[],n=Array.from(this.querySelectorAll("[data-part=\'item\']"));this.items=n.map(s=>{let o=s.querySelector("[data-part=\'trigger\']"),r=s.querySelector("[data-part=\'content\']");if(!o||!r)return null;let a=s.dataset.value||"",l=s.hasAttribute("data-disabled");l&&(o.setAttribute("disabled",""),o.setAttribute("aria-disabled","true"));let c=new ze(o,r,{onToggle:d=>{d?this.onItemExpanded(a):this.onItemCollapsed(a)}});return{el:s,value:a,collapsible:c,disabled:l}}).filter(Boolean),this.nav=new Dt(this,"[data-part=\'trigger\']",{orientation:"vertical",loop:!0,homeEnd:!0}),this.nav.activate(),this.items.forEach((s,o)=>{s.collapsible.trigger.setAttribute("tabindex",o===0?"0":"-1")}),e.forEach(s=>{let o=this.items.find(r=>r.value===s&&!r.disabled);o&&o.collapsible.expand()})}onItemExpanded(t){if(this.type==="single"){for(let n of this.openValues)if(n!==t){let s=this.items.find(o=>o.value===n);s&&s.collapsible.collapse()}}this.openValues.add(t);let e=this.items.find(n=>n.value===t);e&&e.el.setAttribute("data-state","open"),this.dispatchEvent(new CustomEvent("db-accordion:change",{detail:{value:t,open:!0,openValues:[...this.openValues]},bubbles:!0}))}onItemCollapsed(t){this.openValues.delete(t);let e=this.items.find(n=>n.value===t);e&&e.el.removeAttribute("data-state"),this.dispatchEvent(new CustomEvent("db-accordion:change",{detail:{value:t,open:!1,openValues:[...this.openValues]},bubbles:!0}))}};N();customElements.get("db-accordion")||customElements.define("db-accordion",Ne);var Cn=0;function F(i){return`${i}-${++Cn}`}function et(i,t){let e=i.localName;return Array.from(i.querySelectorAll(t)).filter(n=>n.closest(e)===i)}function $(i,t){return et(i,t)[0]??null}function bt(i){if(!i||!i.hasAttribute("data-as-child"))return i;let t=i.firstElementChild;if(!t)return i;let e=i.getAttribute("data-part");return e&&t.setAttribute("data-part",e),t}function W(i){return i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"||i.getAttribute("data-disabled")==="true"}function _e(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover=="function"}function vt(i){if(i.hidden=!1,!_e())return"inline";i.hasAttribute("popover")||i.setAttribute("popover","manual"),i.style.inset="auto",i.style.margin="0";try{i.matches(":popover-open")||i.showPopover()}catch{return"inline"}return"top-layer"}function yt(i){if(_e())try{i.matches(":popover-open")&&i.hidePopover()}catch{}i.hidden=!0}var Ln=\'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]\';function Pe(i){return Array.from(i.querySelectorAll(Ln)).filter(t=>!t.closest("[hidden]")&&!W(t))}function Fe(i,t){let e=typeof i.getAnimations=="function"?i.getAnimations():[];if(!e.length)return t();Promise.all(e.map(n=>n.finished)).then(t,t)}function wt(i){try{return decodeURIComponent(i)}catch{return i}}var Be=class extends z{constructor(){super(...arguments);h(this,"details",null);h(this,"summary",null);h(this,"dialog",null);h(this,"body",null);h(this,"source",null);h(this,"moved",[]);h(this,"handledHash",null);h(this,"onSummaryClick",t=>{var n,s;let e=t.target;e&&e!==this.summary&&((s=(n=e.closest)==null?void 0:n.call(e,"a[href], button, input, select, textarea, label"))==null?void 0:s.closest("summary"))===this.summary||(t.preventDefault(),this.show())});h(this,"onDialogClick",t=>{let e=this.dialog;if(!e||t.target!==e)return;let n=e.getBoundingClientRect();!(t.clientX>=n.left&&t.clientX<=n.right&&t.clientY>=n.top&&t.clientY<=n.bottom)&&(t.clientX!==0||t.clientY!==0)&&e.close()});h(this,"onDialogClose",()=>this.restore());h(this,"onDocClick",t=>{var o,r;if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let e=(r=(o=t.target)==null?void 0:o.closest)==null?void 0:r.call(o,"a[href]");if(!e||!this.details||this.open||e.hasAttribute("download")||e.target&&e.target!=="_self")return;let n=new URL(e.href,location.href);if(!n.hash||n.hash!==location.hash||n.pathname!==location.pathname||n.search!==location.search)return;let s=document.getElementById(wt(n.hash.slice(1)));if(!(!s||!this.details.contains(s))){for(let a of this.details.querySelectorAll("db-details-sheet"))a.handledHash=null;this.show(s)}});h(this,"onHash",()=>{this.handledHash=null,this.openForHash()})}get open(){var t;return!!((t=this.dialog)!=null&&t.open)}setup(){var d;let t=Array.from(this.children).find(u=>u.tagName==="DETAILS")??null,e=t?Array.from(t.children).find(u=>u.tagName==="SUMMARY")??null:null,n=typeof HTMLDialogElement<"u"&&typeof HTMLDialogElement.prototype.showModal=="function";if(!t||!e||!n)return;for(let u of Array.from(t.children))u.getAttribute("role")==="status"&&u.setAttribute("aria-live","off");this.details=t,this.summary=e,t.open=!1,kn();let s=(((d=e.querySelector("[data-part=\'title\']"))==null?void 0:d.textContent)??e.textContent??"").trim(),o=document.createElement("dialog");o.className="db-sheet",o.id=F("db-sheet");let r=document.createElement("h2");r.className="db-sheet-title",r.id=F("db-sheet-title"),r.textContent=s,o.setAttribute("aria-labelledby",r.id);let a=document.createElement("button");a.type="button",a.className="db-sheet-close",a.setAttribute("aria-label",this.getAttribute("close-label")||"Close"),a.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>\',a.addEventListener("click",()=>o.close());let l=document.createElement("div");l.className="db-sheet-header",l.append(r,a);let c=document.createElement("div");c.className="db-sheet-body",o.append(l,c),this.append(o),this.dialog=o,this.body=c,e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-controls",o.id),e.setAttribute("aria-expanded","false"),this.setAttribute("data-state","closed")}connect(){this.dialog&&(this.summary.addEventListener("click",this.onSummaryClick),this.dialog.addEventListener("click",this.onDialogClick),this.dialog.addEventListener("close",this.onDialogClose),window.addEventListener("hashchange",this.onHash),document.addEventListener("click",this.onDocClick),queueMicrotask(()=>this.isConnected&&this.openForHash()))}disconnect(){this.dialog&&(this.dialog.open&&this.dialog.close(),this.restore(!1),this.summary.removeEventListener("click",this.onSummaryClick),this.dialog.removeEventListener("click",this.onDialogClick),this.dialog.removeEventListener("close",this.onDialogClose),window.removeEventListener("hashchange",this.onHash),document.removeEventListener("click",this.onDocClick))}show(t){var l;let{dialog:e,details:n,body:s}=this;if(!e||!n||!s||e.open)return;let o=Array.from(n.childNodes).filter(c=>c!==this.summary),r=o.filter(c=>c.nodeType===Node.ELEMENT_NODE),a=r.length===1&&o.every(c=>{var d;return c===r[0]||!((d=c.textContent)!=null&&d.trim())})?r[0]:null;this.source=a??n,this.moved=a?Array.from(a.childNodes):o,s.append(...this.moved),e.showModal(),this.summary.setAttribute("aria-expanded","true"),this.setAttribute("data-state","open"),t&&t!==n&&((l=t.scrollIntoView)==null||l.call(t,{block:"start"})),this.dispatchEvent(new CustomEvent("db-details-sheet:open",{bubbles:!0}))}close(){var t;(t=this.dialog)==null||t.close()}restore(t=!0){var e,n;this.source&&(this.source.append(...this.moved),this.source=null,this.moved=[],this.summary.setAttribute("aria-expanded","false"),this.setAttribute("data-state","closed"),t&&this.isConnected&&((n=(e=this.summary).checkVisibility)==null?void 0:n.call(e))!==!1&&this.summary.focus(),this.dispatchEvent(new CustomEvent("db-details-sheet:close",{bubbles:!0})))}openForHash(){let t=wt(location.hash.slice(1));if(!t||!this.details||this.handledHash===location.hash||(this.handledHash=location.hash,this.open))return;let e=document.getElementById(t);e&&this.details.contains(e)&&this.show(e)}},$e="dogsbay-details-sheet";function kn(){if(document.getElementById($e))return;let i=document.createElement("style");i.id=$e,i.textContent=["dialog.db-sheet{position:fixed;inset:0 0 0 auto;margin:0;height:100dvh;max-height:none;width:min(32rem,100vw);max-width:100vw;padding:0;border:0;border-left:1px solid var(--border);background:var(--background);color:var(--foreground);box-shadow:0 10px 15px -3px rgb(0 0 0/.1),0 4px 6px -4px rgb(0 0 0/.1);flex-direction:column}","dialog.db-sheet[open]{display:flex}","dialog.db-sheet::backdrop{background:rgb(0 0 0/.6)}",".db-sheet-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.5rem;border-bottom:1px solid var(--border)}","dialog.db-sheet h2.db-sheet-title{margin:0;padding:0;border:0;font-size:1.125rem;line-height:1.75rem;font-weight:600;scroll-margin:0}",".db-sheet-close{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:.375rem;background:transparent;color:var(--muted-foreground);cursor:pointer}",".db-sheet-close:hover{background:var(--accent,var(--muted));color:var(--foreground)}",".db-sheet-close:focus-visible{outline:2px solid var(--ring);outline-offset:2px}",".db-sheet-body{flex:1;overflow-y:auto;padding:1.5rem;font-size:.875rem;line-height:1.625}","dialog.db-sheet .db-sheet-body>:first-child{margin-top:0}","html:has(dialog.db-sheet[open]){overflow:hidden}","db-details-sheet>details>summary>span:last-child{transform:rotate(-90deg)}","@media (prefers-reduced-motion:no-preference){dialog.db-sheet[open]{animation:db-sheet-in .2s ease-out}dialog.db-sheet[open]::backdrop{animation:db-sheet-fade .2s ease-out}}","@keyframes db-sheet-in{from{transform:translateX(100%)}}","@keyframes db-sheet-fade{from{opacity:0}}"].join(""),document.head.append(i)}N();customElements.get("db-details-sheet")||customElements.define("db-details-sheet",Be);var qe=class extends z{constructor(){super(...arguments);h(this,"copyBtn",null);h(this,"copyIcon",null);h(this,"checkIcon",null);h(this,"liveRegion",null);h(this,"resetTimeout",null);h(this,"handleCopy",async()=>{let t=this.getCopyText();if(t)try{await navigator.clipboard.writeText(t),this.showCopiedFeedback(),this.dispatchEvent(new CustomEvent("db-code-block:copied",{detail:{text:t},bubbles:!0}))}catch{}})}setup(){this.copyBtn=this.querySelector("[data-part=\'copy\']"),this.copyIcon=this.querySelector("[data-part=\'copy-icon\']"),this.checkIcon=this.querySelector("[data-part=\'check-icon\']"),this.copyBtn&&!this.copyBtn.hasAttribute("aria-label")&&this.copyBtn.setAttribute("aria-label","Copy code"),this.liveRegion=document.createElement("span"),this.liveRegion.setAttribute("aria-live","polite"),this.liveRegion.setAttribute("role","status"),this.liveRegion.className="sr-only",this.liveRegion.style.position="absolute",this.liveRegion.style.width="1px",this.liveRegion.style.height="1px",this.liveRegion.style.overflow="hidden",this.liveRegion.style.clip="rect(0, 0, 0, 0)",this.liveRegion.style.whiteSpace="nowrap",this.appendChild(this.liveRegion)}connect(){var t;(t=this.copyBtn)==null||t.addEventListener("click",this.handleCopy)}disconnect(){var t;(t=this.copyBtn)==null||t.removeEventListener("click",this.handleCopy),this.clearResetTimeout()}getCopyText(){let t=this.getAttribute("data-copy-text");if(t)return t;let e=this.querySelector("[data-part=\'code\'] code");if(e)return e.textContent??"";let n=this.querySelector("[data-part=\'code\']");return(n==null?void 0:n.textContent)??""}showCopiedFeedback(){this.clearResetTimeout(),this.copyIcon&&(this.copyIcon.hidden=!0),this.checkIcon&&(this.checkIcon.hidden=!1),this.setAttribute("data-state","copied"),this.liveRegion&&(this.liveRegion.textContent="Copied!"),this.resetTimeout=setTimeout(()=>{this.copyIcon&&(this.copyIcon.hidden=!1),this.checkIcon&&(this.checkIcon.hidden=!0),this.removeAttribute("data-state"),this.liveRegion&&(this.liveRegion.textContent=""),this.resetTimeout=null},2e3)}clearResetTimeout(){this.resetTimeout!==null&&(clearTimeout(this.resetTimeout),this.resetTimeout=null)}};N();customElements.get("db-code-block")||customElements.define("db-code-block",qe);var Ke=class extends z{constructor(){super(...arguments);h(this,"navData",null);h(this,"onClick",t=>{let e=t.target.closest("[data-part=\'toggle\']");if(!e||e.closest("db-nav-tree")!==this)return;let n=e.closest("[data-part=\'item\']");n&&this.toggle(n)});h(this,"onKey",t=>{var c,d;if(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)return;let e=document.activeElement;if(!e||!this.contains(e))return;let n=this.visibleRows(),s=e.closest("[data-part=\'row\']"),o=s?n.indexOf(s):-1;if(o<0)return;let r=s.closest("[data-part=\'item\']"),a=!!this.groupOf(r),l=u=>{var f;u&&(t.preventDefault(),(f=this.primary(u))==null||f.focus())};switch(t.key){case"ArrowDown":return l(n[o+1]);case"ArrowUp":return l(n[o-1]);case"Home":return l(n[0]);case"End":return l(n[n.length-1]);case"ArrowRight":if(!a)return;t.preventDefault(),this.isOpen(r)?l(this.visibleRows()[o+1]):this.setOpen(r,!0);return;case"ArrowLeft":{if(t.preventDefault(),a&&this.isOpen(r))return this.setOpen(r,!1);let u=(c=r.parentElement)==null?void 0:c.closest("[data-part=\'item\']");if(u&&this.contains(u)){let f=u.querySelector(":scope > [data-part=\'row\']");f&&((d=this.primary(f))==null||d.focus())}return}}})}setup(){for(let t of et(this,"[data-part=\'item\']"))this.prepareItem(t)}connect(){this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKey);for(let t of et(this,"[data-part=\'group\'][data-lazy]")){let e=t.closest("[data-part=\'item\']");e&&this.isOpen(e)&&this.fill(t)}this.hasAttribute("scroll-current")&&requestAnimationFrame(()=>this.revealCurrent())}disconnect(){this.removeEventListener("click",this.onClick),this.removeEventListener("keydown",this.onKey)}prepareItem(t){let e=this.groupOf(t),n=t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'toggle\']");if(!e||!n)return;e.id||(e.id=F("db-nav-group")),n.setAttribute("aria-controls",e.id),n instanceof HTMLButtonElement&&!n.hasAttribute("type")&&(n.type="button");let s=n.getAttribute("aria-expanded")==="true"||t.getAttribute("data-state")==="open";this.apply(t,s)}groupOf(t){return t.querySelector(":scope > [data-part=\'group\']")}toggleOf(t){return t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'toggle\']")}primary(t){return t.querySelector(":scope > [data-part=\'link\']")??t.querySelector(":scope > [data-part=\'toggle\']")}visibleRows(){return et(this,"[data-part=\'row\']").filter(t=>!t.closest("[hidden]"))}isOpen(t){return t.getAttribute("data-state")==="open"}toggle(t){this.setOpen(t,!this.isOpen(t))}setOpen(t,e){let n=this.groupOf(t);!n||this.isOpen(t)===e||(e&&n.hasAttribute("data-lazy")&&this.fill(n),this.apply(t,e),this.dispatchEvent(new CustomEvent("db-nav-tree:toggle",{detail:{item:t,open:e},bubbles:!0})))}apply(t,e){let n=this.groupOf(t),s=this.toggleOf(t);n&&(n.hidden=!e),s==null||s.setAttribute("aria-expanded",String(e)),t.setAttribute("data-state",e?"open":"closed")}revealCurrent(){var o;let t=this.querySelector("[aria-current=\'page\']");if(!t)return;for(let r=t.closest("[data-part=\'item\']");r&&this.contains(r);r=((o=r.parentElement)==null?void 0:o.closest("[data-part=\'item\']"))??null)this.groupOf(r)&&!this.groupOf(r).contains(t)||this.groupOf(r)&&this.setOpen(r,!0);let e=On(this);if(!e)return;let n=t.getBoundingClientRect(),s=e.getBoundingClientRect();(n.top<s.top||n.bottom>s.bottom)&&(e.scrollTop+=n.top-s.top-s.height/2+n.height/2)}data(){if(this.navData)return this.navData;let t=this.getAttribute("data-source"),e=t?globalThis[t]:void 0;return Array.isArray(e)?e:null}fill(t){let e=this.data(),n=t.dataset.path;if(!e||n==null)return;let s=e,o;for(let r of n.split(".").map(Number))o=s==null?void 0:s[r],s=o==null?void 0:o[2];o!=null&&o[2]&&(t.replaceChildren(...this.build(o[2],n)),t.removeAttribute("data-lazy"))}build(t,e){let n=this.getAttribute("base")??"",s=this.getAttribute("toggle-label")??"Toggle {label}",o=location.href.split("#")[0];return t.map(([r,a,l,c],d)=>{let u=`${e}.${d}`,f=document.createElement("li");f.setAttribute("data-part","item"),f.style.setProperty("--db-level",String(u.split(".").length-1));let m=document.createElement("div");m.setAttribute("data-part","row"),f.appendChild(m);let p=(a==null?void 0:a.replace(/[\\u0000-\\u0020]/g,""))??"";a!=null&&/^[a-z][a-z0-9+.-]*:/i.test(p)&&!/^(?:https?|mailto):/i.test(p)&&(a=null);let b=a!=null&&/^[a-z][a-z0-9+.-]*:|^\\/\\//i.test(p),g=null;if(l!=null&&l.length){if(g=document.createElement("button"),g.type="button",g.setAttribute("data-part","toggle"),g.setAttribute("aria-expanded","false"),a!=null)g.setAttribute("aria-label",s.replace("{label}",()=>r));else{let w=document.createElement("span");w.setAttribute("data-part","label"),w.textContent=r,g.appendChild(w)}g.insertAdjacentHTML("beforeend",Tn)}let y=this.getAttribute("toggle-position")==="end";if(g&&!y&&m.appendChild(g),a!=null){let w=document.createElement("a");w.setAttribute("data-part","link"),w.textContent=r,w.href=b?a:n+a,b&&(w.rel="noopener"),!c&&w.href.split("#")[0]===o&&w.setAttribute("aria-current","page"),m.appendChild(w)}if(a==null&&!(l!=null&&l.length)){let w=document.createElement("span");w.setAttribute("data-part","label"),w.textContent=r,m.appendChild(w)}if(g&&y&&m.appendChild(g),l!=null&&l.length){let w=document.createElement("ul");w.setAttribute("data-part","group"),w.dataset.lazy="",w.dataset.path=u,w.hidden=!0,f.setAttribute("data-state","closed"),f.appendChild(w),this.prepareItem(f)}return f})}},Tn=\'<svg data-part="chevron" viewBox="0 0 24 24" width="16" height="16" aria-hidden="true" focusable="false"><path d="m9 18 6-6-6-6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>\';function On(i){for(let t=i.parentElement;t;t=t.parentElement){let e=getComputedStyle(t).overflowY;if((e==="auto"||e==="scroll")&&t.scrollHeight>t.clientHeight)return t}return null}N();customElements.get("db-nav-tree")||customElements.define("db-nav-tree",Ke);var We=class extends z{constructor(){super(...arguments);h(this,"links",[]);h(this,"headings",[]);h(this,"observer",null);h(this,"active",null);h(this,"onScroll",()=>{let t=document.documentElement;window.innerHeight+window.scrollY>=t.scrollHeight-2&&this.headings.length&&this.setActive(this.headings[this.headings.length-1].id)});h(this,"onHash",()=>{let t=wt(location.hash.slice(1));t&&this.headings.some(e=>e.id===t)&&this.setActive(t)})}slugOf(t){return t.getAttribute("data-toc-slug")??wt(t.getAttribute("href").slice(1))}setup(){this.links=Array.from(this.querySelectorAll("a[href^=\'#\'], a[data-toc-link]"))}connect(){var e;if(this.headings=this.links.map(n=>document.getElementById(this.slugOf(n))).filter(n=>!!n),!this.headings.length)return;let t=Number(this.getAttribute("offset")??80);typeof IntersectionObserver<"u"&&(this.observer=new IntersectionObserver(n=>{var o;let s=n.find(r=>r.isIntersecting);if(s)return this.setActive(s.target.id);this.setActive(((o=this.lastAbove(t))==null?void 0:o.id)??null)},{rootMargin:`-${t}px 0px -70% 0px`,threshold:0}),this.headings.forEach(n=>this.observer.observe(n))),window.addEventListener("hashchange",this.onHash),window.addEventListener("scroll",this.onScroll,{passive:!0}),this.setActive(((e=this.lastAbove(t))==null?void 0:e.id)??this.headings[0].id)}disconnect(){var t;(t=this.observer)==null||t.disconnect(),this.observer=null,window.removeEventListener("hashchange",this.onHash),window.removeEventListener("scroll",this.onScroll)}lastAbove(t){let e=null;for(let n of this.headings)n.getBoundingClientRect().top<=t+20&&(e=n);return e}setActive(t){if(!(!t||t===this.active)){this.active=t;for(let e of this.links)this.slugOf(e)===t?(e.setAttribute("aria-current","location"),e.setAttribute("data-active","")):(e.removeAttribute("aria-current"),e.removeAttribute("data-active"));this.dispatchEvent(new CustomEvent("db-toc:change",{detail:{id:t},bubbles:!0}))}}};N();customElements.get("db-toc")||customElements.define("db-toc",We);var Dn=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",\'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)\',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],de=Dn.join(","),Ye=typeof Element>"u",Rt=Ye?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Wt=!Ye&&Element.prototype.getRootNode?function(i){var t;return i==null||(t=i.getRootNode)===null||t===void 0?void 0:t.call(i)}:function(i){return i==null?void 0:i.ownerDocument},jt=function(t,e){var n;e===void 0&&(e=!0);var s=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),o=s===""||s==="true",r=o||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):jt(t.parentNode));return r},Rn=function(t){var e,n=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return n===""||n==="true"},In=function(t,e,n){if(jt(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(de));return e&&Rt.call(t,de)&&s.unshift(t),s=s.filter(n),s},ue=function(t,e,n){for(var s=[],o=Array.from(t);o.length;){var r=o.shift();if(!jt(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),l=a.length?a:r.children,c=ue(l,!0,n);n.flatten?s.push.apply(s,c):s.push({scopeParent:r,candidates:c})}else{var d=Rt.call(r,de);d&&n.filter(r)&&(e||!t.includes(r))&&s.push(r);var u=r.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(r),f=!jt(u,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(r));if(u&&f){var m=ue(u===!0?r.children:u.children,!0,n);n.flatten?s.push.apply(s,m):s.push({scopeParent:r,candidates:m})}else o.unshift.apply(o,r.children)}}return s},Ue=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Xe=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Rn(t))&&!Ue(t)?0:t.tabIndex},Mn=function(t,e){var n=Xe(t);return n<0&&e&&!Ue(t)?0:n},Hn=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Ge=function(t){return t.tagName==="INPUT"},zn=function(t){return Ge(t)&&t.type==="hidden"},Nn=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return e},_n=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]},Pn=function(t){if(!t.name)return!0;var e=t.form||Wt(t),n=function(a){return e.querySelectorAll(\'input[type="radio"][name="\'+a+\'"]\')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=n(window.CSS.escape(t.name));else try{s=n(t.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var o=_n(s,t.form);return!o||o===t},Fn=function(t){return Ge(t)&&t.type==="radio"},$n=function(t){return Fn(t)&&!Pn(t)},Bn=function(t){var e,n=t&&Wt(t),s=(e=n)===null||e===void 0?void 0:e.host,o=!1;if(n&&n!==t){var r,a,l;for(o=!!((r=s)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(s)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&s;){var c,d,u;n=Wt(s),s=(c=n)===null||c===void 0?void 0:c.host,o=!!((d=s)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(s))}}return o},je=function(t){var e=t.getBoundingClientRect(),n=e.width,s=e.height;return n===0&&s===0},qn=function(t,e){var n=e.displayCheck,s=e.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}var r=getComputedStyle(t),a=r.visibility;if(a==="hidden"||a==="collapse")return!0;var l=Rt.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(Rt.call(c,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof s=="function"){for(var d=t;t;){var u=t.parentElement,f=Wt(t);if(u&&!u.shadowRoot&&s(u)===!0)return je(t);t.assignedSlot?t=t.assignedSlot:!u&&f!==t.ownerDocument?t=f.host:t=u}t=d}if(Bn(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return je(t);return!1},Kn=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var n=0;n<e.children.length;n++){var s=e.children.item(n);if(s.tagName==="LEGEND")return Rt.call(e,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}e=e.parentElement}return!1},Wn=function(t,e){return!(e.disabled||zn(e)||qn(e,t)||Nn(e)||Kn(e))},Ve=function(t,e){return!($n(e)||Xe(e)<0||!Wn(t,e))},jn=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Ze=function(t){var e=[],n=[];return t.forEach(function(s,o){var r=!!s.scopeParent,a=r?s.scopeParent:s,l=Mn(a,r),c=r?Ze(s.candidates):a;l===0?r?e.push.apply(e,c):e.push(a):n.push({documentOrder:o,tabIndex:l,item:s,isScope:r,content:c})}),n.sort(Hn).reduce(function(s,o){return o.isScope?s.push.apply(s,o.content):s.push(o.content),s},[]).concat(e)},he=function(t,e){e=e||{};var n;return e.getShadowRoot?n=ue([t],e.includeContainer,{filter:Ve.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:jn}):n=In(t,e.includeContainer,Ve.bind(null,e)),Ze(n)};var fe=class{constructor(i,t={}){h(this,"root");h(this,"opts");h(this,"previouslyFocused",null);h(this,"keydownHandler",null);h(this,"active",!1);this.root=i,this.opts={initialFocus:t.initialFocus??"first",returnFocus:t.returnFocus??!0}}activate(){this.active||(this.active=!0,this.previouslyFocused=document.activeElement,this.keydownHandler=i=>{if(i.key!=="Tab")return;let t=he(this.root);if(t.length===0){i.preventDefault();return}let e=t[0],n=t[t.length-1];i.shiftKey?document.activeElement===e&&(n.focus(),i.preventDefault()):document.activeElement===n&&(e.focus(),i.preventDefault())},document.addEventListener("keydown",this.keydownHandler),requestAnimationFrame(()=>{var t;if(!this.active)return;let i=he(this.root);this.opts.initialFocus instanceof HTMLElement&&this.root.contains(this.opts.initialFocus)?this.opts.initialFocus.focus():this.opts.initialFocus==="container"?(this.root.hasAttribute("tabindex")||this.root.setAttribute("tabindex","-1"),this.root.focus()):(t=i[0])==null||t.focus()}))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(document.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null),this.opts.returnFocus&&this.previouslyFocused&&document.contains(this.previouslyFocused)&&this.previouslyFocused.focus(),this.previouslyFocused=null)}isActive(){return this.active}};var B,at=(B=class{static activate(){if(B.count++,B.count>1)return;let t=window.innerWidth-document.documentElement.clientWidth;B.originalStyles={overflow:document.body.style.overflow,paddingRight:document.body.style.paddingRight},document.body.style.overflow="hidden",t>0&&(document.body.style.paddingRight=`${t}px`)}static deactivate(){B.count=Math.max(0,B.count-1),!(B.count>0)&&B.originalStyles&&(document.body.style.overflow=B.originalStyles.overflow,document.body.style.paddingRight=B.originalStyles.paddingRight,B.originalStyles=null)}static reset(){B.count=0,B.originalStyles=null}},h(B,"count",0),h(B,"originalStyles",null),B);var Q=[];function Vn(i){if(i.key!=="Escape"||Q.length===0)return;let t=Q[Q.length-1];t.escapePrevented||(i.preventDefault(),i.stopPropagation(),t.opts.onDismiss("escape-key"))}var Qe=!1;function Yn(){Qe||(Qe=!0,document.addEventListener("keydown",Vn))}var lt=class{constructor(i,t){h(this,"root");h(this,"opts");h(this,"outsideHandler",null);h(this,"active",!1);h(this,"frameId",null);h(this,"escapePrevented",!1);this.root=i,this.opts={onDismiss:t.onDismiss,escapeKey:t.escapeKey??!0,outsidePress:t.outsidePress??!0}}activate(){this.active||(this.active=!0,this.opts.escapeKey&&(Yn(),Q.push(this)),this.opts.outsidePress&&(this.outsideHandler=i=>{if(Q.length>0&&Q[Q.length-1]!==this)return;let t=i.target;if(this.root.contains(t))return;let e=this.root.id;if(e){let s=document.querySelector(`[aria-controls="${e}"]`);if(s!=null&&s.contains(t))return}let n=this.root.getAttribute("aria-labelledby");if(n){let s=document.getElementById(n);if(s!=null&&s.contains(t))return}typeof this.opts.outsidePress=="function"&&!this.opts.outsidePress(i)||this.opts.onDismiss("outside-press")},this.frameId=requestAnimationFrame(()=>{this.frameId=null,this.outsideHandler&&document.addEventListener("pointerdown",this.outsideHandler)})))}deactivate(){if(!this.active)return;this.active=!1;let i=Q.indexOf(this);i!==-1&&Q.splice(i,1),this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null),this.outsideHandler&&(document.removeEventListener("pointerdown",this.outsideHandler),this.outsideHandler=null)}isActive(){return this.active}};function me(i){let t=[],e=i;for(;e&&e!==document.body;){let n=e.parentElement;if(!n)break;for(let s=0;s<n.children.length;s++){let o=n.children[s];if(o===e||o.contains(i))continue;let r=o.tagName;if(r==="SCRIPT"||r==="STYLE"||r==="LINK")continue;let a=o.getAttribute("aria-hidden");a!=="true"&&(t.push({el:o,prev:a}),o.setAttribute("aria-hidden","true"))}e=n}return()=>{for(let{el:n,prev:s}of t)s===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",s)}}var Je=class extends z{constructor(){super(...arguments);h(this,"content",null);h(this,"backdrop",null);h(this,"trigger",null);h(this,"native",!1);h(this,"_open",!1);h(this,"openedBy",null);h(this,"focusTrap",null);h(this,"dismiss",null);h(this,"cleanupInert",null);h(this,"onTriggerClick",t=>{t.preventDefault(),this.toggle(t.currentTarget)});h(this,"onHostClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-dialog")===this&&this.close("close-press")});h(this,"onDocumentClick",t=>{var s,o,r;let e=(o=(s=t.target).closest)==null?void 0:o.call(s,"[data-dialog-for]");if(!e||e===this.trigger)return;let n=e.getAttribute("data-dialog-for");n&&(n===this.id||n===((r=this.content)==null?void 0:r.id))&&(t.preventDefault(),this.toggle(e))});h(this,"onCancel",t=>{t.preventDefault(),this.dismissible&&this.close("escape-key")});h(this,"onNativeClick",t=>{if(!this.dismissible||t.target!==this.content||!this.content)return;let e=this.content.getBoundingClientRect();!(t.clientX>=e.left&&t.clientX<=e.right&&t.clientY>=e.top&&t.clientY<=e.bottom)&&(t.clientX!==0||t.clientY!==0)&&this.close("outside-press")});h(this,"onNativeClose",()=>{this._open&&this.finishClose("close-press")})}get open(){return this._open}get dismissible(){return this.getAttribute("dismissible")!=="false"}setup(){if(this.content=$(this,"[data-part=\'content\']"),!this.content)return;this.native=typeof HTMLDialogElement<"u"&&this.content instanceof HTMLDialogElement&&typeof this.content.showModal=="function",this.backdrop=$(this,"[data-part=\'backdrop\']"),this.trigger=bt($(this,"[data-part=\'trigger\']"));let t=this.content;t.id||(t.id=F("db-dialog")),this.native||(t.setAttribute("role",t.getAttribute("role")||"dialog"),t.setAttribute("aria-modal","true"),t.hidden=!this.hasAttribute("open"),this.backdrop&&(this.backdrop.hidden=!0));let e=t.querySelector("[data-part=\'title\']");e&&!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&(e.id||(e.id=F("db-dialog-title")),t.setAttribute("aria-labelledby",e.id));let n=t.querySelector("[data-part=\'description\']");n&&!t.hasAttribute("aria-describedby")&&(n.id||(n.id=F("db-dialog-desc")),t.setAttribute("aria-describedby",n.id));for(let s of this.triggers())this.prepareTrigger(s);this.setState("closed"),this.native||(this.focusTrap=new fe(t),this.dismiss=new lt(t,{onDismiss:s=>this.dismissible&&this.close(s)}))}connect(){var t;this.content&&((t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),this.addEventListener("click",this.onHostClick),document.addEventListener("click",this.onDocumentClick),this.native&&(this.content.addEventListener("cancel",this.onCancel),this.content.addEventListener("click",this.onNativeClick),this.content.addEventListener("close",this.onNativeClose)),queueMicrotask(()=>{if(this.isConnected){for(let e of this.triggers())e.hasAttribute("aria-controls")||this.prepareTrigger(e);this.hasAttribute("open")&&!this._open&&this.show()}}))}disconnect(){var t;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),this.removeEventListener("click",this.onHostClick),document.removeEventListener("click",this.onDocumentClick),this.content&&this.native&&(this.content.removeEventListener("cancel",this.onCancel),this.content.removeEventListener("click",this.onNativeClick),this.content.removeEventListener("close",this.onNativeClose)),this._open&&this.finishClose("api",!1)}triggers(){var n;let t=this.trigger?[this.trigger]:[],e=[this.id,(n=this.content)==null?void 0:n.id].filter(Boolean);for(let s of e)document.querySelectorAll(`[data-dialog-for="${CSS.escape(s)}"]`).forEach(o=>t.push(o));return t}prepareTrigger(t){t.hasAttribute("aria-haspopup")||t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-controls",this.content.id),t.setAttribute("aria-expanded","false")}setState(t){var e,n;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t),(n=this.backdrop)==null||n.setAttribute("data-state",t)}toggle(t){this._open?this.close("trigger-press"):this.show(t)}show(t){var n,s;let e=this.content;if(!(!e||this._open)){this._open=!0,this.openedBy=t??document.activeElement??this.trigger;for(let o of this.triggers())this.prepareTrigger(o),o.setAttribute("aria-expanded","true");if(at.activate(),this.native){let o=e;o.open||o.showModal()}else e.hidden=!1,this.backdrop&&(this.backdrop.hidden=!1),this.cleanupInert=me(e),(n=this.focusTrap)==null||n.activate(),(s=this.dismiss)==null||s.activate();this.setState("open"),this.dispatchEvent(new CustomEvent("db-dialog:open",{bubbles:!0}))}}close(t="api"){this._open&&this.finishClose(t)}finishClose(t,e=!0){var o,r,a;let n=this.content;this._open=!1,this.setState("closed");for(let l of this.triggers())l.setAttribute("aria-expanded","false");if(at.deactivate(),this.native){let l=n;l.open&&l.close()}else(o=this.dismiss)==null||o.deactivate(),(r=this.focusTrap)==null||r.deactivate(),(a=this.cleanupInert)==null||a.call(this),this.cleanupInert=null,Fe(n,()=>{this._open||(n.hidden=!0,this.backdrop&&(this.backdrop.hidden=!0))});let s=this.openedBy;this.openedBy=null,e&&s&&document.contains(s)&&s.focus(),this.dispatchEvent(new CustomEvent("db-dialog:close",{detail:{reason:t},bubbles:!0}))}};N();customElements.get("db-dialog")||customElements.define("db-dialog",Je);var ti=class extends z{constructor(){super(...arguments);h(this,"input",null);h(this,"listbox",null);h(this,"empty",null);h(this,"_open",!1);h(this,"highlighted",null);h(this,"observer",null);h(this,"base",F("db-combobox"));h(this,"optionSeq",0);h(this,"onInput",()=>{this.filtering?this.filter(this.input.value):this.show()});h(this,"onFocus",()=>{(this.hasAttribute("open-on-focus")||this.filtering&&this.input.value)&&(this.filtering?this.filter(this.input.value):this.show())});h(this,"onKey",t=>{let e=this.visible(),n=this.highlighted?e.indexOf(this.highlighted):-1;switch(t.key){case"ArrowDown":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[n<0?0:Math.min(n+1,e.length-1)]);break;case"ArrowUp":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[n<0?e.length-1:Math.max(n-1,0)]);break;case"Home":case"End":this._open&&this.highlighted&&e.length&&(t.preventDefault(),this.highlight(t.key==="Home"?e[0]:e[e.length-1]));break;case"Enter":this._open&&this.highlighted&&(t.preventDefault(),this.choose(this.highlighted));break;case"Escape":this._open&&!this.inline?(t.preventDefault(),t.stopPropagation(),this.hide()):this.input.value&&(t.preventDefault(),t.stopPropagation(),this.input.value="",this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.hide());break;case"Tab":this.inline||this.hide();break}});h(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'option\']");if(!e||e.closest("db-combobox")!==this||W(e))return;let n=t.target.closest("a[href]");!this.choose(e,!n)&&n&&t.preventDefault()});h(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'option\']");e&&e.closest("db-combobox")===this&&!W(e)&&!e.hidden&&this.highlight(e)});h(this,"onListDown",t=>t.preventDefault());h(this,"onDocDown",t=>{this._open&&!this.inline&&!this.contains(t.target)&&this.hide()})}get open(){return this._open}get inline(){return this.hasAttribute("inline")}get filtering(){return(this.getAttribute("filter")??"contains")!=="none"}options(){return this.listbox?Array.from(this.listbox.querySelectorAll("[data-part=\'option\']")).filter(t=>t.closest("db-combobox")===this):[]}visible(){return this.options().filter(t=>!t.hidden&&!W(t))}setup(){if(this.input=$(this,"[data-part=\'input\']"),this.listbox=$(this,"[data-part=\'listbox\']"),this.empty=$(this,"[data-part=\'empty\']"),!this.input||!this.listbox)return;let{input:t,listbox:e}=this;e.id||(e.id=`${this.base}-listbox`),e.setAttribute("role","listbox"),t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-controls",e.id),t.setAttribute("autocomplete","off"),this.inline||(e.hidden=!0),this.prepareOptions(),this.syncExpanded()}prepareOptions(){this.options().forEach(t=>{t.id||(t.id=`${this.base}-option-${++this.optionSeq}`),t.setAttribute("role","option"),t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.matches("a[href], button")&&t.setAttribute("tabindex","-1"),t.querySelectorAll("a, button").forEach(e=>e.setAttribute("tabindex","-1")),t.parentElement&&t.parentElement!==this.listbox&&t.parentElement.localName==="li"&&!t.parentElement.hasAttribute("role")&&t.parentElement.setAttribute("role","none")})}connect(){let{input:t,listbox:e}=this;!t||!e||(t.addEventListener("input",this.onInput),t.addEventListener("focus",this.onFocus),t.addEventListener("keydown",this.onKey),e.addEventListener("click",this.onListClick),e.addEventListener("pointermove",this.onListPointer),e.addEventListener("mousedown",this.onListDown),document.addEventListener("pointerdown",this.onDocDown),typeof MutationObserver<"u"&&(this.observer=new MutationObserver(()=>this.onOptionsChanged()),this.observer.observe(e,{childList:!0,subtree:!0})))}disconnect(){var n;let{input:t,listbox:e}=this;t==null||t.removeEventListener("input",this.onInput),t==null||t.removeEventListener("focus",this.onFocus),t==null||t.removeEventListener("keydown",this.onKey),e==null||e.removeEventListener("click",this.onListClick),e==null||e.removeEventListener("pointermove",this.onListPointer),e==null||e.removeEventListener("mousedown",this.onListDown),document.removeEventListener("pointerdown",this.onDocDown),(n=this.observer)==null||n.disconnect(),this.observer=null}refresh(){this.onOptionsChanged()}onOptionsChanged(){this.prepareOptions(),this.highlighted&&!this.options().includes(this.highlighted)&&this.clearHighlight();let t=this.visible();this.filtering||(t.length||this.inline?this.show():this.hide(),t.length&&!this.highlighted&&!this.hasAttribute("no-autohighlight")&&this.highlight(t[0])),this.syncExpanded(),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count:t.length},bubbles:!0}))}filter(t){let e=t.toLowerCase().trim(),n=0;for(let o of this.options()){let r=!e||(o.textContent??"").toLowerCase().includes(e)||(o.dataset.value??"").toLowerCase().includes(e);o.hidden=!r,r&&n++}this.empty&&(this.empty.hidden=n>0||!e),this.clearHighlight(),n||e&&this.empty?this.show():this.hide();let s=this.visible();s.length&&!this.hasAttribute("no-autohighlight")&&this.highlight(s[0]),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count:n},bubbles:!0}))}syncExpanded(){if(!this.input)return;let t=this.inline?this.visible().length>0:this._open;this.input.setAttribute("aria-expanded",String(t)),this.setAttribute("data-state",t?"open":"closed")}show(){if(!this.listbox||this._open)return this.syncExpanded();this._open=!0,this.listbox.hidden=!1,this.syncExpanded()}hide(){if(this.listbox){if(this.clearHighlight(),!this._open)return this.syncExpanded();this._open=!1,this.inline||(this.listbox.hidden=!0),this.syncExpanded()}}highlight(t){var e,n,s;this.input&&((e=this.highlighted)==null||e.removeAttribute("data-highlighted"),(n=this.highlighted)==null||n.setAttribute("aria-selected","false"),this.highlighted=t,t.setAttribute("data-highlighted",""),t.setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",t.id),(s=t.scrollIntoView)==null||s.call(t,{block:"nearest"}))}clearHighlight(){var t,e,n;(t=this.highlighted)==null||t.removeAttribute("data-highlighted"),(e=this.highlighted)==null||e.setAttribute("aria-selected","false"),this.highlighted=null,(n=this.input)==null||n.removeAttribute("aria-activedescendant")}choose(t,e=!0){var a;let n=t.dataset.value??"",s=((a=t.textContent)==null?void 0:a.trim())??n,o=new CustomEvent("db-combobox:select",{detail:{value:n,text:s,option:t},bubbles:!0,cancelable:!0});if(!this.dispatchEvent(o))return!1;let r=t.matches("a[href]")?t:t.querySelector("a[href]");return r?(e&&r.click(),!0):(this.input&&(this.input.value=t.getAttribute("data-label")??s),this.inline||this.hide(),this.dispatchEvent(new CustomEvent("db-combobox:change",{detail:{value:n,text:s},bubbles:!0})),!0)}};N();customElements.get("db-combobox")||customElements.define("db-combobox",ti);var it=Math.min,j=Math.max,Mt=Math.round,Ht=Math.floor,U=i=>({x:i,y:i}),Un={left:"right",right:"left",bottom:"top",top:"bottom"};function ni(i,t,e){return j(i,it(t,e))}function Et(i,t){return typeof i=="function"?i(t):i}function nt(i){return i.split("-")[0]}function xt(i){return i.split("-")[1]}function pe(i){return i==="x"?"y":"x"}function ge(i){return i==="y"?"height":"width"}function X(i){let t=i[0];return t==="t"||t==="b"?"y":"x"}function be(i){return pe(X(i))}function si(i,t,e){e===void 0&&(e=!1);let n=xt(i),s=be(i),o=ge(s),r=s==="x"?n===(e?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(r=It(r)),[r,It(r)]}function oi(i){let t=It(i);return[Vt(i),t,Vt(t)]}function Vt(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var ei=["left","right"],ii=["right","left"],Xn=["top","bottom"],Gn=["bottom","top"];function Zn(i,t,e){switch(i){case"top":case"bottom":return e?t?ii:ei:t?ei:ii;case"left":case"right":return t?Xn:Gn;default:return[]}}function ri(i,t,e,n){let s=xt(i),o=Zn(nt(i),e==="start",n);return s&&(o=o.map(r=>r+"-"+s),t&&(o=o.concat(o.map(Vt)))),o}function It(i){let t=nt(i);return Un[t]+i.slice(t.length)}function Qn(i){var t,e,n,s;return{top:(t=i.top)!=null?t:0,right:(e=i.right)!=null?e:0,bottom:(n=i.bottom)!=null?n:0,left:(s=i.left)!=null?s:0}}function ai(i){return typeof i!="number"?Qn(i):{top:i,right:i,bottom:i,left:i}}function ct(i){let{x:t,y:e,width:n,height:s}=i;return{width:n,height:s,top:e,left:t,right:t+n,bottom:e+s,x:t,y:e}}function li(i,t,e){let{reference:n,floating:s}=i,o=X(t),r=be(t),a=ge(r),l=nt(t),c=o==="y",d=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2,m;switch(l){case"top":m={x:d,y:n.y-s.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:u};break;case"left":m={x:n.x-s.width,y:u};break;default:m={x:n.x,y:n.y}}let p=xt(t);return p&&(m[r]+=f*(p==="end"?1:-1)*(e&&c?-1:1)),m}async function ci(i,t){var e;t===void 0&&(t={});let{x:n,y:s,platform:o,rects:r,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:m=0}=Et(t,i),p=ai(m),g=a[f?u==="floating"?"reference":"floating":u],y=ct(await o.getClippingRect({element:(e=await(o.isElement==null?void 0:o.isElement(g)))==null||e?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),w=u==="floating"?{x:n,y:s,width:r.floating.width,height:r.floating.height}:r.reference,L=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),R=await(o.isElement==null?void 0:o.isElement(L))&&await(o.getScale==null?void 0:o.getScale(L))||{x:1,y:1},M=ct(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:L,strategy:l}):w);return{top:(y.top-M.top+p.top)/R.y,bottom:(M.bottom-y.bottom+p.bottom)/R.y,left:(y.left-M.left+p.left)/R.x,right:(M.right-y.right+p.right)/R.x}}var Jn=50,di=async(i,t,e)=>{let{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:ci},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:i,floating:t,strategy:s}),{x:d,y:u}=li(c,n,l),f=n,m=0,p={};for(let b=0;b<o.length;b++){let g=o[b];if(!g)continue;let{name:y,fn:w}=g,{x:L,y:R,data:M,reset:H}=await w({x:d,y:u,initialPlacement:n,placement:f,strategy:s,middlewareData:p,rects:c,platform:a,elements:{reference:i,floating:t}});d=L??d,u=R??u,p[y]={...p[y],...M},H&&m<Jn&&(m++,typeof H=="object"&&(H.placement&&(f=H.placement),H.rects&&(c=H.rects===!0?await r.getElementRects({reference:i,floating:t,strategy:s}):H.rects),{x:d,y:u}=li(c,f,l)),b=-1)}return{x:d,y:u,placement:f,strategy:s,middlewareData:p}};var ui=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(t){var e,n;let{placement:s,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:b=!0,...g}=Et(i,t);if((e=o.arrow)!=null&&e.alignmentOffset)return{};let y=nt(s),w=X(a),L=nt(a)===a,R=await(l.isRTL==null?void 0:l.isRTL(c.floating)),M=f||(L||!b?[It(a)]:oi(a)),H=p!=="none";!f&&H&&M.push(...ri(a,b,p,R));let O=[a,...M],v=await l.detectOverflow(t,g),q=[],I=((n=o.flip)==null?void 0:n.overflows)||[];if(d&&q.push(v[y]),u){let C=si(s,r,R);q.push(v[C[0]],v[C[1]])}if(I=[...I,{placement:s,overflows:q}],!q.every(C=>C<=0)){var S,x;let C=(((S=o.flip)==null?void 0:S.index)||0)+1,T=O[C];if(T&&(!(u==="alignment"?w!==X(T):!1)||I.every(D=>X(D.placement)===w?D.overflows[0]>0:!0)))return{data:{index:C,overflows:I},reset:{placement:T}};let A=(x=I.filter(k=>k.overflows[0]<=0).sort((k,D)=>k.overflows[1]-D.overflows[1])[0])==null?void 0:x.placement;if(!A)switch(m){case"bestFit":{var E;let k=(E=I.filter(D=>{if(H){let _=X(D.placement);return _===w||_==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(_=>_>0).reduce((_,P)=>_+P,0)]).sort((D,_)=>D[1]-_[1])[0])==null?void 0:E[0];k&&(A=k);break}case"initialPlacement":A=a;break}if(s!==A)return{reset:{placement:A}}}return{}}}};var ts=new Set(["left","top"]);async function es(i,t){let{placement:e,platform:n,elements:s}=i,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),r=nt(e),a=xt(e),l=X(e)==="y",c=ts.has(r)?-1:1,d=o&&l?-1:1,u=Et(t,i),{mainAxis:f,crossAxis:m,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof p=="number"&&(m=a==="end"?p*-1:p),l?{x:m*d,y:f*c}:{x:f*c,y:m*d}}var hi=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(t){var e,n;let{x:s,y:o,placement:r,middlewareData:a}=t,l=await es(t,i);return r===((e=a.offset)==null?void 0:e.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:r}}}}},fi=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(t){let{x:e,y:n,placement:s,platform:o}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:l={fn:w=>{let{x:L,y:R}=w;return{x:L,y:R}}},...c}=Et(i,t),d={x:e,y:n},u=await o.detectOverflow(t,c),f=X(s),m=pe(f),p=d[m],b=d[f],g=(w,L)=>ni(L+u[w==="y"?"top":"left"],L,L-u[w==="y"?"bottom":"right"]);r&&(p=g(m,p)),a&&(b=g(f,b));let y=l.fn({...t,[m]:p,[f]:b});return{...y,data:{x:y.x-e,y:y.y-n,enabled:{[m]:r,[f]:a}}}}}};var mi=function(i){return i===void 0&&(i={}),{name:"size",options:i,async fn(t){let{placement:e,rects:n,platform:s,elements:o}=t,{apply:r=()=>{},...a}=Et(i,t),l=await s.detectOverflow(t,a),c=nt(e),d=xt(e),u=X(e)==="y",{width:f,height:m}=n.floating,p,b;c==="top"||c==="bottom"?(p=c,b=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(b=c,p=d==="end"?"top":"bottom");let g=m-l.top-l.bottom,y=f-l.left-l.right,w=it(m-l[p],g),L=it(f-l[b],y),R=t.middlewareData.shift,M=!R,H=w,O=L;R!=null&&R.enabled.x&&(O=y),R!=null&&R.enabled.y&&(H=g),M&&!d&&(u?O=f-2*j(l.left,l.right):H=m-2*j(l.top,l.bottom)),await r({...t,availableWidth:O,availableHeight:H});let v=await s.getDimensions(o.floating);return f!==v.width||m!==v.height?{reset:{rects:!0}}:{}}}};function Yt(){return typeof window<"u"}function ut(i){return gi(i)?(i.nodeName||"").toLowerCase():"#document"}function K(i){var t;return(i==null||(t=i.ownerDocument)==null?void 0:t.defaultView)||window}function G(i){var t;return(t=(gi(i)?i.ownerDocument:i.document)||window.document)==null?void 0:t.documentElement}function gi(i){return Yt()?i instanceof Node||i instanceof K(i).Node:!1}function V(i){return Yt()?i instanceof Element||i instanceof K(i).Element:!1}function J(i){return Yt()?i instanceof HTMLElement||i instanceof K(i).HTMLElement:!1}function pi(i){return!Yt()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof K(i).ShadowRoot}function zt(i){let{overflow:t,overflowX:e,overflowY:n,display:s}=Y(i);return/auto|scroll|overlay|hidden|clip/.test(t+n+e)&&s!=="inline"&&s!=="contents"}function bi(i){return/^(table|td|th)$/.test(ut(i))}function Nt(i){try{if(i.matches(":popover-open"))return!0}catch{}try{return i.matches(":modal")}catch{return!1}}var is=/transform|translate|scale|rotate|perspective|filter/,ns=/paint|layout|strict|content/,dt=i=>!!i&&i!=="none",ve;function Ut(i){let t=V(i)?Y(i):i;return dt(t.transform)||dt(t.translate)||dt(t.scale)||dt(t.rotate)||dt(t.perspective)||!Xt()&&(dt(t.backdropFilter)||dt(t.filter))||is.test(t.willChange||"")||ns.test(t.contain||"")}function vi(i){let t=st(i);for(;J(t)&&!St(t);){if(Ut(t))return t;if(Nt(t))return null;t=st(t)}return null}function Xt(){return ve==null&&(ve=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ve}function St(i){return/^(html|body|#document)$/.test(ut(i))}function Y(i){return K(i).getComputedStyle(i)}function _t(i){return V(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.scrollX,scrollTop:i.scrollY}}function st(i){if(ut(i)==="html")return i;let t=i.assignedSlot||i.parentNode||pi(i)&&i.host||G(i);return pi(t)?t.host:t}function yi(i){let t=st(i);return St(t)?(i.ownerDocument||i).body:J(t)&&zt(t)?t:yi(t)}function At(i,t,e){var n;t===void 0&&(t=[]),e===void 0&&(e=!0);let s=yi(i),o=s===((n=i.ownerDocument)==null?void 0:n.body),r=K(s);if(o){let a=Gt(r);return t.concat(r,r.visualViewport||[],zt(s)?s:[],a&&e?At(a):[])}else return t.concat(s,At(s,[],e))}function Gt(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function xi(i){let t=Y(i),e=parseFloat(t.width)||0,n=parseFloat(t.height)||0,s=J(i),o=s?i.offsetWidth:e,r=s?i.offsetHeight:n,a=Mt(e)!==o||Mt(n)!==r;return a&&(e=o,n=r),{width:e,height:n,$:a}}function we(i){return V(i)?i:i.contextElement}function Ct(i){let t=we(i);if(!J(t))return U(1);let e=t.getBoundingClientRect(),{width:n,height:s,$:o}=xi(t),r=(o?Mt(e.width):e.width)/n,a=(o?Mt(e.height):e.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}var ss=U(0);function Ai(i){let t=K(i);return!Xt()||!t.visualViewport?ss:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function os(i,t,e){return t===void 0&&(t=!1),!!e&&t&&e===K(i)}function ht(i,t,e,n){t===void 0&&(t=!1),e===void 0&&(e=!1);let s=i.getBoundingClientRect(),o=we(i),r=U(1);t&&(n?V(n)&&(r=Ct(n)):r=Ct(i));let a=os(o,e,n)?Ai(o):U(0),l=(s.left+a.x)/r.x,c=(s.top+a.y)/r.y,d=s.width/r.x,u=s.height/r.y;if(o&&n){let f=K(o),m=V(n)?K(n):n,p=f,b=Gt(p);for(;b&&m!==p;){let g=Ct(b),y=b.getBoundingClientRect(),w=Y(b),L=y.left+(b.clientLeft+parseFloat(w.paddingLeft))*g.x,R=y.top+(b.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,c*=g.y,d*=g.x,u*=g.y,l+=L,c+=R,p=K(b),b=Gt(p)}}return ct({width:d,height:u,x:l,y:c})}function Zt(i,t){let e=_t(i).scrollLeft;return t?t.left+e:ht(G(i)).left+e}function Si(i,t){let e=i.getBoundingClientRect(),n=e.left+t.scrollLeft-Zt(i,e),s=e.top+t.scrollTop;return{x:n,y:s}}function rs(i){let{elements:t,rect:e,offsetParent:n,strategy:s}=i,o=s==="fixed",r=G(n),a=t?Nt(t.floating):!1;if(n===r||a&&o)return e;let l={scrollLeft:0,scrollTop:0},c=U(1),d=U(0),u=J(n);if((u||!o)&&((ut(n)!=="body"||zt(r))&&(l=_t(n)),u)){let m=ht(n);c=Ct(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}let f=r&&!u&&!o?Si(r,l):U(0);return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:e.y*c.y-l.scrollTop*c.y+d.y+f.y}}function as(i){return i.getClientRects?Array.from(i.getClientRects()):[]}function ls(i){let t=_t(i),e=i.ownerDocument.body,n=j(i.scrollWidth,i.clientWidth,e.scrollWidth,e.clientWidth),s=j(i.scrollHeight,i.clientHeight,e.scrollHeight,e.clientHeight),o=-t.scrollLeft+Zt(i),r=-t.scrollTop;return Y(e).direction==="rtl"&&(o+=j(i.clientWidth,e.clientWidth)-n),{width:n,height:s,x:o,y:r}}var cs=25;function ds(i,t,e){e===void 0&&(e="viewport");let n=e==="layoutViewport",s=K(i),o=G(i),r=s.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,d=0;if(r){let f=!Xt()||t==="fixed";n?f||(c=-r.offsetLeft,d=-r.offsetTop):(a=r.width,l=r.height,f&&(c=r.offsetLeft,d=r.offsetTop))}if(Zt(o)<=0){let f=o.ownerDocument,m=f.body,p=getComputedStyle(m),b=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(o.clientWidth-m.clientWidth-b),y=getComputedStyle(o).scrollbarGutter==="stable both-edges"?g/2:g;y<=cs&&(a-=y)}return{width:a,height:l,x:c,y:d}}function us(i,t){let e=ht(i,!0,t==="fixed"),n=e.top+i.clientTop,s=e.left+i.clientLeft,o=Ct(i),r=i.clientWidth*o.x,a=i.clientHeight*o.y,l=s*o.x,c=n*o.y;return{width:r,height:a,x:l,y:c}}function wi(i,t,e){let n;if(t==="viewport"||t==="layoutViewport")n=ds(i,e,t);else if(t==="document")n=ls(G(i));else if(V(t))n=us(t,e);else{let s=Ai(i);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ct(n)}function hs(i,t){let e=t.get(i);if(e)return e;let n=At(i,[],!1).filter(a=>V(a)&&ut(a)!=="body"),s=null,o=Y(i).position==="fixed",r=o?st(i):i;for(;V(r)&&!St(r);){let a=Y(r),l=Ut(r),c=s?s.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?n=n.filter(u=>u!==r):s=a,r=st(r)}return t.set(i,n),n}function fs(i){let{element:t,boundary:e,rootBoundary:n,strategy:s}=i,r=[...e==="clippingAncestors"?Nt(t)?[]:hs(t,this._c):[].concat(e),n],a=wi(t,r[0],s),l=a.top,c=a.right,d=a.bottom,u=a.left;for(let f=1;f<r.length;f++){let m=wi(t,r[f],s);l=j(m.top,l),c=it(m.right,c),d=it(m.bottom,d),u=j(m.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function ms(i){let{width:t,height:e}=xi(i);return{width:t,height:e}}function ps(i,t,e){let n=J(t),s=G(t),o=e==="fixed",r=ht(i,!0,o,t),a={scrollLeft:0,scrollTop:0},l=U(0);if((n||!o)&&((ut(t)!=="body"||zt(s))&&(a=_t(t)),n)){let f=ht(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}!n&&s&&(l.x=Zt(s));let c=s&&!n&&!o?Si(s,a):U(0),d=r.left+a.scrollLeft-l.x-c.x,u=r.top+a.scrollTop-l.y-c.y;return{x:d,y:u,width:r.width,height:r.height}}function ye(i){return Y(i).position==="static"}function Ei(i,t){if(!J(i)||Y(i).position==="fixed")return null;if(t)return t(i);let e=i.offsetParent;return G(i)===e&&(e=e.ownerDocument.body),e}function Ci(i,t){let e=K(i);if(Nt(i))return e;if(!J(i)){let s=st(i);for(;s&&!St(s);){if(V(s)&&!ye(s))return s;s=st(s)}return e}let n=Ei(i,t);for(;n&&bi(n)&&ye(n);)n=Ei(n,t);return n&&St(n)&&ye(n)&&!Ut(n)?e:n||vi(i)||e}var gs=async function(i){let t=this.getOffsetParent||Ci,e=this.getDimensions,n=await e(i.floating);return{reference:ps(i.reference,await t(i.floating),i.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function bs(i){return Y(i).direction==="rtl"}var vs={convertOffsetParentRelativeRectToViewportRelativeRect:rs,getDocumentElement:G,getClippingRect:fs,getOffsetParent:Ci,getElementRects:gs,getClientRects:as,getDimensions:ms,getScale:Ct,isElement:V,isRTL:bs};function Li(i,t){return i.x===t.x&&i.y===t.y&&i.width===t.width&&i.height===t.height}function ys(i,t,e){let n=null,s,o=G(i);function r(){var d;clearTimeout(s),(d=n)==null||d.disconnect(),n=null}function a(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let f=i.getBoundingClientRect(),{left:m,top:p,width:b,height:g}=f;if(d||t(),!b||!g)return;let y=Ht(p),w=Ht(o.clientWidth-(m+b)),L=Ht(o.clientHeight-(p+g)),R=Ht(m),H={rootMargin:-y+"px "+-w+"px "+-L+"px "+-R+"px",threshold:j(0,it(1,u))||1},O=!0;function v(q){let I=q[0].intersectionRatio;if(!Li(f,i.getBoundingClientRect()))return a();if(I!==u){if(!O)return a();I?a(!1,I):s=setTimeout(()=>{a(!1,1e-7)},1e3)}O=!1}try{n=new IntersectionObserver(v,{...H,root:o.ownerDocument})}catch{n=new IntersectionObserver(v,H)}n.observe(i)}let l=K(i),c=()=>a(e);return l.addEventListener("resize",c),a(!0),()=>{l.removeEventListener("resize",c),r()}}function ki(i,t,e,n){n===void 0&&(n={});let{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=we(i),d=s||o?[...c?At(c):[],...t?At(t):[]]:[];d.forEach(y=>{s&&y.addEventListener("scroll",e),o&&y.addEventListener("resize",e)});let u=c&&a?ys(c,e,o):null,f=-1,m=null;r&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var L;(L=m)==null||L.observe(t)})),e()}),c&&!l&&m.observe(c),t&&m.observe(t));let p,b=l?ht(i):null;l&&g();function g(){let y=ht(i);b&&!Li(b,y)&&e(),b=y,p=requestAnimationFrame(g)}return e(),()=>{var y;d.forEach(w=>{s&&w.removeEventListener("scroll",e),o&&w.removeEventListener("resize",e)}),u==null||u(),(y=m)==null||y.disconnect(),m=null,l&&cancelAnimationFrame(p)}}var Ti=hi;var Oi=fi,Di=ui,Ri=mi;var Ii=(i,t,e)=>{let n=new Map,s=e??{},o={...vs,...s.platform,_c:n};return di(i,t,{...s,platform:o})};function ft(i,t,e={}){let{placement:n="bottom-start",strategy:s="absolute",offset:o=4,flip:r=!0,shift:a=!0,padding:l=8,matchWidth:c=!1}=e,d=[Ti(o),...r?[Di({padding:l})]:[],...a?[Oi({padding:l})]:[],...c?[Ri({apply({rects:f}){Object.assign(t.style,{width:`${f.reference.width}px`})}})]:[]];return t.style.position=s,ki(i,t,async()=>{let f=await Ii(i,t,{placement:n,strategy:s,middleware:d});Object.assign(t.style,{left:`${f.x}px`,top:`${f.y}px`});let m=f.placement.split("-")[0];t.setAttribute("data-side",m)})}var Ee=class{constructor(i){h(this,"opts");h(this,"buffer","");h(this,"timerId",null);h(this,"timeout");this.opts=i,this.timeout=i.timeout??1e3}handle(i){if(i.length!==1)return!1;this.timerId!==null&&clearTimeout(this.timerId),this.buffer+=i.toLowerCase(),this.timerId=setTimeout(()=>{this.buffer="",this.timerId=null},this.timeout);let t=this.opts.getItemCount();for(let e=0;e<t;e++)if(this.opts.getItemText(e).toLowerCase().startsWith(this.buffer))return this.opts.onMatch(e),!0;return!0}reset(){this.buffer="",this.timerId!==null&&(clearTimeout(this.timerId),this.timerId=null)}};var Mi=class extends z{constructor(){super(...arguments);h(this,"trigger",null);h(this,"content",null);h(this,"valueEl",null);h(this,"items",[]);h(this,"nativeSelect",null);h(this,"hiddenInput",null);h(this,"labelEl",null);h(this,"onLabelClick",t=>{var e;t.target.closest("[data-part=\'trigger\']")||(t.preventDefault(),(e=this.trigger)==null||e.focus())});h(this,"dismiss",null);h(this,"typeahead",null);h(this,"cleanupFloating",null);h(this,"_open",!1);h(this,"_value","");h(this,"highlighted",-1);h(this,"syncing",!1);h(this,"onNativeChange",()=>{this.syncing||this.refresh()});h(this,"onFormReset",()=>setTimeout(()=>this.refresh()));h(this,"onTriggerClick",()=>{this.isDisabled||(this._open?this.close():this.show())});h(this,"onTriggerKeyUp",t=>{t.key===" "&&t.preventDefault()});h(this,"onTriggerKey",t=>{var o,r;if(this.isDisabled)return;let e=this.enabled();if(!this._open){if(t.key==="ArrowDown"||t.key==="ArrowUp"||t.key==="Enter"||t.key===" "||t.altKey&&t.key==="ArrowDown")t.preventDefault(),this.show(),t.key==="ArrowUp"&&e.length&&this.highlight(this.items.indexOf(e[e.length-1]));else if(t.key==="Home"||t.key==="End"){t.preventDefault(),this.show();let a=t.key==="Home"?e[0]:e[e.length-1];a&&this.highlight(this.items.indexOf(a))}else t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&((o=this.typeahead)==null||o.handle(t.key));return}if(!e.length)return;let n=this.highlighted>=0?e.indexOf(this.items[this.highlighted]):-1,s=a=>{t.preventDefault(),this.highlight(this.items.indexOf(e[a]))};switch(t.key){case"ArrowDown":return s(Math.min(n+1,e.length-1));case"ArrowUp":return t.altKey?(t.preventDefault(),this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close()):s(Math.max(n-1,0));case"Home":return s(0);case"End":return s(e.length-1);case"PageDown":return s(Math.min(n+10,e.length-1));case"PageUp":return s(Math.max(n-10,0));case"Enter":case" ":return t.preventDefault(),this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close();case"Tab":return this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close(!1);default:t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&((r=this.typeahead)==null||r.handle(t.key))}});h(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'item\']");!e||!this.items.includes(e)||W(e)||(this.select(e),this.close())});h(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'item\']");e&&this.items.includes(e)&&!W(e)&&this.highlight(this.items.indexOf(e))});h(this,"preventBlur",t=>t.preventDefault())}get open(){return this._open}get value(){return this._value}set value(t){let e=this.items.find(n=>n.dataset.value===t);e&&this.select(e,!1)}get isDisabled(){var t;return this.hasAttribute("disabled")||!!((t=this.nativeSelect)!=null&&t.disabled)}refresh(){var n;let t=this.nativeSelect;if(!t)return;let e=this.items.find(s=>s.dataset.value===t.value);e&&this.select(e,!1),(n=this.trigger)==null||n.setAttribute("aria-disabled",String(this.isDisabled))}enabled(){return this.items.filter(t=>!W(t))}setup(){var a,l;if(this.nativeSelect=$(this,"select"),this.nativeSelect&&!$(this,"[data-part=\'trigger\']")&&this.buildFromNative(this.nativeSelect),this.trigger=$(this,"[data-part=\'trigger\']"),this.content=$(this,"[data-part=\'content\']"),this.valueEl=$(this,"[data-part=\'value\']"),!this.trigger||!this.content)return;let{trigger:t,content:e}=this;this.items=et(this,"[data-part=\'item\']");let n=F("db-select");e.id||(e.id=`${n}-listbox`),e.setAttribute("role","listbox"),e.hidden=!0,t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",e.id),t instanceof HTMLButtonElement&&!t.hasAttribute("type")&&(t.type="button"),this.isDisabled&&t.setAttribute("aria-disabled","true"),this.items.forEach((c,d)=>{c.id||(c.id=`${n}-item-${d}`),c.setAttribute("role","option"),c.setAttribute("aria-selected","false")}),et(this,"[data-part=\'group\']").forEach(c=>{c.setAttribute("role","group");let d=c.querySelector("[data-part=\'label\']");d&&(d.id||(d.id=F("db-select-label")),c.setAttribute("aria-labelledby",d.id))});let s=this.getAttribute("name");s&&!this.nativeSelect&&(this.hiddenInput=document.createElement("input"),this.hiddenInput.type="hidden",this.hiddenInput.name=s,this.hasAttribute("required")&&(this.hiddenInput.required=!0),this.appendChild(this.hiddenInput)),this.typeahead=new Ee({getItemCount:()=>this.enabled().length,getItemText:c=>{var d,u;return((u=(d=this.enabled()[c])==null?void 0:d.textContent)==null?void 0:u.trim())??""},onMatch:c=>{let d=this.enabled()[c];d&&(this._open?this.highlight(this.items.indexOf(d)):this.select(d))}}),this.dismiss=new lt(e,{onDismiss:c=>this.close(c!=="outside-press")});let o=((a=this.nativeSelect)==null?void 0:a.value)??this.getAttribute("default-value")??"",r=this.items.find(c=>c.dataset.value===o);r&&W(r)?this.valueEl&&(this.valueEl.textContent=((l=r.textContent)==null?void 0:l.trim())??"",this.valueEl.setAttribute("data-placeholder","")):r&&this.select(r,!1),this.setState("closed")}buildFromNative(t){let e=document.createElement("button");e.type="button",e.setAttribute("data-part","trigger"),e.className="db-select-trigger";let n=t.getAttribute("aria-label"),s=t.getAttribute("aria-labelledby"),o=!s&&t.id?document.querySelector(`label[for="${CSS.escape(t.id)}"]`):null;o&&(s=o.id||(o.id=F("db-select-for"))),n&&e.setAttribute("aria-label",n),s&&e.setAttribute("aria-labelledby",s);let r=t.closest("label");if(r){if(this.labelEl=r,!n&&!s){let u=Array.from(r.childNodes).filter(f=>!(f instanceof Element&&(f===t||f.contains(t)||f.localName==="db-select"))).map(f=>f.textContent??"").join(" ").replace(/\\s+/g," ").trim();u&&e.setAttribute("aria-label",u)}}else o&&(this.labelEl=o);let a=document.createElement("span");a.setAttribute("data-part","value"),a.className="db-select-value";let l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("viewBox","0 0 24 24"),l.setAttribute("aria-hidden","true"),l.setAttribute("class","db-select-chevron"),l.innerHTML=\'<path d="m6 9 6 6 6-6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\',e.append(a,l);let c=document.createElement("div");c.setAttribute("data-part","content"),c.className="db-select-content";let d=(u,f)=>{let m=document.createElement("div");m.setAttribute("data-part","item"),m.className="db-select-item",m.dataset.value=u.value;for(let[p,b]of Object.entries(u.dataset))b!=null&&(m.dataset[p]=b);u.disabled&&m.setAttribute("aria-disabled","true"),m.textContent=u.textContent??u.value,f.appendChild(m)};for(let u of Array.from(t.children))if(u instanceof HTMLOptGroupElement){let f=document.createElement("div");f.setAttribute("data-part","group");let m=document.createElement("div");m.setAttribute("data-part","label"),m.className="db-select-label",m.textContent=u.label,f.appendChild(m);for(let p of Array.from(u.children))p instanceof HTMLOptionElement&&d(p,f);c.appendChild(f)}else u instanceof HTMLOptionElement&&d(u,c);t.hidden=!0,t.tabIndex=-1,t.setAttribute("aria-hidden","true"),this.append(e,c)}connect(){var t,e,n,s,o,r,a,l,c,d;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.addEventListener("keydown",this.onTriggerKey),(n=this.trigger)==null||n.addEventListener("keyup",this.onTriggerKeyUp),(s=this.nativeSelect)==null||s.addEventListener("change",this.onNativeChange),(r=(o=this.nativeSelect)==null?void 0:o.form)==null||r.addEventListener("reset",this.onFormReset),(a=this.labelEl)==null||a.addEventListener("click",this.onLabelClick),(l=this.content)==null||l.addEventListener("click",this.onListClick),(c=this.content)==null||c.addEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.addEventListener("mousedown",this.preventBlur)}disconnect(){var t,e,n,s,o,r,a,l,c,d;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.removeEventListener("keydown",this.onTriggerKey),(n=this.trigger)==null||n.removeEventListener("keyup",this.onTriggerKeyUp),(s=this.nativeSelect)==null||s.removeEventListener("change",this.onNativeChange),(r=(o=this.nativeSelect)==null?void 0:o.form)==null||r.removeEventListener("reset",this.onFormReset),(a=this.labelEl)==null||a.removeEventListener("click",this.onLabelClick),(l=this.content)==null||l.removeEventListener("click",this.onListClick),(c=this.content)==null||c.removeEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.removeEventListener("mousedown",this.preventBlur),this._open&&this.close(!1)}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}show(){var r,a;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let n=vt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=ft(t,e,{placement:"bottom-start",offset:4,matchWidth:!this.hasAttribute("auto-width"),strategy:n==="top-layer"?"fixed":"absolute"});let o=this.items.find(l=>l.dataset.value===this._value&&!W(l))??this.enabled()[0];o&&this.highlight(this.items.indexOf(o)),(r=this.dismiss)==null||r.activate(),(a=this.typeahead)==null||a.reset(),t.focus()}close(t=!0){var s,o,r;let{trigger:e,content:n}=this;!e||!n||!this._open||(this._open=!1,(s=this.dismiss)==null||s.deactivate(),(o=this.cleanupFloating)==null||o.call(this),this.cleanupFloating=null,yt(n),this.setState("closed"),e.setAttribute("aria-expanded","false"),e.removeAttribute("aria-activedescendant"),this.items.forEach(a=>a.removeAttribute("data-highlighted")),this.highlighted=-1,(r=this.typeahead)==null||r.reset(),t&&e.focus())}highlight(t){var r;let e=this.items[t],n=this.content;if(!e||!n||!this.trigger)return;this.highlighted>=0&&((r=this.items[this.highlighted])==null||r.removeAttribute("data-highlighted")),this.highlighted=t,e.setAttribute("data-highlighted",""),this.trigger.setAttribute("aria-activedescendant",e.id);let s=e.offsetTop,o=s+e.offsetHeight;s<n.scrollTop?n.scrollTop=s:o>n.scrollTop+n.clientHeight&&(n.scrollTop=o-n.clientHeight)}select(t,e=!0){var o;if(W(t))return;let n=t.dataset.value??"",s=n!==this._value;this._value=n;for(let r of this.items){let a=r===t;r.setAttribute("aria-selected",String(a)),a?r.setAttribute("data-state","checked"):r.removeAttribute("data-state")}if(this.valueEl&&(this.valueEl.textContent=((o=t.textContent)==null?void 0:o.trim())??"",this.valueEl.removeAttribute("data-placeholder")),this.hiddenInput&&(this.hiddenInput.value=n),!e||!s){this.nativeSelect&&(this.nativeSelect.value=n);return}if(this.nativeSelect){this.nativeSelect.value=n,this.syncing=!0;try{this.nativeSelect.dispatchEvent(new Event("input",{bubbles:!0})),this.nativeSelect.dispatchEvent(new Event("change",{bubbles:!0}))}finally{this.syncing=!1}}this.dispatchEvent(new CustomEvent("db-select:change",{detail:{value:n},bubbles:!0}))}};N();customElements.get("db-select")||customElements.define("db-select",Mi);var Hi=class extends z{constructor(){super(...arguments);h(this,"trigger",null);h(this,"content",null);h(this,"dismiss",null);h(this,"cleanupFloating",null);h(this,"_open",!1);h(this,"onTriggerClick",()=>this.toggle());h(this,"onContentClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-popover")===this&&this.close("close-press")})}get open(){return this._open}setup(){var e;if(this.trigger=bt($(this,"[data-part=\'trigger\']")),this.content=$(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;let t=this.content;t.id||(t.id=F("db-popover")),t.hasAttribute("role")||t.setAttribute("role","dialog"),!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&((e=this.trigger).id||(e.id=F("db-popover-trigger")),t.setAttribute("aria-labelledby",this.trigger.id)),t.hidden=!0,this.trigger.setAttribute("aria-haspopup","dialog"),this.trigger.setAttribute("aria-controls",t.id),this.trigger.setAttribute("aria-expanded","false"),this.setState("closed"),this.dismiss=new lt(t,{onDismiss:n=>this.close(n)})}connect(){var t,e;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.content)==null||e.addEventListener("click",this.onContentClick)}disconnect(){var t,e;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.content)==null||e.removeEventListener("click",this.onContentClick),this._open&&this.close("api")}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}placement(){var s,o;let t=this.getAttribute("placement");if(t)return t;let e=((s=this.content)==null?void 0:s.dataset.side)||"bottom",n=((o=this.content)==null?void 0:o.dataset.align)||"center";return`${e}${n!=="center"?`-${n}`:""}`}toggle(){this._open?this.close("trigger-press"):this.show()}show(){var s;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let n=vt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=ft(t,e,{placement:this.placement(),offset:Number(this.getAttribute("offset")??8),strategy:n==="top-layer"?"fixed":"absolute"}),(s=this.dismiss)==null||s.activate(),this.hasAttribute("no-autofocus")||requestAnimationFrame(()=>{this._open&&(Pe(e)[0]??e).focus({preventScroll:!0})}),this.dispatchEvent(new CustomEvent("db-popover:open",{bubbles:!0}))}close(t="api"){var o,r;let{trigger:e,content:n}=this;if(!e||!n||!this._open)return;this._open=!1,(o=this.dismiss)==null||o.deactivate(),(r=this.cleanupFloating)==null||r.call(this),this.cleanupFloating=null;let s=n.contains(document.activeElement);yt(n),this.setState("closed"),e.setAttribute("aria-expanded","false"),t!=="outside-press"&&(s||t==="escape-key"||t==="close-press")&&e.focus(),this.dispatchEvent(new CustomEvent("db-popover:close",{detail:{reason:t},bubbles:!0}))}};N();customElements.get("db-popover")||customElements.define("db-popover",Hi);var zi=class extends z{constructor(){super(...arguments);h(this,"trigger",null);h(this,"content",null);h(this,"cleanupFloating",null);h(this,"showTimer",null);h(this,"hideTimer",null);h(this,"_open",!1);h(this,"onEnter",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this._open||(this.showTimer=setTimeout(()=>this.show(),this.num("delay",200))))});h(this,"onLeave",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this.hideTimer=setTimeout(()=>this.hide(),this.num("close-delay",100)))});h(this,"onContentEnter",()=>this.clearTimers());h(this,"onFocus",()=>{let t=!0;try{t=this.trigger.matches(":focus-visible")}catch{}t&&(this.clearTimers(),this.show())});h(this,"onBlur",()=>this.hide());h(this,"onPress",()=>this.hide());h(this,"onKey",t=>{t.key==="Escape"&&this._open&&(t.preventDefault(),t.stopImmediatePropagation(),this.hide())})}get open(){return this._open}num(t,e){let n=Number(this.getAttribute(t));return Number.isFinite(n)&&this.hasAttribute(t)?n:e}setup(){var e;if(this.trigger=bt($(this,"[data-part=\'trigger\']")),this.content=$(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;(e=this.content).id||(e.id=F("db-tooltip")),this.content.setAttribute("role","tooltip"),this.content.hidden=!0;let t=(this.trigger.getAttribute("aria-describedby")??"").split(/\\s+/).filter(Boolean);t.includes(this.content.id)||this.trigger.setAttribute("aria-describedby",[...t,this.content.id].join(" ")),this.setState("closed")}connect(){let{trigger:t,content:e}=this;!t||!e||(t.addEventListener("pointerenter",this.onEnter),t.addEventListener("pointerleave",this.onLeave),t.addEventListener("focus",this.onFocus),t.addEventListener("blur",this.onBlur),t.addEventListener("pointerdown",this.onPress),e.addEventListener("pointerenter",this.onContentEnter),e.addEventListener("pointerleave",this.onLeave))}disconnect(){let{trigger:t,content:e}=this;t==null||t.removeEventListener("pointerenter",this.onEnter),t==null||t.removeEventListener("pointerleave",this.onLeave),t==null||t.removeEventListener("focus",this.onFocus),t==null||t.removeEventListener("blur",this.onBlur),t==null||t.removeEventListener("pointerdown",this.onPress),e==null||e.removeEventListener("pointerenter",this.onContentEnter),e==null||e.removeEventListener("pointerleave",this.onLeave),this.hide()}clearTimers(){this.showTimer&&clearTimeout(this.showTimer),this.hideTimer&&clearTimeout(this.hideTimer),this.showTimer=this.hideTimer=null}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}show(){let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0,this.clearTimers();let n=vt(e);this.setState("open"),this.cleanupFloating=ft(t,e,{placement:this.getAttribute("placement")||e.dataset.side||"top",offset:8,strategy:n==="top-layer"?"fixed":"absolute"}),document.addEventListener("keydown",this.onKey,!0),this.dispatchEvent(new CustomEvent("db-tooltip:open",{bubbles:!0}))}hide(){var t;this.clearTimers(),!(!this._open||!this.content)&&(this._open=!1,document.removeEventListener("keydown",this.onKey,!0),(t=this.cleanupFloating)==null||t.call(this),this.cleanupFloating=null,yt(this.content),this.setState("closed"),this.dispatchEvent(new CustomEvent("db-tooltip:close",{bubbles:!0})))}};N();customElements.get("db-tooltip")||customElements.define("db-tooltip",zi);var Ni="sidebar_state",ws="b",Es=768,Pt=new WeakMap;function xs(i){try{return localStorage.getItem(i)}catch{return null}}function As(i,t){try{localStorage.setItem(i,t)}catch{}}function Se(i){if(Pt.has(i))return;let t=i.querySelector("[data-component=\'sidebar\']");if(!t)return;let e=t.dataset.collapsible||"offcanvas",n=t.dataset.side||"left",s=t.dataset.defaultOpen!=="false",o=xs(Ni),r=o!==null?o==="true":s,a=t.querySelector("[data-sidebar-desktop]"),l=t.querySelector("[data-sidebar-mobile]"),c=t.querySelector("[data-sidebar-mobile-backdrop]"),d=window.matchMedia(`(max-width: ${Es-1}px)`),u={provider:i,sidebar:t,desktopSidebar:a,mobileSidebar:l,mobileBackdrop:c,collapsible:e,side:n,open:r,openMobile:!1,isMobile:d.matches,mediaQuery:d};Pt.set(i,u),_i(u);let f=b=>{u.isMobile=b.matches,!b.matches&&u.openMobile&&ot(i)};d.addEventListener("change",f);let m=b=>{b.key===ws&&(b.metaKey||b.ctrlKey)?(b.preventDefault(),xe(i)):b.key==="Escape"&&u.openMobile&&(b.preventDefault(),ot(i))};document.addEventListener("keydown",m),Ss(i,u),c&&c.addEventListener("click",()=>{ot(i)});let p=t.querySelector("[data-part=\'rail\']");p&&p.addEventListener("click",()=>{xe(i)})}function Ss(i,t){i.querySelectorAll("[data-part=\'sidebar-trigger\']").forEach(e=>{e.addEventListener("click",()=>{xe(i)})})}function xe(i){let t=Pt.get(i);t&&(t.isMobile?t.openMobile?ot(i):Cs(i):(t.open=!t.open,_i(t),As(Ni,String(t.open))))}function _i(i){let t=i.open?"expanded":"collapsed";i.provider.setAttribute("data-state",t),i.sidebar.setAttribute("data-state",t),i.desktopSidebar&&(i.desktopSidebar.setAttribute("data-state",t),i.open?i.desktopSidebar.setAttribute("data-collapsible",""):i.desktopSidebar.setAttribute("data-collapsible",i.collapsible))}function Cs(i){var n;let t=Pt.get(i);if(!t||t.openMobile||!t.mobileSidebar)return;t.openMobile=!0;let e=(n=t.desktopSidebar)==null?void 0:n.querySelector("[data-sidebar=\'sidebar-inner\']");if(e)for(;e.firstChild;)t.mobileSidebar.appendChild(e.firstChild);t.mobileSidebar.hidden=!1,t.mobileSidebar.setAttribute("data-state","open"),t.mobileBackdrop&&(t.mobileBackdrop.hidden=!1),at.activate(),requestAnimationFrame(()=>{var o;let s=(o=t.mobileSidebar)==null?void 0:o.querySelector(\'a, button, [tabindex]:not([tabindex="-1"])\');s==null||s.focus()})}function ot(i){var s;let t=Pt.get(i);if(!t||!t.openMobile||!t.mobileSidebar)return;t.openMobile=!1;let e=(s=t.desktopSidebar)==null?void 0:s.querySelector("[data-sidebar=\'sidebar-inner\']");if(e&&t.mobileSidebar)for(;t.mobileSidebar.firstChild;)e.appendChild(t.mobileSidebar.firstChild);t.mobileSidebar.setAttribute("data-state","closed"),t.mobileSidebar.hidden=!0,t.mobileBackdrop&&(t.mobileBackdrop.hidden=!0),at.deactivate();let n=t.provider.querySelector("[data-part=\'sidebar-trigger\']");n==null||n.focus()}function Ae(){document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(i=>{Se(i)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Ae):Ae();document.addEventListener("astro:page-load",Ae);var Qt={docs:"docs.js",shard:i=>`t-${i}.js`,fragment:i=>`f-${i}.js`},Jt={docs:"docs",shard:i=>i,fragment:i=>`frag:${i}`};var Ls={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},ks={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},Ts="[^aeiou]",Le="[aeiouy]",rt="("+Ts+"[^aeiouy]*)",ee="("+Le+"[aeiou]*)",Ce=new RegExp("^"+rt+"?"+ee+rt),Os=new RegExp("^"+rt+"?"+ee+rt+ee+"?$"),te=new RegExp("^"+rt+"?("+ee+rt+"){2,}"),Pi=new RegExp("^"+rt+"?"+Le),Fi=new RegExp("^"+rt+Le+"[^aeiouwxy]$"),Ds=/ll$/,Rs=/^(.+?)e$/,Is=/^(.+?)y$/,Ms=/^(.+?(s|t))(ion)$/,Hs=/^(.+?)(ed|ing)$/,zs=/(at|bl|iz)$/,Ns=/^(.+?)eed$/,_s=/^.+?[^s]s$/,Ps=/^.+?(ss|i)es$/,Fs=/([^aeiouylsz])\\1$/,$s=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,Bs=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,qs=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;function $i(i){let t=String(i).toLowerCase();if(t.length<3)return t;let e=!1;t.codePointAt(0)===121&&(e=!0,t="Y"+t.slice(1)),Ps.test(t)?t=t.slice(0,-2):_s.test(t)&&(t=t.slice(0,-1));let n;return(n=Ns.exec(t))?Ce.test(n[1])&&(t=t.slice(0,-1)):(n=Hs.exec(t))&&Pi.test(n[1])&&(t=n[1],zs.test(t)?t+="e":Fs.test(t)?t=t.slice(0,-1):Fi.test(t)&&(t+="e")),(n=Is.exec(t))&&Pi.test(n[1])&&(t=n[1]+"i"),(n=$s.exec(t))&&Ce.test(n[1])&&(t=n[1]+Ls[n[2]]),(n=Bs.exec(t))&&Ce.test(n[1])&&(t=n[1]+ks[n[2]]),(n=qs.exec(t))?te.test(n[1])&&(t=n[1]):(n=Ms.exec(t))&&te.test(n[1])&&(t=n[1]),(n=Rs.exec(t))&&(te.test(n[1])||Os.test(n[1])&&!Fi.test(n[1]))&&(t=n[1]),Ds.test(t)&&te.test(t)&&(t=t.slice(0,-1)),e&&(t="y"+t.slice(1)),t}var Bi=new Set("a an and are as at be by for from has have in is it its of on or that the this to was were will with you your can not".split(" ")),Ks=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u,Ft;function Ws(i){if(Ft===void 0)try{Ft=typeof Intl<"u"&&"Segmenter"in Intl?new Intl.Segmenter(void 0,{granularity:"word"}):null}catch{Ft=null}if(Ft)return[...Ft.segment(i)].filter(n=>n.isWordLike).map(n=>n.segment);let t=[...i];if(t.length<2)return t;let e=[];for(let n=0;n<t.length-1;n++)e.push(t[n]+t[n+1]);return e}function mt(i){let t=[];for(let e of i.toLowerCase().normalize("NFKD").replace(/[\u0300-\u036F]/g,"").normalize("NFC").matchAll(/[\\p{L}\\p{N}][\\p{L}\\p{N}_.-]*[\\p{L}\\p{N}]|[\\p{L}\\p{N}]/gu)){let n=e[0],s=n.split(/[._-]+/).filter(Boolean);if(s.length>1&&t.push(n),s.length>1&&!/[._]/.test(n)){let o=s.join("");o.length>=3&&!Bi.has(o)&&t.push(o)}for(let o of s)Ks.test(o)?t.push(...Ws(o)):o.length>=2&&!Bi.has(o)&&t.push(o)}return t}function ke(i,t){let e="";for(let n of i.slice(0,t))e+=/[a-z0-9]/.test(n)?n:`_${n.codePointAt(0).toString(16)}_`;return e}function $t(i){if(!(!i||!/^en(-|$)/i.test(i)))return t=>/^[a-z]{3,}$/.test(t)?$i(t):t}function Lt(i){let t=[],e=[],n=[],s=!1,o={tag:[],section:[]},r={tag:[],section:[]},a=[...i.matchAll(new RegExp(\'(?<!\\\\S)(-?)(tag|section):(?:"([^"]*)"?|(\\\\S*))|(-?)"([^"]*)"?|(\\\\S+)\',"gi"))].map(u=>{var f;return{facetNeg:u[1]==="-",facet:(f=u[2])==null?void 0:f.toLowerCase(),value:u[3]??u[4],neg:u[5],phrase:u[6],word:u[7]}}),l=!1,c=!1;for(let[u,f]of a.entries()){if(f.facet){let H=Yi(f.value??"");H&&(f.facetNeg?r:o)[f.facet].push(H);continue}let m=f.word;if(m==="OR"){c=t.length>0,s=!0;continue}if(m==="NOT"){l=!0,s=!0;continue}if(m==="AND"){s=!0;continue}let p=f.phrase!==void 0,b=l||f.neg==="-"||(m==null?void 0:m.startsWith("-"))&&m.length>1;l=!1;let g=p?f.phrase:b&&(m!=null&&m.startsWith("-"))?m.slice(1):m,y=[...new Set(mt(g))];if(!y.length){c=!1;continue}if(b){e.push(p?y:[y[0]]),s=!0,c=!1;continue}if(p){c=!1,s=!0,y.length>1&&n.push(mt(g).join(" "));for(let H of y)t.push({terms:[H],prefix:!1,exact:!0});continue}let w=u===a.length-1&&!/\\s$/.test(i);if(c){t[t.length-1].terms.push(y[0]);for(let H of y.slice(1))t.push({terms:[H],prefix:!1});c=!1;continue}let L=y[0],R=/[._-]/.test(L),M=L.replace(/-/g,"");for(let[H,O]of y.entries())t.push({terms:[O],prefix:w&&O.length>=2&&(H===y.length-1||R&&(O===L||O===M))})}let d=[...new Set(t.flatMap(u=>u.terms))];return{groups:t,not:e,phrases:n,strict:s,highlight:d,filters:o,notFilters:r}}async function js(i,t){let e=await t.meta(),n=typeof i=="string"?Lt(i):i,s=new Set;for(let c of n.not){let d;for(let u of c){let[f]=Vi(u,e),m=f?await t.shard(f):void 0,p=m&&Object.hasOwn(m,u)?m[u]:[],b=new Set;for(let g=0;g<p.length;g+=2)(!d||d.has(p[g]))&&b.add(p[g]);d=b}for(let u of d??[])s.add(u)}let o=Us(n,e);if(!n.groups.length){if(!o)return[];let c=[];return e.docs.forEach(([d,u,f],m)=>o(m)&&!s.has(m)&&c.push({id:m,title:d,url:u,section:e.sections[f]??"",score:1})),c}let r=[];for(let c of n.groups)r.push(await Xs(c,e,t));let a=c=>{let d=new Map,u=new Map;for(let m of r)for(let[p,b]of m)d.set(p,(d.get(p)??0)+b),u.set(p,(u.get(p)??0)+1);let f=[];for(let[m,p]of d){if(s.has(m)||o&&!o(m)||c==="and"&&u.get(m)!==r.length)continue;let[b,g,y]=e.docs[m];f.push({id:m,title:b,url:g,section:e.sections[y]??"",score:p*(u.get(m)/r.length)})}return f.sort((m,p)=>p.score-m.score)},l=a("and");return l.length||n.strict?l:a("or")}var Z={prefix:.6,stem:.4,titleAll:1.5,titleExact:2,headingAll:1.4,headingExact:1.8,phrase:1.5,typo:.3};function Vs(i,t){if(i===t)return!1;if(i.length===t.length){let o=[];for(let r=0;r<i.length&&o.length<=2;r++)i[r]!==t[r]&&o.push(r);return o.length===1?!0:o.length===2&&o[1]===o[0]+1&&i[o[0]]===t[o[1]]&&i[o[1]]===t[o[0]]}let[e,n]=i.length<t.length?[i,t]:[t,i];if(n.length-e.length!==1)return!1;let s=0;for(;s<e.length&&e[s]===n[s];)s++;return e.slice(s)===n.slice(s+1)}function Vi(i,t,e=!1){let n=Ys(t);for(let o=Math.min(i.length,Ki);o>=1;o--){let r=ke(i,o);if(n.has(r))return!e||o<i.length?[r]:[r,...t.shards.filter(a=>a.length>r.length&&a.startsWith(r)).slice(0,10)]}let s=ke(i,Math.min(i.length,Ki));return e?t.shards.filter(o=>o.startsWith(s)).slice(0,10):[]}var Ki=3,Wi=new WeakMap;function Ys(i){let t=Wi.get(i);return t||Wi.set(i,t=new Set(i.shards)),t}function Yi(i){return i.replace(/"/g,"").trim().toLowerCase()}function Us(i,t){let{tag:e,section:n}=i.filters,s=i.notFilters??{tag:[],section:[]};if(!e.length&&!n.length&&!s.tag.length&&!s.section.length)return;let o=(d,u)=>new Set(d.flatMap((f,m)=>u.includes(Yi(f))?[m]:[])),r=o(t.sections,n),a=o(t.tags??[],e),l=o(t.sections,s.section),c=o(t.tags??[],s.tag);return d=>{let u=t.docs[d],f=u[3]??[];return!(n.length&&!r.has(u[2])||e.length&&!f.some(m=>a.has(m))||l.has(u[2])||f.some(m=>c.has(m)))}}async function Xs(i,t,e){i.corrected=void 0;let n=$t(t.lang),s=new Map,o=new Map;for(let d of i.terms)for(let u of Vi(d,t,i.prefix)){let f=await e.shard(u);if(!f)continue;let m=(y,w)=>{w>(s.get(y)??0)&&(s.set(y,w),o.set(y,f))};Object.hasOwn(f,d)&&m(d,1);let p=n==null?void 0:n(d),b=p?p.slice(0,Math.max(3,p.length-1)):void 0,g=0;for(let y in f)y!==d&&(i.prefix&&y.startsWith(d)&&g++<200&&m(y,Z.prefix),p&&b&&y.startsWith(b)&&n(y)===p&&m(y,Z.stem));if(!s.size&&!i.exact&&d.length>=4&&!/[._-]/.test(d))for(let y in f)Math.abs(y.length-d.length)<=1&&Vs(d,y)&&m(y,Z.typo)}[...s.values()].some(d=>d===Z.typo)&&(i.corrected=[...s].filter(([,d])=>d===Z.typo).map(([d])=>d));let r=[...s].map(([d,u])=>[o.get(d)[d],u]),a=new Set;for(let[d]of r)for(let u=0;u<d.length;u+=2)a.add(d[u]);let l=Math.log(1+(t.count-a.size+.5)/(a.size+.5)),c=new Map;for(let[d,u]of r)for(let f=0;f<d.length;f+=2)c.set(d[f],Math.max(c.get(d[f])??0,d[f+1]*u*l));return c}async function Ui(i,t){var o;let e=await t.meta(),n=[...new Set(i.map(r=>Math.floor(r.id/e.block)))],s=new Map;await Promise.all(n.map(async r=>s.set(r,await t.fragment(r))));for(let r of i)r.fragment??(r.fragment=(o=s.get(Math.floor(r.id/e.block)))==null?void 0:o[r.id%e.block])}async function Gs(i,t,e,n=10){let s=t.slice(0,n);await Ui(s,e);let o=i.groups,r=$t((await e.meta()).lang),a=(l,c)=>c.terms.some(d=>l===d||c.prefix&&l.startsWith(d)||r!==void 0&&r(l)===r(d))||(c.corrected??[]).includes(l);for(let l of s){let[c,d]=l.fragment??["",[]],u=mt(l.title),f=1;o.length&&o.every(p=>u.some(b=>a(b,p)))&&(f=ji(u,o,a)?Z.titleExact:Z.titleAll);let m=[];for(let[p,b]of d){let g=mt(p);!o.length||!o.every(y=>g.some(w=>a(w,y)))||(m.push([p,b]),f=Math.max(f,ji(g,o,a)?Z.headingExact:Z.headingAll))}if(l.sections=m.slice(0,3),i.phrases.length){let p=[l.title,c,...d.map(([b])=>b)].map(b=>mt(b).join(" ")).join(" \\0 ");i.phrases.every(b=>p.includes(b))&&(f*=Z.phrase)}l.score*=f}return s.sort((l,c)=>c.score-l.score),[...s,...t.slice(n)]}async function Xi(i,t,e){await Ui(t,e);let n=$t((await e.meta()).lang),s=(o,r)=>r.terms.some(a=>o===a||r.prefix&&o.startsWith(a)||n!==void 0&&n(o)===n(a))||(r.corrected??[]).includes(o);for(let o of t)!o.fragment||o.sections||(o.sections=o.fragment[1].filter(([r])=>{let a=mt(r);return i.groups.length>0&&i.groups.every(l=>a.some(c=>s(c,l)))}).slice(0,3))}function ji(i,t,e){return i.every(n=>t.some(s=>e(n,s)))&&t.every(n=>i.some(s=>e(s,n)))}async function Gi(i,t,e=10){let n=Lt(i),s=$t((await t.meta()).lang);s&&(n.highlight=[...new Set([...n.highlight,...n.highlight.map(s).filter(r=>r.length>=3)])]);let o=await js(n,t);return n.highlight=[...new Set([...n.highlight,...n.groups.flatMap(r=>r.corrected??[])])],{parsed:n,results:await Gs(n,o,t,e)}}function Zi(i,t,e=globalThis){let n=new Map,s=e.__DOGSBAY_SEARCH__??{q:[],load(){}};for(let[l,c]of s.q)n.set(l,c);s.q=[],s.load=(l,c)=>void n.set(l,c),e.__DOGSBAY_SEARCH__=s;let o=async(l,c)=>(n.has(l)||await t(i+c),n.get(l)),r,a={meta:()=>r??(r=o(Jt.docs,Qt.docs).then(l=>{if(!l||l.format!==4)throw new Error(`search index format ${(l==null?void 0:l.format)??"missing"}, expected ${4}: rebuild the site`);return l})),shard:async l=>(await a.meta()).shards.includes(l)?o(Jt.shard(l),Qt.shard(l)):void 0,fragment:l=>o(Jt.fragment(l),Qt.fragment(l))};return a}function Qi(i){let t,e=new URL(i||"./",location.href).pathname;return async n=>{t??(t=import(new URL(`${i}pagefind/pagefind.js`,location.href).href).catch(d=>{throw t=void 0,d}));let s=n.replace(new RegExp(\'(?<!\\\\S)-?(tag|section):("[^"]*"?|\\\\S*)\',"gi")," ").trim(),o=s?await(await t).search(s):null,r=(o==null?void 0:o.results)??[],a=async(d,u)=>{let f=await d.data(),m=f.url.startsWith(e)?f.url.slice(e.length):f.url.replace(/^\\/+/,""),p=(f.sub_results??[]).map(b=>[b.title,b.url.split("#")[1]??""]).filter(([,b])=>b);return{id:u,title:f.meta.title??m,url:m,section:"",score:r.length-u,fragment:[Zs(f.excerpt),p],sections:p.slice(0,3)}},l=await Promise.all(r.slice(0,10).map(a)),c=Promise.all(r.slice(10,30).map((d,u)=>a(d,u+10)));return c.catch(()=>{}),{results:l,more:c,total:r.length,highlight:Lt(n).highlight}}}function Zs(i){return new DOMParser().parseFromString(i,"text/html").body.textContent??""}function Ji(i){let{signal:t}=i,e=document.getElementById("db-search");if(!e)return;let n=e.querySelector("[data-db-search-input]"),s=e.querySelector("[data-part=\'listbox\']"),o=e.querySelector("[data-db-search-status]"),r=o.textContent??"",a=Zi(`${i.unitRoot}_dogsbay/search/`,i.loadScript,window),l=document.body.dataset.search??"builtin",c=location.protocol!=="file:",d=l==="pagefind"||l==="both"&&c?Qi(i.unitRoot):void 0,u=l==="pagefind"&&!c;e.addEventListener("db-dialog:open",()=>{n.focus(),n.select(),u?o.textContent=s.dataset.needsServer??"":d||a.meta().catch(()=>o.textContent="Search index could not be loaded.")},{signal:t}),document.addEventListener("keydown",S=>{let x=S.target.closest("input, textarea, select, [contenteditable]");(S.key==="/"&&!x||S.key.toLowerCase()==="k"&&(S.metaKey||S.ctrlKey))&&(S.preventDefault(),e.open?n.focus():e.show())},{signal:t}),s.addEventListener("click",S=>{S.target.closest("a")&&e.close("api")},{signal:t});let f=0,m,p;n.addEventListener("input",()=>{clearTimeout(p),p=setTimeout(()=>void y(++f),80)},{signal:t});let b=new Map,g=typeof IntersectionObserver=="function"?new IntersectionObserver(S=>{var x;for(let E of S)E.isIntersecting&&((x=b.get(E.target))==null||x(),b.delete(E.target),g.unobserve(E.target))}):void 0,y=async S=>{let x=n.value.trim();if(!x){g==null||g.disconnect(),b.clear(),w.hidden=!0,s.replaceChildren(),o.textContent=r;return}if(!u)try{if(d){let E=await d(x);if(S!==f)return;O(x,E.results,E.highlight,E.total);let C=await E.more;S===f&&C.length&&v(x,C,E.highlight)}else{let E=await Gi(x,a);if(S!==f)return;m=E.parsed,O(x,E.results.slice(0,30),E.parsed.highlight,E.results.length,E.results)}}catch{S===f&&(o.textContent="Search index could not be loaded.")}},w=document.createElement("div");w.setAttribute("role","group"),w.setAttribute("aria-label",s.dataset.filterSection??"Filter by section"),w.className="flex flex-wrap gap-1 px-3 pb-2",w.hidden=!0,s.before(w),t==null||t.addEventListener("abort",()=>{clearTimeout(p),f++,g==null||g.disconnect(),b.clear(),w.remove()});let L=S=>S.replace(/"/g,""),R=S=>`section:"${L(S)}"`,M,H=(S,x)=>{let E=new Map;for(let k of x)k.section&&E.set(k.section,(E.get(k.section)??0)+1);let C=[...S.matchAll(/section:"([^"]*)"/gi)].map(k=>k[1].toLowerCase()),T=k=>C.includes(L(k).toLowerCase()),A=[...E].sort((k,D)=>D[1]-k[1]).slice(0,6).map(([k])=>k);for(let k of C)A.some(D=>L(D).toLowerCase()===k)||A.push(k);w.replaceChildren(...A.length>1||C.length?A.map(k=>{let D=document.createElement("button");D.type="button";let _=T(k);return D.setAttribute("aria-pressed",String(_)),D.className="rounded-full border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",D.textContent=k,D.addEventListener("click",()=>{let P=R(k),tt=n.value.replace(new RegExp(`\\\\s*section:"${L(k).replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}"`,"i"),"").trim();n.value=_?tt:`${tt} ${P}`.trim(),M=k,n.dispatchEvent(new Event("input",{bubbles:!0}))},{signal:t}),D}):[]),w.hidden=!w.childElementCount,M!==void 0&&(([...w.querySelectorAll("button")].find(D=>D.textContent===M)??n).focus(),M=void 0)},O=(S,x,E,C,T=x)=>{g==null||g.disconnect(),b.clear(),H(S,T),s.replaceChildren(...q(S,x,E)),o.textContent=C?`${C} result${C===1?"":"s"}`:`${s.dataset.noResults} \\u201C${S}\\u201D`},v=(S,x,E)=>s.append(...q(S,x,E)),q=(S,x,E)=>{let C=[];for(let T of x){let A=I(T.url,E,"block rounded-md p-3 hover:bg-accent"),k=document.createElement("div");if(k.className="font-medium",k.append(...Te(T.title,E)),A.a.appendChild(k),T.section){let P=document.createElement("div");P.className="text-xs text-muted-foreground",P.textContent=T.section,A.a.appendChild(P)}let D=document.createElement("div");D.className="mt-1 line-clamp-2 text-xs text-muted-foreground",A.a.appendChild(D),C.push(A.li);let _=()=>T.fragment?(T.fragment[0]&&D.replaceChildren(...Te(T.fragment[0],E)),(T.sections??[]).map(([P,tt])=>{let qt=I(`${T.url}#${tt}`,E,"ml-4 block rounded-md border-l px-3 py-1.5 text-sm hover:bg-accent");return qt.a.append(...Te(P,E)),qt.li})):[];if(T.fragment)C.push(..._());else if(g){let P=m??Lt(S);b.set(A.li,()=>void Xi(P,[T],a).then(()=>A.li.after(..._()),()=>{})),g.observe(A.li)}}return C},I=(S,x,E)=>{let C=document.createElement("li");C.setAttribute("role","none"),C.className="mb-1";let T=document.createElement("a");return T.setAttribute("data-part","option"),T.dataset.value=S,T.href=Qs(i.unitRoot+S,x),T.tabIndex=-1,T.className=E,C.appendChild(T),{li:C,a:T}}}function Qs(i,t){if(!t.length)return i;let e=i.indexOf("#"),[n,s]=e<0?[i,""]:[i.slice(0,e),i.slice(e)];return`${n}${n.includes("?")?"&":"?"}h=${encodeURIComponent(t.join(" "))}${s}`}function Te(i,t){if(!t.length)return[document.createTextNode(i)];let e=new RegExp(`(${t.map(n=>n.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")).join("|")})`,"gi");return i.split(e).map((n,s)=>{if(s%2===0)return document.createTextNode(n);let o=document.createElement("mark");return o.textContent=n,o})}var tn=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u;function en(i){var b;let t;try{t=(new URLSearchParams(location.search).get("h")??"").split(/\\s+/).filter(g=>g.length>0)}catch{return}let e=document.querySelector("#db-content article")??document.querySelector("#db-content");if(!t.length||!e)return;let n=g=>g.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&"),s=[...t].sort((g,y)=>y.length-g.length),o=s.filter(g=>tn.test(g)).map(n),r=s.filter(g=>!tn.test(g)).map(n),a=[r.length?`(?<![\\\\p{L}\\\\p{N}])(?:${r.join("|")})`:"",o.length?`(?:${o.join("|")})`:""].filter(Boolean),l=new RegExp(`(${a.join("|")})`,"giu"),c=[],d=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:g=>{var y;return(y=g.parentElement)!=null&&y.closest("script, style, mark, button, [aria-hidden=\'true\']")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),u=[];for(let g=d.nextNode();g;g=d.nextNode())u.push(g);for(let g of u){if(c.length>=500)break;let y=g.data;if(l.lastIndex=0,!l.test(y))continue;l.lastIndex=0;let w=document.createDocumentFragment(),L=0;for(let R of y.matchAll(l)){w.append(y.slice(L,R.index));let M=document.createElement("mark");M.className="db-search-hl",M.textContent=R[0],w.append(M),c.push(M),L=R.index+R[0].length}w.append(y.slice(L)),g.replaceWith(w)}if(Js(),!c.length)return;let f=((b=document.querySelector("[data-clear-highlights]"))==null?void 0:b.dataset.clearHighlights)??"Clear highlights",m=document.createElement("div");m.className="not-prose mb-4";let p=document.createElement("button");p.type="button",p.className="inline-flex h-8 items-center rounded-md border px-3 text-sm hover:bg-accent",p.textContent=f,p.addEventListener("click",()=>{var g;for(let y of c)y.replaceWith(document.createTextNode(y.textContent??""));e.normalize(),m.remove(),(g=document.getElementById("db-content"))==null||g.focus({preventScroll:!0})},{signal:i}),m.append(p),e.prepend(m),location.hash||c[0].scrollIntoView({block:"center"})}function Js(){try{let i=new URL(location.href);i.searchParams.delete("h"),history.replaceState(history.state,"",i.toString())}catch{}}var pt=Object.assign||function(i){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n])}return i},ie=function(t){return t.tagName==="IMG"},to=function(t){return NodeList.prototype.isPrototypeOf(t)},ne=function(t){return t&&t.nodeType===1},nn=function(t){var e=t.currentSrc||t.src;return e.substr(-4).toLowerCase()===".svg"},sn=function(t){try{return Array.isArray(t)?t.filter(ie):to(t)?[].slice.call(t).filter(ie):ne(t)?[t].filter(ie):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(ie):[]}catch{throw new TypeError(`The provided selector is invalid.\nExpects a CSS selector, a Node element, a NodeList or an array.\nSee: https://github.com/francoischalifour/medium-zoom`)}},eo=function(t){var e=document.createElement("div");return e.classList.add("medium-zoom-overlay"),e.style.background=t,e},io=function(t){var e=t.getBoundingClientRect(),n=e.top,s=e.left,o=e.width,r=e.height,a=t.cloneNode(),l=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,c=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return a.removeAttribute("id"),a.style.position="absolute",a.style.top=n+l+"px",a.style.left=s+c+"px",a.style.width=o+"px",a.style.height=r+"px",a.style.transform="",a},kt=function(t,e){var n=pt({bubbles:!1,cancelable:!1,detail:void 0},e);if(typeof window.CustomEvent=="function")return new CustomEvent(t,n);var s=document.createEvent("CustomEvent");return s.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),s},no=function i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=window.Promise||function(x){function E(){}x(E,E)},s=function(x){var E=x.target;if(E===q){p();return}L.indexOf(E)!==-1&&b({target:E})},o=function(){if(!(M||!v.original)){var x=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(H-x)>O.scrollOffset&&setTimeout(p,150)}},r=function(x){var E=x.key||x.keyCode;(E==="Escape"||E==="Esc"||E===27)&&p()},a=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=x;if(x.background&&(q.style.background=x.background),x.container&&x.container instanceof Object&&(E.container=pt({},O.container,x.container)),x.template){var C=ne(x.template)?x.template:document.querySelector(x.template);E.template=C}return O=pt({},O,E),L.forEach(function(T){T.dispatchEvent(kt("medium-zoom:update",{detail:{zoom:I}}))}),I},l=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return i(pt({},O,x))},c=function(){for(var x=arguments.length,E=Array(x),C=0;C<x;C++)E[C]=arguments[C];var T=E.reduce(function(A,k){return[].concat(A,sn(k))},[]);return T.filter(function(A){return L.indexOf(A)===-1}).forEach(function(A){L.push(A),A.classList.add("medium-zoom-image")}),R.forEach(function(A){var k=A.type,D=A.listener,_=A.options;T.forEach(function(P){P.addEventListener(k,D,_)})}),I},d=function(){for(var x=arguments.length,E=Array(x),C=0;C<x;C++)E[C]=arguments[C];v.zoomed&&p();var T=E.length>0?E.reduce(function(A,k){return[].concat(A,sn(k))},[]):L;return T.forEach(function(A){A.classList.remove("medium-zoom-image"),A.dispatchEvent(kt("medium-zoom:detach",{detail:{zoom:I}}))}),L=L.filter(function(A){return T.indexOf(A)===-1}),I},u=function(x,E){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return L.forEach(function(T){T.addEventListener("medium-zoom:"+x,E,C)}),R.push({type:"medium-zoom:"+x,listener:E,options:C}),I},f=function(x,E){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return L.forEach(function(T){T.removeEventListener("medium-zoom:"+x,E,C)}),R=R.filter(function(T){return!(T.type==="medium-zoom:"+x&&T.listener.toString()===E.toString())}),I},m=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=x.target,C=function(){var A={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},k=void 0,D=void 0;if(O.container)if(O.container instanceof Object)A=pt({},A,O.container),k=A.width-A.left-A.right-O.margin*2,D=A.height-A.top-A.bottom-O.margin*2;else{var _=ne(O.container)?O.container:document.querySelector(O.container),P=_.getBoundingClientRect(),tt=P.width,qt=P.height,ln=P.left,cn=P.top;A=pt({},A,{width:tt,height:qt,left:ln,top:cn})}k=k||A.width-O.margin*2,D=D||A.height-O.margin*2;var Ot=v.zoomedHd||v.original,dn=nn(Ot)?k:Ot.naturalWidth||k,un=nn(Ot)?D:Ot.naturalHeight||D,Kt=Ot.getBoundingClientRect(),hn=Kt.top,fn=Kt.left,ae=Kt.width,le=Kt.height,mn=Math.min(Math.max(ae,dn),k)/ae,pn=Math.min(Math.max(le,un),D)/le,ce=Math.min(mn,pn),gn=(-fn+(k-ae)/2+O.margin+A.left)/ce,bn=(-hn+(D-le)/2+O.margin+A.top)/ce,Re="scale("+ce+") translate3d("+gn+"px, "+bn+"px, 0)";v.zoomed.style.transform=Re,v.zoomedHd&&(v.zoomedHd.style.transform=Re)};return new n(function(T){if(E&&L.indexOf(E)===-1){T(I);return}var A=function tt(){M=!1,v.zoomed.removeEventListener("transitionend",tt),v.original.dispatchEvent(kt("medium-zoom:opened",{detail:{zoom:I}})),T(I)};if(v.zoomed){T(I);return}if(E)v.original=E;else if(L.length>0){var k=L;v.original=k[0]}else{T(I);return}if(v.original.dispatchEvent(kt("medium-zoom:open",{detail:{zoom:I}})),H=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,M=!0,v.zoomed=io(v.original),document.body.appendChild(q),O.template){var D=ne(O.template)?O.template:document.querySelector(O.template);v.template=document.createElement("div"),v.template.appendChild(D.content.cloneNode(!0)),document.body.appendChild(v.template)}if(v.original.parentElement&&v.original.parentElement.tagName==="PICTURE"&&v.original.currentSrc&&(v.zoomed.src=v.original.currentSrc),document.body.appendChild(v.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),v.original.classList.add("medium-zoom-image--hidden"),v.zoomed.classList.add("medium-zoom-image--opened"),v.zoomed.addEventListener("click",p),v.zoomed.addEventListener("transitionend",A),v.original.getAttribute("data-zoom-src")){v.zoomedHd=v.zoomed.cloneNode(),v.zoomedHd.removeAttribute("srcset"),v.zoomedHd.removeAttribute("sizes"),v.zoomedHd.removeAttribute("loading"),v.zoomedHd.src=v.zoomed.getAttribute("data-zoom-src"),v.zoomedHd.onerror=function(){clearInterval(_),console.warn("Unable to reach the zoom image target "+v.zoomedHd.src),v.zoomedHd=null,C()};var _=setInterval(function(){v.zoomedHd.complete&&(clearInterval(_),v.zoomedHd.classList.add("medium-zoom-image--opened"),v.zoomedHd.addEventListener("click",p),document.body.appendChild(v.zoomedHd),C())},10)}else if(v.original.hasAttribute("srcset")){v.zoomedHd=v.zoomed.cloneNode(),v.zoomedHd.removeAttribute("sizes"),v.zoomedHd.removeAttribute("loading");var P=v.zoomedHd.addEventListener("load",function(){v.zoomedHd.removeEventListener("load",P),v.zoomedHd.classList.add("medium-zoom-image--opened"),v.zoomedHd.addEventListener("click",p),document.body.appendChild(v.zoomedHd),C()})}else C()})},p=function(){return new n(function(x){if(M||!v.original){x(I);return}var E=function C(){v.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(v.zoomed),v.zoomedHd&&document.body.removeChild(v.zoomedHd),document.body.removeChild(q),v.zoomed.classList.remove("medium-zoom-image--opened"),v.template&&document.body.removeChild(v.template),M=!1,v.zoomed.removeEventListener("transitionend",C),v.original.dispatchEvent(kt("medium-zoom:closed",{detail:{zoom:I}})),v.original=null,v.zoomed=null,v.zoomedHd=null,v.template=null,x(I)};M=!0,document.body.classList.remove("medium-zoom--opened"),v.zoomed.style.transform="",v.zoomedHd&&(v.zoomedHd.style.transform=""),v.template&&(v.template.style.transition="opacity 150ms",v.template.style.opacity=0),v.original.dispatchEvent(kt("medium-zoom:close",{detail:{zoom:I}})),v.zoomed.addEventListener("transitionend",E)})},b=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=x.target;return v.original?p():m({target:E})},g=function(){return O},y=function(){return L},w=function(){return v.original},L=[],R=[],M=!1,H=0,O=e,v={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?O=t:(t||typeof t=="string")&&c(t),O=pt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},O);var q=eo(O.background);document.addEventListener("click",s),document.addEventListener("keyup",r),document.addEventListener("scroll",o),window.addEventListener("resize",p);var I={open:m,close:p,toggle:b,update:a,clone:l,attach:c,detach:d,on:u,off:f,getOptions:g,getImages:y,getZoomedImage:w};return I};function so(i,t){t===void 0&&(t={});var e=t.insertAt;if(!(!i||typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",e==="top"&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=i:s.appendChild(document.createTextNode(i))}}var oo=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";so(oo);var on=no;var ro;function rn(i){let t=document.body.dataset.imageZoom;if(!t)return;let e;try{e=JSON.parse(t)}catch{return}let n=[...document.querySelectorAll(\'img[data-zoomable="true"]\')];if(!n.length)return;let s=ro??(ro=on());s.update(e),s.attach(...n),i==null||i.addEventListener("abort",()=>{s.close(),s.detach(...n)});let o={signal:i},r=!1,a=l=>l.key==="Enter"||l.key===" ";for(let l of n)l.alt&&(l.tabIndex=0,l.addEventListener("keydown",c=>{a(c)&&(c.preventDefault(),r=!0,s.open({target:l}))},o),l.addEventListener("medium-zoom:opened",()=>{let c=document.querySelector(".medium-zoom-image--opened");!r||!c||(c.tabIndex=-1,c.addEventListener("keydown",d=>{a(d)&&(d.preventDefault(),s.close())}),c.focus())},o),l.addEventListener("medium-zoom:closed",()=>{r&&l.focus(),r=!1},o))}function se(i){return!/^[\\x00-\\x20]*([a-z][a-z0-9+.-]*:|[\\\\/])/i.test(i.replace(/[\\t\\n\\r]/g,""))}var Oe=new Map;function an(i){let t=Oe.get(i);return t||(t=new Promise((e,n)=>{let s=document.createElement("script");s.src=i,s.onload=()=>e(),s.onerror=()=>{Oe.delete(i),n(new Error(`could not load ${i}`))},document.head.appendChild(s)}),Oe.set(i,t)),t}function ao(i){document.querySelectorAll("[data-component=\'theme-toggle\']").forEach(t=>{let e=()=>t.setAttribute("aria-pressed",String(document.documentElement.classList.contains("dark")));e(),t.addEventListener("click",()=>{let n=!document.documentElement.classList.contains("dark");document.documentElement.classList.toggle("dark",n);try{localStorage.setItem("theme",n?"dark":"light")}catch{}e()},{signal:i})})}function lo(i){document.addEventListener("click",async t=>{var s,o,r,a;let e=t.target.closest("[data-copy-markdown]");if(!e)return;let n=(((s=document.getElementById("db-page-markdown"))==null?void 0:s.textContent)??"").replace(/<\\\\\\/(script)/gi,"</$1").replace(/<\\\\!--/g,"<!--");try{await navigator.clipboard.writeText(n);let l=(o=e.dataset).label??(o.label=e.textContent??"");e.textContent="Copied",clearTimeout(Number(e.dataset.timer)),e.dataset.timer=String(setTimeout(()=>e.textContent=l,1500))}catch{}(a=(r=e.closest("db-popover"))==null?void 0:r.close)==null||a.call(r,"close-press")},{signal:i})}function co(i,t){let e=document.body.dataset.page??"index.html";document.querySelectorAll("select[data-db-switch]").forEach(n=>{n.addEventListener("change",async()=>{var a;let s=n.selectedOptions[0];if(!s||s.disabled||!s.hasAttribute("value"))return;let o=s.dataset.prefix??"",r=n.value;if(s.hasAttribute("data-link")){(se(r)||/^https?:\\/\\//i.test(r))&&(location.href=r);return}if(!(!se(r)||!se(o))){if(n.dataset.dbSwitch==="product"){location.href=r;return}try{let l=o?`${i}${o}/`:i;await an(`${l}_dogsbay/pages.js`);let c=(a=window.__DOGSBAY_PAGES__)==null?void 0:a[o];location.href=c&&!c.includes(e)?`${l}index.html`:r}catch{location.href=r}}},{signal:t})})}function uo(i){document.addEventListener("click",t=>{var n;let e=t.target.closest("a.db-anchor");!e||location.protocol==="file:"||(n=navigator.clipboard)==null||n.writeText(e.href).catch(()=>{})},{signal:i})}var Bt=new Map,re=new Set;function oe(){for(let[i,t]of Bt)i.isConnected||(ot(i),t.abort(),Bt.delete(i));for(let i of re)i.isConnected||ot(i)}function ho(i,t){let e=EventTarget.prototype,n=e.addEventListener,s=0;e.addEventListener=function(o,r,a){s++;let l=typeof a=="object"?a.signal:void 0;n.call(this,o,r,typeof a=="object"?{...a,signal:l?AbortSignal.any([l,i]):i}:{capture:a===!0,signal:i})};try{t()}finally{e.addEventListener=n}return s}function fo(){oe(),document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(i=>{if(Bt.has(i)||re.has(i))return;let t=new AbortController;ho(t.signal,()=>Se(i))?Bt.set(i,t):i.querySelector("[data-component=\'sidebar\']")&&re.add(i)}),document.removeEventListener("keydown",oe),document.addEventListener("keydown",oe)}var Tt;function De(i={}){Tt==null||Tt.unmount();let t=new AbortController,{signal:e}=t,n=document.body,s=n.dataset.unitRoot??"",o=n.dataset.siteRoot??"";i.nav!==void 0&&(window.__DOGSBAY_NAV__=i.nav),fo(),i.theme!==!1&&ao(e),lo(e),i.switchers!==!1&&co(o,e),uo(e),i.search!==!1&&Ji({unitRoot:s,loadScript:an,signal:e}),en(e),rn(e);let r={unmount(){if(!e.aborted){t.abort();for(let a of[...Bt.keys(),...re])ot(a);oe(),Tt===r&&(Tt=void 0)}}};return Tt=r}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>De()):De();})();\n';
1347
- var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or table of contents: landing pages, splash pages, 404. -#}\n<!doctype html>\n<html lang="{{ page.lang }}" dir="{{ page.dir }}">\n<head>\n{% include "partials/head.html" %}\n</head>\n<body class="bg-background text-foreground antialiased" data-unit-root="{{ paths.unit }}" data-site-root="{{ paths.site }}" data-prefix="{{ page.prefix }}" data-page="{{ page.out }}"{{ bodyAttrs }}>\n{{ skipLink }}\n<div class="relative flex min-h-svh w-full flex-col bg-background">\n{% include "partials/header.html" %}\n<main id="db-content" class="min-w-0 flex-1 px-6 py-8 outline-none lg:px-12" tabindex="-1">\n<div class="mx-auto {{ widthClass }}">\n{{ banner }}{{ versionBadge }}{{ h1 }}{{ byline }}{{ lede }}{{ hero }}{{ metaStrip }}\n<article class="docs-prose">\n{{ content }}\n</article>\n{% include "partials/footer.html" %}\n</div>\n</main>\n</div>\n{{ searchDialog }}\n{{ scripts }}\n</body>\n</html>\n', "layouts/docs.html": '{# The docs layout: a port of @dogsbay/docs-layout DocsLayout.astro. -#}\n<!doctype html>\n<html lang="{{ page.lang }}" dir="{{ page.dir }}">\n<head>\n{% include "partials/head.html" %}\n</head>\n<body class="bg-background text-foreground antialiased" data-unit-root="{{ paths.unit }}" data-site-root="{{ paths.site }}" data-prefix="{{ page.prefix }}" data-page="{{ page.out }}"{{ bodyAttrs }}>\n{{ skipLink }}\n<div class="group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar" data-component="sidebar-provider" style="--sidebar-width: 16rem; --sidebar-width-icon: 3rem;">\n{{ sidebar }}\n<div class="relative flex w-full min-w-0 flex-1 flex-col bg-background">\n{% include "partials/header.html" %}\n<div class="flex min-w-0">\n<main id="db-content" class="min-w-0 flex-1 px-6 py-8 outline-none lg:px-12" tabindex="-1">\n<div class="mx-auto {{ widthClass }}">\n{{ banner }}{{ breadcrumb }}{{ pageActionsInline }}{{ versionBadge }}{{ h1 }}{{ byline }}{{ lede }}{{ hero }}{{ metaStrip }}{{ tocTop }}\n<article class="docs-prose">\n{{ content }}\n</article>\n{% include "partials/footer.html" %}\n</div>\n</main>\n{{ tocRail }}\n</div>\n</div>\n</div>\n{{ searchDialog }}\n{{ scripts }}\n</body>\n</html>\n', "partials/blog-index.html": '{#- A blog index page (BlogIndex.astro): post cards, newest first, and links between index pages. Context: blog = {heading, posts: [{title, href, description, authors, date, datetime, minutes, hero}], newer, older (links or empty), pageLabel}, t. -#}\n<h1 class="text-3xl font-bold tracking-tight mb-8">{{ blog.heading }}</h1>\n{%- if not blog.posts %}\n<p class="text-muted-foreground">{{ t("noPosts") }}</p>\n{%- endif %}\n<ul class="not-prose grid list-none grid-cols-1 items-stretch gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3" data-blog-index>\n{%- for post in blog.posts %}\n<li class="m-0 p-0"><a href="{{ post.href }}" class="group block h-full rounded-lg no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"><div class="rounded-lg border bg-card text-card-foreground shadow-sm flex h-full flex-col gap-3 p-5 transition-colors group-hover:border-ring">\n{%- if post.hero %}<img src="{{ post.hero }}" alt="" class="aspect-[16/9] w-full rounded-md border border-border object-cover" loading="lazy" decoding="async">{% endif -%}\n<h2 class="text-lg font-semibold leading-snug tracking-tight text-foreground group-hover:underline">{{ post.title }}</h2>\n<div class="flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground" data-pagefind-ignore>\n{%- if post.authors %}<span class="font-medium text-foreground">{{ post.authors }}</span>{% endif -%}\n{%- if post.authors and post.date %}<span aria-hidden="true">&middot;</span>{% endif -%}\n{%- if post.date %}<time datetime="{{ post.datetime }}">{{ post.date }}</time>{% endif -%}\n{%- if post.authors or post.date %}<span aria-hidden="true">&middot;</span>{% endif -%}\n<span>{{ post.minutes }}</span></div>\n{%- if post.description %}<p class="m-0 text-sm leading-relaxed text-muted-foreground">{{ post.description }}</p>{% endif -%}\n</div></a></li>\n{%- endfor %}\n</ul>\n{%- if blog.newer or blog.older %}\n<nav class="not-prose mt-12 flex items-center justify-between" aria-label="{{ t("blogPages") }}">\n{%- if blog.newer %}<a href="{{ blog.newer }}" class="text-sm text-foreground no-underline hover:underline" rel="prev">&larr; {{ t("newerPosts") }}</a>{% else %}<span></span>{% endif -%}\n<span class="text-sm text-muted-foreground">{{ blog.pageLabel }}</span>\n{%- if blog.older %}<a href="{{ blog.older }}" class="text-sm text-foreground no-underline hover:underline" rel="next">{{ t("olderPosts") }} &rarr;</a>{% else %}<span></span>{% endif -%}\n</nav>\n{%- endif %}\n', "partials/breadcrumb.html": `{#- Breadcrumb trail (hidden below two items). Context: breadcrumbs = [{label, href?}], t. -#}
1357
+ var CLIENT_JS = `/*! dogsbay-ssg site client (Apache-2.0). Third-party notices: THIRD-PARTY-NOTICES.txt */
1358
+ "use strict";(()=>{var wn=Object.defineProperty;var En=(i,t,e)=>t in i?wn(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var h=(i,t,e)=>En(i,typeof t!="symbol"?t+"":t,e);var N=class extends HTMLElement{constructor(){super(...arguments);h(this,"_initialized",!1);h(this,"_deferred",!1)}connectedCallback(){if(!this._initialized&&!this.firstElementChild&&typeof document<"u"&&document.readyState==="loading"){this._deferred||(this._deferred=!0,document.addEventListener("DOMContentLoaded",()=>{this._deferred=!1,this.isConnected&&this.connectedCallback()},{once:!0}));return}this._initialized||(this.setup(),this._initialized=!0),this.connect()}disconnectedCallback(){this.disconnect()}setup(){}connect(){}disconnect(){}},xn={"db-tabs":"block","db-accordion":"block","db-collapsible":"block","db-details-sheet":"block","db-card":"block","db-steps":"block","db-code-block":"block","db-link-button":"inline-block","db-dialog":"contents","db-popover":"inline-block","db-tooltip":"inline-block","db-select":"inline-block","db-combobox":"block","db-nav-tree":"block","db-toc":"block","db-announcement":"block"},Me="dogsbay-elements-display";function z(){if(typeof document>"u"||document.getElementById(Me))return;let i=Object.entries(xn).map(([e,n])=>\`:where(\${e}){display:\${n}}\`).join(""),t=document.createElement("style");t.id=Me,t.textContent=i,document.head.prepend(t)}function An(i){return i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"}function gt(i,t,e){let n=t;do n+=e?-1:1;while(n>=0&&n<i.length&&An(i[n]));return n}var Dt=class{constructor(i,t,e={}){h(this,"container");h(this,"itemSelector");h(this,"opts");h(this,"keydownHandler",null);h(this,"active",!1);this.container=i,this.itemSelector=t,this.opts={orientation:e.orientation??"horizontal",loop:e.loop??!0,homeEnd:e.homeEnd??!0,onHighlightedIndexChange:e.onHighlightedIndexChange??(()=>{})}}getItems(){return Array.from(this.container.querySelectorAll(this.itemSelector))}isForwardKey(i,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&i===(t?"ArrowLeft":"ArrowRight")||(e==="vertical"||e==="both")&&i==="ArrowDown"}isBackwardKey(i,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&i===(t?"ArrowRight":"ArrowLeft")||(e==="vertical"||e==="both")&&i==="ArrowUp"}activate(){this.active||(this.active=!0,this.keydownHandler=i=>{let t=this.getItems();if(t.length===0||i.ctrlKey||i.altKey||i.metaKey)return;let e=getComputedStyle(this.container).direction==="rtl",n=t.indexOf(document.activeElement);if(n===-1)return;let s=null;this.isForwardKey(i.key,e)?(s=gt(t,n,!1),s>=t.length&&(s=this.opts.loop?gt(t,-1,!1):n)):this.isBackwardKey(i.key,e)?(s=gt(t,n,!0),s<0&&(s=this.opts.loop?gt(t,t.length,!0):n)):this.opts.homeEnd&&i.key==="Home"?s=gt(t,-1,!1):this.opts.homeEnd&&i.key==="End"&&(s=gt(t,t.length,!0)),s!==null&&(s<0||s>=t.length||s!==n&&(i.preventDefault(),t[n].setAttribute("tabindex","-1"),t[s].setAttribute("tabindex","0"),t[s].focus(),this.opts.onHighlightedIndexChange(s)))},this.container.addEventListener("keydown",this.keydownHandler))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(this.container.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null))}setActiveIndex(i,t){i.forEach((e,n)=>{e.setAttribute("tabindex",n===t?"0":"-1")})}isActive(){return this.active}};var Sn=0;function Ie(i){return\`\${i}-\${++Sn}\`}var He=class extends N{constructor(){super(...arguments);h(this,"list");h(this,"triggers",[]);h(this,"panels",[]);h(this,"nav",null);h(this,"value","");h(this,"syncKey",null);h(this,"orientation","horizontal");h(this,"handleClick",t=>{let e=t.target.closest("[data-part='trigger']");if(!e||e.hasAttribute("disabled"))return;let n=e.dataset.value;n&&this.select(n)});h(this,"handleStorage",t=>{if(!this.syncKey||t.key!==\`db-tabs-sync:\${this.syncKey}\`)return;let e=t.newValue;e&&this.value!==e&&this.has(e)&&this.select(e)});h(this,"handleSyncEvent",(t=>{let e=t.detail.value;e&&this.value!==e&&this.has(e)&&this.select(e)}))}has(t){return this.triggers.some(e=>e.dataset.value===t)}own(t){return Array.from(this.querySelectorAll(t)).filter(e=>e.closest("db-tabs")===this)}setup(){var o;let t=this.own("[data-part='list']")[0]??null;if(!t)return;this.list=t,this.triggers=this.own("[data-part='trigger']"),this.panels=this.own("[data-part='content']"),this.orientation=this.getAttribute("orientation")||"horizontal",this.syncKey=this.getAttribute("sync-key")||null,t.setAttribute("role","tablist"),t.setAttribute("aria-orientation",this.orientation),this.triggers.forEach(r=>{let a=r.dataset.value;r.setAttribute("role","tab");let l=r.id||Ie("db-tab");r.id=l;let c=this.panels.find(d=>d.dataset.value===a);if(c){c.setAttribute("role","tabpanel");let d=c.id||Ie("db-tabpanel");c.id=d,r.setAttribute("aria-controls",d),c.setAttribute("aria-labelledby",l)}}),this.nav=new Dt(t,"[data-part='trigger']",{orientation:this.orientation,loop:!0,homeEnd:!0,onHighlightedIndexChange:()=>{var l;let r=document.activeElement,a=(l=r==null?void 0:r.dataset)==null?void 0:l.value;a&&this.select(a)}}),this.nav.activate();let n=this.getAttribute("default-value")||((o=this.triggers[0])==null?void 0:o.dataset.value)||"";if(this.syncKey){let r=localStorage.getItem(\`db-tabs-sync:\${this.syncKey}\`);r&&this.triggers.some(a=>a.dataset.value===r)&&(n=r)}let s=window.location.hash.slice(1);s&&this.triggers.some(r=>r.dataset.value===s)&&(n=s),this.select(n)}connect(){var t;(t=this.list)==null||t.addEventListener("click",this.handleClick),this.syncKey&&(window.addEventListener("storage",this.handleStorage),document.addEventListener(\`db-tabs-sync:\${this.syncKey}\`,this.handleSyncEvent))}disconnect(){var t;(t=this.list)==null||t.removeEventListener("click",this.handleClick),this.syncKey&&(window.removeEventListener("storage",this.handleStorage),document.removeEventListener(\`db-tabs-sync:\${this.syncKey}\`,this.handleSyncEvent))}select(t){this.value!==t&&(this.value=t,this.triggers.forEach(e=>{let n=e.dataset.value===t;e.setAttribute("aria-selected",String(n)),e.setAttribute("tabindex",n?"0":"-1"),n?e.setAttribute("data-state","active"):e.removeAttribute("data-state")}),this.panels.forEach(e=>{let n=e.dataset.value===t;e.hidden=!n,n?(e.setAttribute("data-state","active"),e.hasAttribute("tabindex")||e.setAttribute("tabindex","0")):e.removeAttribute("data-state")}),this.syncKey&&(localStorage.setItem(\`db-tabs-sync:\${this.syncKey}\`,t),document.dispatchEvent(new CustomEvent(\`db-tabs-sync:\${this.syncKey}\`,{detail:{value:t,source:this}}))),this.dispatchEvent(new CustomEvent("db-tabs:change",{detail:{value:t},bubbles:!0})))}};z();customElements.get("db-tabs")||customElements.define("db-tabs",He);var Cn=0;function Ln(i){return\`\${i}-\${++Cn}\`}var Ne=class{constructor(i,t,e={}){h(this,"trigger");h(this,"content");h(this,"_open",!1);h(this,"opts");this.trigger=i,this.content=t,this.opts=e;let n=Ln("base-collapsible");i.id||(i.id=\`\${n}-trigger\`),t.id||(t.id=\`\${n}-content\`),i.setAttribute("aria-controls",t.id),t.setAttribute("aria-labelledby",i.id),t.setAttribute("role","region"),i.setAttribute("aria-expanded","false"),i.addEventListener("click",()=>{i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"||this.toggle()})}get isOpen(){return this._open}toggle(){this._open?this.collapse():this.expand()}expand(){var i,t;this._open||(this._open=!0,this.trigger.setAttribute("aria-expanded","true"),this.content.hidden=!1,this.content.setAttribute("data-state","open"),(t=(i=this.opts).onToggle)==null||t.call(i,!0))}collapse(){var i,t;this._open&&(this._open=!1,this.trigger.setAttribute("aria-expanded","false"),this.content.hidden=!0,this.content.removeAttribute("data-state"),(t=(i=this.opts).onToggle)==null||t.call(i,!1))}};var ze=class extends N{constructor(){super(...arguments);h(this,"items",[]);h(this,"nav",null);h(this,"openValues",new Set);h(this,"type","single")}setup(){this.type=this.getAttribute("type")||"single";let t=this.getAttribute("default-value")||"",e=t?t.split(","):[],n=Array.from(this.querySelectorAll("[data-part='item']"));this.items=n.map(s=>{let o=s.querySelector("[data-part='trigger']"),r=s.querySelector("[data-part='content']");if(!o||!r)return null;let a=s.dataset.value||"",l=s.hasAttribute("data-disabled");l&&(o.setAttribute("disabled",""),o.setAttribute("aria-disabled","true"));let c=new Ne(o,r,{onToggle:d=>{d?this.onItemExpanded(a):this.onItemCollapsed(a)}});return{el:s,value:a,collapsible:c,disabled:l}}).filter(Boolean),this.nav=new Dt(this,"[data-part='trigger']",{orientation:"vertical",loop:!0,homeEnd:!0}),this.nav.activate(),this.items.forEach((s,o)=>{s.collapsible.trigger.setAttribute("tabindex",o===0?"0":"-1")}),e.forEach(s=>{let o=this.items.find(r=>r.value===s&&!r.disabled);o&&o.collapsible.expand()})}onItemExpanded(t){if(this.type==="single"){for(let n of this.openValues)if(n!==t){let s=this.items.find(o=>o.value===n);s&&s.collapsible.collapse()}}this.openValues.add(t);let e=this.items.find(n=>n.value===t);e&&e.el.setAttribute("data-state","open"),this.dispatchEvent(new CustomEvent("db-accordion:change",{detail:{value:t,open:!0,openValues:[...this.openValues]},bubbles:!0}))}onItemCollapsed(t){this.openValues.delete(t);let e=this.items.find(n=>n.value===t);e&&e.el.removeAttribute("data-state"),this.dispatchEvent(new CustomEvent("db-accordion:change",{detail:{value:t,open:!1,openValues:[...this.openValues]},bubbles:!0}))}};z();customElements.get("db-accordion")||customElements.define("db-accordion",ze);var kn=0;function F(i){return\`\${i}-\${++kn}\`}function et(i,t){let e=i.localName;return Array.from(i.querySelectorAll(t)).filter(n=>n.closest(e)===i)}function $(i,t){return et(i,t)[0]??null}function bt(i){if(!i||!i.hasAttribute("data-as-child"))return i;let t=i.firstElementChild;if(!t)return i;let e=i.getAttribute("data-part");return e&&t.setAttribute("data-part",e),t}function W(i){return i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"||i.getAttribute("data-disabled")==="true"}function _e(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover=="function"}function vt(i){if(i.hidden=!1,!_e())return"inline";i.hasAttribute("popover")||i.setAttribute("popover","manual"),i.style.inset="auto",i.style.margin="0";try{i.matches(":popover-open")||i.showPopover()}catch{return"inline"}return"top-layer"}function yt(i){if(_e())try{i.matches(":popover-open")&&i.hidePopover()}catch{}i.hidden=!0}var Tn='a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]';function Pe(i){return Array.from(i.querySelectorAll(Tn)).filter(t=>!t.closest("[hidden]")&&!W(t))}function Fe(i,t){let e=typeof i.getAnimations=="function"?i.getAnimations():[];if(!e.length)return t();Promise.all(e.map(n=>n.finished)).then(t,t)}function wt(i){try{return decodeURIComponent(i)}catch{return i}}var Be=class extends N{constructor(){super(...arguments);h(this,"details",null);h(this,"summary",null);h(this,"dialog",null);h(this,"body",null);h(this,"source",null);h(this,"moved",[]);h(this,"handledHash",null);h(this,"onSummaryClick",t=>{var n,s;let e=t.target;e&&e!==this.summary&&((s=(n=e.closest)==null?void 0:n.call(e,"a[href], button, input, select, textarea, label"))==null?void 0:s.closest("summary"))===this.summary||(t.preventDefault(),this.show())});h(this,"onDialogClick",t=>{let e=this.dialog;if(!e||t.target!==e)return;let n=e.getBoundingClientRect();!(t.clientX>=n.left&&t.clientX<=n.right&&t.clientY>=n.top&&t.clientY<=n.bottom)&&(t.clientX!==0||t.clientY!==0)&&e.close()});h(this,"onDialogClose",()=>this.restore());h(this,"onDocClick",t=>{var o,r;if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let e=(r=(o=t.target)==null?void 0:o.closest)==null?void 0:r.call(o,"a[href]");if(!e||!this.details||this.open||e.hasAttribute("download")||e.target&&e.target!=="_self")return;let n=new URL(e.href,location.href);if(!n.hash||n.hash!==location.hash||n.pathname!==location.pathname||n.search!==location.search)return;let s=document.getElementById(wt(n.hash.slice(1)));if(!(!s||!this.details.contains(s))){for(let a of this.details.querySelectorAll("db-details-sheet"))a.handledHash=null;this.show(s)}});h(this,"onHash",()=>{this.handledHash=null,this.openForHash()})}get open(){var t;return!!((t=this.dialog)!=null&&t.open)}setup(){var d;let t=Array.from(this.children).find(u=>u.tagName==="DETAILS")??null,e=t?Array.from(t.children).find(u=>u.tagName==="SUMMARY")??null:null,n=typeof HTMLDialogElement<"u"&&typeof HTMLDialogElement.prototype.showModal=="function";if(!t||!e||!n)return;for(let u of Array.from(t.children))u.getAttribute("role")==="status"&&u.setAttribute("aria-live","off");this.details=t,this.summary=e,t.open=!1,On();let s=(((d=e.querySelector("[data-part='title']"))==null?void 0:d.textContent)??e.textContent??"").trim(),o=document.createElement("dialog");o.className="db-sheet",o.id=F("db-sheet");let r=document.createElement("h2");r.className="db-sheet-title",r.id=F("db-sheet-title"),r.textContent=s,o.setAttribute("aria-labelledby",r.id);let a=document.createElement("button");a.type="button",a.className="db-sheet-close",a.setAttribute("aria-label",this.getAttribute("close-label")||"Close"),a.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>',a.addEventListener("click",()=>o.close());let l=document.createElement("div");l.className="db-sheet-header",l.append(r,a);let c=document.createElement("div");c.className="db-sheet-body",o.append(l,c),this.append(o),this.dialog=o,this.body=c,e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-controls",o.id),e.setAttribute("aria-expanded","false"),this.setAttribute("data-state","closed")}connect(){this.dialog&&(this.summary.addEventListener("click",this.onSummaryClick),this.dialog.addEventListener("click",this.onDialogClick),this.dialog.addEventListener("close",this.onDialogClose),window.addEventListener("hashchange",this.onHash),document.addEventListener("click",this.onDocClick),queueMicrotask(()=>this.isConnected&&this.openForHash()))}disconnect(){this.dialog&&(this.dialog.open&&this.dialog.close(),this.restore(!1),this.summary.removeEventListener("click",this.onSummaryClick),this.dialog.removeEventListener("click",this.onDialogClick),this.dialog.removeEventListener("close",this.onDialogClose),window.removeEventListener("hashchange",this.onHash),document.removeEventListener("click",this.onDocClick))}show(t){var l;let{dialog:e,details:n,body:s}=this;if(!e||!n||!s||e.open)return;let o=Array.from(n.childNodes).filter(c=>c!==this.summary),r=o.filter(c=>c.nodeType===Node.ELEMENT_NODE),a=r.length===1&&o.every(c=>{var d;return c===r[0]||!((d=c.textContent)!=null&&d.trim())})?r[0]:null;this.source=a??n,this.moved=a?Array.from(a.childNodes):o,s.append(...this.moved),e.showModal(),this.summary.setAttribute("aria-expanded","true"),this.setAttribute("data-state","open"),t&&t!==n&&((l=t.scrollIntoView)==null||l.call(t,{block:"start"})),this.dispatchEvent(new CustomEvent("db-details-sheet:open",{bubbles:!0}))}close(){var t;(t=this.dialog)==null||t.close()}restore(t=!0){var e,n;this.source&&(this.source.append(...this.moved),this.source=null,this.moved=[],this.summary.setAttribute("aria-expanded","false"),this.setAttribute("data-state","closed"),t&&this.isConnected&&((n=(e=this.summary).checkVisibility)==null?void 0:n.call(e))!==!1&&this.summary.focus(),this.dispatchEvent(new CustomEvent("db-details-sheet:close",{bubbles:!0})))}openForHash(){let t=wt(location.hash.slice(1));if(!t||!this.details||this.handledHash===location.hash||(this.handledHash=location.hash,this.open))return;let e=document.getElementById(t);e&&this.details.contains(e)&&this.show(e)}},$e="dogsbay-details-sheet";function On(){if(document.getElementById($e))return;let i=document.createElement("style");i.id=$e,i.textContent=["dialog.db-sheet{position:fixed;inset:0 0 0 auto;margin:0;height:100dvh;max-height:none;width:min(32rem,100vw);max-width:100vw;padding:0;border:0;border-left:1px solid var(--border);background:var(--background);color:var(--foreground);box-shadow:0 10px 15px -3px rgb(0 0 0/.1),0 4px 6px -4px rgb(0 0 0/.1);flex-direction:column}","dialog.db-sheet[open]{display:flex}","dialog.db-sheet::backdrop{background:rgb(0 0 0/.6)}",".db-sheet-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.5rem;border-bottom:1px solid var(--border)}","dialog.db-sheet h2.db-sheet-title{margin:0;padding:0;border:0;font-size:1.125rem;line-height:1.75rem;font-weight:600;scroll-margin:0}",".db-sheet-close{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:.375rem;background:transparent;color:var(--muted-foreground);cursor:pointer}",".db-sheet-close:hover{background:var(--accent,var(--muted));color:var(--foreground)}",".db-sheet-close:focus-visible{outline:2px solid var(--ring);outline-offset:2px}",".db-sheet-body{flex:1;overflow-y:auto;padding:1.5rem;font-size:.875rem;line-height:1.625}","dialog.db-sheet .db-sheet-body>:first-child{margin-top:0}","html:has(dialog.db-sheet[open]){overflow:hidden}","db-details-sheet>details>summary>span:last-child{transform:rotate(-90deg)}","@media (prefers-reduced-motion:no-preference){dialog.db-sheet[open]{animation:db-sheet-in .2s ease-out}dialog.db-sheet[open]::backdrop{animation:db-sheet-fade .2s ease-out}}","@keyframes db-sheet-in{from{transform:translateX(100%)}}","@keyframes db-sheet-fade{from{opacity:0}}"].join(""),document.head.append(i)}z();customElements.get("db-details-sheet")||customElements.define("db-details-sheet",Be);var qe=class extends N{constructor(){super(...arguments);h(this,"copyBtn",null);h(this,"copyIcon",null);h(this,"checkIcon",null);h(this,"liveRegion",null);h(this,"resetTimeout",null);h(this,"handleCopy",async()=>{let t=this.getCopyText();if(t)try{await navigator.clipboard.writeText(t),this.showCopiedFeedback(),this.dispatchEvent(new CustomEvent("db-code-block:copied",{detail:{text:t},bubbles:!0}))}catch{}})}setup(){this.copyBtn=this.querySelector("[data-part='copy']"),this.copyIcon=this.querySelector("[data-part='copy-icon']"),this.checkIcon=this.querySelector("[data-part='check-icon']"),this.copyBtn&&!this.copyBtn.hasAttribute("aria-label")&&this.copyBtn.setAttribute("aria-label","Copy code"),this.liveRegion=document.createElement("span"),this.liveRegion.setAttribute("aria-live","polite"),this.liveRegion.setAttribute("role","status"),this.liveRegion.className="sr-only",this.liveRegion.style.position="absolute",this.liveRegion.style.width="1px",this.liveRegion.style.height="1px",this.liveRegion.style.overflow="hidden",this.liveRegion.style.clip="rect(0, 0, 0, 0)",this.liveRegion.style.whiteSpace="nowrap",this.appendChild(this.liveRegion)}connect(){var t;(t=this.copyBtn)==null||t.addEventListener("click",this.handleCopy)}disconnect(){var t;(t=this.copyBtn)==null||t.removeEventListener("click",this.handleCopy),this.clearResetTimeout()}getCopyText(){let t=this.getAttribute("data-copy-text");if(t)return t;let e=this.querySelector("[data-part='code'] code");if(e)return e.textContent??"";let n=this.querySelector("[data-part='code']");return(n==null?void 0:n.textContent)??""}showCopiedFeedback(){this.clearResetTimeout(),this.copyIcon&&(this.copyIcon.hidden=!0),this.checkIcon&&(this.checkIcon.hidden=!1),this.setAttribute("data-state","copied"),this.liveRegion&&(this.liveRegion.textContent="Copied!"),this.resetTimeout=setTimeout(()=>{this.copyIcon&&(this.copyIcon.hidden=!1),this.checkIcon&&(this.checkIcon.hidden=!0),this.removeAttribute("data-state"),this.liveRegion&&(this.liveRegion.textContent=""),this.resetTimeout=null},2e3)}clearResetTimeout(){this.resetTimeout!==null&&(clearTimeout(this.resetTimeout),this.resetTimeout=null)}};z();customElements.get("db-code-block")||customElements.define("db-code-block",qe);var Ke=class extends N{constructor(){super(...arguments);h(this,"navData",null);h(this,"onClick",t=>{let e=t.target.closest("[data-part='toggle']");if(!e||e.closest("db-nav-tree")!==this)return;let n=e.closest("[data-part='item']");n&&this.toggle(n)});h(this,"onKey",t=>{var c,d;if(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)return;let e=document.activeElement;if(!e||!this.contains(e))return;let n=this.visibleRows(),s=e.closest("[data-part='row']"),o=s?n.indexOf(s):-1;if(o<0)return;let r=s.closest("[data-part='item']"),a=!!this.groupOf(r),l=u=>{var f;u&&(t.preventDefault(),(f=this.primary(u))==null||f.focus())};switch(t.key){case"ArrowDown":return l(n[o+1]);case"ArrowUp":return l(n[o-1]);case"Home":return l(n[0]);case"End":return l(n[n.length-1]);case"ArrowRight":if(!a)return;t.preventDefault(),this.isOpen(r)?l(this.visibleRows()[o+1]):this.setOpen(r,!0);return;case"ArrowLeft":{if(t.preventDefault(),a&&this.isOpen(r))return this.setOpen(r,!1);let u=(c=r.parentElement)==null?void 0:c.closest("[data-part='item']");if(u&&this.contains(u)){let f=u.querySelector(":scope > [data-part='row']");f&&((d=this.primary(f))==null||d.focus())}return}}})}setup(){for(let t of et(this,"[data-part='item']"))this.prepareItem(t)}connect(){this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKey);for(let t of et(this,"[data-part='group'][data-lazy]")){let e=t.closest("[data-part='item']");e&&this.isOpen(e)&&this.fill(t)}this.hasAttribute("scroll-current")&&requestAnimationFrame(()=>this.revealCurrent())}disconnect(){this.removeEventListener("click",this.onClick),this.removeEventListener("keydown",this.onKey)}prepareItem(t){let e=this.groupOf(t),n=t.querySelector(":scope > [data-part='row'] > [data-part='toggle']");if(!e||!n)return;e.id||(e.id=F("db-nav-group")),n.setAttribute("aria-controls",e.id),n instanceof HTMLButtonElement&&!n.hasAttribute("type")&&(n.type="button");let s=n.getAttribute("aria-expanded")==="true"||t.getAttribute("data-state")==="open";this.apply(t,s)}groupOf(t){return t.querySelector(":scope > [data-part='group']")}toggleOf(t){return t.querySelector(":scope > [data-part='row'] > [data-part='toggle']")}primary(t){return t.querySelector(":scope > [data-part='link']")??t.querySelector(":scope > [data-part='toggle']")}visibleRows(){return et(this,"[data-part='row']").filter(t=>!t.closest("[hidden]"))}isOpen(t){return t.getAttribute("data-state")==="open"}toggle(t){this.setOpen(t,!this.isOpen(t))}setOpen(t,e){let n=this.groupOf(t);!n||this.isOpen(t)===e||(e&&n.hasAttribute("data-lazy")&&this.fill(n),this.apply(t,e),this.dispatchEvent(new CustomEvent("db-nav-tree:toggle",{detail:{item:t,open:e},bubbles:!0})))}apply(t,e){let n=this.groupOf(t),s=this.toggleOf(t);n&&(n.hidden=!e),s==null||s.setAttribute("aria-expanded",String(e)),t.setAttribute("data-state",e?"open":"closed")}revealCurrent(){var o;let t=this.querySelector("[aria-current='page']");if(!t)return;for(let r=t.closest("[data-part='item']");r&&this.contains(r);r=((o=r.parentElement)==null?void 0:o.closest("[data-part='item']"))??null)this.groupOf(r)&&!this.groupOf(r).contains(t)||this.groupOf(r)&&this.setOpen(r,!0);let e=Rn(this);if(!e)return;let n=t.getBoundingClientRect(),s=e.getBoundingClientRect();(n.top<s.top||n.bottom>s.bottom)&&(e.scrollTop+=n.top-s.top-s.height/2+n.height/2)}data(){if(this.navData)return this.navData;let t=this.getAttribute("data-source"),e=t?globalThis[t]:void 0;return Array.isArray(e)?e:null}fill(t){let e=this.data(),n=t.dataset.path;if(!e||n==null)return;let s=e,o;for(let r of n.split(".").map(Number))o=s==null?void 0:s[r],s=o==null?void 0:o[2];o!=null&&o[2]&&(t.replaceChildren(...this.build(o[2],n)),t.removeAttribute("data-lazy"))}build(t,e){let n=this.getAttribute("base")??"",s=this.getAttribute("toggle-label")??"Toggle {label}",o=location.href.split("#")[0];return t.map(([r,a,l,c],d)=>{let u=\`\${e}.\${d}\`,f=document.createElement("li");f.setAttribute("data-part","item"),f.style.setProperty("--db-level",String(u.split(".").length-1));let m=document.createElement("div");m.setAttribute("data-part","row"),f.appendChild(m);let p=(a==null?void 0:a.replace(/[\\u0000-\\u0020]/g,""))??"";a!=null&&/^[a-z][a-z0-9+.-]*:/i.test(p)&&!/^(?:https?|mailto):/i.test(p)&&(a=null);let b=a!=null&&/^[a-z][a-z0-9+.-]*:|^\\/\\//i.test(p),g=null;if(l!=null&&l.length){if(g=document.createElement("button"),g.type="button",g.setAttribute("data-part","toggle"),g.setAttribute("aria-expanded","false"),a!=null)g.setAttribute("aria-label",s.replace("{label}",()=>r));else{let w=document.createElement("span");w.setAttribute("data-part","label"),w.textContent=r,g.appendChild(w)}g.insertAdjacentHTML("beforeend",Dn)}let y=this.getAttribute("toggle-position")==="end";if(g&&!y&&m.appendChild(g),a!=null){let w=document.createElement("a");w.setAttribute("data-part","link"),w.textContent=r,w.href=b?a:n+a,b&&(w.rel="noopener"),!c&&w.href.split("#")[0]===o&&w.setAttribute("aria-current","page"),m.appendChild(w)}if(a==null&&!(l!=null&&l.length)){let w=document.createElement("span");w.setAttribute("data-part","label"),w.textContent=r,m.appendChild(w)}if(g&&y&&m.appendChild(g),l!=null&&l.length){let w=document.createElement("ul");w.setAttribute("data-part","group"),w.dataset.lazy="",w.dataset.path=u,w.hidden=!0,f.setAttribute("data-state","closed"),f.appendChild(w),this.prepareItem(f)}return f})}},Dn='<svg data-part="chevron" viewBox="0 0 24 24" width="16" height="16" aria-hidden="true" focusable="false"><path d="m9 18 6-6-6-6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';function Rn(i){for(let t=i.parentElement;t;t=t.parentElement){let e=getComputedStyle(t).overflowY;if((e==="auto"||e==="scroll")&&t.scrollHeight>t.clientHeight)return t}return null}z();customElements.get("db-nav-tree")||customElements.define("db-nav-tree",Ke);var We=class extends N{constructor(){super(...arguments);h(this,"links",[]);h(this,"headings",[]);h(this,"observer",null);h(this,"active",null);h(this,"onScroll",()=>{let t=document.documentElement;window.innerHeight+window.scrollY>=t.scrollHeight-2&&this.headings.length&&this.setActive(this.headings[this.headings.length-1].id)});h(this,"onHash",()=>{let t=wt(location.hash.slice(1));t&&this.headings.some(e=>e.id===t)&&this.setActive(t)})}slugOf(t){return t.getAttribute("data-toc-slug")??wt(t.getAttribute("href").slice(1))}setup(){this.links=Array.from(this.querySelectorAll("a[href^='#'], a[data-toc-link]"))}connect(){var e;if(this.headings=this.links.map(n=>document.getElementById(this.slugOf(n))).filter(n=>!!n),!this.headings.length)return;let t=Number(this.getAttribute("offset")??80);typeof IntersectionObserver<"u"&&(this.observer=new IntersectionObserver(n=>{var o;let s=n.find(r=>r.isIntersecting);if(s)return this.setActive(s.target.id);this.setActive(((o=this.lastAbove(t))==null?void 0:o.id)??null)},{rootMargin:\`-\${t}px 0px -70% 0px\`,threshold:0}),this.headings.forEach(n=>this.observer.observe(n))),window.addEventListener("hashchange",this.onHash),window.addEventListener("scroll",this.onScroll,{passive:!0}),this.setActive(((e=this.lastAbove(t))==null?void 0:e.id)??this.headings[0].id)}disconnect(){var t;(t=this.observer)==null||t.disconnect(),this.observer=null,window.removeEventListener("hashchange",this.onHash),window.removeEventListener("scroll",this.onScroll)}lastAbove(t){let e=null;for(let n of this.headings)n.getBoundingClientRect().top<=t+20&&(e=n);return e}setActive(t){if(!(!t||t===this.active)){this.active=t;for(let e of this.links)this.slugOf(e)===t?(e.setAttribute("aria-current","location"),e.setAttribute("data-active","")):(e.removeAttribute("aria-current"),e.removeAttribute("data-active"));this.dispatchEvent(new CustomEvent("db-toc:change",{detail:{id:t},bubbles:!0}))}}};z();customElements.get("db-toc")||customElements.define("db-toc",We);var Mn=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],de=Mn.join(","),Ye=typeof Element>"u",Rt=Ye?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Wt=!Ye&&Element.prototype.getRootNode?function(i){var t;return i==null||(t=i.getRootNode)===null||t===void 0?void 0:t.call(i)}:function(i){return i==null?void 0:i.ownerDocument},jt=function(t,e){var n;e===void 0&&(e=!0);var s=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),o=s===""||s==="true",r=o||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):jt(t.parentNode));return r},In=function(t){var e,n=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return n===""||n==="true"},Hn=function(t,e,n){if(jt(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(de));return e&&Rt.call(t,de)&&s.unshift(t),s=s.filter(n),s},ue=function(t,e,n){for(var s=[],o=Array.from(t);o.length;){var r=o.shift();if(!jt(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),l=a.length?a:r.children,c=ue(l,!0,n);n.flatten?s.push.apply(s,c):s.push({scopeParent:r,candidates:c})}else{var d=Rt.call(r,de);d&&n.filter(r)&&(e||!t.includes(r))&&s.push(r);var u=r.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(r),f=!jt(u,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(r));if(u&&f){var m=ue(u===!0?r.children:u.children,!0,n);n.flatten?s.push.apply(s,m):s.push({scopeParent:r,candidates:m})}else o.unshift.apply(o,r.children)}}return s},Ue=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Xe=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||In(t))&&!Ue(t)?0:t.tabIndex},Nn=function(t,e){var n=Xe(t);return n<0&&e&&!Ue(t)?0:n},zn=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Ge=function(t){return t.tagName==="INPUT"},_n=function(t){return Ge(t)&&t.type==="hidden"},Pn=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return e},Fn=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]},$n=function(t){if(!t.name)return!0;var e=t.form||Wt(t),n=function(a){return e.querySelectorAll('input[type="radio"][name="'+a+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=n(window.CSS.escape(t.name));else try{s=n(t.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var o=Fn(s,t.form);return!o||o===t},Bn=function(t){return Ge(t)&&t.type==="radio"},qn=function(t){return Bn(t)&&!$n(t)},Kn=function(t){var e,n=t&&Wt(t),s=(e=n)===null||e===void 0?void 0:e.host,o=!1;if(n&&n!==t){var r,a,l;for(o=!!((r=s)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(s)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&s;){var c,d,u;n=Wt(s),s=(c=n)===null||c===void 0?void 0:c.host,o=!!((d=s)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(s))}}return o},je=function(t){var e=t.getBoundingClientRect(),n=e.width,s=e.height;return n===0&&s===0},Wn=function(t,e){var n=e.displayCheck,s=e.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}var r=getComputedStyle(t),a=r.visibility;if(a==="hidden"||a==="collapse")return!0;var l=Rt.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(Rt.call(c,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof s=="function"){for(var d=t;t;){var u=t.parentElement,f=Wt(t);if(u&&!u.shadowRoot&&s(u)===!0)return je(t);t.assignedSlot?t=t.assignedSlot:!u&&f!==t.ownerDocument?t=f.host:t=u}t=d}if(Kn(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return je(t);return!1},jn=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var n=0;n<e.children.length;n++){var s=e.children.item(n);if(s.tagName==="LEGEND")return Rt.call(e,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}e=e.parentElement}return!1},Vn=function(t,e){return!(e.disabled||_n(e)||Wn(e,t)||Pn(e)||jn(e))},Ve=function(t,e){return!(qn(e)||Xe(e)<0||!Vn(t,e))},Yn=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Ze=function(t){var e=[],n=[];return t.forEach(function(s,o){var r=!!s.scopeParent,a=r?s.scopeParent:s,l=Nn(a,r),c=r?Ze(s.candidates):a;l===0?r?e.push.apply(e,c):e.push(a):n.push({documentOrder:o,tabIndex:l,item:s,isScope:r,content:c})}),n.sort(zn).reduce(function(s,o){return o.isScope?s.push.apply(s,o.content):s.push(o.content),s},[]).concat(e)},he=function(t,e){e=e||{};var n;return e.getShadowRoot?n=ue([t],e.includeContainer,{filter:Ve.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Yn}):n=Hn(t,e.includeContainer,Ve.bind(null,e)),Ze(n)};var fe=class{constructor(i,t={}){h(this,"root");h(this,"opts");h(this,"previouslyFocused",null);h(this,"keydownHandler",null);h(this,"active",!1);this.root=i,this.opts={initialFocus:t.initialFocus??"first",returnFocus:t.returnFocus??!0}}activate(){this.active||(this.active=!0,this.previouslyFocused=document.activeElement,this.keydownHandler=i=>{if(i.key!=="Tab")return;let t=he(this.root);if(t.length===0){i.preventDefault();return}let e=t[0],n=t[t.length-1];i.shiftKey?document.activeElement===e&&(n.focus(),i.preventDefault()):document.activeElement===n&&(e.focus(),i.preventDefault())},document.addEventListener("keydown",this.keydownHandler),requestAnimationFrame(()=>{var t;if(!this.active)return;let i=he(this.root);this.opts.initialFocus instanceof HTMLElement&&this.root.contains(this.opts.initialFocus)?this.opts.initialFocus.focus():this.opts.initialFocus==="container"?(this.root.hasAttribute("tabindex")||this.root.setAttribute("tabindex","-1"),this.root.focus()):(t=i[0])==null||t.focus()}))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(document.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null),this.opts.returnFocus&&this.previouslyFocused&&document.contains(this.previouslyFocused)&&this.previouslyFocused.focus(),this.previouslyFocused=null)}isActive(){return this.active}};var B,at=(B=class{static activate(){if(B.count++,B.count>1)return;let t=window.innerWidth-document.documentElement.clientWidth;B.originalStyles={overflow:document.body.style.overflow,paddingRight:document.body.style.paddingRight},document.body.style.overflow="hidden",t>0&&(document.body.style.paddingRight=\`\${t}px\`)}static deactivate(){B.count=Math.max(0,B.count-1),!(B.count>0)&&B.originalStyles&&(document.body.style.overflow=B.originalStyles.overflow,document.body.style.paddingRight=B.originalStyles.paddingRight,B.originalStyles=null)}static reset(){B.count=0,B.originalStyles=null}},h(B,"count",0),h(B,"originalStyles",null),B);var Q=[];function Un(i){if(i.key!=="Escape"||Q.length===0)return;let t=Q[Q.length-1];t.escapePrevented||(i.preventDefault(),i.stopPropagation(),t.opts.onDismiss("escape-key"))}var Qe=!1;function Xn(){Qe||(Qe=!0,document.addEventListener("keydown",Un))}var lt=class{constructor(i,t){h(this,"root");h(this,"opts");h(this,"outsideHandler",null);h(this,"active",!1);h(this,"frameId",null);h(this,"escapePrevented",!1);this.root=i,this.opts={onDismiss:t.onDismiss,escapeKey:t.escapeKey??!0,outsidePress:t.outsidePress??!0}}activate(){this.active||(this.active=!0,this.opts.escapeKey&&(Xn(),Q.push(this)),this.opts.outsidePress&&(this.outsideHandler=i=>{if(Q.length>0&&Q[Q.length-1]!==this)return;let t=i.target;if(this.root.contains(t))return;let e=this.root.id;if(e){let s=document.querySelector(\`[aria-controls="\${e}"]\`);if(s!=null&&s.contains(t))return}let n=this.root.getAttribute("aria-labelledby");if(n){let s=document.getElementById(n);if(s!=null&&s.contains(t))return}typeof this.opts.outsidePress=="function"&&!this.opts.outsidePress(i)||this.opts.onDismiss("outside-press")},this.frameId=requestAnimationFrame(()=>{this.frameId=null,this.outsideHandler&&document.addEventListener("pointerdown",this.outsideHandler)})))}deactivate(){if(!this.active)return;this.active=!1;let i=Q.indexOf(this);i!==-1&&Q.splice(i,1),this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null),this.outsideHandler&&(document.removeEventListener("pointerdown",this.outsideHandler),this.outsideHandler=null)}isActive(){return this.active}};function me(i){let t=[],e=i;for(;e&&e!==document.body;){let n=e.parentElement;if(!n)break;for(let s=0;s<n.children.length;s++){let o=n.children[s];if(o===e||o.contains(i))continue;let r=o.tagName;if(r==="SCRIPT"||r==="STYLE"||r==="LINK")continue;let a=o.getAttribute("aria-hidden");a!=="true"&&(t.push({el:o,prev:a}),o.setAttribute("aria-hidden","true"))}e=n}return()=>{for(let{el:n,prev:s}of t)s===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",s)}}var Je=class extends N{constructor(){super(...arguments);h(this,"content",null);h(this,"backdrop",null);h(this,"trigger",null);h(this,"native",!1);h(this,"_open",!1);h(this,"openedBy",null);h(this,"focusTrap",null);h(this,"dismiss",null);h(this,"cleanupInert",null);h(this,"onTriggerClick",t=>{t.preventDefault(),this.toggle(t.currentTarget)});h(this,"onHostClick",t=>{let e=t.target.closest("[data-part='close']");e&&e.closest("db-dialog")===this&&this.close("close-press")});h(this,"onDocumentClick",t=>{var s,o,r;let e=(o=(s=t.target).closest)==null?void 0:o.call(s,"[data-dialog-for]");if(!e||e===this.trigger)return;let n=e.getAttribute("data-dialog-for");n&&(n===this.id||n===((r=this.content)==null?void 0:r.id))&&(t.preventDefault(),this.toggle(e))});h(this,"onCancel",t=>{t.preventDefault(),this.dismissible&&this.close("escape-key")});h(this,"onNativeClick",t=>{if(!this.dismissible||t.target!==this.content||!this.content)return;let e=this.content.getBoundingClientRect();!(t.clientX>=e.left&&t.clientX<=e.right&&t.clientY>=e.top&&t.clientY<=e.bottom)&&(t.clientX!==0||t.clientY!==0)&&this.close("outside-press")});h(this,"onNativeClose",()=>{this._open&&this.finishClose("close-press")})}get open(){return this._open}get dismissible(){return this.getAttribute("dismissible")!=="false"}setup(){if(this.content=$(this,"[data-part='content']"),!this.content)return;this.native=typeof HTMLDialogElement<"u"&&this.content instanceof HTMLDialogElement&&typeof this.content.showModal=="function",this.backdrop=$(this,"[data-part='backdrop']"),this.trigger=bt($(this,"[data-part='trigger']"));let t=this.content;t.id||(t.id=F("db-dialog")),this.native||(t.setAttribute("role",t.getAttribute("role")||"dialog"),t.setAttribute("aria-modal","true"),t.hidden=!this.hasAttribute("open"),this.backdrop&&(this.backdrop.hidden=!0));let e=t.querySelector("[data-part='title']");e&&!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&(e.id||(e.id=F("db-dialog-title")),t.setAttribute("aria-labelledby",e.id));let n=t.querySelector("[data-part='description']");n&&!t.hasAttribute("aria-describedby")&&(n.id||(n.id=F("db-dialog-desc")),t.setAttribute("aria-describedby",n.id));for(let s of this.triggers())this.prepareTrigger(s);this.setState("closed"),this.native||(this.focusTrap=new fe(t),this.dismiss=new lt(t,{onDismiss:s=>this.dismissible&&this.close(s)}))}connect(){var t;this.content&&((t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),this.addEventListener("click",this.onHostClick),document.addEventListener("click",this.onDocumentClick),this.native&&(this.content.addEventListener("cancel",this.onCancel),this.content.addEventListener("click",this.onNativeClick),this.content.addEventListener("close",this.onNativeClose)),queueMicrotask(()=>{if(this.isConnected){for(let e of this.triggers())e.hasAttribute("aria-controls")||this.prepareTrigger(e);this.hasAttribute("open")&&!this._open&&this.show()}}))}disconnect(){var t;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),this.removeEventListener("click",this.onHostClick),document.removeEventListener("click",this.onDocumentClick),this.content&&this.native&&(this.content.removeEventListener("cancel",this.onCancel),this.content.removeEventListener("click",this.onNativeClick),this.content.removeEventListener("close",this.onNativeClose)),this._open&&this.finishClose("api",!1)}triggers(){var n;let t=this.trigger?[this.trigger]:[],e=[this.id,(n=this.content)==null?void 0:n.id].filter(Boolean);for(let s of e)document.querySelectorAll(\`[data-dialog-for="\${CSS.escape(s)}"]\`).forEach(o=>t.push(o));return t}prepareTrigger(t){t.hasAttribute("aria-haspopup")||t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-controls",this.content.id),t.setAttribute("aria-expanded","false")}setState(t){var e,n;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t),(n=this.backdrop)==null||n.setAttribute("data-state",t)}toggle(t){this._open?this.close("trigger-press"):this.show(t)}show(t){var n,s;let e=this.content;if(!(!e||this._open)){this._open=!0,this.openedBy=t??document.activeElement??this.trigger;for(let o of this.triggers())this.prepareTrigger(o),o.setAttribute("aria-expanded","true");if(at.activate(),this.native){let o=e;o.open||o.showModal()}else e.hidden=!1,this.backdrop&&(this.backdrop.hidden=!1),this.cleanupInert=me(e),(n=this.focusTrap)==null||n.activate(),(s=this.dismiss)==null||s.activate();this.setState("open"),this.dispatchEvent(new CustomEvent("db-dialog:open",{bubbles:!0}))}}close(t="api"){this._open&&this.finishClose(t)}finishClose(t,e=!0){var o,r,a;let n=this.content;this._open=!1,this.setState("closed");for(let l of this.triggers())l.setAttribute("aria-expanded","false");if(at.deactivate(),this.native){let l=n;l.open&&l.close()}else(o=this.dismiss)==null||o.deactivate(),(r=this.focusTrap)==null||r.deactivate(),(a=this.cleanupInert)==null||a.call(this),this.cleanupInert=null,Fe(n,()=>{this._open||(n.hidden=!0,this.backdrop&&(this.backdrop.hidden=!0))});let s=this.openedBy;this.openedBy=null,e&&s&&document.contains(s)&&s.focus(),this.dispatchEvent(new CustomEvent("db-dialog:close",{detail:{reason:t},bubbles:!0}))}};z();customElements.get("db-dialog")||customElements.define("db-dialog",Je);var ti=class extends N{constructor(){super(...arguments);h(this,"input",null);h(this,"listbox",null);h(this,"empty",null);h(this,"_open",!1);h(this,"highlighted",null);h(this,"observer",null);h(this,"base",F("db-combobox"));h(this,"optionSeq",0);h(this,"onInput",()=>{this.filtering?this.filter(this.input.value):this.show()});h(this,"onFocus",()=>{(this.hasAttribute("open-on-focus")||this.filtering&&this.input.value)&&(this.filtering?this.filter(this.input.value):this.show())});h(this,"onKey",t=>{let e=this.visible(),n=this.highlighted?e.indexOf(this.highlighted):-1;switch(t.key){case"ArrowDown":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[n<0?0:Math.min(n+1,e.length-1)]);break;case"ArrowUp":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[n<0?e.length-1:Math.max(n-1,0)]);break;case"Home":case"End":this._open&&this.highlighted&&e.length&&(t.preventDefault(),this.highlight(t.key==="Home"?e[0]:e[e.length-1]));break;case"Enter":this._open&&this.highlighted&&(t.preventDefault(),this.choose(this.highlighted));break;case"Escape":this._open&&!this.inline?(t.preventDefault(),t.stopPropagation(),this.hide()):this.input.value&&(t.preventDefault(),t.stopPropagation(),this.input.value="",this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.hide());break;case"Tab":this.inline||this.hide();break}});h(this,"onListClick",t=>{let e=t.target.closest("[data-part='option']");if(!e||e.closest("db-combobox")!==this||W(e))return;let n=t.target.closest("a[href]");!this.choose(e,!n)&&n&&t.preventDefault()});h(this,"onListPointer",t=>{let e=t.target.closest("[data-part='option']");e&&e.closest("db-combobox")===this&&!W(e)&&!e.hidden&&this.highlight(e)});h(this,"onListDown",t=>t.preventDefault());h(this,"onDocDown",t=>{this._open&&!this.inline&&!this.contains(t.target)&&this.hide()})}get open(){return this._open}get inline(){return this.hasAttribute("inline")}get filtering(){return(this.getAttribute("filter")??"contains")!=="none"}options(){return this.listbox?Array.from(this.listbox.querySelectorAll("[data-part='option']")).filter(t=>t.closest("db-combobox")===this):[]}visible(){return this.options().filter(t=>!t.hidden&&!W(t))}setup(){if(this.input=$(this,"[data-part='input']"),this.listbox=$(this,"[data-part='listbox']"),this.empty=$(this,"[data-part='empty']"),!this.input||!this.listbox)return;let{input:t,listbox:e}=this;e.id||(e.id=\`\${this.base}-listbox\`),e.setAttribute("role","listbox"),t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-controls",e.id),t.setAttribute("autocomplete","off"),this.inline||(e.hidden=!0),this.prepareOptions(),this.syncExpanded()}prepareOptions(){this.options().forEach(t=>{t.id||(t.id=\`\${this.base}-option-\${++this.optionSeq}\`),t.setAttribute("role","option"),t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.matches("a[href], button")&&t.setAttribute("tabindex","-1"),t.querySelectorAll("a, button").forEach(e=>e.setAttribute("tabindex","-1")),t.parentElement&&t.parentElement!==this.listbox&&t.parentElement.localName==="li"&&!t.parentElement.hasAttribute("role")&&t.parentElement.setAttribute("role","none")})}connect(){let{input:t,listbox:e}=this;!t||!e||(t.addEventListener("input",this.onInput),t.addEventListener("focus",this.onFocus),t.addEventListener("keydown",this.onKey),e.addEventListener("click",this.onListClick),e.addEventListener("pointermove",this.onListPointer),e.addEventListener("mousedown",this.onListDown),document.addEventListener("pointerdown",this.onDocDown),typeof MutationObserver<"u"&&(this.observer=new MutationObserver(()=>this.onOptionsChanged()),this.observer.observe(e,{childList:!0,subtree:!0})))}disconnect(){var n;let{input:t,listbox:e}=this;t==null||t.removeEventListener("input",this.onInput),t==null||t.removeEventListener("focus",this.onFocus),t==null||t.removeEventListener("keydown",this.onKey),e==null||e.removeEventListener("click",this.onListClick),e==null||e.removeEventListener("pointermove",this.onListPointer),e==null||e.removeEventListener("mousedown",this.onListDown),document.removeEventListener("pointerdown",this.onDocDown),(n=this.observer)==null||n.disconnect(),this.observer=null}refresh(){this.onOptionsChanged()}onOptionsChanged(){this.prepareOptions(),this.highlighted&&!this.options().includes(this.highlighted)&&this.clearHighlight();let t=this.visible();this.filtering||(t.length||this.inline?this.show():this.hide(),t.length&&!this.highlighted&&!this.hasAttribute("no-autohighlight")&&this.highlight(t[0])),this.syncExpanded(),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count:t.length},bubbles:!0}))}filter(t){let e=t.toLowerCase().trim(),n=0;for(let o of this.options()){let r=!e||(o.textContent??"").toLowerCase().includes(e)||(o.dataset.value??"").toLowerCase().includes(e);o.hidden=!r,r&&n++}this.empty&&(this.empty.hidden=n>0||!e),this.clearHighlight(),n||e&&this.empty?this.show():this.hide();let s=this.visible();s.length&&!this.hasAttribute("no-autohighlight")&&this.highlight(s[0]),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count:n},bubbles:!0}))}syncExpanded(){if(!this.input)return;let t=this.inline?this.visible().length>0:this._open;this.input.setAttribute("aria-expanded",String(t)),this.setAttribute("data-state",t?"open":"closed")}show(){if(!this.listbox||this._open)return this.syncExpanded();this._open=!0,this.listbox.hidden=!1,this.syncExpanded()}hide(){if(this.listbox){if(this.clearHighlight(),!this._open)return this.syncExpanded();this._open=!1,this.inline||(this.listbox.hidden=!0),this.syncExpanded()}}highlight(t){var e,n,s;this.input&&((e=this.highlighted)==null||e.removeAttribute("data-highlighted"),(n=this.highlighted)==null||n.setAttribute("aria-selected","false"),this.highlighted=t,t.setAttribute("data-highlighted",""),t.setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",t.id),(s=t.scrollIntoView)==null||s.call(t,{block:"nearest"}))}clearHighlight(){var t,e,n;(t=this.highlighted)==null||t.removeAttribute("data-highlighted"),(e=this.highlighted)==null||e.setAttribute("aria-selected","false"),this.highlighted=null,(n=this.input)==null||n.removeAttribute("aria-activedescendant")}choose(t,e=!0){var a;let n=t.dataset.value??"",s=((a=t.textContent)==null?void 0:a.trim())??n,o=new CustomEvent("db-combobox:select",{detail:{value:n,text:s,option:t},bubbles:!0,cancelable:!0});if(!this.dispatchEvent(o))return!1;let r=t.matches("a[href]")?t:t.querySelector("a[href]");return r?(e&&r.click(),!0):(this.input&&(this.input.value=t.getAttribute("data-label")??s),this.inline||this.hide(),this.dispatchEvent(new CustomEvent("db-combobox:change",{detail:{value:n,text:s},bubbles:!0})),!0)}};z();customElements.get("db-combobox")||customElements.define("db-combobox",ti);var it=Math.min,j=Math.max,It=Math.round,Ht=Math.floor,U=i=>({x:i,y:i}),Gn={left:"right",right:"left",bottom:"top",top:"bottom"};function ni(i,t,e){return j(i,it(t,e))}function Et(i,t){return typeof i=="function"?i(t):i}function nt(i){return i.split("-")[0]}function xt(i){return i.split("-")[1]}function pe(i){return i==="x"?"y":"x"}function ge(i){return i==="y"?"height":"width"}function X(i){let t=i[0];return t==="t"||t==="b"?"y":"x"}function be(i){return pe(X(i))}function si(i,t,e){e===void 0&&(e=!1);let n=xt(i),s=be(i),o=ge(s),r=s==="x"?n===(e?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(r=Mt(r)),[r,Mt(r)]}function oi(i){let t=Mt(i);return[Vt(i),t,Vt(t)]}function Vt(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var ei=["left","right"],ii=["right","left"],Zn=["top","bottom"],Qn=["bottom","top"];function Jn(i,t,e){switch(i){case"top":case"bottom":return e?t?ii:ei:t?ei:ii;case"left":case"right":return t?Zn:Qn;default:return[]}}function ri(i,t,e,n){let s=xt(i),o=Jn(nt(i),e==="start",n);return s&&(o=o.map(r=>r+"-"+s),t&&(o=o.concat(o.map(Vt)))),o}function Mt(i){let t=nt(i);return Gn[t]+i.slice(t.length)}function ts(i){var t,e,n,s;return{top:(t=i.top)!=null?t:0,right:(e=i.right)!=null?e:0,bottom:(n=i.bottom)!=null?n:0,left:(s=i.left)!=null?s:0}}function ai(i){return typeof i!="number"?ts(i):{top:i,right:i,bottom:i,left:i}}function ct(i){let{x:t,y:e,width:n,height:s}=i;return{width:n,height:s,top:e,left:t,right:t+n,bottom:e+s,x:t,y:e}}function li(i,t,e){let{reference:n,floating:s}=i,o=X(t),r=be(t),a=ge(r),l=nt(t),c=o==="y",d=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2,m;switch(l){case"top":m={x:d,y:n.y-s.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:u};break;case"left":m={x:n.x-s.width,y:u};break;default:m={x:n.x,y:n.y}}let p=xt(t);return p&&(m[r]+=f*(p==="end"?1:-1)*(e&&c?-1:1)),m}async function ci(i,t){var e;t===void 0&&(t={});let{x:n,y:s,platform:o,rects:r,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:m=0}=Et(t,i),p=ai(m),g=a[f?u==="floating"?"reference":"floating":u],y=ct(await o.getClippingRect({element:(e=await(o.isElement==null?void 0:o.isElement(g)))==null||e?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),w=u==="floating"?{x:n,y:s,width:r.floating.width,height:r.floating.height}:r.reference,L=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),R=await(o.isElement==null?void 0:o.isElement(L))&&await(o.getScale==null?void 0:o.getScale(L))||{x:1,y:1},I=ct(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:L,strategy:l}):w);return{top:(y.top-I.top+p.top)/R.y,bottom:(I.bottom-y.bottom+p.bottom)/R.y,left:(y.left-I.left+p.left)/R.x,right:(I.right-y.right+p.right)/R.x}}var es=50,di=async(i,t,e)=>{let{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:ci},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:i,floating:t,strategy:s}),{x:d,y:u}=li(c,n,l),f=n,m=0,p={};for(let b=0;b<o.length;b++){let g=o[b];if(!g)continue;let{name:y,fn:w}=g,{x:L,y:R,data:I,reset:H}=await w({x:d,y:u,initialPlacement:n,placement:f,strategy:s,middlewareData:p,rects:c,platform:a,elements:{reference:i,floating:t}});d=L??d,u=R??u,p[y]={...p[y],...I},H&&m<es&&(m++,typeof H=="object"&&(H.placement&&(f=H.placement),H.rects&&(c=H.rects===!0?await r.getElementRects({reference:i,floating:t,strategy:s}):H.rects),{x:d,y:u}=li(c,f,l)),b=-1)}return{x:d,y:u,placement:f,strategy:s,middlewareData:p}};var ui=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(t){var e,n;let{placement:s,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:b=!0,...g}=Et(i,t);if((e=o.arrow)!=null&&e.alignmentOffset)return{};let y=nt(s),w=X(a),L=nt(a)===a,R=await(l.isRTL==null?void 0:l.isRTL(c.floating)),I=f||(L||!b?[Mt(a)]:oi(a)),H=p!=="none";!f&&H&&I.push(...ri(a,b,p,R));let O=[a,...I],v=await l.detectOverflow(t,g),q=[],M=((n=o.flip)==null?void 0:n.overflows)||[];if(d&&q.push(v[y]),u){let C=si(s,r,R);q.push(v[C[0]],v[C[1]])}if(M=[...M,{placement:s,overflows:q}],!q.every(C=>C<=0)){var S,x;let C=(((S=o.flip)==null?void 0:S.index)||0)+1,T=O[C];if(T&&(!(u==="alignment"?w!==X(T):!1)||M.every(D=>X(D.placement)===w?D.overflows[0]>0:!0)))return{data:{index:C,overflows:M},reset:{placement:T}};let A=(x=M.filter(k=>k.overflows[0]<=0).sort((k,D)=>k.overflows[1]-D.overflows[1])[0])==null?void 0:x.placement;if(!A)switch(m){case"bestFit":{var E;let k=(E=M.filter(D=>{if(H){let _=X(D.placement);return _===w||_==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(_=>_>0).reduce((_,P)=>_+P,0)]).sort((D,_)=>D[1]-_[1])[0])==null?void 0:E[0];k&&(A=k);break}case"initialPlacement":A=a;break}if(s!==A)return{reset:{placement:A}}}return{}}}};var is=new Set(["left","top"]);async function ns(i,t){let{placement:e,platform:n,elements:s}=i,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),r=nt(e),a=xt(e),l=X(e)==="y",c=is.has(r)?-1:1,d=o&&l?-1:1,u=Et(t,i),{mainAxis:f,crossAxis:m,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof p=="number"&&(m=a==="end"?p*-1:p),l?{x:m*d,y:f*c}:{x:f*c,y:m*d}}var hi=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(t){var e,n;let{x:s,y:o,placement:r,middlewareData:a}=t,l=await ns(t,i);return r===((e=a.offset)==null?void 0:e.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:r}}}}},fi=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(t){let{x:e,y:n,placement:s,platform:o}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:l={fn:w=>{let{x:L,y:R}=w;return{x:L,y:R}}},...c}=Et(i,t),d={x:e,y:n},u=await o.detectOverflow(t,c),f=X(s),m=pe(f),p=d[m],b=d[f],g=(w,L)=>ni(L+u[w==="y"?"top":"left"],L,L-u[w==="y"?"bottom":"right"]);r&&(p=g(m,p)),a&&(b=g(f,b));let y=l.fn({...t,[m]:p,[f]:b});return{...y,data:{x:y.x-e,y:y.y-n,enabled:{[m]:r,[f]:a}}}}}};var mi=function(i){return i===void 0&&(i={}),{name:"size",options:i,async fn(t){let{placement:e,rects:n,platform:s,elements:o}=t,{apply:r=()=>{},...a}=Et(i,t),l=await s.detectOverflow(t,a),c=nt(e),d=xt(e),u=X(e)==="y",{width:f,height:m}=n.floating,p,b;c==="top"||c==="bottom"?(p=c,b=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(b=c,p=d==="end"?"top":"bottom");let g=m-l.top-l.bottom,y=f-l.left-l.right,w=it(m-l[p],g),L=it(f-l[b],y),R=t.middlewareData.shift,I=!R,H=w,O=L;R!=null&&R.enabled.x&&(O=y),R!=null&&R.enabled.y&&(H=g),I&&!d&&(u?O=f-2*j(l.left,l.right):H=m-2*j(l.top,l.bottom)),await r({...t,availableWidth:O,availableHeight:H});let v=await s.getDimensions(o.floating);return f!==v.width||m!==v.height?{reset:{rects:!0}}:{}}}};function Yt(){return typeof window<"u"}function ut(i){return gi(i)?(i.nodeName||"").toLowerCase():"#document"}function K(i){var t;return(i==null||(t=i.ownerDocument)==null?void 0:t.defaultView)||window}function G(i){var t;return(t=(gi(i)?i.ownerDocument:i.document)||window.document)==null?void 0:t.documentElement}function gi(i){return Yt()?i instanceof Node||i instanceof K(i).Node:!1}function V(i){return Yt()?i instanceof Element||i instanceof K(i).Element:!1}function J(i){return Yt()?i instanceof HTMLElement||i instanceof K(i).HTMLElement:!1}function pi(i){return!Yt()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof K(i).ShadowRoot}function Nt(i){let{overflow:t,overflowX:e,overflowY:n,display:s}=Y(i);return/auto|scroll|overlay|hidden|clip/.test(t+n+e)&&s!=="inline"&&s!=="contents"}function bi(i){return/^(table|td|th)$/.test(ut(i))}function zt(i){try{if(i.matches(":popover-open"))return!0}catch{}try{return i.matches(":modal")}catch{return!1}}var ss=/transform|translate|scale|rotate|perspective|filter/,os=/paint|layout|strict|content/,dt=i=>!!i&&i!=="none",ve;function Ut(i){let t=V(i)?Y(i):i;return dt(t.transform)||dt(t.translate)||dt(t.scale)||dt(t.rotate)||dt(t.perspective)||!Xt()&&(dt(t.backdropFilter)||dt(t.filter))||ss.test(t.willChange||"")||os.test(t.contain||"")}function vi(i){let t=st(i);for(;J(t)&&!St(t);){if(Ut(t))return t;if(zt(t))return null;t=st(t)}return null}function Xt(){return ve==null&&(ve=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ve}function St(i){return/^(html|body|#document)$/.test(ut(i))}function Y(i){return K(i).getComputedStyle(i)}function _t(i){return V(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.scrollX,scrollTop:i.scrollY}}function st(i){if(ut(i)==="html")return i;let t=i.assignedSlot||i.parentNode||pi(i)&&i.host||G(i);return pi(t)?t.host:t}function yi(i){let t=st(i);return St(t)?(i.ownerDocument||i).body:J(t)&&Nt(t)?t:yi(t)}function At(i,t,e){var n;t===void 0&&(t=[]),e===void 0&&(e=!0);let s=yi(i),o=s===((n=i.ownerDocument)==null?void 0:n.body),r=K(s);if(o){let a=Gt(r);return t.concat(r,r.visualViewport||[],Nt(s)?s:[],a&&e?At(a):[])}else return t.concat(s,At(s,[],e))}function Gt(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function xi(i){let t=Y(i),e=parseFloat(t.width)||0,n=parseFloat(t.height)||0,s=J(i),o=s?i.offsetWidth:e,r=s?i.offsetHeight:n,a=It(e)!==o||It(n)!==r;return a&&(e=o,n=r),{width:e,height:n,$:a}}function we(i){return V(i)?i:i.contextElement}function Ct(i){let t=we(i);if(!J(t))return U(1);let e=t.getBoundingClientRect(),{width:n,height:s,$:o}=xi(t),r=(o?It(e.width):e.width)/n,a=(o?It(e.height):e.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}var rs=U(0);function Ai(i){let t=K(i);return!Xt()||!t.visualViewport?rs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function as(i,t,e){return t===void 0&&(t=!1),!!e&&t&&e===K(i)}function ht(i,t,e,n){t===void 0&&(t=!1),e===void 0&&(e=!1);let s=i.getBoundingClientRect(),o=we(i),r=U(1);t&&(n?V(n)&&(r=Ct(n)):r=Ct(i));let a=as(o,e,n)?Ai(o):U(0),l=(s.left+a.x)/r.x,c=(s.top+a.y)/r.y,d=s.width/r.x,u=s.height/r.y;if(o&&n){let f=K(o),m=V(n)?K(n):n,p=f,b=Gt(p);for(;b&&m!==p;){let g=Ct(b),y=b.getBoundingClientRect(),w=Y(b),L=y.left+(b.clientLeft+parseFloat(w.paddingLeft))*g.x,R=y.top+(b.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,c*=g.y,d*=g.x,u*=g.y,l+=L,c+=R,p=K(b),b=Gt(p)}}return ct({width:d,height:u,x:l,y:c})}function Zt(i,t){let e=_t(i).scrollLeft;return t?t.left+e:ht(G(i)).left+e}function Si(i,t){let e=i.getBoundingClientRect(),n=e.left+t.scrollLeft-Zt(i,e),s=e.top+t.scrollTop;return{x:n,y:s}}function ls(i){let{elements:t,rect:e,offsetParent:n,strategy:s}=i,o=s==="fixed",r=G(n),a=t?zt(t.floating):!1;if(n===r||a&&o)return e;let l={scrollLeft:0,scrollTop:0},c=U(1),d=U(0),u=J(n);if((u||!o)&&((ut(n)!=="body"||Nt(r))&&(l=_t(n)),u)){let m=ht(n);c=Ct(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}let f=r&&!u&&!o?Si(r,l):U(0);return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:e.y*c.y-l.scrollTop*c.y+d.y+f.y}}function cs(i){return i.getClientRects?Array.from(i.getClientRects()):[]}function ds(i){let t=_t(i),e=i.ownerDocument.body,n=j(i.scrollWidth,i.clientWidth,e.scrollWidth,e.clientWidth),s=j(i.scrollHeight,i.clientHeight,e.scrollHeight,e.clientHeight),o=-t.scrollLeft+Zt(i),r=-t.scrollTop;return Y(e).direction==="rtl"&&(o+=j(i.clientWidth,e.clientWidth)-n),{width:n,height:s,x:o,y:r}}var us=25;function hs(i,t,e){e===void 0&&(e="viewport");let n=e==="layoutViewport",s=K(i),o=G(i),r=s.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,d=0;if(r){let f=!Xt()||t==="fixed";n?f||(c=-r.offsetLeft,d=-r.offsetTop):(a=r.width,l=r.height,f&&(c=r.offsetLeft,d=r.offsetTop))}if(Zt(o)<=0){let f=o.ownerDocument,m=f.body,p=getComputedStyle(m),b=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(o.clientWidth-m.clientWidth-b),y=getComputedStyle(o).scrollbarGutter==="stable both-edges"?g/2:g;y<=us&&(a-=y)}return{width:a,height:l,x:c,y:d}}function fs(i,t){let e=ht(i,!0,t==="fixed"),n=e.top+i.clientTop,s=e.left+i.clientLeft,o=Ct(i),r=i.clientWidth*o.x,a=i.clientHeight*o.y,l=s*o.x,c=n*o.y;return{width:r,height:a,x:l,y:c}}function wi(i,t,e){let n;if(t==="viewport"||t==="layoutViewport")n=hs(i,e,t);else if(t==="document")n=ds(G(i));else if(V(t))n=fs(t,e);else{let s=Ai(i);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ct(n)}function ms(i,t){let e=t.get(i);if(e)return e;let n=At(i,[],!1).filter(a=>V(a)&&ut(a)!=="body"),s=null,o=Y(i).position==="fixed",r=o?st(i):i;for(;V(r)&&!St(r);){let a=Y(r),l=Ut(r),c=s?s.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?n=n.filter(u=>u!==r):s=a,r=st(r)}return t.set(i,n),n}function ps(i){let{element:t,boundary:e,rootBoundary:n,strategy:s}=i,r=[...e==="clippingAncestors"?zt(t)?[]:ms(t,this._c):[].concat(e),n],a=wi(t,r[0],s),l=a.top,c=a.right,d=a.bottom,u=a.left;for(let f=1;f<r.length;f++){let m=wi(t,r[f],s);l=j(m.top,l),c=it(m.right,c),d=it(m.bottom,d),u=j(m.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function gs(i){let{width:t,height:e}=xi(i);return{width:t,height:e}}function bs(i,t,e){let n=J(t),s=G(t),o=e==="fixed",r=ht(i,!0,o,t),a={scrollLeft:0,scrollTop:0},l=U(0);if((n||!o)&&((ut(t)!=="body"||Nt(s))&&(a=_t(t)),n)){let f=ht(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}!n&&s&&(l.x=Zt(s));let c=s&&!n&&!o?Si(s,a):U(0),d=r.left+a.scrollLeft-l.x-c.x,u=r.top+a.scrollTop-l.y-c.y;return{x:d,y:u,width:r.width,height:r.height}}function ye(i){return Y(i).position==="static"}function Ei(i,t){if(!J(i)||Y(i).position==="fixed")return null;if(t)return t(i);let e=i.offsetParent;return G(i)===e&&(e=e.ownerDocument.body),e}function Ci(i,t){let e=K(i);if(zt(i))return e;if(!J(i)){let s=st(i);for(;s&&!St(s);){if(V(s)&&!ye(s))return s;s=st(s)}return e}let n=Ei(i,t);for(;n&&bi(n)&&ye(n);)n=Ei(n,t);return n&&St(n)&&ye(n)&&!Ut(n)?e:n||vi(i)||e}var vs=async function(i){let t=this.getOffsetParent||Ci,e=this.getDimensions,n=await e(i.floating);return{reference:bs(i.reference,await t(i.floating),i.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ys(i){return Y(i).direction==="rtl"}var ws={convertOffsetParentRelativeRectToViewportRelativeRect:ls,getDocumentElement:G,getClippingRect:ps,getOffsetParent:Ci,getElementRects:vs,getClientRects:cs,getDimensions:gs,getScale:Ct,isElement:V,isRTL:ys};function Li(i,t){return i.x===t.x&&i.y===t.y&&i.width===t.width&&i.height===t.height}function Es(i,t,e){let n=null,s,o=G(i);function r(){var d;clearTimeout(s),(d=n)==null||d.disconnect(),n=null}function a(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let f=i.getBoundingClientRect(),{left:m,top:p,width:b,height:g}=f;if(d||t(),!b||!g)return;let y=Ht(p),w=Ht(o.clientWidth-(m+b)),L=Ht(o.clientHeight-(p+g)),R=Ht(m),H={rootMargin:-y+"px "+-w+"px "+-L+"px "+-R+"px",threshold:j(0,it(1,u))||1},O=!0;function v(q){let M=q[0].intersectionRatio;if(!Li(f,i.getBoundingClientRect()))return a();if(M!==u){if(!O)return a();M?a(!1,M):s=setTimeout(()=>{a(!1,1e-7)},1e3)}O=!1}try{n=new IntersectionObserver(v,{...H,root:o.ownerDocument})}catch{n=new IntersectionObserver(v,H)}n.observe(i)}let l=K(i),c=()=>a(e);return l.addEventListener("resize",c),a(!0),()=>{l.removeEventListener("resize",c),r()}}function ki(i,t,e,n){n===void 0&&(n={});let{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=we(i),d=s||o?[...c?At(c):[],...t?At(t):[]]:[];d.forEach(y=>{s&&y.addEventListener("scroll",e),o&&y.addEventListener("resize",e)});let u=c&&a?Es(c,e,o):null,f=-1,m=null;r&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var L;(L=m)==null||L.observe(t)})),e()}),c&&!l&&m.observe(c),t&&m.observe(t));let p,b=l?ht(i):null;l&&g();function g(){let y=ht(i);b&&!Li(b,y)&&e(),b=y,p=requestAnimationFrame(g)}return e(),()=>{var y;d.forEach(w=>{s&&w.removeEventListener("scroll",e),o&&w.removeEventListener("resize",e)}),u==null||u(),(y=m)==null||y.disconnect(),m=null,l&&cancelAnimationFrame(p)}}var Ti=hi;var Oi=fi,Di=ui,Ri=mi;var Mi=(i,t,e)=>{let n=new Map,s=e??{},o={...ws,...s.platform,_c:n};return di(i,t,{...s,platform:o})};function ft(i,t,e={}){let{placement:n="bottom-start",strategy:s="absolute",offset:o=4,flip:r=!0,shift:a=!0,padding:l=8,matchWidth:c=!1}=e,d=[Ti(o),...r?[Di({padding:l})]:[],...a?[Oi({padding:l})]:[],...c?[Ri({apply({rects:f}){Object.assign(t.style,{width:\`\${f.reference.width}px\`})}})]:[]];return t.style.position=s,ki(i,t,async()=>{let f=await Mi(i,t,{placement:n,strategy:s,middleware:d});Object.assign(t.style,{left:\`\${f.x}px\`,top:\`\${f.y}px\`});let m=f.placement.split("-")[0];t.setAttribute("data-side",m)})}var Ee=class{constructor(i){h(this,"opts");h(this,"buffer","");h(this,"timerId",null);h(this,"timeout");this.opts=i,this.timeout=i.timeout??1e3}handle(i){if(i.length!==1)return!1;this.timerId!==null&&clearTimeout(this.timerId),this.buffer+=i.toLowerCase(),this.timerId=setTimeout(()=>{this.buffer="",this.timerId=null},this.timeout);let t=this.opts.getItemCount();for(let e=0;e<t;e++)if(this.opts.getItemText(e).toLowerCase().startsWith(this.buffer))return this.opts.onMatch(e),!0;return!0}reset(){this.buffer="",this.timerId!==null&&(clearTimeout(this.timerId),this.timerId=null)}};var Ii=class extends N{constructor(){super(...arguments);h(this,"trigger",null);h(this,"content",null);h(this,"valueEl",null);h(this,"items",[]);h(this,"nativeSelect",null);h(this,"hiddenInput",null);h(this,"labelEl",null);h(this,"onLabelClick",t=>{var e;t.target.closest("[data-part='trigger']")||(t.preventDefault(),(e=this.trigger)==null||e.focus())});h(this,"dismiss",null);h(this,"typeahead",null);h(this,"cleanupFloating",null);h(this,"_open",!1);h(this,"_value","");h(this,"highlighted",-1);h(this,"syncing",!1);h(this,"onNativeChange",()=>{this.syncing||this.refresh()});h(this,"onFormReset",()=>setTimeout(()=>this.refresh()));h(this,"onTriggerClick",()=>{this.isDisabled||(this._open?this.close():this.show())});h(this,"onTriggerKeyUp",t=>{t.key===" "&&t.preventDefault()});h(this,"onTriggerKey",t=>{var o,r;if(this.isDisabled)return;let e=this.enabled();if(!this._open){if(t.key==="ArrowDown"||t.key==="ArrowUp"||t.key==="Enter"||t.key===" "||t.altKey&&t.key==="ArrowDown")t.preventDefault(),this.show(),t.key==="ArrowUp"&&e.length&&this.highlight(this.items.indexOf(e[e.length-1]));else if(t.key==="Home"||t.key==="End"){t.preventDefault(),this.show();let a=t.key==="Home"?e[0]:e[e.length-1];a&&this.highlight(this.items.indexOf(a))}else t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&((o=this.typeahead)==null||o.handle(t.key));return}if(!e.length)return;let n=this.highlighted>=0?e.indexOf(this.items[this.highlighted]):-1,s=a=>{t.preventDefault(),this.highlight(this.items.indexOf(e[a]))};switch(t.key){case"ArrowDown":return s(Math.min(n+1,e.length-1));case"ArrowUp":return t.altKey?(t.preventDefault(),this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close()):s(Math.max(n-1,0));case"Home":return s(0);case"End":return s(e.length-1);case"PageDown":return s(Math.min(n+10,e.length-1));case"PageUp":return s(Math.max(n-10,0));case"Enter":case" ":return t.preventDefault(),this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close();case"Tab":return this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close(!1);default:t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&((r=this.typeahead)==null||r.handle(t.key))}});h(this,"onListClick",t=>{let e=t.target.closest("[data-part='item']");!e||!this.items.includes(e)||W(e)||(this.select(e),this.close())});h(this,"onListPointer",t=>{let e=t.target.closest("[data-part='item']");e&&this.items.includes(e)&&!W(e)&&this.highlight(this.items.indexOf(e))});h(this,"preventBlur",t=>t.preventDefault())}get open(){return this._open}get value(){return this._value}set value(t){let e=this.items.find(n=>n.dataset.value===t);e&&this.select(e,!1)}get isDisabled(){var t;return this.hasAttribute("disabled")||!!((t=this.nativeSelect)!=null&&t.disabled)}refresh(){var n;let t=this.nativeSelect;if(!t)return;let e=this.items.find(s=>s.dataset.value===t.value);e&&this.select(e,!1),(n=this.trigger)==null||n.setAttribute("aria-disabled",String(this.isDisabled))}enabled(){return this.items.filter(t=>!W(t))}setup(){var a,l;if(this.nativeSelect=$(this,"select"),this.nativeSelect&&!$(this,"[data-part='trigger']")&&this.buildFromNative(this.nativeSelect),this.trigger=$(this,"[data-part='trigger']"),this.content=$(this,"[data-part='content']"),this.valueEl=$(this,"[data-part='value']"),!this.trigger||!this.content)return;let{trigger:t,content:e}=this;this.items=et(this,"[data-part='item']");let n=F("db-select");e.id||(e.id=\`\${n}-listbox\`),e.setAttribute("role","listbox"),e.hidden=!0,t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",e.id),t instanceof HTMLButtonElement&&!t.hasAttribute("type")&&(t.type="button"),this.isDisabled&&t.setAttribute("aria-disabled","true"),this.items.forEach((c,d)=>{c.id||(c.id=\`\${n}-item-\${d}\`),c.setAttribute("role","option"),c.setAttribute("aria-selected","false")}),et(this,"[data-part='group']").forEach(c=>{c.setAttribute("role","group");let d=c.querySelector("[data-part='label']");d&&(d.id||(d.id=F("db-select-label")),c.setAttribute("aria-labelledby",d.id))});let s=this.getAttribute("name");s&&!this.nativeSelect&&(this.hiddenInput=document.createElement("input"),this.hiddenInput.type="hidden",this.hiddenInput.name=s,this.hasAttribute("required")&&(this.hiddenInput.required=!0),this.appendChild(this.hiddenInput)),this.typeahead=new Ee({getItemCount:()=>this.enabled().length,getItemText:c=>{var d,u;return((u=(d=this.enabled()[c])==null?void 0:d.textContent)==null?void 0:u.trim())??""},onMatch:c=>{let d=this.enabled()[c];d&&(this._open?this.highlight(this.items.indexOf(d)):this.select(d))}}),this.dismiss=new lt(e,{onDismiss:c=>this.close(c!=="outside-press")});let o=((a=this.nativeSelect)==null?void 0:a.value)??this.getAttribute("default-value")??"",r=this.items.find(c=>c.dataset.value===o);r&&W(r)?this.valueEl&&(this.valueEl.textContent=((l=r.textContent)==null?void 0:l.trim())??"",this.valueEl.setAttribute("data-placeholder","")):r&&this.select(r,!1),this.setState("closed")}buildFromNative(t){let e=document.createElement("button");e.type="button",e.setAttribute("data-part","trigger"),e.className="db-select-trigger";let n=t.getAttribute("aria-label"),s=t.getAttribute("aria-labelledby"),o=!s&&t.id?document.querySelector(\`label[for="\${CSS.escape(t.id)}"]\`):null;o&&(s=o.id||(o.id=F("db-select-for"))),n&&e.setAttribute("aria-label",n),s&&e.setAttribute("aria-labelledby",s);let r=t.closest("label");if(r){if(this.labelEl=r,!n&&!s){let u=Array.from(r.childNodes).filter(f=>!(f instanceof Element&&(f===t||f.contains(t)||f.localName==="db-select"))).map(f=>f.textContent??"").join(" ").replace(/\\s+/g," ").trim();u&&e.setAttribute("aria-label",u)}}else o&&(this.labelEl=o);let a=document.createElement("span");a.setAttribute("data-part","value"),a.className="db-select-value";let l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("viewBox","0 0 24 24"),l.setAttribute("aria-hidden","true"),l.setAttribute("class","db-select-chevron"),l.innerHTML='<path d="m6 9 6 6 6-6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',e.append(a,l);let c=document.createElement("div");c.setAttribute("data-part","content"),c.className="db-select-content";let d=(u,f)=>{let m=document.createElement("div");m.setAttribute("data-part","item"),m.className="db-select-item",m.dataset.value=u.value;for(let[p,b]of Object.entries(u.dataset))b!=null&&(m.dataset[p]=b);u.disabled&&m.setAttribute("aria-disabled","true"),m.textContent=u.textContent??u.value,f.appendChild(m)};for(let u of Array.from(t.children))if(u instanceof HTMLOptGroupElement){let f=document.createElement("div");f.setAttribute("data-part","group");let m=document.createElement("div");m.setAttribute("data-part","label"),m.className="db-select-label",m.textContent=u.label,f.appendChild(m);for(let p of Array.from(u.children))p instanceof HTMLOptionElement&&d(p,f);c.appendChild(f)}else u instanceof HTMLOptionElement&&d(u,c);t.hidden=!0,t.tabIndex=-1,t.setAttribute("aria-hidden","true"),this.append(e,c)}connect(){var t,e,n,s,o,r,a,l,c,d;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.addEventListener("keydown",this.onTriggerKey),(n=this.trigger)==null||n.addEventListener("keyup",this.onTriggerKeyUp),(s=this.nativeSelect)==null||s.addEventListener("change",this.onNativeChange),(r=(o=this.nativeSelect)==null?void 0:o.form)==null||r.addEventListener("reset",this.onFormReset),(a=this.labelEl)==null||a.addEventListener("click",this.onLabelClick),(l=this.content)==null||l.addEventListener("click",this.onListClick),(c=this.content)==null||c.addEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.addEventListener("mousedown",this.preventBlur)}disconnect(){var t,e,n,s,o,r,a,l,c,d;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.removeEventListener("keydown",this.onTriggerKey),(n=this.trigger)==null||n.removeEventListener("keyup",this.onTriggerKeyUp),(s=this.nativeSelect)==null||s.removeEventListener("change",this.onNativeChange),(r=(o=this.nativeSelect)==null?void 0:o.form)==null||r.removeEventListener("reset",this.onFormReset),(a=this.labelEl)==null||a.removeEventListener("click",this.onLabelClick),(l=this.content)==null||l.removeEventListener("click",this.onListClick),(c=this.content)==null||c.removeEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.removeEventListener("mousedown",this.preventBlur),this._open&&this.close(!1)}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}show(){var r,a;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let n=vt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=ft(t,e,{placement:"bottom-start",offset:4,matchWidth:!this.hasAttribute("auto-width"),strategy:n==="top-layer"?"fixed":"absolute"});let o=this.items.find(l=>l.dataset.value===this._value&&!W(l))??this.enabled()[0];o&&this.highlight(this.items.indexOf(o)),(r=this.dismiss)==null||r.activate(),(a=this.typeahead)==null||a.reset(),t.focus()}close(t=!0){var s,o,r;let{trigger:e,content:n}=this;!e||!n||!this._open||(this._open=!1,(s=this.dismiss)==null||s.deactivate(),(o=this.cleanupFloating)==null||o.call(this),this.cleanupFloating=null,yt(n),this.setState("closed"),e.setAttribute("aria-expanded","false"),e.removeAttribute("aria-activedescendant"),this.items.forEach(a=>a.removeAttribute("data-highlighted")),this.highlighted=-1,(r=this.typeahead)==null||r.reset(),t&&e.focus())}highlight(t){var r;let e=this.items[t],n=this.content;if(!e||!n||!this.trigger)return;this.highlighted>=0&&((r=this.items[this.highlighted])==null||r.removeAttribute("data-highlighted")),this.highlighted=t,e.setAttribute("data-highlighted",""),this.trigger.setAttribute("aria-activedescendant",e.id);let s=e.offsetTop,o=s+e.offsetHeight;s<n.scrollTop?n.scrollTop=s:o>n.scrollTop+n.clientHeight&&(n.scrollTop=o-n.clientHeight)}select(t,e=!0){var o;if(W(t))return;let n=t.dataset.value??"",s=n!==this._value;this._value=n;for(let r of this.items){let a=r===t;r.setAttribute("aria-selected",String(a)),a?r.setAttribute("data-state","checked"):r.removeAttribute("data-state")}if(this.valueEl&&(this.valueEl.textContent=((o=t.textContent)==null?void 0:o.trim())??"",this.valueEl.removeAttribute("data-placeholder")),this.hiddenInput&&(this.hiddenInput.value=n),!e||!s){this.nativeSelect&&(this.nativeSelect.value=n);return}if(this.nativeSelect){this.nativeSelect.value=n,this.syncing=!0;try{this.nativeSelect.dispatchEvent(new Event("input",{bubbles:!0})),this.nativeSelect.dispatchEvent(new Event("change",{bubbles:!0}))}finally{this.syncing=!1}}this.dispatchEvent(new CustomEvent("db-select:change",{detail:{value:n},bubbles:!0}))}};z();customElements.get("db-select")||customElements.define("db-select",Ii);var Hi=class extends N{constructor(){super(...arguments);h(this,"trigger",null);h(this,"content",null);h(this,"dismiss",null);h(this,"cleanupFloating",null);h(this,"_open",!1);h(this,"onTriggerClick",()=>this.toggle());h(this,"onContentClick",t=>{let e=t.target.closest("[data-part='close']");e&&e.closest("db-popover")===this&&this.close("close-press")})}get open(){return this._open}setup(){var e;if(this.trigger=bt($(this,"[data-part='trigger']")),this.content=$(this,"[data-part='content']"),!this.trigger||!this.content)return;let t=this.content;t.id||(t.id=F("db-popover")),t.hasAttribute("role")||t.setAttribute("role","dialog"),!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&((e=this.trigger).id||(e.id=F("db-popover-trigger")),t.setAttribute("aria-labelledby",this.trigger.id)),t.hidden=!0,this.trigger.setAttribute("aria-haspopup","dialog"),this.trigger.setAttribute("aria-controls",t.id),this.trigger.setAttribute("aria-expanded","false"),this.setState("closed"),this.dismiss=new lt(t,{onDismiss:n=>this.close(n)})}connect(){var t,e;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.content)==null||e.addEventListener("click",this.onContentClick)}disconnect(){var t,e;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.content)==null||e.removeEventListener("click",this.onContentClick),this._open&&this.close("api")}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}placement(){var s,o;let t=this.getAttribute("placement");if(t)return t;let e=((s=this.content)==null?void 0:s.dataset.side)||"bottom",n=((o=this.content)==null?void 0:o.dataset.align)||"center";return\`\${e}\${n!=="center"?\`-\${n}\`:""}\`}toggle(){this._open?this.close("trigger-press"):this.show()}show(){var s;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let n=vt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=ft(t,e,{placement:this.placement(),offset:Number(this.getAttribute("offset")??8),strategy:n==="top-layer"?"fixed":"absolute"}),(s=this.dismiss)==null||s.activate(),this.hasAttribute("no-autofocus")||requestAnimationFrame(()=>{this._open&&(Pe(e)[0]??e).focus({preventScroll:!0})}),this.dispatchEvent(new CustomEvent("db-popover:open",{bubbles:!0}))}close(t="api"){var o,r;let{trigger:e,content:n}=this;if(!e||!n||!this._open)return;this._open=!1,(o=this.dismiss)==null||o.deactivate(),(r=this.cleanupFloating)==null||r.call(this),this.cleanupFloating=null;let s=n.contains(document.activeElement);yt(n),this.setState("closed"),e.setAttribute("aria-expanded","false"),t!=="outside-press"&&(s||t==="escape-key"||t==="close-press")&&e.focus(),this.dispatchEvent(new CustomEvent("db-popover:close",{detail:{reason:t},bubbles:!0}))}};z();customElements.get("db-popover")||customElements.define("db-popover",Hi);var Ni="db-announcement-closed:";var zi=class extends N{constructor(){super(...arguments);h(this,"closeButton",null);h(this,"onClose",()=>this.close())}setup(){var t;this.closeButton=[...this.querySelectorAll("[data-part='close']")].find(e=>e.closest("db-announcement")===this)??null,this.closeButton&&!this.closeButton.hasAttribute("aria-label")&&!((t=this.closeButton.textContent)!=null&&t.trim())&&this.closeButton.setAttribute("aria-label","Close announcement")}connect(){var t;(t=this.closeButton)==null||t.addEventListener("click",this.onClose)}disconnect(){var t;(t=this.closeButton)==null||t.removeEventListener("click",this.onClose)}close(){var n;let t=this.getAttribute("announcement-id")??"";try{t&&localStorage.setItem(Ni+t,"1")}catch{}let e=this.contains(document.activeElement);if(document.documentElement.setAttribute("data-announcement-closed",""),this.hidden=!0,this.style.display="none",e){let s=document.querySelector("main, [role='main']");s?(s.hasAttribute("tabindex")||s.setAttribute("tabindex","-1"),s.focus({preventScroll:!0})):(n=document.activeElement)==null||n.blur()}this.dispatchEvent(new CustomEvent("db-announcement:close",{bubbles:!0,detail:{id:t}}))}};z();customElements.get("db-announcement")||customElements.define("db-announcement",zi);var _i=class extends N{constructor(){super(...arguments);h(this,"trigger",null);h(this,"content",null);h(this,"cleanupFloating",null);h(this,"showTimer",null);h(this,"hideTimer",null);h(this,"_open",!1);h(this,"onEnter",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this._open||(this.showTimer=setTimeout(()=>this.show(),this.num("delay",200))))});h(this,"onLeave",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this.hideTimer=setTimeout(()=>this.hide(),this.num("close-delay",100)))});h(this,"onContentEnter",()=>this.clearTimers());h(this,"onFocus",()=>{let t=!0;try{t=this.trigger.matches(":focus-visible")}catch{}t&&(this.clearTimers(),this.show())});h(this,"onBlur",()=>this.hide());h(this,"onPress",()=>this.hide());h(this,"onKey",t=>{t.key==="Escape"&&this._open&&(t.preventDefault(),t.stopImmediatePropagation(),this.hide())})}get open(){return this._open}num(t,e){let n=Number(this.getAttribute(t));return Number.isFinite(n)&&this.hasAttribute(t)?n:e}setup(){var e;if(this.trigger=bt($(this,"[data-part='trigger']")),this.content=$(this,"[data-part='content']"),!this.trigger||!this.content)return;(e=this.content).id||(e.id=F("db-tooltip")),this.content.setAttribute("role","tooltip"),this.content.hidden=!0;let t=(this.trigger.getAttribute("aria-describedby")??"").split(/\\s+/).filter(Boolean);t.includes(this.content.id)||this.trigger.setAttribute("aria-describedby",[...t,this.content.id].join(" ")),this.setState("closed")}connect(){let{trigger:t,content:e}=this;!t||!e||(t.addEventListener("pointerenter",this.onEnter),t.addEventListener("pointerleave",this.onLeave),t.addEventListener("focus",this.onFocus),t.addEventListener("blur",this.onBlur),t.addEventListener("pointerdown",this.onPress),e.addEventListener("pointerenter",this.onContentEnter),e.addEventListener("pointerleave",this.onLeave))}disconnect(){let{trigger:t,content:e}=this;t==null||t.removeEventListener("pointerenter",this.onEnter),t==null||t.removeEventListener("pointerleave",this.onLeave),t==null||t.removeEventListener("focus",this.onFocus),t==null||t.removeEventListener("blur",this.onBlur),t==null||t.removeEventListener("pointerdown",this.onPress),e==null||e.removeEventListener("pointerenter",this.onContentEnter),e==null||e.removeEventListener("pointerleave",this.onLeave),this.hide()}clearTimers(){this.showTimer&&clearTimeout(this.showTimer),this.hideTimer&&clearTimeout(this.hideTimer),this.showTimer=this.hideTimer=null}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}show(){let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0,this.clearTimers();let n=vt(e);this.setState("open"),this.cleanupFloating=ft(t,e,{placement:this.getAttribute("placement")||e.dataset.side||"top",offset:8,strategy:n==="top-layer"?"fixed":"absolute"}),document.addEventListener("keydown",this.onKey,!0),this.dispatchEvent(new CustomEvent("db-tooltip:open",{bubbles:!0}))}hide(){var t;this.clearTimers(),!(!this._open||!this.content)&&(this._open=!1,document.removeEventListener("keydown",this.onKey,!0),(t=this.cleanupFloating)==null||t.call(this),this.cleanupFloating=null,yt(this.content),this.setState("closed"),this.dispatchEvent(new CustomEvent("db-tooltip:close",{bubbles:!0})))}};z();customElements.get("db-tooltip")||customElements.define("db-tooltip",_i);var Pi="sidebar_state",xs="b",As=768,Pt=new WeakMap;function Ss(i){try{return localStorage.getItem(i)}catch{return null}}function Cs(i,t){try{localStorage.setItem(i,t)}catch{}}function Se(i){if(Pt.has(i))return;let t=i.querySelector("[data-component='sidebar']");if(!t)return;let e=t.dataset.collapsible||"offcanvas",n=t.dataset.side||"left",s=t.dataset.defaultOpen!=="false",o=Ss(Pi),r=o!==null?o==="true":s,a=t.querySelector("[data-sidebar-desktop]"),l=t.querySelector("[data-sidebar-mobile]"),c=t.querySelector("[data-sidebar-mobile-backdrop]"),d=window.matchMedia(\`(max-width: \${As-1}px)\`),u={provider:i,sidebar:t,desktopSidebar:a,mobileSidebar:l,mobileBackdrop:c,collapsible:e,side:n,open:r,openMobile:!1,isMobile:d.matches,mediaQuery:d};Pt.set(i,u),Fi(u);let f=b=>{u.isMobile=b.matches,!b.matches&&u.openMobile&&ot(i)};d.addEventListener("change",f);let m=b=>{b.key===xs&&(b.metaKey||b.ctrlKey)?(b.preventDefault(),xe(i)):b.key==="Escape"&&u.openMobile&&(b.preventDefault(),ot(i))};document.addEventListener("keydown",m),Ls(i,u),c&&c.addEventListener("click",()=>{ot(i)});let p=t.querySelector("[data-part='rail']");p&&p.addEventListener("click",()=>{xe(i)})}function Ls(i,t){i.querySelectorAll("[data-part='sidebar-trigger']").forEach(e=>{e.addEventListener("click",()=>{xe(i)})})}function xe(i){let t=Pt.get(i);t&&(t.isMobile?t.openMobile?ot(i):ks(i):(t.open=!t.open,Fi(t),Cs(Pi,String(t.open))))}function Fi(i){let t=i.open?"expanded":"collapsed";i.provider.setAttribute("data-state",t),i.sidebar.setAttribute("data-state",t),i.desktopSidebar&&(i.desktopSidebar.setAttribute("data-state",t),i.open?i.desktopSidebar.setAttribute("data-collapsible",""):i.desktopSidebar.setAttribute("data-collapsible",i.collapsible))}function ks(i){var n;let t=Pt.get(i);if(!t||t.openMobile||!t.mobileSidebar)return;t.openMobile=!0;let e=(n=t.desktopSidebar)==null?void 0:n.querySelector("[data-sidebar='sidebar-inner']");if(e)for(;e.firstChild;)t.mobileSidebar.appendChild(e.firstChild);t.mobileSidebar.hidden=!1,t.mobileSidebar.setAttribute("data-state","open"),t.mobileBackdrop&&(t.mobileBackdrop.hidden=!1),at.activate(),requestAnimationFrame(()=>{var o;let s=(o=t.mobileSidebar)==null?void 0:o.querySelector('a, button, [tabindex]:not([tabindex="-1"])');s==null||s.focus()})}function ot(i){var s;let t=Pt.get(i);if(!t||!t.openMobile||!t.mobileSidebar)return;t.openMobile=!1;let e=(s=t.desktopSidebar)==null?void 0:s.querySelector("[data-sidebar='sidebar-inner']");if(e&&t.mobileSidebar)for(;t.mobileSidebar.firstChild;)e.appendChild(t.mobileSidebar.firstChild);t.mobileSidebar.setAttribute("data-state","closed"),t.mobileSidebar.hidden=!0,t.mobileBackdrop&&(t.mobileBackdrop.hidden=!0),at.deactivate();let n=t.provider.querySelector("[data-part='sidebar-trigger']");n==null||n.focus()}function Ae(){document.querySelectorAll("[data-component='sidebar-provider']").forEach(i=>{Se(i)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Ae):Ae();document.addEventListener("astro:page-load",Ae);var Qt={docs:"docs.js",shard:i=>\`t-\${i}.js\`,fragment:i=>\`f-\${i}.js\`},Jt={docs:"docs",shard:i=>i,fragment:i=>\`frag:\${i}\`};var Ts={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},Os={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},Ds="[^aeiou]",Le="[aeiouy]",rt="("+Ds+"[^aeiouy]*)",ee="("+Le+"[aeiou]*)",Ce=new RegExp("^"+rt+"?"+ee+rt),Rs=new RegExp("^"+rt+"?"+ee+rt+ee+"?$"),te=new RegExp("^"+rt+"?("+ee+rt+"){2,}"),$i=new RegExp("^"+rt+"?"+Le),Bi=new RegExp("^"+rt+Le+"[^aeiouwxy]$"),Ms=/ll$/,Is=/^(.+?)e$/,Hs=/^(.+?)y$/,Ns=/^(.+?(s|t))(ion)$/,zs=/^(.+?)(ed|ing)$/,_s=/(at|bl|iz)$/,Ps=/^(.+?)eed$/,Fs=/^.+?[^s]s$/,$s=/^.+?(ss|i)es$/,Bs=/([^aeiouylsz])\\1$/,qs=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,Ks=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,Ws=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;function qi(i){let t=String(i).toLowerCase();if(t.length<3)return t;let e=!1;t.codePointAt(0)===121&&(e=!0,t="Y"+t.slice(1)),$s.test(t)?t=t.slice(0,-2):Fs.test(t)&&(t=t.slice(0,-1));let n;return(n=Ps.exec(t))?Ce.test(n[1])&&(t=t.slice(0,-1)):(n=zs.exec(t))&&$i.test(n[1])&&(t=n[1],_s.test(t)?t+="e":Bs.test(t)?t=t.slice(0,-1):Bi.test(t)&&(t+="e")),(n=Hs.exec(t))&&$i.test(n[1])&&(t=n[1]+"i"),(n=qs.exec(t))&&Ce.test(n[1])&&(t=n[1]+Ts[n[2]]),(n=Ks.exec(t))&&Ce.test(n[1])&&(t=n[1]+Os[n[2]]),(n=Ws.exec(t))?te.test(n[1])&&(t=n[1]):(n=Ns.exec(t))&&te.test(n[1])&&(t=n[1]),(n=Is.exec(t))&&(te.test(n[1])||Rs.test(n[1])&&!Bi.test(n[1]))&&(t=n[1]),Ms.test(t)&&te.test(t)&&(t=t.slice(0,-1)),e&&(t="y"+t.slice(1)),t}var Ki=new Set("a an and are as at be by for from has have in is it its of on or that the this to was were will with you your can not".split(" ")),js=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u,Ft;function Vs(i){if(Ft===void 0)try{Ft=typeof Intl<"u"&&"Segmenter"in Intl?new Intl.Segmenter(void 0,{granularity:"word"}):null}catch{Ft=null}if(Ft)return[...Ft.segment(i)].filter(n=>n.isWordLike).map(n=>n.segment);let t=[...i];if(t.length<2)return t;let e=[];for(let n=0;n<t.length-1;n++)e.push(t[n]+t[n+1]);return e}function mt(i){let t=[];for(let e of i.toLowerCase().normalize("NFKD").replace(/[\u0300-\u036F]/g,"").normalize("NFC").matchAll(/[\\p{L}\\p{N}][\\p{L}\\p{N}_.-]*[\\p{L}\\p{N}]|[\\p{L}\\p{N}]/gu)){let n=e[0],s=n.split(/[._-]+/).filter(Boolean);if(s.length>1&&t.push(n),s.length>1&&!/[._]/.test(n)){let o=s.join("");o.length>=3&&!Ki.has(o)&&t.push(o)}for(let o of s)js.test(o)?t.push(...Vs(o)):o.length>=2&&!Ki.has(o)&&t.push(o)}return t}function ke(i,t){let e="";for(let n of i.slice(0,t))e+=/[a-z0-9]/.test(n)?n:\`_\${n.codePointAt(0).toString(16)}_\`;return e}function $t(i){if(!(!i||!/^en(-|$)/i.test(i)))return t=>/^[a-z]{3,}$/.test(t)?qi(t):t}function Lt(i){let t=[],e=[],n=[],s=!1,o={tag:[],section:[]},r={tag:[],section:[]},a=[...i.matchAll(new RegExp('(?<!\\\\S)(-?)(tag|section):(?:"([^"]*)"?|(\\\\S*))|(-?)"([^"]*)"?|(\\\\S+)',"gi"))].map(u=>{var f;return{facetNeg:u[1]==="-",facet:(f=u[2])==null?void 0:f.toLowerCase(),value:u[3]??u[4],neg:u[5],phrase:u[6],word:u[7]}}),l=!1,c=!1;for(let[u,f]of a.entries()){if(f.facet){let H=Xi(f.value??"");H&&(f.facetNeg?r:o)[f.facet].push(H);continue}let m=f.word;if(m==="OR"){c=t.length>0,s=!0;continue}if(m==="NOT"){l=!0,s=!0;continue}if(m==="AND"){s=!0;continue}let p=f.phrase!==void 0,b=l||f.neg==="-"||(m==null?void 0:m.startsWith("-"))&&m.length>1;l=!1;let g=p?f.phrase:b&&(m!=null&&m.startsWith("-"))?m.slice(1):m,y=[...new Set(mt(g))];if(!y.length){c=!1;continue}if(b){e.push(p?y:[y[0]]),s=!0,c=!1;continue}if(p){c=!1,s=!0,y.length>1&&n.push(mt(g).join(" "));for(let H of y)t.push({terms:[H],prefix:!1,exact:!0});continue}let w=u===a.length-1&&!/\\s$/.test(i);if(c){t[t.length-1].terms.push(y[0]);for(let H of y.slice(1))t.push({terms:[H],prefix:!1});c=!1;continue}let L=y[0],R=/[._-]/.test(L),I=L.replace(/-/g,"");for(let[H,O]of y.entries())t.push({terms:[O],prefix:w&&O.length>=2&&(H===y.length-1||R&&(O===L||O===I))})}let d=[...new Set(t.flatMap(u=>u.terms))];return{groups:t,not:e,phrases:n,strict:s,highlight:d,filters:o,notFilters:r}}async function Ys(i,t){let e=await t.meta(),n=typeof i=="string"?Lt(i):i,s=new Set;for(let c of n.not){let d;for(let u of c){let[f]=Ui(u,e),m=f?await t.shard(f):void 0,p=m&&Object.hasOwn(m,u)?m[u]:[],b=new Set;for(let g=0;g<p.length;g+=2)(!d||d.has(p[g]))&&b.add(p[g]);d=b}for(let u of d??[])s.add(u)}let o=Gs(n,e);if(!n.groups.length){if(!o)return[];let c=[];return e.docs.forEach(([d,u,f],m)=>o(m)&&!s.has(m)&&c.push({id:m,title:d,url:u,section:e.sections[f]??"",score:1})),c}let r=[];for(let c of n.groups)r.push(await Zs(c,e,t));let a=c=>{let d=new Map,u=new Map;for(let m of r)for(let[p,b]of m)d.set(p,(d.get(p)??0)+b),u.set(p,(u.get(p)??0)+1);let f=[];for(let[m,p]of d){if(s.has(m)||o&&!o(m)||c==="and"&&u.get(m)!==r.length)continue;let[b,g,y]=e.docs[m];f.push({id:m,title:b,url:g,section:e.sections[y]??"",score:p*(u.get(m)/r.length)})}return f.sort((m,p)=>p.score-m.score)},l=a("and");return l.length||n.strict?l:a("or")}var Z={prefix:.6,stem:.4,titleAll:1.5,titleExact:2,headingAll:1.4,headingExact:1.8,phrase:1.5,typo:.3};function Us(i,t){if(i===t)return!1;if(i.length===t.length){let o=[];for(let r=0;r<i.length&&o.length<=2;r++)i[r]!==t[r]&&o.push(r);return o.length===1?!0:o.length===2&&o[1]===o[0]+1&&i[o[0]]===t[o[1]]&&i[o[1]]===t[o[0]]}let[e,n]=i.length<t.length?[i,t]:[t,i];if(n.length-e.length!==1)return!1;let s=0;for(;s<e.length&&e[s]===n[s];)s++;return e.slice(s)===n.slice(s+1)}function Ui(i,t,e=!1){let n=Xs(t);for(let o=Math.min(i.length,ji);o>=1;o--){let r=ke(i,o);if(n.has(r))return!e||o<i.length?[r]:[r,...t.shards.filter(a=>a.length>r.length&&a.startsWith(r)).slice(0,10)]}let s=ke(i,Math.min(i.length,ji));return e?t.shards.filter(o=>o.startsWith(s)).slice(0,10):[]}var ji=3,Vi=new WeakMap;function Xs(i){let t=Vi.get(i);return t||Vi.set(i,t=new Set(i.shards)),t}function Xi(i){return i.replace(/"/g,"").trim().toLowerCase()}function Gs(i,t){let{tag:e,section:n}=i.filters,s=i.notFilters??{tag:[],section:[]};if(!e.length&&!n.length&&!s.tag.length&&!s.section.length)return;let o=(d,u)=>new Set(d.flatMap((f,m)=>u.includes(Xi(f))?[m]:[])),r=o(t.sections,n),a=o(t.tags??[],e),l=o(t.sections,s.section),c=o(t.tags??[],s.tag);return d=>{let u=t.docs[d],f=u[3]??[];return!(n.length&&!r.has(u[2])||e.length&&!f.some(m=>a.has(m))||l.has(u[2])||f.some(m=>c.has(m)))}}async function Zs(i,t,e){i.corrected=void 0;let n=$t(t.lang),s=new Map,o=new Map;for(let d of i.terms)for(let u of Ui(d,t,i.prefix)){let f=await e.shard(u);if(!f)continue;let m=(y,w)=>{w>(s.get(y)??0)&&(s.set(y,w),o.set(y,f))};Object.hasOwn(f,d)&&m(d,1);let p=n==null?void 0:n(d),b=p?p.slice(0,Math.max(3,p.length-1)):void 0,g=0;for(let y in f)y!==d&&(i.prefix&&y.startsWith(d)&&g++<200&&m(y,Z.prefix),p&&b&&y.startsWith(b)&&n(y)===p&&m(y,Z.stem));if(!s.size&&!i.exact&&d.length>=4&&!/[._-]/.test(d))for(let y in f)Math.abs(y.length-d.length)<=1&&Us(d,y)&&m(y,Z.typo)}[...s.values()].some(d=>d===Z.typo)&&(i.corrected=[...s].filter(([,d])=>d===Z.typo).map(([d])=>d));let r=[...s].map(([d,u])=>[o.get(d)[d],u]),a=new Set;for(let[d]of r)for(let u=0;u<d.length;u+=2)a.add(d[u]);let l=Math.log(1+(t.count-a.size+.5)/(a.size+.5)),c=new Map;for(let[d,u]of r)for(let f=0;f<d.length;f+=2)c.set(d[f],Math.max(c.get(d[f])??0,d[f+1]*u*l));return c}async function Gi(i,t){var o;let e=await t.meta(),n=[...new Set(i.map(r=>Math.floor(r.id/e.block)))],s=new Map;await Promise.all(n.map(async r=>s.set(r,await t.fragment(r))));for(let r of i)r.fragment??(r.fragment=(o=s.get(Math.floor(r.id/e.block)))==null?void 0:o[r.id%e.block])}async function Qs(i,t,e,n=10){let s=t.slice(0,n);await Gi(s,e);let o=i.groups,r=$t((await e.meta()).lang),a=(l,c)=>c.terms.some(d=>l===d||c.prefix&&l.startsWith(d)||r!==void 0&&r(l)===r(d))||(c.corrected??[]).includes(l);for(let l of s){let[c,d]=l.fragment??["",[]],u=mt(l.title),f=1;o.length&&o.every(p=>u.some(b=>a(b,p)))&&(f=Yi(u,o,a)?Z.titleExact:Z.titleAll);let m=[];for(let[p,b]of d){let g=mt(p);!o.length||!o.every(y=>g.some(w=>a(w,y)))||(m.push([p,b]),f=Math.max(f,Yi(g,o,a)?Z.headingExact:Z.headingAll))}if(l.sections=m.slice(0,3),i.phrases.length){let p=[l.title,c,...d.map(([b])=>b)].map(b=>mt(b).join(" ")).join(" \\0 ");i.phrases.every(b=>p.includes(b))&&(f*=Z.phrase)}l.score*=f}return s.sort((l,c)=>c.score-l.score),[...s,...t.slice(n)]}async function Zi(i,t,e){await Gi(t,e);let n=$t((await e.meta()).lang),s=(o,r)=>r.terms.some(a=>o===a||r.prefix&&o.startsWith(a)||n!==void 0&&n(o)===n(a))||(r.corrected??[]).includes(o);for(let o of t)!o.fragment||o.sections||(o.sections=o.fragment[1].filter(([r])=>{let a=mt(r);return i.groups.length>0&&i.groups.every(l=>a.some(c=>s(c,l)))}).slice(0,3))}function Yi(i,t,e){return i.every(n=>t.some(s=>e(n,s)))&&t.every(n=>i.some(s=>e(s,n)))}async function Qi(i,t,e=10){let n=Lt(i),s=$t((await t.meta()).lang);s&&(n.highlight=[...new Set([...n.highlight,...n.highlight.map(s).filter(r=>r.length>=3)])]);let o=await Ys(n,t);return n.highlight=[...new Set([...n.highlight,...n.groups.flatMap(r=>r.corrected??[])])],{parsed:n,results:await Qs(n,o,t,e)}}function Ji(i,t,e=globalThis){let n=new Map,s=e.__DOGSBAY_SEARCH__??{q:[],load(){}};for(let[l,c]of s.q)n.set(l,c);s.q=[],s.load=(l,c)=>void n.set(l,c),e.__DOGSBAY_SEARCH__=s;let o=async(l,c)=>(n.has(l)||await t(i+c),n.get(l)),r,a={meta:()=>r??(r=o(Jt.docs,Qt.docs).then(l=>{if(!l||l.format!==4)throw new Error(\`search index format \${(l==null?void 0:l.format)??"missing"}, expected \${4}: rebuild the site\`);return l})),shard:async l=>(await a.meta()).shards.includes(l)?o(Jt.shard(l),Qt.shard(l)):void 0,fragment:l=>o(Jt.fragment(l),Qt.fragment(l))};return a}function tn(i){let t,e=new URL(i||"./",location.href).pathname;return async n=>{t??(t=import(new URL(\`\${i}pagefind/pagefind.js\`,location.href).href).catch(d=>{throw t=void 0,d}));let s=n.replace(new RegExp('(?<!\\\\S)-?(tag|section):("[^"]*"?|\\\\S*)',"gi")," ").trim(),o=s?await(await t).search(s):null,r=(o==null?void 0:o.results)??[],a=async(d,u)=>{let f=await d.data(),m=f.url.startsWith(e)?f.url.slice(e.length):f.url.replace(/^\\/+/,""),p=(f.sub_results??[]).map(b=>[b.title,b.url.split("#")[1]??""]).filter(([,b])=>b);return{id:u,title:f.meta.title??m,url:m,section:"",score:r.length-u,fragment:[Js(f.excerpt),p],sections:p.slice(0,3)}},l=await Promise.all(r.slice(0,10).map(a)),c=Promise.all(r.slice(10,30).map((d,u)=>a(d,u+10)));return c.catch(()=>{}),{results:l,more:c,total:r.length,highlight:Lt(n).highlight}}}function Js(i){return new DOMParser().parseFromString(i,"text/html").body.textContent??""}function en(i){let{signal:t}=i,e=document.getElementById("db-search");if(!e)return;let n=e.querySelector("[data-db-search-input]"),s=e.querySelector("[data-part='listbox']"),o=e.querySelector("[data-db-search-status]"),r=o.textContent??"",a=Ji(\`\${i.unitRoot}_dogsbay/search/\`,i.loadScript,window),l=document.body.dataset.search??"builtin",c=location.protocol!=="file:",d=l==="pagefind"||l==="both"&&c?tn(i.unitRoot):void 0,u=l==="pagefind"&&!c;e.addEventListener("db-dialog:open",()=>{n.focus(),n.select(),u?o.textContent=s.dataset.needsServer??"":d||a.meta().catch(()=>o.textContent="Search index could not be loaded.")},{signal:t}),document.addEventListener("keydown",S=>{let x=S.target.closest("input, textarea, select, [contenteditable]");(S.key==="/"&&!x||S.key.toLowerCase()==="k"&&(S.metaKey||S.ctrlKey))&&(S.preventDefault(),e.open?n.focus():e.show())},{signal:t}),s.addEventListener("click",S=>{S.target.closest("a")&&e.close("api")},{signal:t});let f=0,m,p;n.addEventListener("input",()=>{clearTimeout(p),p=setTimeout(()=>void y(++f),80)},{signal:t});let b=new Map,g=typeof IntersectionObserver=="function"?new IntersectionObserver(S=>{var x;for(let E of S)E.isIntersecting&&((x=b.get(E.target))==null||x(),b.delete(E.target),g.unobserve(E.target))}):void 0,y=async S=>{let x=n.value.trim();if(!x){g==null||g.disconnect(),b.clear(),w.hidden=!0,s.replaceChildren(),o.textContent=r;return}if(!u)try{if(d){let E=await d(x);if(S!==f)return;O(x,E.results,E.highlight,E.total);let C=await E.more;S===f&&C.length&&v(x,C,E.highlight)}else{let E=await Qi(x,a);if(S!==f)return;m=E.parsed,O(x,E.results.slice(0,30),E.parsed.highlight,E.results.length,E.results)}}catch{S===f&&(o.textContent="Search index could not be loaded.")}},w=document.createElement("div");w.setAttribute("role","group"),w.setAttribute("aria-label",s.dataset.filterSection??"Filter by section"),w.className="flex flex-wrap gap-1 px-3 pb-2",w.hidden=!0,s.before(w),t==null||t.addEventListener("abort",()=>{clearTimeout(p),f++,g==null||g.disconnect(),b.clear(),w.remove()});let L=S=>S.replace(/"/g,""),R=S=>\`section:"\${L(S)}"\`,I,H=(S,x)=>{let E=new Map;for(let k of x)k.section&&E.set(k.section,(E.get(k.section)??0)+1);let C=[...S.matchAll(/section:"([^"]*)"/gi)].map(k=>k[1].toLowerCase()),T=k=>C.includes(L(k).toLowerCase()),A=[...E].sort((k,D)=>D[1]-k[1]).slice(0,6).map(([k])=>k);for(let k of C)A.some(D=>L(D).toLowerCase()===k)||A.push(k);w.replaceChildren(...A.length>1||C.length?A.map(k=>{let D=document.createElement("button");D.type="button";let _=T(k);return D.setAttribute("aria-pressed",String(_)),D.className="rounded-full border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",D.textContent=k,D.addEventListener("click",()=>{let P=R(k),tt=n.value.replace(new RegExp(\`\\\\s*section:"\${L(k).replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&")}"\`,"i"),"").trim();n.value=_?tt:\`\${tt} \${P}\`.trim(),I=k,n.dispatchEvent(new Event("input",{bubbles:!0}))},{signal:t}),D}):[]),w.hidden=!w.childElementCount,I!==void 0&&(([...w.querySelectorAll("button")].find(D=>D.textContent===I)??n).focus(),I=void 0)},O=(S,x,E,C,T=x)=>{g==null||g.disconnect(),b.clear(),H(S,T),s.replaceChildren(...q(S,x,E)),o.textContent=C?\`\${C} result\${C===1?"":"s"}\`:\`\${s.dataset.noResults} \\u201C\${S}\\u201D\`},v=(S,x,E)=>s.append(...q(S,x,E)),q=(S,x,E)=>{let C=[];for(let T of x){let A=M(T.url,E,"block rounded-md p-3 hover:bg-accent"),k=document.createElement("div");if(k.className="font-medium",k.append(...Te(T.title,E)),A.a.appendChild(k),T.section){let P=document.createElement("div");P.className="text-xs text-muted-foreground",P.textContent=T.section,A.a.appendChild(P)}let D=document.createElement("div");D.className="mt-1 line-clamp-2 text-xs text-muted-foreground",A.a.appendChild(D),C.push(A.li);let _=()=>T.fragment?(T.fragment[0]&&D.replaceChildren(...Te(T.fragment[0],E)),(T.sections??[]).map(([P,tt])=>{let qt=M(\`\${T.url}#\${tt}\`,E,"ml-4 block rounded-md border-l px-3 py-1.5 text-sm hover:bg-accent");return qt.a.append(...Te(P,E)),qt.li})):[];if(T.fragment)C.push(..._());else if(g){let P=m??Lt(S);b.set(A.li,()=>void Zi(P,[T],a).then(()=>A.li.after(..._()),()=>{})),g.observe(A.li)}}return C},M=(S,x,E)=>{let C=document.createElement("li");C.setAttribute("role","none"),C.className="mb-1";let T=document.createElement("a");return T.setAttribute("data-part","option"),T.dataset.value=S,T.href=to(i.unitRoot+S,x),T.tabIndex=-1,T.className=E,C.appendChild(T),{li:C,a:T}}}function to(i,t){if(!t.length)return i;let e=i.indexOf("#"),[n,s]=e<0?[i,""]:[i.slice(0,e),i.slice(e)];return\`\${n}\${n.includes("?")?"&":"?"}h=\${encodeURIComponent(t.join(" "))}\${s}\`}function Te(i,t){if(!t.length)return[document.createTextNode(i)];let e=new RegExp(\`(\${t.map(n=>n.replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&")).join("|")})\`,"gi");return i.split(e).map((n,s)=>{if(s%2===0)return document.createTextNode(n);let o=document.createElement("mark");return o.textContent=n,o})}var nn=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u;function sn(i){var b;let t;try{t=(new URLSearchParams(location.search).get("h")??"").split(/\\s+/).filter(g=>g.length>0)}catch{return}let e=document.querySelector("#db-content article")??document.querySelector("#db-content");if(!t.length||!e)return;let n=g=>g.replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&"),s=[...t].sort((g,y)=>y.length-g.length),o=s.filter(g=>nn.test(g)).map(n),r=s.filter(g=>!nn.test(g)).map(n),a=[r.length?\`(?<![\\\\p{L}\\\\p{N}])(?:\${r.join("|")})\`:"",o.length?\`(?:\${o.join("|")})\`:""].filter(Boolean),l=new RegExp(\`(\${a.join("|")})\`,"giu"),c=[],d=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:g=>{var y;return(y=g.parentElement)!=null&&y.closest("script, style, mark, button, [aria-hidden='true']")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),u=[];for(let g=d.nextNode();g;g=d.nextNode())u.push(g);for(let g of u){if(c.length>=500)break;let y=g.data;if(l.lastIndex=0,!l.test(y))continue;l.lastIndex=0;let w=document.createDocumentFragment(),L=0;for(let R of y.matchAll(l)){w.append(y.slice(L,R.index));let I=document.createElement("mark");I.className="db-search-hl",I.textContent=R[0],w.append(I),c.push(I),L=R.index+R[0].length}w.append(y.slice(L)),g.replaceWith(w)}if(eo(),!c.length)return;let f=((b=document.querySelector("[data-clear-highlights]"))==null?void 0:b.dataset.clearHighlights)??"Clear highlights",m=document.createElement("div");m.className="not-prose mb-4";let p=document.createElement("button");p.type="button",p.className="inline-flex h-8 items-center rounded-md border px-3 text-sm hover:bg-accent",p.textContent=f,p.addEventListener("click",()=>{var g;for(let y of c)y.replaceWith(document.createTextNode(y.textContent??""));e.normalize(),m.remove(),(g=document.getElementById("db-content"))==null||g.focus({preventScroll:!0})},{signal:i}),m.append(p),e.prepend(m),location.hash||c[0].scrollIntoView({block:"center"})}function eo(){try{let i=new URL(location.href);i.searchParams.delete("h"),history.replaceState(history.state,"",i.toString())}catch{}}var pt=Object.assign||function(i){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n])}return i},ie=function(t){return t.tagName==="IMG"},io=function(t){return NodeList.prototype.isPrototypeOf(t)},ne=function(t){return t&&t.nodeType===1},on=function(t){var e=t.currentSrc||t.src;return e.substr(-4).toLowerCase()===".svg"},rn=function(t){try{return Array.isArray(t)?t.filter(ie):io(t)?[].slice.call(t).filter(ie):ne(t)?[t].filter(ie):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(ie):[]}catch{throw new TypeError(\`The provided selector is invalid.
1359
+ Expects a CSS selector, a Node element, a NodeList or an array.
1360
+ See: https://github.com/francoischalifour/medium-zoom\`)}},no=function(t){var e=document.createElement("div");return e.classList.add("medium-zoom-overlay"),e.style.background=t,e},so=function(t){var e=t.getBoundingClientRect(),n=e.top,s=e.left,o=e.width,r=e.height,a=t.cloneNode(),l=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,c=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return a.removeAttribute("id"),a.style.position="absolute",a.style.top=n+l+"px",a.style.left=s+c+"px",a.style.width=o+"px",a.style.height=r+"px",a.style.transform="",a},kt=function(t,e){var n=pt({bubbles:!1,cancelable:!1,detail:void 0},e);if(typeof window.CustomEvent=="function")return new CustomEvent(t,n);var s=document.createEvent("CustomEvent");return s.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),s},oo=function i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=window.Promise||function(x){function E(){}x(E,E)},s=function(x){var E=x.target;if(E===q){p();return}L.indexOf(E)!==-1&&b({target:E})},o=function(){if(!(I||!v.original)){var x=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(H-x)>O.scrollOffset&&setTimeout(p,150)}},r=function(x){var E=x.key||x.keyCode;(E==="Escape"||E==="Esc"||E===27)&&p()},a=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=x;if(x.background&&(q.style.background=x.background),x.container&&x.container instanceof Object&&(E.container=pt({},O.container,x.container)),x.template){var C=ne(x.template)?x.template:document.querySelector(x.template);E.template=C}return O=pt({},O,E),L.forEach(function(T){T.dispatchEvent(kt("medium-zoom:update",{detail:{zoom:M}}))}),M},l=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return i(pt({},O,x))},c=function(){for(var x=arguments.length,E=Array(x),C=0;C<x;C++)E[C]=arguments[C];var T=E.reduce(function(A,k){return[].concat(A,rn(k))},[]);return T.filter(function(A){return L.indexOf(A)===-1}).forEach(function(A){L.push(A),A.classList.add("medium-zoom-image")}),R.forEach(function(A){var k=A.type,D=A.listener,_=A.options;T.forEach(function(P){P.addEventListener(k,D,_)})}),M},d=function(){for(var x=arguments.length,E=Array(x),C=0;C<x;C++)E[C]=arguments[C];v.zoomed&&p();var T=E.length>0?E.reduce(function(A,k){return[].concat(A,rn(k))},[]):L;return T.forEach(function(A){A.classList.remove("medium-zoom-image"),A.dispatchEvent(kt("medium-zoom:detach",{detail:{zoom:M}}))}),L=L.filter(function(A){return T.indexOf(A)===-1}),M},u=function(x,E){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return L.forEach(function(T){T.addEventListener("medium-zoom:"+x,E,C)}),R.push({type:"medium-zoom:"+x,listener:E,options:C}),M},f=function(x,E){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return L.forEach(function(T){T.removeEventListener("medium-zoom:"+x,E,C)}),R=R.filter(function(T){return!(T.type==="medium-zoom:"+x&&T.listener.toString()===E.toString())}),M},m=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=x.target,C=function(){var A={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},k=void 0,D=void 0;if(O.container)if(O.container instanceof Object)A=pt({},A,O.container),k=A.width-A.left-A.right-O.margin*2,D=A.height-A.top-A.bottom-O.margin*2;else{var _=ne(O.container)?O.container:document.querySelector(O.container),P=_.getBoundingClientRect(),tt=P.width,qt=P.height,dn=P.left,un=P.top;A=pt({},A,{width:tt,height:qt,left:dn,top:un})}k=k||A.width-O.margin*2,D=D||A.height-O.margin*2;var Ot=v.zoomedHd||v.original,hn=on(Ot)?k:Ot.naturalWidth||k,fn=on(Ot)?D:Ot.naturalHeight||D,Kt=Ot.getBoundingClientRect(),mn=Kt.top,pn=Kt.left,ae=Kt.width,le=Kt.height,gn=Math.min(Math.max(ae,hn),k)/ae,bn=Math.min(Math.max(le,fn),D)/le,ce=Math.min(gn,bn),vn=(-pn+(k-ae)/2+O.margin+A.left)/ce,yn=(-mn+(D-le)/2+O.margin+A.top)/ce,Re="scale("+ce+") translate3d("+vn+"px, "+yn+"px, 0)";v.zoomed.style.transform=Re,v.zoomedHd&&(v.zoomedHd.style.transform=Re)};return new n(function(T){if(E&&L.indexOf(E)===-1){T(M);return}var A=function tt(){I=!1,v.zoomed.removeEventListener("transitionend",tt),v.original.dispatchEvent(kt("medium-zoom:opened",{detail:{zoom:M}})),T(M)};if(v.zoomed){T(M);return}if(E)v.original=E;else if(L.length>0){var k=L;v.original=k[0]}else{T(M);return}if(v.original.dispatchEvent(kt("medium-zoom:open",{detail:{zoom:M}})),H=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,I=!0,v.zoomed=so(v.original),document.body.appendChild(q),O.template){var D=ne(O.template)?O.template:document.querySelector(O.template);v.template=document.createElement("div"),v.template.appendChild(D.content.cloneNode(!0)),document.body.appendChild(v.template)}if(v.original.parentElement&&v.original.parentElement.tagName==="PICTURE"&&v.original.currentSrc&&(v.zoomed.src=v.original.currentSrc),document.body.appendChild(v.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),v.original.classList.add("medium-zoom-image--hidden"),v.zoomed.classList.add("medium-zoom-image--opened"),v.zoomed.addEventListener("click",p),v.zoomed.addEventListener("transitionend",A),v.original.getAttribute("data-zoom-src")){v.zoomedHd=v.zoomed.cloneNode(),v.zoomedHd.removeAttribute("srcset"),v.zoomedHd.removeAttribute("sizes"),v.zoomedHd.removeAttribute("loading"),v.zoomedHd.src=v.zoomed.getAttribute("data-zoom-src"),v.zoomedHd.onerror=function(){clearInterval(_),console.warn("Unable to reach the zoom image target "+v.zoomedHd.src),v.zoomedHd=null,C()};var _=setInterval(function(){v.zoomedHd.complete&&(clearInterval(_),v.zoomedHd.classList.add("medium-zoom-image--opened"),v.zoomedHd.addEventListener("click",p),document.body.appendChild(v.zoomedHd),C())},10)}else if(v.original.hasAttribute("srcset")){v.zoomedHd=v.zoomed.cloneNode(),v.zoomedHd.removeAttribute("sizes"),v.zoomedHd.removeAttribute("loading");var P=v.zoomedHd.addEventListener("load",function(){v.zoomedHd.removeEventListener("load",P),v.zoomedHd.classList.add("medium-zoom-image--opened"),v.zoomedHd.addEventListener("click",p),document.body.appendChild(v.zoomedHd),C()})}else C()})},p=function(){return new n(function(x){if(I||!v.original){x(M);return}var E=function C(){v.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(v.zoomed),v.zoomedHd&&document.body.removeChild(v.zoomedHd),document.body.removeChild(q),v.zoomed.classList.remove("medium-zoom-image--opened"),v.template&&document.body.removeChild(v.template),I=!1,v.zoomed.removeEventListener("transitionend",C),v.original.dispatchEvent(kt("medium-zoom:closed",{detail:{zoom:M}})),v.original=null,v.zoomed=null,v.zoomedHd=null,v.template=null,x(M)};I=!0,document.body.classList.remove("medium-zoom--opened"),v.zoomed.style.transform="",v.zoomedHd&&(v.zoomedHd.style.transform=""),v.template&&(v.template.style.transition="opacity 150ms",v.template.style.opacity=0),v.original.dispatchEvent(kt("medium-zoom:close",{detail:{zoom:M}})),v.zoomed.addEventListener("transitionend",E)})},b=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=x.target;return v.original?p():m({target:E})},g=function(){return O},y=function(){return L},w=function(){return v.original},L=[],R=[],I=!1,H=0,O=e,v={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?O=t:(t||typeof t=="string")&&c(t),O=pt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},O);var q=no(O.background);document.addEventListener("click",s),document.addEventListener("keyup",r),document.addEventListener("scroll",o),window.addEventListener("resize",p);var M={open:m,close:p,toggle:b,update:a,clone:l,attach:c,detach:d,on:u,off:f,getOptions:g,getImages:y,getZoomedImage:w};return M};function ro(i,t){t===void 0&&(t={});var e=t.insertAt;if(!(!i||typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",e==="top"&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=i:s.appendChild(document.createTextNode(i))}}var ao=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";ro(ao);var an=oo;var lo;function ln(i){let t=document.body.dataset.imageZoom;if(!t)return;let e;try{e=JSON.parse(t)}catch{return}let n=[...document.querySelectorAll('img[data-zoomable="true"]')];if(!n.length)return;let s=lo??(lo=an());s.update(e),s.attach(...n),i==null||i.addEventListener("abort",()=>{s.close(),s.detach(...n)});let o={signal:i},r=!1,a=l=>l.key==="Enter"||l.key===" ";for(let l of n)l.alt&&(l.tabIndex=0,l.addEventListener("keydown",c=>{a(c)&&(c.preventDefault(),r=!0,s.open({target:l}))},o),l.addEventListener("medium-zoom:opened",()=>{let c=document.querySelector(".medium-zoom-image--opened");!r||!c||(c.tabIndex=-1,c.addEventListener("keydown",d=>{a(d)&&(d.preventDefault(),s.close())}),c.focus())},o),l.addEventListener("medium-zoom:closed",()=>{r&&l.focus(),r=!1},o))}function se(i){return!/^[\\x00-\\x20]*([a-z][a-z0-9+.-]*:|[\\\\/])/i.test(i.replace(/[\\t\\n\\r]/g,""))}var Oe=new Map;function cn(i){let t=Oe.get(i);return t||(t=new Promise((e,n)=>{let s=document.createElement("script");s.src=i,s.onload=()=>e(),s.onerror=()=>{Oe.delete(i),n(new Error(\`could not load \${i}\`))},document.head.appendChild(s)}),Oe.set(i,t)),t}function co(i){document.querySelectorAll("[data-component='theme-toggle']").forEach(t=>{let e=()=>t.setAttribute("aria-pressed",String(document.documentElement.classList.contains("dark")));e(),t.addEventListener("click",()=>{let n=!document.documentElement.classList.contains("dark");document.documentElement.classList.toggle("dark",n);try{localStorage.setItem("theme",n?"dark":"light")}catch{}e()},{signal:i})})}function uo(i){document.addEventListener("click",async t=>{var s,o,r,a;let e=t.target.closest("[data-copy-markdown]");if(!e)return;let n=(((s=document.getElementById("db-page-markdown"))==null?void 0:s.textContent)??"").replace(/<\\\\\\/(script)/gi,"</$1").replace(/<\\\\!--/g,"<!--");try{await navigator.clipboard.writeText(n);let l=(o=e.dataset).label??(o.label=e.textContent??"");e.textContent="Copied",clearTimeout(Number(e.dataset.timer)),e.dataset.timer=String(setTimeout(()=>e.textContent=l,1500))}catch{}(a=(r=e.closest("db-popover"))==null?void 0:r.close)==null||a.call(r,"close-press")},{signal:i})}function ho(i,t){let e=document.body.dataset.page??"index.html";document.querySelectorAll("select[data-db-switch]").forEach(n=>{n.addEventListener("change",async()=>{var a;let s=n.selectedOptions[0];if(!s||s.disabled||!s.hasAttribute("value"))return;let o=s.dataset.prefix??"",r=n.value;if(s.hasAttribute("data-link")){(se(r)||/^https?:\\/\\//i.test(r))&&(location.href=r);return}if(!(!se(r)||!se(o))){if(n.dataset.dbSwitch==="product"){location.href=r;return}try{let l=o?\`\${i}\${o}/\`:i;await cn(\`\${l}_dogsbay/pages.js\`);let c=(a=window.__DOGSBAY_PAGES__)==null?void 0:a[o];location.href=c&&!c.includes(e)?\`\${l}index.html\`:r}catch{location.href=r}}},{signal:t})})}function fo(i){document.addEventListener("click",t=>{var n;let e=t.target.closest("a.db-anchor");!e||location.protocol==="file:"||(n=navigator.clipboard)==null||n.writeText(e.href).catch(()=>{})},{signal:i})}var Bt=new Map,re=new Set;function oe(){for(let[i,t]of Bt)i.isConnected||(ot(i),t.abort(),Bt.delete(i));for(let i of re)i.isConnected||ot(i)}function mo(i,t){let e=EventTarget.prototype,n=e.addEventListener,s=0;e.addEventListener=function(o,r,a){s++;let l=typeof a=="object"?a.signal:void 0;n.call(this,o,r,typeof a=="object"?{...a,signal:l?AbortSignal.any([l,i]):i}:{capture:a===!0,signal:i})};try{t()}finally{e.addEventListener=n}return s}function po(){oe(),document.querySelectorAll("[data-component='sidebar-provider']").forEach(i=>{if(Bt.has(i)||re.has(i))return;let t=new AbortController;mo(t.signal,()=>Se(i))?Bt.set(i,t):i.querySelector("[data-component='sidebar']")&&re.add(i)}),document.removeEventListener("keydown",oe),document.addEventListener("keydown",oe)}var Tt;function De(i={}){Tt==null||Tt.unmount();let t=new AbortController,{signal:e}=t,n=document.body,s=n.dataset.unitRoot??"",o=n.dataset.siteRoot??"";i.nav!==void 0&&(window.__DOGSBAY_NAV__=i.nav),po(),i.theme!==!1&&co(e),uo(e),i.switchers!==!1&&ho(o,e),fo(e),i.search!==!1&&en({unitRoot:s,loadScript:cn,signal:e}),sn(e),ln(e);let r={unmount(){if(!e.aborted){t.abort();for(let a of[...Bt.keys(),...re])ot(a);oe(),Tt===r&&(Tt=void 0)}}};return Tt=r}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>De()):De();})();
1361
+ `;
1362
+ var CLIENT_FILE = "dogsbay-4e1b1719ed.js";
1363
+ var SSG_VERSION = "0.2.0-beta.151.1";
1364
+ var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or table of contents: landing pages, splash pages, 404. -#}\n<!doctype html>\n<html lang="{{ page.lang }}" dir="{{ page.dir }}"{% if site.colorMode == "dark" %} class="dark"{% endif %}>\n<head>\n{% include "partials/head.html" %}\n</head>\n<body class="bg-background text-foreground antialiased" data-unit-root="{{ paths.unit }}" data-site-root="{{ paths.site }}" data-prefix="{{ page.prefix }}" data-page="{{ page.out }}"{{ bodyAttrs }}>\n{{ skipLink }}\n<div class="relative flex min-h-svh w-full flex-col bg-background">\n{{ announcementBar }}\n{% include "partials/header.html" %}\n<main id="db-content" class="min-w-0 flex-1 px-6 py-8 outline-none lg:px-12" tabindex="-1">\n<div class="mx-auto {{ widthClass }}">\n{{ banner }}{{ versionBadge }}{{ h1 }}{{ byline }}{{ lede }}{{ hero }}{{ metaStrip }}\n<article class="docs-prose">\n{{ content }}\n</article>\n{% include "partials/footer.html" %}\n</div>\n</main>\n</div>\n{{ searchDialog }}\n{{ scripts }}\n</body>\n</html>\n', "layouts/docs.html": '{# The docs layout: a port of @dogsbay/docs-layout DocsLayout.astro. -#}\n<!doctype html>\n<html lang="{{ page.lang }}" dir="{{ page.dir }}"{% if site.colorMode == "dark" %} class="dark"{% endif %}>\n<head>\n{% include "partials/head.html" %}\n</head>\n<body class="bg-background text-foreground antialiased" data-unit-root="{{ paths.unit }}" data-site-root="{{ paths.site }}" data-prefix="{{ page.prefix }}" data-page="{{ page.out }}"{{ bodyAttrs }}>\n{{ skipLink }}\n<div class="group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar" data-component="sidebar-provider" style="--sidebar-width: 16rem; --sidebar-width-icon: 3rem;">\n{{ sidebar }}\n<div class="relative flex w-full min-w-0 flex-1 flex-col bg-background">\n{{ announcementBar }}\n{% include "partials/header.html" %}\n<div class="flex min-w-0">\n<main id="db-content" class="min-w-0 flex-1 px-6 py-8 outline-none lg:px-12" tabindex="-1">\n<div class="mx-auto {{ widthClass }}">\n{{ banner }}{{ breadcrumb }}{{ pageActionsInline }}{{ versionBadge }}{{ h1 }}{{ byline }}{{ lede }}{{ hero }}{{ metaStrip }}{{ tocTop }}\n<article class="docs-prose">\n{{ content }}\n</article>\n{% include "partials/footer.html" %}\n</div>\n</main>\n{{ tocRail }}\n</div>\n</div>\n</div>\n{{ searchDialog }}\n{{ scripts }}\n</body>\n</html>\n', "partials/announcement.html": `{#- The site's announcement bar (site.announcement), as DocsLayout's AnnouncementBar.astro: a band above the
1365
+ header in the callout colours of its tone. A closeable one is closed and remembered by <db-announcement>,
1366
+ and the head script hides a closed one before first paint. Context: announcement = {id, key (what a close is
1367
+ stored under, as the head meta), html (inline Markdown, rendered), toneClass, closeable} or "". -#}
1368
+ {%- if announcement -%}
1369
+ <db-announcement announcement-id="{{ announcement.key }}" class="db-announcement block border-b text-sm text-foreground {{ announcement.toneClass }}" role="region" aria-label="{{ t('announcement') }}" data-pagefind-ignore><div class="mx-auto flex min-h-10 items-center gap-2 px-4 py-2"><p class="m-0 flex-1 text-center [&_a]:font-medium [&_a]:underline [&_a]:underline-offset-2">{{ announcement.html }}</p>
1370
+ {%- if announcement.closeable -%}
1371
+ <button type="button" data-part="close" aria-label="{{ t('closeAnnouncement') }}" class="shrink-0 rounded-md p-1 text-foreground/80 hover:bg-foreground/10 hover:text-foreground">{{ icons.close }}</button>
1372
+ {%- endif -%}
1373
+ </div></db-announcement>
1374
+ {%- endif -%}
1375
+ `, "partials/blog-index.html": '{#- A blog index page (BlogIndex.astro): post cards, newest first, and links between index pages. Context: blog = {heading, posts: [{title, href, description, authors, date, datetime, minutes, hero}], newer, older (links or empty), pageLabel}, t. -#}\n<h1 class="text-3xl font-bold tracking-tight mb-8">{{ blog.heading }}</h1>\n{%- if not blog.posts %}\n<p class="text-muted-foreground">{{ t("noPosts") }}</p>\n{%- endif %}\n<ul class="not-prose grid list-none grid-cols-1 items-stretch gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3" data-blog-index>\n{%- for post in blog.posts %}\n<li class="m-0 p-0"><a href="{{ post.href }}" class="group block h-full rounded-lg no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"><div class="rounded-lg border bg-card text-card-foreground shadow-sm flex h-full flex-col gap-3 p-5 transition-colors group-hover:border-ring">\n{%- if post.hero %}<img src="{{ post.hero }}" alt="" class="aspect-[16/9] w-full rounded-md border border-border object-cover" loading="lazy" decoding="async">{% endif -%}\n<h2 class="text-lg font-semibold leading-snug tracking-tight text-foreground group-hover:underline">{{ post.title }}</h2>\n<div class="flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground" data-pagefind-ignore>\n{%- if post.authors %}<span class="font-medium text-foreground">{{ post.authors }}</span>{% endif -%}\n{%- if post.authors and post.date %}<span aria-hidden="true">&middot;</span>{% endif -%}\n{%- if post.date %}<time datetime="{{ post.datetime }}">{{ post.date }}</time>{% endif -%}\n{%- if post.authors or post.date %}<span aria-hidden="true">&middot;</span>{% endif -%}\n<span>{{ post.minutes }}</span></div>\n{%- if post.description %}<p class="m-0 text-sm leading-relaxed text-muted-foreground">{{ post.description }}</p>{% endif -%}\n</div></a></li>\n{%- endfor %}\n</ul>\n{%- if blog.newer or blog.older %}\n<nav class="not-prose mt-12 flex items-center justify-between" aria-label="{{ t("blogPages") }}">\n{%- if blog.newer %}<a href="{{ blog.newer }}" class="text-sm text-foreground no-underline hover:underline" rel="prev">&larr; {{ t("newerPosts") }}</a>{% else %}<span></span>{% endif -%}\n<span class="text-sm text-muted-foreground">{{ blog.pageLabel }}</span>\n{%- if blog.older %}<a href="{{ blog.older }}" class="text-sm text-foreground no-underline hover:underline" rel="next">{{ t("olderPosts") }} &rarr;</a>{% else %}<span></span>{% endif -%}\n</nav>\n{%- endif %}\n', "partials/breadcrumb.html": `{#- Breadcrumb trail (hidden below two items). Context: breadcrumbs = [{label, href?}], t. -#}
1348
1376
  {%- if breadcrumbs | length >= 2 -%}
1349
1377
  <nav aria-label="{{ t("breadcrumb") }}" class="mb-4 text-sm text-muted-foreground"><ol class="m-0 flex list-none flex-wrap gap-1.5 p-0">
1350
1378
  {%- for item in breadcrumbs -%}
@@ -1369,7 +1397,56 @@ var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or
1369
1397
  {%- if post.updated %}<span>&middot; {{ t("updated") }} <time datetime="{{ post.updatedDatetime }}">{{ post.updated }}</time></span>{% endif -%}
1370
1398
  </div>
1371
1399
  {%- endif -%}
1372
- `, "partials/footer-links.html": '{#- Footer links: llms.txt and "Powered by". Context: llmsHref, poweredBy, t, icons. -#}\n{%- if llmsHref %}<a class="hover:text-foreground" data-llms-link href="{{ llmsHref }}">{{ t("llmsTxt") }}</a>{% endif -%}\n{%- if poweredBy %}<a class="inline-flex items-center gap-1.5 hover:text-foreground" data-powered-by href="https://dogsbay.ai" rel="noopener">{{ icons.layers }}{{ t("poweredBy") }}</a>{% endif -%}\n', "partials/footer-meta.html": '{#- Edit link and last-updated date. Context: editUrl, lastUpdated (already formatted), t. -#}\n{%- if editUrl or lastUpdated -%}\n<div class="mb-6 flex flex-wrap items-center gap-4 text-sm text-muted-foreground">\n{%- if editUrl %}<a class="inline-flex items-center gap-1 hover:text-foreground" href="{{ editUrl }}" rel="noopener">{{ t("edit") }}</a>{% endif -%}\n{%- if lastUpdated %}<span data-last-updated>{{ t("lastUpdated") | replace("{date}", lastUpdated, 1) }}</span>{% endif -%}\n</div>\n{%- endif -%}\n', "partials/footer.html": '<footer class="mt-12 border-t pt-6">\n{{ footerMeta }}\n{{ pager }}\n<div class="mt-6 flex flex-wrap items-center justify-between gap-2 border-t pt-4 text-xs text-muted-foreground">\n<span>{{ site.copyright }}</span>\n<div class="flex flex-wrap items-center gap-4">{{ footerLinks }}</div>\n</div>\n</footer>\n', "partials/head.html": '<meta charset="utf-8">\n<meta name="viewport" content="width=device-width, initial-scale=1">\n<title>{{ page.documentTitle }}</title>\n{% if page.description %}<meta name="description" content="{{ page.description }}">\n{% endif %}<meta name="generator" content="dogsbay-ssg">\n{{ headLinks }}\n<link rel="stylesheet" href="{{ paths.unit }}_dogsbay/site.css">\n<link rel="icon" href="{{ paths.site }}_dogsbay/assets/favicon.svg" type="image/svg+xml">\n{{ themeBoot }}\n{{ head }}\n', "partials/header.html": '<header class="sticky top-0 z-40 flex h-[var(--db-header-height)] shrink-0 items-center gap-2 border-b bg-background/95 px-4 backdrop-blur-sm supports-[backdrop-filter]:bg-background/60">\n{{ sidebarTrigger }}\n<span class="text-sm text-muted-foreground" data-page-title>{{ page.title }}</span>\n<div class="ml-auto flex items-center gap-2">\n{{ tocPopover }}{{ switchers }}{{ pageActions }}{{ searchButton }}{{ repoLink }}{{ themeToggle }}\n</div>\n</header>\n', "partials/hero.html": `{#- A blog post's hero image (DocsLayout.astro, chrome "blog"). Context: post.hero (a link to the image) or empty. -#}
1400
+ `, "partials/footer-columns.html": `{#- The site's footer columns (footer.columns), as DocsFooter.astro: titled link lists that wrap on narrow screens.
1401
+ Context: footerColumns = [{title, links: [{label, href, external}]}]. -#}
1402
+ {%- if footerColumns | length -%}
1403
+ <nav aria-label="{{ t('footerLinks') }}" data-pagefind-ignore class="site-footer-columns mt-8 grid grid-cols-2 gap-6 text-sm first:mt-0 sm:grid-cols-3 lg:grid-cols-4">
1404
+ {%- for c in footerColumns -%}
1405
+ <div class="min-w-0"><h2 class="mb-2 text-sm font-semibold text-foreground">{{ c.title }}</h2><ul class="flex flex-col gap-1.5">
1406
+ {%- for l in c.links -%}
1407
+ <li><a href="{{ l.href }}" class="text-muted-foreground no-underline hover:text-foreground"{% if l.external %} data-external{% endif %}>{{ l.label }}</a></li>
1408
+ {%- endfor -%}
1409
+ </ul></div>
1410
+ {%- endfor -%}
1411
+ </nav>
1412
+ {%- endif -%}
1413
+ `, "partials/footer-links.html": '{#- Footer links: llms.txt and "Powered by". Context: llmsHref, poweredBy, t, icons. -#}\n{%- if llmsHref %}<a class="hover:text-foreground" data-llms-link href="{{ llmsHref }}">{{ t("llmsTxt") }}</a>{% endif -%}\n{%- if poweredBy %}<a class="inline-flex items-center gap-1.5 hover:text-foreground" data-powered-by href="https://dogsbay.ai" rel="noopener">{{ icons.layers }}{{ t("poweredBy") }}</a>{% endif -%}\n', "partials/footer-meta.html": '{#- Edit link and last-updated date. Context: editUrl, lastUpdated (already formatted), t. -#}\n{%- if editUrl or lastUpdated -%}\n<div class="mb-6 flex flex-wrap items-center gap-4 text-sm text-muted-foreground">\n{%- if editUrl %}<a class="inline-flex items-center gap-1 hover:text-foreground" href="{{ editUrl }}" rel="noopener">{{ t("edit") }}</a>{% endif -%}\n{%- if lastUpdated %}<span data-last-updated>{{ t("lastUpdated") | replace("{date}", lastUpdated, 1) }}</span>{% endif -%}\n</div>\n{%- endif -%}\n', "partials/footer.html": '<footer class="mt-12 border-t pt-6">\n{{ footerMeta }}\n{{ pager }}\n{{ footerColumns }}\n<div class="mt-6 flex flex-wrap items-center justify-between gap-2 border-t pt-4 text-xs text-muted-foreground">\n<span>{{ copyrightHtml }}</span>\n<div class="flex flex-wrap items-center gap-4">{% if has.footerSocial %}<div class="flex items-center gap-1">{{ footerSocial }}</div>{% endif %}{{ footerLinks }}</div>\n</div>\n</footer>\n', "partials/head.html": '<meta charset="utf-8">\n<meta name="viewport" content="width=device-width, initial-scale=1">\n<title>{{ page.documentTitle }}</title>\n{% if page.description %}<meta name="description" content="{{ page.description }}">\n{% endif %}<meta name="generator" content="dogsbay-ssg">\n{{ headLinks }}\n<link rel="stylesheet" href="{{ paths.unit }}_dogsbay/site.css">\n<link rel="icon" href="{{ paths.site }}_dogsbay/assets/favicon.svg" type="image/svg+xml">\n{{ themeBoot }}\n{{ head }}\n', "partials/header-links.html": `{#- The site's header links (header.links), as DocsLayout's HeaderLinks.astro: links, and one-level dropdowns
1414
+ as <details> lists, so every link is in the HTML (crawlers, readers without JavaScript).
1415
+ Context: headerLinks = [{label, href, current, items}] (items: [{label, href, current}], empty for a link;
1416
+ href relative to the page; current "page" or ""), layout = "bar" (the header, from lg) or "list" (the sidebar, below lg),
1417
+ wrap = "1" on a layout with no sidebar to move them into: the bar shows at every width and wraps. -#}
1418
+ {%- if headerLinks | length -%}
1419
+ {%- if layout == "bar" -%}
1420
+ <nav aria-label="{{ t('siteLinks') }}" class="site-header-links items-center gap-1 {% if wrap %}flex min-w-0 flex-wrap{% else %}hidden lg:flex{% endif %}">
1421
+ {%- for l in headerLinks -%}
1422
+ {%- if l.items | length -%}
1423
+ <details class="site-header-menu relative"><summary class="flex cursor-pointer items-center gap-1 rounded-md px-2 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-foreground">{{ l.label }}{{ icons.chevronDown }}</summary><ul class="absolute left-0 z-50 mt-1 min-w-[12rem] rounded-md border border-border bg-popover p-1 text-sm shadow-md">
1424
+ {%- for i in l.items -%}
1425
+ <li><a href="{{ i.href }}"{% if i.current %} aria-current="page"{% endif %} class="block rounded-sm px-2 py-1.5 text-foreground no-underline hover:bg-accent">{{ i.label }}</a></li>
1426
+ {%- endfor -%}
1427
+ </ul></details>
1428
+ {%- else -%}
1429
+ <a href="{{ l.href }}"{% if l.current %} aria-current="page"{% endif %} class="rounded-md px-2 py-1.5 text-sm text-muted-foreground no-underline hover:bg-accent hover:text-foreground aria-[current=page]:text-foreground">{{ l.label }}</a>
1430
+ {%- endif -%}
1431
+ {%- endfor -%}
1432
+ </nav>
1433
+ {%- else -%}
1434
+ <nav aria-label="{{ t('siteLinks') }}" class="site-header-links-list"><ul class="flex flex-col gap-0.5 text-sm">
1435
+ {%- for l in headerLinks -%}
1436
+ {%- if l.items | length -%}
1437
+ <li><span class="block px-2 py-1.5 text-xs font-medium text-sidebar-foreground/70">{{ l.label }}</span><ul class="flex flex-col gap-0.5 pl-2">
1438
+ {%- for i in l.items -%}
1439
+ <li><a href="{{ i.href }}"{% if i.current %} aria-current="page"{% endif %} class="block rounded-md px-2 py-1.5 text-sidebar-foreground no-underline hover:bg-sidebar-accent">{{ i.label }}</a></li>
1440
+ {%- endfor -%}
1441
+ </ul></li>
1442
+ {%- else -%}
1443
+ <li><a href="{{ l.href }}"{% if l.current %} aria-current="page"{% endif %} class="block rounded-md px-2 py-1.5 text-sidebar-foreground no-underline hover:bg-sidebar-accent">{{ l.label }}</a></li>
1444
+ {%- endif -%}
1445
+ {%- endfor -%}
1446
+ </ul></nav>
1447
+ {%- endif -%}
1448
+ {%- endif -%}
1449
+ `, "partials/header.html": '<header class="sticky top-0 z-40 flex shrink-0 items-center gap-2 border-b bg-background/95 px-4 backdrop-blur-sm supports-[backdrop-filter]:bg-background/60 {% if has.headerLinks and not has.sidebar %}min-h-[var(--db-header-height)] flex-wrap py-1{% else %}h-[var(--db-header-height)]{% endif %}">\n{#- A layout with no sidebar keeps its header links in the header, wrapping, so the header grows a row (DocsLayout) #}\n{{ sidebarTrigger }}\n{#- With header links, the page title shows only below lg, where the links are in the sidebar; a layout with\n no sidebar keeps the links in the header (wrapping) and has no title #}\n{%- if not (has.headerLinks and not has.sidebar) %}\n<span class="text-sm text-muted-foreground{% if has.headerLinks %} lg:hidden{% endif %}" data-page-title>{{ page.title }}</span>\n{%- endif %}\n{{ headerLinks }}\n<div class="ml-auto flex items-center gap-2">\n{{ tocPopover }}{{ switchers }}{{ pageActions }}{{ searchButton }}{{ repoLink }}{{ themeToggle }}\n</div>\n</header>\n', "partials/hero.html": `{#- A blog post's hero image (DocsLayout.astro, chrome "blog"). Context: post.hero (a link to the image) or empty. -#}
1373
1450
  {%- if post is defined and post and post.hero -%}
1374
1451
  <img src="{{ post.hero }}" alt="" class="not-prose mb-8 w-full rounded-lg border border-border object-cover aspect-[2/1]" loading="eager" decoding="async">
1375
1452
  {%- endif -%}
@@ -1420,7 +1497,34 @@ var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or
1420
1497
  {% endif -%}
1421
1498
  {%- endset -%}
1422
1499
  {{- head_tags | trim -}}
1423
- `, "partials/sidebar-header.html": '<div class="flex flex-col gap-2 p-2" data-sidebar="header">\n<ul class="flex w-full min-w-0 flex-col gap-0" data-sidebar="menu">\n<li class="group/menu-item relative">\n<a href="{{ paths.home }}" class="peer/menu-button group/menu-button flex h-12 w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0 group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-0" data-sidebar="menu-button" data-size="lg">\n<div class="flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground">{{ logo }}</div>\n<div class="grid flex-1 text-left text-sm leading-tight"><span class="truncate font-semibold">{{ site.name }}</span><span class="truncate text-xs text-sidebar-foreground/70">{{ site.tagline }}</span></div>\n</a>\n</li>\n</ul>\n</div>\n', "partials/switcher.html": '{#- Product, version or language switcher: a native <select> upgraded by db-select (the no-JS fallback is kept).\n Context: switcher = {kind: "product" | "locale" | "version", label, options: [{label, href, current, prefix, note?, disabled?, link?}]}.\n A `link` option (versionMenu.links) goes straight to its page; db-select copies data-link to its item, which ssg.css draws a line above. -#}\n{%- if switcher.options | length >= 2 -%}\n<db-select class="db-switch db-switch-{{ switcher.kind }}"><select data-db-switch="{{ switcher.kind }}" aria-label="{{ switcher.label }}" class="rounded-md border border-border bg-background px-2 py-1.5 text-sm">\n{%- for o in switcher.options -%}\n<option{% if o.href %} value="{{ o.href }}"{% endif %}{% if o.current %} selected{% endif %}{% if o.disabled is defined and o.disabled %} disabled{% endif %}{% if o.link is defined and o.link %} data-link{% endif %}{% if o.prefix %} data-prefix="{{ o.prefix }}"{% endif %}>{{ o.label }}{% if o.note %} ({{ o.note }}){% endif %}</option>\n{%- endfor -%}\n</select></db-select>\n{%- endif -%}\n', "partials/tags.html": '{#- The meta strip (DocsLayout): type and status badges (TypeBadge, StatusBadge), then the tag chips (TagList.astro). Context: badges = [{label, cls, href, attr, value}], tags (the values), and tagChips = [{tag, label, prefix, href, cls}] when chips link to term pages or carry colours and labels (taxonomies.tags); otherwise tags render as plain chips. -#}\n{%- set badges = badges if badges is defined else [] -%}\n{%- if badges or tags -%}\n<div class="not-prose mb-6 flex flex-wrap items-center gap-2" data-page-meta-strip>\n{%- for b in badges -%}\n{% if b.href %}<a href="{{ b.href }}" class="{{ b.cls }}" {{ b.attr }}="{{ b.value }}">{{ b.label }}</a>{% else %}<span class="{{ b.cls }}" {{ b.attr }}="{{ b.value }}">{{ b.label }}</span>{% endif %}\n{%- endfor -%}\n{%- if tagChips is defined and tagChips -%}\n<ul class="not-prose m-0 flex list-none flex-wrap items-center gap-1.5 p-0 text-xs" data-tag-list aria-label="Tags">\n{%- for chip in tagChips -%}\n<li>{% if chip.href %}<a href="{{ chip.href }}" class="{{ chip.cls }}" data-tag="{{ chip.tag }}">{% else %}<span class="{{ chip.cls }}" data-tag="{{ chip.tag }}">{% endif -%}\n{%- if chip.prefix %}<span>{{ chip.prefix }}:</span><span class="font-semibold">{{ chip.label }}</span>{% else %}<span aria-hidden="true">#</span><span>{{ chip.label }}</span>{% endif -%}\n{%- if chip.href %}</a>{% else %}</span>{% endif %}</li>\n{%- endfor -%}\n</ul>\n{%- elif tags -%}\n<ul class="not-prose m-0 flex list-none flex-wrap items-center gap-1.5 p-0 text-xs" data-tag-list aria-label="Tags">\n{%- for tag in tags -%}\n<li><span class="inline-flex items-center gap-1 rounded-full border border-border bg-secondary px-2 py-0.5 font-medium text-secondary-foreground"><span aria-hidden="true">#</span><span>{{ tag }}</span></span></li>\n{%- endfor -%}\n</ul>\n{%- endif -%}\n</div>\n{%- endif -%}\n', "partials/taxonomy-index.html": `{#- A taxonomy's index page (TaxonomyIndex.astro): all terms with their page counts, as a tree when the taxonomy is hierarchical. Context: taxonomy = {name, title, summary, hierarchical, terms: [{label, href, count, children: [{label, href, count}]}]}. -#}
1500
+ `, "partials/sidebar-header.html": `{#- The sidebar's top: the logo (site.logo, light and dark: two images, one hidden by the theme class, no script)
1501
+ or the book icon, and the site's name and tagline, which a wordmark logo (replacesName) stands for.
1502
+ Context: siteLogo = {light, dark, alt, replacesName} (light "" without a logo), site, paths, logo (the book icon). -#}
1503
+ <div class="flex flex-col gap-2 p-2" data-sidebar="header">
1504
+ <ul class="flex w-full min-w-0 flex-col gap-0" data-sidebar="menu">
1505
+ <li class="group/menu-item relative">
1506
+ <a href="{{ paths.home }}" class="peer/menu-button group/menu-button flex h-12 w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0 group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-0" data-sidebar="menu-button" data-size="lg">
1507
+ {%- if siteLogo.light %}
1508
+ <img src="{{ siteLogo.light }}" alt="{{ siteLogo.alt }}" class="site-logo h-8 w-auto max-w-[10rem] object-contain object-left{% if siteLogo.dark %} dark:hidden{% endif %}">
1509
+ {%- if siteLogo.dark %}<img src="{{ siteLogo.dark }}" alt="{{ siteLogo.alt }}" class="site-logo hidden h-8 w-auto max-w-[10rem] object-contain object-left dark:block">{% endif %}
1510
+ {%- else %}
1511
+ <div class="flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground">{{ logo }}</div>
1512
+ {%- endif %}
1513
+ {%- if not siteLogo.replacesName %}
1514
+ <div class="grid flex-1 text-left text-sm leading-tight"><span class="truncate font-semibold">{{ site.name }}</span><span class="truncate text-xs text-sidebar-foreground/70">{{ site.tagline }}</span></div>
1515
+ {%- endif %}
1516
+ </a>
1517
+ </li>
1518
+ </ul>
1519
+ </div>
1520
+ `, "partials/social-links.html": `{#- Brand icon links (header.social, footer.social; site.repoUrl is the header's default), as DocsLayout's
1521
+ SocialLinks.astro. The icon is @dogsbay/icons' SVG (aria-hidden); the link carries the name; another site
1522
+ opens in a new tab. Context: social = [{label, href, svg, external}], size = "header" or "footer",
1523
+ socialClass = extra classes for each link. -#}
1524
+ {%- for s in social -%}
1525
+ <a href="{{ s.href }}"{% if s.external %} target="_blank" rel="noopener"{% endif %} aria-label="{{ s.label }}" title="{{ s.label }}" class="inline-flex items-center justify-center text-muted-foreground hover:text-foreground {% if size == 'header' %}rounded-md p-2 hover:bg-accent{% else %}p-1{% endif %}{% if socialClass %} {{ socialClass }}{% endif %}" data-social-link>{{ s.svg }}</a>
1526
+ {%- endfor -%}
1527
+ `, "partials/switcher.html": '{#- Product, version or language switcher: a native <select> upgraded by db-select (the no-JS fallback is kept).\n Context: switcher = {kind: "product" | "locale" | "version", label, options: [{label, href, current, prefix, note?, disabled?, link?}]}.\n A `link` option (versionMenu.links) goes straight to its page; db-select copies data-link to its item, which ssg.css draws a line above. -#}\n{%- if switcher.options | length >= 2 -%}\n<db-select class="db-switch db-switch-{{ switcher.kind }}"><select data-db-switch="{{ switcher.kind }}" aria-label="{{ switcher.label }}" class="rounded-md border border-border bg-background px-2 py-1.5 text-sm">\n{%- for o in switcher.options -%}\n<option{% if o.href %} value="{{ o.href }}"{% endif %}{% if o.current %} selected{% endif %}{% if o.disabled is defined and o.disabled %} disabled{% endif %}{% if o.link is defined and o.link %} data-link{% endif %}{% if o.prefix %} data-prefix="{{ o.prefix }}"{% endif %}>{{ o.label }}{% if o.note %} ({{ o.note }}){% endif %}</option>\n{%- endfor -%}\n</select></db-select>\n{%- endif -%}\n', "partials/tags.html": '{#- The meta strip (DocsLayout): type and status badges (TypeBadge, StatusBadge), then the tag chips (TagList.astro). Context: badges = [{label, cls, href, attr, value}], tags (the values), and tagChips = [{tag, label, prefix, href, cls}] when chips link to term pages or carry colours and labels (taxonomies.tags); otherwise tags render as plain chips. -#}\n{%- set badges = badges if badges is defined else [] -%}\n{%- if badges or tags -%}\n<div class="not-prose mb-6 flex flex-wrap items-center gap-2" data-page-meta-strip>\n{%- for b in badges -%}\n{% if b.href %}<a href="{{ b.href }}" class="{{ b.cls }}" {{ b.attr }}="{{ b.value }}">{{ b.label }}</a>{% else %}<span class="{{ b.cls }}" {{ b.attr }}="{{ b.value }}">{{ b.label }}</span>{% endif %}\n{%- endfor -%}\n{%- if tagChips is defined and tagChips -%}\n<ul class="not-prose m-0 flex list-none flex-wrap items-center gap-1.5 p-0 text-xs" data-tag-list aria-label="Tags">\n{%- for chip in tagChips -%}\n<li>{% if chip.href %}<a href="{{ chip.href }}" class="{{ chip.cls }}" data-tag="{{ chip.tag }}">{% else %}<span class="{{ chip.cls }}" data-tag="{{ chip.tag }}">{% endif -%}\n{%- if chip.prefix %}<span>{{ chip.prefix }}:</span><span class="font-semibold">{{ chip.label }}</span>{% else %}<span aria-hidden="true">#</span><span>{{ chip.label }}</span>{% endif -%}\n{%- if chip.href %}</a>{% else %}</span>{% endif %}</li>\n{%- endfor -%}\n</ul>\n{%- elif tags -%}\n<ul class="not-prose m-0 flex list-none flex-wrap items-center gap-1.5 p-0 text-xs" data-tag-list aria-label="Tags">\n{%- for tag in tags -%}\n<li><span class="inline-flex items-center gap-1 rounded-full border border-border bg-secondary px-2 py-0.5 font-medium text-secondary-foreground"><span aria-hidden="true">#</span><span>{{ tag }}</span></span></li>\n{%- endfor -%}\n</ul>\n{%- endif -%}\n</div>\n{%- endif -%}\n', "partials/taxonomy-index.html": `{#- A taxonomy's index page (TaxonomyIndex.astro): all terms with their page counts, as a tree when the taxonomy is hierarchical. Context: taxonomy = {name, title, summary, hierarchical, terms: [{label, href, count, children: [{label, href, count}]}]}. -#}
1424
1528
  <section class="mx-auto max-w-3xl px-6 py-8" data-taxonomy-index data-taxonomy="{{ taxonomy.name }}">
1425
1529
  <header class="mb-6"><h1 class="text-3xl font-bold tracking-tight">{{ taxonomy.title }}</h1><p class="mt-2 text-sm text-muted-foreground">{{ taxonomy.summary }}</p></header>
1426
1530
  {%- if taxonomy.hierarchical %}
@@ -1466,35 +1570,35 @@ var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or
1466
1570
  {%- endif %}
1467
1571
  </section>
1468
1572
  `, "partials/toc-popover.html": '{#- Table of contents in a header popover. -#}\n{%- set toc_label = t("toc") -%}\n{%- set toc_title = "" -%}\n<details class="dba-toc-popover relative" data-toc-popover><summary class="cursor-pointer list-none rounded-md px-2 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-foreground">{{ toc_label }}</summary><div class="absolute right-0 z-50 mt-1 max-h-[70vh] w-64 overflow-y-auto rounded-md border bg-background p-3 shadow-md">\n{%- include "partials/toc.html" -%}\n</div></details>\n', "partials/toc-rail.html": '{#- Table of contents in a right-hand rail, with a visible title. -#}\n{%- set toc_label = t("toc") -%}\n{%- set toc_title = toc_label -%}\n<div class="sticky top-12 hidden h-[calc(100vh-3rem)] w-56 shrink-0 overflow-y-auto border-l p-4 lg:block">\n{%- include "partials/toc.html" -%}\n</div>\n', "partials/toc-top.html": '{#- Table of contents above the content, collapsed. -#}\n{%- set toc_label = t("toc") -%}\n{%- set toc_title = "" -%}\n<details class="dba-toc-top not-prose mb-6 rounded-md border" data-toc-top><summary class="cursor-pointer list-none px-3 py-2 text-sm font-medium text-muted-foreground">{{ toc_label }}</summary><div class="border-t px-3 py-2">\n{%- include "partials/toc.html" -%}\n</div></details>\n', "partials/toc.html": '{#- The table-of-contents link list (DocsToc.astro), shared by toc-top, toc-rail and toc-popover.\n Context: headings = [{depth, id, text}], toc_label (aria-label), toc_title (visible heading, may be empty). -#}\n<db-toc offset="64"><nav class="text-sm" aria-label="{{ toc_label }}">\n{%- if toc_title %}<div class="text-xs font-semibold uppercase text-muted-foreground" aria-hidden="true">{{ toc_title }}</div>{% endif -%}\n<ul class="mt-2 space-y-1">\n{%- for h in headings -%}\n<li><a href="#{{ h.id }}" data-toc-link data-toc-slug="{{ h.id }}" class="block py-0.5 text-muted-foreground transition-colors hover:text-foreground data-[active]:font-medium data-[active]:text-foreground" style="padding-left:{{ (h.depth - 2) * 0.75 }}rem">{{ h.text }}</a></li>\n{%- endfor -%}\n</ul></nav></db-toc>\n{#- An included partial keeps its final newline (keepTrailingNewline); this strips it, since toc-top/rail/popover place the list inline. -#}\n', "partials/version-badge.html": '{#- The version badge above the title (Docusaurus\'s DocVersionBadge), on versions with `badge: true`.\n Context: versionBadge = "Version: 3.33" (the text, worded and filled in), or empty. -#}\n{%- if versionBadge -%}\n<div class="not-prose mb-3" data-version-badge><span class="inline-flex items-center rounded-md border border-border px-2 py-0.5 text-xs font-medium text-muted-foreground">{{ versionBadge }}</span></div>\n{%- endif -%}\n' };
1469
- var CLIENT_CANDIDATES = ['""', '"&"', '"\\\\$&")).join("|")})', '"\\\\$&")}"', '"s"}', "#db-content", "([^", "(here", "(index.ts)", "./", "./elements.js", "./highlight.js", "./image-zoom.js", "./mount.js", "./pagefind.js", "./search.js", "./targets.js", ".medium-zoom-image--opened", "/g,", "<!--", "</", "</$1", "<\\/", "<db-combobox", "<db-dialog", "<script>", "===", "=>", "?h=<terms>", "?|\\S*)/gi,", "@dogsbay/elements/db-accordion", "@dogsbay/elements/db-code-block", "@dogsbay/elements/db-combobox", "@dogsbay/elements/db-details-sheet", "@dogsbay/elements/db-dialog", "@dogsbay/elements/db-nav-tree", "@dogsbay/elements/db-popover", "@dogsbay/elements/db-select", "@dogsbay/elements/db-tabs", "@dogsbay/elements/db-toc", "@dogsbay/elements/db-tooltip", "@dogsbay/search/query", "@dogsbay/ssg/client", "@dogsbay/ui/sidebar/sidebar.ts", "All", "Clear", "Copied", "DOMContentLoaded", "Enter", "Filter", "Product", "Search", "[^", "[aria-hidden='true']", "[contenteditable]", "[data-clear-highlights]", "[data-component='sidebar']", "[data-component='sidebar-provider']", "[data-component='theme-toggle']", "[data-copy-markdown]", "[data-db-search-input]", "[data-db-search-status]", "[data-part='listbox']", "\\\\$&", "_dogsbay", "_dogsbay/nav.js", "a.db-anchor", "abort", "api", "aria-label", "aria-pressed", "aria-pressed:bg-primary", "aria-pressed:text-primary-foreground", "article", "be", "block", "border", "border-l", "both", "builtin", "button", "button,", "by", "center", "change", "click", "close-press", "could", "dark", "data", "data-link", "data-part", "db-content", "db-dialog:open", "db-page-markdown", "db-popover", "db-search", "db-search-hl", "disabled", "div", "file:", 'filter="none"', "flex", "flex-wrap", "fn", "folder", "font-medium", "fullNavLimit", "function", "gap-1", "gi", "giu", "group", "h-8", "highlights", "host", "hover:bg-accent", "https:", 'id="db-search">', 'img[data-zoomable="true"]', "index", "index.html", "inline-flex", "inline>", "input", "input,", "inst", "installing", "items-center", "javascript:", "keydown", "li", "light", "line-clamp-2", "load", "loaded.", "loading", "loads.", "mark", "mark,", "mb-1", "mb-4", "medium-zoom", "medium-zoom:closed", "medium-zoom:opened", "ml-4", "mount()", "mounts", "mt-1", "none", "not", "not-prose", "object", "once", "option", "own", "p-3", "page", "page.html#id", "page.html?h=terms#id", "pagefind", "pb-2", "product", "puts", "px-2.5", "px-3", "py-0.5", "py-1.5", "readDataScript:", "role", "rounded-full", "rounded-md", "script", "script,", "section", "select,", "select[data-db-switch]", "signal", "ssg.search:", "style,", "text-muted-foreground", "text-sm", "text-xs", "text/html", "textarea,", "that", "the", "theme", "true", "unit", "unmount()", "value", "versions", "when", "window.__DOGSBAY_NAV__"];
1573
+ var CLIENT_CANDIDATES = ['""', '"&"', '"\\\\$&")).join("|")})', '"\\\\$&")}"', '"s"}', "#db-content", "([^", "(here", "(index.ts)", "./", "./elements.js", "./highlight.js", "./image-zoom.js", "./mount.js", "./pagefind.js", "./search.js", "./targets.js", ".medium-zoom-image--opened", "/g,", "<!--", "</", "</$1", "<\\/", "<db-combobox", "<db-dialog", "<script>", "===", "=>", "?h=<terms>", "?|\\S*)/gi,", "@dogsbay/elements/db-accordion", "@dogsbay/elements/db-announcement", "@dogsbay/elements/db-code-block", "@dogsbay/elements/db-combobox", "@dogsbay/elements/db-details-sheet", "@dogsbay/elements/db-dialog", "@dogsbay/elements/db-nav-tree", "@dogsbay/elements/db-popover", "@dogsbay/elements/db-select", "@dogsbay/elements/db-tabs", "@dogsbay/elements/db-toc", "@dogsbay/elements/db-tooltip", "@dogsbay/search/query", "@dogsbay/ssg/client", "@dogsbay/ui/sidebar/sidebar.ts", "All", "Clear", "Copied", "DOMContentLoaded", "Enter", "Filter", "Product", "Search", "[^", "[aria-hidden='true']", "[contenteditable]", "[data-clear-highlights]", "[data-component='sidebar']", "[data-component='sidebar-provider']", "[data-component='theme-toggle']", "[data-copy-markdown]", "[data-db-search-input]", "[data-db-search-status]", "[data-part='listbox']", "\\\\$&", "_dogsbay", "_dogsbay/nav.js", "a.db-anchor", "abort", "api", "aria-label", "aria-pressed", "aria-pressed:bg-primary", "aria-pressed:text-primary-foreground", "article", "be", "block", "border", "border-l", "both", "builtin", "button", "button,", "by", "center", "change", "click", "close-press", "could", "dark", "data", "data-link", "data-part", "db-content", "db-dialog:open", "db-page-markdown", "db-popover", "db-search", "db-search-hl", "disabled", "div", "file:", 'filter="none"', "flex", "flex-wrap", "fn", "folder", "font-medium", "fullNavLimit", "function", "gap-1", "gi", "giu", "group", "h-8", "highlights", "host", "hover:bg-accent", "https:", 'id="db-search">', 'img[data-zoomable="true"]', "index", "index.html", "inline-flex", "inline>", "input", "input,", "inst", "installing", "items-center", "javascript:", "keydown", "li", "light", "line-clamp-2", "load", "loaded.", "loading", "loads.", "mark", "mark,", "mb-1", "mb-4", "medium-zoom", "medium-zoom:closed", "medium-zoom:opened", "ml-4", "mount()", "mounts", "mt-1", "none", "not", "not-prose", "object", "once", "option", "own", "p-3", "page", "page.html#id", "page.html?h=terms#id", "pagefind", "pb-2", "product", "puts", "px-2.5", "px-3", "py-0.5", "py-1.5", "readDataScript:", "role", "rounded-full", "rounded-md", "script", "script,", "section", "select,", "select[data-db-switch]", "signal", "ssg.search:", "style,", "text-muted-foreground", "text-sm", "text-xs", "text/html", "textarea,", "that", "the", "theme", "true", "unit", "unmount()", "value", "versions", "when", "window.__DOGSBAY_NAV__"];
1470
1574
  var SITE_NOTICES = `Third-party software in this site's _dogsbay/ files (dogsbay.js, site.css) and pages
1471
1575
 
1472
1576
  ========================================================================
1473
- @dogsbay/elements@0.2.0-beta.149 (MIT)
1577
+ @dogsbay/elements@0.2.0-beta.151 (MIT)
1474
1578
  https://github.com/dogsbay/dogsbay.git
1475
1579
 
1476
1580
  Licensed under MIT; the package ships no licence file.
1477
1581
 
1478
1582
  ========================================================================
1479
- @dogsbay/primitives@0.2.0-beta.149 (MIT)
1583
+ @dogsbay/primitives@0.2.0-beta.151 (MIT)
1480
1584
  https://github.com/dogsbay/dogsbay.git
1481
1585
 
1482
1586
  Licensed under MIT; the package ships no licence file.
1483
1587
 
1484
1588
  ========================================================================
1485
- @dogsbay/render-html@0.2.0-beta.149 (MIT)
1589
+ @dogsbay/render-html@0.2.0-beta.151 (MIT)
1486
1590
  https://github.com/dogsbay/dogsbay.git
1487
1591
 
1488
1592
  Licensed under MIT; the package ships no licence file.
1489
1593
 
1490
1594
  ========================================================================
1491
- @dogsbay/search@0.2.0-beta.149 (MIT)
1595
+ @dogsbay/search@0.2.0-beta.151 (MIT)
1492
1596
  https://github.com/dogsbay/dogsbay.git
1493
1597
 
1494
1598
  Licensed under MIT; the package ships no licence file.
1495
1599
 
1496
1600
  ========================================================================
1497
- @dogsbay/ui@0.2.0-beta.149 (MIT)
1601
+ @dogsbay/ui@0.2.0-beta.151 (MIT)
1498
1602
  https://github.com/dogsbay/dogsbay.git
1499
1603
 
1500
1604
  Licensed under MIT; the package ships no licence file.
@@ -1949,6 +2053,8 @@ import { apiPageLayout } from "@dogsbay/serialize-core";
1949
2053
  import { attrs, esc } from "@dogsbay/render-html/html";
1950
2054
  var svg = (body, cls, size = 16, extra = "") => `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="${cls}" aria-hidden="true" focusable="false"${extra}>${body}</svg>`;
1951
2055
  var ICONS = {
2056
+ chevronDown: svg('<polyline points="6 9 12 15 18 9"/>', "", 14),
2057
+ close: svg('<path d="M18 6 6 18"/><path d="m6 6 12 12"/>', "", 16),
1952
2058
  chevronLeft: svg('<path d="m15 18-6-6 6-6"/>', "", 16),
1953
2059
  chevronRight: svg('<path d="m9 18 6-6-6-6"/>', "", 16),
1954
2060
  layers: svg(
@@ -1971,7 +2077,8 @@ function sidebar(opts) {
1971
2077
  ${opts.header}
1972
2078
  <div class="mx-2 h-px w-auto shrink-0 bg-sidebar-border" role="separator"></div>
1973
2079
  <div class="flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]" data-sidebar="content">
1974
- <div class="relative flex w-full min-w-0 flex-col p-2"><div class="w-full text-sm">
2080
+ ${opts.links ? `<div class="relative flex w-full min-w-0 flex-col p-2 lg:hidden" data-sidebar="group"><div class="w-full text-sm" data-sidebar="group-content">${opts.links}</div></div>
2081
+ ` : ""}<div class="relative flex w-full min-w-0 flex-col p-2"><div class="w-full text-sm">
1975
2082
  ${opts.nav}
1976
2083
  </div></div>
1977
2084
  </div>
@@ -2084,9 +2191,6 @@ function themeToggle(label) {
2084
2191
  "hidden h-4 w-4 dark:block"
2085
2192
  )}</button>`;
2086
2193
  }
2087
- function repoLink(url, label) {
2088
- return `<a href="${esc(url)}" class="rounded-md p-2 text-muted-foreground hover:bg-accent hover:text-foreground" aria-label="${esc(label)}" rel="noopener"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false"><path d="M12 .3a12 12 0 0 0-3.8 23.4c.6.1.8-.3.8-.6v-2c-3.3.7-4-1.6-4-1.6-.6-1.4-1.4-1.8-1.4-1.8-1-.7.1-.7.1-.7 1.2.1 1.8 1.2 1.8 1.2 1 1.8 2.8 1.3 3.5 1 0-.8.4-1.3.7-1.6-2.7-.3-5.5-1.3-5.5-6 0-1.2.5-2.3 1.3-3.1-.2-.4-.6-1.6 0-3.2 0 0 1-.3 3.3 1.2a11.5 11.5 0 0 1 6 0C17.3 4.7 18.3 5 18.3 5c.6 1.6.2 2.8.1 3.2.8.8 1.3 1.9 1.3 3.1 0 4.6-2.8 5.6-5.5 5.9.4.4.8 1.1.8 2.2v3.3c0 .3.2.7.8.6A12 12 0 0 0 12 .3"/></svg></a>`;
2089
- }
2090
2194
  function pageActions(o) {
2091
2195
  const item = "relative flex w-full cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground no-underline border-0 bg-transparent text-left";
2092
2196
  const arrow = svg('<path d="M7 7h10v10"/><path d="M7 17 17 7"/>', "ml-auto opacity-60", 14);
@@ -2217,7 +2321,122 @@ function linkIconAttrs(icons) {
2217
2321
  return { tokens: tokens || void 0, style: style || void 0 };
2218
2322
  }
2219
2323
 
2324
+ // src/theme/docs-layout/site-chrome.ts
2325
+ var isExternal2 = (href) => /^https?:\/\//i.test(href);
2326
+ var ANNOUNCEMENT_TONE_CLASS = {
2327
+ note: "border-note/40 bg-note/15",
2328
+ tip: "border-tip/40 bg-tip/15",
2329
+ warning: "border-warning/40 bg-warning/20",
2330
+ caution: "border-danger/40 bg-danger/15"
2331
+ };
2332
+
2333
+ // src/theme/compose.ts
2334
+ import { inlineMarkdownHtml, isChromeMenu } from "@dogsbay/site-files";
2335
+
2336
+ // node_modules/@dogsbay/icons/dist/social-data.js
2337
+ var SOCIAL_ICON_BODIES = {
2338
+ "bitbucket": {
2339
+ "body": '<path fill="currentColor" d="M.778 1.213a.768.768 0 0 0-.768.892l3.263 19.81c.084.5.515.868 1.022.873H19.95a.77.77 0 0 0 .77-.646l3.27-20.03a.768.768 0 0 0-.768-.891zM14.52 15.53H9.522L8.17 8.466h7.561z"/>',
2340
+ "size": 24
2341
+ },
2342
+ "bluesky": {
2343
+ "body": '<path fill="currentColor" d="M5.202 2.857C7.954 4.922 10.913 9.11 12 11.358c1.087-2.247 4.046-6.436 6.798-8.501C20.783 1.366 24 .213 24 3.883c0 .732-.42 6.156-.667 7.037c-.856 3.061-3.978 3.842-6.755 3.37c4.854.826 6.089 3.562 3.422 6.299c-5.065 5.196-7.28-1.304-7.847-2.97c-.104-.305-.152-.448-.153-.327c0-.121-.05.022-.153.327c-.568 1.666-2.782 8.166-7.847 2.97c-2.667-2.737-1.432-5.473 3.422-6.3c-2.777.473-5.899-.308-6.755-3.369C.42 10.04 0 4.615 0 3.883c0-3.67 3.217-2.517 5.202-1.026"/>',
2344
+ "size": 24
2345
+ },
2346
+ "discord": {
2347
+ "body": '<path fill="currentColor" d="M20.317 4.37a19.8 19.8 0 0 0-4.885-1.515a.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.3 18.3 0 0 0-5.487 0a13 13 0 0 0-.617-1.25a.08.08 0 0 0-.079-.037A19.7 19.7 0 0 0 3.677 4.37a.1.1 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.08.08 0 0 0 .031.057a19.9 19.9 0 0 0 5.993 3.03a.08.08 0 0 0 .084-.028a14 14 0 0 0 1.226-1.994a.076.076 0 0 0-.041-.106a13 13 0 0 1-1.872-.892a.077.077 0 0 1-.008-.128a10 10 0 0 0 .372-.292a.07.07 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.07.07 0 0 1 .078.01q.181.149.373.292a.077.077 0 0 1-.006.127a12.3 12.3 0 0 1-1.873.892a.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.08.08 0 0 0 .084.028a19.8 19.8 0 0 0 6.002-3.03a.08.08 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.06.06 0 0 0-.031-.03M8.02 15.33c-1.182 0-2.157-1.085-2.157-2.419c0-1.333.956-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.956 2.418-2.157 2.418m7.975 0c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.955-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.946 2.418-2.157 2.418"/>',
2348
+ "size": 24
2349
+ },
2350
+ "facebook": {
2351
+ "body": '<path fill="currentColor" d="M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978c.401 0 .955.042 1.468.103a9 9 0 0 1 1.141.195v3.325a9 9 0 0 0-.653-.036a27 27 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.7 1.7 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103l-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647"/>',
2352
+ "size": 24
2353
+ },
2354
+ "git": {
2355
+ "body": '<path fill="currentColor" d="M13.09 23.549a1.54 1.54 0 0 1-2.18 0L.451 13.089a1.54 1.54 0 0 1 0-2.179l7.191-7.19l2.733 2.733a1.85 1.85 0 0 0 .964 2.326v6.66a1.849 1.849 0 1 0 1.54 0V8.957l2.508 2.508a1.85 1.85 0 1 0 1.09-1.09l-2.634-2.634a1.85 1.85 0 0 0-2.378-2.377L8.73 2.63L10.91.451a1.54 1.54 0 0 1 2.179 0l10.459 10.46a1.54 1.54 0 0 1 0 2.179z"/>',
2356
+ "size": 24
2357
+ },
2358
+ "github": {
2359
+ "body": '<path fill="currentColor" d="M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/>',
2360
+ "size": 24
2361
+ },
2362
+ "gitlab": {
2363
+ "body": '<path fill="currentColor" d="m23.6 9.593l-.033-.086L20.3.98a.85.85 0 0 0-.336-.405a.875.875 0 0 0-1 .054a.9.9 0 0 0-.29.44L16.47 7.818H7.537L5.333 1.07a.86.86 0 0 0-.29-.441a.875.875 0 0 0-1-.054a.86.86 0 0 0-.336.405L.433 9.502l-.032.086a6.066 6.066 0 0 0 2.012 7.01l.01.009l.03.021l4.977 3.727l2.462 1.863l1.5 1.132a1.01 1.01 0 0 0 1.22 0l1.499-1.132l2.461-1.863l5.006-3.75l.013-.01a6.07 6.07 0 0 0 2.01-7.002"/>',
2364
+ "size": 24
2365
+ },
2366
+ "huggingface": {
2367
+ "body": '<path fill="currentColor" d="M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378c0 1.112.178 2.181.503 3.185c.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284c.278.173.48.408.71.694c.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542c.01.026.653 1.552 1.657 2.54c.616.605 1.01 1.223 1.082 1.912c.055.537-.096 1.059-.38 1.572c.637.121 1.294.187 1.967.187c.657 0 1.298-.063 1.921-.178c-.287-.517-.44-1.041-.384-1.581c.07-.69.465-1.307 1.081-1.913c1.004-.987 1.647-2.513 1.657-2.539c.021-.074.083-.285.233-.542c.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952c.23-.286.432-.52.71-.694c.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174a1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094c-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71c-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013a1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921a.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92a.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164c1.607-.007 2.984-1.155 3.572-1.164c.196-.003.305.12.305.454c0 .886-.424 2.328-1.563 3.202c-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026l-.01.008l-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116a1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243a1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444c-.034-.016-.104-.008-.2.022q-.094.03-.216.087q-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096a3 3 0 0 0-.26.219a2 2 0 0 0-.12.121a2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203c0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194c-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858s-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64c-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647s2.822 2.813 2.562 3.244s-1.176-.506-1.176-.506s-2.866-2.567-3.49-1.898s.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405c-.238.839-2.71-1.587-3.216-.642c-.506.946 3.49 2.056 3.522 2.064c1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194c1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858s.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64c.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647s-2.822 2.813-2.562 3.244s1.176-.506 1.176-.506s2.866-2.567 3.49-1.898s-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405c.238.839 2.71-1.587 3.216-.642c.506.946-3.49 2.056-3.522 2.064c-1.29.33-4.568 1.028-5.713-.624"/>',
2368
+ "size": 24
2369
+ },
2370
+ "instagram": {
2371
+ "body": '<path fill="currentColor" d="M7.03.084c-1.277.06-2.149.264-2.91.563a5.9 5.9 0 0 0-2.124 1.388a5.9 5.9 0 0 0-1.38 2.127C.321 4.926.12 5.8.064 7.076s-.069 1.688-.063 4.947s.021 3.667.083 4.947c.061 1.277.264 2.149.563 2.911c.308.789.72 1.457 1.388 2.123a5.9 5.9 0 0 0 2.129 1.38c.763.295 1.636.496 2.913.552c1.278.056 1.689.069 4.947.063s3.668-.021 4.947-.082c1.28-.06 2.147-.265 2.91-.563a5.9 5.9 0 0 0 2.123-1.388a5.9 5.9 0 0 0 1.38-2.129c.295-.763.496-1.636.551-2.912c.056-1.28.07-1.69.063-4.948c-.006-3.258-.02-3.667-.081-4.947c-.06-1.28-.264-2.148-.564-2.911a5.9 5.9 0 0 0-1.387-2.123a5.9 5.9 0 0 0-2.128-1.38c-.764-.294-1.636-.496-2.914-.55C15.647.009 15.236-.006 11.977 0S8.31.021 7.03.084m.14 21.693c-1.17-.05-1.805-.245-2.228-.408a3.7 3.7 0 0 1-1.382-.895a3.7 3.7 0 0 1-.9-1.378c-.165-.423-.363-1.058-.417-2.228c-.06-1.264-.072-1.644-.08-4.848c-.006-3.204.006-3.583.061-4.848c.05-1.169.246-1.805.408-2.228c.216-.561.477-.96.895-1.382a3.7 3.7 0 0 1 1.379-.9c.423-.165 1.057-.361 2.227-.417c1.265-.06 1.644-.072 4.848-.08c3.203-.006 3.583.006 4.85.062c1.168.05 1.804.244 2.227.408c.56.216.96.475 1.382.895s.681.817.9 1.378c.165.422.362 1.056.417 2.227c.06 1.265.074 1.645.08 4.848c.005 3.203-.006 3.583-.061 4.848c-.051 1.17-.245 1.805-.408 2.23c-.216.56-.477.96-.896 1.38a3.7 3.7 0 0 1-1.378.9c-.422.165-1.058.362-2.226.418c-1.266.06-1.645.072-4.85.079s-3.582-.006-4.848-.06m9.783-16.192a1.44 1.44 0 1 0 1.437-1.442a1.44 1.44 0 0 0-1.437 1.442M5.839 12.012a6.161 6.161 0 1 0 12.323-.024a6.162 6.162 0 0 0-12.323.024M8 12.008A4 4 0 1 1 12.008 16A4 4 0 0 1 8 12.008"/>',
2372
+ "size": 24
2373
+ },
2374
+ "linkedin": {
2375
+ "body": '<path fill="currentColor" d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037c-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85c3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.06 2.06 0 0 1-2.063-2.065a2.064 2.064 0 1 1 2.063 2.065m1.782 13.019H3.555V9h3.564zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0z"/>',
2376
+ "size": 24
2377
+ },
2378
+ "mastodon": {
2379
+ "body": '<path fill="currentColor" d="M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127C.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611c.118 1.24.325 2.47.62 3.68c.55 2.237 2.777 4.098 4.96 4.857c2.336.792 4.849.923 7.256.38q.398-.092.786-.213c.585-.184 1.27-.39 1.774-.753a.06.06 0 0 0 .023-.043v-1.809a.05.05 0 0 0-.02-.041a.05.05 0 0 0-.046-.01a20.3 20.3 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.6 5.6 0 0 1-.319-1.433a.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546c.376 0 .75 0 1.125-.01c1.57-.044 3.224-.124 4.768-.422q.059-.011.11-.024c2.435-.464 4.753-1.92 4.989-5.604c.008-.145.03-1.52.03-1.67c.002-.512.167-3.63-.024-5.545m-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976c-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35c-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102q0-1.965 1.011-3.12c.696-.77 1.608-1.164 2.74-1.164c1.311 0 2.302.5 2.962 1.498l.638 1.06l.638-1.06c.66-.999 1.65-1.498 2.96-1.498c1.13 0 2.043.395 2.74 1.164q1.012 1.155 1.012 3.12z"/>',
2380
+ "size": 24
2381
+ },
2382
+ "medium": {
2383
+ "body": '<path fill="currentColor" d="M4.21 0A4.2 4.2 0 0 0 0 4.21v15.58A4.2 4.2 0 0 0 4.21 24h15.58A4.2 4.2 0 0 0 24 19.79v-1.093a5 5 0 0 1-.422.02c-2.577 0-4.027-2.146-4.09-4.832a8 8 0 0 1 .022-.708c.093-1.186.475-2.241 1.105-3.022a3.9 3.9 0 0 1 1.395-1.1c.468-.237 1.127-.367 1.664-.367h.023q.151 0 .303.01V4.211A4.2 4.2 0 0 0 19.79 0Zm.198 5.583h4.165l3.588 8.435l3.59-8.435h3.864v.146l-.019.004c-.705.16-1.063.397-1.063 1.254h-.003l.003 10.274c.06.676.424.885 1.063 1.03l.02.004v.145h-4.923v-.145l.019-.005c.639-.144.994-.353 1.054-1.03V7.267l-4.745 11.15h-.261L6.15 7.569v9.445c0 .857.358 1.094 1.063 1.253l.02.004v.147H4.405v-.147l.019-.004c.705-.16 1.065-.397 1.065-1.253V6.987c0-.857-.358-1.094-1.064-1.254l-.018-.004zm19.25 3.668c-1.086.023-1.733 1.323-1.813 3.124H24V9.298a1.4 1.4 0 0 0-.342-.047m-1.862 3.632c-.1 1.756.86 3.239 2.204 3.634v-3.634z"/>',
2384
+ "size": 24
2385
+ },
2386
+ "npm": {
2387
+ "body": '<path fill="currentColor" d="M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019l-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"/>',
2388
+ "size": 24
2389
+ },
2390
+ "reddit": {
2391
+ "body": '<path fill="currentColor" d="M12 0C5.373 0 0 5.373 0 12c0 3.314 1.343 6.314 3.515 8.485l-2.286 2.286A.72.72 0 0 0 1.738 24H12c6.627 0 12-5.373 12-12S18.627 0 12 0m4.388 3.199a1.999 1.999 0 1 1-1.947 2.46v.002a2.37 2.37 0 0 0-2.032 2.341v.007c1.776.067 3.4.567 4.686 1.363a2.802 2.802 0 1 1 2.908 4.753c-.088 3.256-3.637 5.876-7.997 5.876c-4.361 0-7.905-2.617-7.998-5.87a2.8 2.8 0 0 1 1.189-5.34c.645 0 1.239.218 1.712.585c1.275-.79 2.881-1.291 4.64-1.365v-.01a3.23 3.23 0 0 1 2.88-3.207a2 2 0 0 1 1.959-1.595m-8.085 8.376c-.784 0-1.459.78-1.506 1.797s.64 1.429 1.426 1.429s1.371-.369 1.418-1.385s-.553-1.841-1.338-1.841m7.406 0c-.786 0-1.385.824-1.338 1.841s.634 1.385 1.418 1.385c.785 0 1.473-.413 1.426-1.429c-.046-1.017-.721-1.797-1.506-1.797m-3.703 4.013c-.974 0-1.907.048-2.77.135a.222.222 0 0 0-.183.305a3.2 3.2 0 0 0 2.953 1.964a3.2 3.2 0 0 0 2.953-1.964a.222.222 0 0 0-.184-.305a28 28 0 0 0-2.769-.135"/>',
2392
+ "size": 24
2393
+ },
2394
+ "rss": {
2395
+ "body": '<path fill="currentColor" d="M19.199 24C19.199 13.467 10.533 4.8 0 4.8V0c13.165 0 24 10.835 24 24zM3.291 17.415a3.3 3.3 0 0 1 3.293 3.295A3.303 3.303 0 0 1 3.283 24C1.47 24 0 22.526 0 20.71s1.475-3.294 3.291-3.295M15.909 24h-4.665c0-6.169-5.075-11.245-11.244-11.245V8.09c8.727 0 15.909 7.184 15.909 15.91"/>',
2396
+ "size": 24
2397
+ },
2398
+ "slack": {
2399
+ "body": '<path fill="currentColor" d="M5.042 15.165a2.53 2.53 0 0 1-2.52 2.523A2.53 2.53 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52a2.527 2.527 0 0 1 2.521 2.52v6.313A2.53 2.53 0 0 1 8.834 24a2.53 2.53 0 0 1-2.521-2.522zM8.834 5.042a2.53 2.53 0 0 1-2.521-2.52A2.53 2.53 0 0 1 8.834 0a2.53 2.53 0 0 1 2.521 2.522v2.52zm0 1.271a2.53 2.53 0 0 1 2.521 2.521a2.53 2.53 0 0 1-2.521 2.521H2.522A2.53 2.53 0 0 1 0 8.834a2.53 2.53 0 0 1 2.522-2.521zm10.122 2.521a2.53 2.53 0 0 1 2.522-2.521A2.53 2.53 0 0 1 24 8.834a2.53 2.53 0 0 1-2.522 2.521h-2.522zm-1.268 0a2.53 2.53 0 0 1-2.523 2.521a2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.53 2.53 0 0 1 2.523 2.522zm-2.523 10.122a2.53 2.53 0 0 1 2.523 2.522A2.53 2.53 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522zm0-1.268a2.527 2.527 0 0 1-2.52-2.523a2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.53 2.53 0 0 1-2.522 2.523z"/>',
2400
+ "size": 24
2401
+ },
2402
+ "stackoverflow": {
2403
+ "body": '<path fill="currentColor" d="m15.725 0l-1.72 1.277l6.39 8.588l1.716-1.277zm-3.94 3.418l-1.369 1.644l8.225 6.85l1.369-1.644zm-3.15 4.465l-.905 1.94l9.702 4.517l.904-1.94zm-1.85 4.86l-.44 2.093l10.473 2.201l.44-2.092l-10.473-2.203zM1.89 15.47V24h19.19v-8.53h-2.133v6.397H4.021v-6.396zm4.265 2.133v2.13h10.66v-2.13H6.154Z"/>',
2404
+ "size": 24
2405
+ },
2406
+ "telegram": {
2407
+ "body": '<path fill="currentColor" d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12a12 12 0 0 0 12-12A12 12 0 0 0 12 0zm4.962 7.224c.1-.002.321.023.465.14a.5.5 0 0 1 .171.325c.016.093.036.306.02.472c-.18 1.898-.962 6.502-1.36 8.627c-.168.9-.499 1.201-.82 1.23c-.696.065-1.225-.46-1.9-.902c-1.056-.693-1.653-1.124-2.678-1.8c-1.185-.78-.417-1.21.258-1.91c.177-.184 3.247-2.977 3.307-3.23c.007-.032.014-.15-.056-.212s-.174-.041-.249-.024q-.159.037-5.061 3.345q-.72.495-1.302.48c-.428-.008-1.252-.241-1.865-.44c-.752-.245-1.349-.374-1.297-.789q.04-.324.893-.663q5.247-2.286 6.998-3.014c3.332-1.386 4.025-1.627 4.476-1.635"/>',
2408
+ "size": 24
2409
+ },
2410
+ "threads": {
2411
+ "body": '<path fill="currentColor" d="M12.186 24h-.007c-3.581-.024-6.334-1.205-8.184-3.509C2.35 18.44 1.5 15.586 1.472 12.01v-.017c.03-3.579.879-6.43 2.525-8.482C5.845 1.205 8.6.024 12.18 0h.014c2.746.02 5.043.725 6.826 2.098c1.677 1.29 2.858 3.13 3.509 5.467l-2.04.569c-1.104-3.96-3.898-5.984-8.304-6.015c-2.91.022-5.11.936-6.54 2.717C4.307 6.504 3.616 8.914 3.589 12c.027 3.086.718 5.496 2.057 7.164c1.43 1.783 3.631 2.698 6.54 2.717c2.623-.02 4.358-.631 5.8-2.045c1.647-1.613 1.618-3.593 1.09-4.798c-.31-.71-.873-1.3-1.634-1.75c-.192 1.352-.622 2.446-1.284 3.272c-.886 1.102-2.14 1.704-3.73 1.79c-1.202.065-2.361-.218-3.259-.801c-1.063-.689-1.685-1.74-1.752-2.964c-.065-1.19.408-2.285 1.33-3.082c.88-.76 2.119-1.207 3.583-1.291a14 14 0 0 1 3.02.142c-.126-.742-.375-1.332-.75-1.757c-.513-.586-1.308-.883-2.359-.89h-.029c-.844 0-1.992.232-2.721 1.32l-1.757-1.18c.98-1.454 2.568-2.256 4.478-2.256h.044c3.194.02 5.097 1.975 5.287 5.388q.163.07.321.142c1.49.7 2.58 1.761 3.154 3.07c.797 1.82.871 4.79-1.548 7.158c-1.85 1.81-4.094 2.628-7.277 2.65Zm1.003-11.69q-.362 0-.739.021c-1.836.103-2.98.946-2.916 2.143c.067 1.256 1.452 1.839 2.784 1.767c1.224-.065 2.818-.543 3.086-3.71a10.5 10.5 0 0 0-2.215-.221"/>',
2412
+ "size": 24
2413
+ },
2414
+ "twitch": {
2415
+ "body": '<path fill="currentColor" d="M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"/>',
2416
+ "size": 24
2417
+ },
2418
+ "x": {
2419
+ "body": '<path fill="currentColor" d="M14.234 10.162L22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299l-.929-1.329L3.076 1.56h3.182l5.965 8.532l.929 1.329l7.754 11.09h-3.182z"/>',
2420
+ "size": 24
2421
+ },
2422
+ "youtube": {
2423
+ "body": '<path fill="currentColor" d="M23.498 6.186a3.02 3.02 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.02 3.02 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.02 3.02 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.02 3.02 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814M9.545 15.568V8.432L15.818 12z"/>',
2424
+ "size": 24
2425
+ }
2426
+ };
2427
+
2428
+ // node_modules/@dogsbay/icons/dist/social.js
2429
+ function socialIconSvg(name, size = 20) {
2430
+ const icon = Object.hasOwn(SOCIAL_ICON_BODIES, name) ? SOCIAL_ICON_BODIES[name] : void 0;
2431
+ if (!icon)
2432
+ return null;
2433
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 ${icon.size} ${icon.size}" aria-hidden="true" focusable="false">${icon.body}</svg>`;
2434
+ }
2435
+ var SOCIAL_ICONS = Object.keys(SOCIAL_ICON_BODIES);
2436
+
2220
2437
  // src/theme/compose.ts
2438
+ import { ANNOUNCEMENT_HEAD_SCRIPT } from "@dogsbay/elements/announcement-head";
2439
+ import { COLOR_MODE_HEAD_SCRIPTS } from "@dogsbay/elements/color-mode-head";
2221
2440
  var PROVIDERS = {
2222
2441
  claude: { label: "Open in Claude", url: "https://claude.ai/new?q={q}" },
2223
2442
  chatgpt: { label: "Open in ChatGPT", url: "https://chatgpt.com/?q={q}" },
@@ -2229,7 +2448,7 @@ function linkIconBodyAttrs(icons) {
2229
2448
  return tokens ? ` data-link-icons="${esc2(tokens)}" style="${esc2(style ?? "")}"` : "";
2230
2449
  }
2231
2450
  var LOGO = safe2(BOOK_ICON);
2232
- var ICONS2 = { chevronLeft: safe2(ICONS.chevronLeft), chevronRight: safe2(ICONS.chevronRight), layers: safe2(ICONS.layers) };
2451
+ var ICONS2 = { chevronLeft: safe2(ICONS.chevronLeft), chevronRight: safe2(ICONS.chevronRight), chevronDown: safe2(ICONS.chevronDown), close: safe2(ICONS.close), layers: safe2(ICONS.layers) };
2233
2452
  function plainData(v) {
2234
2453
  if (v === null || typeof v === "string" || typeof v === "boolean") return v;
2235
2454
  if (typeof v === "number") return Number.isFinite(v) ? v : null;
@@ -2245,7 +2464,60 @@ function plainData(v) {
2245
2464
  }
2246
2465
  return void 0;
2247
2466
  }
2248
- var THEME_BOOT = "<script>(function(){try{var t=localStorage.getItem('theme');var d=t?t==='dark':matchMedia('(prefers-color-scheme: dark)').matches;document.documentElement.classList.toggle('dark',d)}catch(e){}})()<\/script>";
2467
+ function headBoot(cfg) {
2468
+ const a = cfg.chrome.announcement?.closeable ? cfg.chrome.announcement : void 0;
2469
+ return `<script>${COLOR_MODE_HEAD_SCRIPTS[cfg.chrome.colorMode]}<\/script>` + (a ? `
2470
+ <meta name="db-announcement" content="${esc2(announcementKey(cfg))}">
2471
+ <script>${ANNOUNCEMENT_HEAD_SCRIPT}<\/script>` : "");
2472
+ }
2473
+ function announcementKey(cfg) {
2474
+ const id = cfg.chrome.announcement?.id ?? "";
2475
+ let urlBase = "";
2476
+ if (cfg.url && /^https?:\/\//i.test(cfg.url)) {
2477
+ try {
2478
+ const path = new URL(cfg.url).pathname.replace(/^\/+|\/+$/g, "");
2479
+ urlBase = path ? `/${path}` : "";
2480
+ } catch {
2481
+ }
2482
+ }
2483
+ const prefix = urlBase + (cfg.basePath ? `/${cfg.basePath}` : "");
2484
+ return `${prefix || cfg.name}#${id}`;
2485
+ }
2486
+ function sitePathOf(p) {
2487
+ const path = `/${p.prefix ? `${p.prefix}/` : ""}${p.out}`;
2488
+ return path.replace(/(^|\/)index\.html$/, "$1").replace(/\.html$/, "");
2489
+ }
2490
+ function isCurrent(href, page, basePath) {
2491
+ if (isExternal2(href)) return false;
2492
+ let link = href.replace(/[?#].*$/, "");
2493
+ if (basePath && (link === `/${basePath}` || link.startsWith(`/${basePath}/`))) link = link.slice(basePath.length + 1) || "/";
2494
+ const norm = (x) => x.endsWith("/") ? x : `${x}/`;
2495
+ const a = norm(page);
2496
+ const b = norm(link);
2497
+ return a === b || b.split("/").filter(Boolean).length > 1 && a.startsWith(b);
2498
+ }
2499
+ function chromeData(p, cfg, t) {
2500
+ const c = cfg.chrome;
2501
+ const href = (h) => menuHref(h, p.siteRoot, cfg.linkStyle, cfg.basePath);
2502
+ const page = sitePathOf(p);
2503
+ const link = (l) => ({ label: l.label, href: href(l.href), current: isCurrent(l.href, page, cfg.basePath) ? "page" : "", external: isExternal2(l.href) });
2504
+ const social = (list, fallbackLabel) => list.flatMap((s) => {
2505
+ const svg2 = socialIconSvg(s.icon, 20);
2506
+ return svg2 ? [{ label: fallbackLabel && s.label === "Source repository" ? fallbackLabel : s.label, href: href(s.href), svg: safe2(svg2), external: isExternal2(s.href) }] : [];
2507
+ });
2508
+ return {
2509
+ headerLinks: c.header.links.map((l) => isChromeMenu(l) ? { label: l.label, href: "", current: "", items: l.items.map(link) } : { ...link(l), items: [] }),
2510
+ headerSocial: social(c.header.social, t("repository")),
2511
+ footerColumns: c.footer.columns.map((col) => ({ title: col.title, links: col.links.map(link) })),
2512
+ footerSocial: social(c.footer.social),
2513
+ announcement: c.announcement ? { id: c.announcement.id, key: announcementKey(cfg), html: safe2(inlineMarkdownHtml(c.announcement.text, { href })), toneClass: ANNOUNCEMENT_TONE_CLASS[c.announcement.tone] ?? ANNOUNCEMENT_TONE_CLASS.note, closeable: c.announcement.closeable } : "",
2514
+ siteLogo: c.logo && p.logo ? (
2515
+ // A wordmark is the link's name (site.logo.alt, by default site.name); beside the name, the image is decoration
2516
+ { light: `${p.siteRoot}${p.logo.light}`, dark: p.logo.dark ? `${p.siteRoot}${p.logo.dark}` : "", alt: c.logo.replacesName ? c.logo.alt || cfg.name : "", replacesName: c.logo.replacesName ? "1" : "" }
2517
+ ) : { light: "", dark: "", alt: "", replacesName: "" },
2518
+ copyrightHtml: safe2(c.copyright ? inlineMarkdownHtml(c.copyright, { href }) : "")
2519
+ };
2520
+ }
2249
2521
  async function composePage(p, cfg, templates) {
2250
2522
  const t = p.t;
2251
2523
  const hasToc = p.toc !== "off" && p.headings.length >= 2 && !p.wide;
@@ -2274,7 +2546,7 @@ async function composePage(p, cfg, templates) {
2274
2546
  // Front matter as plain data, so a layout can loop over its own lists (`page.meta.features`).
2275
2547
  meta: plainData(p.meta ?? {})
2276
2548
  },
2277
- site: { name: cfg.name, tagline: cfg.tagline, copyright: cfg.copyright ?? "" },
2549
+ site: { name: cfg.name, tagline: cfg.tagline, copyright: cfg.copyright ?? "", colorMode: cfg.chrome.colorMode },
2278
2550
  paths: { unit: p.unitRoot, site: p.siteRoot, home: p.homeHref },
2279
2551
  logo: LOGO,
2280
2552
  // Page data the region partials read.
@@ -2293,7 +2565,9 @@ async function composePage(p, cfg, templates) {
2293
2565
  // As the Astro pipeline: turning page actions off also drops the footer link.
2294
2566
  llmsHref: cfg.llmsTxt && cfg.pageActions.enabled && cfg.pageActions.footerLink ? `${p.unitRoot}llms.txt` : void 0,
2295
2567
  poweredBy: cfg.poweredBy,
2296
- icons: ICONS2
2568
+ icons: ICONS2,
2569
+ // The site chrome (plans/site-chrome.md): headerLinks, headerSocial, footerColumns, footerSocial, announcement, siteLogo, copyrightHtml.
2570
+ ...chromeData(p, cfg, t)
2297
2571
  };
2298
2572
  const region = (name, extra) => templates.region(`partials/${name}.html`, extra ? { ...base, ...extra } : base);
2299
2573
  const switcher = (kind, options, label) => region("switcher", { switcher: { kind, label, options: options.map((o) => ({ label: o.label, href: o.href, current: o.current, prefix: o.prefix, note: o.note, disabled: o.disabled, link: o.link })) } });
@@ -2305,6 +2579,8 @@ async function composePage(p, cfg, templates) {
2305
2579
  hasSidebar ? sidebar({
2306
2580
  header: sidebarHeader,
2307
2581
  label: t("nav"),
2582
+ links: cfg.chrome.header.links.length ? String(await region("header-links", { layout: "list" })) + // The header's icons too, below md, where the header has no room for them beside the links
2583
+ (base.headerSocial.length ? `<div class="mt-2 flex flex-wrap items-center gap-1 px-1 md:hidden">${await region("social-links", { social: base.headerSocial, size: "header", socialClass: "" })}</div>` : "") : "",
2308
2584
  nav: navTree(p.nav, { ...p.navOptions, toggleLabel: t("toggleSection"), unitRoot: p.unitRoot })
2309
2585
  }) : ""
2310
2586
  ),
@@ -2329,7 +2605,13 @@ async function composePage(p, cfg, templates) {
2329
2605
  // Below the breadcrumb, above the title, as DocsLayout's inline placement.
2330
2606
  pageActionsInline: safe2(actions && cfg.pageActions.placement !== "header" ? `<div class="mb-4 flex justify-end" data-page-actions-inline>${actions}</div>` : ""),
2331
2607
  searchButton: safe2(cfg.search ? searchButton(t("search")) : ""),
2332
- repoLink: safe2(cfg.repoUrl ? repoLink(cfg.repoUrl, t("repository")) : ""),
2608
+ // header.social (site.repoUrl is its default); hidden below md when the header has links and a sidebar carries them
2609
+ // (a blank page has none, so its links and icons stay in the header)
2610
+ repoLink: await region("social-links", { social: base.headerSocial, size: "header", socialClass: cfg.chrome.header.links.length && hasSidebar ? "max-md:hidden" : "" }),
2611
+ headerLinks: await region("header-links", { layout: "bar", wrap: hasSidebar ? "" : "1" }),
2612
+ footerColumns: await region("footer-columns"),
2613
+ footerSocial: await region("social-links", { social: base.footerSocial, size: "footer", socialClass: "" }),
2614
+ announcementBar: await region("announcement"),
2333
2615
  themeToggle: safe2(themeToggle(t("theme"))),
2334
2616
  pager: await region("pager"),
2335
2617
  footerMeta: await region("footer-meta"),
@@ -2343,18 +2625,24 @@ async function composePage(p, cfg, templates) {
2343
2625
  seo: seoData({ ...p.seo, title: p.title, siteName: cfg.name, description: p.description, headings: p.headings, tags: p.tags, lastUpdated: p.lastUpdated })
2344
2626
  })) : "")
2345
2627
  ),
2346
- themeBoot: safe2(THEME_BOOT),
2628
+ themeBoot: safe2(headBoot(cfg)),
2347
2629
  head: "",
2348
2630
  // Tells the client which search to use (src/client/search.ts).
2349
2631
  bodyAttrs: safe2((cfg.search && cfg.searchEngine !== "builtin" ? ` data-search="${cfg.searchEngine}"` : "") + linkIconBodyAttrs(cfg.linkIcons) + (cfg.imageZoom ? ` data-image-zoom="${esc2(JSON.stringify({ background: cfg.imageZoom.background, margin: cfg.imageZoom.margin, scrollOffset: cfg.imageZoom.scrollOffset }))}"` : "")),
2350
2632
  widthClass: p.wide ? "max-w-7xl" : "max-w-3xl",
2351
- has: { sidebar: hasSidebar ? "1" : "", toc: hasToc ? "1" : "", search: cfg.search ? "1" : "" },
2633
+ has: {
2634
+ sidebar: hasSidebar ? "1" : "",
2635
+ toc: hasToc ? "1" : "",
2636
+ search: cfg.search ? "1" : "",
2637
+ headerLinks: cfg.chrome.header.links.length ? "1" : "",
2638
+ footerSocial: base.footerSocial.length ? "1" : ""
2639
+ },
2352
2640
  scripts: safe2(
2353
2641
  // Escape "<\/script" and "<!--" so the text cannot end the element or switch the parser
2354
2642
  // into its escaped script states; the client reverses both before copying.
2355
2643
  (p.markdown != null && cfg.pageActions.enabled && cfg.pageActions.copyButton ? `<script type="text/markdown" id="db-page-markdown">${p.markdown.replace(/<\/(script)/gi, "<\\/$1").replace(/<!--/g, "<\\!--")}<\/script>
2356
2644
  ` : "") + `<script src="${esc2(p.unitRoot)}_dogsbay/nav.js" defer><\/script>
2357
- <script src="${esc2(p.siteRoot)}_dogsbay/assets/dogsbay.js" defer><\/script>`
2645
+ <script src="${esc2(p.siteRoot)}_dogsbay/assets/${CLIENT_FILE}" defer><\/script>`
2358
2646
  )
2359
2647
  };
2360
2648
  return templates.render(p.layout, ctx);
@@ -2692,7 +2980,12 @@ var EN = {
2692
2980
  pageOf: "Page {n} of {total}",
2693
2981
  collapseAll: "Collapse all",
2694
2982
  collapsedLine: "1 collapsed line",
2695
- collapsedLines: "{n} collapsed lines"
2983
+ collapsedLines: "{n} collapsed lines",
2984
+ // The site chrome (DocsLayout's names): header links, footer columns, the announcement bar.
2985
+ siteLinks: "Site",
2986
+ footerLinks: "Footer",
2987
+ announcement: "Announcement",
2988
+ closeAnnouncement: "Close announcement"
2696
2989
  };
2697
2990
  var FR = {
2698
2991
  lastUpdated: "Derni\xE8re mise \xE0 jour : {date}",
@@ -2821,6 +3114,264 @@ function strings(locale, overrides) {
2821
3114
  return (key) => table[key] ?? "";
2822
3115
  }
2823
3116
 
3117
+ // src/core/unit-manifest.ts
3118
+ import { unitKeyString, unitManifest } from "@dogsbay/site-files";
3119
+ function unitKey(u) {
3120
+ return unitKeyString({ product: u.product, locale: u.locale, version: u.version });
3121
+ }
3122
+ function manifestPath(u) {
3123
+ return `_dogsbay/units/${unitKey(u)}.json`;
3124
+ }
3125
+ function makeManifest(u, ssg, redirects) {
3126
+ const inside = (p) => !u.prefix ? p : p === u.prefix ? "" : p.startsWith(`${u.prefix}/`) ? p.slice(u.prefix.length + 1) : p;
3127
+ return { ...unitManifest({ product: u.product, locale: u.locale, version: u.version }, { pages: ssg.pageOut.map(([p]) => inside(p)), sitemap: [], redirects }), ssg };
3128
+ }
3129
+ function parseManifest(raw) {
3130
+ let v = raw;
3131
+ if (typeof raw === "string") {
3132
+ try {
3133
+ v = JSON.parse(raw);
3134
+ } catch (e) {
3135
+ return { problem: `not JSON (${e.message})` };
3136
+ }
3137
+ }
3138
+ const m = v;
3139
+ if (!m || typeof m !== "object" || m.schemaVersion !== 1) return { problem: "not a unit manifest (schemaVersion 1)" };
3140
+ const s = m.ssg;
3141
+ const strings2 = (x) => Array.isArray(x) && x.every((y) => typeof y === "string");
3142
+ const pairs = (x) => Array.isArray(x) && x.every((y) => Array.isArray(y) && y.length === 2 && typeof y[0] === "string" && typeof y[1] === "string");
3143
+ if (!s || typeof s !== "object" || typeof s.prefix !== "string" || !Array.isArray(s.redirectInputs) || !pairs(s.pageOut) || !strings2(s.sitemaps) || !strings2(s.files) || typeof s.client !== "string" || typeof s.builder !== "string") {
3144
+ return { problem: "has no dogsbay-ssg section (written by another tool, or an older dogsbay-ssg)" };
3145
+ }
3146
+ if (s.math !== void 0 && typeof s.math !== "boolean" || s.iconSets !== void 0 && !strings2(s.iconSets)) return { problem: "has a malformed notices record" };
3147
+ const triples = (x) => Array.isArray(x) && x.every((y) => Array.isArray(y) && y.length === 3 && typeof y[0] === "string" && typeof y[1] === "string" && typeof y[2] === "number");
3148
+ if (!triples(m.redirects)) return { problem: "has malformed redirects" };
3149
+ const inputs = s.redirectInputs;
3150
+ if (!inputs.every((r) => !!r && typeof r === "object" && typeof r.from === "string" && typeof r.to === "string" && typeof r.status === "number")) {
3151
+ return { problem: "has a malformed redirect" };
3152
+ }
3153
+ return { manifest: m };
3154
+ }
3155
+
3156
+ // src/generated/icon-notices.ts
3157
+ var ICON_SET_NOTICES = { "fa6-brands": "Font Awesome 6 Brands icons (CC-BY-4.0), by Dave Gandy\nhttps://github.com/FortAwesome/Font-Awesome\nLicence: https://creativecommons.org/licenses/by/4.0/", "fa6-regular": "Font Awesome 6 Regular icons (CC-BY-4.0), by Dave Gandy\nhttps://github.com/FortAwesome/Font-Awesome\nLicence: https://creativecommons.org/licenses/by/4.0/", "fa6-solid": "Font Awesome 6 Solid icons (CC-BY-4.0), by Dave Gandy\nhttps://github.com/FortAwesome/Font-Awesome\nLicence: https://creativecommons.org/licenses/by/4.0/", "lucide": 'Lucide icons (ISC), by Lucide Contributors\nhttps://github.com/lucide-icons/lucide\nLicence: https://github.com/lucide-icons/lucide/blob/main/LICENSE\n\nISC License\n\nCopyright (c) 2026 Lucide Icons and Contributors\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n---\n\nThe following Lucide icons are derived from the Feather project:\n\nairplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out\n\nThe MIT License (MIT) (for the icons listed above)\n\nCopyright (c) 2013-present Cole Bemis\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.', "mdi": `Material Design Icons (Apache-2.0), by Pictogrammers
3158
+ https://github.com/Templarian/MaterialDesign
3159
+ Licence: https://github.com/Templarian/MaterialDesign/blob/master/LICENSE
3160
+
3161
+ Apache License
3162
+ Version 2.0, January 2004
3163
+ http://www.apache.org/licenses/
3164
+
3165
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
3166
+
3167
+ 1. Definitions.
3168
+
3169
+ "License" shall mean the terms and conditions for use, reproduction,
3170
+ and distribution as defined by Sections 1 through 9 of this document.
3171
+
3172
+ "Licensor" shall mean the copyright owner or entity authorized by
3173
+ the copyright owner that is granting the License.
3174
+
3175
+ "Legal Entity" shall mean the union of the acting entity and all
3176
+ other entities that control, are controlled by, or are under common
3177
+ control with that entity. For the purposes of this definition,
3178
+ "control" means (i) the power, direct or indirect, to cause the
3179
+ direction or management of such entity, whether by contract or
3180
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
3181
+ outstanding shares, or (iii) beneficial ownership of such entity.
3182
+
3183
+ "You" (or "Your") shall mean an individual or Legal Entity
3184
+ exercising permissions granted by this License.
3185
+
3186
+ "Source" form shall mean the preferred form for making modifications,
3187
+ including but not limited to software source code, documentation
3188
+ source, and configuration files.
3189
+
3190
+ "Object" form shall mean any form resulting from mechanical
3191
+ transformation or translation of a Source form, including but
3192
+ not limited to compiled object code, generated documentation,
3193
+ and conversions to other media types.
3194
+
3195
+ "Work" shall mean the work of authorship, whether in Source or
3196
+ Object form, made available under the License, as indicated by a
3197
+ copyright notice that is included in or attached to the work
3198
+ (an example is provided in the Appendix below).
3199
+
3200
+ "Derivative Works" shall mean any work, whether in Source or Object
3201
+ form, that is based on (or derived from) the Work and for which the
3202
+ editorial revisions, annotations, elaborations, or other modifications
3203
+ represent, as a whole, an original work of authorship. For the purposes
3204
+ of this License, Derivative Works shall not include works that remain
3205
+ separable from, or merely link (or bind by name) to the interfaces of,
3206
+ the Work and Derivative Works thereof.
3207
+
3208
+ "Contribution" shall mean any work of authorship, including
3209
+ the original version of the Work and any modifications or additions
3210
+ to that Work or Derivative Works thereof, that is intentionally
3211
+ submitted to Licensor for inclusion in the Work by the copyright owner
3212
+ or by an individual or Legal Entity authorized to submit on behalf of
3213
+ the copyright owner. For the purposes of this definition, "submitted"
3214
+ means any form of electronic, verbal, or written communication sent
3215
+ to the Licensor or its representatives, including but not limited to
3216
+ communication on electronic mailing lists, source code control systems,
3217
+ and issue tracking systems that are managed by, or on behalf of, the
3218
+ Licensor for the purpose of discussing and improving the Work, but
3219
+ excluding communication that is conspicuously marked or otherwise
3220
+ designated in writing by the copyright owner as "Not a Contribution."
3221
+
3222
+ "Contributor" shall mean Licensor and any individual or Legal Entity
3223
+ on behalf of whom a Contribution has been received by Licensor and
3224
+ subsequently incorporated within the Work.
3225
+
3226
+ 2. Grant of Copyright License. Subject to the terms and conditions of
3227
+ this License, each Contributor hereby grants to You a perpetual,
3228
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
3229
+ copyright license to reproduce, prepare Derivative Works of,
3230
+ publicly display, publicly perform, sublicense, and distribute the
3231
+ Work and such Derivative Works in Source or Object form.
3232
+
3233
+ 3. Grant of Patent License. Subject to the terms and conditions of
3234
+ this License, each Contributor hereby grants to You a perpetual,
3235
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
3236
+ (except as stated in this section) patent license to make, have made,
3237
+ use, offer to sell, sell, import, and otherwise transfer the Work,
3238
+ where such license applies only to those patent claims licensable
3239
+ by such Contributor that are necessarily infringed by their
3240
+ Contribution(s) alone or by combination of their Contribution(s)
3241
+ with the Work to which such Contribution(s) was submitted. If You
3242
+ institute patent litigation against any entity (including a
3243
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
3244
+ or a Contribution incorporated within the Work constitutes direct
3245
+ or contributory patent infringement, then any patent licenses
3246
+ granted to You under this License for that Work shall terminate
3247
+ as of the date such litigation is filed.
3248
+
3249
+ 4. Redistribution. You may reproduce and distribute copies of the
3250
+ Work or Derivative Works thereof in any medium, with or without
3251
+ modifications, and in Source or Object form, provided that You
3252
+ meet the following conditions:
3253
+
3254
+ (a) You must give any other recipients of the Work or
3255
+ Derivative Works a copy of this License; and
3256
+
3257
+ (b) You must cause any modified files to carry prominent notices
3258
+ stating that You changed the files; and
3259
+
3260
+ (c) You must retain, in the Source form of any Derivative Works
3261
+ that You distribute, all copyright, patent, trademark, and
3262
+ attribution notices from the Source form of the Work,
3263
+ excluding those notices that do not pertain to any part of
3264
+ the Derivative Works; and
3265
+
3266
+ (d) If the Work includes a "NOTICE" text file as part of its
3267
+ distribution, then any Derivative Works that You distribute must
3268
+ include a readable copy of the attribution notices contained
3269
+ within such NOTICE file, excluding those notices that do not
3270
+ pertain to any part of the Derivative Works, in at least one
3271
+ of the following places: within a NOTICE text file distributed
3272
+ as part of the Derivative Works; within the Source form or
3273
+ documentation, if provided along with the Derivative Works; or,
3274
+ within a display generated by the Derivative Works, if and
3275
+ wherever such third-party notices normally appear. The contents
3276
+ of the NOTICE file are for informational purposes only and
3277
+ do not modify the License. You may add Your own attribution
3278
+ notices within Derivative Works that You distribute, alongside
3279
+ or as an addendum to the NOTICE text from the Work, provided
3280
+ that such additional attribution notices cannot be construed
3281
+ as modifying the License.
3282
+
3283
+ You may add Your own copyright statement to Your modifications and
3284
+ may provide additional or different license terms and conditions
3285
+ for use, reproduction, or distribution of Your modifications, or
3286
+ for any such Derivative Works as a whole, provided Your use,
3287
+ reproduction, and distribution of the Work otherwise complies with
3288
+ the conditions stated in this License.
3289
+
3290
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
3291
+ any Contribution intentionally submitted for inclusion in the Work
3292
+ by You to the Licensor shall be under the terms and conditions of
3293
+ this License, without any additional terms or conditions.
3294
+ Notwithstanding the above, nothing herein shall supersede or modify
3295
+ the terms of any separate license agreement you may have executed
3296
+ with Licensor regarding such Contributions.
3297
+
3298
+ 6. Trademarks. This License does not grant permission to use the trade
3299
+ names, trademarks, service marks, or product names of the Licensor,
3300
+ except as required for reasonable and customary use in describing the
3301
+ origin of the Work and reproducing the content of the NOTICE file.
3302
+
3303
+ 7. Disclaimer of Warranty. Unless required by applicable law or
3304
+ agreed to in writing, Licensor provides the Work (and each
3305
+ Contributor provides its Contributions) on an "AS IS" BASIS,
3306
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
3307
+ implied, including, without limitation, any warranties or conditions
3308
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
3309
+ PARTICULAR PURPOSE. You are solely responsible for determining the
3310
+ appropriateness of using or redistributing the Work and assume any
3311
+ risks associated with Your exercise of permissions under this License.
3312
+
3313
+ 8. Limitation of Liability. In no event and under no legal theory,
3314
+ whether in tort (including negligence), contract, or otherwise,
3315
+ unless required by applicable law (such as deliberate and grossly
3316
+ negligent acts) or agreed to in writing, shall any Contributor be
3317
+ liable to You for damages, including any direct, indirect, special,
3318
+ incidental, or consequential damages of any character arising as a
3319
+ result of this License or out of the use or inability to use the
3320
+ Work (including but not limited to damages for loss of goodwill,
3321
+ work stoppage, computer failure or malfunction, or any and all
3322
+ other commercial damages or losses), even if such Contributor
3323
+ has been advised of the possibility of such damages.
3324
+
3325
+ 9. Accepting Warranty or Additional Liability. While redistributing
3326
+ the Work or Derivative Works thereof, You may choose to offer,
3327
+ and charge a fee for, acceptance of support, warranty, indemnity,
3328
+ or other liability obligations and/or rights consistent with this
3329
+ License. However, in accepting such obligations, You may act only
3330
+ on Your own behalf and on Your sole responsibility, not on behalf
3331
+ of any other Contributor, and only if You agree to indemnify,
3332
+ defend, and hold each Contributor harmless for any liability
3333
+ incurred by, or claims asserted against, such Contributor by reason
3334
+ of your accepting any such warranty or additional liability.
3335
+
3336
+ END OF TERMS AND CONDITIONS
3337
+
3338
+ APPENDIX: How to apply the Apache License to your work.
3339
+
3340
+ To apply the Apache License to your work, attach the following
3341
+ boilerplate notice, with the fields enclosed by brackets "[]"
3342
+ replaced with your own identifying information. (Don't include
3343
+ the brackets!) The text should be enclosed in the appropriate
3344
+ comment syntax for the file format. We also recommend that a
3345
+ file or class name and description of purpose be included on the
3346
+ same "printed page" as the copyright notice for easier
3347
+ identification within third-party archives.
3348
+
3349
+ Copyright [yyyy] [name of copyright owner]
3350
+
3351
+ Licensed under the Apache License, Version 2.0 (the "License");
3352
+ you may not use this file except in compliance with the License.
3353
+ You may obtain a copy of the License at
3354
+
3355
+ http://www.apache.org/licenses/LICENSE-2.0
3356
+
3357
+ Unless required by applicable law or agreed to in writing, software
3358
+ distributed under the License is distributed on an "AS IS" BASIS,
3359
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3360
+ See the License for the specific language governing permissions and
3361
+ limitations under the License.`, "octicon": 'Octicons (MIT), by GitHub\nhttps://github.com/primer/octicons/\nLicence: https://github.com/primer/octicons/blob/main/LICENSE\n\nMIT License\n\nCopyright (c) 2026 GitHub Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.', "simple-icons": "Simple Icons (CC0-1.0), by Simple Icons Collaborators\nhttps://github.com/simple-icons/simple-icons\nLicence: https://github.com/simple-icons/simple-icons/blob/develop/LICENSE.md" };
3362
+
3363
+ // src/core/icon-notices.ts
3364
+ var ICON_SET_NAME = /^[a-z0-9][a-z0-9-]{0,63}$/;
3365
+ function iconSetNotices(sets) {
3366
+ const more = [...new Set(sets)].filter((s) => s !== "lucide" && s !== "mdi" && ICON_SET_NAME.test(s)).sort();
3367
+ if (!more.length) return void 0;
3368
+ const lines = more.map((set) => ICON_SET_NOTICES[set] ?? `Iconify set "${set}": its licence is in @iconify-json/${set}/info.json`);
3369
+ return `Icons in the pages from other Iconify sets (@dogsbay/icons)
3370
+
3371
+ ${lines.join("\n\n")}
3372
+ `;
3373
+ }
3374
+
2824
3375
  // src/core/taxonomy.ts
2825
3376
  import { parseMeta } from "@dogsbay/types";
2826
3377
  function safeSegment(s) {
@@ -3354,6 +3905,25 @@ async function assetVerdict(p, c, untrusted, sanitizing) {
3354
3905
  }
3355
3906
  return sanitizing && ACTIVE_FILE.test(p) ? "active" : "copy";
3356
3907
  }
3908
+ async function emitLogo(cfg, input, emit, report) {
3909
+ const logo = cfg.chrome.logo;
3910
+ if (!logo) return void 0;
3911
+ const found = [];
3912
+ for (const kind of ["light", "dark"]) {
3913
+ const path = logo[kind];
3914
+ if (!path) continue;
3915
+ const c = input.files.get(path);
3916
+ if (c === void 0) throw new ConfigError(`site.logo.${kind}: ${path} is not a file in the project`);
3917
+ if (await assetVerdict(path, c, input.untrusted === true, false) !== "copy") {
3918
+ report("untrusted", `[untrusted] site.logo.${kind}: ${path} is an SVG that could run script, so the site has no logo`);
3919
+ return void 0;
3920
+ }
3921
+ found.push({ kind, path, c, out: `_dogsbay/site/logo-${kind}${path.slice(path.lastIndexOf(".")).toLowerCase()}` });
3922
+ }
3923
+ for (const f of found) await emit(f.out, f.c);
3924
+ const out = (kind) => found.find((f) => f.kind === kind)?.out;
3925
+ return { light: out("light"), ...out("dark") ? { dark: out("dark") } : {} };
3926
+ }
3357
3927
  var NAV_FILES = ["nav.yml", "nav.yaml", "nav.json"];
3358
3928
  var SKIP_FILES = /* @__PURE__ */ new Set([...NAV_FILES, "dogsbay.config.yml", "dogsbay.config.yaml", ".DS_Store"]);
3359
3929
  function fmKey(src) {
@@ -3421,7 +3991,9 @@ async function build(input, hooks = {}) {
3421
3991
  phase.init = now() - t0;
3422
3992
  let pages = 0;
3423
3993
  let assets = 0;
3424
- const state = { redirects: [], notes: /* @__PURE__ */ new Map(), navCache: navCache(), written: /* @__PURE__ */ new Set(), stubs: [], pageOut: /* @__PURE__ */ new Map(), sitemaps: /* @__PURE__ */ new Map(), supplied: /* @__PURE__ */ new Set(), hostFiles: /* @__PURE__ */ new Map(), homeForward: /* @__PURE__ */ new Map(), usedMath: false, diagrams: diagramStore(input, cfg), scan: hooks.keep || hooks.lazy ? new ScanCache() : void 0, parseCache: input.parseCacheBytes === 0 ? false : new ParseCache(input.parseCacheBytes ?? DEFAULT_PARSE_CACHE_BYTES), templateBudget: templateBudget(input.untrusted === true, input.templateMs), dataCache: new DataCache(input.dataCacheBytes ?? DEFAULT_DATA_CACHE_BYTES) };
3994
+ const state = { redirects: [], notes: /* @__PURE__ */ new Map(), navCache: navCache(), written: /* @__PURE__ */ new Set(), stubs: [], pageOut: /* @__PURE__ */ new Map(), sitemaps: /* @__PURE__ */ new Map(), supplied: /* @__PURE__ */ new Set(), hostFiles: /* @__PURE__ */ new Map(), homeForward: /* @__PURE__ */ new Map(), usedMath: false, mathUnits: /* @__PURE__ */ new Set(), diagrams: diagramStore(input, cfg), scan: hooks.keep || hooks.lazy ? new ScanCache() : void 0, parseCache: input.parseCacheBytes === 0 ? false : new ParseCache(input.parseCacheBytes ?? DEFAULT_PARSE_CACHE_BYTES), templateBudget: templateBudget(input.untrusted === true, input.templateMs), dataCache: new DataCache(input.dataCacheBytes ?? DEFAULT_DATA_CACHE_BYTES) };
3995
+ for (const w of cfg.chrome.warnings) report("config", `[config] ${w}`);
3996
+ state.logo = await emitLogo(cfg, input, emit, report);
3425
3997
  for (const r of cfg.redirects) {
3426
3998
  const from = sitePath(r.from, cfg.basePath);
3427
3999
  if (!from) {
@@ -3437,6 +4009,17 @@ async function build(input, hooks = {}) {
3437
4009
  stub: /\/\s*$/.test(r.from) ? `${from}/index.html` : void 0
3438
4010
  });
3439
4011
  }
4012
+ const stored = storedManifests(input.manifests, allUnits, units, report);
4013
+ input.manifests?.splice(0);
4014
+ const configRedirects = state.redirects.length;
4015
+ const unitRedirects = /* @__PURE__ */ new Map();
4016
+ for (const [prefix, m] of stored) {
4017
+ unitRedirects.set(prefix, m.redirectInputs);
4018
+ for (const [p, o] of m.pageOut) state.pageOut.set(p, o);
4019
+ state.sitemaps.set(prefix, m.sitemaps);
4020
+ if (m.homeForward !== void 0) state.homeForward.set(prefix, m.homeForward);
4021
+ }
4022
+ const unitRecords = /* @__PURE__ */ new Map();
3440
4023
  let frontMatterOf = frontMatterCache(readText);
3441
4024
  state.canonical = await defaultTables(cfg, allUnits, units, input.files, readText, (m) => report("canonical", m), frontMatterOf);
3442
4025
  if (siteBase(cfg)) state.languages = await languageTables(cfg, allUnits, units, input.files, readText, frontMatterOf);
@@ -3446,6 +4029,7 @@ async function build(input, hooks = {}) {
3446
4029
  hooks.context?.({ cfg, allUnits, input, highlighter, emit, warnings, problems, report, phase, theme, state, diagnostics: hooks.diagnostics, dataLines: hooks.dataLines });
3447
4030
  for (const unit of units) {
3448
4031
  classes = new Set(CLIENT_CANDIDATES);
4032
+ const before = { redirects: state.redirects.length, pageOut: state.pageOut.size, written: state.written.size };
3449
4033
  const r = await buildUnit(unit, allUnits, cfg, input, highlighter, emit, report, phase, theme.templates, state, { keep: hooks.keep, lazy: hooks.lazy, diagnostics: hooks.diagnostics, dataLines: hooks.dataLines });
3450
4034
  hooks.unitBuilt?.(unit, r, classes);
3451
4035
  pages += r.pages;
@@ -3457,15 +4041,21 @@ async function build(input, hooks = {}) {
3457
4041
  report("css", `[css] could not build the stylesheet for ${unit.prefix || "/"}: ${e.message}`, { unit: unit.prefix || "/" });
3458
4042
  }
3459
4043
  phase.css = (phase.css ?? 0) + now() - tCss;
4044
+ unitRedirects.set(unit.prefix, state.redirects.slice(before.redirects));
4045
+ unitRecords.set(unit.prefix, { pageOut: [...state.pageOut].slice(before.pageOut), files: [...state.written].slice(before.written), iconSets: input.icons?.sets?.() ?? [] });
3460
4046
  }
4047
+ state.redirects = [...state.redirects.slice(0, configRedirects), ...allUnits.flatMap((u) => unitRedirects.get(u.prefix) ?? [])];
4048
+ await emit(`_dogsbay/assets/${CLIENT_FILE}`, CLIENT_JS);
3461
4049
  await emit("_dogsbay/assets/dogsbay.js", CLIENT_JS);
3462
- if (state.usedMath) {
4050
+ const storedUnits = [...stored.values()];
4051
+ const anyMath = state.usedMath || storedUnits.some((m) => m.math);
4052
+ if (anyMath) {
3463
4053
  const { KATEX_CSS, KATEX_FONTS } = await import("./chunks/katex-assets-7BGR6WCR.mjs");
3464
4054
  await emit("_dogsbay/assets/katex/katex.min.css", KATEX_CSS);
3465
4055
  for (const [f, b64] of Object.entries(KATEX_FONTS)) await emit(`_dogsbay/assets/katex/fonts/${f}`, base64Bytes(b64));
3466
4056
  }
3467
- const iconNotices = input.icons?.notices?.();
3468
- await emit("_dogsbay/assets/THIRD-PARTY-NOTICES.txt", [SITE_NOTICES, state.usedMath && KATEX_NOTICE, iconNotices].filter(Boolean).join("\n"));
4057
+ const iconNotices = iconSetNotices([...input.icons?.sets?.() ?? [], ...storedUnits.flatMap((m) => m.iconSets ?? [])]);
4058
+ await emit("_dogsbay/assets/THIRD-PARTY-NOTICES.txt", [SITE_NOTICES, anyMath && KATEX_NOTICE, iconNotices].filter(Boolean).join("\n"));
3469
4059
  await emit("_dogsbay/assets/favicon.svg", `${FAVICON_SVG}
3470
4060
  `);
3471
4061
  await emit(
@@ -3497,11 +4087,14 @@ async function build(input, hooks = {}) {
3497
4087
  if (!input.untrusted) state.hostFiles.set(n, c);
3498
4088
  else if (fromStatic !== void 0) report("untrusted", `[untrusted] ${cfg.staticDir}/${n} is not used: an untrusted build takes no host configuration`);
3499
4089
  }
4090
+ if (rootUnit && !units.includes(rootUnit)) {
4091
+ for (const n of SITE_FILES) if (input.files.has(sourceRoot(rootUnit.source) + n)) state.supplied.add(n);
4092
+ }
3500
4093
  if (state.staticFiles?.has("robots.txt")) {
3501
4094
  if (state.supplied.has("robots.txt")) throw new ConfigError(`${cfg.staticDir}/robots.txt and the root content's robots.txt are both the site's robots.txt: keep the one in content.static (${cfg.staticDir})`);
3502
4095
  state.supplied.add("robots.txt");
3503
4096
  }
3504
- await emitSiteFiles(cfg, allUnits, units, def, state, emit, report, input.onRedirects);
4097
+ const rules = await emitSiteFiles(cfg, allUnits, units, stored, def, state, emit, report, input.onRedirects);
3505
4098
  phase.site = (phase.site ?? 0) + now() - tSite;
3506
4099
  const homeOf = (fromDir, unitPrefix, fallback) => {
3507
4100
  const page = state.homeForward.get(unitPrefix);
@@ -3519,8 +4112,30 @@ async function build(input, hooks = {}) {
3519
4112
  if (root && u.version && u.version === cfg.defaultVersion && u.prefix !== root) await emit(`${root}/index.html`, redirectPage(homeOf(root, u.prefix, `${u.version}/index.html`), cfg.name));
3520
4113
  }
3521
4114
  }
3522
- if (state.staticFiles && (units.length === allUnits.length || rootUnit && units.includes(rootUnit))) await emitStatic(cfg, state, allUnits, input.untrusted === true, emit, report);
3523
- state.stubs = await writeTranslationStubs(cfg, allUnits, units, translations, state, emit);
4115
+ if (state.staticFiles && (units.length === allUnits.length || units.length === 0 || rootUnit && units.includes(rootUnit))) await emitStatic(cfg, state, allUnits, input.untrusted === true, emit, report);
4116
+ state.stubs = await writeTranslationStubs(cfg, allUnits, units, translations, state, emit, void 0, new Set(stored.keys()));
4117
+ if (allUnits.length > 1 && !hooks.lazy && !hooks.keep) {
4118
+ for (const u of units) {
4119
+ const rec = unitRecords.get(u.prefix);
4120
+ const own = rules.filter((r) => unitOfPath(allUnits, r.from) === u);
4121
+ const ssg = {
4122
+ prefix: u.prefix,
4123
+ redirectInputs: unitRedirects.get(u.prefix) ?? [],
4124
+ pageOut: rec.pageOut,
4125
+ sitemaps: state.sitemaps.get(u.prefix) ?? [],
4126
+ ...state.homeForward.has(u.prefix) ? { homeForward: state.homeForward.get(u.prefix) } : {},
4127
+ // Its redirect stubs and missing-translation stubs are written after the units, in its folder.
4128
+ files: [.../* @__PURE__ */ new Set([...rec.files, ...own.map(stubFile), ...state.stubs.filter((f) => unitOfPath(allUnits, f) === u)])],
4129
+ client: CLIENT_FILE,
4130
+ builder: SSG_VERSION,
4131
+ ...state.mathUnits.has(u.prefix) ? { math: true } : {},
4132
+ ...rec.iconSets.length ? { iconSets: rec.iconSets } : {}
4133
+ };
4134
+ const served = own.map((r) => siteRedirect(r, cfg)).map((r) => [r.from, r.to, r.status]);
4135
+ await emit(manifestPath(u), `${JSON.stringify(makeManifest(u, ssg, served))}
4136
+ `);
4137
+ }
4138
+ }
3524
4139
  const spent = state.templateBudget.problem();
3525
4140
  if (spent) report("template", spent);
3526
4141
  return {
@@ -3590,7 +4205,7 @@ function staticFolder2(dir, files, untrusted) {
3590
4205
  for (const [k, c] of files) {
3591
4206
  if (!k.startsWith(dir + "/")) continue;
3592
4207
  const rel = k.slice(dir.length + 1);
3593
- if (staticPath(rel)) staticFiles.set(rel, c);
4208
+ if (staticPathServed(rel)) staticFiles.set(rel, c);
3594
4209
  }
3595
4210
  const served = { has: (p) => staticFiles.has(p) && staticServed(p, untrusted) };
3596
4211
  const staticFile = (t) => {
@@ -3602,9 +4217,6 @@ function staticFolder2(dir, files, untrusted) {
3602
4217
  };
3603
4218
  return { staticFiles, staticFile };
3604
4219
  }
3605
- function staticPath(rel) {
3606
- return copiedPath(rel) || rel.startsWith(".well-known/") && copiedPath(rel.slice(".well-known/".length));
3607
- }
3608
4220
  function staticServed(p, untrusted) {
3609
4221
  if (MERGED_FILES.has(p)) return false;
3610
4222
  if (!untrusted) return true;
@@ -3626,7 +4238,7 @@ async function emitStatic(cfg, state, units, untrusted, emit, report) {
3626
4238
  const label = `content.static (${cfg.staticDir})`;
3627
4239
  const lower = /* @__PURE__ */ new Map();
3628
4240
  const dirs = /* @__PURE__ */ new Map();
3629
- for (const w of state.written) {
4241
+ for (const w of /* @__PURE__ */ new Set([...state.written, ...state.pageOut.values()])) {
3630
4242
  lower.set(w.toLowerCase(), w);
3631
4243
  for (let i = w.indexOf("/"); i > 0; i = w.indexOf("/", i + 1)) dirs.set(w.slice(0, i).toLowerCase(), w);
3632
4244
  }
@@ -3670,7 +4282,7 @@ async function emitStatic(cfg, state, units, untrusted, emit, report) {
3670
4282
  if (plan.robots) for (const w of staticRobotsWarnings(await readText(files.get("robots.txt")), label)) report("static", `[static] ${w}`);
3671
4283
  for (const p of plan.copy) await emit(p, files.get(p));
3672
4284
  }
3673
- async function emitSiteFiles(cfg, all, built, def, state, emit, report, onRedirects) {
4285
+ async function emitSiteFiles(cfg, all, built, stored, def, state, emit, report, onRedirects) {
3674
4286
  const defPrefix = def?.prefix ?? "";
3675
4287
  const put = async (p, content) => {
3676
4288
  if (state.supplied.has(p)) {
@@ -3693,18 +4305,71 @@ async function emitSiteFiles(cfg, all, built, def, state, emit, report, onRedire
3693
4305
  } else if (cfg.url) {
3694
4306
  report("config", `[site] site.url "${cfg.url}" has no http:// or https://, so canonical links, the sitemap and absolute llms.txt links are left out`);
3695
4307
  }
3696
- if (!state.redirects.length) return merged("_redirects", void 0, mergeRedirects);
4308
+ if (!state.redirects.length) {
4309
+ await merged("_redirects", void 0, mergeRedirects);
4310
+ return [];
4311
+ }
4312
+ const unitOf2 = (p) => unitOfPath(all, p);
3697
4313
  const known = (p) => {
3698
- const u = unitOfPath(all, p);
3699
- return !!u && built.includes(u);
4314
+ const u = unitOf2(p);
4315
+ return !!u && (built.includes(u) || stored.has(u.prefix));
3700
4316
  };
3701
4317
  const inputs = state.redirects.filter((r) => known(r.from));
3702
4318
  const { rules, warnings: w } = collectRedirects(inputs, (p) => state.pageOut.get(p), known);
4319
+ const builtFrom = (r) => built.includes(unitOf2(r.from));
3703
4320
  for (const m of w) report("redirects", `[redirects] ${m}`);
3704
- onRedirects?.(rules);
3705
- for (const r of rules) await emit(stubFile(r), renderRedirectPage(r, cfg));
4321
+ onRedirects?.(rules.filter(builtFrom));
4322
+ const servedBefore = (r) => stored.get(unitOf2(r.from).prefix)?.redirects.get(siteRedirect(r, cfg).from);
4323
+ for (const r of rules) if (builtFrom(r) || servedBefore(r) !== siteRedirect(r, cfg).to) await emit(stubFile(r), renderRedirectPage(r, cfg));
3706
4324
  const ownRedirects = state.hostFiles.has("_redirects");
3707
4325
  await merged("_redirects", (cloudflare || ownRedirects) && rules.length ? renderRedirectsFile(rules, cfg) : void 0, mergeRedirects);
4326
+ return rules;
4327
+ }
4328
+ var siteRedirect = (r, cfg) => servedRedirect(r, { ...cfg, basePath: "" });
4329
+ function storedManifests(given, all, built, report) {
4330
+ const out = /* @__PURE__ */ new Map();
4331
+ if (!given) return out;
4332
+ for (const { path, text } of given) {
4333
+ const { manifest: m, problem } = parseManifest(text);
4334
+ if (!m) {
4335
+ report("units", `[units] ${path}: ${problem}; ignored`);
4336
+ continue;
4337
+ }
4338
+ const key = unitKey({ product: m.product ?? void 0, locale: m.locale ?? void 0, version: m.version ?? void 0 });
4339
+ const u = all.find((x) => unitKey(x) === key);
4340
+ if (!u) {
4341
+ report("units", `[units] ${path} is for ${key}, which the config no longer builds; ignored (remove its folder, ${m.ssg.prefix || "the site root"}, and the manifest)`);
4342
+ continue;
4343
+ }
4344
+ if (path !== manifestPath(u)) {
4345
+ report("units", `[units] ${path} is for ${key}, whose manifest is ${manifestPath(u)}; ignored`);
4346
+ continue;
4347
+ }
4348
+ if (u.prefix !== m.ssg.prefix) {
4349
+ report("units", `[units] ${path}: ${key} was built at ${m.ssg.prefix || "the site root"} and is now at ${u.prefix || "the site root"}; ignored until it is built again`);
4350
+ continue;
4351
+ }
4352
+ if (built.includes(u)) continue;
4353
+ const clean = (x) => !/[\s\u0000-\u001f\u007f]/.test(x) && !x.split("/").some((p) => p === ".." || p === ".");
4354
+ const mine = (p) => clean(p) && unitOfPath(all, p) === u;
4355
+ const redirectInputs = m.ssg.redirectInputs.filter((r) => mine(r.from) && (r.stub === void 0 || mine(r.stub)) && clean(r.to) && (r.suffix === void 0 || clean(r.suffix)));
4356
+ const pageOut = m.ssg.pageOut.filter(([p, o]) => mine(p) && mine(o));
4357
+ const sitemaps = m.ssg.sitemaps.filter(mine);
4358
+ const dropped = m.ssg.redirectInputs.length - redirectInputs.length + m.ssg.pageOut.length - pageOut.length + m.ssg.sitemaps.length - sitemaps.length;
4359
+ if (dropped) report("units", `[units] ${path}: ${dropped} entr${dropped === 1 ? "y" : "ies"} outside ${u.prefix || "the root unit"} left out`);
4360
+ out.set(u.prefix, {
4361
+ redirectInputs,
4362
+ pageOut,
4363
+ sitemaps,
4364
+ homeForward: m.ssg.homeForward !== void 0 && mine(m.ssg.homeForward) ? m.ssg.homeForward : void 0,
4365
+ math: m.ssg.math,
4366
+ iconSets: m.ssg.iconSets,
4367
+ redirects: new Map(m.redirects.map(([f, t]) => [f, t]))
4368
+ });
4369
+ }
4370
+ const missing = all.filter((u) => !built.includes(u) && !out.has(u.prefix));
4371
+ if (missing.length) report("units", `[units] no manifest for ${missing.map((u) => u.prefix || "the root unit").join(", ")}: not built yet, so the site-wide files leave out their redirects`);
4372
+ return out;
3708
4373
  }
3709
4374
  function defaultUnit(units, cfg) {
3710
4375
  if (cfg.products) {
@@ -4024,6 +4689,10 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
4024
4689
  blog?.add(slug, infos.get(slug).title, fm);
4025
4690
  if (mode.keep || mode.lazy) frontMatter.set(p, memo2 ? memo2.fmKey ??= fmKey(await source()) : fmKey(await source()));
4026
4691
  } else if (!SKIP_FILES.has(memberRel(p)) && copiedPath(p)) {
4692
+ if (p.split("/").some((seg) => seg.toLowerCase() === "_dogsbay")) {
4693
+ warn("site", `${p} is inside a folder named _dogsbay, the build's own; not copied`, { file: abs(p) });
4694
+ continue;
4695
+ }
4027
4696
  const verdict = await assetVerdict(p, c, input.untrusted === true, sanitizing);
4028
4697
  if (verdict === "untrusted") untrustedFiles.push(p);
4029
4698
  else if (verdict === "active") activeFiles.push(p);
@@ -4551,7 +5220,10 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
4551
5220
  for (const u of ctx.unsafeUrls ?? []) warnPage(info, "unsafe-url", `refused the unsafe URL "${u}"`);
4552
5221
  for (const m of removed) warnPage(info, "html", m);
4553
5222
  for (const name of ctx.missingIcons ?? []) warnPage(info, "icon", `unknown icon "${name}"${input.icons ? "" : " (only the built-in icons are available in this build)"}`);
4554
- if (ctx.usedMath) state.usedMath = true;
5223
+ if (ctx.usedMath) {
5224
+ state.usedMath = true;
5225
+ state.mathUnits.add(unit.prefix);
5226
+ }
4555
5227
  for (const b of resolver.broken) brokenCounts.has(b) ? brokenCounts.set(b, brokenCounts.get(b) + 1) : brokenCounts.set(detach(b), 1);
4556
5228
  phase.render = (phase.render ?? 0) + now() - t;
4557
5229
  t = now();
@@ -4620,6 +5292,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
4620
5292
  meta: fm,
4621
5293
  math: ctx.usedMath === true,
4622
5294
  lastUpdated,
5295
+ logo: state.logo,
4623
5296
  seo: {
4624
5297
  url: canon.url,
4625
5298
  home: info.slug === "",
@@ -4871,6 +5544,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
4871
5544
  locales: switchOptions("locale", unit, allUnits, cfg, out, siteRoot, t_),
4872
5545
  wide: o.wide ?? false,
4873
5546
  feed: o.feed ? hrefBetween(out, o.feed, "html") : void 0,
5547
+ logo: state.logo,
4874
5548
  seo: {
4875
5549
  url,
4876
5550
  image: cfg.ogImage,
@@ -5237,16 +5911,6 @@ function switchOptions(kind, unit, all, cfg, out, siteRoot, t) {
5237
5911
  if (kind !== "version" || !hasMenu || !menu?.links.length) return options;
5238
5912
  return [...options, ...menu.links.map((l) => ({ label: l.label, href: menuHref(l.href, siteRoot, cfg.linkStyle, cfg.basePath), current: false, prefix: "", link: true }))];
5239
5913
  }
5240
- var MENU_FILE = /\.(html?|pdf|txt|md|xml|json|ya?ml|csv|zip|gz|tgz|epub|svg|png|jpe?g|gif|webp)$/i;
5241
- function menuHref(href, siteRoot, style, basePath = "") {
5242
- if (/^https?:/i.test(href)) return href;
5243
- const m = /^\/([^?#]*)(.*)$/.exec(href);
5244
- let path = m[1];
5245
- if (basePath && (path === basePath || path.startsWith(basePath + "/"))) path = path.slice(basePath.length + 1);
5246
- if (path === "" || path.endsWith("/")) path = style === "pretty" ? path : `${path}index.html`;
5247
- else if (!MENU_FILE.test(path) && style !== "pretty") path = `${path}.html`;
5248
- return `${siteRoot || "./"}${path}${m[2]}`;
5249
- }
5250
5914
  function productOptions(unit, cfg, siteRoot, t) {
5251
5915
  if (!cfg.products) return [];
5252
5916
  const entries = shared(() => productSwitcher(cfg.products, unit.locale));
@@ -5276,7 +5940,7 @@ function versionBanner(unit, all, cfg, out, siteRoot, t) {
5276
5940
  if (!latest) return void 0;
5277
5941
  return esc3(t("oldVersion")) + link(latest);
5278
5942
  }
5279
- async function writeTranslationStubs(cfg, all, built, tables, state, emit, exists = () => false) {
5943
+ async function writeTranslationStubs(cfg, all, built, tables, state, emit, exists = () => false, stored = /* @__PURE__ */ new Set()) {
5280
5944
  const def = cfg.defaultLocale;
5281
5945
  if (!def || !tables.size) return [];
5282
5946
  const unitOf2 = (locale, version) => all.find((u) => u.locale === locale && u.version === version && !u.product);
@@ -5295,10 +5959,11 @@ async function writeTranslationStubs(cfg, all, built, tables, state, emit, exist
5295
5959
  const home = unitOf2(def, m.version);
5296
5960
  const out = tables.get(home.prefix).pages.get(m.page);
5297
5961
  const target = unitOf2(m.locale, m.version);
5298
- if (!built.includes(target ?? home)) continue;
5299
- const to = join(home.prefix, out);
5300
- if (built.includes(home) && !pageFiles.has(to)) continue;
5301
5962
  const file = join(target ? target.prefix : m.locale + home.prefix.slice(def.length), out);
5963
+ const folder = target ? void 0 : unitOfPath(all, file);
5964
+ if (!built.includes(target ?? home) && !(folder && built.includes(folder) && stored.has(home.prefix))) continue;
5965
+ const to = join(home.prefix, out);
5966
+ if ((built.includes(home) || stored.has(home.prefix)) && !pageFiles.has(to)) continue;
5302
5967
  if (state.written.has(file) || pageFiles.has(file) || exists(file)) continue;
5303
5968
  await emit(file, redirectPage(hrefBetween(file, to, cfg.linkStyle), cfg.name));
5304
5969
  written.push(file);
@@ -5317,7 +5982,7 @@ function redirectPage(target, name) {
5317
5982
  function notFoundPage(cfg, unit, t) {
5318
5983
  const segments = [cfg.basePath, unit.prefix].filter(Boolean).map((x) => String(x).replace(/^\/+|\/+$/g, "")).filter(Boolean);
5319
5984
  const base = "/" + segments.map((x) => x + "/").join("");
5320
- return `<!doctype html><html lang="${esc3(unit.locale ?? cfg.defaultLocale ?? "en")}"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="robots" content="noindex"><title>${esc3(t("notFound"))} | ${esc3(cfg.name)}</title>${notFoundMeta(cfg, t)}<link rel="stylesheet" href="${esc3(base)}_dogsbay/site.css"><link rel="icon" href="/${cfg.basePath ? cfg.basePath + "/" : ""}_dogsbay/assets/favicon.svg"></head><body class="bg-background text-foreground antialiased"><main class="mx-auto max-w-3xl px-6 py-16"><article class="docs-prose"><h1>${esc3(t("notFound"))}</h1><p>${esc3(t("notFoundBody"))}</p><p><a href="${esc3(base)}">${esc3(cfg.name)}</a></p></article></main></body></html>
5985
+ return `<!doctype html><html lang="${esc3(unit.locale ?? cfg.defaultLocale ?? "en")}"${cfg.chrome.colorMode === "dark" ? ' class="dark"' : ""}><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="robots" content="noindex"><title>${esc3(t("notFound"))} | ${esc3(cfg.name)}</title>${notFoundMeta(cfg, t)}<link rel="stylesheet" href="${esc3(base)}_dogsbay/site.css"><link rel="icon" href="/${cfg.basePath ? cfg.basePath + "/" : ""}_dogsbay/assets/favicon.svg"></head><body class="bg-background text-foreground antialiased"><main class="mx-auto max-w-3xl px-6 py-16"><article class="docs-prose"><h1>${esc3(t("notFound"))}</h1><p>${esc3(t("notFoundBody"))}</p><p><a href="${esc3(base)}">${esc3(cfg.name)}</a></p></article></main></body></html>
5321
5986
  `;
5322
5987
  }
5323
5988
  function notFoundMeta(cfg, t) {
@@ -5393,6 +6058,7 @@ function hreflangFor(cfg, unit, all, languages, slug) {
5393
6058
  }
5394
6059
 
5395
6060
  // src/core/dev.ts
6061
+ import { staticPathServed as staticPathServed2 } from "@dogsbay/site-files";
5396
6062
  var CONFIG_FILES = /* @__PURE__ */ new Set(["dogsbay.config.yml", "dogsbay.config.yaml"]);
5397
6063
  var NAV_FILES2 = /(^|\/)nav\.(ya?ml|json)$/;
5398
6064
  var START_ONLY = /(^|\/)(_dogsbay\/search\/|llms(-full)?\.txt$)/;
@@ -5644,6 +6310,7 @@ async function openDevSession(input, o = {}) {
5644
6310
  };
5645
6311
  const themeDir = config.themeDir ? config.themeDir.replace(/\/+$/, "") + "/" : void 0;
5646
6312
  const extraCss = new Set(config.css.map((c) => c.replace(/^\.\//, "")));
6313
+ const logos = new Set([config.chrome.logo?.light, config.chrome.logo?.dark].filter((x) => !!x));
5647
6314
  const lazy = /* @__PURE__ */ new Set();
5648
6315
  if (paths.some((p) => CONFIG_FILES.has(p))) {
5649
6316
  const next = await attributesOnly();
@@ -5657,7 +6324,7 @@ async function openDevSession(input, o = {}) {
5657
6324
  parsedConfig = next;
5658
6325
  if (!same) for (const prefix of units.keys()) lazy.add(prefix);
5659
6326
  }
5660
- if (paths.some((p) => themeDir && p.startsWith(themeDir) || extraCss.has(p))) {
6327
+ if (paths.some((p) => themeDir && p.startsWith(themeDir) || extraCss.has(p) || logos.has(p))) {
5661
6328
  await full();
5662
6329
  return { css: true, handled: "full" };
5663
6330
  }
@@ -5678,7 +6345,7 @@ async function openDevSession(input, o = {}) {
5678
6345
  if (TOPIC_MAP.test(p)) continue;
5679
6346
  if (config.staticDir && p.startsWith(config.staticDir + "/")) {
5680
6347
  const rel = p.slice(config.staticDir.length + 1);
5681
- if (rel === "_headers" || rel === "_redirects" || !staticPath(rel)) continue;
6348
+ if (rel === "_headers" || rel === "_redirects" || !staticPathServed2(rel)) continue;
5682
6349
  const files = ctx.state.staticFiles;
5683
6350
  if (!files.has(rel) && out.has(rel)) continue;
5684
6351
  mark("asset");
@@ -5899,8 +6566,8 @@ function peleRenderer() {
5899
6566
  // src/package/prebuilt.ts
5900
6567
  import { minifyCss } from "@dogsbay/render-html/css-tools";
5901
6568
  var SHEETS = {
5902
- default: () => import("./chunks/prebuilt-css-default-XHQGPWFR.mjs"),
5903
- mintlify: () => import("./chunks/prebuilt-css-mintlify-ZOM7VGVT.mjs")
6569
+ default: () => import("./chunks/prebuilt-css-default-65IKPMHZ.mjs"),
6570
+ mintlify: () => import("./chunks/prebuilt-css-mintlify-PIEJO5KN.mjs")
5904
6571
  };
5905
6572
  var prebuiltSiteCss = async (o) => {
5906
6573
  const base = (await (SHEETS[o.theme] ?? SHEETS.default)()).CSS;