@dogsbay/ssg-cli 0.2.0-beta.170 → 0.2.0-beta.174
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-NOTICES.txt +17 -17
- package/chunks/{build-command-MUROARRP.mjs → build-command-F5ZXJUMZ.mjs} +1 -1
- package/chunks/{check-command-3VMH7BBN.mjs → check-command-QIRV3YYT.mjs} +2 -2
- package/chunks/{chunk-ARP3JAGB.mjs → chunk-FMGFVL6D.mjs} +614 -99
- package/chunks/{chunk-AG37EIJE.mjs → chunk-PHDPMLE6.mjs} +1 -1
- package/chunks/{css-build-KWNP64XI.mjs → css-build-V5U6W2S3.mjs} +26 -2
- package/chunks/{dev-YGIWDIEE.mjs → dev-P3QNKKM2.mjs} +1 -1
- package/chunks/{publish-command-ALUC7Q3J.mjs → publish-command-WV3D6MZV.mjs} +1 -1
- package/chunks/{release-diff-FN7ECYHE.mjs → release-diff-YA6YME44.mjs} +2 -2
- package/cli.mjs +6 -6
- package/package.json +2 -2
|
@@ -79,9 +79,9 @@ var require_index_cjs = __commonJS({
|
|
|
79
79
|
}
|
|
80
80
|
return cache;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function decode3(string, exclude) {
|
|
83
83
|
if (typeof exclude !== "string") {
|
|
84
|
-
exclude =
|
|
84
|
+
exclude = decode3.defaultChars;
|
|
85
85
|
}
|
|
86
86
|
const cache = getDecodeCache(exclude);
|
|
87
87
|
return string.replace(/(%[a-f0-9]{2})+/gi, function(seq) {
|
|
@@ -140,8 +140,8 @@ var require_index_cjs = __commonJS({
|
|
|
140
140
|
return result;
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
decode3.defaultChars = ";/?:@&=+$,#";
|
|
144
|
+
decode3.componentChars = "";
|
|
145
145
|
var encodeCache = {};
|
|
146
146
|
function getEncodeCache(exclude) {
|
|
147
147
|
let cache = encodeCache[exclude];
|
|
@@ -398,7 +398,7 @@ var require_index_cjs = __commonJS({
|
|
|
398
398
|
this.hostname = host;
|
|
399
399
|
}
|
|
400
400
|
};
|
|
401
|
-
exports.decode =
|
|
401
|
+
exports.decode = decode3;
|
|
402
402
|
exports.encode = encode;
|
|
403
403
|
exports.format = format;
|
|
404
404
|
exports.parse = urlParse;
|
|
@@ -1040,7 +1040,7 @@ var require_lib = __commonJS({
|
|
|
1040
1040
|
EncodingMode3[EncodingMode3["Attribute"] = 3] = "Attribute";
|
|
1041
1041
|
EncodingMode3[EncodingMode3["Text"] = 4] = "Text";
|
|
1042
1042
|
})(EncodingMode2 = exports.EncodingMode || (exports.EncodingMode = {}));
|
|
1043
|
-
function
|
|
1043
|
+
function decode3(data, options) {
|
|
1044
1044
|
if (options === void 0) {
|
|
1045
1045
|
options = EntityLevel2.XML;
|
|
1046
1046
|
}
|
|
@@ -1051,7 +1051,7 @@ var require_lib = __commonJS({
|
|
|
1051
1051
|
}
|
|
1052
1052
|
return (0, decode_js_1.decodeXML)(data);
|
|
1053
1053
|
}
|
|
1054
|
-
exports.decode =
|
|
1054
|
+
exports.decode = decode3;
|
|
1055
1055
|
function decodeStrict(data, options) {
|
|
1056
1056
|
var _a3;
|
|
1057
1057
|
if (options === void 0) {
|
|
@@ -1059,7 +1059,7 @@ var require_lib = __commonJS({
|
|
|
1059
1059
|
}
|
|
1060
1060
|
var opts = typeof options === "number" ? { level: options } : options;
|
|
1061
1061
|
(_a3 = opts.mode) !== null && _a3 !== void 0 ? _a3 : opts.mode = decode_js_1.DecodingMode.Strict;
|
|
1062
|
-
return
|
|
1062
|
+
return decode3(data, opts);
|
|
1063
1063
|
}
|
|
1064
1064
|
exports.decodeStrict = decodeStrict;
|
|
1065
1065
|
function encode(data, options) {
|
|
@@ -1567,7 +1567,7 @@ var require_index_cjs3 = __commonJS({
|
|
|
1567
1567
|
compile(this);
|
|
1568
1568
|
return this;
|
|
1569
1569
|
};
|
|
1570
|
-
LinkifyIt.prototype.normalize = function
|
|
1570
|
+
LinkifyIt.prototype.normalize = function normalize3(match) {
|
|
1571
1571
|
if (!match.schema) {
|
|
1572
1572
|
match.url = `http://${match.url}`;
|
|
1573
1573
|
}
|
|
@@ -2243,7 +2243,7 @@ var require_index_cjs4 = __commonJS({
|
|
|
2243
2243
|
StateCore.prototype.Token = Token;
|
|
2244
2244
|
var NEWLINES_RE = /\r\n?|\n/g;
|
|
2245
2245
|
var NULL_RE = /\0/g;
|
|
2246
|
-
function
|
|
2246
|
+
function normalize3(state) {
|
|
2247
2247
|
let str7;
|
|
2248
2248
|
str7 = state.src.replace(NEWLINES_RE, "\n");
|
|
2249
2249
|
str7 = str7.replace(NULL_RE, "\uFFFD");
|
|
@@ -2556,7 +2556,7 @@ var require_index_cjs4 = __commonJS({
|
|
|
2556
2556
|
}
|
|
2557
2557
|
}
|
|
2558
2558
|
var _rules$2 = [
|
|
2559
|
-
["normalize",
|
|
2559
|
+
["normalize", normalize3],
|
|
2560
2560
|
["block", block2],
|
|
2561
2561
|
["inline", inline3],
|
|
2562
2562
|
["linkify", linkify$1],
|
|
@@ -5874,14 +5874,14 @@ function walkInline(nodes, options) {
|
|
|
5874
5874
|
return emitter(node, ctx);
|
|
5875
5875
|
}).join("");
|
|
5876
5876
|
}
|
|
5877
|
-
function applyTextFlags(text4, node,
|
|
5877
|
+
function applyTextFlags(text4, node, wrap3) {
|
|
5878
5878
|
let out = text4;
|
|
5879
5879
|
if (node.bold)
|
|
5880
|
-
out =
|
|
5880
|
+
out = wrap3.bold(out);
|
|
5881
5881
|
if (node.italic)
|
|
5882
|
-
out =
|
|
5882
|
+
out = wrap3.italic(out);
|
|
5883
5883
|
if (node.strikethrough)
|
|
5884
|
-
out =
|
|
5884
|
+
out = wrap3.strike(out);
|
|
5885
5885
|
return out;
|
|
5886
5886
|
}
|
|
5887
5887
|
|
|
@@ -5952,6 +5952,32 @@ function listable(children, parentKey) {
|
|
|
5952
5952
|
}
|
|
5953
5953
|
return out;
|
|
5954
5954
|
}
|
|
5955
|
+
function sections(items3, key2) {
|
|
5956
|
+
const out = [];
|
|
5957
|
+
for (const c of items3) {
|
|
5958
|
+
if (c.href === void 0) {
|
|
5959
|
+
const first = firstLocalHref(c.children);
|
|
5960
|
+
if (first !== void 0 && navKey(first) !== key2)
|
|
5961
|
+
out.push({ ...c, href: first, [SECTION]: "group" });
|
|
5962
|
+
else
|
|
5963
|
+
out.push(...listable(c.children, key2));
|
|
5964
|
+
} else
|
|
5965
|
+
out.push(...listable([c], key2).map((i) => ({ ...i, [SECTION]: true })));
|
|
5966
|
+
}
|
|
5967
|
+
return out;
|
|
5968
|
+
}
|
|
5969
|
+
var SECTION = Symbol("section");
|
|
5970
|
+
var EXTERNAL = /^[a-z][a-z0-9+.-]*:|^\/\//i;
|
|
5971
|
+
function firstLocalHref(items3) {
|
|
5972
|
+
for (const i of items3 ?? []) {
|
|
5973
|
+
if (i.href !== void 0 && !EXTERNAL.test(i.href))
|
|
5974
|
+
return i.href;
|
|
5975
|
+
const h = firstLocalHref(i.children);
|
|
5976
|
+
if (h !== void 0)
|
|
5977
|
+
return h;
|
|
5978
|
+
}
|
|
5979
|
+
return void 0;
|
|
5980
|
+
}
|
|
5955
5981
|
var bool = (v) => v === true || v === "true" || v === "";
|
|
5956
5982
|
function realizeChildLinks(tree, ctx) {
|
|
5957
5983
|
const result = { realized: 0, empty: [], fromFallback: [] };
|
|
@@ -5994,7 +6020,8 @@ function realizeChildLinks(tree, ctx) {
|
|
|
5994
6020
|
}).map((i) => ({ i, t: ctx.lookup?.(i.href)?.title ?? i.label }));
|
|
5995
6021
|
top = tagged(titled.sort((a, b) => a.t.localeCompare(b.t)).map((x) => x.i));
|
|
5996
6022
|
} else {
|
|
5997
|
-
|
|
6023
|
+
const atRoot = key2 === "/" || key2 === rootKey;
|
|
6024
|
+
top = tagged(atRoot && !tag ? sections(ctx.nav, key2) : listable(findNode(ctx.nav, key2, rootKey)?.children, key2));
|
|
5998
6025
|
if (!top.length && ctx.fallbackChildren) {
|
|
5999
6026
|
top = tagged(listable(ctx.fallbackChildren(key2), key2));
|
|
6000
6027
|
if (top.length)
|
|
@@ -6008,7 +6035,10 @@ function realizeChildLinks(tree, ctx) {
|
|
|
6008
6035
|
result.realized++;
|
|
6009
6036
|
const info = (item) => {
|
|
6010
6037
|
const hit = ctx.lookup?.(item.href);
|
|
6011
|
-
|
|
6038
|
+
const marked = item[SECTION];
|
|
6039
|
+
const section2 = marked && item.children?.length;
|
|
6040
|
+
const title = (section2 ? item.label : void 0) || hit?.title || item.label;
|
|
6041
|
+
return { title, description: descriptions && marked !== "group" ? hit?.description : void 0 };
|
|
6012
6042
|
};
|
|
6013
6043
|
if (cards) {
|
|
6014
6044
|
return [
|
|
@@ -7150,6 +7180,8 @@ var WELL_KNOWN_FIELDS = {
|
|
|
7150
7180
|
targetKeyword: { type: "string" },
|
|
7151
7181
|
// visibility / build behaviour the emitters read
|
|
7152
7182
|
draft: { type: "boolean" },
|
|
7183
|
+
// built and served, listed nowhere (plans/unlisted-pages.md)
|
|
7184
|
+
unlisted: { type: "boolean" },
|
|
7153
7185
|
noindex: { type: "boolean" },
|
|
7154
7186
|
nofollow: { type: "boolean" },
|
|
7155
7187
|
excludeFromSearch: { type: "boolean" },
|
|
@@ -9640,9 +9672,9 @@ function collectDiagnostics(tokens, lines, lineOf, sourceLine2) {
|
|
|
9640
9672
|
const text4 = span && sourceLine2?.(line);
|
|
9641
9673
|
let cols;
|
|
9642
9674
|
if (text4 !== void 0 && span) {
|
|
9643
|
-
const
|
|
9644
|
-
const key2 = `${line}\0${code2}\0${
|
|
9645
|
-
cols =
|
|
9675
|
+
const locate3 = span instanceof RegExp ? find(span) : span;
|
|
9676
|
+
const key2 = `${line}\0${code2}\0${locate3.pattern ?? ""}`;
|
|
9677
|
+
cols = locate3(text4, cursor.get(key2) ?? 0);
|
|
9646
9678
|
if (cols)
|
|
9647
9679
|
cursor.set(key2, cols[1]);
|
|
9648
9680
|
}
|
|
@@ -17096,8 +17128,8 @@ function endpoint(n, ctx) {
|
|
|
17096
17128
|
const parameters = list3(apiPropertiesHtml(p.parameters));
|
|
17097
17129
|
const requestBody = list3(apiPropertiesHtml(p.requestBody));
|
|
17098
17130
|
const responses = list3(p.responses).map((r) => Array.isArray(r.schema) ? { ...r, schema: apiPropertiesHtml(r.schema) } : r);
|
|
17099
|
-
const
|
|
17100
|
-
const card2 = `<div${attrs({ class: "space-y-4", "data-component": "endpoint-card", "data-deprecated": deprecated })}>` + urlBar(method, path, baseUrl) + (deprecated ? `<div class="flex items-center gap-2 rounded-lg border border-api-deprecated/30 bg-api-deprecated/10 px-4 py-2 text-sm text-api-deprecated">${DEPRECATED_ICON}<span>This endpoint is deprecated.</span></div>` : "") + (summary ? `<p class="text-sm text-muted-foreground">${esc(summary)}</p>` : "") + (description ? `<div class="api-description text-sm text-muted-foreground">${rewriteHtml(description, ctx)}</div>` : "") + `<div class="space-y-3">${
|
|
17131
|
+
const sections2 = (parameters.length ? section("Parameters", propertyList(parameters, ctx)) : "") + (requestBody.length ? section("Request body", schemaViewer(requestBody, ctx)) : "") + (responses.length ? section("Responses", responseTabs(responses, ctx)) : "");
|
|
17132
|
+
const card2 = `<div${attrs({ class: "space-y-4", "data-component": "endpoint-card", "data-deprecated": deprecated })}>` + urlBar(method, path, baseUrl) + (deprecated ? `<div class="flex items-center gap-2 rounded-lg border border-api-deprecated/30 bg-api-deprecated/10 px-4 py-2 text-sm text-api-deprecated">${DEPRECATED_ICON}<span>This endpoint is deprecated.</span></div>` : "") + (summary ? `<p class="text-sm text-muted-foreground">${esc(summary)}</p>` : "") + (description ? `<div class="api-description text-sm text-muted-foreground">${rewriteHtml(description, ctx)}</div>` : "") + `<div class="space-y-3">${sections2}</div></div>`;
|
|
17101
17133
|
const panels = codePanels(p).map((c) => c.samples ? `<div><p class="${PANEL_LABEL}">${esc(c.title)}</p>${codeSamples(c.samples, ctx)}</div>` : `<div><p class="${PANEL_LABEL}">${esc(c.title)}</p>${codeHtml(c.code, c.lang, ctx)}</div>`).join("");
|
|
17102
17134
|
const page = ctx.embeddedEndpoints === false;
|
|
17103
17135
|
return `<div class="dba-api grid grid-cols-1 lg:grid-cols-2 ${page ? "lg:min-h-[calc(100vh-3rem)]" : "my-6 rounded-lg border overflow-hidden"}"><div class="${page ? "px-6 py-10" : "p-6"} lg:border-r">${card2}</div><div class="bg-[var(--api-panel-bg)] text-[var(--api-panel-fg)]"><div class="${page ? "px-6 py-10 lg:sticky lg:top-12 lg:max-h-[calc(100vh-3rem)] lg:overflow-y-auto" : "p-6"}"><div class="space-y-8">${panels}</div></div></div></div>
|
|
@@ -18541,19 +18573,19 @@ function renderRedirectsFile(lines) {
|
|
|
18541
18573
|
].join("\n");
|
|
18542
18574
|
}
|
|
18543
18575
|
function renderRedirectStub(href, canonical) {
|
|
18544
|
-
const
|
|
18576
|
+
const esc3 = (s) => s.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<");
|
|
18545
18577
|
return [
|
|
18546
18578
|
"<!doctype html>",
|
|
18547
18579
|
'<html lang="en">',
|
|
18548
18580
|
"<head>",
|
|
18549
18581
|
'<meta charset="utf-8">',
|
|
18550
|
-
`<meta http-equiv="refresh" content="0; url=${
|
|
18582
|
+
`<meta http-equiv="refresh" content="0; url=${esc3(href)}">`,
|
|
18551
18583
|
'<meta name="robots" content="noindex">',
|
|
18552
|
-
canonical ? `<link rel="canonical" href="${
|
|
18553
|
-
`<title>Redirecting to ${
|
|
18584
|
+
canonical ? `<link rel="canonical" href="${esc3(canonical)}">` : "",
|
|
18585
|
+
`<title>Redirecting to ${esc3(href)}</title>`,
|
|
18554
18586
|
"</head>",
|
|
18555
18587
|
"<body>",
|
|
18556
|
-
`<p>This page has moved to <a href="${
|
|
18588
|
+
`<p>This page has moved to <a href="${esc3(href)}">${esc3(href)}</a>.</p>`,
|
|
18557
18589
|
"</body>",
|
|
18558
18590
|
"</html>",
|
|
18559
18591
|
""
|
|
@@ -19094,7 +19126,7 @@ function hrefKey(href) {
|
|
|
19094
19126
|
}
|
|
19095
19127
|
function placeMountedNav(host, mounted, mountHref, label, mount) {
|
|
19096
19128
|
const mountKey = hrefKey(mountHref);
|
|
19097
|
-
const
|
|
19129
|
+
const sections2 = hrefKey(mounted[0]?.href) === mountKey ? mounted.slice(1) : mounted.slice();
|
|
19098
19130
|
const clone = (items3) => items3.map((i) => ({ ...i, ...i.children ? { children: clone(i.children) } : {} }));
|
|
19099
19131
|
const nav = clone(host);
|
|
19100
19132
|
const atPage = (items3) => {
|
|
@@ -19109,10 +19141,10 @@ function placeMountedNav(host, mounted, mountHref, label, mount) {
|
|
|
19109
19141
|
};
|
|
19110
19142
|
const page = atPage(nav);
|
|
19111
19143
|
if (page) {
|
|
19112
|
-
page.children = [...page.children ?? [], ...
|
|
19144
|
+
page.children = [...page.children ?? [], ...sections2];
|
|
19113
19145
|
return { nav, placement: "at-page" };
|
|
19114
19146
|
}
|
|
19115
|
-
const entry2 = { label, href: mountHref, children:
|
|
19147
|
+
const entry2 = { label, href: mountHref, children: sections2 };
|
|
19116
19148
|
const cut2 = mountKey.lastIndexOf("/");
|
|
19117
19149
|
const parent = cut2 > 0 ? mountKey.slice(0, cut2) : "";
|
|
19118
19150
|
if (parent && mount.split("/").filter(Boolean).length > 1) {
|
|
@@ -19124,13 +19156,13 @@ function placeMountedNav(host, mounted, mountHref, label, mount) {
|
|
|
19124
19156
|
const children = item.children;
|
|
19125
19157
|
if (!children || children.length === 0)
|
|
19126
19158
|
continue;
|
|
19127
|
-
const
|
|
19159
|
+
const holds2 = hrefKey(item.href) === parent || children.some((c) => {
|
|
19128
19160
|
const k = hrefKey(c.href);
|
|
19129
19161
|
return k !== void 0 && (k === parent || k.startsWith(`${parent}/`) && !k.slice(parent.length + 1).includes("/"));
|
|
19130
19162
|
});
|
|
19131
|
-
if (
|
|
19163
|
+
if (holds2 && (!best || depth > best.depth))
|
|
19132
19164
|
best = { items: children, depth };
|
|
19133
|
-
if (!
|
|
19165
|
+
if (!holds2 && (!outer || depth < outer.depth) && under(children))
|
|
19134
19166
|
outer = { items: children, depth };
|
|
19135
19167
|
visit(children, depth + 1);
|
|
19136
19168
|
}
|
|
@@ -20384,6 +20416,215 @@ function postsInDateOrder(o) {
|
|
|
20384
20416
|
return o.blog && !o.navFromFile && !authorOrdered(o.frontmatters);
|
|
20385
20417
|
}
|
|
20386
20418
|
|
|
20419
|
+
// node_modules/@dogsbay/site-files/dist/nav-sections.js
|
|
20420
|
+
function normalizeNavHref(href) {
|
|
20421
|
+
const bare = href.replace(/[?#].*$/, "");
|
|
20422
|
+
return bare.replace(/\/+$/, "") || (bare.startsWith("/") ? "/" : "");
|
|
20423
|
+
}
|
|
20424
|
+
function holds(item, current, norm) {
|
|
20425
|
+
if (item.href !== void 0 && norm(item.href) === current)
|
|
20426
|
+
return true;
|
|
20427
|
+
return item.children?.some((c) => holds(c, current, norm)) ?? false;
|
|
20428
|
+
}
|
|
20429
|
+
function firstHref(item) {
|
|
20430
|
+
if (item.href)
|
|
20431
|
+
return item.href;
|
|
20432
|
+
for (const c of item.children ?? []) {
|
|
20433
|
+
const h = firstHref(c);
|
|
20434
|
+
if (h)
|
|
20435
|
+
return h;
|
|
20436
|
+
}
|
|
20437
|
+
return void 0;
|
|
20438
|
+
}
|
|
20439
|
+
function sectionLevel(nav) {
|
|
20440
|
+
let level = nav;
|
|
20441
|
+
while (level.length === 1 && level[0].children?.length)
|
|
20442
|
+
level = level[0].children;
|
|
20443
|
+
return level;
|
|
20444
|
+
}
|
|
20445
|
+
function homesOf(level, opts) {
|
|
20446
|
+
const norm = opts.normalize ?? normalizeNavHref;
|
|
20447
|
+
const homes = /* @__PURE__ */ new Set();
|
|
20448
|
+
if (opts.home !== void 0)
|
|
20449
|
+
homes.add(norm(opts.home));
|
|
20450
|
+
for (const item of level) {
|
|
20451
|
+
if (item.children?.length || item.href === void 0)
|
|
20452
|
+
continue;
|
|
20453
|
+
const h = norm(item.href);
|
|
20454
|
+
if (!h.startsWith("/") || h === "/")
|
|
20455
|
+
continue;
|
|
20456
|
+
const under = (o) => (o.href === void 0 || norm(o.href).startsWith(`${h}/`)) && (o.children ?? []).every(under);
|
|
20457
|
+
const others = level.filter((o) => o !== item);
|
|
20458
|
+
if (others.some((o) => firstHref(o) !== void 0) && others.every(under))
|
|
20459
|
+
homes.add(h);
|
|
20460
|
+
}
|
|
20461
|
+
return homes;
|
|
20462
|
+
}
|
|
20463
|
+
function isSection(item, homes, norm) {
|
|
20464
|
+
return Boolean(item.children?.length) || item.href === void 0 || !homes.has(norm(item.href));
|
|
20465
|
+
}
|
|
20466
|
+
function locate2(nav, current, opts) {
|
|
20467
|
+
const norm = opts.normalize ?? normalizeNavHref;
|
|
20468
|
+
const level = sectionLevel(nav);
|
|
20469
|
+
const homes = homesOf(level, opts);
|
|
20470
|
+
const cur = norm(current);
|
|
20471
|
+
const index = homes.has(cur) ? -1 : level.findIndex((item) => isSection(item, homes, norm) && holds(item, cur, norm));
|
|
20472
|
+
return { level, index, homes, norm };
|
|
20473
|
+
}
|
|
20474
|
+
function sectionItems(section2, opts = {}) {
|
|
20475
|
+
const norm = opts.normalize ?? normalizeNavHref;
|
|
20476
|
+
const children = section2.children ?? [];
|
|
20477
|
+
if (!children.length)
|
|
20478
|
+
return [section2];
|
|
20479
|
+
if (section2.href === void 0)
|
|
20480
|
+
return children;
|
|
20481
|
+
const own2 = norm(section2.href);
|
|
20482
|
+
if (children.some((c) => holds(c, own2, norm)))
|
|
20483
|
+
return children;
|
|
20484
|
+
return [{ label: section2.label, href: section2.href }, ...children];
|
|
20485
|
+
}
|
|
20486
|
+
function entriesOf(l) {
|
|
20487
|
+
const out = [];
|
|
20488
|
+
l.level.forEach((item, index) => {
|
|
20489
|
+
if (!isSection(item, l.homes, l.norm))
|
|
20490
|
+
return;
|
|
20491
|
+
const href = firstHref(item);
|
|
20492
|
+
if (href)
|
|
20493
|
+
out.push({ label: item.label, href, index });
|
|
20494
|
+
});
|
|
20495
|
+
return out;
|
|
20496
|
+
}
|
|
20497
|
+
function scopeNav(nav, current, scope, opts = {}) {
|
|
20498
|
+
if (scope !== "section")
|
|
20499
|
+
return { items: [...nav], section: -1 };
|
|
20500
|
+
const l = locate2(nav, current, opts);
|
|
20501
|
+
if (l.index >= 0)
|
|
20502
|
+
return { items: sectionItems(l.level[l.index], opts), section: l.index };
|
|
20503
|
+
return { items: entriesOf(l).map((e) => ({ label: e.label, href: e.href })), section: -1 };
|
|
20504
|
+
}
|
|
20505
|
+
function sectionMenu(nav, current, opts = {}) {
|
|
20506
|
+
const l = locate2(nav, current, opts);
|
|
20507
|
+
const entries = entriesOf(l);
|
|
20508
|
+
const own2 = entries.find((e) => e.index === l.index);
|
|
20509
|
+
return own2 ? { entries, current: own2 } : { entries };
|
|
20510
|
+
}
|
|
20511
|
+
|
|
20512
|
+
// node_modules/@dogsbay/site-files/dist/unlisted.js
|
|
20513
|
+
function navHrefSlug(href) {
|
|
20514
|
+
if (/^[a-z][a-z0-9+.-]*:/i.test(href) || href.startsWith("//"))
|
|
20515
|
+
return void 0;
|
|
20516
|
+
const bare = href.replace(/[?#].*$/, "").replace(/^\/+|\/+$/g, "");
|
|
20517
|
+
return bare || "index";
|
|
20518
|
+
}
|
|
20519
|
+
function markUnlisted(nav, pages, opts = {}) {
|
|
20520
|
+
const slugOf2 = opts.slugOf ?? navHrefSlug;
|
|
20521
|
+
const slugs = /* @__PURE__ */ new Set();
|
|
20522
|
+
const byFrontMatter = [];
|
|
20523
|
+
for (const p of pages) {
|
|
20524
|
+
if (p.unlisted !== true)
|
|
20525
|
+
continue;
|
|
20526
|
+
slugs.add(p.slug);
|
|
20527
|
+
byFrontMatter.push(p);
|
|
20528
|
+
}
|
|
20529
|
+
const linked = /* @__PURE__ */ new Set();
|
|
20530
|
+
const unlistedBy = /* @__PURE__ */ new Set();
|
|
20531
|
+
const listedBy = /* @__PURE__ */ new Set();
|
|
20532
|
+
const walk = (items3, inherited) => items3.map((item) => {
|
|
20533
|
+
const unlisted = inherited || item.unlisted === true;
|
|
20534
|
+
if (item.href !== void 0) {
|
|
20535
|
+
const slug = slugOf2(item.href);
|
|
20536
|
+
if (slug !== void 0) {
|
|
20537
|
+
linked.add(slug);
|
|
20538
|
+
if (!item.href.includes("#"))
|
|
20539
|
+
(unlisted ? unlistedBy : listedBy).add(slug);
|
|
20540
|
+
}
|
|
20541
|
+
}
|
|
20542
|
+
const children = item.children ? walk(item.children, unlisted) : void 0;
|
|
20543
|
+
const out = { ...item, ...children ? { children } : {} };
|
|
20544
|
+
if (unlisted)
|
|
20545
|
+
out.unlisted = true;
|
|
20546
|
+
return out;
|
|
20547
|
+
});
|
|
20548
|
+
const marked = walk(nav, false);
|
|
20549
|
+
for (const slug of unlistedBy)
|
|
20550
|
+
if (!listedBy.has(slug))
|
|
20551
|
+
slugs.add(slug);
|
|
20552
|
+
const warnings = [];
|
|
20553
|
+
for (const p of byFrontMatter) {
|
|
20554
|
+
const keep = [p.noindex === false ? "noindex: false" : "", p.excludeFromSearch === false ? "excludeFromSearch: false" : ""].filter(Boolean);
|
|
20555
|
+
if (keep.length)
|
|
20556
|
+
warnings.push({ slug: p.slug, message: `${p.slug}: unlisted: true with ${keep.join(" and ")} \u2014 an unlisted page is noindex and out of search; it stays unlisted` });
|
|
20557
|
+
}
|
|
20558
|
+
return { nav: marked, slugs, outsideNav: byFrontMatter.map((p) => p.slug).filter((s) => !linked.has(s)), warnings };
|
|
20559
|
+
}
|
|
20560
|
+
function listedNav(nav, slugs = /* @__PURE__ */ new Set(), opts = {}) {
|
|
20561
|
+
const slugOf2 = opts.slugOf ?? navHrefSlug;
|
|
20562
|
+
const out = [];
|
|
20563
|
+
for (const item of nav) {
|
|
20564
|
+
if (item.unlisted === true)
|
|
20565
|
+
continue;
|
|
20566
|
+
const children = item.children ? listedNav(item.children, slugs, opts) : void 0;
|
|
20567
|
+
const slug = item.href === void 0 ? void 0 : slugOf2(item.href);
|
|
20568
|
+
const hidden = slug !== void 0 && slugs.has(slug);
|
|
20569
|
+
const hadChildren = (item.children?.length ?? 0) > 0;
|
|
20570
|
+
if (hidden && !children?.length)
|
|
20571
|
+
continue;
|
|
20572
|
+
if (!hidden && item.href === void 0 && hadChildren && !children?.length)
|
|
20573
|
+
continue;
|
|
20574
|
+
const { href: _href, children: _children, ...rest } = item;
|
|
20575
|
+
out.push({
|
|
20576
|
+
...rest,
|
|
20577
|
+
...hidden || item.href === void 0 ? {} : { href: item.href },
|
|
20578
|
+
...children && (children.length || !hadChildren) ? { children } : {}
|
|
20579
|
+
});
|
|
20580
|
+
}
|
|
20581
|
+
return out;
|
|
20582
|
+
}
|
|
20583
|
+
function listedLocations(nav, slugs, opts = {}) {
|
|
20584
|
+
const slugOf2 = opts.slugOf ?? navHrefSlug;
|
|
20585
|
+
const home = opts.home === void 0 ? void 0 : slugOf2(opts.home);
|
|
20586
|
+
const first = /* @__PURE__ */ new Map();
|
|
20587
|
+
const firstListed = (item) => {
|
|
20588
|
+
if (first.has(item))
|
|
20589
|
+
return first.get(item);
|
|
20590
|
+
let found;
|
|
20591
|
+
if (item.unlisted !== true) {
|
|
20592
|
+
if (item.href !== void 0) {
|
|
20593
|
+
const s = slugOf2(item.href);
|
|
20594
|
+
if ((s === void 0 || !slugs.has(s)) && (home === void 0 || s !== home))
|
|
20595
|
+
found = item.href;
|
|
20596
|
+
}
|
|
20597
|
+
for (const c of item.children ?? []) {
|
|
20598
|
+
if (found !== void 0)
|
|
20599
|
+
break;
|
|
20600
|
+
found = firstListed(c);
|
|
20601
|
+
}
|
|
20602
|
+
}
|
|
20603
|
+
first.set(item, found);
|
|
20604
|
+
return found;
|
|
20605
|
+
};
|
|
20606
|
+
const out = /* @__PURE__ */ new Map();
|
|
20607
|
+
const seen = /* @__PURE__ */ new Set();
|
|
20608
|
+
const walk = (items3, nearest) => {
|
|
20609
|
+
for (const item of items3) {
|
|
20610
|
+
const own2 = item.unlisted === true ? void 0 : firstListed(item);
|
|
20611
|
+
if (item.href !== void 0) {
|
|
20612
|
+
const s = slugOf2(item.href);
|
|
20613
|
+
if (s !== void 0 && slugs.has(s) && !seen.has(s)) {
|
|
20614
|
+
seen.add(s);
|
|
20615
|
+
const at = own2 ?? nearest;
|
|
20616
|
+
if (at !== void 0)
|
|
20617
|
+
out.set(s, at);
|
|
20618
|
+
}
|
|
20619
|
+
}
|
|
20620
|
+
if (item.children)
|
|
20621
|
+
walk(item.children, own2 ?? nearest);
|
|
20622
|
+
}
|
|
20623
|
+
};
|
|
20624
|
+
walk(nav, void 0);
|
|
20625
|
+
return out;
|
|
20626
|
+
}
|
|
20627
|
+
|
|
20387
20628
|
// src/core/yaml.ts
|
|
20388
20629
|
function loadYaml(text4) {
|
|
20389
20630
|
if (text4.split(/\r?\n/).every((l) => /^\s*(?:\.\.\.\s*)?(?:#.*)?$/.test(l))) return void 0;
|
|
@@ -20537,6 +20778,8 @@ function parseConfig(text4, overrides = {}) {
|
|
|
20537
20778
|
if (buildBlock != null && (typeof buildBlock !== "object" || Array.isArray(buildBlock))) throw new ConfigError("build must be a mapping (for example build: { navMode: client })");
|
|
20538
20779
|
const navMode = buildBlock?.navMode ?? void 0;
|
|
20539
20780
|
if (navMode !== void 0 && navMode !== "client" && navMode !== "hybrid" && navMode !== "ssr-full") throw new ConfigError(`build.navMode must be "client", "hybrid" or "ssr-full"; got ${JSON.stringify(navMode)}`);
|
|
20781
|
+
const navScope = buildBlock?.navScope ?? void 0;
|
|
20782
|
+
if (navScope !== void 0 && navScope !== "site" && navScope !== "section") throw new ConfigError(`build.navScope must be "site" or "section"; got ${JSON.stringify(navScope)}`);
|
|
20540
20783
|
const site = raw.site ?? {};
|
|
20541
20784
|
const content = raw.content ?? {};
|
|
20542
20785
|
const productsBlock = content.products != null;
|
|
@@ -20596,6 +20839,7 @@ function parseConfig(text4, overrides = {}) {
|
|
|
20596
20839
|
searchEngine: searchEngineOf(ssg.search),
|
|
20597
20840
|
fullNavLimit: typeof ssg.fullNavLimit === "number" ? ssg.fullNavLimit : 600,
|
|
20598
20841
|
navMode,
|
|
20842
|
+
navScope,
|
|
20599
20843
|
undefinedRefs: raw.undefinedRefs === "asciidoc-literal" ? "asciidoc-literal" : "preserve",
|
|
20600
20844
|
theme: raw.theme === "mintlify" ? "mintlify" : "default",
|
|
20601
20845
|
toc: ["top", "popover", "rail", "off"].includes(raw.toc) ? raw.toc : "top",
|
|
@@ -21559,13 +21803,25 @@ function sitePath(raw, basePath) {
|
|
|
21559
21803
|
return p.replace(/^\/+|\/+$/g, "").replace(/\.html$/, "");
|
|
21560
21804
|
}
|
|
21561
21805
|
function collectRedirects(inputs, pageOut, known) {
|
|
21562
|
-
const
|
|
21563
|
-
|
|
21564
|
-
|
|
21565
|
-
|
|
21566
|
-
|
|
21567
|
-
|
|
21568
|
-
|
|
21806
|
+
const home = (to) => !isExternal(to) && splitSuffix(to).path === "";
|
|
21807
|
+
const back = (to) => to.startsWith("/") && !isExternal(to) ? to.slice(1) : to;
|
|
21808
|
+
const { rules, warnings } = resolveRedirects(
|
|
21809
|
+
inputs.map((r) => home(r.to) ? { ...r, to: `/${r.to}` } : r),
|
|
21810
|
+
{
|
|
21811
|
+
strict: false,
|
|
21812
|
+
isPage: (p) => pageOut(back(p)) != null,
|
|
21813
|
+
canSee: (p) => known(back(p)),
|
|
21814
|
+
show: (p) => p.startsWith("/") ? p : `/${p}`
|
|
21815
|
+
}
|
|
21816
|
+
);
|
|
21817
|
+
return {
|
|
21818
|
+
rules: rules.map((r) => {
|
|
21819
|
+
if (isExternal(r.to)) return r;
|
|
21820
|
+
const to = back(r.to);
|
|
21821
|
+
return { ...r, to, toOut: pageOut(to) };
|
|
21822
|
+
}),
|
|
21823
|
+
warnings
|
|
21824
|
+
};
|
|
21569
21825
|
}
|
|
21570
21826
|
function splitSuffix(raw) {
|
|
21571
21827
|
const i = raw.search(/[?#]/);
|
|
@@ -21666,7 +21922,7 @@ function staleUnitFiles(previous, now2, written, assets) {
|
|
|
21666
21922
|
}
|
|
21667
21923
|
|
|
21668
21924
|
// src/generated/versions.ts
|
|
21669
|
-
var PARSER_VERSION = "@dogsbay/format-dogsbay-md@0.2.0-beta.
|
|
21925
|
+
var PARSER_VERSION = "@dogsbay/format-dogsbay-md@0.2.0-beta.174 @dogsbay/corpus@0.2.0-beta.174 @dogsbay/minja@0.2.0-beta.174 @dogsbay/serialize-core@0.2.0-beta.174 @dogsbay/types@0.2.0-beta.174 gray-matter@4.0.3 js-yaml@5.5.0 markdown-it@14.3.2 markdown-it-attrs@5.0.1 markdown-it-deflist@3.0.1 markdown-it-footnote@4.0.0 markdown-it-front-matter@0.2.4 pele@1.6.0";
|
|
21670
21926
|
|
|
21671
21927
|
// src/core/tree-cache.ts
|
|
21672
21928
|
var FORMAT = "p1";
|
|
@@ -21793,7 +22049,9 @@ function pageNode(target, label, labelFor, baseDir) {
|
|
|
21793
22049
|
function yamlEntry(e, labelFor, baseDir, _nested) {
|
|
21794
22050
|
if (typeof e === "string") return [pageNode(e, void 0, labelFor, baseDir)];
|
|
21795
22051
|
if (!e || typeof e !== "object") return [];
|
|
21796
|
-
|
|
22052
|
+
const obj = e;
|
|
22053
|
+
if ("title" in obj || "items" in obj || "single-page" in obj || "singlePage" in obj) return [annotatedEntry(obj, labelFor, baseDir)];
|
|
22054
|
+
return Object.entries(obj).map(([label, value]) => {
|
|
21797
22055
|
if (typeof value === "string") return pageNode(value, label, labelFor, baseDir);
|
|
21798
22056
|
if (Array.isArray(value)) {
|
|
21799
22057
|
const node = { label, children: [] };
|
|
@@ -21809,6 +22067,32 @@ function yamlEntry(e, labelFor, baseDir, _nested) {
|
|
|
21809
22067
|
return { label, children: [] };
|
|
21810
22068
|
});
|
|
21811
22069
|
}
|
|
22070
|
+
function annotatedEntry(obj, labelFor, baseDir) {
|
|
22071
|
+
if (typeof obj.title !== "string" || !obj.title) throw new Error(`a nav entry in the annotated form needs a non-empty "title" (it has ${Object.keys(obj).map((k) => `"${k}"`).join(", ")})`);
|
|
22072
|
+
const target = typeof obj.file === "string" ? obj.file : typeof obj.href === "string" ? obj.href : void 0;
|
|
22073
|
+
const node = target !== void 0 ? pageNode(target, obj.title, labelFor, baseDir) : { label: obj.title, children: [] };
|
|
22074
|
+
if (Array.isArray(obj.items)) {
|
|
22075
|
+
obj.items.forEach((child, i) => {
|
|
22076
|
+
if (i === 0 && typeof child === "string") {
|
|
22077
|
+
const { children: _c, label: _l, ...landing } = pageNode(child, obj.title, labelFor, baseDir);
|
|
22078
|
+
delete node.slug;
|
|
22079
|
+
delete node.fragment;
|
|
22080
|
+
delete node.href;
|
|
22081
|
+
delete node.refused;
|
|
22082
|
+
Object.assign(node, landing);
|
|
22083
|
+
return;
|
|
22084
|
+
}
|
|
22085
|
+
node.children.push(...yamlEntry(child, labelFor, baseDir, true));
|
|
22086
|
+
});
|
|
22087
|
+
}
|
|
22088
|
+
if (unlistedFlag(obj.unlisted, obj.title)) node.unlisted = true;
|
|
22089
|
+
return node;
|
|
22090
|
+
}
|
|
22091
|
+
function unlistedFlag(v, label) {
|
|
22092
|
+
if (v === void 0) return false;
|
|
22093
|
+
if (typeof v !== "boolean") throw new Error(`nav entry "${String(label)}": "unlisted" must be true or false, got ${JSON.stringify(v)}`);
|
|
22094
|
+
return v;
|
|
22095
|
+
}
|
|
21812
22096
|
function parseNavJson(text4, labelFor) {
|
|
21813
22097
|
const data = JSON.parse(text4);
|
|
21814
22098
|
const items3 = Array.isArray(data) ? data : data.items ?? data.nav ?? [];
|
|
@@ -21827,6 +22111,7 @@ function parseNavJson(text4, labelFor) {
|
|
|
21827
22111
|
}
|
|
21828
22112
|
}
|
|
21829
22113
|
if (!node.label) node.label = (node.slug != null ? labelFor(node.slug) : void 0) ?? node.slug ?? "";
|
|
22114
|
+
if (unlistedFlag(it.unlisted, node.label)) node.unlisted = true;
|
|
21830
22115
|
return node;
|
|
21831
22116
|
};
|
|
21832
22117
|
return items3.map(walk);
|
|
@@ -21866,13 +22151,13 @@ function humanize(s) {
|
|
|
21866
22151
|
const t = s.replace(/[-_]+/g, " ").trim();
|
|
21867
22152
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
21868
22153
|
}
|
|
21869
|
-
function indexNav(nav) {
|
|
22154
|
+
function indexNav(nav, o = {}) {
|
|
21870
22155
|
const order2 = [];
|
|
21871
22156
|
const trail = /* @__PURE__ */ new Map();
|
|
21872
22157
|
const walk = (nodes, chain) => {
|
|
21873
22158
|
for (const n of nodes) {
|
|
21874
22159
|
const here = [...chain, n];
|
|
21875
|
-
if (n.slug != null && !n.fragment && !trail.has(n.slug)) {
|
|
22160
|
+
if (n.slug != null && !n.fragment && !(o.skipAliases && n.alias) && !trail.has(n.slug)) {
|
|
21876
22161
|
trail.set(n.slug, here);
|
|
21877
22162
|
order2.push(n.slug);
|
|
21878
22163
|
}
|
|
@@ -21960,7 +22245,7 @@ async function scan(cfg, unit, units, files, frontMatterOf, read, mode = { kind:
|
|
|
21960
22245
|
const p = k.slice(root.length);
|
|
21961
22246
|
if (excluded(p)) continue;
|
|
21962
22247
|
const fm = await frontMatterOf(k, c);
|
|
21963
|
-
if (mode.kind === "targets" ? fm.draft === true || fm.status === "draft" : fm.status === "draft" && !mode.includeDrafts) continue;
|
|
22248
|
+
if (mode.kind === "targets" ? fm.draft === true || fm.status === "draft" || fm.unlisted === true : fm.status === "draft" && !mode.includeDrafts) continue;
|
|
21964
22249
|
if (declaresParams(fm)) continue;
|
|
21965
22250
|
const slug = slugFromPath(p);
|
|
21966
22251
|
if (typeof fm.redirect === "string" && fm.redirect.trim()) {
|
|
@@ -22024,7 +22309,7 @@ function unitPages(cfg, unit, units, files, frontMatterOf, read, includeDrafts)
|
|
|
22024
22309
|
// src/generated/assets.ts
|
|
22025
22310
|
var CLIENT_JS = '/*! dogsbay-ssg site client (Apache-2.0). Third-party notices: THIRD-PARTY-NOTICES.txt */\n"use strict";(()=>{var Lo=Object.defineProperty;var ko=(n,t,e)=>t in n?Lo(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var p=(n,t,e)=>ko(n,typeof t!="symbol"?t+"":t,e);var Y=class extends HTMLElement{constructor(){super(...arguments);p(this,"_initialized",!1);p(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(){}},To={"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"},xn="dogsbay-elements-display";function G(){if(typeof document>"u"||document.getElementById(xn))return;let n=Object.entries(To).map(([e,i])=>`:where(${e}){display:${i}}`).join(""),t=document.createElement("style");t.id=xn,t.textContent=n,document.head.prepend(t)}function Oo(n){return n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}function Ut(n,t,e){let i=t;do i+=e?-1:1;while(i>=0&&i<n.length&&Oo(n[i]));return i}var re=class{constructor(n,t,e={}){p(this,"container");p(this,"itemSelector");p(this,"opts");p(this,"keydownHandler",null);p(this,"active",!1);this.container=n,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(n,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&n===(t?"ArrowLeft":"ArrowRight")||(e==="vertical"||e==="both")&&n==="ArrowDown"}isBackwardKey(n,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&n===(t?"ArrowRight":"ArrowLeft")||(e==="vertical"||e==="both")&&n==="ArrowUp"}activate(){this.active||(this.active=!0,this.keydownHandler=n=>{let t=this.getItems();if(t.length===0||n.ctrlKey||n.altKey||n.metaKey)return;let e=getComputedStyle(this.container).direction==="rtl",i=t.indexOf(document.activeElement);if(i===-1)return;let o=null;this.isForwardKey(n.key,e)?(o=Ut(t,i,!1),o>=t.length&&(o=this.opts.loop?Ut(t,-1,!1):i)):this.isBackwardKey(n.key,e)?(o=Ut(t,i,!0),o<0&&(o=this.opts.loop?Ut(t,t.length,!0):i)):this.opts.homeEnd&&n.key==="Home"?o=Ut(t,-1,!1):this.opts.homeEnd&&n.key==="End"&&(o=Ut(t,t.length,!0)),o!==null&&(o<0||o>=t.length||o!==i&&(n.preventDefault(),t[i].setAttribute("tabindex","-1"),t[o].setAttribute("tabindex","0"),t[o].focus(),this.opts.onHighlightedIndexChange(o)))},this.container.addEventListener("keydown",this.keydownHandler))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(this.container.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null))}setActiveIndex(n,t){n.forEach((e,i)=>{e.setAttribute("tabindex",i===t?"0":"-1")})}isActive(){return this.active}};var Do=0;function Sn(n){return`${n}-${++Do}`}var An=class extends Y{constructor(){super(...arguments);p(this,"list");p(this,"triggers",[]);p(this,"panels",[]);p(this,"nav",null);p(this,"value","");p(this,"syncKey",null);p(this,"orientation","horizontal");p(this,"handleClick",t=>{let e=t.target.closest("[data-part=\'trigger\']");if(!e||e.hasAttribute("disabled"))return;let i=e.dataset.value;i&&this.select(i)});p(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)});p(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 s;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||Sn("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||Sn("db-tabpanel");c.id=d,r.setAttribute("aria-controls",d),c.setAttribute("aria-labelledby",l)}}),this.nav=new re(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 i=this.getAttribute("default-value")||((s=this.triggers[0])==null?void 0:s.dataset.value)||"";if(this.syncKey){let r=localStorage.getItem(`db-tabs-sync:${this.syncKey}`);r&&this.triggers.some(a=>a.dataset.value===r)&&(i=r)}let o=window.location.hash.slice(1);o&&this.triggers.some(r=>r.dataset.value===o)&&(i=o),this.select(i)}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 i=e.dataset.value===t;e.setAttribute("aria-selected",String(i)),e.setAttribute("tabindex",i?"0":"-1"),i?e.setAttribute("data-state","active"):e.removeAttribute("data-state")}),this.panels.forEach(e=>{let i=e.dataset.value===t;e.hidden=!i,i?(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})))}};G();customElements.get("db-tabs")||customElements.define("db-tabs",An);var Ro=0;function Mo(n){return`${n}-${++Ro}`}var Cn=class{constructor(n,t,e={}){p(this,"trigger");p(this,"content");p(this,"_open",!1);p(this,"opts");this.trigger=n,this.content=t,this.opts=e;let i=Mo("base-collapsible");n.id||(n.id=`${i}-trigger`),t.id||(t.id=`${i}-content`),n.setAttribute("aria-controls",t.id),t.setAttribute("aria-labelledby",n.id),t.setAttribute("role","region"),n.setAttribute("aria-expanded","false"),n.addEventListener("click",()=>{n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"||this.toggle()})}get isOpen(){return this._open}toggle(){this._open?this.collapse():this.expand()}expand(){var n,t;this._open||(this._open=!0,this.trigger.setAttribute("aria-expanded","true"),this.content.hidden=!1,this.content.setAttribute("data-state","open"),(t=(n=this.opts).onToggle)==null||t.call(n,!0))}collapse(){var n,t;this._open&&(this._open=!1,this.trigger.setAttribute("aria-expanded","false"),this.content.hidden=!0,this.content.removeAttribute("data-state"),(t=(n=this.opts).onToggle)==null||t.call(n,!1))}};var Ln=class extends Y{constructor(){super(...arguments);p(this,"items",[]);p(this,"nav",null);p(this,"openValues",new Set);p(this,"type","single")}setup(){this.type=this.getAttribute("type")||"single";let t=this.getAttribute("default-value")||"",e=t?t.split(","):[],i=Array.from(this.querySelectorAll("[data-part=\'item\']"));this.items=i.map(o=>{let s=o.querySelector("[data-part=\'trigger\']"),r=o.querySelector("[data-part=\'content\']");if(!s||!r)return null;let a=o.dataset.value||"",l=o.hasAttribute("data-disabled");l&&(s.setAttribute("disabled",""),s.setAttribute("aria-disabled","true"));let c=new Cn(s,r,{onToggle:d=>{d?this.onItemExpanded(a):this.onItemCollapsed(a)}});return{el:o,value:a,collapsible:c,disabled:l}}).filter(Boolean),this.nav=new re(this,"[data-part=\'trigger\']",{orientation:"vertical",loop:!0,homeEnd:!0}),this.nav.activate(),this.items.forEach((o,s)=>{o.collapsible.trigger.setAttribute("tabindex",s===0?"0":"-1")}),e.forEach(o=>{let s=this.items.find(r=>r.value===o&&!r.disabled);s&&s.collapsible.expand()})}onItemExpanded(t){if(this.type==="single"){for(let i of this.openValues)if(i!==t){let o=this.items.find(s=>s.value===i);o&&o.collapsible.collapse()}}this.openValues.add(t);let e=this.items.find(i=>i.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(i=>i.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}))}};G();customElements.get("db-accordion")||customElements.define("db-accordion",Ln);var Io=0;function Z(n){return`${n}-${++Io}`}function vt(n,t){let e=n.localName;return Array.from(n.querySelectorAll(t)).filter(i=>i.closest(e)===n)}function Q(n,t){return vt(n,t)[0]??null}function Wt(n){if(!n||!n.hasAttribute("data-as-child"))return n;let t=n.firstElementChild;if(!t)return n;let e=n.getAttribute("data-part");return e&&t.setAttribute("data-part",e),t}function dt(n){return n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"||n.getAttribute("data-disabled")==="true"}function kn(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover=="function"}function Yt(n){if(n.hidden=!1,!kn())return"inline";n.hasAttribute("popover")||n.setAttribute("popover","manual"),n.style.inset="auto",n.style.margin="0";try{n.matches(":popover-open")||n.showPopover()}catch{return"inline"}return"top-layer"}function Gt(n){if(kn())try{n.matches(":popover-open")&&n.hidePopover()}catch{}n.hidden=!0}var No=\'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]\';function Tn(n){return Array.from(n.querySelectorAll(No)).filter(t=>!t.closest("[hidden]")&&!dt(t))}function On(n,t){let e=typeof n.getAnimations=="function"?n.getAnimations():[];if(!e.length)return t();Promise.all(e.map(i=>i.finished)).then(t,t)}function Xt(n){try{return decodeURIComponent(n)}catch{return n}}var Rn=class extends Y{constructor(){super(...arguments);p(this,"details",null);p(this,"summary",null);p(this,"dialog",null);p(this,"body",null);p(this,"source",null);p(this,"moved",[]);p(this,"handledHash",null);p(this,"onSummaryClick",t=>{var i,o;let e=t.target;e&&e!==this.summary&&((o=(i=e.closest)==null?void 0:i.call(e,"a[href], button, input, select, textarea, label"))==null?void 0:o.closest("summary"))===this.summary||(t.preventDefault(),this.show())});p(this,"onDialogClick",t=>{let e=this.dialog;if(!e||t.target!==e)return;let i=e.getBoundingClientRect();!(t.clientX>=i.left&&t.clientX<=i.right&&t.clientY>=i.top&&t.clientY<=i.bottom)&&(t.clientX!==0||t.clientY!==0)&&e.close()});p(this,"onDialogClose",()=>this.restore());p(this,"onDocClick",t=>{var s,r;if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let e=(r=(s=t.target)==null?void 0:s.closest)==null?void 0:r.call(s,"a[href]");if(!e||!this.details||this.open||e.hasAttribute("download")||e.target&&e.target!=="_self")return;let i=new URL(e.href,location.href);if(!i.hash||i.hash!==location.hash||i.pathname!==location.pathname||i.search!==location.search)return;let o=document.getElementById(Xt(i.hash.slice(1)));if(!(!o||!this.details.contains(o))){for(let a of this.details.querySelectorAll("db-details-sheet"))a.handledHash=null;this.show(o)}});p(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,i=typeof HTMLDialogElement<"u"&&typeof HTMLDialogElement.prototype.showModal=="function";if(!t||!e||!i)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,Ho();let o=(((d=e.querySelector("[data-part=\'title\']"))==null?void 0:d.textContent)??e.textContent??"").trim(),s=document.createElement("dialog");s.className="db-sheet",s.id=Z("db-sheet");let r=document.createElement("h2");r.className="db-sheet-title",r.id=Z("db-sheet-title"),r.textContent=o,s.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",()=>s.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",s.append(l,c),this.append(s),this.dialog=s,this.body=c,e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-controls",s.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:i,body:o}=this;if(!e||!i||!o||e.open)return;let s=Array.from(i.childNodes).filter(c=>c!==this.summary),r=s.filter(c=>c.nodeType===Node.ELEMENT_NODE),a=r.length===1&&s.every(c=>{var d;return c===r[0]||!((d=c.textContent)!=null&&d.trim())})?r[0]:null;this.source=a??i,this.moved=a?Array.from(a.childNodes):s,o.append(...this.moved),e.showModal(),this.summary.setAttribute("aria-expanded","true"),this.setAttribute("data-state","open"),t&&t!==i&&((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,i;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&&((i=(e=this.summary).checkVisibility)==null?void 0:i.call(e))!==!1&&this.summary.focus(),this.dispatchEvent(new CustomEvent("db-details-sheet:close",{bubbles:!0})))}openForHash(){let t=Xt(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)}},Dn="dogsbay-details-sheet";function Ho(){if(document.getElementById(Dn))return;let n=document.createElement("style");n.id=Dn,n.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(n)}G();customElements.get("db-details-sheet")||customElements.define("db-details-sheet",Rn);var Mn=class extends Y{constructor(){super(...arguments);p(this,"copyBtn",null);p(this,"copyIcon",null);p(this,"checkIcon",null);p(this,"liveRegion",null);p(this,"resetTimeout",null);p(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 i=this.querySelector("[data-part=\'code\']");return(i==null?void 0:i.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)}};G();customElements.get("db-code-block")||customElements.define("db-code-block",Mn);var In=class extends Y{constructor(){super(...arguments);p(this,"navData",null);p(this,"onClick",t=>{let e=t.target.closest("[data-part=\'toggle\']");if(!e||e.closest("db-nav-tree")!==this)return;let i=e.closest("[data-part=\'item\']");i&&(this.ensurePrepared(i),this.toggle(i))});p(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 i=this.visibleRows(),o=e.closest("[data-part=\'row\']"),s=o?i.indexOf(o):-1;if(s<0)return;let r=o.closest("[data-part=\'item\']");this.ensurePrepared(r);let a=!!this.groupOf(r),l=u=>{var h;u&&(t.preventDefault(),(h=this.primary(u))==null||h.focus())};switch(t.key){case"ArrowDown":return l(i[s+1]);case"ArrowUp":return l(i[s-1]);case"Home":return l(i[0]);case"End":return l(i[i.length-1]);case"ArrowRight":if(!a)return;t.preventDefault(),this.isOpen(r)?l(this.visibleRows()[s+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 h=u.querySelector(":scope > [data-part=\'row\']");h&&((d=this.primary(h))==null||d.focus())}return}}})}setup(){for(let t of vt(this,"[data-part=\'item\']"))t.style.getPropertyValue("--db-level")||t.style.setProperty("--db-level",String(this.depthOf(t))),this.prepareItem(t)}depthOf(t){var i,o;let e=0;for(let s=(i=t.parentElement)==null?void 0:i.closest("[data-part=\'item\']");s&&this.contains(s);s=(o=s.parentElement)==null?void 0:o.closest("[data-part=\'item\']"))e++;return e}pathOf(t){var i,o;let e=[];for(let s=t;s&&this.contains(s);s=((i=s.parentElement)==null?void 0:i.closest("[data-part=\'item\']"))??null){let r=Array.from(((o=s.parentElement)==null?void 0:o.children)??[]).filter(a=>a.getAttribute("data-part")==="item");e.unshift(r.indexOf(s))}return e.join(".")}connect(){this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKey);for(let t of vt(this,"[data-part=\'group\'][data-lazy]")){let e=t.closest("[data-part=\'item\']");e&&this.isOpen(e)&&this.fill(t)}!this.fillEmpty()&&this.emptyList()&&document.readyState!=="complete"&&addEventListener("load",()=>this.isConnected&&this.fillEmpty()&&this.afterFill(),{once:!0}),this.afterFill()}afterFill(){this.hasAttribute("scroll-current")&&requestAnimationFrame(()=>this.revealCurrent())}emptyList(){let t=vt(this,"[data-part=\'list\']")[0];return t&&!t.querySelector("[data-part=\'item\']")?t:null}fillEmpty(){let t=this.emptyList(),e=this.data();if(!t||!e)return!1;t.replaceChildren(...this.build(e,""));let i=t,o=this.serverPath();for(let s of o!=null?o.split(".").map(Number):this.currentPath(e)){let r=Array.from(i.children).filter(l=>l.getAttribute("data-part")==="item")[s],a=r&&this.groupOf(r);if(!r||!a)break;a.hasAttribute("data-lazy")&&this.fill(a),this.apply(r,!0),i=a}return!0}serverPath(){var s;let t=(s=this.getAttribute("current-path"))==null?void 0:s.trim(),e=this.data();if(!t||!e||!/^\\d+(?:\\.\\d+)*$/.test(t))return null;let i=t.split(".").map(Number),o=e;for(let r of i){let a=o==null?void 0:o[r];if(!a)return null;o=a[2]}return i.join(".")}currentPath(t){let e=location.href.split("#")[0],i=o=>{for(let s=0;s<o.length;s++){let[,r,a,l]=o[s],c=r!=null&&!l?this.linkOf(r):null;if(c&&new URL(c.href,document.baseURI).href.split("#")[0]===e)return[s];let d=a!=null&&a.length?i(a):null;if(d)return[s,...d]}return null};return i(t)??[]}linkOf(t){let e=t.replace(/[\\u0000-\\u0020]/g,"");if(/^[a-z][a-z0-9+.-]*:/i.test(e)&&!/^(?:https?|mailto):/i.test(e))return null;let i=/^[a-z][a-z0-9+.-]*:|^\\/\\//i.test(e);return{href:i?t:(this.getAttribute("base")??"")+t,external:i}}disconnect(){this.removeEventListener("click",this.onClick),this.removeEventListener("keydown",this.onKey)}prepareItem(t){let e=t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'toggle\']");if(!e)return;let i=this.groupOf(t);i||(i=document.createElement("ul"),i.setAttribute("data-part","group"),i.dataset.lazy="",i.dataset.path=this.pathOf(t),i.hidden=!0,t.appendChild(i));let o=t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'link\']");o&&!e.hasAttribute("aria-label")&&!e.querySelector("[data-part=\'label\']")&&e.setAttribute("aria-label",(this.getAttribute("toggle-label")??"Toggle {label}").replace("{label}",()=>(o.getAttribute("aria-label")??o.textContent??"").trim())),this.getAttribute("chevron")!=="css"&&!e.querySelector("[data-part=\'chevron\']")&&e.insertAdjacentHTML("beforeend",Fo),i.id||(i.id=Z("db-nav-group")),e.setAttribute("aria-controls",i.id),e instanceof HTMLButtonElement&&!e.hasAttribute("type")&&(e.type="button");let s=e.getAttribute("aria-expanded")==="true"||t.getAttribute("data-state")==="open";this.apply(t,s)}ensurePrepared(t){let e=this.toggleOf(t);e&&!e.hasAttribute("aria-controls")&&this.prepareItem(t)}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 vt(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 i=this.groupOf(t);!i||this.isOpen(t)===e||(e&&i.hasAttribute("data-lazy")&&this.fill(i),this.apply(t,e),this.dispatchEvent(new CustomEvent("db-nav-tree:toggle",{detail:{item:t,open:e},bubbles:!0})))}apply(t,e){let i=this.groupOf(t),o=this.toggleOf(t);i&&(i.hidden=!e),o==null||o.setAttribute("aria-expanded",String(e)),t.setAttribute("data-state",e?"open":"closed")}revealCurrent(){var s;let t=this.querySelector("[aria-current=\'page\']");if(!t)return;for(let r=t.closest("[data-part=\'item\']");r&&this.contains(r);r=((s=r.parentElement)==null?void 0:s.closest("[data-part=\'item\']"))??null)this.groupOf(r)&&!this.groupOf(r).contains(t)||this.groupOf(r)&&this.setOpen(r,!0);let e=Po(this);if(!e)return;let i=t.getBoundingClientRect(),o=e.getBoundingClientRect();(i.top<o.top||i.bottom>o.bottom)&&(e.scrollTop+=i.top-o.top-o.height/2+i.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(),i=t.dataset.path;if(!e||i==null)return;let o=e,s;for(let r of i.split(".").map(Number))s=o==null?void 0:o[r],o=s==null?void 0:s[2];s!=null&&s[2]&&(t.replaceChildren(...this.build(s[2],i)),t.removeAttribute("data-lazy"))}build(t,e){let i=this.getAttribute("toggle-label")??"Toggle {label}",o=location.href.split("#")[0],s=this.serverPath();return t.map(([r,a,l,c],d)=>{let u=e?`${e}.${d}`:String(d),h=document.createElement("li");h.setAttribute("data-part","item"),h.style.setProperty("--db-level",String(u.split(".").length-1));let m=document.createElement("div");m.setAttribute("data-part","row"),h.appendChild(m);let b=a!=null?this.linkOf(a):null;b||(a=null);let 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",i.replace("{label}",()=>r));else{let f=document.createElement("span");f.setAttribute("data-part","label"),f.textContent=r,g.appendChild(f)}let w=this.getAttribute("toggle-position")==="end";if(g&&!w&&m.appendChild(g),a!=null){let f=document.createElement("a");f.setAttribute("data-part","link"),f.textContent=r,f.href=b.href,b.external&&(f.rel="noopener"),(s!=null?u===s:!c&&f.href.split("#")[0]===o)&&f.setAttribute("aria-current","page"),m.appendChild(f)}if(a==null&&!(l!=null&&l.length)){let f=document.createElement("span");f.setAttribute("data-part","label"),f.textContent=r,m.appendChild(f)}if(g&&w&&m.appendChild(g),l!=null&&l.length){let f=document.createElement("ul");f.setAttribute("data-part","group"),f.dataset.lazy="",f.dataset.path=u,f.hidden=!0,h.setAttribute("data-state","closed"),h.appendChild(f),this.prepareItem(h)}return h})}},Fo=\'<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 Po(n){for(let t=n.parentElement;t;t=t.parentElement){let e=getComputedStyle(t).overflowY;if((e==="auto"||e==="scroll")&&t.scrollHeight>t.clientHeight)return t}return null}G();customElements.get("db-nav-tree")||customElements.define("db-nav-tree",In);var Nn=class extends Y{constructor(){super(...arguments);p(this,"links",[]);p(this,"headings",[]);p(this,"observer",null);p(this,"active",null);p(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)});p(this,"onHash",()=>{let t=Xt(location.hash.slice(1));t&&this.headings.some(e=>e.id===t)&&this.setActive(t)})}slugOf(t){return t.getAttribute("data-toc-slug")??Xt(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(i=>document.getElementById(this.slugOf(i))).filter(i=>!!i),!this.headings.length)return;let t=Number(this.getAttribute("offset")??80);typeof IntersectionObserver<"u"&&(this.observer=new IntersectionObserver(i=>{var s;let o=i.find(r=>r.isIntersecting);if(o)return this.setActive(o.target.id);this.setActive(((s=this.lastAbove(t))==null?void 0:s.id)??null)},{rootMargin:`-${t}px 0px -70% 0px`,threshold:0}),this.headings.forEach(i=>this.observer.observe(i))),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 i of this.headings)i.getBoundingClientRect().top<=t+20&&(e=i);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}))}}};G();customElements.get("db-toc")||customElements.define("db-toc",Nn);var _o=["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] *)"],je=_o.join(","),Pn=typeof Element>"u",ae=Pn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,we=!Pn&&Element.prototype.getRootNode?function(n){var t;return n==null||(t=n.getRootNode)===null||t===void 0?void 0:t.call(n)}:function(n){return n==null?void 0:n.ownerDocument},Ee=function(t,e){var i;e===void 0&&(e=!0);var o=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),s=o===""||o==="true",r=s||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Ee(t.parentNode));return r},zo=function(t){var e,i=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return i===""||i==="true"},$o=function(t,e,i){if(Ee(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(je));return e&&ae.call(t,je)&&o.unshift(t),o=o.filter(i),o},Ve=function(t,e,i){for(var o=[],s=Array.from(t);s.length;){var r=s.shift();if(!Ee(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),l=a.length?a:r.children,c=Ve(l,!0,i);i.flatten?o.push.apply(o,c):o.push({scopeParent:r,candidates:c})}else{var d=ae.call(r,je);d&&i.filter(r)&&(e||!t.includes(r))&&o.push(r);var u=r.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(r),h=!Ee(u,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(r));if(u&&h){var m=Ve(u===!0?r.children:u.children,!0,i);i.flatten?o.push.apply(o,m):o.push({scopeParent:r,candidates:m})}else s.unshift.apply(s,r.children)}}return o},_n=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},zn=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||zo(t))&&!_n(t)?0:t.tabIndex},Bo=function(t,e){var i=zn(t);return i<0&&e&&!_n(t)?0:i},qo=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},$n=function(t){return t.tagName==="INPUT"},Ko=function(t){return $n(t)&&t.type==="hidden"},jo=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return e},Vo=function(t,e){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===e)return t[i]},Uo=function(t){if(!t.name)return!0;var e=t.form||we(t),i=function(a){return e.querySelectorAll(\'input[type="radio"][name="\'+a+\'"]\')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=i(window.CSS.escape(t.name));else try{o=i(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 s=Vo(o,t.form);return!s||s===t},Wo=function(t){return $n(t)&&t.type==="radio"},Yo=function(t){return Wo(t)&&!Uo(t)},Go=function(t){var e,i=t&&we(t),o=(e=i)===null||e===void 0?void 0:e.host,s=!1;if(i&&i!==t){var r,a,l;for(s=!!((r=o)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,d,u;i=we(o),o=(c=i)===null||c===void 0?void 0:c.host,s=!!((d=o)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(o))}}return s},Hn=function(t){var e=t.getBoundingClientRect(),i=e.width,o=e.height;return i===0&&o===0},Xo=function(t,e){var i=e.displayCheck,o=e.getShadowRoot;if(i==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}var r=getComputedStyle(t),a=r.visibility;if(a==="hidden"||a==="collapse")return!0;var l=ae.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(ae.call(c,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="full-native"||i==="legacy-full"){if(typeof o=="function"){for(var d=t;t;){var u=t.parentElement,h=we(t);if(u&&!u.shadowRoot&&o(u)===!0)return Hn(t);t.assignedSlot?t=t.assignedSlot:!u&&h!==t.ownerDocument?t=h.host:t=u}t=d}if(Go(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return Hn(t);return!1},Zo=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var i=0;i<e.children.length;i++){var o=e.children.item(i);if(o.tagName==="LEGEND")return ae.call(e,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}e=e.parentElement}return!1},Qo=function(t,e){return!(e.disabled||Ko(e)||Xo(e,t)||jo(e)||Zo(e))},Fn=function(t,e){return!(Yo(e)||zn(e)<0||!Qo(t,e))},Jo=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Bn=function(t){var e=[],i=[];return t.forEach(function(o,s){var r=!!o.scopeParent,a=r?o.scopeParent:o,l=Bo(a,r),c=r?Bn(o.candidates):a;l===0?r?e.push.apply(e,c):e.push(a):i.push({documentOrder:s,tabIndex:l,item:o,isScope:r,content:c})}),i.sort(qo).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(e)},Ue=function(t,e){e=e||{};var i;return e.getShadowRoot?i=Ve([t],e.includeContainer,{filter:Fn.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Jo}):i=$o(t,e.includeContainer,Fn.bind(null,e)),Bn(i)};var We=class{constructor(n,t={}){p(this,"root");p(this,"opts");p(this,"previouslyFocused",null);p(this,"keydownHandler",null);p(this,"active",!1);this.root=n,this.opts={initialFocus:t.initialFocus??"first",returnFocus:t.returnFocus??!0}}activate(){this.active||(this.active=!0,this.previouslyFocused=document.activeElement,this.keydownHandler=n=>{if(n.key!=="Tab")return;let t=Ue(this.root);if(t.length===0){n.preventDefault();return}let e=t[0],i=t[t.length-1];n.shiftKey?document.activeElement===e&&(i.focus(),n.preventDefault()):document.activeElement===i&&(e.focus(),n.preventDefault())},document.addEventListener("keydown",this.keydownHandler),requestAnimationFrame(()=>{var t;if(!this.active)return;let n=Ue(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=n[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 et,It=(et=class{static activate(){if(et.count++,et.count>1)return;let t=window.innerWidth-document.documentElement.clientWidth;et.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(){et.count=Math.max(0,et.count-1),!(et.count>0)&&et.originalStyles&&(document.body.style.overflow=et.originalStyles.overflow,document.body.style.paddingRight=et.originalStyles.paddingRight,et.originalStyles=null)}static reset(){et.count=0,et.originalStyles=null}},p(et,"count",0),p(et,"originalStyles",null),et);var yt=[];function ts(n){if(n.key!=="Escape"||yt.length===0)return;let t=yt[yt.length-1];t.escapePrevented||(n.preventDefault(),n.stopPropagation(),t.opts.onDismiss("escape-key"))}var qn=!1;function es(){qn||(qn=!0,document.addEventListener("keydown",ts))}var Nt=class{constructor(n,t){p(this,"root");p(this,"opts");p(this,"outsideHandler",null);p(this,"active",!1);p(this,"frameId",null);p(this,"escapePrevented",!1);this.root=n,this.opts={onDismiss:t.onDismiss,escapeKey:t.escapeKey??!0,outsidePress:t.outsidePress??!0}}activate(){this.active||(this.active=!0,this.opts.escapeKey&&(es(),yt.push(this)),this.opts.outsidePress&&(this.outsideHandler=n=>{if(yt.length>0&&yt[yt.length-1]!==this)return;let t=n.target;if(this.root.contains(t))return;let e=this.root.id;if(e){let o=document.querySelector(`[aria-controls="${e}"]`);if(o!=null&&o.contains(t))return}let i=this.root.getAttribute("aria-labelledby");if(i){let o=document.getElementById(i);if(o!=null&&o.contains(t))return}typeof this.opts.outsidePress=="function"&&!this.opts.outsidePress(n)||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 n=yt.indexOf(this);n!==-1&&yt.splice(n,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 Ye(n){let t=[],e=n;for(;e&&e!==document.body;){let i=e.parentElement;if(!i)break;for(let o=0;o<i.children.length;o++){let s=i.children[o];if(s===e||s.contains(n))continue;let r=s.tagName;if(r==="SCRIPT"||r==="STYLE"||r==="LINK")continue;let a=s.getAttribute("aria-hidden");a!=="true"&&(t.push({el:s,prev:a}),s.setAttribute("aria-hidden","true"))}e=i}return()=>{for(let{el:i,prev:o}of t)o===null?i.removeAttribute("aria-hidden"):i.setAttribute("aria-hidden",o)}}var Kn=class extends Y{constructor(){super(...arguments);p(this,"content",null);p(this,"backdrop",null);p(this,"trigger",null);p(this,"native",!1);p(this,"_open",!1);p(this,"openedBy",null);p(this,"focusTrap",null);p(this,"dismiss",null);p(this,"cleanupInert",null);p(this,"onTriggerClick",t=>{t.preventDefault(),this.toggle(t.currentTarget)});p(this,"onHostClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-dialog")===this&&this.close("close-press")});p(this,"onDocumentClick",t=>{var o,s,r;let e=(s=(o=t.target).closest)==null?void 0:s.call(o,"[data-dialog-for]");if(!e||e===this.trigger)return;let i=e.getAttribute("data-dialog-for");i&&(i===this.id||i===((r=this.content)==null?void 0:r.id))&&(t.preventDefault(),this.toggle(e))});p(this,"onCancel",t=>{t.preventDefault(),this.dismissible&&this.close("escape-key")});p(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")});p(this,"onNativeClose",()=>{this._open&&this.finishClose("close-press")})}get open(){return this._open}get dismissible(){return this.getAttribute("dismissible")!=="false"}setup(){if(this.content=Q(this,"[data-part=\'content\']"),!this.content)return;this.native=typeof HTMLDialogElement<"u"&&this.content instanceof HTMLDialogElement&&typeof this.content.showModal=="function",this.backdrop=Q(this,"[data-part=\'backdrop\']"),this.trigger=Wt(Q(this,"[data-part=\'trigger\']"));let t=this.content;t.id||(t.id=Z("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=Z("db-dialog-title")),t.setAttribute("aria-labelledby",e.id));let i=t.querySelector("[data-part=\'description\']");i&&!t.hasAttribute("aria-describedby")&&(i.id||(i.id=Z("db-dialog-desc")),t.setAttribute("aria-describedby",i.id));for(let o of this.triggers())this.prepareTrigger(o);this.setState("closed"),this.native||(this.focusTrap=new We(t),this.dismiss=new Nt(t,{onDismiss:o=>this.dismissible&&this.close(o)}))}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 i;let t=this.trigger?[this.trigger]:[],e=[this.id,(i=this.content)==null?void 0:i.id].filter(Boolean);for(let o of e)document.querySelectorAll(`[data-dialog-for="${CSS.escape(o)}"]`).forEach(s=>t.push(s));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,i;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t),(i=this.backdrop)==null||i.setAttribute("data-state",t)}toggle(t){this._open?this.close("trigger-press"):this.show(t)}show(t){var i,o;let e=this.content;if(!(!e||this._open)){this._open=!0,this.openedBy=t??document.activeElement??this.trigger;for(let s of this.triggers())this.prepareTrigger(s),s.setAttribute("aria-expanded","true");if(It.activate(),this.native){let s=e;s.open||s.showModal()}else e.hidden=!1,this.backdrop&&(this.backdrop.hidden=!1),this.cleanupInert=Ye(e),(i=this.focusTrap)==null||i.activate(),(o=this.dismiss)==null||o.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 s,r,a;let i=this.content;this._open=!1,this.setState("closed");for(let l of this.triggers())l.setAttribute("aria-expanded","false");if(It.deactivate(),this.native){let l=i;l.open&&l.close()}else(s=this.dismiss)==null||s.deactivate(),(r=this.focusTrap)==null||r.deactivate(),(a=this.cleanupInert)==null||a.call(this),this.cleanupInert=null,On(i,()=>{this._open||(i.hidden=!0,this.backdrop&&(this.backdrop.hidden=!0))});let o=this.openedBy;this.openedBy=null,e&&o&&document.contains(o)&&o.focus(),this.dispatchEvent(new CustomEvent("db-dialog:close",{detail:{reason:t},bubbles:!0}))}};G();customElements.get("db-dialog")||customElements.define("db-dialog",Kn);var jn=class extends Y{constructor(){super(...arguments);p(this,"input",null);p(this,"listbox",null);p(this,"empty",null);p(this,"_open",!1);p(this,"highlighted",null);p(this,"observer",null);p(this,"base",Z("db-combobox"));p(this,"optionSeq",0);p(this,"onInput",()=>{this.filtering?this.filter(this.input.value):this.show()});p(this,"onFocus",()=>{(this.hasAttribute("open-on-focus")||this.filtering&&this.input.value)&&(this.filtering?this.filter(this.input.value):this.show())});p(this,"onKey",t=>{let e=this.visible(),i=this.highlighted?e.indexOf(this.highlighted):-1;switch(t.key){case"ArrowDown":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[i<0?0:Math.min(i+1,e.length-1)]);break;case"ArrowUp":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[i<0?e.length-1:Math.max(i-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}});p(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'option\']");if(!e||e.closest("db-combobox")!==this||dt(e))return;let i=t.target.closest("a[href]");!this.choose(e,!i)&&i&&t.preventDefault()});p(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'option\']");e&&e.closest("db-combobox")===this&&!dt(e)&&!e.hidden&&this.highlight(e)});p(this,"onListDown",t=>t.preventDefault());p(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&&!dt(t))}setup(){if(this.input=Q(this,"[data-part=\'input\']"),this.listbox=Q(this,"[data-part=\'listbox\']"),this.empty=Q(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 i;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),(i=this.observer)==null||i.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(),i=0;for(let s of this.options()){let r=!e||(s.textContent??"").toLowerCase().includes(e)||(s.dataset.value??"").toLowerCase().includes(e);s.hidden=!r,r&&i++}this.empty&&(this.empty.hidden=i>0||!e),this.clearHighlight(),i||e&&this.empty?this.show():this.hide();let o=this.visible();o.length&&!this.hasAttribute("no-autohighlight")&&this.highlight(o[0]),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count:i},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,i,o;this.input&&((e=this.highlighted)==null||e.removeAttribute("data-highlighted"),(i=this.highlighted)==null||i.setAttribute("aria-selected","false"),this.highlighted=t,t.setAttribute("data-highlighted",""),t.setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",t.id),(o=t.scrollIntoView)==null||o.call(t,{block:"nearest"}))}clearHighlight(){var t,e,i;(t=this.highlighted)==null||t.removeAttribute("data-highlighted"),(e=this.highlighted)==null||e.setAttribute("aria-selected","false"),this.highlighted=null,(i=this.input)==null||i.removeAttribute("aria-activedescendant")}choose(t,e=!0){var a;let i=t.dataset.value??"",o=((a=t.textContent)==null?void 0:a.trim())??i,s=new CustomEvent("db-combobox:select",{detail:{value:i,text:o,option:t},bubbles:!0,cancelable:!0});if(!this.dispatchEvent(s))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")??o),this.inline||this.hide(),this.dispatchEvent(new CustomEvent("db-combobox:change",{detail:{value:i,text:o},bubbles:!0})),!0)}};G();customElements.get("db-combobox")||customElements.define("db-combobox",jn);var Ct=Math.min,ut=Math.max,ce=Math.round,de=Math.floor,pt=n=>({x:n,y:n}),ns={left:"right",right:"left",bottom:"top",top:"bottom"};function Wn(n,t,e){return ut(n,Ct(t,e))}function Zt(n,t){return typeof n=="function"?n(t):n}function Lt(n){return n.split("-")[0]}function Qt(n){return n.split("-")[1]}function Ge(n){return n==="x"?"y":"x"}function Xe(n){return n==="y"?"height":"width"}function mt(n){let t=n[0];return t==="t"||t==="b"?"y":"x"}function Ze(n){return Ge(mt(n))}function Yn(n,t,e){e===void 0&&(e=!1);let i=Qt(n),o=Ze(n),s=Xe(o),r=o==="x"?i===(e?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=le(r)),[r,le(r)]}function Gn(n){let t=le(n);return[xe(n),t,xe(t)]}function xe(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}var Vn=["left","right"],Un=["right","left"],is=["top","bottom"],os=["bottom","top"];function ss(n,t,e){switch(n){case"top":case"bottom":return e?t?Un:Vn:t?Vn:Un;case"left":case"right":return t?is:os;default:return[]}}function Xn(n,t,e,i){let o=Qt(n),s=ss(Lt(n),e==="start",i);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(xe)))),s}function le(n){let t=Lt(n);return ns[t]+n.slice(t.length)}function rs(n){var t,e,i,o;return{top:(t=n.top)!=null?t:0,right:(e=n.right)!=null?e:0,bottom:(i=n.bottom)!=null?i:0,left:(o=n.left)!=null?o:0}}function Zn(n){return typeof n!="number"?rs(n):{top:n,right:n,bottom:n,left:n}}function Ht(n){let{x:t,y:e,width:i,height:o}=n;return{width:i,height:o,top:e,left:t,right:t+i,bottom:e+o,x:t,y:e}}function Qn(n,t,e){let{reference:i,floating:o}=n,s=mt(t),r=Ze(t),a=Xe(r),l=Lt(t),c=s==="y",d=i.x+i.width/2-o.width/2,u=i.y+i.height/2-o.height/2,h=i[a]/2-o[a]/2,m;switch(l){case"top":m={x:d,y:i.y-o.height};break;case"bottom":m={x:d,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:u};break;case"left":m={x:i.x-o.width,y:u};break;default:m={x:i.x,y:i.y}}let b=Qt(t);return b&&(m[r]+=h*(b==="end"?1:-1)*(e&&c?-1:1)),m}async function Jn(n,t){var e;t===void 0&&(t={});let{x:i,y:o,platform:s,rects:r,elements:a,strategy:l}=n,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:m=0}=Zt(t,n),b=Zn(m),w=a[h?u==="floating"?"reference":"floating":u],f=Ht(await s.getClippingRect({element:(e=await(s.isElement==null?void 0:s.isElement(w)))==null||e?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),v=u==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(E))&&await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1},I=Ht(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:E,strategy:l}):v);return{top:(f.top-I.top+b.top)/C.y,bottom:(I.bottom-f.bottom+b.bottom)/C.y,left:(f.left-I.left+b.left)/C.x,right:(I.right-f.right+b.right)/C.x}}var as=50,ti=async(n,t,e)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:Jn},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:n,floating:t,strategy:o}),{x:d,y:u}=Qn(c,i,l),h=i,m=0,b={};for(let g=0;g<s.length;g++){let w=s[g];if(!w)continue;let{name:f,fn:v}=w,{x:E,y:C,data:I,reset:L}=await v({x:d,y:u,initialPlacement:i,placement:h,strategy:o,middlewareData:b,rects:c,platform:a,elements:{reference:n,floating:t}});d=E??d,u=C??u,b[f]={...b[f],...I},L&&m<as&&(m++,typeof L=="object"&&(L.placement&&(h=L.placement),L.rects&&(c=L.rects===!0?await r.getElementRects({reference:n,floating:t,strategy:o}):L.rects),{x:d,y:u}=Qn(c,h,l)),g=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:b}};var ei=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(t){var e,i;let{placement:o,middlewareData:s,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...w}=Zt(n,t);if((e=s.arrow)!=null&&e.alignmentOffset)return{};let f=Lt(o),v=mt(a),E=Lt(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(c.floating)),I=h||(E||!g?[le(a)]:Gn(a)),L=b!=="none";!h&&L&&I.push(...Xn(a,g,b,C));let x=[a,...I],y=await l.detectOverflow(t,w),X=[],z=((i=s.flip)==null?void 0:i.overflows)||[];if(d&&X.push(y[f]),u){let _=Yn(o,r,C);X.push(y[_[0]],y[_[1]])}if(z=[...z,{placement:o,overflows:X}],!X.every(_=>_<=0)){var U,S;let _=(((U=s.flip)==null?void 0:U.index)||0)+1,B=x[_];if(B&&(!(u==="alignment"?v!==mt(B):!1)||z.every(K=>mt(K.placement)===v?K.overflows[0]>0:!0)))return{data:{index:_,overflows:z},reset:{placement:B}};let F=(S=z.filter($=>$.overflows[0]<=0).sort(($,K)=>$.overflows[1]-K.overflows[1])[0])==null?void 0:S.placement;if(!F)switch(m){case"bestFit":{var O;let $=(O=z.filter(K=>{if(L){let J=mt(K.placement);return J===v||J==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(J=>J>0).reduce((J,nt)=>J+nt,0)]).sort((K,J)=>K[1]-J[1])[0])==null?void 0:O[0];$&&(F=$);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};var ls=new Set(["left","top"]);async function cs(n,t){let{placement:e,platform:i,elements:o}=n,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=Lt(e),a=Qt(e),l=mt(e)==="y",c=ls.has(r)?-1:1,d=s&&l?-1:1,u=Zt(t,n),{mainAxis:h,crossAxis:m,alignmentAxis:b}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof b=="number"&&(m=a==="end"?b*-1:b),l?{x:m*d,y:h*c}:{x:h*c,y:m*d}}var ni=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(t){var e,i;let{x:o,y:s,placement:r,middlewareData:a}=t,l=await cs(t,n);return r===((e=a.offset)==null?void 0:e.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:r}}}}},ii=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(t){let{x:e,y:i,placement:o,platform:s}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:E,y:C}=v;return{x:E,y:C}}},...c}=Zt(n,t),d={x:e,y:i},u=await s.detectOverflow(t,c),h=mt(o),m=Ge(h),b=d[m],g=d[h],w=(v,E)=>Wn(E+u[v==="y"?"top":"left"],E,E-u[v==="y"?"bottom":"right"]);r&&(b=w(m,b)),a&&(g=w(h,g));let f=l.fn({...t,[m]:b,[h]:g});return{...f,data:{x:f.x-e,y:f.y-i,enabled:{[m]:r,[h]:a}}}}}};var oi=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(t){let{placement:e,rects:i,platform:o,elements:s}=t,{apply:r=()=>{},...a}=Zt(n,t),l=await o.detectOverflow(t,a),c=Lt(e),d=Qt(e),u=mt(e)==="y",{width:h,height:m}=i.floating,b,g;c==="top"||c==="bottom"?(b=c,g=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(g=c,b=d==="end"?"top":"bottom");let w=m-l.top-l.bottom,f=h-l.left-l.right,v=Ct(m-l[b],w),E=Ct(h-l[g],f),C=t.middlewareData.shift,I=!C,L=v,x=E;C!=null&&C.enabled.x&&(x=f),C!=null&&C.enabled.y&&(L=w),I&&!d&&(u?x=h-2*ut(l.left,l.right):L=m-2*ut(l.top,l.bottom)),await r({...t,availableWidth:x,availableHeight:L});let y=await o.getDimensions(s.floating);return h!==y.width||m!==y.height?{reset:{rects:!0}}:{}}}};function Se(){return typeof window<"u"}function Pt(n){return ri(n)?(n.nodeName||"").toLowerCase():"#document"}function st(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function gt(n){var t;return(t=(ri(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function ri(n){return Se()?n instanceof Node||n instanceof st(n).Node:!1}function ht(n){return Se()?n instanceof Element||n instanceof st(n).Element:!1}function wt(n){return Se()?n instanceof HTMLElement||n instanceof st(n).HTMLElement:!1}function si(n){return!Se()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof st(n).ShadowRoot}function ue(n){let{overflow:t,overflowX:e,overflowY:i,display:o}=ft(n);return/auto|scroll|overlay|hidden|clip/.test(t+i+e)&&o!=="inline"&&o!=="contents"}function ai(n){return/^(table|td|th)$/.test(Pt(n))}function he(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}var ds=/transform|translate|scale|rotate|perspective|filter/,us=/paint|layout|strict|content/,Ft=n=>!!n&&n!=="none",Qe;function Ae(n){let t=ht(n)?ft(n):n;return Ft(t.transform)||Ft(t.translate)||Ft(t.scale)||Ft(t.rotate)||Ft(t.perspective)||!Ce()&&(Ft(t.backdropFilter)||Ft(t.filter))||ds.test(t.willChange||"")||us.test(t.contain||"")}function li(n){let t=kt(n);for(;wt(t)&&!te(t);){if(Ae(t))return t;if(he(t))return null;t=kt(t)}return null}function Ce(){return Qe==null&&(Qe=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Qe}function te(n){return/^(html|body|#document)$/.test(Pt(n))}function ft(n){return st(n).getComputedStyle(n)}function fe(n){return ht(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function kt(n){if(Pt(n)==="html")return n;let t=n.assignedSlot||n.parentNode||si(n)&&n.host||gt(n);return si(t)?t.host:t}function ci(n){let t=kt(n);return te(t)?(n.ownerDocument||n).body:wt(t)&&ue(t)?t:ci(t)}function Jt(n,t,e){var i;t===void 0&&(t=[]),e===void 0&&(e=!0);let o=ci(n),s=o===((i=n.ownerDocument)==null?void 0:i.body),r=st(o);if(s){let a=Le(r);return t.concat(r,r.visualViewport||[],ue(o)?o:[],a&&e?Jt(a):[])}else return t.concat(o,Jt(o,[],e))}function Le(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function hi(n){let t=ft(n),e=parseFloat(t.width)||0,i=parseFloat(t.height)||0,o=wt(n),s=o?n.offsetWidth:e,r=o?n.offsetHeight:i,a=ce(e)!==s||ce(i)!==r;return a&&(e=s,i=r),{width:e,height:i,$:a}}function tn(n){return ht(n)?n:n.contextElement}function ee(n){let t=tn(n);if(!wt(t))return pt(1);let e=t.getBoundingClientRect(),{width:i,height:o,$:s}=hi(t),r=(s?ce(e.width):e.width)/i,a=(s?ce(e.height):e.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}var hs=pt(0);function fi(n){let t=st(n);return!Ce()||!t.visualViewport?hs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fs(n,t,e){return t===void 0&&(t=!1),!!e&&t&&e===st(n)}function _t(n,t,e,i){t===void 0&&(t=!1),e===void 0&&(e=!1);let o=n.getBoundingClientRect(),s=tn(n),r=pt(1);t&&(i?ht(i)&&(r=ee(i)):r=ee(n));let a=fs(s,e,i)?fi(s):pt(0),l=(o.left+a.x)/r.x,c=(o.top+a.y)/r.y,d=o.width/r.x,u=o.height/r.y;if(s&&i){let h=st(s),m=ht(i)?st(i):i,b=h,g=Le(b);for(;g&&m!==b;){let w=ee(g),f=g.getBoundingClientRect(),v=ft(g),E=f.left+(g.clientLeft+parseFloat(v.paddingLeft))*w.x,C=f.top+(g.clientTop+parseFloat(v.paddingTop))*w.y;l*=w.x,c*=w.y,d*=w.x,u*=w.y,l+=E,c+=C,b=st(g),g=Le(b)}}return Ht({width:d,height:u,x:l,y:c})}function ke(n,t){let e=fe(n).scrollLeft;return t?t.left+e:_t(gt(n)).left+e}function pi(n,t){let e=n.getBoundingClientRect(),i=e.left+t.scrollLeft-ke(n,e),o=e.top+t.scrollTop;return{x:i,y:o}}function ps(n){let{elements:t,rect:e,offsetParent:i,strategy:o}=n,s=o==="fixed",r=gt(i),a=t?he(t.floating):!1;if(i===r||a&&s)return e;let l={scrollLeft:0,scrollTop:0},c=pt(1),d=pt(0),u=wt(i);if((u||!s)&&((Pt(i)!=="body"||ue(r))&&(l=fe(i)),u)){let m=_t(i);c=ee(i),d.x=m.x+i.clientLeft,d.y=m.y+i.clientTop}let h=r&&!u&&!s?pi(r,l):pt(0);return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:e.y*c.y-l.scrollTop*c.y+d.y+h.y}}function ms(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function gs(n){let t=fe(n),e=n.ownerDocument.body,i=ut(n.scrollWidth,n.clientWidth,e.scrollWidth,e.clientWidth),o=ut(n.scrollHeight,n.clientHeight,e.scrollHeight,e.clientHeight),s=-t.scrollLeft+ke(n),r=-t.scrollTop;return ft(e).direction==="rtl"&&(s+=ut(n.clientWidth,e.clientWidth)-i),{width:i,height:o,x:s,y:r}}var bs=25;function vs(n,t,e){e===void 0&&(e="viewport");let i=e==="layoutViewport",o=st(n),s=gt(n),r=o.visualViewport,a=s.clientWidth,l=s.clientHeight,c=0,d=0;if(r){let h=!Ce()||t==="fixed";i?h||(c=-r.offsetLeft,d=-r.offsetTop):(a=r.width,l=r.height,h&&(c=r.offsetLeft,d=r.offsetTop))}if(ke(s)<=0){let h=s.ownerDocument,m=h.body,b=getComputedStyle(m),g=h.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,w=Math.abs(s.clientWidth-m.clientWidth-g),f=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;f<=bs&&(a-=f)}return{width:a,height:l,x:c,y:d}}function ys(n,t){let e=_t(n,!0,t==="fixed"),i=e.top+n.clientTop,o=e.left+n.clientLeft,s=ee(n),r=n.clientWidth*s.x,a=n.clientHeight*s.y,l=o*s.x,c=i*s.y;return{width:r,height:a,x:l,y:c}}function di(n,t,e){let i;if(t==="viewport"||t==="layoutViewport")i=vs(n,e,t);else if(t==="document")i=gs(gt(n));else if(ht(t))i=ys(t,e);else{let o=fi(n);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ht(i)}function ws(n,t){let e=t.get(n);if(e)return e;let i=Jt(n,[],!1).filter(a=>ht(a)&&Pt(a)!=="body"),o=null,s=ft(n).position==="fixed",r=s?kt(n):n;for(;ht(r)&&!te(r);){let a=ft(r),l=Ae(r),c=o?o.position:s?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(u=>u!==r):o=a,r=kt(r)}return t.set(n,i),i}function Es(n){let{element:t,boundary:e,rootBoundary:i,strategy:o}=n,r=[...e==="clippingAncestors"?he(t)?[]:ws(t,this._c):[].concat(e),i],a=di(t,r[0],o),l=a.top,c=a.right,d=a.bottom,u=a.left;for(let h=1;h<r.length;h++){let m=di(t,r[h],o);l=ut(m.top,l),c=Ct(m.right,c),d=Ct(m.bottom,d),u=ut(m.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function xs(n){let{width:t,height:e}=hi(n);return{width:t,height:e}}function Ss(n,t,e){let i=wt(t),o=gt(t),s=e==="fixed",r=_t(n,!0,s,t),a={scrollLeft:0,scrollTop:0},l=pt(0);if((i||!s)&&((Pt(t)!=="body"||ue(o))&&(a=fe(t)),i)){let h=_t(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}!i&&o&&(l.x=ke(o));let c=o&&!i&&!s?pi(o,a):pt(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 Je(n){return ft(n).position==="static"}function ui(n,t){if(!wt(n)||ft(n).position==="fixed")return null;if(t)return t(n);let e=n.offsetParent;return gt(n)===e&&(e=e.ownerDocument.body),e}function mi(n,t){let e=st(n);if(he(n))return e;if(!wt(n)){let o=kt(n);for(;o&&!te(o);){if(ht(o)&&!Je(o))return o;o=kt(o)}return e}let i=ui(n,t);for(;i&&ai(i)&&Je(i);)i=ui(i,t);return i&&te(i)&&Je(i)&&!Ae(i)?e:i||li(n)||e}var As=async function(n){let t=this.getOffsetParent||mi,e=this.getDimensions,i=await e(n.floating);return{reference:Ss(n.reference,await t(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Cs(n){return ft(n).direction==="rtl"}var Ls={convertOffsetParentRelativeRectToViewportRelativeRect:ps,getDocumentElement:gt,getClippingRect:Es,getOffsetParent:mi,getElementRects:As,getClientRects:ms,getDimensions:xs,getScale:ee,isElement:ht,isRTL:Cs};function gi(n,t){return n.x===t.x&&n.y===t.y&&n.width===t.width&&n.height===t.height}function ks(n,t,e){let i=null,o,s=gt(n);function r(){var d;clearTimeout(o),(d=i)==null||d.disconnect(),i=null}function a(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let h=n.getBoundingClientRect(),{left:m,top:b,width:g,height:w}=h;if(d||t(),!g||!w)return;let f=de(b),v=de(s.clientWidth-(m+g)),E=de(s.clientHeight-(b+w)),C=de(m),L={rootMargin:-f+"px "+-v+"px "+-E+"px "+-C+"px",threshold:ut(0,Ct(1,u))||1},x=!0;function y(X){let z=X[0].intersectionRatio;if(!gi(h,n.getBoundingClientRect()))return a();if(z!==u){if(!x)return a();z?a(!1,z):o=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{i=new IntersectionObserver(y,{...L,root:s.ownerDocument})}catch{i=new IntersectionObserver(y,L)}i.observe(n)}let l=st(n),c=()=>a(e);return l.addEventListener("resize",c),a(!0),()=>{l.removeEventListener("resize",c),r()}}function bi(n,t,e,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=tn(n),d=o||s?[...c?Jt(c):[],...t?Jt(t):[]]:[];d.forEach(f=>{o&&f.addEventListener("scroll",e),s&&f.addEventListener("resize",e)});let u=c&&a?ks(c,e,s):null,h=-1,m=null;r&&(m=new ResizeObserver(f=>{let[v]=f;v&&v.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=m)==null||E.observe(t)})),e()}),c&&!l&&m.observe(c),t&&m.observe(t));let b,g=l?_t(n):null;l&&w();function w(){let f=_t(n);g&&!gi(g,f)&&e(),g=f,b=requestAnimationFrame(w)}return e(),()=>{var f;d.forEach(v=>{o&&v.removeEventListener("scroll",e),s&&v.removeEventListener("resize",e)}),u==null||u(),(f=m)==null||f.disconnect(),m=null,l&&cancelAnimationFrame(b)}}var vi=ni;var yi=ii,wi=ei,Ei=oi;var xi=(n,t,e)=>{let i=new Map,o=e??{},s={...Ls,...o.platform,_c:i};return ti(n,t,{...o,platform:s})};function zt(n,t,e={}){let{placement:i="bottom-start",strategy:o="absolute",offset:s=4,flip:r=!0,shift:a=!0,padding:l=8,matchWidth:c=!1}=e,d=[vi(s),...r?[wi({padding:l})]:[],...a?[yi({padding:l})]:[],...c?[Ei({apply({rects:h}){Object.assign(t.style,{width:`${h.reference.width}px`})}})]:[]];return t.style.position=o,bi(n,t,async()=>{let h=await xi(n,t,{placement:i,strategy:o,middleware:d});Object.assign(t.style,{left:`${h.x}px`,top:`${h.y}px`});let m=h.placement.split("-")[0];t.setAttribute("data-side",m)})}var en=class{constructor(n){p(this,"opts");p(this,"buffer","");p(this,"timerId",null);p(this,"timeout");this.opts=n,this.timeout=n.timeout??1e3}handle(n){if(n.length!==1)return!1;this.timerId!==null&&clearTimeout(this.timerId),this.buffer+=n.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 Si=class extends Y{constructor(){super(...arguments);p(this,"trigger",null);p(this,"content",null);p(this,"valueEl",null);p(this,"items",[]);p(this,"nativeSelect",null);p(this,"hiddenInput",null);p(this,"labelEl",null);p(this,"onLabelClick",t=>{var e;t.target.closest("[data-part=\'trigger\']")||(t.preventDefault(),(e=this.trigger)==null||e.focus())});p(this,"dismiss",null);p(this,"typeahead",null);p(this,"cleanupFloating",null);p(this,"_open",!1);p(this,"_value","");p(this,"highlighted",-1);p(this,"syncing",!1);p(this,"onNativeChange",()=>{this.syncing||this.refresh()});p(this,"onFormReset",()=>setTimeout(()=>this.refresh()));p(this,"onTriggerClick",()=>{this.isDisabled||(this._open?this.close():this.show())});p(this,"onTriggerKeyUp",t=>{t.key===" "&&t.preventDefault()});p(this,"onTriggerKey",t=>{var s,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&&((s=this.typeahead)==null||s.handle(t.key));return}if(!e.length)return;let i=this.highlighted>=0?e.indexOf(this.items[this.highlighted]):-1,o=a=>{t.preventDefault(),this.highlight(this.items.indexOf(e[a]))};switch(t.key){case"ArrowDown":return o(Math.min(i+1,e.length-1));case"ArrowUp":return t.altKey?(t.preventDefault(),this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close()):o(Math.max(i-1,0));case"Home":return o(0);case"End":return o(e.length-1);case"PageDown":return o(Math.min(i+10,e.length-1));case"PageUp":return o(Math.max(i-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))}});p(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'item\']");!e||!this.items.includes(e)||dt(e)||(this.select(e),this.close())});p(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'item\']");e&&this.items.includes(e)&&!dt(e)&&this.highlight(this.items.indexOf(e))});p(this,"preventBlur",t=>t.preventDefault())}get open(){return this._open}get value(){return this._value}set value(t){let e=this.items.find(i=>i.dataset.value===t);e&&this.select(e,!1)}get isDisabled(){var t;return this.hasAttribute("disabled")||!!((t=this.nativeSelect)!=null&&t.disabled)}refresh(){var i;let t=this.nativeSelect;if(!t)return;let e=this.items.find(o=>o.dataset.value===t.value);e&&this.select(e,!1),(i=this.trigger)==null||i.setAttribute("aria-disabled",String(this.isDisabled))}enabled(){return this.items.filter(t=>!dt(t))}setup(){var a,l;if(this.nativeSelect=Q(this,"select"),this.nativeSelect&&!Q(this,"[data-part=\'trigger\']")&&this.buildFromNative(this.nativeSelect),this.trigger=Q(this,"[data-part=\'trigger\']"),this.content=Q(this,"[data-part=\'content\']"),this.valueEl=Q(this,"[data-part=\'value\']"),!this.trigger||!this.content)return;let{trigger:t,content:e}=this;this.items=vt(this,"[data-part=\'item\']");let i=Z("db-select");e.id||(e.id=`${i}-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=`${i}-item-${d}`),c.setAttribute("role","option"),c.setAttribute("aria-selected","false")}),vt(this,"[data-part=\'group\']").forEach(c=>{c.setAttribute("role","group");let d=c.querySelector("[data-part=\'label\']");d&&(d.id||(d.id=Z("db-select-label")),c.setAttribute("aria-labelledby",d.id))});let o=this.getAttribute("name");o&&!this.nativeSelect&&(this.hiddenInput=document.createElement("input"),this.hiddenInput.type="hidden",this.hiddenInput.name=o,this.hasAttribute("required")&&(this.hiddenInput.required=!0),this.appendChild(this.hiddenInput)),this.typeahead=new en({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 Nt(e,{onDismiss:c=>this.close(c!=="outside-press")});let s=((a=this.nativeSelect)==null?void 0:a.value)??this.getAttribute("default-value")??"",r=this.items.find(c=>c.dataset.value===s);r&&dt(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 i=t.getAttribute("aria-label"),o=t.getAttribute("aria-labelledby"),s=!o&&t.id?document.querySelector(`label[for="${CSS.escape(t.id)}"]`):null;s&&(o=s.id||(s.id=Z("db-select-for"))),i&&e.setAttribute("aria-label",i),o&&e.setAttribute("aria-labelledby",o);let r=t.closest("label");if(r){if(this.labelEl=r,!i&&!o){let u=Array.from(r.childNodes).filter(h=>!(h instanceof Element&&(h===t||h.contains(t)||h.localName==="db-select"))).map(h=>h.textContent??"").join(" ").replace(/\\s+/g," ").trim();u&&e.setAttribute("aria-label",u)}}else s&&(this.labelEl=s);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,h)=>{let m=document.createElement("div");m.setAttribute("data-part","item"),m.className="db-select-item",m.dataset.value=u.value;for(let[b,g]of Object.entries(u.dataset))g!=null&&(m.dataset[b]=g);u.disabled&&m.setAttribute("aria-disabled","true"),m.textContent=u.textContent??u.value,h.appendChild(m)};for(let u of Array.from(t.children))if(u instanceof HTMLOptGroupElement){let h=document.createElement("div");h.setAttribute("data-part","group");let m=document.createElement("div");m.setAttribute("data-part","label"),m.className="db-select-label",m.textContent=u.label,h.appendChild(m);for(let b of Array.from(u.children))b instanceof HTMLOptionElement&&d(b,h);c.appendChild(h)}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,i,o,s,r,a,l,c,d;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.addEventListener("keydown",this.onTriggerKey),(i=this.trigger)==null||i.addEventListener("keyup",this.onTriggerKeyUp),(o=this.nativeSelect)==null||o.addEventListener("change",this.onNativeChange),(r=(s=this.nativeSelect)==null?void 0:s.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,i,o,s,r,a,l,c,d;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.removeEventListener("keydown",this.onTriggerKey),(i=this.trigger)==null||i.removeEventListener("keyup",this.onTriggerKeyUp),(o=this.nativeSelect)==null||o.removeEventListener("change",this.onNativeChange),(r=(s=this.nativeSelect)==null?void 0:s.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 i=Yt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=zt(t,e,{placement:"bottom-start",offset:4,matchWidth:!this.hasAttribute("auto-width"),strategy:i==="top-layer"?"fixed":"absolute"});let s=this.items.find(l=>l.dataset.value===this._value&&!dt(l))??this.enabled()[0];s&&this.highlight(this.items.indexOf(s)),(r=this.dismiss)==null||r.activate(),(a=this.typeahead)==null||a.reset(),t.focus()}close(t=!0){var o,s,r;let{trigger:e,content:i}=this;!e||!i||!this._open||(this._open=!1,(o=this.dismiss)==null||o.deactivate(),(s=this.cleanupFloating)==null||s.call(this),this.cleanupFloating=null,Gt(i),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],i=this.content;if(!e||!i||!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 o=e.offsetTop,s=o+e.offsetHeight;o<i.scrollTop?i.scrollTop=o:s>i.scrollTop+i.clientHeight&&(i.scrollTop=s-i.clientHeight)}select(t,e=!0){var s;if(dt(t))return;let i=t.dataset.value??"",o=i!==this._value;this._value=i;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=((s=t.textContent)==null?void 0:s.trim())??"",this.valueEl.removeAttribute("data-placeholder")),this.hiddenInput&&(this.hiddenInput.value=i),!e||!o){this.nativeSelect&&(this.nativeSelect.value=i);return}if(this.nativeSelect){this.nativeSelect.value=i,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:i},bubbles:!0}))}};G();customElements.get("db-select")||customElements.define("db-select",Si);var Ai=class extends Y{constructor(){super(...arguments);p(this,"trigger",null);p(this,"content",null);p(this,"dismiss",null);p(this,"cleanupFloating",null);p(this,"_open",!1);p(this,"onTriggerClick",()=>this.toggle());p(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=Wt(Q(this,"[data-part=\'trigger\']")),this.content=Q(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;let t=this.content;t.id||(t.id=Z("db-popover")),t.hasAttribute("role")||t.setAttribute("role","dialog"),!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&((e=this.trigger).id||(e.id=Z("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 Nt(t,{onDismiss:i=>this.close(i)})}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 o,s;let t=this.getAttribute("placement");if(t)return t;let e=((o=this.content)==null?void 0:o.dataset.side)||"bottom",i=((s=this.content)==null?void 0:s.dataset.align)||"center";return`${e}${i!=="center"?`-${i}`:""}`}toggle(){this._open?this.close("trigger-press"):this.show()}show(){var o;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let i=Yt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=zt(t,e,{placement:this.placement(),offset:Number(this.getAttribute("offset")??8),strategy:i==="top-layer"?"fixed":"absolute"}),(o=this.dismiss)==null||o.activate(),this.hasAttribute("no-autofocus")||requestAnimationFrame(()=>{this._open&&(Tn(e)[0]??e).focus({preventScroll:!0})}),this.dispatchEvent(new CustomEvent("db-popover:open",{bubbles:!0}))}close(t="api"){var s,r;let{trigger:e,content:i}=this;if(!e||!i||!this._open)return;this._open=!1,(s=this.dismiss)==null||s.deactivate(),(r=this.cleanupFloating)==null||r.call(this),this.cleanupFloating=null;let o=i.contains(document.activeElement);Gt(i),this.setState("closed"),e.setAttribute("aria-expanded","false"),t!=="outside-press"&&(o||t==="escape-key"||t==="close-press")&&e.focus(),this.dispatchEvent(new CustomEvent("db-popover:close",{detail:{reason:t},bubbles:!0}))}};G();customElements.get("db-popover")||customElements.define("db-popover",Ai);var Ci="db-announcement-closed:";var Li=class extends Y{constructor(){super(...arguments);p(this,"closeButton",null);p(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 i;let t=this.getAttribute("announcement-id")??"";try{t&&localStorage.setItem(Ci+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 o=document.querySelector("main, [role=\'main\']");o?(o.hasAttribute("tabindex")||o.setAttribute("tabindex","-1"),o.focus({preventScroll:!0})):(i=document.activeElement)==null||i.blur()}this.dispatchEvent(new CustomEvent("db-announcement:close",{bubbles:!0,detail:{id:t}}))}};G();customElements.get("db-announcement")||customElements.define("db-announcement",Li);var ki=class extends Y{constructor(){super(...arguments);p(this,"trigger",null);p(this,"content",null);p(this,"cleanupFloating",null);p(this,"showTimer",null);p(this,"hideTimer",null);p(this,"_open",!1);p(this,"onEnter",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this._open||(this.showTimer=setTimeout(()=>this.show(),this.num("delay",200))))});p(this,"onLeave",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this.hideTimer=setTimeout(()=>this.hide(),this.num("close-delay",100)))});p(this,"onContentEnter",()=>this.clearTimers());p(this,"onFocus",()=>{let t=!0;try{t=this.trigger.matches(":focus-visible")}catch{}t&&(this.clearTimers(),this.show())});p(this,"onBlur",()=>this.hide());p(this,"onPress",()=>this.hide());p(this,"onKey",t=>{t.key==="Escape"&&this._open&&(t.preventDefault(),t.stopImmediatePropagation(),this.hide())})}get open(){return this._open}num(t,e){let i=Number(this.getAttribute(t));return Number.isFinite(i)&&this.hasAttribute(t)?i:e}setup(){var e;if(this.trigger=Wt(Q(this,"[data-part=\'trigger\']")),this.content=Q(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;(e=this.content).id||(e.id=Z("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 i=Yt(e);this.setState("open"),this.cleanupFloating=zt(t,e,{placement:this.getAttribute("placement")||e.dataset.side||"top",offset:8,strategy:i==="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,Gt(this.content),this.setState("closed"),this.dispatchEvent(new CustomEvent("db-tooltip:close",{bubbles:!0})))}};G();customElements.get("db-tooltip")||customElements.define("db-tooltip",ki);var Ti="sidebar_state",Ts="b",Os=768,pe=new WeakMap;function Ds(n){try{return localStorage.getItem(n)}catch{return null}}function Rs(n,t){try{localStorage.setItem(n,t)}catch{}}function sn(n){if(pe.has(n))return;let t=n.querySelector("[data-component=\'sidebar\']");if(!t)return;let e=t.dataset.collapsible||"offcanvas",i=t.dataset.side||"left",o=t.dataset.defaultOpen!=="false",s=Ds(Ti),r=s!==null?s==="true":o,a=t.querySelector("[data-sidebar-desktop]"),l=t.querySelector("[data-sidebar-mobile]"),c=t.querySelector("[data-sidebar-mobile-backdrop]"),d=window.matchMedia(`(max-width: ${Os-1}px)`),u={provider:n,sidebar:t,desktopSidebar:a,mobileSidebar:l,mobileBackdrop:c,collapsible:e,side:i,open:r,openMobile:!1,isMobile:d.matches,mediaQuery:d};pe.set(n,u),Oi(u);let h=g=>{u.isMobile=g.matches,!g.matches&&u.openMobile&&Tt(n)};d.addEventListener("change",h);let m=g=>{g.key===Ts&&(g.metaKey||g.ctrlKey)?(g.preventDefault(),nn(n)):g.key==="Escape"&&u.openMobile&&(g.preventDefault(),Tt(n))};document.addEventListener("keydown",m),Ms(n,u),c&&c.addEventListener("click",()=>{Tt(n)});let b=t.querySelector("[data-part=\'rail\']");b&&b.addEventListener("click",()=>{nn(n)})}function Ms(n,t){n.querySelectorAll("[data-part=\'sidebar-trigger\']").forEach(e=>{e.addEventListener("click",()=>{nn(n)})})}function nn(n){let t=pe.get(n);t&&(t.isMobile?t.openMobile?Tt(n):Is(n):(t.open=!t.open,Oi(t),Rs(Ti,String(t.open))))}function Oi(n){let t=n.open?"expanded":"collapsed";n.provider.setAttribute("data-state",t),n.sidebar.setAttribute("data-state",t),n.desktopSidebar&&(n.desktopSidebar.setAttribute("data-state",t),n.open?n.desktopSidebar.setAttribute("data-collapsible",""):n.desktopSidebar.setAttribute("data-collapsible",n.collapsible))}function Is(n){var i;let t=pe.get(n);if(!t||t.openMobile||!t.mobileSidebar)return;t.openMobile=!0;let e=(i=t.desktopSidebar)==null?void 0:i.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),It.activate(),requestAnimationFrame(()=>{var s;let o=(s=t.mobileSidebar)==null?void 0:s.querySelector(\'a, button, [tabindex]:not([tabindex="-1"])\');o==null||o.focus()})}function Tt(n){var o;let t=pe.get(n);if(!t||!t.openMobile||!t.mobileSidebar)return;t.openMobile=!1;let e=(o=t.desktopSidebar)==null?void 0:o.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),It.deactivate();let i=t.provider.querySelector("[data-part=\'sidebar-trigger\']");i==null||i.focus()}function on(){document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(n=>{sn(n)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",on):on();document.addEventListener("astro:page-load",on);var Di=/^[a-z][a-z0-9_-]{0,63}$/,Te={docs:"docs.js",shard:n=>`t-${n}.js`,fragment:n=>`f-${n}.js`},Oe={docs:"docs",shard:n=>n,fragment:n=>`frag:${n}`};var Ns={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"},Hs={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},Fs="[^aeiou]",an="[aeiouy]",Ot="("+Fs+"[^aeiouy]*)",Re="("+an+"[aeiou]*)",rn=new RegExp("^"+Ot+"?"+Re+Ot),Ps=new RegExp("^"+Ot+"?"+Re+Ot+Re+"?$"),De=new RegExp("^"+Ot+"?("+Re+Ot+"){2,}"),Ri=new RegExp("^"+Ot+"?"+an),Mi=new RegExp("^"+Ot+an+"[^aeiouwxy]$"),_s=/ll$/,zs=/^(.+?)e$/,$s=/^(.+?)y$/,Bs=/^(.+?(s|t))(ion)$/,qs=/^(.+?)(ed|ing)$/,Ks=/(at|bl|iz)$/,js=/^(.+?)eed$/,Vs=/^.+?[^s]s$/,Us=/^.+?(ss|i)es$/,Ws=/([^aeiouylsz])\\1$/,Ys=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,Gs=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,Xs=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;function Ii(n){let t=String(n).toLowerCase();if(t.length<3)return t;let e=!1;t.codePointAt(0)===121&&(e=!0,t="Y"+t.slice(1)),Us.test(t)?t=t.slice(0,-2):Vs.test(t)&&(t=t.slice(0,-1));let i;return(i=js.exec(t))?rn.test(i[1])&&(t=t.slice(0,-1)):(i=qs.exec(t))&&Ri.test(i[1])&&(t=i[1],Ks.test(t)?t+="e":Ws.test(t)?t=t.slice(0,-1):Mi.test(t)&&(t+="e")),(i=$s.exec(t))&&Ri.test(i[1])&&(t=i[1]+"i"),(i=Ys.exec(t))&&rn.test(i[1])&&(t=i[1]+Ns[i[2]]),(i=Gs.exec(t))&&rn.test(i[1])&&(t=i[1]+Hs[i[2]]),(i=Xs.exec(t))?De.test(i[1])&&(t=i[1]):(i=Bs.exec(t))&&De.test(i[1])&&(t=i[1]),(i=zs.exec(t))&&(De.test(i[1])||Ps.test(i[1])&&!Mi.test(i[1]))&&(t=i[1]),_s.test(t)&&De.test(t)&&(t=t.slice(0,-1)),e&&(t="y"+t.slice(1)),t}var Ni=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(" ")),Zs=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u,me;function Qs(n){if(me===void 0)try{me=typeof Intl<"u"&&"Segmenter"in Intl?new Intl.Segmenter(void 0,{granularity:"word"}):null}catch{me=null}if(me)return[...me.segment(n)].filter(i=>i.isWordLike).map(i=>i.segment);let t=[...n];if(t.length<2)return t;let e=[];for(let i=0;i<t.length-1;i++)e.push(t[i]+t[i+1]);return e}function $t(n){let t=[];for(let e of n.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 i=e[0],o=i.split(/[._-]+/).filter(Boolean);if(o.length>1&&t.push(i),o.length>1&&!/[._]/.test(i)){let s=o.join("");s.length>=3&&!Ni.has(s)&&t.push(s)}for(let s of o)Zs.test(s)?t.push(...Qs(s)):s.length>=2&&!Ni.has(s)&&t.push(s)}return t}function ln(n,t){let e="";for(let i of n.slice(0,t))e+=/[a-z0-9]/.test(i)?i:`_${i.codePointAt(0).toString(16)}_`;return e}function ge(n){if(!(!n||!/^en(-|$)/i.test(n)))return t=>/^[a-z]{3,}$/.test(t)?Ii(t):t}function Bt(n,t={}){var w,f;let e=[],i=[],o=[],s=!1,r={tag:[],section:[]},a={tag:[],section:[]},l=Object.create(null),c=Object.create(null),d=["tag","section",...new Set((t.facets??[]).filter(v=>Di.test(v)&&v!=="tag"&&v!=="section"))],u=new RegExp(`(?<!\\\\S)(-?)(${d.join("|")}):(?:"([^"]*)"?|(?!\\\\/\\\\/)(\\\\S*))|(-?)"([^"]*)"?|(\\\\S+)`,"gi"),h=[...n.matchAll(u)].map(v=>{var E;return{facetNeg:v[1]==="-",facet:(E=v[2])==null?void 0:E.toLowerCase(),value:v[3]??v[4],neg:v[5],phrase:v[6],word:v[7]}}),m=!1,b=!1;for(let[v,E]of h.entries()){if(E.facet){let O=hn(E.value??"");if(!O)continue;E.facet==="tag"||E.facet==="section"?(E.facetNeg?a:r)[E.facet].push(O):((w=E.facetNeg?c:l)[f=E.facet]??(w[f]=[])).push(O);continue}let C=E.word;if(C==="OR"){b=e.length>0,s=!0;continue}if(C==="NOT"){m=!0,s=!0;continue}if(C==="AND"){s=!0;continue}let I=E.phrase!==void 0,L=m||E.neg==="-"||(C==null?void 0:C.startsWith("-"))&&C.length>1;m=!1;let x=I?E.phrase:L&&(C!=null&&C.startsWith("-"))?C.slice(1):C,y=[...new Set($t(x))];if(!y.length){b=!1;continue}if(L){i.push(I?y:[y[0]]),s=!0,b=!1;continue}if(I){b=!1,s=!0,y.length>1&&o.push($t(x).join(" "));for(let O of y)e.push({terms:[O],prefix:!1,exact:!0});continue}let X=v===h.length-1&&!/\\s$/.test(n);if(b){e[e.length-1].terms.push(y[0]);for(let O of y.slice(1))e.push({terms:[O],prefix:!1});b=!1;continue}let z=y[0],U=/[._-]/.test(z),S=z.replace(/-/g,"");for(let[O,_]of y.entries())e.push({terms:[_],prefix:X&&_.length>=2&&(O===y.length-1||U&&(_===z||_===S))})}let g=[...new Set(e.flatMap(v=>v.terms))];return{groups:e,not:i,phrases:o,strict:s,highlight:g,filters:r,notFilters:a,...Object.keys(l).length?{facets:l}:{},...Object.keys(c).length?{notFacets:c}:{}}}async function Js(n,t){let e=await t.meta(),i=typeof n=="string"?Bt(n,{facets:fn([e])}):n,o=await zi(i,e,t),s=qi(i,e);if(!i.groups.length)return $i(e,o,s);let r=[];for(let l of i.groups)r.push(await nr(l,e,t));let a=dn(r,e,o,s,"and").sort(Me);return a.length||i.strict?a:dn(r,e,o,s,"or").sort(Me)}var Me=(n,t)=>t.score-n.score;async function zi(n,t,e){let i=new Set;for(let o of n.not){let s;for(let r of o){let[a]=Bi(r,t),l=a?await e.shard(a):void 0,c=l&&Object.hasOwn(l,r)?l[r]:[],d=new Set;for(let u=0;u<c.length;u+=2)(!s||s.has(c[u]))&&d.add(c[u]);s=d}for(let r of s??[])i.add(r)}return i}function $i(n,t,e){if(!e)return[];let i=[];return n.docs.forEach(([o,s,r],a)=>e(a)&&!t.has(a)&&i.push({id:a,title:o,url:s,section:n.sections[r]??"",score:1})),i}function dn(n,t,e,i,o){let s=new Map,r=new Map;for(let l of n)for(let[c,d]of l)s.set(c,(s.get(c)??0)+d),r.set(c,(r.get(c)??0)+1);let a=[];for(let[l,c]of s){if(e.has(l)||i&&!i(l)||o==="and"&&r.get(l)!==n.length)continue;let[d,u,h]=t.docs[l];a.push({id:l,title:d,url:u,section:t.sections[h]??"",score:c*(r.get(l)/n.length)})}return a}var Et={prefix:.6,stem:.4,titleAll:1.5,titleExact:2,headingAll:1.4,headingExact:1.8,phrase:1.5,typo:.3};function tr(n,t){if(n===t)return!1;if(n.length===t.length){let s=[];for(let r=0;r<n.length&&s.length<=2;r++)n[r]!==t[r]&&s.push(r);return s.length===1?!0:s.length===2&&s[1]===s[0]+1&&n[s[0]]===t[s[1]]&&n[s[1]]===t[s[0]]}let[e,i]=n.length<t.length?[n,t]:[t,n];if(i.length-e.length!==1)return!1;let o=0;for(;o<e.length&&e[o]===i[o];)o++;return e.slice(o)===i.slice(o+1)}function Bi(n,t,e=!1){let i=er(t);for(let s=Math.min(n.length,Hi);s>=1;s--){let r=ln(n,s);if(i.has(r))return!e||s<n.length?[r]:[r,...t.shards.filter(a=>a.length>r.length&&a.startsWith(r)).slice(0,10)]}let o=ln(n,Math.min(n.length,Hi));return e?t.shards.filter(s=>s.startsWith(o)).slice(0,10):[]}var Hi=3,Fi=new WeakMap;function er(n){let t=Fi.get(n);return t||Fi.set(n,t=new Set(n.shards)),t}function hn(n){return n.replace(/"/g,"").trim().toLowerCase()}function qi(n,t){let{tag:e,section:i}=n.filters,o=n.notFilters??{tag:[],section:[]},s=Object.entries(n.facets??{}).filter(([,f])=>f.length),r=Object.entries(n.notFacets??{}).filter(([,f])=>f.length);if(!e.length&&!i.length&&!o.tag.length&&!o.section.length&&!s.length&&!r.length)return;let a=(f,v)=>new Set(f.flatMap((E,C)=>v.includes(hn(E))?[C]:[])),l=a(t.sections,i),c=a(t.tags??[],e),d=a(t.sections,o.section),u=a(t.tags??[],o.tag),h=f=>(t.facets??[]).findIndex(v=>v.name===f),m=f=>f.map(([v,E])=>{let C=h(v);return[C,C<0?new Set:a(t.facets[C].values,E)]}),b=m(s),g=m(r).filter(([f])=>f>=0),w=(f,[v,E])=>{var C;return v>=0&&(((C=f[4])==null?void 0:C[v])??[]).some(I=>E.has(I))};return f=>{let v=t.docs[f],E=v[3]??[];if(i.length&&!l.has(v[2])||e.length&&!E.some(C=>c.has(C))||d.has(v[2])||E.some(C=>u.has(C)))return!1;for(let C of b)if(!w(v,C))return!1;for(let C of g)if(w(v,C))return!1;return!0}}function fn(n){return[...new Set(n.flatMap(t=>((t==null?void 0:t.facets)??[]).map(e=>e.name)))]}function Ki(n,t){let e=Object.create(null),i=new Map,o=(s,r)=>{let a=`${s}\\0${hn(r)}`,l=i.get(a);l===void 0&&i.set(a,l=r);let c=e[s]??(e[s]=Object.create(null));c[l]=(c[l]??0)+1};for(let s of n){let r=typeof t=="function"?t(s):t,a=r==null?void 0:r.docs[s.id];if(a){r.sections[a[2]]&&o("section",r.sections[a[2]]);for(let l of new Set(a[3]??[]))r.tags[l]!==void 0&&o("tag",r.tags[l]);(a[4]??[]).forEach((l,c)=>{var u;let d=(u=r.facets)==null?void 0:u[c];if(d)for(let h of new Set(l))d.values[h]!==void 0&&o(d.name,d.values[h])})}}return e}async function nr(n,t,e){let i=await Vi(n,t,e,!0);return n.corrected=i.corrected.length?i.corrected:void 0,ji(i,un(t.count,i.docs.size))}function un(n,t){return Math.log(1+(n-t+.5)/(t+.5))}function ji(n,t){let e=new Map;for(let[i,o]of n.lists)for(let s=0;s<i.length;s+=2)e.set(i[s],Math.max(e.get(i[s])??0,i[s+1]*o*t));return e}async function Vi(n,t,e,i){let o=ge(t.lang),s=new Map,r=new Map;for(let d of n.terms)for(let u of Bi(d,t,n.prefix)){let h=await e.shard(u);if(!h)continue;let m=(f,v)=>{v>(s.get(f)??0)&&(s.set(f,v),r.set(f,h))};Object.hasOwn(h,d)&&m(d,1);let b=o==null?void 0:o(d),g=b?b.slice(0,Math.max(3,b.length-1)):void 0,w=0;for(let f in h)f!==d&&(n.prefix&&f.startsWith(d)&&w++<200&&m(f,Et.prefix),b&&g&&f.startsWith(g)&&o(f)===b&&m(f,Et.stem));if(i&&!s.size&&!n.exact&&d.length>=4&&!/[._-]/.test(d))for(let f in h)Math.abs(f.length-d.length)<=1&&tr(d,f)&&m(f,Et.typo)}let a=[...s].filter(([,d])=>d===Et.typo).map(([d])=>d),l=[...s].map(([d,u])=>[r.get(d)[d],u]),c=new Set;for(let[d]of l)for(let u=0;u<d.length;u+=2)c.add(d[u]);return{lists:l,docs:c,corrected:a}}var Ui=n=>typeof n=="function"?n:()=>n;async function Wi(n,t){let e=Ui(t),i=new Map;for(let o of n){let s=e(o),r=i.get(s);r||i.set(s,r=[]),r.push(o)}await Promise.all([...i].map(async([o,s])=>{var c;let r=await o.meta(),a=[...new Set(s.map(d=>Math.floor(d.id/r.block)))],l=new Map;await Promise.all(a.map(async d=>{try{l.set(d,await o.fragment(d))}catch{l.set(d,void 0)}}));for(let d of s)d.fragment??(d.fragment=(c=l.get(Math.floor(d.id/r.block)))==null?void 0:c[d.id%r.block])}))}async function Yi(n){let t=Ui(n),e=new Map;return async i=>{let o=t(i),s=e.get(o);if(!s){let r=ge((await o.meta()).lang);s=(a,l)=>l.terms.some(c=>a===c||l.prefix&&a.startsWith(c)||r!==void 0&&r(a)===r(c))||(l.corrected??[]).includes(a),e.set(o,s)}return s}}async function Gi(n,t,e,i=10){let o=t.slice(0,i);await Wi(o,e);let s=n.groups,r=await Yi(e);for(let a of o){let l=await r(a),[c,d]=a.fragment??["",[]],u=$t(a.title),h=1;s.length&&s.every(b=>u.some(g=>l(g,b)))&&(h=Pi(u,s,l)?Et.titleExact:Et.titleAll);let m=[];for(let[b,g]of d){let w=$t(b);!s.length||!s.every(f=>w.some(v=>l(v,f)))||(m.push([b,g]),h=Math.max(h,Pi(w,s,l)?Et.headingExact:Et.headingAll))}if(a.sections=m.slice(0,3),n.phrases.length){let b=[a.title,c,...d.map(([g])=>g)].map(g=>$t(g).join(" ")).join(" \\0 ");n.phrases.every(g=>b.includes(g))&&(h*=Et.phrase)}a.score*=h}return o.sort((a,l)=>l.score-a.score),[...o,...t.slice(i)]}async function Xi(n,t,e){await Wi(t,e);let i=await Yi(e);for(let o of t){if(!o.fragment||o.sections)continue;let s=await i(o);o.sections=o.fragment[1].filter(([r])=>{let a=$t(r);return n.groups.length>0&&n.groups.every(l=>a.some(c=>s(c,l)))}).slice(0,3)}}function Pi(n,t,e){return n.every(i=>t.some(o=>e(i,o)))&&t.every(i=>n.some(o=>e(o,i)))}async function Zi(n,t,e=10){let i=await t.meta(),o=Bt(n,{facets:fn([i])}),s=ge(i.lang);s&&(o.highlight=[...new Set([...o.highlight,...o.highlight.map(s).filter(a=>a.length>=3)])]);let r=await Js(o,t);return o.highlight=[...new Set([...o.highlight,...o.groups.flatMap(a=>a.corrected??[])])],{parsed:o,results:await Gi(o,r,t,e),facets:Ki(r,i)}}async function ir(n){return Promise.all(n.map(t=>t.data.meta().then(e=>e&&e.format===5?e:void 0,()=>{})))}async function or(n,t,e,i){let o=e,s=new Set,r=[],a=async(L,x)=>{if(!s.has(L))try{return await x()}catch(y){s.add(L),r.push({source:L,error:y});return}},l=t.flatMap((L,x)=>e[x]?[x]:[]),c=[];await Promise.all(l.map(async L=>c[L]=await a(L,()=>zi(n,o[L],t[L].data))??new Set));let d=[],u=[],h=(L,x)=>Promise.all(l.map(y=>a(y,()=>Vi(L,o[y],t[y].data,x)))),m=L=>L.every((x,y)=>!(x!=null&&x.docs.size)||s.has(l[y]));for(let L of n.groups){let x=await h(L,!1);u.push(m(x)),u[u.length-1]&&(x=await h(L,!0)),d.push(x)}for(let[L,x]of n.groups.entries())u[L]||!m(d[L])||(x.corrected=void 0,d[L]=await h(x,!0));if(l.length&&l.every(L=>s.has(L)))throw r[0].error;let b=l.filter(L=>!s.has(L)),g=[];for(let L of b)g[L]=qi(n,o[L]);let w=(L,x)=>L.map(y=>({...y,source:x,score:y.score*sr(t[x])})),f=L=>({results:rr(L,t),failed:[...s].sort((x,y)=>x-y),errors:r});if(!n.groups.length)return f(b.flatMap(L=>w($i(o[L],c[L],g[L]),L)).sort(Me));let v=t.map(()=>[]),E=b.reduce((L,x)=>L+o[x].count,0);n.groups.forEach((L,x)=>{let y=d[x],X=l.flatMap((S,O)=>s.has(S)?[]:[[S,y[O]]]),z=[...new Set(X.flatMap(([,S])=>S.corrected))];L.corrected=z.length?z:void 0;let U=X.reduce((S,[,O])=>S+O.docs.size,0);for(let[S,O]of X)v[S].push(ji(O,i.stats==="own"?un(o[S].count,O.docs.size):un(E,U)))});let C=L=>b.flatMap(x=>w(dn(v[x],o[x],c[x],g[x],L),x)).sort(Me),I=C("and");return f(I.length||n.strict?I:C("or"))}function sr(n){return typeof n.boost=="number"&&Number.isFinite(n.boost)&&n.boost>=0?n.boost:1}function rr(n,t){let e=new Map,i=[];for(let o of n){let s=t[o.source].collapse;if(s===void 0){i.push(o);continue}let r=`${s}\\0${o.url}`,a=e.get(r);a?(a.others??(a.others=[])).push({source:o.source,id:o.id,url:o.url,score:o.score}):(e.set(r,o),i.push(o))}return i}async function Qi(n,t,e=10,i={}){let o=await ir(t),s=Bt(n,{facets:fn(o)}),r=t.flatMap((u,h)=>o[h]?[]:[h]);for(let u of new Set(o.flatMap(h=>h?[h.lang]:[]))){let h=ge(u);h&&(s.highlight=[...new Set([...s.highlight,...s.highlight.map(h).filter(m=>m.length>=3)])])}let{results:a,failed:l,errors:c}=await or(s,t,o,i);for(let u of l)r.includes(u)||r.push(u);r.sort((u,h)=>u-h),s.highlight=[...new Set([...s.highlight,...s.groups.flatMap(u=>u.corrected??[])])];let d=Ki(a,u=>o[u.source]);return{parsed:s,results:await Gi(s,a,u=>t[u.source].data,e),missing:r,facets:d,errors:c}}function pn(n,t,e=globalThis){var m,b;let i=((m=e.document)==null?void 0:m.baseURI)??((b=e.location)==null?void 0:b.href),o=_i(n,i),s=e.__DOGSBAY_SEARCH__??{q:[],load(){}},r=s.stores??(s.stores=new Map),a=r.get(o)??new Map;r.set(o,a);let l=(g,w,f)=>{let v;if(f){let E="",C=_i(f,i);for(let I of r.keys())C.startsWith(I)&&I.length>E.length&&(E=I);v=E?r.get(E):void 0}!v&&r.size===1&&(v=a),v?v.set(g,w):s.q.push([g,w,f])},c=s.q;s.q=[],s.load=l;for(let[g,w,f]of c)l(g,w,f);e.__DOGSBAY_SEARCH__=s;let d=async(g,w)=>(a.has(g)||await t(n+w),a.get(g)),u,h={meta:()=>u??(u=d(Oe.docs,Te.docs).then(g=>{if(!g||g.format!==5)throw new Error(`search index format ${(g==null?void 0:g.format)??"missing"}, expected ${5}: rebuild the site`);return g}).catch(g=>{throw u=void 0,g})),shard:async g=>(await h.meta()).shards.includes(g)?d(Oe.shard(g),Te.shard(g)):void 0,fragment:g=>d(Oe.fragment(g),Te.fragment(g))};return h}function _i(n,t){try{return new URL(n,t).href}catch{return n}}function Ji(n){let t,e=new URL(n||"./",location.href).pathname;return async i=>{t??(t=import(new URL(`${n}pagefind/pagefind.js`,location.href).href).catch(u=>{throw t=void 0,u}));let o=i.replace(new RegExp(\'(?<!\\\\S)-?(tag|section):("[^"]*"?|\\\\S*)\',"gi")," ").trim(),s=o?await(await t).search(o):null,r=(s==null?void 0:s.results)??[],a=async(u,h)=>{let m=await u.data(),b=m.url.startsWith(e)?m.url.slice(e.length):m.url.replace(/^\\/+/,""),g=(m.sub_results??[]).map(w=>[w.title,w.url.split("#")[1]??""]).filter(([,w])=>w);return{id:h,title:m.meta.title??b,url:b,section:"",score:r.length-h,fragment:[ar(m.excerpt),g],sections:g.slice(0,3)}},l=await Promise.all(r.slice(0,10).map(a)),c=Promise.all(r.slice(10,30).map((u,h)=>a(u,h+10)));return c.catch(()=>{}),{results:l,more:c,later:(u,h)=>Promise.all(r.slice(u,u+h).map((m,b)=>a(m,u+b))),total:r.length,highlight:Bt(i).highlight}}}function ar(n){return new DOMParser().parseFromString(n,"text/html").body.textContent??""}function to(n,t){let e=(n==null?void 0:n.units)??[],i=e.find(f=>f.prefix===t);if(!i)return{};let o=f=>f.product??"",s=f=>{var v;return((v=n==null?void 0:n.products)==null?void 0:v[f])??{versions:n==null?void 0:n.versions,defaultVersion:n==null?void 0:n.defaultVersion}},r=f=>{var v;return(v=s(o(f)).versions)==null?void 0:v.find(E=>E.id===f.version)},a=f=>{var v,E;return((E=(v=n==null?void 0:n.products)==null?void 0:v[f])==null?void 0:E.label)??(f||(n==null?void 0:n.name)||"")},l=f=>{var v;return[o(f)!==o(i)?a(o(f)):"",f.version!==void 0?((v=r(f))==null?void 0:v.label)??f.version:""].filter(Boolean).join(" \\xB7 ")},c=f=>({prefix:f.prefix,product:o(f),label:l(f),own:f===i,versioned:f.version!==void 0}),d=e.filter(f=>f.locale===i.locale),u=s(o(i)),h=(u.versions??[]).map(f=>f.id),m=f=>{var v;return f===i?-2:f.version===u.defaultVersion?-1:(v=r(f))!=null&&v.prerelease?h.length+h.indexOf(f.version):h.indexOf(f.version)},b=d.filter(f=>{var v;return o(f)===o(i)&&f.version!==void 0&&(f===i||!((v=r(f))!=null&&v.hidden))}).sort((f,v)=>m(f)-m(v)),g=[];for(let f of d){let v=o(f);if(g.some(I=>o(I)===v))continue;if(v===o(i)){g.push(i);continue}let E=d.filter(I=>o(I)===v),C=s(v).defaultVersion;g.push(E.find(I=>I.version===C)??E.find(I=>{var L;return!((L=r(I))!=null&&L.hidden)})??E[0])}let w={};return b.length>1&&(w.versions=b.map(c)),g.length>1&&(w.products=g.map(c)),(w.versions||w.products)&&(w.version=[c(i)]),w}var eo=1.5;function no(n,t){var s,r;let e={},i=(s=n.docs[t])==null?void 0:s[3];i!=null&&i.length&&(e.tag=i.map(a=>n.tags[a]).filter(a=>typeof a=="string"));let o=(r=n.docs[t])==null?void 0:r[4];return!o||!n.facets||n.facets.forEach((a,l)=>{let c=o[l];c!=null&&c.length&&(e[a.name]=c.map(d=>a.values[d]).filter(d=>typeof d=="string"))}),e}var xt=n=>n.trim().toLowerCase();function io(n,t,e){for(let[i,o]of Object.entries(t)){if(i===e||!o.length)continue;let s=new Set((n[i]??[]).map(xt));if(!o.some(r=>s.has(xt(r))))return!1}return!0}function oo(n,t,e){return n.filter(i=>io(t(i),e))}function so(n,t,e,i){var s;let o={};for(let r of i){let a={},l=new Map;for(let c of n){let d=t(c);if(!((s=d[r])!=null&&s.length)||!io(d,e,r))continue;let u=new Set;for(let h of d[r]){if(u.has(xt(h)))continue;u.add(xt(h));let m=l.get(xt(h))??(l.set(xt(h),h),h);a[m]=(a[m]??0)+1}}for(let c of e[r]??[])l.has(xt(c))||(a[c]=0);Object.keys(a).length&&(o[r]=a)}return o}function ro(n,t){let e={};for(let i of n.getAll("filter")){let o=i.indexOf(":");if(o<=0)continue;let s=i.slice(0,o),r=i.slice(o+1);!t.includes(s)||!r||(e[s]??(e[s]=[])).some(a=>xt(a)===xt(r))||e[s].push(r)}return e}function lr(n,t,e){var s;if(n.length===0)return"";let i=n.join("/"),o=e==null?void 0:e[i];if(o&&o.length>0)return o;if(n.length===1){let r=(s=t==null?void 0:t[n[0]])==null?void 0:s.label;if(r&&r.length>0)return r}return n[n.length-1]}function ao(n){if(!n)return{};let t={};for(let[e,i]of Object.entries(n)){let o=cr(Object.entries(i).map(([s,r])=>({value:s,count:r})));o.length>0&&(t[e]=o)}return t}function cr(n){return[...n].sort((t,e)=>t.count!==e.count?e.count-t.count:t.value.localeCompare(e.value))}function ne(n,t,e){let i=e==null?void 0:e[n],o=t.split("/").filter(s=>s.length>0);return lr(o,i==null?void 0:i.prefixes,i==null?void 0:i.labels)}function lo(n,t){let e=i=>{var s;let o=(s=t==null?void 0:t[i])==null?void 0:s.order;return typeof o=="number"?o:void 0};return[...n].sort((i,o)=>{let s=e(i),r=e(o);return s!==void 0&&r!==void 0?s!==r?s-r:i.localeCompare(o):s!==void 0?-1:r!==void 0?1:i.localeCompare(o)})}function co(n,t,e){let i={...n},o=i[t]??[];if(o.includes(e)){let s=o.filter(r=>r!==e);s.length===0?delete i[t]:i[t]=s}else i[t]=[...o,e];return i}function uo(n){let t=0;for(let e of Object.values(n))t+=e.length;return t}function ho(n,t,e={}){if(t.length===0)return[];if(t.some(o=>o.value.includes("/"))){let o=e.nav?ur(e.nav,new Set(t.map(s=>s.value))):void 0;return dr(n,t,e.display,o)}return hr(n,t,e.nav,e.display)}function dr(n,t,e,i){let o=new Map,s=[];for(let c of t){let d=c.value.split("/").filter(m=>m.length>0);if(d.length===0)continue;let u="",h=null;for(let m=0;m<d.length;m++){u=u?`${u}/${d[m]}`:d[m];let b=o.get(u);b||(b={value:u,label:ne(n,u,e),count:0,depth:m,hasValue:!1,children:[]},o.set(u,b),h?h.children.push(b):s.push(u)),m===d.length-1&&(b.count=c.count,b.hasValue=!0),h=b}}let r=(c,d)=>{if(i){let u=i.get(c.value),h=i.get(d.value);if(u!==void 0&&h!==void 0&&u!==h)return u-h;if(u!==void 0&&h===void 0)return-1;if(u===void 0&&h!==void 0)return 1}return c.count!==d.count?d.count-c.count:c.value.localeCompare(d.value)},a=c=>{if(c.children.length!==0){c.children.sort(r);for(let d of c.children)a(d)}},l=s.map(c=>o.get(c));l.sort(r);for(let c of l)a(c);return l}function ur(n,t){let e=new Map,i=0,o=s=>{for(let r of s){if(r.href){let a=fo(r.href);for(let l=0;l<a.length;l++){let c=a[l];if(!t.has(c))continue;let d="";for(let u=l;u<a.length;u++)d=d?`${d}/${a[u]}`:a[u],t.has(d)&&!e.has(d)&&e.set(d,i++);break}}r.children&&r.children.length>0&&o(r.children)}};return o(n),e}function hr(n,t,e,i){let o=new Map;for(let h of t)o.set(h.value,h);if(!e||e.length===0)return t.map(h=>({value:h.value,label:ne(n,h.value,i),count:h.count,depth:0,hasValue:!0,children:[]}));let s=new Set,r=[],a=new Map,l=h=>{if(h.length===0)return;let m=r,b=a;for(let g=0;g<h.length;g++){let w=h[g],f=b.get(w);if(!f){let E=o.get(w);f={value:w,label:ne(n,w,i),count:E?E.count:0,depth:g,hasValue:E!==void 0,children:[]},m.push(f),b.set(w,f),E&&s.add(w)}let v=c.get(f);v||(v=new Map,c.set(f,v)),m=f.children,b=v}},c=new Map,d=h=>{for(let m of h){if(m.href){let b=fo(m.href);l(b)}m.children&&m.children.length>0&&d(m.children)}};d(e);let u=[];for(let h of t)s.has(h.value)||u.push({value:h.value,label:ne(n,h.value,i),count:h.count,depth:0,hasValue:!0,children:[]});return u.sort((h,m)=>h.value.localeCompare(m.value)),[...r,...u]}function fo(n){let t=n;try{/^[a-z]+:\\/\\//i.test(n)&&(t=new URL(n).pathname)}catch{}t=t.split("#")[0].split("?")[0];let e=t.split("/").filter(i=>i.length>0);return e.length<2?[]:e.slice(0,-1)}var fr=6e4,pr=30,Ie=20,mr=["version","versions","products"];function mo(n){let{signal:t}=n,e=document.getElementById("db-search");if(!e)return;let i=e.querySelector("[data-db-search-input]"),o=e.querySelector("[data-part=\'listbox\']"),s=e.querySelector("[data-db-search-status]"),r=bo(n,{input:i,list:o,status:s,page:!1});e.addEventListener("db-dialog:open",()=>{i.focus(),i.select(),r.activate()},{signal:t}),document.addEventListener("keydown",a=>{let l=a.target.closest("input, textarea, select, [contenteditable]");if(a.key==="/"&&!l||a.key.toLowerCase()==="k"&&(a.metaKey||a.ctrlKey)){a.preventDefault();let c=document.querySelector("[data-db-search-page] [data-db-search-input]");c&&!e.open?c.focus():e.open?i.focus():e.show()}},{signal:t}),e.addEventListener("click",a=>{a.target.closest("a")&&e.close("api")},{signal:t})}function go(n){var d;let t=document.querySelector("[data-db-search-page]");if(!t)return;let e=t.querySelector("[data-db-search-input]"),i=t.querySelector("[data-db-search-list]"),o=t.querySelector("[data-db-search-status]"),s=gr(),r=s.get("p")||void 0,a=s.get("v")||void 0,l=s.get("scope")??(s.get("q")?"version":void 0),c=bo(n,{input:e,list:i,status:o,page:!0,params:s,scope:l,forward:r!==void 0||a!==void 0?{product:r,version:a}:void 0});(d=t.querySelector("form"))==null||d.addEventListener("submit",u=>u.preventDefault(),{signal:n.signal}),e.value=s.get("q")??"",c.activate(),e.value.trim()&&c.run()}function gr(){let n=new URLSearchParams(location.search);if(location.hash.includes("="))for(let[t,e]of new URLSearchParams(location.hash.slice(1)))n.has(t)||n.set(t,e);return n}var po=()=>!location.search&&location.hash.includes("=");function bo(n,{input:t,list:e,status:i,page:o,scope:s,forward:r,params:a}){var En;let{signal:l}=n,c=i.textContent??"",d=pn(`${n.unitRoot}_dogsbay/search/`,n.loadScript,window),u=document.body.dataset.search??"builtin",h=location.protocol!=="file:",m=u==="pagefind"||u==="both"&&h?Ji(n.unitRoot):void 0,b=u==="pagefind"&&!h,g=n.siteRoot??"",w=n.prefix??"",f={},v="version",E,C=`db-search-scope:${new URL(g||"./",location.href).pathname}`,I=()=>{let A=window.__DOGSBAY_SITE__;if(r&&A&&L(A)||(r=void 0,m))return;f=to(A,w);let T=s??mn(()=>sessionStorage.getItem(C)),k=v;T&&Object.prototype.hasOwnProperty.call(f,T)&&(v=T),Dt(),v!==k&&t.value.trim()&&jt(++$)},L=A=>{var j,W;let T=A.units??[],k=T.find(q=>q.prefix===w);if(!k)return!1;let N=r.product??k.product??"",M=T.filter(q=>q.locale===k.locale&&(q.product??"")===N),D=((W=(j=A.products)==null?void 0:j[N])==null?void 0:W.defaultVersion)??A.defaultVersion,H=r.version!==void 0?M.find(q=>q.version===r.version||q.prefix&&q.prefix.split("/").pop()===r.version):M.find(q=>q===k)??M.find(q=>q.version===D)??M[0];if(!H||H.prefix===w||!H.search)return!1;let P=new URLSearchParams(a);P.delete("p"),P.delete("v");let R=P.toString();return location.replace(`${y(H.prefix)}${H.search}${R?po()?`#${R}`:`?${R}`:""}`),!0},x=()=>E??(E=n.loadScript(`${g}_dogsbay/site.js`).then(I,I)),y=A=>`${g}${A?`${A}/`:""}`,X=new Map([[w,d]]),z=A=>{let T=X.get(A);return T||X.set(A,T=pn(`${y(A)}_dogsbay/search/`,n.loadScript,window)),T},U=new Map,S=((En=o?e.closest("[data-db-search-page]"):e.closest("dialog"))==null?void 0:En.querySelector("[data-db-search-facets]"))??void 0,O=(()=>{try{return JSON.parse(e.dataset.facets??"{}")}catch{return{}}})(),_=S?Object.keys(O):[],B=o&&a?ro(a,_):{},F=()=>{r&&x(),b?i.textContent=e.dataset.needsServer??"":m||(d.meta().catch(()=>i.textContent="Search index could not be loaded."),x())},$=0,K,J;t.addEventListener("input",()=>{clearTimeout(J),J=setTimeout(()=>void jt(++$),80)},{signal:l});let nt=new Map,it=typeof IntersectionObserver=="function"?new IntersectionObserver(A=>{var T;for(let k of A)k.isIntersecting&&((T=nt.get(k.target))==null||T(),nt.delete(k.target),it.unobserve(k.target))}):void 0,Kt=A=>{if(!o||r)return;let T=new URLSearchParams;A&&T.set("q",A),v!=="version"&&T.set("scope",v);for(let[M,D]of Object.entries(B))for(let H of D)T.append("filter",`${M}:${H}`);let k=T.toString(),N=po();mn(()=>history.replaceState(history.state,"",`${location.pathname}${k?N?`${location.search}#${k}`:`?${k}`:""}`))},jt=async A=>{let T=t.value.trim();if(Kt(T),!T){it==null||it.disconnect(),nt.clear(),rt.hidden=!0,S&&(S.hidden=!0),Rt=void 0,e.replaceChildren(),lt.hidden=at.hidden=!0,i.textContent=c;return}if(!b){Rt=void 0;try{if(m){let k=await m(T);if(A!==$)return;if(o){let N=await k.more;if(A!==$)return;ye(T,[...k.results,...N].slice(0,Ie),k.highlight,k.total,k.later)}else{ye(T,k.results,k.highlight,k.total);let N=await k.more;A===$&&N.length&&Ao(T,N,k.highlight)}}else if(v!=="version"&&f[v]){let k=Date.now(),N=f[v],M=N.filter(R=>R.own||k-(U.get(R.prefix)??-1/0)>fr),D=await Qi(T,M.map(R=>({data:z(R.prefix),boost:R.own?eo:1,collapse:R.product})));for(let R of D.missing)U.set(M[R].prefix,Date.now());if(A!==$)return;K=D.parsed;let H=D.results.map(R=>{var W;let j=M[R.source];return Object.assign(R,{base:y(j.prefix),from:j.own?void 0:j.label,also:(W=R.others)==null?void 0:W.map(q=>M[q.source].label).filter(Boolean),data:z(j.prefix)})}),P=D.missing.length+N.length-M.length;await ve(A,T,H,D.parsed.highlight,P?` \\xB7 ${(e.dataset.unavailable??"{n}").replace("{n}",String(P))}`:"")}else{let k=await Zi(T,d);if(A!==$)return;K=k.parsed,await ve(A,T,k.results,k.parsed.highlight,"")}}catch{if(A!==$)return;i.textContent="Search index could not be loaded.",S&&(S.hidden=!0)}}},rt=document.createElement("div");rt.setAttribute("role","group"),rt.setAttribute("aria-label",e.dataset.filterSection??"Filter by section"),rt.className=o?"flex flex-wrap gap-1 pb-3":"flex flex-wrap gap-1 px-3 pb-2",rt.hidden=!0,e.before(rt);let ot=document.createElement("div");ot.setAttribute("role","group"),ot.setAttribute("aria-label",e.dataset.scope??"Search in"),ot.className=o?"flex flex-wrap items-center gap-1 pb-3":"flex flex-wrap items-center gap-1 px-3 pb-2",ot.hidden=!0,rt.before(ot);let at=document.createElement("a");at.className="mx-3 mb-2 mt-1 block rounded-md px-3 py-2 text-center text-sm font-medium hover:bg-accent",at.dataset.dbSearchSeeAll="",at.hidden=!0;let lt=document.createElement("button");lt.type="button",lt.className="mt-4 rounded-md border px-3 py-1.5 text-sm hover:bg-accent",lt.textContent=e.dataset.more??"More results",lt.hidden=!0,e.after(o?lt:at);let Dt=()=>{var k,N;let A=mr.filter(M=>f[M]),T={version:((N=(k=f.version)==null?void 0:k[0])==null?void 0:N.versioned)===!1?e.dataset.scopeProduct:e.dataset.scopeVersion,versions:e.dataset.scopeVersions,products:e.dataset.scopeProducts};ot.replaceChildren(...A.map(M=>{let D=document.createElement("button");return D.type="button",D.dataset.scope=M,D.setAttribute("aria-pressed",String(M===v)),D.className="rounded-md border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",D.textContent=T[M]??M,D.addEventListener("click",()=>{var H;v!==M&&(v=M,mn(()=>sessionStorage.setItem(C,M)),Dt(),(H=ot.querySelector(`[data-scope="${M}"]`))==null||H.focus(),t.value.trim()?jt(++$):Kt(""))},{signal:l}),D})),ot.hidden=A.length<2};l==null||l.addEventListener("abort",()=>{clearTimeout(J),$++,it==null||it.disconnect(),nt.clear(),rt.remove(),ot.remove(),at.remove(),lt.remove()});let Vt=A=>A.replace(/"/g,""),$e=A=>`section:"${Vt(A)}"`,St,se=(A,T)=>{let k=new Map;for(let H of T)H.section&&k.set(H.section,(k.get(H.section)??0)+1);let N=[...A.matchAll(/section:"([^"]*)"/gi)].map(H=>H[1].toLowerCase()),M=H=>N.includes(Vt(H).toLowerCase()),D=[...k].sort((H,P)=>P[1]-H[1]).slice(0,6).map(([H])=>H);for(let H of N)D.some(P=>Vt(P).toLowerCase()===H)||D.push(H);rt.replaceChildren(...D.length>1||N.length?D.map(H=>{let P=document.createElement("button");P.type="button";let R=M(H);return P.setAttribute("aria-pressed",String(R)),P.className="rounded-full border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",P.textContent=H,P.addEventListener("click",()=>{let j=$e(H),W=t.value.replace(new RegExp(`\\\\s*section:"${Vt(H).replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}"`,"i"),"").trim();t.value=R?W:`${W} ${j}`.trim(),St=H,t.dispatchEvent(new Event("input",{bubbles:!0}))},{signal:l}),P}):[]),rt.hidden=!rt.childElementCount,St!==void 0&&(([...rt.querySelectorAll("button")].find(P=>P.textContent===St)??t).focus(),St=void 0)},Rt,ve=async(A,T,k,N,M)=>{if(!_.length){ye(T,k,N,k.length),i.textContent+=M;return}let D=new Map;for(let P of k){let R=P.data??d;D.has(R)||D.set(R,await R.meta())}if(A!==$)return;let H=new Map(k.map(P=>[P,no(D.get(P.data??d),P.id)]));Rt={q:T,results:k,terms:N,note:M,valuesOf:P=>H.get(P)??{}},Mt()},Mt=()=>{if(!Rt)return;let{q:A,results:T,terms:k,note:N,valuesOf:M}=Rt,D=oo(T,M,B);Be(so(T,M,B,_)),ye(A,D,k,D.length),i.textContent+=N},At,Be=A=>{var H,P;if(!S)return;let T=lo(Object.keys(A),O);if(S.hidden=!T.length,!T.length)return S.replaceChildren();let k=(R,j,W,q)=>{let V=document.createElement("label");V.className="flex cursor-pointer items-center gap-2 rounded-md px-2 py-1 hover:bg-accent";let tt=document.createElement("input");tt.type="checkbox",tt.dataset.facetName=R,tt.dataset.facetValue=j,tt.checked=(B[R]??[]).some(Co=>Co.toLowerCase()===j.toLowerCase()),tt.className="size-3.5 rounded border-border accent-primary";let bt=document.createElement("span");bt.className="flex-1 truncate",bt.textContent=W;let Ke=document.createElement("span");return Ke.className="text-xs text-muted-foreground",Ke.textContent=String(q),V.append(tt,bt,Ke),V},N=(R,j)=>{let W=document.createElement("ul");W.className="space-y-0.5";for(let q of j){let V=document.createElement("li");if(q.hasValue)V.append(k(R,q.value,q.label,q.count));else{let tt=document.createElement("span");tt.className="block px-2 py-1 text-muted-foreground",tt.textContent=q.label,V.append(tt)}if(q.children.length){let tt=N(R,q.children);tt.classList.add("ml-4"),V.append(tt)}W.append(V)}return W},M=[],D=uo(B);if(D){let R=document.createElement("button");R.type="button",R.dataset.clearFilters="",R.className="mb-3 w-full rounded-md border border-border px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",R.textContent=(e.dataset.facetsClear??"Clear all ({n})").replace("{n}",String(D)),M.push(R)}for(let R of T){let j=ao({[R]:A[R]})[R]??[],W=document.createElement("fieldset");W.className="mb-3";let q=document.createElement("legend");if(q.className="mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground",q.textContent=((H=O[R])==null?void 0:H.title)??R,W.append(q),(P=O[R])!=null&&P.hierarchical||j.some(V=>V.value.includes("/")))W.append(N(R,ho(R,j,{display:O})));else{let V=document.createElement("ul");V.className="space-y-0.5";for(let tt of j){let bt=document.createElement("li");bt.append(k(R,tt.value,ne(R,tt.value,O),tt.count)),V.append(bt)}W.append(V)}M.push(W)}S.replaceChildren(...M),At!==void 0&&(((At?[...S.querySelectorAll("input[data-facet-name]")].find(j=>`${j.dataset.facetName}\\0${j.dataset.facetValue}`===At):S.querySelector("[data-clear-filters]"))??t).focus(),At=void 0)};S==null||S.addEventListener("change",A=>{let T=A.target;if(!T.dataset.facetName)return;let k=T.dataset.facetName,N=T.dataset.facetValue,M=(B[k]??[]).find(D=>D.toLowerCase()===N.toLowerCase());B=co(B,k,M??N),At=`${k}\\0${N}`,Kt(t.value.trim()),Mt()},{signal:l}),S==null||S.addEventListener("click",A=>{A.target.closest("[data-clear-filters]")&&(B={},At="",Kt(t.value.trim()),Mt())},{signal:l});let ct,ye=(A,T,k,N,M)=>{it==null||it.disconnect(),nt.clear(),se(A,T);let D=T.slice(0,o?Ie:pr);if(ct={q:A,results:T,terms:k,shown:D.length,total:N,later:M},e.replaceChildren(...qe(A,D,k)),i.textContent=N?`${N} result${N===1?"":"s"}`:`${e.dataset.noResults} \\u201C${A}\\u201D`,lt.hidden=!o||!yn(),at.hidden=o||!N||!e.dataset.searchPage,!at.hidden){let H=new URLSearchParams({q:A});v!=="version"&&H.set("scope",v);for(let[P,R]of Object.entries(B))for(let j of R)H.append("filter",`${P}:${j}`);at.href=`${e.dataset.searchPage}?${H}`,at.textContent=(e.dataset.seeAll??"See all {n} results").replace("{n}",String(N))}},Ao=(A,T,k)=>e.append(...qe(A,T,k)),yn=()=>!!ct&&(ct.results.length>ct.shown||!!ct.later&&ct.shown<ct.total);lt.addEventListener("click",async()=>{var N,M;let A=ct;if(!A)return;let T=A.results.slice(A.shown,A.shown+Ie);if(!T.length&&A.later){if(T=await A.later(A.shown,Ie).catch(()=>[]),A!==ct)return;A.results.push(...T)}let k=qe(A.q,T,A.terms);e.append(...k),A.shown+=T.length,lt.hidden=!T.length||!yn(),(M=(N=k[0])==null?void 0:N.querySelector("a"))==null||M.focus()},{signal:l});let qe=(A,T,k)=>{var M;let N=[];for(let D of T){let H=D.base??n.unitRoot,P=wn(H,D.url,k,"block rounded-md p-3 hover:bg-accent"),R=document.createElement("div");R.className="font-medium",R.append(...gn(D.title,k)),P.a.appendChild(R);let j=[D.from,D.section].filter(Boolean).join(" \\xB7 ");if(j){let V=document.createElement("div");V.className="text-xs text-muted-foreground",V.textContent=j,P.a.appendChild(V)}let W=document.createElement("div");if(W.className="mt-1 line-clamp-2 text-xs text-muted-foreground",P.a.appendChild(W),(M=D.also)!=null&&M.length){let V=document.createElement("div");V.className="mt-1 text-xs text-muted-foreground",V.textContent=`${e.dataset.alsoIn??"Also in"} ${D.also.join(", ")}`,P.a.appendChild(V)}N.push(P.li);let q=()=>D.fragment?(D.fragment[0]&&W.replaceChildren(...gn(D.fragment[0],k)),(D.sections??[]).map(([V,tt])=>{let bt=wn(H,`${D.url}#${tt}`,k,"ml-4 block rounded-md border-l px-3 py-1.5 text-sm hover:bg-accent");return bt.a.append(...gn(V,k)),bt.li})):[];if(D.fragment)N.push(...q());else if(it){let V=K??Bt(A);nt.set(P.li,()=>void Xi(V,[D],D.data??d).then(()=>P.li.after(...q()),()=>{})),it.observe(P.li)}}return N},wn=(A,T,k,N)=>{let M=document.createElement("li");o||M.setAttribute("role","none"),M.className="mb-1";let D=document.createElement("a");return o||(D.setAttribute("data-part","option"),D.dataset.value=T,D.tabIndex=-1),D.href=br(A+T,k),D.className=N,M.appendChild(D),{li:M,a:D}};return{activate:F,run:()=>void jt(++$)}}function mn(n){try{return n()}catch{return}}function br(n,t){if(!t.length)return n;let e=n.indexOf("#"),[i,o]=e<0?[n,""]:[n.slice(0,e),n.slice(e)];return`${i}${i.includes("?")?"&":"?"}h=${encodeURIComponent(t.join(" "))}${o}`}function gn(n,t){if(!t.length)return[document.createTextNode(n)];let e=new RegExp(`(${t.map(i=>i.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")).join("|")})`,"gi");return n.split(e).map((i,o)=>{if(o%2===0)return document.createTextNode(i);let s=document.createElement("mark");return s.textContent=i,s})}var vo=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u;function yo(n){var g;let t;try{t=(new URLSearchParams(location.search).get("h")??"").split(/\\s+/).filter(w=>w.length>0)}catch{return}let e=document.querySelector("#db-content article")??document.querySelector("#db-content");if(!t.length||!e)return;let i=w=>w.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&"),o=[...t].sort((w,f)=>f.length-w.length),s=o.filter(w=>vo.test(w)).map(i),r=o.filter(w=>!vo.test(w)).map(i),a=[r.length?`(?<![\\\\p{L}\\\\p{N}])(?:${r.join("|")})`:"",s.length?`(?:${s.join("|")})`:""].filter(Boolean),l=new RegExp(`(${a.join("|")})`,"giu"),c=[],d=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:w=>{var f;return(f=w.parentElement)!=null&&f.closest("script, style, mark, button, [aria-hidden=\'true\']")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),u=[];for(let w=d.nextNode();w;w=d.nextNode())u.push(w);for(let w of u){if(c.length>=500)break;let f=w.data;if(l.lastIndex=0,!l.test(f))continue;l.lastIndex=0;let v=document.createDocumentFragment(),E=0;for(let C of f.matchAll(l)){v.append(f.slice(E,C.index));let I=document.createElement("mark");I.className="db-search-hl",I.textContent=C[0],v.append(I),c.push(I),E=C.index+C[0].length}v.append(f.slice(E)),w.replaceWith(v)}if(vr(),!c.length)return;let h=((g=document.querySelector("[data-clear-highlights]"))==null?void 0:g.dataset.clearHighlights)??"Clear highlights",m=document.createElement("div");m.className="not-prose mb-4";let b=document.createElement("button");b.type="button",b.className="inline-flex h-8 items-center rounded-md border px-3 text-sm hover:bg-accent",b.textContent=h,b.addEventListener("click",()=>{var w;for(let f of c)f.replaceWith(document.createTextNode(f.textContent??""));e.normalize(),m.remove(),(w=document.getElementById("db-content"))==null||w.focus({preventScroll:!0})},{signal:n}),m.append(b),e.prepend(m),location.hash||c[0].scrollIntoView({block:"center"})}function vr(){try{let n=new URL(location.href);n.searchParams.delete("h"),history.replaceState(history.state,"",n.toString())}catch{}}var qt=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},Ne=function(t){return t.tagName==="IMG"},yr=function(t){return NodeList.prototype.isPrototypeOf(t)},He=function(t){return t&&t.nodeType===1},wo=function(t){var e=t.currentSrc||t.src;return e.substr(-4).toLowerCase()===".svg"},Eo=function(t){try{return Array.isArray(t)?t.filter(Ne):yr(t)?[].slice.call(t).filter(Ne):He(t)?[t].filter(Ne):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(Ne):[]}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`)}},wr=function(t){var e=document.createElement("div");return e.classList.add("medium-zoom-overlay"),e.style.background=t,e},Er=function(t){var e=t.getBoundingClientRect(),i=e.top,o=e.left,s=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=i+l+"px",a.style.left=o+c+"px",a.style.width=s+"px",a.style.height=r+"px",a.style.transform="",a},ie=function(t,e){var i=qt({bubbles:!1,cancelable:!1,detail:void 0},e);if(typeof window.CustomEvent=="function")return new CustomEvent(t,i);var o=document.createEvent("CustomEvent");return o.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),o},xr=function n(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=window.Promise||function(S){function O(){}S(O,O)},o=function(S){var O=S.target;if(O===X){b();return}E.indexOf(O)!==-1&&g({target:O})},s=function(){if(!(I||!y.original)){var S=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(L-S)>x.scrollOffset&&setTimeout(b,150)}},r=function(S){var O=S.key||S.keyCode;(O==="Escape"||O==="Esc"||O===27)&&b()},a=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=S;if(S.background&&(X.style.background=S.background),S.container&&S.container instanceof Object&&(O.container=qt({},x.container,S.container)),S.template){var _=He(S.template)?S.template:document.querySelector(S.template);O.template=_}return x=qt({},x,O),E.forEach(function(B){B.dispatchEvent(ie("medium-zoom:update",{detail:{zoom:z}}))}),z},l=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return n(qt({},x,S))},c=function(){for(var S=arguments.length,O=Array(S),_=0;_<S;_++)O[_]=arguments[_];var B=O.reduce(function(F,$){return[].concat(F,Eo($))},[]);return B.filter(function(F){return E.indexOf(F)===-1}).forEach(function(F){E.push(F),F.classList.add("medium-zoom-image")}),C.forEach(function(F){var $=F.type,K=F.listener,J=F.options;B.forEach(function(nt){nt.addEventListener($,K,J)})}),z},d=function(){for(var S=arguments.length,O=Array(S),_=0;_<S;_++)O[_]=arguments[_];y.zoomed&&b();var B=O.length>0?O.reduce(function(F,$){return[].concat(F,Eo($))},[]):E;return B.forEach(function(F){F.classList.remove("medium-zoom-image"),F.dispatchEvent(ie("medium-zoom:detach",{detail:{zoom:z}}))}),E=E.filter(function(F){return B.indexOf(F)===-1}),z},u=function(S,O){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return E.forEach(function(B){B.addEventListener("medium-zoom:"+S,O,_)}),C.push({type:"medium-zoom:"+S,listener:O,options:_}),z},h=function(S,O){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return E.forEach(function(B){B.removeEventListener("medium-zoom:"+S,O,_)}),C=C.filter(function(B){return!(B.type==="medium-zoom:"+S&&B.listener.toString()===O.toString())}),z},m=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=S.target,_=function(){var F={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},$=void 0,K=void 0;if(x.container)if(x.container instanceof Object)F=qt({},F,x.container),$=F.width-F.left-F.right-x.margin*2,K=F.height-F.top-F.bottom-x.margin*2;else{var J=He(x.container)?x.container:document.querySelector(x.container),nt=J.getBoundingClientRect(),it=nt.width,Kt=nt.height,jt=nt.left,rt=nt.top;F=qt({},F,{width:it,height:Kt,left:jt,top:rt})}$=$||F.width-x.margin*2,K=K||F.height-x.margin*2;var ot=y.zoomedHd||y.original,at=wo(ot)?$:ot.naturalWidth||$,lt=wo(ot)?K:ot.naturalHeight||K,Dt=ot.getBoundingClientRect(),Vt=Dt.top,$e=Dt.left,St=Dt.width,se=Dt.height,Rt=Math.min(Math.max(St,at),$)/St,ve=Math.min(Math.max(se,lt),K)/se,Mt=Math.min(Rt,ve),At=(-$e+($-St)/2+x.margin+F.left)/Mt,Be=(-Vt+(K-se)/2+x.margin+F.top)/Mt,ct="scale("+Mt+") translate3d("+At+"px, "+Be+"px, 0)";y.zoomed.style.transform=ct,y.zoomedHd&&(y.zoomedHd.style.transform=ct)};return new i(function(B){if(O&&E.indexOf(O)===-1){B(z);return}var F=function it(){I=!1,y.zoomed.removeEventListener("transitionend",it),y.original.dispatchEvent(ie("medium-zoom:opened",{detail:{zoom:z}})),B(z)};if(y.zoomed){B(z);return}if(O)y.original=O;else if(E.length>0){var $=E;y.original=$[0]}else{B(z);return}if(y.original.dispatchEvent(ie("medium-zoom:open",{detail:{zoom:z}})),L=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,I=!0,y.zoomed=Er(y.original),document.body.appendChild(X),x.template){var K=He(x.template)?x.template:document.querySelector(x.template);y.template=document.createElement("div"),y.template.appendChild(K.content.cloneNode(!0)),document.body.appendChild(y.template)}if(y.original.parentElement&&y.original.parentElement.tagName==="PICTURE"&&y.original.currentSrc&&(y.zoomed.src=y.original.currentSrc),document.body.appendChild(y.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),y.original.classList.add("medium-zoom-image--hidden"),y.zoomed.classList.add("medium-zoom-image--opened"),y.zoomed.addEventListener("click",b),y.zoomed.addEventListener("transitionend",F),y.original.getAttribute("data-zoom-src")){y.zoomedHd=y.zoomed.cloneNode(),y.zoomedHd.removeAttribute("srcset"),y.zoomedHd.removeAttribute("sizes"),y.zoomedHd.removeAttribute("loading"),y.zoomedHd.src=y.zoomed.getAttribute("data-zoom-src"),y.zoomedHd.onerror=function(){clearInterval(J),console.warn("Unable to reach the zoom image target "+y.zoomedHd.src),y.zoomedHd=null,_()};var J=setInterval(function(){y.zoomedHd.complete&&(clearInterval(J),y.zoomedHd.classList.add("medium-zoom-image--opened"),y.zoomedHd.addEventListener("click",b),document.body.appendChild(y.zoomedHd),_())},10)}else if(y.original.hasAttribute("srcset")){y.zoomedHd=y.zoomed.cloneNode(),y.zoomedHd.removeAttribute("sizes"),y.zoomedHd.removeAttribute("loading");var nt=y.zoomedHd.addEventListener("load",function(){y.zoomedHd.removeEventListener("load",nt),y.zoomedHd.classList.add("medium-zoom-image--opened"),y.zoomedHd.addEventListener("click",b),document.body.appendChild(y.zoomedHd),_()})}else _()})},b=function(){return new i(function(S){if(I||!y.original){S(z);return}var O=function _(){y.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(y.zoomed),y.zoomedHd&&document.body.removeChild(y.zoomedHd),document.body.removeChild(X),y.zoomed.classList.remove("medium-zoom-image--opened"),y.template&&document.body.removeChild(y.template),I=!1,y.zoomed.removeEventListener("transitionend",_),y.original.dispatchEvent(ie("medium-zoom:closed",{detail:{zoom:z}})),y.original=null,y.zoomed=null,y.zoomedHd=null,y.template=null,S(z)};I=!0,document.body.classList.remove("medium-zoom--opened"),y.zoomed.style.transform="",y.zoomedHd&&(y.zoomedHd.style.transform=""),y.template&&(y.template.style.transition="opacity 150ms",y.template.style.opacity=0),y.original.dispatchEvent(ie("medium-zoom:close",{detail:{zoom:z}})),y.zoomed.addEventListener("transitionend",O)})},g=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=S.target;return y.original?b():m({target:O})},w=function(){return x},f=function(){return E},v=function(){return y.original},E=[],C=[],I=!1,L=0,x=e,y={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?x=t:(t||typeof t=="string")&&c(t),x=qt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},x);var X=wr(x.background);document.addEventListener("click",o),document.addEventListener("keyup",r),document.addEventListener("scroll",s),window.addEventListener("resize",b);var z={open:m,close:b,toggle:g,update:a,clone:l,attach:c,detach:d,on:u,off:h,getOptions:w,getImages:f,getZoomedImage:v};return z};function Sr(n,t){t===void 0&&(t={});var e=t.insertAt;if(!(!n||typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n))}}var Ar=".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}";Sr(Ar);var xo=xr;var Cr;function So(n){let t=document.body.dataset.imageZoom;if(!t)return;let e;try{e=JSON.parse(t)}catch{return}let i=[...document.querySelectorAll(\'img[data-zoomable="true"]\')];if(!i.length)return;let o=Cr??(Cr=xo());o.update(e),o.attach(...i),n==null||n.addEventListener("abort",()=>{o.close(),o.detach(...i)});let s={signal:n},r=!1,a=l=>l.key==="Enter"||l.key===" ";for(let l of i)l.alt&&(l.tabIndex=0,l.addEventListener("keydown",c=>{a(c)&&(c.preventDefault(),r=!0,o.open({target:l}))},s),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(),o.close())}),c.focus())},s),l.addEventListener("medium-zoom:closed",()=>{r&&l.focus(),r=!1},s))}function Fe(n){return!/^[\\x00-\\x20]*([a-z][a-z0-9+.-]*:|[\\\\/])/i.test(n.replace(/[\\t\\n\\r]/g,""))}var Pe=new Map,Lr=15e3;function bn(n){let t=Pe.get(n);if(!t){let e=new Promise((i,o)=>{let s=document.createElement("script");s.src=n;let r=setTimeout(()=>a(),Lr),a=()=>{clearTimeout(r),s.onload=s.onerror=null,Pe.get(n)===e&&Pe.delete(n),o(new Error(`could not load ${n}`))};s.onload=()=>{clearTimeout(r),i()},s.onerror=a,document.head.appendChild(s)});Pe.set(n,t=e)}return t}function kr(n){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 i=!document.documentElement.classList.contains("dark");document.documentElement.classList.toggle("dark",i);try{localStorage.setItem("theme",i?"dark":"light")}catch{}e()},{signal:n})})}function Tr(n){document.addEventListener("click",async t=>{var o,s,r,a;let e=t.target.closest("[data-copy-markdown]");if(!e)return;let i=(((o=document.getElementById("db-page-markdown"))==null?void 0:o.textContent)??"").replace(/<\\\\\\/(script)/gi,"</$1").replace(/<\\\\!--/g,"<!--");try{await navigator.clipboard.writeText(i);let l=(s=e.dataset).label??(s.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:n})}function Or(n,t){let e=document.body.dataset.page??"index.html";document.querySelectorAll("select[data-db-switch]").forEach(i=>{i.addEventListener("change",async()=>{var a;let o=i.selectedOptions[0];if(!o||o.disabled||!o.hasAttribute("value"))return;let s=o.dataset.prefix??"",r=i.value;if(o.hasAttribute("data-link")){(Fe(r)||/^https?:\\/\\//i.test(r))&&(location.href=r);return}if(!(!Fe(r)||!Fe(s))){if(i.dataset.dbSwitch==="product"){location.href=r;return}try{let l=s?`${n}${s}/`:n;await bn(`${l}_dogsbay/pages.js`);let c=(a=window.__DOGSBAY_PAGES__)==null?void 0:a[s];location.href=c&&!c.includes(e)?`${l}index.html`:r}catch{location.href=r}}},{signal:t})})}function Dr(n){document.addEventListener("click",t=>{var i;let e=t.target.closest("a.db-anchor");!e||location.protocol==="file:"||(i=navigator.clipboard)==null||i.writeText(e.href).catch(()=>{})},{signal:n})}var be=new Map,ze=new Set;function _e(){for(let[n,t]of be)n.isConnected||(Tt(n),t.abort(),be.delete(n));for(let n of ze)n.isConnected||Tt(n)}function Rr(n,t){let e=EventTarget.prototype,i=e.addEventListener,o=0;e.addEventListener=function(s,r,a){o++;let l=typeof a=="object"?a.signal:void 0;i.call(this,s,r,typeof a=="object"?{...a,signal:l?AbortSignal.any([l,n]):n}:{capture:a===!0,signal:n})};try{t()}finally{e.addEventListener=i}return o}function Mr(){_e(),document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(n=>{if(be.has(n)||ze.has(n))return;let t=new AbortController;Rr(t.signal,()=>sn(n))?be.set(n,t):n.querySelector("[data-component=\'sidebar\']")&&ze.add(n)}),document.removeEventListener("keydown",_e),document.addEventListener("keydown",_e)}var oe;function vn(n={}){var a;oe==null||oe.unmount();let t=new AbortController,{signal:e}=t,i=document.body,o=i.dataset.unitRoot??"",s=i.dataset.siteRoot??"";if(n.nav!==void 0){window.__DOGSBAY_NAV__=n.nav;for(let l of document.querySelectorAll("db-nav-tree")){let c=l.querySelector(":scope > [data-part=\'list\']");c&&!c.querySelector("[data-part=\'item\']")&&((a=l.parentNode)==null||a.insertBefore(l,l.nextSibling))}}Mr(),n.theme!==!1&&kr(e),Tr(e),n.switchers!==!1&&Or(s,e),Dr(e),n.search!==!1&&(mo({unitRoot:o,siteRoot:s,prefix:i.dataset.prefix??"",loadScript:bn,signal:e}),go({unitRoot:o,siteRoot:s,prefix:i.dataset.prefix??"",loadScript:bn,signal:e})),yo(e),So(e);let r={unmount(){if(!e.aborted){t.abort();for(let l of[...be.keys(),...ze])Tt(l);_e(),oe===r&&(oe=void 0)}}};return oe=r}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>vn()):vn();})();\n';
|
|
22026
22311
|
var CLIENT_FILE = "dogsbay-6e87be2597.js";
|
|
22027
|
-
var SSG_VERSION = "0.2.0-beta.
|
|
22312
|
+
var SSG_VERSION = "0.2.0-beta.174";
|
|
22028
22313
|
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 %}{% if has.crowdedHeader %} data-header="crowded"{% 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 }}{{ tocTop }}\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 %}{% if has.crowdedHeader %} data-header="crowded"{% 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
|
|
22029
22314
|
header in the callout colours of its tone. A closeable one is closed and remembered by <db-announcement>,
|
|
22030
22315
|
and the head script hides a closed one before first paint. Context: announcement = {id, key (what a close is
|
|
@@ -22258,31 +22543,31 @@ var CLIENT_CANDIDATES = ['""', '""}', '"&"', '")}', '"./",', '"Also', '"\\\\$&")
|
|
|
22258
22543
|
var SITE_NOTICES = `Third-party software in this site's _dogsbay/ files (dogsbay.js, site.css) and pages
|
|
22259
22544
|
|
|
22260
22545
|
========================================================================
|
|
22261
|
-
@dogsbay/elements@0.2.0-beta.
|
|
22546
|
+
@dogsbay/elements@0.2.0-beta.174 (MIT)
|
|
22262
22547
|
https://github.com/dogsbay/dogsbay.git
|
|
22263
22548
|
|
|
22264
22549
|
Licensed under MIT; the package ships no licence file.
|
|
22265
22550
|
|
|
22266
22551
|
========================================================================
|
|
22267
|
-
@dogsbay/primitives@0.2.0-beta.
|
|
22552
|
+
@dogsbay/primitives@0.2.0-beta.174 (MIT)
|
|
22268
22553
|
https://github.com/dogsbay/dogsbay.git
|
|
22269
22554
|
|
|
22270
22555
|
Licensed under MIT; the package ships no licence file.
|
|
22271
22556
|
|
|
22272
22557
|
========================================================================
|
|
22273
|
-
@dogsbay/render-html@0.2.0-beta.
|
|
22558
|
+
@dogsbay/render-html@0.2.0-beta.174 (MIT)
|
|
22274
22559
|
https://github.com/dogsbay/dogsbay.git
|
|
22275
22560
|
|
|
22276
22561
|
Licensed under MIT; the package ships no licence file.
|
|
22277
22562
|
|
|
22278
22563
|
========================================================================
|
|
22279
|
-
@dogsbay/search@0.2.0-beta.
|
|
22564
|
+
@dogsbay/search@0.2.0-beta.174 (MIT)
|
|
22280
22565
|
https://github.com/dogsbay/dogsbay.git
|
|
22281
22566
|
|
|
22282
22567
|
Licensed under MIT; the package ships no licence file.
|
|
22283
22568
|
|
|
22284
22569
|
========================================================================
|
|
22285
|
-
@dogsbay/ui@0.2.0-beta.
|
|
22570
|
+
@dogsbay/ui@0.2.0-beta.174 (MIT)
|
|
22286
22571
|
https://github.com/dogsbay/dogsbay.git
|
|
22287
22572
|
|
|
22288
22573
|
Licensed under MIT; the package ships no licence file.
|
|
@@ -26472,6 +26757,25 @@ function taxonomyTitle(name) {
|
|
|
26472
26757
|
return name.replace(/[-_]/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
26473
26758
|
}
|
|
26474
26759
|
|
|
26760
|
+
// src/theme/docs-layout/section-switcher.ts
|
|
26761
|
+
var ESC = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" };
|
|
26762
|
+
function esc2(s) {
|
|
26763
|
+
return s.replace(/[&<>"']/g, (c) => ESC[c]);
|
|
26764
|
+
}
|
|
26765
|
+
var CHEVRON2 = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="shrink-0 transition-transform group-open/section:rotate-180" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg>';
|
|
26766
|
+
var BACK = '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="15 18 9 12 15 6"/></svg>';
|
|
26767
|
+
function sectionSwitcherHtml(o) {
|
|
26768
|
+
if (!o.entries.length) return "";
|
|
26769
|
+
const placeholder = o.placeholder ?? "Section";
|
|
26770
|
+
const home = o.homeLabel ?? "All sections";
|
|
26771
|
+
const items3 = o.entries.map((e) => {
|
|
26772
|
+
const cur = o.current !== void 0 && (e.index !== void 0 && o.current.index !== void 0 ? e.index === o.current.index : e.href === o.current.href);
|
|
26773
|
+
return `<li><a href="${esc2(e.href)}"${cur ? ' aria-current="true"' : ""} class="db-section-link">${esc2(e.label)}</a></li>`;
|
|
26774
|
+
}).join("");
|
|
26775
|
+
const name = o.current ? `<span class="sr-only">${esc2(placeholder)}: </span><span class="min-w-0 flex-1 truncate text-left font-medium">${esc2(o.current.label)}</span>` : `<span class="min-w-0 flex-1 truncate text-left text-muted-foreground">${esc2(placeholder)}</span>`;
|
|
26776
|
+
return `<div class="db-section-switcher flex flex-col gap-1 px-2 pb-2 group-data-[collapsible=icon]:hidden" data-section-switcher>` + (o.current ? `<a href="${esc2(o.homeHref)}" class="flex items-center gap-1 px-1 text-xs text-sidebar-foreground/70 no-underline hover:text-sidebar-foreground" data-section-home>${BACK}${esc2(home)}</a>` : "") + `<details class="group/section relative"><summary class="flex w-full cursor-pointer list-none items-center gap-1 rounded-md border border-border px-3 py-1.5 text-sm hover:bg-sidebar-accent [&::-webkit-details-marker]:hidden">${name}${CHEVRON2}</summary><ul class="absolute inset-x-0 z-50 mt-1 max-h-[60vh] overflow-y-auto rounded-md border border-border bg-popover p-1 text-sm shadow-md">${items3}</ul></details></div>`;
|
|
26777
|
+
}
|
|
26778
|
+
|
|
26475
26779
|
// src/theme/regions.ts
|
|
26476
26780
|
var svg3 = (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>`;
|
|
26477
26781
|
var ICONS = {
|
|
@@ -26513,6 +26817,15 @@ ${opts.nav}
|
|
|
26513
26817
|
<div class="fixed inset-y-0 left-0 z-50 flex h-svh w-[18rem] flex-col bg-sidebar p-0 text-sidebar-foreground" data-sidebar-mobile data-state="closed" role="dialog" aria-modal="true" aria-label="${esc(opts.label)}" hidden></div>
|
|
26514
26818
|
</div>`;
|
|
26515
26819
|
}
|
|
26820
|
+
function sectionSwitcher(menu, href, homeHref, t) {
|
|
26821
|
+
const linked = (e) => {
|
|
26822
|
+
const h = href(e);
|
|
26823
|
+
return h === void 0 ? void 0 : { label: e.label, href: h, index: e.index };
|
|
26824
|
+
};
|
|
26825
|
+
const entries = menu.entries.map(linked).filter((e) => e !== void 0);
|
|
26826
|
+
const current = menu.current && linked(menu.current);
|
|
26827
|
+
return sectionSwitcherHtml({ entries, ...current ? { current } : {}, homeHref, homeLabel: t("allSections"), placeholder: t("sectionMenu") });
|
|
26828
|
+
}
|
|
26516
26829
|
function sidebarTrigger(label) {
|
|
26517
26830
|
return `<button type="button" data-part="sidebar-trigger" class="-ml-1 inline-flex h-7 w-7 items-center justify-center rounded-md text-sm hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" aria-label="${esc(label)}" aria-keyshortcuts="Control+B">${svg3(
|
|
26518
26831
|
'<rect width="18" height="18" x="3" y="3" rx="2"/><path d="M9 3v18"/>',
|
|
@@ -26539,7 +26852,7 @@ function duplicateSlugs(nodes) {
|
|
|
26539
26852
|
return d;
|
|
26540
26853
|
}
|
|
26541
26854
|
function navTree(nodes, o) {
|
|
26542
|
-
const at = currentPath(nodes, o.trail);
|
|
26855
|
+
const at = o.markCurrent === false ? void 0 : currentPath(nodes, o.trail);
|
|
26543
26856
|
const open = `<db-nav-tree class="w-full group-data-[collapsible=icon]:hidden" data-sidebar="nav-tree" chevron="css" base="${esc(o.unitRoot)}" data-source="__DOGSBAY_NAV__"${at ? ` current-path="${at}"` : ""} toggle-label="${esc(o.toggleLabel)}" scroll-current>`;
|
|
26544
26857
|
if (o.client) {
|
|
26545
26858
|
const home = o.home ? `<noscript><a data-part="link" href="${esc(o.home.href)}">${esc(o.home.label)}</a></noscript>` : "";
|
|
@@ -27088,7 +27401,7 @@ async function composePage(p, cfg, templates) {
|
|
|
27088
27401
|
linksClass: LINKS_LIST_HIDDEN[linksFrom],
|
|
27089
27402
|
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
|
|
27090
27403
|
(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>` : "") : "",
|
|
27091
|
-
nav: navTree(p.nav, { ...p.navOptions, toggleLabel: t("toggleSection"), unitRoot: p.unitRoot, home: { href: p.homeHref, label: t("home") } })
|
|
27404
|
+
nav: (p.navSwitcher ?? "") + navTree(p.nav, { ...p.navOptions, toggleLabel: t("toggleSection"), unitRoot: p.unitRoot, home: { href: p.homeHref, label: t("home") } })
|
|
27092
27405
|
}) : ""
|
|
27093
27406
|
),
|
|
27094
27407
|
sidebarTrigger: safe(hasSidebar ? sidebarTrigger(t("toggleSidebar")) : ""),
|
|
@@ -27147,7 +27460,7 @@ async function composePage(p, cfg, templates) {
|
|
|
27147
27460
|
// Escape "</script" and "<!--" so the text cannot end the element or switch the parser
|
|
27148
27461
|
// into its escaped script states; the client reverses both before copying.
|
|
27149
27462
|
(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>
|
|
27150
|
-
` : "") + `<script src="${esc(p.unitRoot)}_dogsbay/nav.js" defer></script>
|
|
27463
|
+
` : "") + `<script src="${esc(p.unitRoot)}${esc(p.navData ?? "_dogsbay/nav.js")}" defer></script>
|
|
27151
27464
|
<script src="${esc(p.siteRoot)}_dogsbay/assets/${CLIENT_FILE}" defer></script>`
|
|
27152
27465
|
)
|
|
27153
27466
|
};
|
|
@@ -27210,6 +27523,141 @@ var ThemeTemplates = class {
|
|
|
27210
27523
|
}
|
|
27211
27524
|
};
|
|
27212
27525
|
|
|
27526
|
+
// src/core/nav-scope.ts
|
|
27527
|
+
var HOME = "/";
|
|
27528
|
+
var ALIAS = "";
|
|
27529
|
+
var normalize2 = (h) => {
|
|
27530
|
+
if (h.startsWith(ALIAS)) return ALIAS;
|
|
27531
|
+
const i = h.indexOf("#");
|
|
27532
|
+
return i < 0 ? h : h.slice(0, i);
|
|
27533
|
+
};
|
|
27534
|
+
var OPTS = { home: HOME, normalize: normalize2 };
|
|
27535
|
+
function wrap2(nodes) {
|
|
27536
|
+
return nodes.map((n) => {
|
|
27537
|
+
const href = n.slug != null ? `${n.alias ? ALIAS : ""}/${n.slug}${n.fragment ?? ""}` : n.href;
|
|
27538
|
+
const item = { label: n.label, node: n };
|
|
27539
|
+
if (href !== void 0) item.href = href;
|
|
27540
|
+
if (n.children.length) item.children = wrap2(n.children);
|
|
27541
|
+
return item;
|
|
27542
|
+
});
|
|
27543
|
+
}
|
|
27544
|
+
function decode(label, raw) {
|
|
27545
|
+
if (raw === void 0) return { label };
|
|
27546
|
+
const href = raw.startsWith(ALIAS) ? raw.slice(ALIAS.length) : raw;
|
|
27547
|
+
if (!href.startsWith("/")) return { label, href };
|
|
27548
|
+
const i = href.indexOf("#");
|
|
27549
|
+
const slug = (i < 0 ? href : href.slice(0, i)).slice(1);
|
|
27550
|
+
return i < 0 ? { label, slug } : { label, slug, fragment: href.slice(i) };
|
|
27551
|
+
}
|
|
27552
|
+
var toNode = (it) => {
|
|
27553
|
+
if (it.node) return it.node;
|
|
27554
|
+
const d = decode(it.label, it.href);
|
|
27555
|
+
const n = { label: d.label, children: [] };
|
|
27556
|
+
if (d.slug !== void 0) n.slug = d.slug;
|
|
27557
|
+
if (d.href !== void 0) n.href = d.href;
|
|
27558
|
+
if (d.fragment !== void 0) n.fragment = d.fragment;
|
|
27559
|
+
return n;
|
|
27560
|
+
};
|
|
27561
|
+
function navScoper(nav) {
|
|
27562
|
+
const items3 = wrap2(nav);
|
|
27563
|
+
const scopes = /* @__PURE__ */ new Map();
|
|
27564
|
+
const forPage = (slug) => {
|
|
27565
|
+
const current = slug === void 0 ? "\0" : `/${slug}`;
|
|
27566
|
+
const r = scopeNav(items3, current, "section", OPTS);
|
|
27567
|
+
const key2 = r.section >= 0 ? String(r.section) : "home";
|
|
27568
|
+
const hit = scopes.get(key2);
|
|
27569
|
+
if (hit) return hit;
|
|
27570
|
+
const m = sectionMenu(items3, current, OPTS);
|
|
27571
|
+
const entry2 = (e) => ({ ...decode(e.label, e.href), index: e.index });
|
|
27572
|
+
const entries = m.entries.map(entry2);
|
|
27573
|
+
const scope = {
|
|
27574
|
+
key: key2,
|
|
27575
|
+
nodes: r.items.map(toNode),
|
|
27576
|
+
menu: m.current ? { entries, current: entries.find((e) => e.index === m.current.index) } : { entries }
|
|
27577
|
+
};
|
|
27578
|
+
scopes.set(key2, scope);
|
|
27579
|
+
return scope;
|
|
27580
|
+
};
|
|
27581
|
+
return {
|
|
27582
|
+
forPage,
|
|
27583
|
+
all() {
|
|
27584
|
+
forPage(void 0);
|
|
27585
|
+
for (const slug of pageSlugs(nav)) forPage(slug);
|
|
27586
|
+
return [...scopes.values()];
|
|
27587
|
+
}
|
|
27588
|
+
};
|
|
27589
|
+
}
|
|
27590
|
+
function pageSlugs(nodes, out = [], seen = /* @__PURE__ */ new Set()) {
|
|
27591
|
+
for (const n of nodes) {
|
|
27592
|
+
if (n.slug != null && !n.alias && !n.fragment && !seen.has(n.slug)) {
|
|
27593
|
+
seen.add(n.slug);
|
|
27594
|
+
out.push(n.slug);
|
|
27595
|
+
}
|
|
27596
|
+
pageSlugs(n.children, out, seen);
|
|
27597
|
+
}
|
|
27598
|
+
return out;
|
|
27599
|
+
}
|
|
27600
|
+
function scopeOrder(scope) {
|
|
27601
|
+
return pageSlugs(scope.nodes);
|
|
27602
|
+
}
|
|
27603
|
+
function scopedTrail(scope, chain, slug) {
|
|
27604
|
+
const top = new Set(scope.nodes);
|
|
27605
|
+
const k = chain.findIndex((n) => top.has(n));
|
|
27606
|
+
if (k >= 0) return chain.slice(k);
|
|
27607
|
+
const find3 = (nodes, path) => {
|
|
27608
|
+
for (const n of nodes) {
|
|
27609
|
+
const here = [...path, n];
|
|
27610
|
+
if (n.slug === slug && !n.fragment && !n.alias) return here;
|
|
27611
|
+
const hit = find3(n.children, here);
|
|
27612
|
+
if (hit) return hit;
|
|
27613
|
+
}
|
|
27614
|
+
return void 0;
|
|
27615
|
+
};
|
|
27616
|
+
return find3(scope.nodes, []) ?? [];
|
|
27617
|
+
}
|
|
27618
|
+
|
|
27619
|
+
// src/core/unlisted.ts
|
|
27620
|
+
var slugOf = (href) => isExternal(href) || href.startsWith("//") ? void 0 : href.replace(/[?#].*$/, "").replace(/^\/+|\/+$/g, "");
|
|
27621
|
+
function toItems(nodes) {
|
|
27622
|
+
return nodes.map((n) => ({
|
|
27623
|
+
// An alias (a redirect entry) links a page that has its own entry elsewhere: it neither lists nor
|
|
27624
|
+
// unlists that page, as it never holds it (nav-scope.ts).
|
|
27625
|
+
...n.slug != null && !n.alias ? { href: `/${n.slug}${n.fragment ?? ""}` } : n.href != null ? { href: n.href } : {},
|
|
27626
|
+
...n.unlisted ? { unlisted: true } : {},
|
|
27627
|
+
children: toItems(n.children),
|
|
27628
|
+
node: n
|
|
27629
|
+
}));
|
|
27630
|
+
}
|
|
27631
|
+
function fromItems(items3, slugs) {
|
|
27632
|
+
return items3.flatMap((it) => {
|
|
27633
|
+
const { children: _c, ...n } = it.node;
|
|
27634
|
+
const node = { ...n, children: fromItems(it.children ?? [], slugs) };
|
|
27635
|
+
const aliasToHidden = n.alias === true && n.slug != null && slugs.has(n.slug);
|
|
27636
|
+
if (n.slug != null && (!n.alias && it.href === void 0 || aliasToHidden)) {
|
|
27637
|
+
delete node.slug;
|
|
27638
|
+
delete node.fragment;
|
|
27639
|
+
if (aliasToHidden) {
|
|
27640
|
+
delete node.alias;
|
|
27641
|
+
delete node.aliasOf;
|
|
27642
|
+
if (node.children.length === 0) return [];
|
|
27643
|
+
}
|
|
27644
|
+
}
|
|
27645
|
+
return [node];
|
|
27646
|
+
});
|
|
27647
|
+
}
|
|
27648
|
+
function applyUnlisted(nav, pages) {
|
|
27649
|
+
const list5 = [...pages].map((p) => ({ slug: p.slug, unlisted: p.data?.unlisted, noindex: p.data?.noindex, excludeFromSearch: p.data?.excludeFromSearch }));
|
|
27650
|
+
const flagged = (nodes) => nodes.some((n) => n.unlisted || flagged(n.children));
|
|
27651
|
+
if (!list5.some((p) => p.unlisted === true) && !flagged(nav)) return { slugs: /* @__PURE__ */ new Set(), listed: nav, locate: /* @__PURE__ */ new Map(), outsideNav: [], warnings: [] };
|
|
27652
|
+
const marked = markUnlisted(toItems(nav), list5, { slugOf });
|
|
27653
|
+
const locate3 = /* @__PURE__ */ new Map();
|
|
27654
|
+
for (const [slug, href] of listedLocations(marked.nav, marked.slugs, { slugOf, home: "/" })) {
|
|
27655
|
+
const at = slugOf(href);
|
|
27656
|
+
if (at !== void 0) locate3.set(slug, at);
|
|
27657
|
+
}
|
|
27658
|
+
return { slugs: marked.slugs, listed: fromItems(listedNav(marked.nav, marked.slugs, { slugOf }), marked.slugs), locate: locate3, outsideNav: marked.outsideNav, warnings: marked.warnings };
|
|
27659
|
+
}
|
|
27660
|
+
|
|
27213
27661
|
// src/core/preprocess.ts
|
|
27214
27662
|
var HASH_SENTINEL2 = " DBMINJA_HASH_OPEN ";
|
|
27215
27663
|
var mask2 = (s) => maskMinjaInCode(s).replace(/\{#/g, `{${HASH_SENTINEL2}`);
|
|
@@ -27668,7 +28116,7 @@ var SearchIndexBuilder = class {
|
|
|
27668
28116
|
const byShard = this.shardTerms();
|
|
27669
28117
|
const depth = Math.max(1, ...[...byShard.keys()].map((k) => keyDepth(k)));
|
|
27670
28118
|
const score = this.scorer();
|
|
27671
|
-
const
|
|
28119
|
+
const sections2 = [];
|
|
27672
28120
|
const sectionIndex = /* @__PURE__ */ new Map();
|
|
27673
28121
|
const tags = [];
|
|
27674
28122
|
const tagIndex = /* @__PURE__ */ new Map();
|
|
@@ -27676,7 +28124,7 @@ var SearchIndexBuilder = class {
|
|
|
27676
28124
|
const facetIndex = /* @__PURE__ */ new Map();
|
|
27677
28125
|
const docs = this.docs.map((d) => {
|
|
27678
28126
|
let i = sectionIndex.get(d.section);
|
|
27679
|
-
if (i === void 0) sectionIndex.set(d.section, i =
|
|
28127
|
+
if (i === void 0) sectionIndex.set(d.section, i = sections2.push(d.section) - 1);
|
|
27680
28128
|
const t = d.tags.map((tag) => {
|
|
27681
28129
|
let j = tagIndex.get(tag);
|
|
27682
28130
|
if (j === void 0) tagIndex.set(tag, j = tags.push(tag) - 1);
|
|
@@ -27698,7 +28146,7 @@ var SearchIndexBuilder = class {
|
|
|
27698
28146
|
if (f.length) return [d.title, d.url, i, t, f];
|
|
27699
28147
|
return t.length ? [d.title, d.url, i, t] : [d.title, d.url, i];
|
|
27700
28148
|
});
|
|
27701
|
-
const meta = { format: FORMAT2, depth, count: this.docs.length, shards: [...byShard.keys()].sort(), sections, tags, ...facets.length ? { facets } : {}, block: BLOCK, lang: this.opts.lang, docs };
|
|
28149
|
+
const meta = { format: FORMAT2, depth, count: this.docs.length, shards: [...byShard.keys()].sort(), sections: sections2, tags, ...facets.length ? { facets } : {}, block: BLOCK, lang: this.opts.lang, docs };
|
|
27702
28150
|
yield [file.docs, wrap(key.docs, meta)];
|
|
27703
28151
|
for (let b = this.fragmentsOut; b * BLOCK < this.docs.length; b++) yield this.fragmentFile(b);
|
|
27704
28152
|
if (!this.grouped) {
|
|
@@ -27746,8 +28194,8 @@ var str5 = (v) => typeof v === "string" ? v : "";
|
|
|
27746
28194
|
var objects = (v) => Array.isArray(v) ? v.filter((x) => !!x && typeof x === "object") : [];
|
|
27747
28195
|
var INLINE_TAGS = new Set("a abbr b bdi bdo cite code data del dfn em i ins kbd mark q s samp small span strong sub sup time u var wbr".split(" "));
|
|
27748
28196
|
var ENTITY3 = { lt: "<", gt: ">", quot: '"', "#39": "'", "#x27": "'", apos: "'", nbsp: " ", amp: "&" };
|
|
27749
|
-
var
|
|
27750
|
-
var squash = (s) =>
|
|
28197
|
+
var decode2 = (s) => s.replace(/&(lt|gt|quot|#39|#x27|apos|nbsp|amp);/g, (_, e) => ENTITY3[e]);
|
|
28198
|
+
var squash = (s) => decode2(s).replace(/\s+/g, " ").trim();
|
|
27751
28199
|
var MAX_TAG = 4096;
|
|
27752
28200
|
var RAW_TEXT = /* @__PURE__ */ new Set(["script", "style", "textarea"]);
|
|
27753
28201
|
function tagEnd(html, lt) {
|
|
@@ -27837,7 +28285,7 @@ function specText(v) {
|
|
|
27837
28285
|
const s = str5(v);
|
|
27838
28286
|
if (!s.includes("<") && !s.includes("&")) return s;
|
|
27839
28287
|
return s.split(/(`+[^`]*`+)/).map(
|
|
27840
|
-
(part, i) => i % 2 ? part :
|
|
28288
|
+
(part, i) => i % 2 ? part : decode2(part.replace(/<\/?([a-z][a-z0-9]*)\b[^<>]*>/gi, (m, name) => SPEC_MARKUP.has(name.toLowerCase()) ? INLINE_TAGS.has(name.toLowerCase()) ? "" : " " : m))
|
|
27841
28289
|
).join("").replace(/\s+/g, " ").trim();
|
|
27842
28290
|
}
|
|
27843
28291
|
function extractText2(tree) {
|
|
@@ -27925,6 +28373,9 @@ var EN = {
|
|
|
27925
28373
|
llmsTxt: "View as llms.txt",
|
|
27926
28374
|
poweredBy: "Powered by DogsBay",
|
|
27927
28375
|
toggleSection: "Toggle {label}",
|
|
28376
|
+
// The section menu of a sidebar scoped to one section (build.navScope: section): section-switcher.ts's defaults
|
|
28377
|
+
allSections: "All sections",
|
|
28378
|
+
sectionMenu: "Section",
|
|
27928
28379
|
searchPlaceholder: "Search the docs",
|
|
27929
28380
|
searchNoResults: "No results for",
|
|
27930
28381
|
clearHighlights: "Clear highlights",
|
|
@@ -28752,7 +29203,7 @@ function diagramStore(input, cfg) {
|
|
|
28752
29203
|
return renderer ? new DiagramStore(renderer, input.diagramCacheChars, input.diagramPinChars) : void 0;
|
|
28753
29204
|
}
|
|
28754
29205
|
async function siteCssBuilder(input) {
|
|
28755
|
-
return input.css ?? (await import("./css-build-
|
|
29206
|
+
return input.css ?? (await import("./css-build-V5U6W2S3.mjs")).buildSiteCss;
|
|
28756
29207
|
}
|
|
28757
29208
|
var SITE_FILES = /* @__PURE__ */ new Set(["robots.txt", "sitemap-index.xml"]);
|
|
28758
29209
|
var SEARCH_PAGE = "search.html";
|
|
@@ -29385,7 +29836,7 @@ async function emitSiteFiles(cfg, all, built, stored, def, state, emit, report,
|
|
|
29385
29836
|
return !!u && (built.includes(u) || stored.has(u.prefix));
|
|
29386
29837
|
};
|
|
29387
29838
|
const inputs = state.redirects.filter((r) => known(r.from));
|
|
29388
|
-
const { rules, warnings: w } = collectRedirects(inputs, (p) => state.pageOut.get(p), known);
|
|
29839
|
+
const { rules, warnings: w } = collectRedirects(inputs, (p) => state.pageOut.get(p) ?? state.homeForward.get(p), known);
|
|
29389
29840
|
const builtFrom = (r) => built.includes(unitOf2(r.from));
|
|
29390
29841
|
for (const m of w) report("redirects", `[redirects] ${m}`);
|
|
29391
29842
|
onRedirects?.(rules.filter(builtFrom));
|
|
@@ -29952,11 +30403,19 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
29952
30403
|
}));
|
|
29953
30404
|
let childLinkItems;
|
|
29954
30405
|
let childLinkDirs;
|
|
30406
|
+
let childLinkAllItems;
|
|
30407
|
+
let childLinkAllDirs;
|
|
29955
30408
|
const isLeftOut = (s) => !infos.has(s) && !stubTargets.has(s) && leftOut.has(s);
|
|
29956
30409
|
for (const s of order2) if (!infos.has(s) && !stubTargets.has(s) && !leftOut.has(s) && !(state.staticFile?.(s) ?? state.staticFile?.(`${s}/`))) warn("nav", `nav entry "${s}" has no page`, navFileAt());
|
|
29957
30410
|
if (cfg.routablesFrom === "nav") {
|
|
29958
30411
|
const keep = new Set(order2);
|
|
29959
|
-
|
|
30412
|
+
const lost = [];
|
|
30413
|
+
for (const s of [...infos.keys()]) {
|
|
30414
|
+
if (s === "" || keep.has(s)) continue;
|
|
30415
|
+
if (infos.get(s).data?.unlisted === true) lost.push(s);
|
|
30416
|
+
infos.delete(s);
|
|
30417
|
+
}
|
|
30418
|
+
if (lost.length) warn("nav", `${lost.length} page(s) say unlisted: true but are in no nav entry, so routablesFrom: nav does not build them (an unlisted page keeps its entry): ${lost.slice(0, 5).join(", ")}${lost.length > 5 ? ", \u2026" : ""}`, navFileAt());
|
|
29960
30419
|
}
|
|
29961
30420
|
const excludedEntries = /* @__PURE__ */ new Map();
|
|
29962
30421
|
const staticNav = /* @__PURE__ */ new Map();
|
|
@@ -30010,11 +30469,18 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30010
30469
|
const why = [...excludedEntries.keys()].slice(0, 5).join(", ");
|
|
30011
30470
|
warn("nav", n === 1 ? `1 nav entry left out: its page is excluded from routes (${why})` : `${n} nav entries left out: their pages are excluded from routes (${why})`, navFileAt());
|
|
30012
30471
|
}
|
|
30472
|
+
const unlisted = applyUnlisted(nav, infos.values());
|
|
30473
|
+
for (const w of unlisted.warnings) warn("unlisted", w.message);
|
|
30474
|
+
const isUnlisted = (s) => unlisted.slugs.has(s);
|
|
30475
|
+
const drawn = unlisted.listed;
|
|
30476
|
+
const listedIndex = drawn === nav ? void 0 : indexNav(drawn, { skipAliases: true });
|
|
30477
|
+
const listedTrail = listedIndex?.trail ?? trail;
|
|
30013
30478
|
const blogIndex = cfg.blog?.path;
|
|
30014
30479
|
const replaced = blogIndex === "" ? "" : void 0;
|
|
30015
30480
|
if (blogIndex && infos.has(blogIndex)) warn("duplicate-page", `the page ${infos.get(blogIndex).source} and the blog index both serve /${blogIndex} on hosts that drop .html; rename one`);
|
|
30016
|
-
const posts = blog?.ordered((s) => infos.has(s) && s !== replaced) ?? [];
|
|
30481
|
+
const posts = blog?.ordered((s) => infos.has(s) && s !== replaced && !isUnlisted(s)) ?? [];
|
|
30017
30482
|
const postNeighbours = adjacency(posts);
|
|
30483
|
+
if (blog && unlisted.slugs.size) for (const p of blog.ordered((s) => infos.has(s) && s !== replaced && isUnlisted(s))) postNeighbours.set(p.slug, {});
|
|
30018
30484
|
const pageRefs = /* @__PURE__ */ new Map();
|
|
30019
30485
|
for (const i of infos.values()) pageRefs.set(i.slug, { slug: i.slug, out: i.out });
|
|
30020
30486
|
const searchPageOut = cfg.search && ![...pageRefs.values()].some((r) => r.out.toLowerCase() === SEARCH_PAGE || cfg.linkStyle === "directory" && r.slug.toLowerCase() === "search") && ![...assetPaths].some((a) => a.toLowerCase() === SEARCH_PAGE) ? SEARCH_PAGE : void 0;
|
|
@@ -30025,15 +30491,55 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30025
30491
|
if (replaced != null && all.has(replaced)) all.set(replaced, { ...all.get(replaced), generated: true });
|
|
30026
30492
|
for (const def of cfg.taxonomies) {
|
|
30027
30493
|
add(def.path, generatedOut(def.path, cfg));
|
|
30028
|
-
for (const term of taxonomies.terms(def.name, (s) => infos.has(s) && s !== replaced)) add(`${def.path}/${term.fullPath.join("/")}`, generatedOut(`${def.path}/${term.fullPath.join("/")}`, cfg));
|
|
30494
|
+
for (const term of taxonomies.terms(def.name, (s) => infos.has(s) && s !== replaced && !isUnlisted(s))) add(`${def.path}/${term.fullPath.join("/")}`, generatedOut(`${def.path}/${term.fullPath.join("/")}`, cfg));
|
|
30029
30495
|
}
|
|
30030
30496
|
if (cfg.blog?.path) add(cfg.blog.path, generatedOut(cfg.blog.path, cfg));
|
|
30031
30497
|
return all;
|
|
30032
30498
|
};
|
|
30033
30499
|
const table2 = { pages: linkTargets(pageRefs), assets: assetPaths, basePath: cfg.basePath, linkStyle: cfg.linkStyle, unitHomes: new Set(allUnits.filter((u) => u.prefix).map((u) => `${u.prefix}/index.html`)), stripPrefixes: cfg.linkPrefixes, staticFile: state.staticFile, unitPrefix: unit.prefix, localeAxes, siteFile: state.siteFile && Object.defineProperty((t2, from) => state.siteFile(t2, from), "forwards", { get: () => state.siteFile?.forwards }) };
|
|
30034
|
-
const readingOrder = order2.filter((s) => infos.has(s));
|
|
30500
|
+
const readingOrder = (listedIndex?.order ?? order2).filter((s) => infos.has(s) && !isUnlisted(s));
|
|
30035
30501
|
const clientNav = cfg.navMode === "client";
|
|
30036
|
-
const fullNav = cfg.navMode === "ssr-full" ? true : cfg.navMode === "client" || cfg.navMode === "hybrid" ? false : navSize(
|
|
30502
|
+
const fullNav = cfg.navMode === "ssr-full" ? true : cfg.navMode === "client" || cfg.navMode === "hybrid" ? false : navSize(drawn) <= (input.fullNavLimit ?? cfg.fullNavLimit);
|
|
30503
|
+
const scoper = cfg.navScope === "section" ? navScoper(drawn) : void 0;
|
|
30504
|
+
const scopeFull = /* @__PURE__ */ new Map();
|
|
30505
|
+
const scopeOrder2 = /* @__PURE__ */ new Map();
|
|
30506
|
+
const fullFor = (s) => {
|
|
30507
|
+
let f = scopeFull.get(s.key);
|
|
30508
|
+
if (f === void 0) scopeFull.set(s.key, f = cfg.navMode === "ssr-full" ? true : cfg.navMode === "client" || cfg.navMode === "hybrid" ? false : navSize(s.nodes) <= (input.fullNavLimit ?? cfg.fullNavLimit));
|
|
30509
|
+
return f;
|
|
30510
|
+
};
|
|
30511
|
+
const orderFor = (s) => {
|
|
30512
|
+
let o = scopeOrder2.get(s.key);
|
|
30513
|
+
if (o === void 0) scopeOrder2.set(s.key, o = scopeOrder(s).filter((slug) => infos.has(slug)));
|
|
30514
|
+
return o;
|
|
30515
|
+
};
|
|
30516
|
+
let lastSwitcher;
|
|
30517
|
+
const switcherFor = (scope, from, hrefTo, homeHref) => {
|
|
30518
|
+
const key2 = `${scope.key}\0${dirname(from)}\0${homeHref}`;
|
|
30519
|
+
if (lastSwitcher?.key === key2) return lastSwitcher.html;
|
|
30520
|
+
const html = sectionSwitcher(scope.menu, (e) => {
|
|
30521
|
+
if (e.slug === void 0) return e.href;
|
|
30522
|
+
const h = hrefTo(e.slug);
|
|
30523
|
+
return h === void 0 ? void 0 : h + (e.fragment ?? "");
|
|
30524
|
+
}, homeHref, t_);
|
|
30525
|
+
lastSwitcher = { key: key2, html };
|
|
30526
|
+
return html;
|
|
30527
|
+
};
|
|
30528
|
+
const sidebarOf = (page, pageChain, from, hrefTo, homeHref) => {
|
|
30529
|
+
const hidden = page !== void 0 && isUnlisted(page);
|
|
30530
|
+
const slug = hidden ? unlisted.locate.get(page) : page;
|
|
30531
|
+
const chain = hidden ? slug === void 0 ? [] : listedTrail.get(slug) ?? [] : pageChain;
|
|
30532
|
+
const scope = scoper?.forPage(slug);
|
|
30533
|
+
const opts = { current: hidden ? "\0" : slug ?? "\0", href: hrefTo, client: clientNav, cache: state.navCache, ...hidden ? { markCurrent: false } : {} };
|
|
30534
|
+
if (!scope) return { nav: drawn, navOptions: { ...opts, trail: new Set(chain), full: fullNav, cacheKey: `${unit.prefix}\0${dirname(from)}` } };
|
|
30535
|
+
return {
|
|
30536
|
+
nav: scope.nodes,
|
|
30537
|
+
navOptions: { ...opts, trail: new Set(slug === void 0 ? [] : scopedTrail(scope, chain, slug)), full: fullFor(scope), cacheKey: `${unit.prefix}\0${scope.key}\0${dirname(from)}` },
|
|
30538
|
+
navData: `_dogsbay/nav/${scope.key}.js`,
|
|
30539
|
+
navSwitcher: switcherFor(scope, from, hrefTo, homeHref),
|
|
30540
|
+
order: orderFor(scope)
|
|
30541
|
+
};
|
|
30542
|
+
};
|
|
30037
30543
|
const locale = unit.locale ?? cfg.defaultLocale;
|
|
30038
30544
|
const lc = (locale ?? "en").toLowerCase();
|
|
30039
30545
|
const t_ = strings(locale, { ...cfg.strings.all, ...cfg.strings.byLocale[lc] ?? cfg.strings.byLocale[lc.split("-")[0]] ?? {} });
|
|
@@ -30353,20 +30859,21 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30353
30859
|
const { raw, fm, bodySrc, pre, markdown: markdown2, full } = got;
|
|
30354
30860
|
let tree = got.tree;
|
|
30355
30861
|
if (hasChildLinks(tree)) {
|
|
30356
|
-
|
|
30357
|
-
|
|
30862
|
+
const own2 = isUnlisted(info.slug);
|
|
30863
|
+
const dirs = own2 ? childLinkAllDirs ??= directoryChildren([...infos.values()], (slug) => `/${slug}`) : childLinkDirs ??= directoryChildren([...infos.values()].filter((i) => !isUnlisted(i.slug)), (slug) => `/${slug}`);
|
|
30864
|
+
const items3 = own2 ? childLinkAllItems ??= childLinkNav(nav) : childLinkItems ??= childLinkNav(drawn);
|
|
30358
30865
|
const unitPrefix = unit.prefix ? `${unit.prefix.replace(/^\/+|\/+$/g, "")}/` : "";
|
|
30359
30866
|
const r = realizeChildLinks(tree, {
|
|
30360
|
-
nav:
|
|
30867
|
+
nav: items3,
|
|
30361
30868
|
pageHref: `/${info.slug}`,
|
|
30362
30869
|
folderHref: (folder) => {
|
|
30363
30870
|
const f = folder.replace(/^\/+/, "");
|
|
30364
30871
|
return `/${unitPrefix && (f + "/").startsWith(unitPrefix) ? f.slice(unitPrefix.length) : f}`;
|
|
30365
30872
|
},
|
|
30366
|
-
fallbackChildren:
|
|
30873
|
+
fallbackChildren: dirs,
|
|
30367
30874
|
lookup: (href) => {
|
|
30368
30875
|
const p = infos.get(navKey(href).replace(/^\//, ""));
|
|
30369
|
-
if (!p) return void 0;
|
|
30876
|
+
if (!p || !own2 && isUnlisted(p.slug)) return void 0;
|
|
30370
30877
|
const tags = p.data?.tags;
|
|
30371
30878
|
const stub = aliasOf(href);
|
|
30372
30879
|
return { title: stub ? stub.title ?? "" : p.title, description: stub ? stub.description : p.description, data: p.data, tags: Array.isArray(tags) ? tags.map(String) : void 0 };
|
|
@@ -30429,7 +30936,9 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30429
30936
|
const unloaded = (highlighter.cacheStats().unloaded ?? 0) - unloadedBefore;
|
|
30430
30937
|
if (unloaded) warnPage(info, "highlight", `${unloaded} code block(s) rendered without highlighting: their grammar was not loaded before the page rendered`);
|
|
30431
30938
|
const postHead = post ? postHeader(post, lang, t_, (src) => resolver.asset(src)) : void 0;
|
|
30432
|
-
const
|
|
30939
|
+
const hidden = isUnlisted(info.slug);
|
|
30940
|
+
const pageTrail = hidden ? trail : listedTrail;
|
|
30941
|
+
const navNode = pageTrail.get(info.slug)?.at(-1);
|
|
30433
30942
|
if (navNode?.children.length && !hasProse(tree)) body += childLinks2(navNode.children, (s) => pageRefs.get(s), info.out, cfg.linkStyle, infos);
|
|
30434
30943
|
const layoutName = str6(fm.layout) ?? (post ? "blank" : cfg.layout);
|
|
30435
30944
|
const tocMode = fm.toc === false ? "off" : ["top", "popover", "rail", "off"].includes(fm.toc) ? fm.toc : cfg.toc;
|
|
@@ -30450,13 +30959,14 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30450
30959
|
const out = pageRefs.get(slug)?.out ?? staticNav.get(slug);
|
|
30451
30960
|
return out !== void 0 ? hrefBetween(info.out, out, cfg.linkStyle) : void 0;
|
|
30452
30961
|
};
|
|
30453
|
-
const chain =
|
|
30454
|
-
const pos = readingOrder.indexOf(info.slug);
|
|
30455
|
-
const prevSlug = pos > 0 ? readingOrder[pos - 1] : void 0;
|
|
30456
|
-
const nextSlug = pos >= 0 && pos < readingOrder.length - 1 ? readingOrder[pos + 1] : void 0;
|
|
30962
|
+
const chain = pageTrail.get(info.slug) ?? [];
|
|
30457
30963
|
const unitRoot = rootPrefix(info.out);
|
|
30458
30964
|
const siteRoot = unitRoot + siteDepthPrefix;
|
|
30459
30965
|
const homeHref = hrefBetween(info.out, "index.html", cfg.linkStyle);
|
|
30966
|
+
const { order: walk = readingOrder, ...side } = sidebarOf(info.slug, chain, info.out, hrefTo, homeHref);
|
|
30967
|
+
const pos = walk.indexOf(info.slug);
|
|
30968
|
+
const prevSlug = pos > 0 ? walk[pos - 1] : void 0;
|
|
30969
|
+
const nextSlug = pos >= 0 && pos < walk.length - 1 ? walk[pos + 1] : void 0;
|
|
30460
30970
|
const mdOut = markdownFile(info.out, cfg.linkStyle);
|
|
30461
30971
|
const pageUrl = absoluteUrl(cfg, unit.prefix, servedPath(info.out, cfg.linkStyle));
|
|
30462
30972
|
const canon = pageCanonical(cfg, unit, state.canonical ?? /* @__PURE__ */ new Map(), { slug: info.slug, frontmatter: fm }, {
|
|
@@ -30485,8 +30995,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30485
30995
|
homeHref,
|
|
30486
30996
|
headings: ctx.headings,
|
|
30487
30997
|
toc: tocMode,
|
|
30488
|
-
|
|
30489
|
-
navOptions: { current: info.slug, trail: new Set(chain), href: hrefTo, full: fullNav, client: clientNav, cache: state.navCache, cacheKey: `${unit.prefix}\0${dirname(info.out)}` },
|
|
30998
|
+
...side,
|
|
30490
30999
|
breadcrumb: [
|
|
30491
31000
|
{ label: t_("home"), href: homeHref },
|
|
30492
31001
|
...chain.map((n) => ({ label: n.label, href: n.slug != null ? hrefTo(n.slug) : void 0 }))
|
|
@@ -30495,7 +31004,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30495
31004
|
prev: prevSlug ? { label: infos.get(prevSlug).title, href: hrefTo(prevSlug) } : void 0,
|
|
30496
31005
|
next: nextSlug ? { label: infos.get(nextSlug).title, href: hrefTo(nextSlug) } : void 0
|
|
30497
31006
|
},
|
|
30498
|
-
tagChips: tagChips(Array.isArray(fm.tags) ? fm.tags : [], cfg, (tagPath) => hrefBetween(info.out, tagPath, cfg.linkStyle)),
|
|
31007
|
+
tagChips: tagChips(Array.isArray(fm.tags) ? fm.tags : [], cfg, (tagPath) => hrefBetween(info.out, tagPath, cfg.linkStyle), hidden ? (slug) => table2.pages.has(slug) : void 0),
|
|
30499
31008
|
badges: fieldBadges(fm, cfg, (target) => hrefBetween(info.out, target, cfg.linkStyle)),
|
|
30500
31009
|
post: postHead,
|
|
30501
31010
|
products: productOptions(unit, cfg, siteRoot, t_),
|
|
@@ -30517,14 +31026,14 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30517
31026
|
url: canon.url,
|
|
30518
31027
|
home: info.slug === "",
|
|
30519
31028
|
// Only a canonical, indexable page lists its languages: search engines ignore hreflang between other URLs.
|
|
30520
|
-
alternates: canon.target.kind === "self" && !(cfg.noindex || fm.noindex === true || fm.draft === true || canon.noindex) ? hreflangFor(cfg, unit, allUnits, state.languages, info.slug) : [],
|
|
31029
|
+
alternates: canon.target.kind === "self" && !(cfg.noindex || fm.noindex === true || fm.draft === true || canon.noindex || hidden) ? hreflangFor(cfg, unit, allUnits, state.languages, info.slug) : [],
|
|
30521
31030
|
breadcrumb: siteBase(cfg) ? chain.map((n) => {
|
|
30522
31031
|
const ref = n.slug != null && !n.fragment ? pageRefs.get(n.slug) : void 0;
|
|
30523
31032
|
return { name: n.label, url: ref ? absoluteUrl(cfg, unit.prefix, servedPath(ref.out, cfg.linkStyle)) : void 0 };
|
|
30524
31033
|
}) : void 0,
|
|
30525
31034
|
image: str6(fm.ogImage) ?? cfg.ogImage,
|
|
30526
31035
|
pageType: str6(fm.type),
|
|
30527
|
-
noindex: cfg.noindex || fm.noindex === true || fm.draft === true || canon.noindex,
|
|
31036
|
+
noindex: cfg.noindex || fm.noindex === true || fm.draft === true || canon.noindex || hidden,
|
|
30528
31037
|
nofollow: cfg.nofollow || fm.nofollow === true,
|
|
30529
31038
|
twitterHandle: cfg.twitterHandle,
|
|
30530
31039
|
themeColor: cfg.themeColor,
|
|
@@ -30537,7 +31046,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30537
31046
|
templates
|
|
30538
31047
|
);
|
|
30539
31048
|
if (cfg.mdMirror) await emit(prefix + mdOut, markdown2);
|
|
30540
|
-
records.set(info.slug, {
|
|
31049
|
+
if (!hidden) records.set(info.slug, {
|
|
30541
31050
|
slug: info.slug,
|
|
30542
31051
|
out: info.out,
|
|
30543
31052
|
title: detach(title),
|
|
@@ -30557,7 +31066,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30557
31066
|
zipBudget -= z.length;
|
|
30558
31067
|
}
|
|
30559
31068
|
}
|
|
30560
|
-
const unsearched = fm.excludeFromSearch === true || fm.pagefindExclude === true;
|
|
31069
|
+
const unsearched = fm.excludeFromSearch === true || fm.pagefindExclude === true || hidden;
|
|
30561
31070
|
await emit(prefix + info.out, cfg.search && cfg.searchEngine !== "builtin" ? pagefindMarkup(html, { exclude: unsearched }) : html);
|
|
30562
31071
|
if (search && txt && !unsearched) {
|
|
30563
31072
|
search.add(
|
|
@@ -30578,7 +31087,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30578
31087
|
if (mode.lazy) {
|
|
30579
31088
|
for (const info of infos.values()) {
|
|
30580
31089
|
if (replaced != null && info.slug === replaced) continue;
|
|
30581
|
-
records.set(info.slug, { slug: info.slug, out: info.out, title: info.title, summary: truncate(info.description ?? ""), noindex: cfg.noindex });
|
|
31090
|
+
if (!isUnlisted(info.slug)) records.set(info.slug, { slug: info.slug, out: info.out, title: info.title, summary: truncate(info.description ?? ""), noindex: cfg.noindex });
|
|
30582
31091
|
state.pageOut.set([unit.prefix, info.slug].filter(Boolean).join("/"), prefix + info.out);
|
|
30583
31092
|
}
|
|
30584
31093
|
} else if (input.highlightPool) {
|
|
@@ -30605,14 +31114,16 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30605
31114
|
if (MERGED_FILES.has(a)) warn("site", `${a} is copied to ${prefix}${a}, where hosts do not read it: they read _headers and _redirects at the site root only, from the unit served there`, { file: abs(a) });
|
|
30606
31115
|
await emit(prefix + a, files.get(a));
|
|
30607
31116
|
}
|
|
30608
|
-
const pagesJs = `(window.__DOGSBAY_PAGES__=window.__DOGSBAY_PAGES__||{})[${JSON.stringify(unit.prefix)}]=${JSON.stringify([...[...infos.values()].filter((i) => i.slug !== replaced).map((i) => i.out), ...generatedOuts])};
|
|
31117
|
+
const pagesJs = `(window.__DOGSBAY_PAGES__=window.__DOGSBAY_PAGES__||{})[${JSON.stringify(unit.prefix)}]=${JSON.stringify([...[...infos.values()].filter((i) => i.slug !== replaced && !isUnlisted(i.slug)).map((i) => i.out), ...generatedOuts])};
|
|
30609
31118
|
`;
|
|
30610
31119
|
await emit(prefix + "_dogsbay/pages.js", pagesJs);
|
|
30611
31120
|
const unitHref = (slug) => {
|
|
30612
31121
|
const out = pageRefs.get(slug)?.out ?? staticNav.get(slug);
|
|
30613
31122
|
return out === void 0 ? void 0 : hrefFrom("index.html", out, cfg.linkStyle);
|
|
30614
31123
|
};
|
|
30615
|
-
await emit(prefix + "_dogsbay/nav.js", `window.__DOGSBAY_NAV__=${JSON.stringify(compactNav(
|
|
31124
|
+
await emit(prefix + "_dogsbay/nav.js", `window.__DOGSBAY_NAV__=${JSON.stringify(compactNav(drawn, unitHref)).replace(/<\//g, "<\\/")};
|
|
31125
|
+
`);
|
|
31126
|
+
if (scoper) for (const sc of scoper.all()) await emit(`${prefix}_dogsbay/nav/${sc.key}.js`, `window.__DOGSBAY_NAV__=${JSON.stringify(compactNav(sc.nodes, unitHref)).replace(/<\//g, "<\\/")};
|
|
30616
31127
|
`);
|
|
30617
31128
|
if (search) {
|
|
30618
31129
|
const written = search;
|
|
@@ -30632,7 +31143,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30632
31143
|
const llmsNav2 = (
|
|
30633
31144
|
// The order the nav sorts by (navOrder: a number, else none), not the raw keys: `order: "1"` neither
|
|
30634
31145
|
// orders the nav nor stops newest first.
|
|
30635
|
-
posts.length && postsInDateOrder({ blog: true, navFromFile: navFiles.length > 0, frontmatters: posts.map((p) => ({ order: infos.get(p.slug)?.order })) }) ? postsNewestFirst(
|
|
31146
|
+
posts.length && postsInDateOrder({ blog: true, navFromFile: navFiles.length > 0, frontmatters: posts.map((p) => ({ order: infos.get(p.slug)?.order })) }) ? postsNewestFirst(drawn, (n) => n.slug == null ? void 0 : rank.get(n.slug)) : drawn
|
|
30636
31147
|
);
|
|
30637
31148
|
await emit(prefix + "llms.txt", buildLlmsTxt2(cfg.name, cfg.description, llmsNav2, records, { file: "llms.txt", urls, whenToUse: cfg.llmsWhenToUse, aggregates: cfg.aggregates }));
|
|
30638
31149
|
for (const group of llmsNav2) {
|
|
@@ -30815,8 +31326,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30815
31326
|
homeHref,
|
|
30816
31327
|
headings: [],
|
|
30817
31328
|
toc: "off",
|
|
30818
|
-
|
|
30819
|
-
navOptions: { current: "\0", trail: /* @__PURE__ */ new Set(), href: hrefTo, full: fullNav, client: clientNav, cache: state.navCache, cacheKey: `${unit.prefix}\0${dirname(out)}` },
|
|
31329
|
+
...(({ order: _, ...side }) => side)(sidebarOf(void 0, [], out, hrefTo, homeHref)),
|
|
30820
31330
|
breadcrumb: [],
|
|
30821
31331
|
products: o.absolute ? [] : productOptions(unit, cfg, siteRoot, t_),
|
|
30822
31332
|
// No version or language menus on a page served at any path (the Astro 404 has none).
|
|
@@ -30981,17 +31491,22 @@ var CHIP_PALETTE = {
|
|
|
30981
31491
|
slate: "border-slate-500/40 bg-slate-500/15 text-slate-700 dark:text-slate-300"
|
|
30982
31492
|
};
|
|
30983
31493
|
var CHIP_DEFAULT = "border-border bg-secondary text-secondary-foreground hover:bg-accent hover:text-accent-foreground";
|
|
30984
|
-
function tagChips(tags, cfg, href) {
|
|
31494
|
+
function tagChips(tags, cfg, href, built) {
|
|
30985
31495
|
const def = cfg.taxonomies.find((x) => x.name === "tags");
|
|
30986
31496
|
if (!def) return [];
|
|
30987
|
-
return buildChips(tags, { indexPath: "", prefixes: def.prefixes, labels: def.labels, autoColor: def.autoColor }).map((c) =>
|
|
30988
|
-
|
|
30989
|
-
|
|
30990
|
-
|
|
30991
|
-
|
|
30992
|
-
|
|
30993
|
-
|
|
30994
|
-
|
|
31497
|
+
return buildChips(tags, { indexPath: "", prefixes: def.prefixes, labels: def.labels, autoColor: def.autoColor }).map((c) => {
|
|
31498
|
+
const parts = c.tag.split("/").filter(Boolean);
|
|
31499
|
+
const slug = `${def.path}/${parts.join("/")}`;
|
|
31500
|
+
return {
|
|
31501
|
+
tag: c.tag,
|
|
31502
|
+
label: c.leafLabel,
|
|
31503
|
+
prefix: c.prefixLabel ?? void 0,
|
|
31504
|
+
// A tag that is not a term (an unsafe path), or whose page is not built (only unlisted pages carry it),
|
|
31505
|
+
// gets no link rather than a path outside the site or to no page.
|
|
31506
|
+
href: parts.every(safeSegment) && (built?.(slug) ?? true) ? href(generatedOut(slug, cfg)) : void 0,
|
|
31507
|
+
cls: `${CHIP_BASE} ${c.color ? CHIP_PALETTE[c.color] : CHIP_DEFAULT}`
|
|
31508
|
+
};
|
|
31509
|
+
});
|
|
30995
31510
|
}
|
|
30996
31511
|
var TYPE_BADGE_BASE = "inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-semibold capitalize";
|
|
30997
31512
|
var TYPE_BADGE_STYLE = {
|