@dogsbay/ssg-cli 0.2.0-beta.177 → 0.2.0-beta.179
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-OG5RROLI.mjs → build-command-6FIW5T7T.mjs} +1 -1
- package/chunks/{check-command-VTCIWCWK.mjs → check-command-57FHOWYE.mjs} +2 -2
- package/chunks/{chunk-7KLVHGAF.mjs → chunk-LOCUA7KI.mjs} +782 -134
- package/chunks/{chunk-SAXT3272.mjs → chunk-NWU47LUN.mjs} +1 -1
- package/chunks/{dev-PNLHC36G.mjs → dev-OX4NVOZ3.mjs} +16 -11
- package/chunks/{publish-command-NAFJ7475.mjs → publish-command-EPRXQCMM.mjs} +1 -1
- package/chunks/{release-diff-C4DQAUQE.mjs → release-diff-VEGTEHOM.mjs} +2 -2
- package/cli.mjs +6 -6
- package/package.json +2 -2
|
@@ -3100,8 +3100,8 @@ var require_index_cjs4 = __commonJS({
|
|
|
3100
3100
|
const indent2 = initial + indentAfterMarker;
|
|
3101
3101
|
token = state.push("list_item_open", "li", 1);
|
|
3102
3102
|
token.markup = String.fromCharCode(markerCharCode);
|
|
3103
|
-
const
|
|
3104
|
-
token.map =
|
|
3103
|
+
const itemLines2 = [nextLine, 0];
|
|
3104
|
+
token.map = itemLines2;
|
|
3105
3105
|
if (isOrdered) token.info = state.src.slice(start, posAfterMarker - 1);
|
|
3106
3106
|
const oldTight = state.tight;
|
|
3107
3107
|
const oldTShift = state.tShift[nextLine];
|
|
@@ -3124,7 +3124,7 @@ var require_index_cjs4 = __commonJS({
|
|
|
3124
3124
|
token = state.push("list_item_close", "li", -1);
|
|
3125
3125
|
token.markup = String.fromCharCode(markerCharCode);
|
|
3126
3126
|
nextLine = state.line;
|
|
3127
|
-
|
|
3127
|
+
itemLines2[1] = nextLine;
|
|
3128
3128
|
if (nextLine >= endLine) break;
|
|
3129
3129
|
if (state.sCount[nextLine] < state.blkIndent) break;
|
|
3130
3130
|
if (state.sCount[nextLine] - state.blkIndent >= 4) break;
|
|
@@ -6418,8 +6418,8 @@ function deflist_plugin(md2) {
|
|
|
6418
6418
|
state.push("dt_close", "dt", -1);
|
|
6419
6419
|
for (; ; ) {
|
|
6420
6420
|
const token_dd_o = state.push("dd_open", "dd", 1);
|
|
6421
|
-
const
|
|
6422
|
-
token_dd_o.map =
|
|
6421
|
+
const itemLines2 = [nextLine, 0];
|
|
6422
|
+
token_dd_o.map = itemLines2;
|
|
6423
6423
|
let pos = contentStart;
|
|
6424
6424
|
const max = state.eMarks[ddLine];
|
|
6425
6425
|
let offset = state.sCount[ddLine] + contentStart - (state.bMarks[ddLine] + state.tShift[ddLine]);
|
|
@@ -6460,7 +6460,7 @@ function deflist_plugin(md2) {
|
|
|
6460
6460
|
state.blkIndent = oldIndent;
|
|
6461
6461
|
state.ddIndent = oldDDIndent;
|
|
6462
6462
|
state.push("dd_close", "dd", -1);
|
|
6463
|
-
|
|
6463
|
+
itemLines2[1] = nextLine = state.line;
|
|
6464
6464
|
if (nextLine >= endLine) {
|
|
6465
6465
|
break OUTER;
|
|
6466
6466
|
}
|
|
@@ -10728,13 +10728,21 @@ function renderParagraph(node, ctx) {
|
|
|
10728
10728
|
}
|
|
10729
10729
|
return "";
|
|
10730
10730
|
}
|
|
10731
|
+
function writtenFence(node, content, info) {
|
|
10732
|
+
const fence = node.meta?.fence;
|
|
10733
|
+
if (typeof fence !== "string" || fence.length > 100 || !/^(?:`{3,}|~{3,})$/.test(fence))
|
|
10734
|
+
return void 0;
|
|
10735
|
+
if (fence[0] === "`" && info.includes("`"))
|
|
10736
|
+
return void 0;
|
|
10737
|
+
const closes = new RegExp(`^ {0,3}${fence[0] === "`" ? "`" : "~"}{${fence.length},}[ \\t]*$`);
|
|
10738
|
+
return content.split("\n").some((line) => closes.test(line)) ? void 0 : fence;
|
|
10739
|
+
}
|
|
10731
10740
|
function renderCode(node) {
|
|
10732
10741
|
const content = node.html ?? node.props?.code ?? "";
|
|
10733
10742
|
const lang = node.props?.language ?? node.props?.lang ?? "";
|
|
10734
10743
|
if (node.meta?.indented === true && !Object.keys(node.props ?? {}).length && /\S/.test(content.split("\n")[0] ?? "") && /\S/.test(content.split("\n").at(-1) ?? "")) {
|
|
10735
10744
|
return content.split("\n").map((line) => line === "" ? "" : ` ${line}`).join("\n");
|
|
10736
10745
|
}
|
|
10737
|
-
const fence = pickCodeFence2(content);
|
|
10738
10746
|
const attrKeys = [
|
|
10739
10747
|
"title",
|
|
10740
10748
|
"highlights",
|
|
@@ -10772,6 +10780,7 @@ function renderCode(node) {
|
|
|
10772
10780
|
if (attrParts.length > 0) {
|
|
10773
10781
|
infoLine = `${infoLine}${infoLine ? " " : ""}{${attrParts.join(" ")}}`;
|
|
10774
10782
|
}
|
|
10783
|
+
const fence = writtenFence(node, content, infoLine) ?? pickCodeFence2(content);
|
|
10775
10784
|
return `${fence}${infoLine}
|
|
10776
10785
|
${content.replace(/\n$/, "")}
|
|
10777
10786
|
${fence}`;
|
|
@@ -10968,11 +10977,12 @@ function renderTable(node, ctx) {
|
|
|
10968
10977
|
});
|
|
10969
10978
|
const row = (cells) => "|" + cells.map((c) => c ? ` ${c} ` : " ").join("|") + "|";
|
|
10970
10979
|
const lines = [
|
|
10971
|
-
row(headerCells),
|
|
10980
|
+
writtenRow(headerRow, headerCells) ?? row(headerCells),
|
|
10972
10981
|
writtenDelimiter(node, separator) ?? row(separator)
|
|
10973
10982
|
];
|
|
10974
10983
|
for (const r of bodyRows) {
|
|
10975
|
-
|
|
10984
|
+
const cells = (r.children ?? []).map((c) => renderTableCell(c));
|
|
10985
|
+
lines.push(writtenRow(r, cells) ?? row(cells));
|
|
10976
10986
|
}
|
|
10977
10987
|
const pipe = lines.join("\n");
|
|
10978
10988
|
const attrs2 = renderAttrs(splitProps(node.props));
|
|
@@ -10992,6 +11002,50 @@ function writtenDelimiter(node, separator) {
|
|
|
10992
11002
|
const align = (c) => c.startsWith(":") ? c.endsWith(":") ? "c" : "l" : c.endsWith(":") ? "r" : "";
|
|
10993
11003
|
return cells.every((c, i) => align(c) === align(separator[i])) ? written : void 0;
|
|
10994
11004
|
}
|
|
11005
|
+
function splitWrittenRow(line) {
|
|
11006
|
+
const cells = [];
|
|
11007
|
+
let cell = "";
|
|
11008
|
+
for (let i = 0; i < line.length; i++) {
|
|
11009
|
+
const ch = line[i];
|
|
11010
|
+
if (ch === "\\" && i + 1 < line.length) {
|
|
11011
|
+
cell += ch + line[++i];
|
|
11012
|
+
} else if (ch === "|") {
|
|
11013
|
+
cells.push(cell);
|
|
11014
|
+
cell = "";
|
|
11015
|
+
} else
|
|
11016
|
+
cell += ch;
|
|
11017
|
+
}
|
|
11018
|
+
cells.push(cell);
|
|
11019
|
+
const lead = /^[ \t]*$/.test(cells[0]) && cells.length > 1;
|
|
11020
|
+
const trail = /^[ \t]*$/.test(cells[cells.length - 1]) && cells.length > (lead ? 2 : 1);
|
|
11021
|
+
return { cells: cells.slice(lead ? 1 : 0, trail ? -1 : void 0), lead, trail };
|
|
11022
|
+
}
|
|
11023
|
+
function writtenRow(row, cells) {
|
|
11024
|
+
const written = row.meta?.row;
|
|
11025
|
+
if (typeof written !== "string" || written.length > 1e4 || /[\r\n]/.test(written) || !written.includes("|"))
|
|
11026
|
+
return void 0;
|
|
11027
|
+
const { cells: raw, lead, trail } = splitWrittenRow(written);
|
|
11028
|
+
if (raw.length !== cells.length || !cells.length)
|
|
11029
|
+
return void 0;
|
|
11030
|
+
if (!lead && !cells[0] || !trail && !cells[cells.length - 1])
|
|
11031
|
+
return void 0;
|
|
11032
|
+
if (!lead && raw[0].trim() !== cells[0])
|
|
11033
|
+
return void 0;
|
|
11034
|
+
const out = cells.map((text4, i) => {
|
|
11035
|
+
const was = raw[i];
|
|
11036
|
+
if (was.trim() === text4)
|
|
11037
|
+
return was;
|
|
11038
|
+
const before = /^[ \t]*/.exec(was)[0];
|
|
11039
|
+
const after = /[ \t]*$/.exec(was)[0];
|
|
11040
|
+
if (!text4)
|
|
11041
|
+
return " ".repeat(Math.max(1, was.length));
|
|
11042
|
+
const body = before + text4;
|
|
11043
|
+
if (i === cells.length - 1 && !trail)
|
|
11044
|
+
return body;
|
|
11045
|
+
return body + " ".repeat(Math.max(after.length || text4.endsWith("\\") ? 1 : 0, was.length - body.length));
|
|
11046
|
+
});
|
|
11047
|
+
return (lead ? "|" : "") + out.join("|") + (trail ? "|" : "");
|
|
11048
|
+
}
|
|
10995
11049
|
function cellIsComplex(cell) {
|
|
10996
11050
|
const cs = Number(cell.props?.colspan ?? 1);
|
|
10997
11051
|
const rs = Number(cell.props?.rowspan ?? 1);
|
|
@@ -11162,6 +11216,10 @@ function renderTabs(node, ctx) {
|
|
|
11162
11216
|
const body2 = children.map((c) => renderNode(c, ctx)).join("\n\n");
|
|
11163
11217
|
return renderBlockDirective({ name: "tabs", props: node.props, body: body2 }, ctx);
|
|
11164
11218
|
}
|
|
11219
|
+
if (tabs2.some(isEmptyItem)) {
|
|
11220
|
+
const body2 = tabs2.map((tab) => renderBlockDirective({ name: "tab", props: tab.props, body: (tab.children ?? []).map((c) => renderNode(c, ctx)).join("\n\n") }, ctx)).join("\n\n");
|
|
11221
|
+
return renderBlockDirective({ name: "tabs", props: node.props, body: body2 }, ctx);
|
|
11222
|
+
}
|
|
11165
11223
|
const items3 = tabs2.map((tab) => renderTabItem(tab, ctx));
|
|
11166
11224
|
const body = items3.join("\n\n");
|
|
11167
11225
|
return renderBlockDirective({ name: "tabs", props: node.props, body }, ctx);
|
|
@@ -11169,6 +11227,9 @@ function renderTabs(node, ctx) {
|
|
|
11169
11227
|
function termLabel(text4) {
|
|
11170
11228
|
return inlineToDogsbayMd([{ type: "text", text: text4 }], { blockEnd: false }).replace(/^(\s*)([-+*>#]|\d+[.)])(?=\s|$)/, (_, ws, m) => `${ws}${m.replace(/[-+*>#.)]/, (c) => `\\${c}`)}`).replace(/\{/g, "\\{");
|
|
11171
11229
|
}
|
|
11230
|
+
function isEmptyItem(node) {
|
|
11231
|
+
return !(node.children ?? []).length && !(node.inline ?? []).length;
|
|
11232
|
+
}
|
|
11172
11233
|
function renderTabItem(node, ctx) {
|
|
11173
11234
|
const label = termLabel(String(node.props?.label ?? node.props?.title ?? node.props?.value ?? "Tab"));
|
|
11174
11235
|
const content = (node.children ?? []).map((c) => renderNode(joinCodeBreaks(c), ctx)).join("\n\n");
|
|
@@ -11330,6 +11391,10 @@ ${definition}`);
|
|
|
11330
11391
|
}
|
|
11331
11392
|
function renderAccordion(node, ctx) {
|
|
11332
11393
|
const items3 = (node.children ?? []).filter((c) => c.type === "accordion-item");
|
|
11394
|
+
if (items3.some(isEmptyItem)) {
|
|
11395
|
+
const body2 = items3.map((item) => renderAccordionItem(item, ctx)).join("\n\n");
|
|
11396
|
+
return renderBlockDirective({ name: "accordion", props: node.props, body: body2 }, ctx);
|
|
11397
|
+
}
|
|
11333
11398
|
if (items3.length > 0) {
|
|
11334
11399
|
const blocks = items3.map((item) => renderAccordionDefItem(item, ctx));
|
|
11335
11400
|
const body2 = blocks.join("\n\n");
|
|
@@ -12072,6 +12137,12 @@ function consumeParagraph(ctx) {
|
|
|
12072
12137
|
if (Object.keys(props).length > 0)
|
|
12073
12138
|
node.props = props;
|
|
12074
12139
|
}
|
|
12140
|
+
if (open.map && open.map[1] - open.map[0] === 1 && !node.props) {
|
|
12141
|
+
const line = ctx.lineOf?.(open.map[0]);
|
|
12142
|
+
oneLine2.set(node, line);
|
|
12143
|
+
if (line !== void 0)
|
|
12144
|
+
termLines.set(node, { line, endLine: line });
|
|
12145
|
+
}
|
|
12075
12146
|
return node;
|
|
12076
12147
|
}
|
|
12077
12148
|
function consumeList(ctx, ordered) {
|
|
@@ -12282,8 +12353,10 @@ function consumeCode(ctx) {
|
|
|
12282
12353
|
type: "code",
|
|
12283
12354
|
props,
|
|
12284
12355
|
html: tok.content.replace(/\n$/, ""),
|
|
12285
|
-
// Indented code as written (`asWritten`): the serializer writes it indented again
|
|
12286
|
-
|
|
12356
|
+
// Indented code as written (`asWritten`): the serializer writes it indented again; a fence's
|
|
12357
|
+
// character and length (```` ```` ````, `~~~`), which it keeps while the code allows them
|
|
12358
|
+
...keepWritten && tok.type === "code_block" ? { meta: { indented: true } } : {},
|
|
12359
|
+
...keepWritten && tok.type === "fence" && /^(?:`{3,}|~{3,})$/.test(tok.markup) ? { meta: { fence: tok.markup } } : {}
|
|
12287
12360
|
};
|
|
12288
12361
|
}
|
|
12289
12362
|
function consumeHtmlBlock(ctx) {
|
|
@@ -12341,7 +12414,11 @@ function consumeTableSection(ctx, sectionType, closeType) {
|
|
|
12341
12414
|
break;
|
|
12342
12415
|
}
|
|
12343
12416
|
if (tok.type === "tr_open") {
|
|
12344
|
-
|
|
12417
|
+
const line = keepWritten && tok.map && tok.map[1] === tok.map[0] + 1 ? ctx.lines?.[tok.map[0]]?.replace(/^[ \t>]*/, "").trimEnd() : void 0;
|
|
12418
|
+
const row = consumeTableRow(ctx);
|
|
12419
|
+
if (line && line.length <= 1e4)
|
|
12420
|
+
row.meta = { row: line };
|
|
12421
|
+
rows.push(row);
|
|
12345
12422
|
} else {
|
|
12346
12423
|
ctx.i++;
|
|
12347
12424
|
}
|
|
@@ -12391,6 +12468,7 @@ function consumeDeflist(ctx) {
|
|
|
12391
12468
|
break;
|
|
12392
12469
|
}
|
|
12393
12470
|
if (tok.type === "dt_open") {
|
|
12471
|
+
const dtLine = tok.map && ctx.lineOf ? ctx.lineOf(tok.map[0]) : void 0;
|
|
12394
12472
|
ctx.i++;
|
|
12395
12473
|
const inlineTok = ctx.tokens[ctx.i];
|
|
12396
12474
|
const inline3 = inlineTok?.children ? tokensToInline(inlineTok.children) : [];
|
|
@@ -12399,8 +12477,12 @@ function consumeDeflist(ctx) {
|
|
|
12399
12477
|
ctx.i++;
|
|
12400
12478
|
if (ctx.i < ctx.tokens.length)
|
|
12401
12479
|
ctx.i++;
|
|
12402
|
-
|
|
12480
|
+
const dt = { type: "dt", inline: inline3 };
|
|
12481
|
+
if (dtLine !== void 0)
|
|
12482
|
+
termLines.set(dt, { line: dtLine, endLine: dtLine });
|
|
12483
|
+
children.push(dt);
|
|
12403
12484
|
} else if (tok.type === "dd_open") {
|
|
12485
|
+
const ddOpen = tok;
|
|
12404
12486
|
ctx.i++;
|
|
12405
12487
|
const innerChildren = [];
|
|
12406
12488
|
while (ctx.i < ctx.tokens.length && ctx.tokens[ctx.i].type !== "dd_close") {
|
|
@@ -12416,7 +12498,12 @@ function consumeDeflist(ctx) {
|
|
|
12416
12498
|
}
|
|
12417
12499
|
if (ctx.i < ctx.tokens.length)
|
|
12418
12500
|
ctx.i++;
|
|
12419
|
-
|
|
12501
|
+
const ddLine = ddOpen.map && ctx.lineOf ? ctx.lineOf(ddOpen.map[0]) : void 0;
|
|
12502
|
+
const ddEnd = ddLine !== void 0 ? endLineOf(ctx, ddOpen.map, ddOpen.type) ?? ddLine : void 0;
|
|
12503
|
+
const dd = { type: "dd", children: innerChildren };
|
|
12504
|
+
if (ddLine !== void 0)
|
|
12505
|
+
termLines.set(dd, { line: ddLine, endLine: ddEnd });
|
|
12506
|
+
children.push(dd);
|
|
12420
12507
|
} else {
|
|
12421
12508
|
ctx.i++;
|
|
12422
12509
|
}
|
|
@@ -12641,27 +12728,70 @@ function mapContainerToTreeNode(name, attrs2, children) {
|
|
|
12641
12728
|
}
|
|
12642
12729
|
return { type: name, props, children };
|
|
12643
12730
|
}
|
|
12731
|
+
function itemLines(dt, dd) {
|
|
12732
|
+
const line = termLines.get(dt)?.line;
|
|
12733
|
+
if (line === void 0)
|
|
12734
|
+
return void 0;
|
|
12735
|
+
const end = dd && termLines.get(dd)?.endLine;
|
|
12736
|
+
return { line, endLine: end !== void 0 && end >= line ? end : line };
|
|
12737
|
+
}
|
|
12738
|
+
function definitions(list5, i) {
|
|
12739
|
+
let j = i + 1;
|
|
12740
|
+
const children = [];
|
|
12741
|
+
while (list5[j]?.type === "dd")
|
|
12742
|
+
children.push(...list5[j++].children ?? []);
|
|
12743
|
+
return j > i + 1 ? { children, last: list5[j - 1], count: j - i - 1 } : void 0;
|
|
12744
|
+
}
|
|
12745
|
+
var termLines = /* @__PURE__ */ new WeakMap();
|
|
12746
|
+
var oneLine2 = /* @__PURE__ */ new WeakMap();
|
|
12747
|
+
function plainLabel(inline3) {
|
|
12748
|
+
return inline3.every((n) => n.type === "text" && Object.keys(n).every((k) => k === "type" || k === "text")) && inline3.some((n) => n.text?.trim());
|
|
12749
|
+
}
|
|
12750
|
+
function groupTerms(children) {
|
|
12751
|
+
const from = children.findIndex((c) => c.type === "deflist");
|
|
12752
|
+
if (from < 0)
|
|
12753
|
+
return void 0;
|
|
12754
|
+
let to = from;
|
|
12755
|
+
for (let k = from; k < children.length; k++)
|
|
12756
|
+
if (children[k].type === "deflist")
|
|
12757
|
+
to = k;
|
|
12758
|
+
const list5 = [];
|
|
12759
|
+
for (let k = from; k <= to; k++) {
|
|
12760
|
+
const c = children[k];
|
|
12761
|
+
if (c.type === "deflist")
|
|
12762
|
+
list5.push(...c.children ?? []);
|
|
12763
|
+
else if (c.type === "paragraph" && oneLine2.has(c) && plainLabel(c.inline ?? [])) {
|
|
12764
|
+
const dt = { type: "dt", inline: c.inline ?? [] };
|
|
12765
|
+
const lines = termLines.get(c);
|
|
12766
|
+
if (lines)
|
|
12767
|
+
termLines.set(dt, lines);
|
|
12768
|
+
list5.push(dt);
|
|
12769
|
+
} else
|
|
12770
|
+
return void 0;
|
|
12771
|
+
}
|
|
12772
|
+
return { list: list5, from, to };
|
|
12773
|
+
}
|
|
12644
12774
|
function accordionFromChildren(props, children) {
|
|
12645
|
-
|
|
12646
|
-
|
|
12775
|
+
const group = groupTerms(children);
|
|
12776
|
+
if (group && group.from === 0 && group.to === children.length - 1) {
|
|
12647
12777
|
const items3 = [];
|
|
12648
|
-
const list5 =
|
|
12778
|
+
const list5 = group.list;
|
|
12649
12779
|
const usedValues = /* @__PURE__ */ new Set();
|
|
12650
12780
|
let fallbackCounter = 1;
|
|
12651
12781
|
for (let i = 0; i < list5.length; i++) {
|
|
12652
12782
|
if (list5[i].type === "dt") {
|
|
12653
12783
|
const label = inlineText(list5[i].inline ?? []);
|
|
12654
|
-
const dd = list5
|
|
12655
|
-
|
|
12656
|
-
|
|
12657
|
-
|
|
12658
|
-
|
|
12659
|
-
|
|
12660
|
-
|
|
12661
|
-
|
|
12662
|
-
}
|
|
12663
|
-
|
|
12664
|
-
|
|
12784
|
+
const dd = definitions(list5, i);
|
|
12785
|
+
const value = uniqueAccordionValue(label, usedValues, () => `item-${fallbackCounter++}`);
|
|
12786
|
+
usedValues.add(value);
|
|
12787
|
+
const meta2 = itemLines(list5[i], dd?.last);
|
|
12788
|
+
items3.push({
|
|
12789
|
+
type: "accordion-item",
|
|
12790
|
+
props: { value, label },
|
|
12791
|
+
children: dd?.children ?? [],
|
|
12792
|
+
...meta2 ? { meta: meta2 } : {}
|
|
12793
|
+
});
|
|
12794
|
+
i += dd?.count ?? 0;
|
|
12665
12795
|
}
|
|
12666
12796
|
}
|
|
12667
12797
|
return { type: "accordion", props, children: items3 };
|
|
@@ -12693,26 +12823,25 @@ function linkCardFromChildren(props, children) {
|
|
|
12693
12823
|
return { type: "link-card", props, children };
|
|
12694
12824
|
}
|
|
12695
12825
|
function tabsFromChildren(props, children) {
|
|
12696
|
-
const
|
|
12697
|
-
if (
|
|
12698
|
-
const dl = deflists[0];
|
|
12826
|
+
const group = children.some((c) => c.type === "tab") ? void 0 : groupTerms(children);
|
|
12827
|
+
if (group) {
|
|
12699
12828
|
const tabs2 = [];
|
|
12700
|
-
const list5 =
|
|
12829
|
+
const list5 = group.list;
|
|
12701
12830
|
for (let i = 0; i < list5.length; i++) {
|
|
12702
12831
|
if (list5[i].type === "dt") {
|
|
12703
12832
|
const label = inlineText(list5[i].inline ?? []);
|
|
12704
|
-
const dd = list5
|
|
12705
|
-
|
|
12706
|
-
|
|
12707
|
-
|
|
12708
|
-
|
|
12709
|
-
|
|
12710
|
-
}
|
|
12711
|
-
|
|
12712
|
-
|
|
12833
|
+
const dd = definitions(list5, i);
|
|
12834
|
+
const meta2 = itemLines(list5[i], dd?.last);
|
|
12835
|
+
tabs2.push({
|
|
12836
|
+
type: "tab",
|
|
12837
|
+
props: { label },
|
|
12838
|
+
children: dd?.children ?? [],
|
|
12839
|
+
...meta2 ? { meta: meta2 } : {}
|
|
12840
|
+
});
|
|
12841
|
+
i += dd?.count ?? 0;
|
|
12713
12842
|
}
|
|
12714
12843
|
}
|
|
12715
|
-
return { type: "tabs", props, children: children.
|
|
12844
|
+
return { type: "tabs", props, children: [...children.slice(0, group.from), ...tabs2, ...children.slice(group.to + 1)] };
|
|
12716
12845
|
}
|
|
12717
12846
|
return { type: "tabs", props, children };
|
|
12718
12847
|
}
|
|
@@ -12775,8 +12904,9 @@ function cardsFromChildren(props, children) {
|
|
|
12775
12904
|
}
|
|
12776
12905
|
function parseCardListItem(item) {
|
|
12777
12906
|
const inline3 = item.inline ?? [];
|
|
12778
|
-
if (inline3.length === 0)
|
|
12779
|
-
return null;
|
|
12907
|
+
if (inline3.length === 0) {
|
|
12908
|
+
return item.children?.length ? { type: "card", props: {}, children: item.children, ...item.meta ? { meta: item.meta } : {} } : null;
|
|
12909
|
+
}
|
|
12780
12910
|
let idx = 0;
|
|
12781
12911
|
while (idx < inline3.length) {
|
|
12782
12912
|
const n = inline3[idx];
|
|
@@ -12786,23 +12916,44 @@ function parseCardListItem(item) {
|
|
|
12786
12916
|
break;
|
|
12787
12917
|
}
|
|
12788
12918
|
const first = inline3[idx];
|
|
12789
|
-
if (!first
|
|
12790
|
-
return null;
|
|
12791
|
-
const
|
|
12792
|
-
|
|
12793
|
-
|
|
12794
|
-
|
|
12795
|
-
|
|
12796
|
-
|
|
12797
|
-
|
|
12798
|
-
|
|
12799
|
-
|
|
12800
|
-
|
|
12919
|
+
if (!first)
|
|
12920
|
+
return item.children?.length ? { type: "card", props: {}, children: item.children, ...item.meta ? { meta: item.meta } : {} } : null;
|
|
12921
|
+
const props = {};
|
|
12922
|
+
let after;
|
|
12923
|
+
if (first.type === "link") {
|
|
12924
|
+
props.title = inlineText(first.children);
|
|
12925
|
+
props.href = first.href;
|
|
12926
|
+
for (const [key2, value] of Object.entries(first.attrs ?? {})) {
|
|
12927
|
+
if (key2 !== "title" && key2 !== "href")
|
|
12928
|
+
props[key2] = value;
|
|
12929
|
+
}
|
|
12930
|
+
after = idx + 1;
|
|
12931
|
+
} else {
|
|
12932
|
+
let end = idx;
|
|
12933
|
+
const plainBold = (n) => {
|
|
12934
|
+
const t = n;
|
|
12935
|
+
return t.type === "text" && t.bold === true && !t.italic && !t.strikethrough;
|
|
12936
|
+
};
|
|
12937
|
+
while (end < inline3.length && plainBold(inline3[end]))
|
|
12938
|
+
end++;
|
|
12939
|
+
const title = inline3.slice(idx, end).map((n) => n.text).join("").trim();
|
|
12940
|
+
let look = end;
|
|
12941
|
+
while (look < inline3.length && inline3[look].type === "text" && inline3[look].text === "")
|
|
12942
|
+
look++;
|
|
12943
|
+
const next = inline3[look];
|
|
12944
|
+
const ends = next === void 0 || next.type === "break" || next.type === "text" && /^\s/.test(next.text);
|
|
12945
|
+
const ok = title !== "" && ends && !title.endsWith(":") && !(next && next.type !== "break" && next.bold);
|
|
12946
|
+
if (ok)
|
|
12947
|
+
props.title = title;
|
|
12948
|
+
after = ok ? end : idx;
|
|
12949
|
+
}
|
|
12950
|
+
const tail = inline3.slice(after);
|
|
12801
12951
|
const { attrs: tailAttrs, rest: tailRest } = stripLeadingAttrBlocks(tail);
|
|
12802
12952
|
for (const [key2, value] of Object.entries(tailAttrs)) {
|
|
12803
12953
|
if (key2 !== "title" && key2 !== "href")
|
|
12804
12954
|
props[key2] = value;
|
|
12805
12955
|
}
|
|
12956
|
+
const meta2 = item.meta ? { meta: item.meta } : {};
|
|
12806
12957
|
const lead = trimInline(tailRest);
|
|
12807
12958
|
const body = [
|
|
12808
12959
|
...lead.length ? [{ type: "paragraph", inline: lead }] : [],
|
|
@@ -12812,9 +12963,9 @@ function parseCardListItem(item) {
|
|
|
12812
12963
|
const description = inlineText(body[0].inline ?? []).trim();
|
|
12813
12964
|
if (description)
|
|
12814
12965
|
props.description = description;
|
|
12815
|
-
return { type: "card", props };
|
|
12966
|
+
return { type: "card", props, ...meta2 };
|
|
12816
12967
|
}
|
|
12817
|
-
return body.length ? { type: "card", props, children: body } : { type: "card", props };
|
|
12968
|
+
return body.length ? { type: "card", props, children: body, ...meta2 } : { type: "card", props, ...meta2 };
|
|
12818
12969
|
}
|
|
12819
12970
|
function isPlainText(n) {
|
|
12820
12971
|
if (n.type !== "text")
|
|
@@ -17262,6 +17413,8 @@ var PATHS = {
|
|
|
17262
17413
|
globe: '<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/>',
|
|
17263
17414
|
"git-branch": '<line x1="6" x2="6" y1="3" y2="15"/><circle cx="18" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><path d="M18 9a9 9 0 0 1-9 9"/>',
|
|
17264
17415
|
"list-tree": '<path d="M21 12h-8"/><path d="M21 6H8"/><path d="M21 18h-8"/><path d="M3 6v4c0 1.1.9 2 2 2h3"/><path d="M3 10v6c0 1.1.9 2 2 2h3"/>',
|
|
17416
|
+
// dogsbay-ssg 2026-11-16: a page naming lucide:history drew nothing here, where Astro draws one
|
|
17417
|
+
history: '<path d="M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5m4-1v5l4 2"/>',
|
|
17265
17418
|
printer: '<path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"/><path d="M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6"/><rect x="6" y="14" width="12" height="8" rx="1"/>',
|
|
17266
17419
|
// Lucide icons Starlight's icon names map to (format-starlight starlight-icons.ts), so a converted
|
|
17267
17420
|
// site's cards draw with no icon set loaded (the SSG, the playground)
|
|
@@ -18424,7 +18577,7 @@ function block(n, ctx) {
|
|
|
18424
18577
|
const headings = ctx.headings.length;
|
|
18425
18578
|
const inner = renderBlocks(n.children, ctx);
|
|
18426
18579
|
ctx.headings.length = headings;
|
|
18427
|
-
return `<div${attrs({ ...passthrough(p), "data-pdf": "only", hidden: true })}>${inner}</div>
|
|
18580
|
+
return `<div${attrs({ ...passthrough(p), "data-pdf": "only", hidden: true, "data-pagefind-ignore": "all" })}>${inner}</div>
|
|
18428
18581
|
`;
|
|
18429
18582
|
}
|
|
18430
18583
|
if (name === "web-only")
|
|
@@ -21510,6 +21663,7 @@ var VERSION_FLAGS = ["eol", "prerelease", "hidden", "noindex", "sitemap", "badge
|
|
|
21510
21663
|
var FLAG_PATHS = [
|
|
21511
21664
|
"poweredBy",
|
|
21512
21665
|
"linkPreviews",
|
|
21666
|
+
"granularity.book",
|
|
21513
21667
|
"ssg.breadcrumbs",
|
|
21514
21668
|
"ssg.strictTemplates",
|
|
21515
21669
|
"ssg.math",
|
|
@@ -21560,6 +21714,15 @@ function linkPreviewsOf(v) {
|
|
|
21560
21714
|
if (typeof v === "boolean") return v;
|
|
21561
21715
|
throw new ConfigError(`linkPreviews must be true or false, not ${JSON.stringify(v)}`);
|
|
21562
21716
|
}
|
|
21717
|
+
function granularityOf(v) {
|
|
21718
|
+
if (v === void 0) return { book: false, maxSinglePageMB: 3 };
|
|
21719
|
+
if (v === null || typeof v !== "object" || Array.isArray(v)) throw new ConfigError(`granularity must be a mapping (book, maxSinglePageMB), not ${JSON.stringify(v)}`);
|
|
21720
|
+
const g = v;
|
|
21721
|
+
if (g.book !== void 0 && typeof g.book !== "boolean") throw new ConfigError(`granularity.book must be true or false, not ${JSON.stringify(g.book)}`);
|
|
21722
|
+
const mb = g.maxSinglePageMB ?? 3;
|
|
21723
|
+
if (typeof mb !== "number" || !Number.isFinite(mb) || mb <= 0) throw new ConfigError(`granularity.maxSinglePageMB must be a positive number, not ${JSON.stringify(g.maxSinglePageMB)}`);
|
|
21724
|
+
return { book: g.book === true, maxSinglePageMB: mb };
|
|
21725
|
+
}
|
|
21563
21726
|
function htmlOf(v) {
|
|
21564
21727
|
if (v === void 0 || v === null) return void 0;
|
|
21565
21728
|
if (v === "keep" || v === "sanitize") return v;
|
|
@@ -21650,6 +21813,7 @@ function parseConfig(text4, overrides = {}) {
|
|
|
21650
21813
|
tagline: String(site.tagline || "Documentation"),
|
|
21651
21814
|
poweredBy: raw.poweredBy !== false,
|
|
21652
21815
|
linkPreviews: linkPreviewsOf(raw.linkPreviews),
|
|
21816
|
+
granularity: granularityOf(raw.granularity),
|
|
21653
21817
|
// Same defaults as the Astro pipeline: the mirror, llms.txt and page actions are on unless turned off.
|
|
21654
21818
|
mdMirror: agent.mdMirror !== false,
|
|
21655
21819
|
mdMirrorLinks: (() => {
|
|
@@ -22016,6 +22180,21 @@ function productUnits(cfg, model) {
|
|
|
22016
22180
|
}
|
|
22017
22181
|
return [...units.values()];
|
|
22018
22182
|
}
|
|
22183
|
+
function memberPaths(unit, projectPath2) {
|
|
22184
|
+
let len = -1;
|
|
22185
|
+
let found = [];
|
|
22186
|
+
for (const m of unit.members) {
|
|
22187
|
+
if (m.source.from === "openapi") continue;
|
|
22188
|
+
const root = sourceRoot(m.source);
|
|
22189
|
+
if (!projectPath2.startsWith(root) || root.length < len) continue;
|
|
22190
|
+
if (root.length > len) {
|
|
22191
|
+
len = root.length;
|
|
22192
|
+
found = [];
|
|
22193
|
+
}
|
|
22194
|
+
found.push({ member: m, rel: projectPath2.slice(root.length) });
|
|
22195
|
+
}
|
|
22196
|
+
return found.map((f) => ({ member: f.member, path: f.member.namespace ? `${f.member.namespace}/${f.rel}` : f.rel }));
|
|
22197
|
+
}
|
|
22019
22198
|
function memberPath(unit, projectPath2) {
|
|
22020
22199
|
let best;
|
|
22021
22200
|
for (const m of unit.members) {
|
|
@@ -22211,7 +22390,8 @@ function createResolver(table2, page, opts = {}) {
|
|
|
22211
22390
|
const toMd = (out, isHome) => markdownFile(out, table2.linkStyle, isHome);
|
|
22212
22391
|
const self = page.self ?? page.out;
|
|
22213
22392
|
const between = opts.memo === false ? (from, to, style) => computeHref(dirname(from), to, style) : hrefBetween;
|
|
22214
|
-
const pageHref = (ref) => opts.
|
|
22393
|
+
const pageHref = (ref, suffix = "") => opts.pageLink?.(ref, suffix) ?? linked(ref) + suffix;
|
|
22394
|
+
const linked = (ref) => opts.markdown && !ref.generated ? computeHref(dirname(page.out), toMd(ref.out), "html") : between(page.out, ref.out, table2.linkStyle);
|
|
22215
22395
|
const target = (path) => resolveLinkPath(path, srcDir, table2.basePath);
|
|
22216
22396
|
const staticHref = (path, t) => {
|
|
22217
22397
|
if (!path.startsWith("/") || !table2.staticFile) return void 0;
|
|
@@ -22224,7 +22404,7 @@ function createResolver(table2, page, opts = {}) {
|
|
|
22224
22404
|
const prefix = table2.unitPrefix ?? "";
|
|
22225
22405
|
if (prefix && (t === prefix || t.startsWith(prefix + "/"))) {
|
|
22226
22406
|
const hit = findPage(t.slice(prefix.length + 1));
|
|
22227
|
-
if (hit) return hit.out === self && suffix.startsWith("#") ? suffix : pageHref(hit
|
|
22407
|
+
if (hit) return hit.out === self && suffix.startsWith("#") ? suffix : pageHref(hit, suffix);
|
|
22228
22408
|
}
|
|
22229
22409
|
if (!table2.siteFile) return void 0;
|
|
22230
22410
|
resolver.crossed = true;
|
|
@@ -22257,7 +22437,7 @@ function createResolver(table2, page, opts = {}) {
|
|
|
22257
22437
|
const hit = findPage(t) ?? (path.startsWith("/") && t.includes("/") && table2.stripPrefixes?.includes(first) ? findPage(t.slice(first.length + 1)) : void 0);
|
|
22258
22438
|
if (hit) {
|
|
22259
22439
|
if (hit.out === self && suffix.startsWith("#")) return suffix;
|
|
22260
|
-
return pageHref(hit
|
|
22440
|
+
return pageHref(hit, suffix);
|
|
22261
22441
|
}
|
|
22262
22442
|
if (table2.assets.has(t)) return encodePath(relative(dirname(page.out), t)) + suffix;
|
|
22263
22443
|
const other2 = sitePage(path, t, suffix);
|
|
@@ -22721,7 +22901,7 @@ function staleUnitFiles(previous, now2, written, assets) {
|
|
|
22721
22901
|
}
|
|
22722
22902
|
|
|
22723
22903
|
// src/generated/versions.ts
|
|
22724
|
-
var PARSER_VERSION = "@dogsbay/format-dogsbay-md@0.2.0-beta.
|
|
22904
|
+
var PARSER_VERSION = "@dogsbay/format-dogsbay-md@0.2.0-beta.179 @dogsbay/corpus@0.2.0-beta.179 @dogsbay/minja@0.2.0-beta.179 @dogsbay/serialize-core@0.2.0-beta.179 @dogsbay/types@0.2.0-beta.179 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";
|
|
22725
22905
|
|
|
22726
22906
|
// src/core/tree-cache.ts
|
|
22727
22907
|
var FORMAT = "p1";
|
|
@@ -22885,8 +23065,15 @@ function annotatedEntry(obj, labelFor, baseDir) {
|
|
|
22885
23065
|
});
|
|
22886
23066
|
}
|
|
22887
23067
|
if (unlistedFlag(obj.unlisted, obj.title)) node.unlisted = true;
|
|
23068
|
+
const sp = singlePageOf(obj["single-page"] ?? obj.singlePage, obj.title);
|
|
23069
|
+
if (sp) node.singlePage = sp;
|
|
22888
23070
|
return node;
|
|
22889
23071
|
}
|
|
23072
|
+
function singlePageOf(v, label) {
|
|
23073
|
+
if (v === void 0) return void 0;
|
|
23074
|
+
if (v !== "yes" && v !== "no" && v !== "children") throw new Error(`nav entry "${String(label)}": "single-page" must be "yes", "no" or "children", got ${JSON.stringify(v)}`);
|
|
23075
|
+
return v;
|
|
23076
|
+
}
|
|
22890
23077
|
function unlistedFlag(v, label) {
|
|
22891
23078
|
if (v === void 0) return false;
|
|
22892
23079
|
if (typeof v !== "boolean") throw new Error(`nav entry "${String(label)}": "unlisted" must be true or false, got ${JSON.stringify(v)}`);
|
|
@@ -22911,6 +23098,8 @@ function parseNavJson(text4, labelFor) {
|
|
|
22911
23098
|
}
|
|
22912
23099
|
if (!node.label) node.label = (node.slug != null ? labelFor(node.slug) : void 0) ?? node.slug ?? "";
|
|
22913
23100
|
if (unlistedFlag(it.unlisted, node.label)) node.unlisted = true;
|
|
23101
|
+
const sp = singlePageOf(it.singlePage, node.label);
|
|
23102
|
+
if (sp) node.singlePage = sp;
|
|
22914
23103
|
return node;
|
|
22915
23104
|
};
|
|
22916
23105
|
return items3.map(walk);
|
|
@@ -23106,9 +23295,9 @@ function unitPages(cfg, unit, units, files, frontMatterOf, read, includeDrafts)
|
|
|
23106
23295
|
}
|
|
23107
23296
|
|
|
23108
23297
|
// src/generated/assets.ts
|
|
23109
|
-
var CLIENT_JS = '/*! dogsbay-ssg site client (Apache-2.0). Third-party notices: THIRD-PARTY-NOTICES.txt */\n"use strict";(()=>{var Ko=Object.defineProperty;var Vo=(n,t,e)=>t in n?Ko(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var m=(n,t,e)=>Vo(n,typeof t!="symbol"?t+"":t,e);var tt=class extends HTMLElement{constructor(){super(...arguments);m(this,"_initialized",!1);m(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(){}},Uo={"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"},In="dogsbay-elements-display";function et(){if(typeof document>"u"||document.getElementById(In))return;let n=Object.entries(Uo).map(([e,i])=>`:where(${e}){display:${i}}`).join(""),t=document.createElement("style");t.id=In,t.textContent=n,document.head.prepend(t)}function Wo(n){return n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}function Wt(n,t,e){let i=t;do i+=e?-1:1;while(i>=0&&i<n.length&&Wo(n[i]));return i}var le=class{constructor(n,t,e={}){m(this,"container");m(this,"itemSelector");m(this,"opts");m(this,"keydownHandler",null);m(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=Wt(t,i,!1),o>=t.length&&(o=this.opts.loop?Wt(t,-1,!1):i)):this.isBackwardKey(n.key,e)?(o=Wt(t,i,!0),o<0&&(o=this.opts.loop?Wt(t,t.length,!0):i)):this.opts.homeEnd&&n.key==="Home"?o=Wt(t,-1,!1):this.opts.homeEnd&&n.key==="End"&&(o=Wt(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 Yo=0;function Nn(n){return`${n}-${++Yo}`}var Hn=class extends tt{constructor(){super(...arguments);m(this,"list");m(this,"triggers",[]);m(this,"panels",[]);m(this,"nav",null);m(this,"value","");m(this,"syncKey",null);m(this,"orientation","horizontal");m(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)});m(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)});m(this,"handleSyncEvent",(t=>{let e=t.detail.value;e&&this.value!==e&&this.has(e)&&this.select(e)}));m(this,"handleHashChange",()=>{let t=this.valueForHash();t&&(this.select(t.value),t.target&&this.reveal(t.target))})}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 c=r.id||Nn("db-tab");r.id=c;let l=this.panels.find(d=>d.dataset.value===a);if(l){l.setAttribute("role","tabpanel");let d=l.id||Nn("db-tabpanel");l.id=d,r.setAttribute("aria-controls",d),l.setAttribute("aria-labelledby",c)}}),this.nav=new le(t,"[data-part=\'trigger\']",{orientation:this.orientation,loop:!0,homeEnd:!0,onHighlightedIndexChange:()=>{var c;let r=document.activeElement,a=(c=r==null?void 0:r.dataset)==null?void 0:c.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=this.valueForHash();o&&(i=o.value),this.select(i),o!=null&&o.target&&this.reveal(o.target)}valueForHash(){let t=window.location.hash.slice(1);if(!t)return;try{t=decodeURIComponent(t)}catch{}if(this.triggers.some(o=>o.dataset.value===t))return{value:t};let e=document.getElementById(t);if(!e)return;let i=this.panels.find(o=>o===e||o.contains(e));return i!=null&&i.dataset.value?{value:i.dataset.value,target:e}:void 0}reveal(t){requestAnimationFrame(()=>{var e;return(e=t.scrollIntoView)==null?void 0:e.call(t)})}connect(){var t;(t=this.list)==null||t.addEventListener("click",this.handleClick),window.addEventListener("hashchange",this.handleHashChange),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),window.removeEventListener("hashchange",this.handleHashChange),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})))}};et();customElements.get("db-tabs")||customElements.define("db-tabs",Hn);var Xo=0;function Go(n){return`${n}-${++Xo}`}var Pn=class{constructor(n,t,e={}){m(this,"trigger");m(this,"content");m(this,"_open",!1);m(this,"opts");this.trigger=n,this.content=t,this.opts=e;let i=Go("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 Fn=class extends tt{constructor(){super(...arguments);m(this,"items",[]);m(this,"nav",null);m(this,"openValues",new Set);m(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||"",c=o.hasAttribute("data-disabled");c&&(s.setAttribute("disabled",""),s.setAttribute("aria-disabled","true"));let l=new Pn(s,r,{onToggle:d=>{d?this.onItemExpanded(a):this.onItemCollapsed(a)}});return{el:o,value:a,collapsible:l,disabled:c}}).filter(Boolean),this.nav=new le(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}))}};et();customElements.get("db-accordion")||customElements.define("db-accordion",Fn);var Zo=0;function ot(n){return`${n}-${++Zo}`}function xt(n,t){let e=n.localName;return Array.from(n.querySelectorAll(t)).filter(i=>i.closest(e)===n)}function st(n,t){return xt(n,t)[0]??null}function Yt(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 ht(n){return n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"||n.getAttribute("data-disabled")==="true"}function _n(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover=="function"}function Xt(n){if(n.hidden=!1,!_n())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(_n())try{n.matches(":popover-open")&&n.hidePopover()}catch{}n.hidden=!0}var Qo=\'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]\';function zn(n){return Array.from(n.querySelectorAll(Qo)).filter(t=>!t.closest("[hidden]")&&!ht(t))}function $n(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 Zt(n){try{return decodeURIComponent(n)}catch{return n}}var Bn=class extends tt{constructor(){super(...arguments);m(this,"details",null);m(this,"summary",null);m(this,"dialog",null);m(this,"body",null);m(this,"source",null);m(this,"moved",[]);m(this,"handledHash",null);m(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())});m(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()});m(this,"onDialogClose",()=>this.restore());m(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(Zt(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)}});m(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,Jo();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=ot("db-sheet");let r=document.createElement("h2");r.className="db-sheet-title",r.id=ot("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 c=document.createElement("div");c.className="db-sheet-header",c.append(r,a);let l=document.createElement("div");l.className="db-sheet-body",s.append(c,l),this.append(s),this.dialog=s,this.body=l,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 c;let{dialog:e,details:i,body:o}=this;if(!e||!i||!o||e.open)return;let s=Array.from(i.childNodes).filter(l=>l!==this.summary),r=s.filter(l=>l.nodeType===Node.ELEMENT_NODE),a=r.length===1&&s.every(l=>{var d;return l===r[0]||!((d=l.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&&((c=t.scrollIntoView)==null||c.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=Zt(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)}},qn="dogsbay-details-sheet";function Jo(){if(document.getElementById(qn))return;let n=document.createElement("style");n.id=qn,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)}et();customElements.get("db-details-sheet")||customElements.define("db-details-sheet",Bn);var jn=class extends tt{constructor(){super(...arguments);m(this,"copyBtn",null);m(this,"copyIcon",null);m(this,"checkIcon",null);m(this,"liveRegion",null);m(this,"resetTimeout",null);m(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)}};et();customElements.get("db-code-block")||customElements.define("db-code-block",jn);var Kn=class extends tt{constructor(){super(...arguments);m(this,"navData",null);m(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))});m(this,"onKey",t=>{var l,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),c=u=>{var h;u&&(t.preventDefault(),(h=this.primary(u))==null||h.focus())};switch(t.key){case"ArrowDown":return c(i[s+1]);case"ArrowUp":return c(i[s-1]);case"Home":return c(i[0]);case"End":return c(i[i.length-1]);case"ArrowRight":if(!a)return;t.preventDefault(),this.isOpen(r)?c(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=(l=r.parentElement)==null?void 0:l.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 xt(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 xt(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=xt(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(c=>c.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,c]=o[s],l=r!=null&&!c?this.linkOf(r):null;if(l&&new URL(l.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",ts),i.id||(i.id=ot("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 xt(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=es(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,c,l],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 g=document.createElement("div");g.setAttribute("data-part","row"),h.appendChild(g);let f=a!=null?this.linkOf(a):null;f||(a=null);let b=null;if(c!=null&&c.length)if(b=document.createElement("button"),b.type="button",b.setAttribute("data-part","toggle"),b.setAttribute("aria-expanded","false"),a!=null)b.setAttribute("aria-label",i.replace("{label}",()=>r));else{let p=document.createElement("span");p.setAttribute("data-part","label"),p.textContent=r,b.appendChild(p)}let y=this.getAttribute("toggle-position")==="end";if(b&&!y&&g.appendChild(b),a!=null){let p=document.createElement("a");p.setAttribute("data-part","link"),p.textContent=r,p.href=f.href,f.external&&(p.rel="noopener"),(s!=null?u===s:!l&&p.href.split("#")[0]===o)&&p.setAttribute("aria-current","page"),g.appendChild(p)}if(a==null&&!(c!=null&&c.length)){let p=document.createElement("span");p.setAttribute("data-part","label"),p.textContent=r,g.appendChild(p)}if(b&&y&&g.appendChild(b),c!=null&&c.length){let p=document.createElement("ul");p.setAttribute("data-part","group"),p.dataset.lazy="",p.dataset.path=u,p.hidden=!0,h.setAttribute("data-state","closed"),h.appendChild(p),this.prepareItem(h)}return h})}},ts=\'<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 es(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}et();customElements.get("db-nav-tree")||customElements.define("db-nav-tree",Kn);var Vn=class extends tt{constructor(){super(...arguments);m(this,"links",[]);m(this,"headings",[]);m(this,"observer",null);m(this,"active",null);m(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)});m(this,"onHash",()=>{let t=Zt(location.hash.slice(1));t&&this.headings.some(e=>e.id===t)&&this.setActive(t)})}slugOf(t){return t.getAttribute("data-toc-slug")??Zt(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}))}}};et();customElements.get("db-toc")||customElements.define("db-toc",Vn);var ns=["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] *)"],Ze=ns.join(","),Yn=typeof Element>"u",de=Yn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ce=!Yn&&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},Le=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]"):Le(t.parentNode));return r},is=function(t){var e,i=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return i===""||i==="true"},os=function(t,e,i){if(Le(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ze));return e&&de.call(t,Ze)&&o.unshift(t),o=o.filter(i),o},Qe=function(t,e,i){for(var o=[],s=Array.from(t);s.length;){var r=s.shift();if(!Le(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),c=a.length?a:r.children,l=Qe(c,!0,i);i.flatten?o.push.apply(o,l):o.push({scopeParent:r,candidates:l})}else{var d=de.call(r,Ze);d&&i.filter(r)&&(e||!t.includes(r))&&o.push(r);var u=r.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(r),h=!Le(u,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(r));if(u&&h){var g=Qe(u===!0?r.children:u.children,!0,i);i.flatten?o.push.apply(o,g):o.push({scopeParent:r,candidates:g})}else s.unshift.apply(s,r.children)}}return o},Xn=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Gn=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||is(t))&&!Xn(t)?0:t.tabIndex},ss=function(t,e){var i=Gn(t);return i<0&&e&&!Xn(t)?0:i},rs=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Zn=function(t){return t.tagName==="INPUT"},as=function(t){return Zn(t)&&t.type==="hidden"},cs=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return e},ls=function(t,e){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===e)return t[i]},ds=function(t){if(!t.name)return!0;var e=t.form||Ce(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=ls(o,t.form);return!s||s===t},us=function(t){return Zn(t)&&t.type==="radio"},hs=function(t){return us(t)&&!ds(t)},fs=function(t){var e,i=t&&Ce(t),o=(e=i)===null||e===void 0?void 0:e.host,s=!1;if(i&&i!==t){var r,a,c;for(s=!!((r=o)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!s&&o;){var l,d,u;i=Ce(o),o=(l=i)===null||l===void 0?void 0:l.host,s=!!((d=o)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(o))}}return s},Un=function(t){var e=t.getBoundingClientRect(),i=e.width,o=e.height;return i===0&&o===0},ps=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 c=de.call(t,"details>summary:first-of-type"),l=c?t.parentElement:t;if(de.call(l,"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=Ce(t);if(u&&!u.shadowRoot&&o(u)===!0)return Un(t);t.assignedSlot?t=t.assignedSlot:!u&&h!==t.ownerDocument?t=h.host:t=u}t=d}if(fs(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return Un(t);return!1},ms=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 de.call(e,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}e=e.parentElement}return!1},gs=function(t,e){return!(e.disabled||as(e)||ps(e,t)||cs(e)||ms(e))},Wn=function(t,e){return!(hs(e)||Gn(e)<0||!gs(t,e))},bs=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Qn=function(t){var e=[],i=[];return t.forEach(function(o,s){var r=!!o.scopeParent,a=r?o.scopeParent:o,c=ss(a,r),l=r?Qn(o.candidates):a;c===0?r?e.push.apply(e,l):e.push(a):i.push({documentOrder:s,tabIndex:c,item:o,isScope:r,content:l})}),i.sort(rs).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(e)},Je=function(t,e){e=e||{};var i;return e.getShadowRoot?i=Qe([t],e.includeContainer,{filter:Wn.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:bs}):i=os(t,e.includeContainer,Wn.bind(null,e)),Qn(i)};var tn=class{constructor(n,t={}){m(this,"root");m(this,"opts");m(this,"previouslyFocused",null);m(this,"keydownHandler",null);m(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=Je(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=Je(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 at,Ht=(at=class{static activate(){if(at.count++,at.count>1)return;let t=window.innerWidth-document.documentElement.clientWidth;at.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(){at.count=Math.max(0,at.count-1),!(at.count>0)&&at.originalStyles&&(document.body.style.overflow=at.originalStyles.overflow,document.body.style.paddingRight=at.originalStyles.paddingRight,at.originalStyles=null)}static reset(){at.count=0,at.originalStyles=null}},m(at,"count",0),m(at,"originalStyles",null),at);var Et=[];function vs(n){if(n.key!=="Escape"||Et.length===0)return;let t=Et[Et.length-1];t.escapePrevented||(n.preventDefault(),n.stopPropagation(),t.opts.onDismiss("escape-key"))}var Jn=!1;function ys(){Jn||(Jn=!0,document.addEventListener("keydown",vs))}var Pt=class{constructor(n,t){m(this,"root");m(this,"opts");m(this,"outsideHandler",null);m(this,"active",!1);m(this,"frameId",null);m(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&&(ys(),Et.push(this)),this.opts.outsidePress&&(this.outsideHandler=n=>{if(Et.length>0&&Et[Et.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=Et.indexOf(this);n!==-1&&Et.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 en(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 ti=class extends tt{constructor(){super(...arguments);m(this,"content",null);m(this,"backdrop",null);m(this,"trigger",null);m(this,"native",!1);m(this,"_open",!1);m(this,"openedBy",null);m(this,"focusTrap",null);m(this,"dismiss",null);m(this,"cleanupInert",null);m(this,"onTriggerClick",t=>{t.preventDefault(),this.toggle(t.currentTarget)});m(this,"onHostClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-dialog")===this&&this.close("close-press")});m(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))});m(this,"onCancel",t=>{t.preventDefault(),this.dismissible&&this.close("escape-key")});m(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")});m(this,"onNativeClose",()=>{this._open&&this.finishClose("close-press")})}get open(){return this._open}get dismissible(){return this.getAttribute("dismissible")!=="false"}setup(){if(this.content=st(this,"[data-part=\'content\']"),!this.content)return;this.native=typeof HTMLDialogElement<"u"&&this.content instanceof HTMLDialogElement&&typeof this.content.showModal=="function",this.backdrop=st(this,"[data-part=\'backdrop\']"),this.trigger=Yt(st(this,"[data-part=\'trigger\']"));let t=this.content;t.id||(t.id=ot("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=ot("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=ot("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 tn(t),this.dismiss=new Pt(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(Ht.activate(),this.native){let s=e;s.open||s.showModal()}else e.hidden=!1,this.backdrop&&(this.backdrop.hidden=!1),this.cleanupInert=en(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 c of this.triggers())c.setAttribute("aria-expanded","false");if(Ht.deactivate(),this.native){let c=i;c.open&&c.close()}else(s=this.dismiss)==null||s.deactivate(),(r=this.focusTrap)==null||r.deactivate(),(a=this.cleanupInert)==null||a.call(this),this.cleanupInert=null,$n(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}))}};et();customElements.get("db-dialog")||customElements.define("db-dialog",ti);var ei=class extends tt{constructor(){super(...arguments);m(this,"input",null);m(this,"listbox",null);m(this,"empty",null);m(this,"_open",!1);m(this,"highlighted",null);m(this,"observer",null);m(this,"base",ot("db-combobox"));m(this,"optionSeq",0);m(this,"onInput",()=>{this.filtering?this.filter(this.input.value):this.show()});m(this,"onFocus",()=>{(this.hasAttribute("open-on-focus")||this.filtering&&this.input.value)&&(this.filtering?this.filter(this.input.value):this.show())});m(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}});m(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'option\']");if(!e||e.closest("db-combobox")!==this||ht(e))return;let i=t.target.closest("a[href]");!this.choose(e,!i)&&i&&t.preventDefault()});m(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'option\']");e&&e.closest("db-combobox")===this&&!ht(e)&&!e.hidden&&this.highlight(e)});m(this,"onListDown",t=>t.preventDefault());m(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&&!ht(t))}setup(){if(this.input=st(this,"[data-part=\'input\']"),this.listbox=st(this,"[data-part=\'listbox\']"),this.empty=st(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)}};et();customElements.get("db-combobox")||customElements.define("db-combobox",ei);var Tt=Math.min,ft=Math.max,he=Math.round,fe=Math.floor,bt=n=>({x:n,y:n}),ws={left:"right",right:"left",bottom:"top",top:"bottom"};function oi(n,t,e){return ft(n,Tt(t,e))}function Qt(n,t){return typeof n=="function"?n(t):n}function Ot(n){return n.split("-")[0]}function Jt(n){return n.split("-")[1]}function nn(n){return n==="x"?"y":"x"}function on(n){return n==="y"?"height":"width"}function vt(n){let t=n[0];return t==="t"||t==="b"?"y":"x"}function sn(n){return nn(vt(n))}function si(n,t,e){e===void 0&&(e=!1);let i=Jt(n),o=sn(n),s=on(o),r=o==="x"?i===(e?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=ue(r)),[r,ue(r)]}function ri(n){let t=ue(n);return[ke(n),t,ke(t)]}function ke(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}var ni=["left","right"],ii=["right","left"],xs=["top","bottom"],Es=["bottom","top"];function Ss(n,t,e){switch(n){case"top":case"bottom":return e?t?ii:ni:t?ni:ii;case"left":case"right":return t?xs:Es;default:return[]}}function ai(n,t,e,i){let o=Jt(n),s=Ss(Ot(n),e==="start",i);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(ke)))),s}function ue(n){let t=Ot(n);return ws[t]+n.slice(t.length)}function As(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 ci(n){return typeof n!="number"?As(n):{top:n,right:n,bottom:n,left:n}}function Ft(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 li(n,t,e){let{reference:i,floating:o}=n,s=vt(t),r=sn(t),a=on(r),c=Ot(t),l=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,g;switch(c){case"top":g={x:d,y:i.y-o.height};break;case"bottom":g={x:d,y:i.y+i.height};break;case"right":g={x:i.x+i.width,y:u};break;case"left":g={x:i.x-o.width,y:u};break;default:g={x:i.x,y:i.y}}let f=Jt(t);return f&&(g[r]+=h*(f==="end"?1:-1)*(e&&l?-1:1)),g}async function di(n,t){var e;t===void 0&&(t={});let{x:i,y:o,platform:s,rects:r,elements:a,strategy:c}=n,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:g=0}=Qt(t,n),f=ci(g),y=a[h?u==="floating"?"reference":"floating":u],p=Ft(await s.getClippingRect({element:(e=await(s.isElement==null?void 0:s.isElement(y)))==null||e?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),v=u==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=await(s.isElement==null?void 0:s.isElement(x))&&await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1},M=Ft(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:x,strategy:c}):v);return{top:(p.top-M.top+f.top)/E.y,bottom:(M.bottom-p.bottom+f.bottom)/E.y,left:(p.left-M.left+f.left)/E.x,right:(M.right-p.right+f.right)/E.x}}var Cs=50,ui=async(n,t,e)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:di},c=await(r.isRTL==null?void 0:r.isRTL(t)),l=await r.getElementRects({reference:n,floating:t,strategy:o}),{x:d,y:u}=li(l,i,c),h=i,g=0,f={};for(let b=0;b<s.length;b++){let y=s[b];if(!y)continue;let{name:p,fn:v}=y,{x,y:E,data:M,reset:A}=await v({x:d,y:u,initialPlacement:i,placement:h,strategy:o,middlewareData:f,rects:l,platform:a,elements:{reference:n,floating:t}});d=x??d,u=E??u,f[p]={...f[p],...M},A&&g<Cs&&(g++,typeof A=="object"&&(A.placement&&(h=A.placement),A.rects&&(l=A.rects===!0?await r.getElementRects({reference:n,floating:t,strategy:o}):A.rects),{x:d,y:u}=li(l,h,c)),b=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:f}};var hi=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:c,elements:l}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:b=!0,...y}=Qt(n,t);if((e=s.arrow)!=null&&e.alignmentOffset)return{};let p=Ot(o),v=vt(a),x=Ot(a)===a,E=await(c.isRTL==null?void 0:c.isRTL(l.floating)),M=h||(x||!b?[ue(a)]:ri(a)),A=f!=="none";!h&&A&&M.push(...ai(a,b,f,E));let S=[a,...M],w=await c.detectOverflow(t,y),Y=[],$=((i=s.flip)==null?void 0:i.overflows)||[];if(d&&Y.push(w[p]),u){let q=si(o,r,E);Y.push(w[q[0]],w[q[1]])}if($=[...$,{placement:o,overflows:Y}],!Y.every(q=>q<=0)){var X,C;let q=(((X=s.flip)==null?void 0:X.index)||0)+1,V=S[q];if(V&&(!(u==="alignment"?v!==vt(V):!1)||$.every(U=>vt(U.placement)===v?U.overflows[0]>0:!0)))return{data:{index:q,overflows:$},reset:{placement:V}};let z=(C=$.filter(j=>j.overflows[0]<=0).sort((j,U)=>j.overflows[1]-U.overflows[1])[0])==null?void 0:C.placement;if(!z)switch(g){case"bestFit":{var R;let j=(R=$.filter(U=>{if(A){let T=vt(U.placement);return T===v||T==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(T=>T>0).reduce((T,I)=>T+I,0)]).sort((U,T)=>U[1]-T[1])[0])==null?void 0:R[0];j&&(z=j);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}};var Ls=new Set(["left","top"]);async function ks(n,t){let{placement:e,platform:i,elements:o}=n,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=Ot(e),a=Jt(e),c=vt(e)==="y",l=Ls.has(r)?-1:1,d=s&&c?-1:1,u=Qt(t,n),{mainAxis:h,crossAxis:g,alignmentAxis:f}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof f=="number"&&(g=a==="end"?f*-1:f),c?{x:g*d,y:h*l}:{x:h*l,y:g*d}}var fi=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,c=await ks(t,n);return r===((e=a.offset)==null?void 0:e.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:r}}}}},pi=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:c={fn:v=>{let{x,y:E}=v;return{x,y:E}}},...l}=Qt(n,t),d={x:e,y:i},u=await s.detectOverflow(t,l),h=vt(o),g=nn(h),f=d[g],b=d[h],y=(v,x)=>oi(x+u[v==="y"?"top":"left"],x,x-u[v==="y"?"bottom":"right"]);r&&(f=y(g,f)),a&&(b=y(h,b));let p=c.fn({...t,[g]:f,[h]:b});return{...p,data:{x:p.x-e,y:p.y-i,enabled:{[g]:r,[h]:a}}}}}};var mi=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}=Qt(n,t),c=await o.detectOverflow(t,a),l=Ot(e),d=Jt(e),u=vt(e)==="y",{width:h,height:g}=i.floating,f,b;l==="top"||l==="bottom"?(f=l,b=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(b=l,f=d==="end"?"top":"bottom");let y=g-c.top-c.bottom,p=h-c.left-c.right,v=Tt(g-c[f],y),x=Tt(h-c[b],p),E=t.middlewareData.shift,M=!E,A=v,S=x;E!=null&&E.enabled.x&&(S=p),E!=null&&E.enabled.y&&(A=y),M&&!d&&(u?S=h-2*ft(c.left,c.right):A=g-2*ft(c.top,c.bottom)),await r({...t,availableWidth:S,availableHeight:A});let w=await o.getDimensions(s.floating);return h!==w.width||g!==w.height?{reset:{rects:!0}}:{}}}};function Te(){return typeof window<"u"}function zt(n){return bi(n)?(n.nodeName||"").toLowerCase():"#document"}function ct(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function yt(n){var t;return(t=(bi(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function bi(n){return Te()?n instanceof Node||n instanceof ct(n).Node:!1}function pt(n){return Te()?n instanceof Element||n instanceof ct(n).Element:!1}function St(n){return Te()?n instanceof HTMLElement||n instanceof ct(n).HTMLElement:!1}function gi(n){return!Te()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof ct(n).ShadowRoot}function pe(n){let{overflow:t,overflowX:e,overflowY:i,display:o}=mt(n);return/auto|scroll|overlay|hidden|clip/.test(t+i+e)&&o!=="inline"&&o!=="contents"}function vi(n){return/^(table|td|th)$/.test(zt(n))}function me(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}var Ts=/transform|translate|scale|rotate|perspective|filter/,Os=/paint|layout|strict|content/,_t=n=>!!n&&n!=="none",rn;function Oe(n){let t=pt(n)?mt(n):n;return _t(t.transform)||_t(t.translate)||_t(t.scale)||_t(t.rotate)||_t(t.perspective)||!Re()&&(_t(t.backdropFilter)||_t(t.filter))||Ts.test(t.willChange||"")||Os.test(t.contain||"")}function yi(n){let t=Rt(n);for(;St(t)&&!ee(t);){if(Oe(t))return t;if(me(t))return null;t=Rt(t)}return null}function Re(){return rn==null&&(rn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),rn}function ee(n){return/^(html|body|#document)$/.test(zt(n))}function mt(n){return ct(n).getComputedStyle(n)}function ge(n){return pt(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Rt(n){if(zt(n)==="html")return n;let t=n.assignedSlot||n.parentNode||gi(n)&&n.host||yt(n);return gi(t)?t.host:t}function wi(n){let t=Rt(n);return ee(t)?(n.ownerDocument||n).body:St(t)&&pe(t)?t:wi(t)}function te(n,t,e){var i;t===void 0&&(t=[]),e===void 0&&(e=!0);let o=wi(n),s=o===((i=n.ownerDocument)==null?void 0:i.body),r=ct(o);if(s){let a=De(r);return t.concat(r,r.visualViewport||[],pe(o)?o:[],a&&e?te(a):[])}else return t.concat(o,te(o,[],e))}function De(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Si(n){let t=mt(n),e=parseFloat(t.width)||0,i=parseFloat(t.height)||0,o=St(n),s=o?n.offsetWidth:e,r=o?n.offsetHeight:i,a=he(e)!==s||he(i)!==r;return a&&(e=s,i=r),{width:e,height:i,$:a}}function cn(n){return pt(n)?n:n.contextElement}function ne(n){let t=cn(n);if(!St(t))return bt(1);let e=t.getBoundingClientRect(),{width:i,height:o,$:s}=Si(t),r=(s?he(e.width):e.width)/i,a=(s?he(e.height):e.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}var Rs=bt(0);function Ai(n){let t=ct(n);return!Re()||!t.visualViewport?Rs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ds(n,t,e){return t===void 0&&(t=!1),!!e&&t&&e===ct(n)}function $t(n,t,e,i){t===void 0&&(t=!1),e===void 0&&(e=!1);let o=n.getBoundingClientRect(),s=cn(n),r=bt(1);t&&(i?pt(i)&&(r=ne(i)):r=ne(n));let a=Ds(s,e,i)?Ai(s):bt(0),c=(o.left+a.x)/r.x,l=(o.top+a.y)/r.y,d=o.width/r.x,u=o.height/r.y;if(s&&i){let h=ct(s),g=pt(i)?ct(i):i,f=h,b=De(f);for(;b&&g!==f;){let y=ne(b),p=b.getBoundingClientRect(),v=mt(b),x=p.left+(b.clientLeft+parseFloat(v.paddingLeft))*y.x,E=p.top+(b.clientTop+parseFloat(v.paddingTop))*y.y;c*=y.x,l*=y.y,d*=y.x,u*=y.y,c+=x,l+=E,f=ct(b),b=De(f)}}return Ft({width:d,height:u,x:c,y:l})}function Me(n,t){let e=ge(n).scrollLeft;return t?t.left+e:$t(yt(n)).left+e}function Ci(n,t){let e=n.getBoundingClientRect(),i=e.left+t.scrollLeft-Me(n,e),o=e.top+t.scrollTop;return{x:i,y:o}}function Ms(n){let{elements:t,rect:e,offsetParent:i,strategy:o}=n,s=o==="fixed",r=yt(i),a=t?me(t.floating):!1;if(i===r||a&&s)return e;let c={scrollLeft:0,scrollTop:0},l=bt(1),d=bt(0),u=St(i);if((u||!s)&&((zt(i)!=="body"||pe(r))&&(c=ge(i)),u)){let g=$t(i);l=ne(i),d.x=g.x+i.clientLeft,d.y=g.y+i.clientTop}let h=r&&!u&&!s?Ci(r,c):bt(0);return{width:e.width*l.x,height:e.height*l.y,x:e.x*l.x-c.scrollLeft*l.x+d.x+h.x,y:e.y*l.y-c.scrollTop*l.y+d.y+h.y}}function Is(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function Ns(n){let t=ge(n),e=n.ownerDocument.body,i=ft(n.scrollWidth,n.clientWidth,e.scrollWidth,e.clientWidth),o=ft(n.scrollHeight,n.clientHeight,e.scrollHeight,e.clientHeight),s=-t.scrollLeft+Me(n),r=-t.scrollTop;return mt(e).direction==="rtl"&&(s+=ft(n.clientWidth,e.clientWidth)-i),{width:i,height:o,x:s,y:r}}var Hs=25;function Ps(n,t,e){e===void 0&&(e="viewport");let i=e==="layoutViewport",o=ct(n),s=yt(n),r=o.visualViewport,a=s.clientWidth,c=s.clientHeight,l=0,d=0;if(r){let h=!Re()||t==="fixed";i?h||(l=-r.offsetLeft,d=-r.offsetTop):(a=r.width,c=r.height,h&&(l=r.offsetLeft,d=r.offsetTop))}if(Me(s)<=0){let h=s.ownerDocument,g=h.body,f=getComputedStyle(g),b=h.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,y=Math.abs(s.clientWidth-g.clientWidth-b),p=getComputedStyle(s).scrollbarGutter==="stable both-edges"?y/2:y;p<=Hs&&(a-=p)}return{width:a,height:c,x:l,y:d}}function Fs(n,t){let e=$t(n,!0,t==="fixed"),i=e.top+n.clientTop,o=e.left+n.clientLeft,s=ne(n),r=n.clientWidth*s.x,a=n.clientHeight*s.y,c=o*s.x,l=i*s.y;return{width:r,height:a,x:c,y:l}}function xi(n,t,e){let i;if(t==="viewport"||t==="layoutViewport")i=Ps(n,e,t);else if(t==="document")i=Ns(yt(n));else if(pt(t))i=Fs(t,e);else{let o=Ai(n);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ft(i)}function _s(n,t){let e=t.get(n);if(e)return e;let i=te(n,[],!1).filter(a=>pt(a)&&zt(a)!=="body"),o=null,s=mt(n).position==="fixed",r=s?Rt(n):n;for(;pt(r)&&!ee(r);){let a=mt(r),c=Oe(r),l=o?o.position:s?"fixed":"";!c&&(l==="fixed"||l==="absolute"&&a.position==="static")?i=i.filter(u=>u!==r):o=a,r=Rt(r)}return t.set(n,i),i}function zs(n){let{element:t,boundary:e,rootBoundary:i,strategy:o}=n,r=[...e==="clippingAncestors"?me(t)?[]:_s(t,this._c):[].concat(e),i],a=xi(t,r[0],o),c=a.top,l=a.right,d=a.bottom,u=a.left;for(let h=1;h<r.length;h++){let g=xi(t,r[h],o);c=ft(g.top,c),l=Tt(g.right,l),d=Tt(g.bottom,d),u=ft(g.left,u)}return{width:l-u,height:d-c,x:u,y:c}}function $s(n){let{width:t,height:e}=Si(n);return{width:t,height:e}}function qs(n,t,e){let i=St(t),o=yt(t),s=e==="fixed",r=$t(n,!0,s,t),a={scrollLeft:0,scrollTop:0},c=bt(0);if((i||!s)&&((zt(t)!=="body"||pe(o))&&(a=ge(t)),i)){let h=$t(t,!0,s,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}!i&&o&&(c.x=Me(o));let l=o&&!i&&!s?Ci(o,a):bt(0),d=r.left+a.scrollLeft-c.x-l.x,u=r.top+a.scrollTop-c.y-l.y;return{x:d,y:u,width:r.width,height:r.height}}function an(n){return mt(n).position==="static"}function Ei(n,t){if(!St(n)||mt(n).position==="fixed")return null;if(t)return t(n);let e=n.offsetParent;return yt(n)===e&&(e=e.ownerDocument.body),e}function Li(n,t){let e=ct(n);if(me(n))return e;if(!St(n)){let o=Rt(n);for(;o&&!ee(o);){if(pt(o)&&!an(o))return o;o=Rt(o)}return e}let i=Ei(n,t);for(;i&&vi(i)&&an(i);)i=Ei(i,t);return i&&ee(i)&&an(i)&&!Oe(i)?e:i||yi(n)||e}var Bs=async function(n){let t=this.getOffsetParent||Li,e=this.getDimensions,i=await e(n.floating);return{reference:qs(n.reference,await t(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function js(n){return mt(n).direction==="rtl"}var Ks={convertOffsetParentRelativeRectToViewportRelativeRect:Ms,getDocumentElement:yt,getClippingRect:zs,getOffsetParent:Li,getElementRects:Bs,getClientRects:Is,getDimensions:$s,getScale:ne,isElement:pt,isRTL:js};function ki(n,t){return n.x===t.x&&n.y===t.y&&n.width===t.width&&n.height===t.height}function Vs(n,t,e){let i=null,o,s=yt(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:g,top:f,width:b,height:y}=h;if(d||t(),!b||!y)return;let p=fe(f),v=fe(s.clientWidth-(g+b)),x=fe(s.clientHeight-(f+y)),E=fe(g),A={rootMargin:-p+"px "+-v+"px "+-x+"px "+-E+"px",threshold:ft(0,Tt(1,u))||1},S=!0;function w(Y){let $=Y[0].intersectionRatio;if(!ki(h,n.getBoundingClientRect()))return a();if($!==u){if(!S)return a();$?a(!1,$):o=setTimeout(()=>{a(!1,1e-7)},1e3)}S=!1}try{i=new IntersectionObserver(w,{...A,root:s.ownerDocument})}catch{i=new IntersectionObserver(w,A)}i.observe(n)}let c=ct(n),l=()=>a(e);return c.addEventListener("resize",l),a(!0),()=>{c.removeEventListener("resize",l),r()}}function Ti(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:c=!1}=i,l=cn(n),d=o||s?[...l?te(l):[],...t?te(t):[]]:[];d.forEach(p=>{o&&p.addEventListener("scroll",e),s&&p.addEventListener("resize",e)});let u=l&&a?Vs(l,e,s):null,h=-1,g=null;r&&(g=new ResizeObserver(p=>{let[v]=p;v&&v.target===l&&g&&t&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),e()}),l&&!c&&g.observe(l),t&&g.observe(t));let f,b=c?$t(n):null;c&&y();function y(){let p=$t(n);b&&!ki(b,p)&&e(),b=p,f=requestAnimationFrame(y)}return e(),()=>{var p;d.forEach(v=>{o&&v.removeEventListener("scroll",e),s&&v.removeEventListener("resize",e)}),u==null||u(),(p=g)==null||p.disconnect(),g=null,c&&cancelAnimationFrame(f)}}var Oi=fi;var Ri=pi,Di=hi,Mi=mi;var Ii=(n,t,e)=>{let i=new Map,o=e??{},s={...Ks,...o.platform,_c:i};return ui(n,t,{...o,platform:s})};function qt(n,t,e={}){let{placement:i="bottom-start",strategy:o="absolute",offset:s=4,flip:r=!0,shift:a=!0,padding:c=8,matchWidth:l=!1}=e,d=[Oi(s),...r?[Di({padding:c})]:[],...a?[Ri({padding:c})]:[],...l?[Mi({apply({rects:h}){Object.assign(t.style,{width:`${h.reference.width}px`})}})]:[]];return t.style.position=o,Ti(n,t,async()=>{let h=await Ii(n,t,{placement:i,strategy:o,middleware:d});Object.assign(t.style,{left:`${h.x}px`,top:`${h.y}px`});let g=h.placement.split("-")[0];t.setAttribute("data-side",g)})}var ln=class{constructor(n){m(this,"opts");m(this,"buffer","");m(this,"timerId",null);m(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 Ni=class extends tt{constructor(){super(...arguments);m(this,"trigger",null);m(this,"content",null);m(this,"valueEl",null);m(this,"items",[]);m(this,"nativeSelect",null);m(this,"hiddenInput",null);m(this,"labelEl",null);m(this,"onLabelClick",t=>{var e;t.target.closest("[data-part=\'trigger\']")||(t.preventDefault(),(e=this.trigger)==null||e.focus())});m(this,"dismiss",null);m(this,"typeahead",null);m(this,"cleanupFloating",null);m(this,"_open",!1);m(this,"_value","");m(this,"highlighted",-1);m(this,"syncing",!1);m(this,"onNativeChange",()=>{this.syncing||this.refresh()});m(this,"onFormReset",()=>setTimeout(()=>this.refresh()));m(this,"onTriggerClick",()=>{this.isDisabled||(this._open?this.close():this.show())});m(this,"onTriggerKeyUp",t=>{t.key===" "&&t.preventDefault()});m(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))}});m(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'item\']");!e||!this.items.includes(e)||ht(e)||(this.select(e),this.close())});m(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'item\']");e&&this.items.includes(e)&&!ht(e)&&this.highlight(this.items.indexOf(e))});m(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=>!ht(t))}setup(){var a,c;if(this.nativeSelect=st(this,"select"),this.nativeSelect&&!st(this,"[data-part=\'trigger\']")&&this.buildFromNative(this.nativeSelect),this.trigger=st(this,"[data-part=\'trigger\']"),this.content=st(this,"[data-part=\'content\']"),this.valueEl=st(this,"[data-part=\'value\']"),!this.trigger||!this.content)return;let{trigger:t,content:e}=this;this.items=xt(this,"[data-part=\'item\']");let i=ot("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((l,d)=>{l.id||(l.id=`${i}-item-${d}`),l.setAttribute("role","option"),l.setAttribute("aria-selected","false")}),xt(this,"[data-part=\'group\']").forEach(l=>{l.setAttribute("role","group");let d=l.querySelector("[data-part=\'label\']");d&&(d.id||(d.id=ot("db-select-label")),l.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 ln({getItemCount:()=>this.enabled().length,getItemText:l=>{var d,u;return((u=(d=this.enabled()[l])==null?void 0:d.textContent)==null?void 0:u.trim())??""},onMatch:l=>{let d=this.enabled()[l];d&&(this._open?this.highlight(this.items.indexOf(d)):this.select(d))}}),this.dismiss=new Pt(e,{onDismiss:l=>this.close(l!=="outside-press")});let s=((a=this.nativeSelect)==null?void 0:a.value)??this.getAttribute("default-value")??"",r=this.items.find(l=>l.dataset.value===s);r&&ht(r)?this.valueEl&&(this.valueEl.textContent=((c=r.textContent)==null?void 0:c.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=ot("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 c=document.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttribute("viewBox","0 0 24 24"),c.setAttribute("aria-hidden","true"),c.setAttribute("class","db-select-chevron"),c.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,c);let l=document.createElement("div");l.setAttribute("data-part","content"),l.className="db-select-content";let d=(u,h)=>{let g=document.createElement("div");g.setAttribute("data-part","item"),g.className="db-select-item",g.dataset.value=u.value;for(let[f,b]of Object.entries(u.dataset))b!=null&&(g.dataset[f]=b);u.disabled&&g.setAttribute("aria-disabled","true"),g.textContent=u.textContent??u.value,h.appendChild(g)};for(let u of Array.from(t.children))if(u instanceof HTMLOptGroupElement){let h=document.createElement("div");h.setAttribute("data-part","group");let g=document.createElement("div");g.setAttribute("data-part","label"),g.className="db-select-label",g.textContent=u.label,h.appendChild(g);for(let f of Array.from(u.children))f instanceof HTMLOptionElement&&d(f,h);l.appendChild(h)}else u instanceof HTMLOptionElement&&d(u,l);t.hidden=!0,t.tabIndex=-1,t.setAttribute("aria-hidden","true"),this.append(e,l)}connect(){var t,e,i,o,s,r,a,c,l,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),(c=this.content)==null||c.addEventListener("click",this.onListClick),(l=this.content)==null||l.addEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.addEventListener("mousedown",this.preventBlur)}disconnect(){var t,e,i,o,s,r,a,c,l,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),(c=this.content)==null||c.removeEventListener("click",this.onListClick),(l=this.content)==null||l.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=Xt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=qt(t,e,{placement:"bottom-start",offset:4,matchWidth:!this.hasAttribute("auto-width"),strategy:i==="top-layer"?"fixed":"absolute"});let s=this.items.find(c=>c.dataset.value===this._value&&!ht(c))??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(ht(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}))}};et();customElements.get("db-select")||customElements.define("db-select",Ni);var Hi=class extends tt{constructor(){super(...arguments);m(this,"trigger",null);m(this,"content",null);m(this,"dismiss",null);m(this,"cleanupFloating",null);m(this,"_open",!1);m(this,"onTriggerClick",()=>this.toggle());m(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=Yt(st(this,"[data-part=\'trigger\']")),this.content=st(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;let t=this.content;t.id||(t.id=ot("db-popover")),t.hasAttribute("role")||t.setAttribute("role","dialog"),!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&((e=this.trigger).id||(e.id=ot("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 Pt(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=Xt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=qt(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&&(zn(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}))}};et();customElements.get("db-popover")||customElements.define("db-popover",Hi);var Pi="db-announcement-closed:";var Fi=class extends tt{constructor(){super(...arguments);m(this,"closeButton",null);m(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(Pi+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}}))}};et();customElements.get("db-announcement")||customElements.define("db-announcement",Fi);var _i=class extends tt{constructor(){super(...arguments);m(this,"trigger",null);m(this,"content",null);m(this,"cleanupFloating",null);m(this,"showTimer",null);m(this,"hideTimer",null);m(this,"_open",!1);m(this,"onEnter",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this._open||(this.showTimer=setTimeout(()=>this.show(),this.num("delay",200))))});m(this,"onLeave",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this.hideTimer=setTimeout(()=>this.hide(),this.num("close-delay",100)))});m(this,"onContentEnter",()=>this.clearTimers());m(this,"onFocus",()=>{let t=!0;try{t=this.trigger.matches(":focus-visible")}catch{}t&&(this.clearTimers(),this.show())});m(this,"onBlur",()=>this.hide());m(this,"onPress",()=>this.hide());m(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=Yt(st(this,"[data-part=\'trigger\']")),this.content=st(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;(e=this.content).id||(e.id=ot("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=Xt(e);this.setState("open"),this.cleanupFloating=qt(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})))}};et();customElements.get("db-tooltip")||customElements.define("db-tooltip",_i);var zi="sidebar_state",Us="b",Ws=768,be=new WeakMap;function Ys(n){try{return localStorage.getItem(n)}catch{return null}}function Xs(n,t){try{localStorage.setItem(n,t)}catch{}}function hn(n){if(be.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=Ys(zi),r=s!==null?s==="true":o,a=t.querySelector("[data-sidebar-desktop]"),c=t.querySelector("[data-sidebar-mobile]"),l=t.querySelector("[data-sidebar-mobile-backdrop]"),d=window.matchMedia(`(max-width: ${Ws-1}px)`),u={provider:n,sidebar:t,desktopSidebar:a,mobileSidebar:c,mobileBackdrop:l,collapsible:e,side:i,open:r,openMobile:!1,isMobile:d.matches,mediaQuery:d};be.set(n,u),$i(u);let h=b=>{u.isMobile=b.matches,!b.matches&&u.openMobile&&Dt(n)};d.addEventListener("change",h);let g=b=>{b.key===Us&&(b.metaKey||b.ctrlKey)?(b.preventDefault(),dn(n)):b.key==="Escape"&&u.openMobile&&(b.preventDefault(),Dt(n))};document.addEventListener("keydown",g),Gs(n,u),l&&l.addEventListener("click",()=>{Dt(n)});let f=t.querySelector("[data-part=\'rail\']");f&&f.addEventListener("click",()=>{dn(n)})}function Gs(n,t){n.querySelectorAll("[data-part=\'sidebar-trigger\']").forEach(e=>{e.addEventListener("click",()=>{dn(n)})})}function dn(n){let t=be.get(n);t&&(t.isMobile?t.openMobile?Dt(n):Zs(n):(t.open=!t.open,$i(t),Xs(zi,String(t.open))))}function $i(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 Zs(n){var i;let t=be.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),Ht.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 Dt(n){var o;let t=be.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),Ht.deactivate();let i=t.provider.querySelector("[data-part=\'sidebar-trigger\']");i==null||i.focus()}function un(){document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(n=>{hn(n)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",un):un();document.addEventListener("astro:page-load",un);var qi=/^[a-z][a-z0-9_-]{0,63}$/,Ie={docs:"docs.js",shard:n=>`t-${n}.js`,fragment:n=>`f-${n}.js`},Ne={docs:"docs",shard:n=>n,fragment:n=>`frag:${n}`};var Qs={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"},Js={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},tr="[^aeiou]",pn="[aeiouy]",Mt="("+tr+"[^aeiouy]*)",Pe="("+pn+"[aeiou]*)",fn=new RegExp("^"+Mt+"?"+Pe+Mt),er=new RegExp("^"+Mt+"?"+Pe+Mt+Pe+"?$"),He=new RegExp("^"+Mt+"?("+Pe+Mt+"){2,}"),Bi=new RegExp("^"+Mt+"?"+pn),ji=new RegExp("^"+Mt+pn+"[^aeiouwxy]$"),nr=/ll$/,ir=/^(.+?)e$/,or=/^(.+?)y$/,sr=/^(.+?(s|t))(ion)$/,rr=/^(.+?)(ed|ing)$/,ar=/(at|bl|iz)$/,cr=/^(.+?)eed$/,lr=/^.+?[^s]s$/,dr=/^.+?(ss|i)es$/,ur=/([^aeiouylsz])\\1$/,hr=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,fr=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,pr=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;function Ki(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)),dr.test(t)?t=t.slice(0,-2):lr.test(t)&&(t=t.slice(0,-1));let i;return(i=cr.exec(t))?fn.test(i[1])&&(t=t.slice(0,-1)):(i=rr.exec(t))&&Bi.test(i[1])&&(t=i[1],ar.test(t)?t+="e":ur.test(t)?t=t.slice(0,-1):ji.test(t)&&(t+="e")),(i=or.exec(t))&&Bi.test(i[1])&&(t=i[1]+"i"),(i=hr.exec(t))&&fn.test(i[1])&&(t=i[1]+Qs[i[2]]),(i=fr.exec(t))&&fn.test(i[1])&&(t=i[1]+Js[i[2]]),(i=pr.exec(t))?He.test(i[1])&&(t=i[1]):(i=sr.exec(t))&&He.test(i[1])&&(t=i[1]),(i=ir.exec(t))&&(He.test(i[1])||er.test(i[1])&&!ji.test(i[1]))&&(t=i[1]),nr.test(t)&&He.test(t)&&(t=t.slice(0,-1)),e&&(t="y"+t.slice(1)),t}var Vi=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(" ")),mr=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u,ve;function gr(n){if(ve===void 0)try{ve=typeof Intl<"u"&&"Segmenter"in Intl?new Intl.Segmenter(void 0,{granularity:"word"}):null}catch{ve=null}if(ve)return[...ve.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 Bt(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&&!Vi.has(s)&&t.push(s)}for(let s of o)mr.test(s)?t.push(...gr(s)):s.length>=2&&!Vi.has(s)&&t.push(s)}return t}function mn(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 ye(n){if(!(!n||!/^en(-|$)/i.test(n)))return t=>/^[a-z]{3,}$/.test(t)?Ki(t):t}function jt(n,t={}){var y,p;let e=[],i=[],o=[],s=!1,r={tag:[],section:[]},a={tag:[],section:[]},c=Object.create(null),l=Object.create(null),d=["tag","section",...new Set((t.facets??[]).filter(v=>qi.test(v)&&v!=="tag"&&v!=="section"))],u=new RegExp(`(?<!\\\\S)(-?)(${d.join("|")}):(?:"([^"]*)"?|(?!\\\\/\\\\/)(\\\\S*))|(-?)"([^"]*)"?|(\\\\S+)`,"gi"),h=[...n.matchAll(u)].map(v=>{var x;return{facetNeg:v[1]==="-",facet:(x=v[2])==null?void 0:x.toLowerCase(),value:v[3]??v[4],neg:v[5],phrase:v[6],word:v[7]}}),g=!1,f=!1;for(let[v,x]of h.entries()){if(x.facet){let R=yn(x.value??"");if(!R)continue;x.facet==="tag"||x.facet==="section"?(x.facetNeg?a:r)[x.facet].push(R):((y=x.facetNeg?l:c)[p=x.facet]??(y[p]=[])).push(R);continue}let E=x.word;if(E==="OR"){f=e.length>0,s=!0;continue}if(E==="NOT"){g=!0,s=!0;continue}if(E==="AND"){s=!0;continue}let M=x.phrase!==void 0,A=g||x.neg==="-"||(E==null?void 0:E.startsWith("-"))&&E.length>1;g=!1;let S=M?x.phrase:A&&(E!=null&&E.startsWith("-"))?E.slice(1):E,w=[...new Set(Bt(S))];if(!w.length){f=!1;continue}if(A){i.push(M?w:[w[0]]),s=!0,f=!1;continue}if(M){f=!1,s=!0,w.length>1&&o.push(Bt(S).join(" "));for(let R of w)e.push({terms:[R],prefix:!1,exact:!0});continue}let Y=v===h.length-1&&!/\\s$/.test(n);if(f){e[e.length-1].terms.push(w[0]);for(let R of w.slice(1))e.push({terms:[R],prefix:!1});f=!1;continue}let $=w[0],X=/[._-]/.test($),C=$.replace(/-/g,"");for(let[R,q]of w.entries())e.push({terms:[q],prefix:Y&&q.length>=2&&(R===w.length-1||X&&(q===$||q===C))})}let b=[...new Set(e.flatMap(v=>v.terms))];return{groups:e,not:i,phrases:o,strict:s,highlight:b,filters:r,notFilters:a,...Object.keys(c).length?{facets:c}:{},...Object.keys(l).length?{notFacets:l}:{}}}async function br(n,t){let e=await t.meta(),i=typeof n=="string"?jt(n,{facets:wn([e])}):n,o=await Gi(i,e,t),s=Ji(i,e);if(!i.groups.length)return Zi(e,o,s);let r=[];for(let c of i.groups)r.push(await wr(c,e,t));let a=bn(r,e,o,s,"and").sort(Fe);return a.length||i.strict?a:bn(r,e,o,s,"or").sort(Fe)}var Fe=(n,t)=>t.score-n.score;async function Gi(n,t,e){let i=new Set;for(let o of n.not){let s;for(let r of o){let[a]=Qi(r,t),c=a?await e.shard(a):void 0,l=c&&Object.hasOwn(c,r)?c[r]:[],d=new Set;for(let u=0;u<l.length;u+=2)(!s||s.has(l[u]))&&d.add(l[u]);s=d}for(let r of s??[])i.add(r)}return i}function Zi(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 bn(n,t,e,i,o){let s=new Map,r=new Map;for(let c of n)for(let[l,d]of c)s.set(l,(s.get(l)??0)+d),r.set(l,(r.get(l)??0)+1);let a=[];for(let[c,l]of s){if(e.has(c)||i&&!i(c)||o==="and"&&r.get(c)!==n.length)continue;let[d,u,h]=t.docs[c];a.push({id:c,title:d,url:u,section:t.sections[h]??"",score:l*(r.get(c)/n.length)})}return a}var At={prefix:.6,stem:.4,titleAll:1.5,titleExact:2,headingAll:1.4,headingExact:1.8,phrase:1.5,typo:.3};function vr(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 Qi(n,t,e=!1){let i=yr(t);for(let s=Math.min(n.length,Ui);s>=1;s--){let r=mn(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=mn(n,Math.min(n.length,Ui));return e?t.shards.filter(s=>s.startsWith(o)).slice(0,10):[]}var Ui=3,Wi=new WeakMap;function yr(n){let t=Wi.get(n);return t||Wi.set(n,t=new Set(n.shards)),t}function yn(n){return n.replace(/"/g,"").trim().toLowerCase()}function Ji(n,t){let{tag:e,section:i}=n.filters,o=n.notFilters??{tag:[],section:[]},s=Object.entries(n.facets??{}).filter(([,p])=>p.length),r=Object.entries(n.notFacets??{}).filter(([,p])=>p.length);if(!e.length&&!i.length&&!o.tag.length&&!o.section.length&&!s.length&&!r.length)return;let a=(p,v)=>new Set(p.flatMap((x,E)=>v.includes(yn(x))?[E]:[])),c=a(t.sections,i),l=a(t.tags??[],e),d=a(t.sections,o.section),u=a(t.tags??[],o.tag),h=p=>(t.facets??[]).findIndex(v=>v.name===p),g=p=>p.map(([v,x])=>{let E=h(v);return[E,E<0?new Set:a(t.facets[E].values,x)]}),f=g(s),b=g(r).filter(([p])=>p>=0),y=(p,[v,x])=>{var E;return v>=0&&(((E=p[4])==null?void 0:E[v])??[]).some(M=>x.has(M))};return p=>{let v=t.docs[p],x=v[3]??[];if(i.length&&!c.has(v[2])||e.length&&!x.some(E=>l.has(E))||d.has(v[2])||x.some(E=>u.has(E)))return!1;for(let E of f)if(!y(v,E))return!1;for(let E of b)if(y(v,E))return!1;return!0}}function wn(n){return[...new Set(n.flatMap(t=>((t==null?void 0:t.facets)??[]).map(e=>e.name)))]}function to(n,t){let e=Object.create(null),i=new Map,o=(s,r)=>{let a=`${s}\\0${yn(r)}`,c=i.get(a);c===void 0&&i.set(a,c=r);let l=e[s]??(e[s]=Object.create(null));l[c]=(l[c]??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 c of new Set(a[3]??[]))r.tags[c]!==void 0&&o("tag",r.tags[c]);(a[4]??[]).forEach((c,l)=>{var u;let d=(u=r.facets)==null?void 0:u[l];if(d)for(let h of new Set(c))d.values[h]!==void 0&&o(d.name,d.values[h])})}}return e}async function wr(n,t,e){let i=await no(n,t,e,!0);return n.corrected=i.corrected.length?i.corrected:void 0,eo(i,vn(t.count,i.docs.size))}function vn(n,t){return Math.log(1+(n-t+.5)/(t+.5))}function eo(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 no(n,t,e,i){let o=ye(t.lang),s=new Map,r=new Map;for(let d of n.terms)for(let u of Qi(d,t,n.prefix)){let h=await e.shard(u);if(!h)continue;let g=(p,v)=>{v>(s.get(p)??0)&&(s.set(p,v),r.set(p,h))};Object.hasOwn(h,d)&&g(d,1);let f=o==null?void 0:o(d),b=f?f.slice(0,Math.max(3,f.length-1)):void 0,y=0;for(let p in h)p!==d&&(n.prefix&&p.startsWith(d)&&y++<200&&g(p,At.prefix),f&&b&&p.startsWith(b)&&o(p)===f&&g(p,At.stem));if(i&&!s.size&&!n.exact&&d.length>=4&&!/[._-]/.test(d))for(let p in h)Math.abs(p.length-d.length)<=1&&vr(d,p)&&g(p,At.typo)}let a=[...s].filter(([,d])=>d===At.typo).map(([d])=>d),c=[...s].map(([d,u])=>[r.get(d)[d],u]),l=new Set;for(let[d]of c)for(let u=0;u<d.length;u+=2)l.add(d[u]);return{lists:c,docs:l,corrected:a}}var io=n=>typeof n=="function"?n:()=>n;async function oo(n,t){let e=io(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 l;let r=await o.meta(),a=[...new Set(s.map(d=>Math.floor(d.id/r.block)))],c=new Map;await Promise.all(a.map(async d=>{try{c.set(d,await o.fragment(d))}catch{c.set(d,void 0)}}));for(let d of s)d.fragment??(d.fragment=(l=c.get(Math.floor(d.id/r.block)))==null?void 0:l[d.id%r.block])}))}async function so(n){let t=io(n),e=new Map;return async i=>{let o=t(i),s=e.get(o);if(!s){let r=ye((await o.meta()).lang);s=(a,c)=>c.terms.some(l=>a===l||c.prefix&&a.startsWith(l)||r!==void 0&&r(a)===r(l))||(c.corrected??[]).includes(a),e.set(o,s)}return s}}async function ro(n,t,e,i=10){let o=t.slice(0,i);await oo(o,e);let s=n.groups,r=await so(e);for(let a of o){let c=await r(a),[l,d]=a.fragment??["",[]],u=Bt(a.title),h=1;s.length&&s.every(f=>u.some(b=>c(b,f)))&&(h=Yi(u,s,c)?At.titleExact:At.titleAll);let g=[];for(let[f,b]of d){let y=Bt(f);!s.length||!s.every(p=>y.some(v=>c(v,p)))||(g.push([f,b]),h=Math.max(h,Yi(y,s,c)?At.headingExact:At.headingAll))}if(a.sections=g.slice(0,3),n.phrases.length){let f=[a.title,l,...d.map(([b])=>b)].map(b=>Bt(b).join(" ")).join(" \\0 ");n.phrases.every(b=>f.includes(b))&&(h*=At.phrase)}a.score*=h}return o.sort((a,c)=>c.score-a.score),[...o,...t.slice(i)]}async function ao(n,t,e){await oo(t,e);let i=await so(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=Bt(r);return n.groups.length>0&&n.groups.every(c=>a.some(l=>s(l,c)))}).slice(0,3)}}function Yi(n,t,e){return n.every(i=>t.some(o=>e(i,o)))&&t.every(i=>n.some(o=>e(o,i)))}async function co(n,t,e=10){let i=await t.meta(),o=jt(n,{facets:wn([i])}),s=ye(i.lang);s&&(o.highlight=[...new Set([...o.highlight,...o.highlight.map(s).filter(a=>a.length>=3)])]);let r=await br(o,t);return o.highlight=[...new Set([...o.highlight,...o.groups.flatMap(a=>a.corrected??[])])],{parsed:o,results:await ro(o,r,t,e),facets:to(r,i)}}async function xr(n){return Promise.all(n.map(t=>t.data.meta().then(e=>e&&e.format===5?e:void 0,()=>{})))}async function Er(n,t,e,i){let o=e,s=new Set,r=[],a=async(A,S)=>{if(!s.has(A))try{return await S()}catch(w){s.add(A),r.push({source:A,error:w});return}},c=t.flatMap((A,S)=>e[S]?[S]:[]),l=[];await Promise.all(c.map(async A=>l[A]=await a(A,()=>Gi(n,o[A],t[A].data))??new Set));let d=[],u=[],h=(A,S)=>Promise.all(c.map(w=>a(w,()=>no(A,o[w],t[w].data,S)))),g=A=>A.every((S,w)=>!(S!=null&&S.docs.size)||s.has(c[w]));for(let A of n.groups){let S=await h(A,!1);u.push(g(S)),u[u.length-1]&&(S=await h(A,!0)),d.push(S)}for(let[A,S]of n.groups.entries())u[A]||!g(d[A])||(S.corrected=void 0,d[A]=await h(S,!0));if(c.length&&c.every(A=>s.has(A)))throw r[0].error;let f=c.filter(A=>!s.has(A)),b=[];for(let A of f)b[A]=Ji(n,o[A]);let y=(A,S)=>A.map(w=>({...w,source:S,score:w.score*Sr(t[S])})),p=A=>({results:Ar(A,t),failed:[...s].sort((S,w)=>S-w),errors:r});if(!n.groups.length)return p(f.flatMap(A=>y(Zi(o[A],l[A],b[A]),A)).sort(Fe));let v=t.map(()=>[]),x=f.reduce((A,S)=>A+o[S].count,0);n.groups.forEach((A,S)=>{let w=d[S],Y=c.flatMap((C,R)=>s.has(C)?[]:[[C,w[R]]]),$=[...new Set(Y.flatMap(([,C])=>C.corrected))];A.corrected=$.length?$:void 0;let X=Y.reduce((C,[,R])=>C+R.docs.size,0);for(let[C,R]of Y)v[C].push(eo(R,i.stats==="own"?vn(o[C].count,R.docs.size):vn(x,X)))});let E=A=>f.flatMap(S=>y(bn(v[S],o[S],l[S],b[S],A),S)).sort(Fe),M=E("and");return p(M.length||n.strict?M:E("or"))}function Sr(n){return typeof n.boost=="number"&&Number.isFinite(n.boost)&&n.boost>=0?n.boost:1}function Ar(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 lo(n,t,e=10,i={}){let o=await xr(t),s=jt(n,{facets:wn(o)}),r=t.flatMap((u,h)=>o[h]?[]:[h]);for(let u of new Set(o.flatMap(h=>h?[h.lang]:[]))){let h=ye(u);h&&(s.highlight=[...new Set([...s.highlight,...s.highlight.map(h).filter(g=>g.length>=3)])])}let{results:a,failed:c,errors:l}=await Er(s,t,o,i);for(let u of c)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=to(a,u=>o[u.source]);return{parsed:s,results:await ro(s,a,u=>t[u.source].data,e),missing:r,facets:d,errors:l}}function xn(n,t,e=globalThis){var g,f;let i=((g=e.document)==null?void 0:g.baseURI)??((f=e.location)==null?void 0:f.href),o=Xi(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 c=(b,y,p)=>{let v;if(p){let x="",E=Xi(p,i);for(let M of r.keys())E.startsWith(M)&&M.length>x.length&&(x=M);v=x?r.get(x):void 0}!v&&r.size===1&&(v=a),v?v.set(b,y):s.q.push([b,y,p])},l=s.q;s.q=[],s.load=c;for(let[b,y,p]of l)c(b,y,p);e.__DOGSBAY_SEARCH__=s;let d=async(b,y)=>(a.has(b)||await t(n+y),a.get(b)),u,h={meta:()=>u??(u=d(Ne.docs,Ie.docs).then(b=>{if(!b||b.format!==5)throw new Error(`search index format ${(b==null?void 0:b.format)??"missing"}, expected ${5}: rebuild the site`);return b}).catch(b=>{throw u=void 0,b})),shard:async b=>(await h.meta()).shards.includes(b)?d(Ne.shard(b),Ie.shard(b)):void 0,fragment:b=>d(Ne.fragment(b),Ie.fragment(b))};return h}function Xi(n,t){try{return new URL(n,t).href}catch{return n}}function uo(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 g=await u.data(),f=g.url.startsWith(e)?g.url.slice(e.length):g.url.replace(/^\\/+/,""),b=(g.sub_results??[]).map(y=>[y.title,y.url.split("#")[1]??""]).filter(([,y])=>y);return{id:h,title:g.meta.title??f,url:f,section:"",score:r.length-h,fragment:[Cr(g.excerpt),b],sections:b.slice(0,3)}},c=await Promise.all(r.slice(0,10).map(a)),l=Promise.all(r.slice(10,30).map((u,h)=>a(u,h+10)));return l.catch(()=>{}),{results:c,more:l,later:(u,h)=>Promise.all(r.slice(u,u+h).map((g,f)=>a(g,u+f))),total:r.length,highlight:jt(i).highlight}}}function Cr(n){return new DOMParser().parseFromString(n,"text/html").body.textContent??""}function ho(n,t){let e=(n==null?void 0:n.units)??[],i=e.find(p=>p.prefix===t);if(!i)return{};let o=p=>p.product??"",s=p=>{var v;return((v=n==null?void 0:n.products)==null?void 0:v[p])??{versions:n==null?void 0:n.versions,defaultVersion:n==null?void 0:n.defaultVersion}},r=p=>{var v;return(v=s(o(p)).versions)==null?void 0:v.find(x=>x.id===p.version)},a=p=>{var v,x;return((x=(v=n==null?void 0:n.products)==null?void 0:v[p])==null?void 0:x.label)??(p||(n==null?void 0:n.name)||"")},c=p=>{var v;return[o(p)!==o(i)?a(o(p)):"",p.version!==void 0?((v=r(p))==null?void 0:v.label)??p.version:""].filter(Boolean).join(" \\xB7 ")},l=p=>({prefix:p.prefix,product:o(p),label:c(p),own:p===i,versioned:p.version!==void 0}),d=e.filter(p=>p.locale===i.locale),u=s(o(i)),h=(u.versions??[]).map(p=>p.id),g=p=>{var v;return p===i?-2:p.version===u.defaultVersion?-1:(v=r(p))!=null&&v.prerelease?h.length+h.indexOf(p.version):h.indexOf(p.version)},f=d.filter(p=>{var v;return o(p)===o(i)&&p.version!==void 0&&(p===i||!((v=r(p))!=null&&v.hidden))}).sort((p,v)=>g(p)-g(v)),b=[];for(let p of d){let v=o(p);if(b.some(M=>o(M)===v))continue;if(v===o(i)){b.push(i);continue}let x=d.filter(M=>o(M)===v),E=s(v).defaultVersion;b.push(x.find(M=>M.version===E)??x.find(M=>{var A;return!((A=r(M))!=null&&A.hidden)})??x[0])}let y={};return f.length>1&&(y.versions=f.map(l)),b.length>1&&(y.products=b.map(l)),(y.versions||y.products)&&(y.version=[l(i)]),y}var fo=1.5;function po(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,c)=>{let l=o[c];l!=null&&l.length&&(e[a.name]=l.map(d=>a.values[d]).filter(d=>typeof d=="string"))}),e}var Ct=n=>n.trim().toLowerCase();function mo(n,t,e){for(let[i,o]of Object.entries(t)){if(i===e||!o.length)continue;let s=new Set((n[i]??[]).map(Ct));if(!o.some(r=>s.has(Ct(r))))return!1}return!0}function go(n,t,e){return n.filter(i=>mo(t(i),e))}function bo(n,t,e,i){var s;let o={};for(let r of i){let a={},c=new Map;for(let l of n){let d=t(l);if(!((s=d[r])!=null&&s.length)||!mo(d,e,r))continue;let u=new Set;for(let h of d[r]){if(u.has(Ct(h)))continue;u.add(Ct(h));let g=c.get(Ct(h))??(c.set(Ct(h),h),h);a[g]=(a[g]??0)+1}}for(let l of e[r]??[])c.has(Ct(l))||(a[l]=0);Object.keys(a).length&&(o[r]=a)}return o}function vo(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=>Ct(a)===Ct(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 yo(n){if(!n)return{};let t={};for(let[e,i]of Object.entries(n)){let o=kr(Object.entries(i).map(([s,r])=>({value:s,count:r})));o.length>0&&(t[e]=o)}return t}function kr(n){return[...n].sort((t,e)=>t.count!==e.count?e.count-t.count:t.value.localeCompare(e.value))}function ie(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 wo(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 xo(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 Eo(n){let t=0;for(let e of Object.values(n))t+=e.length;return t}function So(n,t,e={}){if(t.length===0)return[];if(t.some(o=>o.value.includes("/"))){let o=e.nav?Or(e.nav,new Set(t.map(s=>s.value))):void 0;return Tr(n,t,e.display,o)}return Rr(n,t,e.nav,e.display)}function Tr(n,t,e,i){let o=new Map,s=[];for(let l of t){let d=l.value.split("/").filter(g=>g.length>0);if(d.length===0)continue;let u="",h=null;for(let g=0;g<d.length;g++){u=u?`${u}/${d[g]}`:d[g];let f=o.get(u);f||(f={value:u,label:ie(n,u,e),count:0,depth:g,hasValue:!1,children:[]},o.set(u,f),h?h.children.push(f):s.push(u)),g===d.length-1&&(f.count=l.count,f.hasValue=!0),h=f}}let r=(l,d)=>{if(i){let u=i.get(l.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 l.count!==d.count?d.count-l.count:l.value.localeCompare(d.value)},a=l=>{if(l.children.length!==0){l.children.sort(r);for(let d of l.children)a(d)}},c=s.map(l=>o.get(l));c.sort(r);for(let l of c)a(l);return c}function Or(n,t){let e=new Map,i=0,o=s=>{for(let r of s){if(r.href){let a=Ao(r.href);for(let c=0;c<a.length;c++){let l=a[c];if(!t.has(l))continue;let d="";for(let u=c;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 Rr(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:ie(n,h.value,i),count:h.count,depth:0,hasValue:!0,children:[]}));let s=new Set,r=[],a=new Map,c=h=>{if(h.length===0)return;let g=r,f=a;for(let b=0;b<h.length;b++){let y=h[b],p=f.get(y);if(!p){let x=o.get(y);p={value:y,label:ie(n,y,i),count:x?x.count:0,depth:b,hasValue:x!==void 0,children:[]},g.push(p),f.set(y,p),x&&s.add(y)}let v=l.get(p);v||(v=new Map,l.set(p,v)),g=p.children,f=v}},l=new Map,d=h=>{for(let g of h){if(g.href){let f=Ao(g.href);c(f)}g.children&&g.children.length>0&&d(g.children)}};d(e);let u=[];for(let h of t)s.has(h.value)||u.push({value:h.value,label:ie(n,h.value,i),count:h.count,depth:0,hasValue:!0,children:[]});return u.sort((h,g)=>h.value.localeCompare(g.value)),[...r,...u]}function Ao(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 Dr=6e4,Mr=30,_e=20,Ir=["version","versions","products"];function Lo(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=To(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 c=a.target.closest("input, textarea, select, [contenteditable]");if(a.key==="/"&&!c||a.key.toLowerCase()==="k"&&(a.metaKey||a.ctrlKey)){a.preventDefault();let l=document.querySelector("[data-db-search-page] [data-db-search-input]");l&&!e.open?l.focus():e.open?i.focus():e.show()}},{signal:t}),e.addEventListener("click",a=>{a.target.closest("a")&&e.close("api")},{signal:t})}function ko(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=Nr(),r=s.get("p")||void 0,a=s.get("v")||void 0,c=s.get("scope")??(s.get("q")?"version":void 0),l=To(n,{input:e,list:i,status:o,page:!0,params:s,scope:c,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")??"",l.activate(),e.value.trim()&&l.run()}function Nr(){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 Co=()=>!location.search&&location.hash.includes("=");function To(n,{input:t,list:e,status:i,page:o,scope:s,forward:r,params:a}){var Mn;let{signal:c}=n,l=i.textContent??"",d=xn(`${n.unitRoot}_dogsbay/search/`,n.loadScript,window),u=document.body.dataset.search??"builtin",h=location.protocol!=="file:",g=u==="pagefind"||u==="both"&&h?uo(n.unitRoot):void 0,f=u==="pagefind"&&!h,b=n.siteRoot??"",y=n.prefix??"",p={},v="version",x,E=`db-search-scope:${new URL(b||"./",location.href).pathname}`,M=()=>{let L=window.__DOGSBAY_SITE__;if(r&&L&&A(L)||(r=void 0,g))return;p=ho(L,y);let O=s??En(()=>sessionStorage.getItem(E)),k=v;O&&Object.prototype.hasOwnProperty.call(p,O)&&(v=O),gt(),v!==k&&t.value.trim()&&it(++j)},A=L=>{var G,J;let O=L.units??[],k=O.find(W=>W.prefix===y);if(!k)return!1;let P=r.product??k.product??"",H=O.filter(W=>W.locale===k.locale&&(W.product??"")===P),D=((J=(G=L.products)==null?void 0:G[P])==null?void 0:J.defaultVersion)??L.defaultVersion,F=r.version!==void 0?H.find(W=>W.version===r.version||W.prefix&&W.prefix.split("/").pop()===r.version):H.find(W=>W===k)??H.find(W=>W.version===D)??H[0];if(!F||F.prefix===y||!F.search)return!1;let B=new URLSearchParams(a);B.delete("p"),B.delete("v");let N=B.toString();return location.replace(`${w(F.prefix)}${F.search}${N?Co()?`#${N}`:`?${N}`:""}`),!0},S=()=>x??(x=n.loadScript(`${b}_dogsbay/site.js`).then(M,M)),w=L=>`${b}${L?`${L}/`:""}`,Y=new Map([[y,d]]),$=L=>{let O=Y.get(L);return O||Y.set(L,O=xn(`${w(L)}_dogsbay/search/`,n.loadScript,window)),O},X=new Map,C=((Mn=o?e.closest("[data-db-search-page]"):e.closest("dialog"))==null?void 0:Mn.querySelector("[data-db-search-facets]"))??void 0,R=(()=>{try{return JSON.parse(e.dataset.facets??"{}")}catch{return{}}})(),q=C?Object.keys(R):[],V=o&&a?vo(a,q):{},z=()=>{r&&S(),f?i.textContent=e.dataset.needsServer??"":g||(d.meta().catch(()=>i.textContent="Search index could not be loaded."),S())},j=0,U,T;t.addEventListener("input",()=>{clearTimeout(T),T=setTimeout(()=>void it(++j),80)},{signal:c});let I=new Map,_=typeof IntersectionObserver=="function"?new IntersectionObserver(L=>{var O;for(let k of L)k.isIntersecting&&((O=I.get(k.target))==null||O(),I.delete(k.target),_.unobserve(k.target))}):void 0,Q=L=>{if(!o||r)return;let O=new URLSearchParams;L&&O.set("q",L),v!=="version"&&O.set("scope",v);for(let[H,D]of Object.entries(V))for(let F of D)O.append("filter",`${H}:${F}`);let k=O.toString(),P=Co();En(()=>history.replaceState(history.state,"",`${location.pathname}${k?P?`${location.search}#${k}`:`?${k}`:""}`))},it=async L=>{let O=t.value.trim();if(Q(O),!O){_==null||_.disconnect(),I.clear(),K.hidden=!0,C&&(C.hidden=!0),It=void 0,e.replaceChildren(),dt.hidden=lt.hidden=!0,i.textContent=l;return}if(!f){It=void 0;try{if(g){let k=await g(O);if(L!==j)return;if(o){let P=await k.more;if(L!==j)return;Ae(O,[...k.results,...P].slice(0,_e),k.highlight,k.total,k.later)}else{Ae(O,k.results,k.highlight,k.total);let P=await k.more;L===j&&P.length&&Bo(O,P,k.highlight)}}else if(v!=="version"&&p[v]){let k=Date.now(),P=p[v],H=P.filter(N=>N.own||k-(X.get(N.prefix)??-1/0)>Dr),D=await lo(O,H.map(N=>({data:$(N.prefix),boost:N.own?fo:1,collapse:N.product})));for(let N of D.missing)X.set(H[N].prefix,Date.now());if(L!==j)return;U=D.parsed;let F=D.results.map(N=>{var J;let G=H[N.source];return Object.assign(N,{base:w(G.prefix),from:G.own?void 0:G.label,also:(J=N.others)==null?void 0:J.map(W=>H[W.source].label).filter(Boolean),data:$(G.prefix)})}),B=D.missing.length+P.length-H.length;await Se(L,O,F,D.parsed.highlight,B?` \\xB7 ${(e.dataset.unavailable??"{n}").replace("{n}",String(B))}`:"")}else{let k=await co(O,d);if(L!==j)return;U=k.parsed,await Se(L,O,k.results,k.parsed.highlight,"")}}catch{if(L!==j)return;i.textContent="Search index could not be loaded.",C&&(C.hidden=!0)}}},K=document.createElement("div");K.setAttribute("role","group"),K.setAttribute("aria-label",e.dataset.filterSection??"Filter by section"),K.className=o?"flex flex-wrap gap-1 pb-3":"flex flex-wrap gap-1 px-3 pb-2",K.hidden=!0,e.before(K);let nt=document.createElement("div");nt.setAttribute("role","group"),nt.setAttribute("aria-label",e.dataset.scope??"Search in"),nt.className=o?"flex flex-wrap items-center gap-1 pb-3":"flex flex-wrap items-center gap-1 px-3 pb-2",nt.hidden=!0,K.before(nt);let lt=document.createElement("a");lt.className="mx-3 mb-2 mt-1 block rounded-md px-3 py-2 text-center text-sm font-medium hover:bg-accent",lt.dataset.dbSearchSeeAll="",lt.hidden=!0;let dt=document.createElement("button");dt.type="button",dt.className="mt-4 rounded-md border px-3 py-1.5 text-sm hover:bg-accent",dt.textContent=e.dataset.more??"More results",dt.hidden=!0,e.after(o?dt:lt);let gt=()=>{var k,P;let L=Ir.filter(H=>p[H]),O={version:((P=(k=p.version)==null?void 0:k[0])==null?void 0:P.versioned)===!1?e.dataset.scopeProduct:e.dataset.scopeVersion,versions:e.dataset.scopeVersions,products:e.dataset.scopeProducts};nt.replaceChildren(...L.map(H=>{let D=document.createElement("button");return D.type="button",D.dataset.scope=H,D.setAttribute("aria-pressed",String(H===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=O[H]??H,D.addEventListener("click",()=>{var F;v!==H&&(v=H,En(()=>sessionStorage.setItem(E,H)),gt(),(F=nt.querySelector(`[data-scope="${H}"]`))==null||F.focus(),t.value.trim()?it(++j):Q(""))},{signal:c}),D})),nt.hidden=L.length<2};c==null||c.addEventListener("abort",()=>{clearTimeout(T),j++,_==null||_.disconnect(),I.clear(),K.remove(),nt.remove(),lt.remove(),dt.remove()});let Ut=L=>L.replace(/"/g,""),We=L=>`section:"${Ut(L)}"`,Lt,ce=(L,O)=>{let k=new Map;for(let F of O)F.section&&k.set(F.section,(k.get(F.section)??0)+1);let P=[...L.matchAll(/section:"([^"]*)"/gi)].map(F=>F[1].toLowerCase()),H=F=>P.includes(Ut(F).toLowerCase()),D=[...k].sort((F,B)=>B[1]-F[1]).slice(0,6).map(([F])=>F);for(let F of P)D.some(B=>Ut(B).toLowerCase()===F)||D.push(F);K.replaceChildren(...D.length>1||P.length?D.map(F=>{let B=document.createElement("button");B.type="button";let N=H(F);return B.setAttribute("aria-pressed",String(N)),B.className="rounded-full border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",B.textContent=F,B.addEventListener("click",()=>{let G=We(F),J=t.value.replace(new RegExp(`\\\\s*section:"${Ut(F).replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}"`,"i"),"").trim();t.value=N?J:`${J} ${G}`.trim(),Lt=F,t.dispatchEvent(new Event("input",{bubbles:!0}))},{signal:c}),B}):[]),K.hidden=!K.childElementCount,Lt!==void 0&&(([...K.querySelectorAll("button")].find(B=>B.textContent===Lt)??t).focus(),Lt=void 0)},It,Se=async(L,O,k,P,H)=>{if(!q.length){Ae(O,k,P,k.length),i.textContent+=H;return}let D=new Map;for(let B of k){let N=B.data??d;D.has(N)||D.set(N,await N.meta())}if(L!==j)return;let F=new Map(k.map(B=>[B,po(D.get(B.data??d),B.id)]));It={q:O,results:k,terms:P,note:H,valuesOf:B=>F.get(B)??{}},Nt()},Nt=()=>{if(!It)return;let{q:L,results:O,terms:k,note:P,valuesOf:H}=It,D=go(O,H,V);Ye(bo(O,H,V,q)),Ae(L,D,k,D.length),i.textContent+=P},kt,Ye=L=>{var F,B;if(!C)return;let O=wo(Object.keys(L),R);if(C.hidden=!O.length,!O.length)return C.replaceChildren();let k=(N,G,J,W)=>{let Z=document.createElement("label");Z.className="flex cursor-pointer items-center gap-2 rounded-md px-2 py-1 hover:bg-accent";let rt=document.createElement("input");rt.type="checkbox",rt.dataset.facetName=N,rt.dataset.facetValue=G,rt.checked=(V[N]??[]).some(jo=>jo.toLowerCase()===G.toLowerCase()),rt.className="size-3.5 rounded border-border accent-primary";let wt=document.createElement("span");wt.className="flex-1 truncate",wt.textContent=J;let Ge=document.createElement("span");return Ge.className="text-xs text-muted-foreground",Ge.textContent=String(W),Z.append(rt,wt,Ge),Z},P=(N,G)=>{let J=document.createElement("ul");J.className="space-y-0.5";for(let W of G){let Z=document.createElement("li");if(W.hasValue)Z.append(k(N,W.value,W.label,W.count));else{let rt=document.createElement("span");rt.className="block px-2 py-1 text-muted-foreground",rt.textContent=W.label,Z.append(rt)}if(W.children.length){let rt=P(N,W.children);rt.classList.add("ml-4"),Z.append(rt)}J.append(Z)}return J},H=[],D=Eo(V);if(D){let N=document.createElement("button");N.type="button",N.dataset.clearFilters="",N.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",N.textContent=(e.dataset.facetsClear??"Clear all ({n})").replace("{n}",String(D)),H.push(N)}for(let N of O){let G=yo({[N]:L[N]})[N]??[],J=document.createElement("fieldset");J.className="mb-3";let W=document.createElement("legend");if(W.className="mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground",W.textContent=((F=R[N])==null?void 0:F.title)??N,J.append(W),(B=R[N])!=null&&B.hierarchical||G.some(Z=>Z.value.includes("/")))J.append(P(N,So(N,G,{display:R})));else{let Z=document.createElement("ul");Z.className="space-y-0.5";for(let rt of G){let wt=document.createElement("li");wt.append(k(N,rt.value,ie(N,rt.value,R),rt.count)),Z.append(wt)}J.append(Z)}H.push(J)}C.replaceChildren(...H),kt!==void 0&&(((kt?[...C.querySelectorAll("input[data-facet-name]")].find(G=>`${G.dataset.facetName}\\0${G.dataset.facetValue}`===kt):C.querySelector("[data-clear-filters]"))??t).focus(),kt=void 0)};C==null||C.addEventListener("change",L=>{let O=L.target;if(!O.dataset.facetName)return;let k=O.dataset.facetName,P=O.dataset.facetValue,H=(V[k]??[]).find(D=>D.toLowerCase()===P.toLowerCase());V=xo(V,k,H??P),kt=`${k}\\0${P}`,Q(t.value.trim()),Nt()},{signal:c}),C==null||C.addEventListener("click",L=>{L.target.closest("[data-clear-filters]")&&(V={},kt="",Q(t.value.trim()),Nt())},{signal:c});let ut,Ae=(L,O,k,P,H)=>{_==null||_.disconnect(),I.clear(),ce(L,O);let D=O.slice(0,o?_e:Mr);if(ut={q:L,results:O,terms:k,shown:D.length,total:P,later:H},e.replaceChildren(...Xe(L,D,k)),i.textContent=P?`${P} result${P===1?"":"s"}`:`${e.dataset.noResults} \\u201C${L}\\u201D`,dt.hidden=!o||!Rn(),lt.hidden=o||!P||!e.dataset.searchPage,!lt.hidden){let F=new URLSearchParams({q:L});v!=="version"&&F.set("scope",v);for(let[B,N]of Object.entries(V))for(let G of N)F.append("filter",`${B}:${G}`);lt.href=`${e.dataset.searchPage}?${F}`,lt.textContent=(e.dataset.seeAll??"See all {n} results").replace("{n}",String(P))}},Bo=(L,O,k)=>e.append(...Xe(L,O,k)),Rn=()=>!!ut&&(ut.results.length>ut.shown||!!ut.later&&ut.shown<ut.total);dt.addEventListener("click",async()=>{var P,H;let L=ut;if(!L)return;let O=L.results.slice(L.shown,L.shown+_e);if(!O.length&&L.later){if(O=await L.later(L.shown,_e).catch(()=>[]),L!==ut)return;L.results.push(...O)}let k=Xe(L.q,O,L.terms);e.append(...k),L.shown+=O.length,dt.hidden=!O.length||!Rn(),(H=(P=k[0])==null?void 0:P.querySelector("a"))==null||H.focus()},{signal:c});let Xe=(L,O,k)=>{var H;let P=[];for(let D of O){let F=D.base??n.unitRoot,B=Dn(F,D.url,k,"block rounded-md p-3 hover:bg-accent"),N=document.createElement("div");N.className="font-medium",N.append(...Sn(D.title,k)),B.a.appendChild(N);let G=[D.from,D.section].filter(Boolean).join(" \\xB7 ");if(G){let Z=document.createElement("div");Z.className="text-xs text-muted-foreground",Z.textContent=G,B.a.appendChild(Z)}let J=document.createElement("div");if(J.className="mt-1 line-clamp-2 text-xs text-muted-foreground",B.a.appendChild(J),(H=D.also)!=null&&H.length){let Z=document.createElement("div");Z.className="mt-1 text-xs text-muted-foreground",Z.textContent=`${e.dataset.alsoIn??"Also in"} ${D.also.join(", ")}`,B.a.appendChild(Z)}P.push(B.li);let W=()=>D.fragment?(D.fragment[0]&&J.replaceChildren(...Sn(D.fragment[0],k)),(D.sections??[]).map(([Z,rt])=>{let wt=Dn(F,`${D.url}#${rt}`,k,"ml-4 block rounded-md border-l px-3 py-1.5 text-sm hover:bg-accent");return wt.a.append(...Sn(Z,k)),wt.li})):[];if(D.fragment)P.push(...W());else if(_){let Z=U??jt(L);I.set(B.li,()=>void ao(Z,[D],D.data??d).then(()=>B.li.after(...W()),()=>{})),_.observe(B.li)}}return P},Dn=(L,O,k,P)=>{let H=document.createElement("li");o||H.setAttribute("role","none"),H.className="mb-1";let D=document.createElement("a");return o||(D.setAttribute("data-part","option"),D.dataset.value=O,D.tabIndex=-1),D.href=Hr(L+O,k),D.className=P,H.appendChild(D),{li:H,a:D}};return{activate:z,run:()=>void it(++j)}}function En(n){try{return n()}catch{return}}function Hr(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 Sn(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 Oo=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u;function Ro(n){var b;let t;try{t=(new URLSearchParams(location.search).get("h")??"").split(/\\s+/).filter(y=>y.length>0)}catch{return}let e=document.querySelector("#db-content article")??document.querySelector("#db-content");if(!t.length||!e)return;let i=y=>y.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&"),o=[...t].sort((y,p)=>p.length-y.length),s=o.filter(y=>Oo.test(y)).map(i),r=o.filter(y=>!Oo.test(y)).map(i),a=[r.length?`(?<![\\\\p{L}\\\\p{N}])(?:${r.join("|")})`:"",s.length?`(?:${s.join("|")})`:""].filter(Boolean),c=new RegExp(`(${a.join("|")})`,"giu"),l=[],d=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:y=>{var p;return(p=y.parentElement)!=null&&p.closest("script, style, mark, button, [aria-hidden=\'true\']")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),u=[];for(let y=d.nextNode();y;y=d.nextNode())u.push(y);for(let y of u){if(l.length>=500)break;let p=y.data;if(c.lastIndex=0,!c.test(p))continue;c.lastIndex=0;let v=document.createDocumentFragment(),x=0;for(let E of p.matchAll(c)){v.append(p.slice(x,E.index));let M=document.createElement("mark");M.className="db-search-hl",M.textContent=E[0],v.append(M),l.push(M),x=E.index+E[0].length}v.append(p.slice(x)),y.replaceWith(v)}if(Pr(),!l.length)return;let h=((b=document.querySelector("[data-clear-highlights]"))==null?void 0:b.dataset.clearHighlights)??"Clear highlights",g=document.createElement("div");g.className="not-prose mb-4";let f=document.createElement("button");f.type="button",f.className="inline-flex h-8 items-center rounded-md border px-3 text-sm hover:bg-accent",f.textContent=h,f.addEventListener("click",()=>{var y;for(let p of l)p.replaceWith(document.createTextNode(p.textContent??""));e.normalize(),g.remove(),(y=document.getElementById("db-content"))==null||y.focus({preventScroll:!0})},{signal:n}),g.append(f),e.prepend(g),location.hash||l[0].scrollIntoView({block:"center"})}function Pr(){try{let n=new URL(location.href);n.searchParams.delete("h"),history.replaceState(history.state,"",n.toString())}catch{}}var Kt=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},ze=function(t){return t.tagName==="IMG"},Fr=function(t){return NodeList.prototype.isPrototypeOf(t)},$e=function(t){return t&&t.nodeType===1},Do=function(t){var e=t.currentSrc||t.src;return e.substr(-4).toLowerCase()===".svg"},Mo=function(t){try{return Array.isArray(t)?t.filter(ze):Fr(t)?[].slice.call(t).filter(ze):$e(t)?[t].filter(ze):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(ze):[]}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`)}},_r=function(t){var e=document.createElement("div");return e.classList.add("medium-zoom-overlay"),e.style.background=t,e},zr=function(t){var e=t.getBoundingClientRect(),i=e.top,o=e.left,s=e.width,r=e.height,a=t.cloneNode(),c=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,l=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return a.removeAttribute("id"),a.style.position="absolute",a.style.top=i+c+"px",a.style.left=o+l+"px",a.style.width=s+"px",a.style.height=r+"px",a.style.transform="",a},oe=function(t,e){var i=Kt({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},$r=function n(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=window.Promise||function(C){function R(){}C(R,R)},o=function(C){var R=C.target;if(R===Y){f();return}x.indexOf(R)!==-1&&b({target:R})},s=function(){if(!(M||!w.original)){var C=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(A-C)>S.scrollOffset&&setTimeout(f,150)}},r=function(C){var R=C.key||C.keyCode;(R==="Escape"||R==="Esc"||R===27)&&f()},a=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=C;if(C.background&&(Y.style.background=C.background),C.container&&C.container instanceof Object&&(R.container=Kt({},S.container,C.container)),C.template){var q=$e(C.template)?C.template:document.querySelector(C.template);R.template=q}return S=Kt({},S,R),x.forEach(function(V){V.dispatchEvent(oe("medium-zoom:update",{detail:{zoom:$}}))}),$},c=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return n(Kt({},S,C))},l=function(){for(var C=arguments.length,R=Array(C),q=0;q<C;q++)R[q]=arguments[q];var V=R.reduce(function(z,j){return[].concat(z,Mo(j))},[]);return V.filter(function(z){return x.indexOf(z)===-1}).forEach(function(z){x.push(z),z.classList.add("medium-zoom-image")}),E.forEach(function(z){var j=z.type,U=z.listener,T=z.options;V.forEach(function(I){I.addEventListener(j,U,T)})}),$},d=function(){for(var C=arguments.length,R=Array(C),q=0;q<C;q++)R[q]=arguments[q];w.zoomed&&f();var V=R.length>0?R.reduce(function(z,j){return[].concat(z,Mo(j))},[]):x;return V.forEach(function(z){z.classList.remove("medium-zoom-image"),z.dispatchEvent(oe("medium-zoom:detach",{detail:{zoom:$}}))}),x=x.filter(function(z){return V.indexOf(z)===-1}),$},u=function(C,R){var q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return x.forEach(function(V){V.addEventListener("medium-zoom:"+C,R,q)}),E.push({type:"medium-zoom:"+C,listener:R,options:q}),$},h=function(C,R){var q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return x.forEach(function(V){V.removeEventListener("medium-zoom:"+C,R,q)}),E=E.filter(function(V){return!(V.type==="medium-zoom:"+C&&V.listener.toString()===R.toString())}),$},g=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=C.target,q=function(){var z={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},j=void 0,U=void 0;if(S.container)if(S.container instanceof Object)z=Kt({},z,S.container),j=z.width-z.left-z.right-S.margin*2,U=z.height-z.top-z.bottom-S.margin*2;else{var T=$e(S.container)?S.container:document.querySelector(S.container),I=T.getBoundingClientRect(),_=I.width,Q=I.height,it=I.left,K=I.top;z=Kt({},z,{width:_,height:Q,left:it,top:K})}j=j||z.width-S.margin*2,U=U||z.height-S.margin*2;var nt=w.zoomedHd||w.original,lt=Do(nt)?j:nt.naturalWidth||j,dt=Do(nt)?U:nt.naturalHeight||U,gt=nt.getBoundingClientRect(),Ut=gt.top,We=gt.left,Lt=gt.width,ce=gt.height,It=Math.min(Math.max(Lt,lt),j)/Lt,Se=Math.min(Math.max(ce,dt),U)/ce,Nt=Math.min(It,Se),kt=(-We+(j-Lt)/2+S.margin+z.left)/Nt,Ye=(-Ut+(U-ce)/2+S.margin+z.top)/Nt,ut="scale("+Nt+") translate3d("+kt+"px, "+Ye+"px, 0)";w.zoomed.style.transform=ut,w.zoomedHd&&(w.zoomedHd.style.transform=ut)};return new i(function(V){if(R&&x.indexOf(R)===-1){V($);return}var z=function _(){M=!1,w.zoomed.removeEventListener("transitionend",_),w.original.dispatchEvent(oe("medium-zoom:opened",{detail:{zoom:$}})),V($)};if(w.zoomed){V($);return}if(R)w.original=R;else if(x.length>0){var j=x;w.original=j[0]}else{V($);return}if(w.original.dispatchEvent(oe("medium-zoom:open",{detail:{zoom:$}})),A=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,M=!0,w.zoomed=zr(w.original),document.body.appendChild(Y),S.template){var U=$e(S.template)?S.template:document.querySelector(S.template);w.template=document.createElement("div"),w.template.appendChild(U.content.cloneNode(!0)),document.body.appendChild(w.template)}if(w.original.parentElement&&w.original.parentElement.tagName==="PICTURE"&&w.original.currentSrc&&(w.zoomed.src=w.original.currentSrc),document.body.appendChild(w.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),w.original.classList.add("medium-zoom-image--hidden"),w.zoomed.classList.add("medium-zoom-image--opened"),w.zoomed.addEventListener("click",f),w.zoomed.addEventListener("transitionend",z),w.original.getAttribute("data-zoom-src")){w.zoomedHd=w.zoomed.cloneNode(),w.zoomedHd.removeAttribute("srcset"),w.zoomedHd.removeAttribute("sizes"),w.zoomedHd.removeAttribute("loading"),w.zoomedHd.src=w.zoomed.getAttribute("data-zoom-src"),w.zoomedHd.onerror=function(){clearInterval(T),console.warn("Unable to reach the zoom image target "+w.zoomedHd.src),w.zoomedHd=null,q()};var T=setInterval(function(){w.zoomedHd.complete&&(clearInterval(T),w.zoomedHd.classList.add("medium-zoom-image--opened"),w.zoomedHd.addEventListener("click",f),document.body.appendChild(w.zoomedHd),q())},10)}else if(w.original.hasAttribute("srcset")){w.zoomedHd=w.zoomed.cloneNode(),w.zoomedHd.removeAttribute("sizes"),w.zoomedHd.removeAttribute("loading");var I=w.zoomedHd.addEventListener("load",function(){w.zoomedHd.removeEventListener("load",I),w.zoomedHd.classList.add("medium-zoom-image--opened"),w.zoomedHd.addEventListener("click",f),document.body.appendChild(w.zoomedHd),q()})}else q()})},f=function(){return new i(function(C){if(M||!w.original){C($);return}var R=function q(){w.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(w.zoomed),w.zoomedHd&&document.body.removeChild(w.zoomedHd),document.body.removeChild(Y),w.zoomed.classList.remove("medium-zoom-image--opened"),w.template&&document.body.removeChild(w.template),M=!1,w.zoomed.removeEventListener("transitionend",q),w.original.dispatchEvent(oe("medium-zoom:closed",{detail:{zoom:$}})),w.original=null,w.zoomed=null,w.zoomedHd=null,w.template=null,C($)};M=!0,document.body.classList.remove("medium-zoom--opened"),w.zoomed.style.transform="",w.zoomedHd&&(w.zoomedHd.style.transform=""),w.template&&(w.template.style.transition="opacity 150ms",w.template.style.opacity=0),w.original.dispatchEvent(oe("medium-zoom:close",{detail:{zoom:$}})),w.zoomed.addEventListener("transitionend",R)})},b=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=C.target;return w.original?f():g({target:R})},y=function(){return S},p=function(){return x},v=function(){return w.original},x=[],E=[],M=!1,A=0,S=e,w={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?S=t:(t||typeof t=="string")&&l(t),S=Kt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},S);var Y=_r(S.background);document.addEventListener("click",o),document.addEventListener("keyup",r),document.addEventListener("scroll",s),window.addEventListener("resize",f);var $={open:g,close:f,toggle:b,update:a,clone:c,attach:l,detach:d,on:u,off:h,getOptions:y,getImages:p,getZoomedImage:v};return $};function qr(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 Br=".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}";qr(Br);var Io=$r;var jr;function No(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=jr??(jr=Io());o.update(e),o.attach(...i),n==null||n.addEventListener("abort",()=>{o.close(),o.detach(...i)});let s={signal:n},r=!1,a=c=>c.key==="Enter"||c.key===" ";for(let c of i)c.alt&&(c.tabIndex=0,c.addEventListener("keydown",l=>{a(l)&&(l.preventDefault(),r=!0,o.open({target:c}))},s),c.addEventListener("medium-zoom:opened",()=>{let l=document.querySelector(".medium-zoom-image--opened");!r||!l||(l.tabIndex=-1,l.addEventListener("keydown",d=>{a(d)&&(d.preventDefault(),o.close())}),l.focus())},s),c.addEventListener("medium-zoom:closed",()=>{r&&c.focus(),r=!1},s))}var Kr=new Set(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"]),Vr=new Set(["script","style","textarea","title","noscript","template","xmp"]),Ur=new Set(["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"]),Wr=new Set(["nav","aside","header","footer","figure","table","details","blockquote","form","button","svg","math","dialog"]),Yr=new Set(["svg","math","button","select","img"]),Ho=Object.assign(Object.create(null),{amp:"&",lt:"<",gt:">",quot:\'"\',apos:"\'",nbsp:"\\xA0",hellip:"\\u2026",mdash:"\\u2014",ndash:"\\u2013",lsquo:"\\u2018",rsquo:"\\u2019",ldquo:"\\u201C",rdquo:"\\u201D",laquo:"\\xAB",raquo:"\\xBB",copy:"\\xA9",reg:"\\xAE",trade:"\\u2122",middot:"\\xB7",times:"\\xD7",para:"\\xB6",sect:"\\xA7",deg:"\\xB0",rarr:"\\u2192",larr:"\\u2190",bull:"\\u2022",shy:""});function Fo(n){return n.includes("&")?n.replace(/&(#[xX][0-9a-fA-F]{1,6}|#\\d{1,7}|[a-zA-Z]{2,8});/g,(t,e)=>{if(e[0]!=="#")return Ho[e]??Ho[e.toLowerCase()]??t;let i=e[1]==="x"||e[1]==="X"?Number.parseInt(e.slice(2),16):Number.parseInt(e.slice(1),10);return i>0&&i<=1114111&&!(i>=55296&&i<=57343)?String.fromCodePoint(i):"\\uFFFD"}):n}var Po=n=>n>" "&&n!==">"&&n!=="/"&&n!=="="&&n!==\'"\'&&n!=="\'";function Xr(n){let t={tag:"#root",attrs:{},children:[],start:0,end:0},e=n.toLowerCase(),i=t,o=0,s=0,r=1,a=new Map,c=u=>{u>s&&i.children.push(n.slice(s,u))},l=()=>{i.end=r,a.set(i.tag,a.get(i.tag)-1),i=i.parent},d=u=>{if(a.get(u))for(;i!==t;){let h=i.tag===u;if(l(),h)return}};for(;o<n.length;){let u=n.indexOf("<",o);if(u<0)break;let h=n[u+1]??"";if(n.startsWith("<!--",u)){c(u);let E=n.startsWith("<!-->",u)?5:n.startsWith("<!--->",u)?6:0,M=E?u:n.indexOf("-->",u+4);o=s=E?u+E:M<0?n.length:M+3;continue}if(h==="!"||h==="?"){c(u);let E=n.indexOf(">",u);o=s=E<0?n.length:E+1;continue}let g=h==="/",f=u+(g?2:1);if(!/[a-zA-Z]/.test(n[f]??"")){o=u+1;continue}let b=f;for(;f<n.length&&Po(n[f]);)f++;let y=e.slice(b,f),p={},v=!1;for(;f<n.length&&n[f]!==">";){let E=n[f];if(E==="/"){v=!0,f++;continue}if(E<=" "){f++;continue}v=!1;let M=f;for(;f<n.length&&(Po(n[f])||n[f]===\'"\'||n[f]==="\'")&&n[f]!=="=";)f++;let A=e.slice(M,f);for(;f<n.length&&n[f]<=" ";)f++;let S="";if(n[f]==="="){for(f++;f<n.length&&n[f]<=" ";)f++;let w=n[f];if(w===\'"\'||w==="\'"){let Y=n.indexOf(w,f+1);S=n.slice(f+1,Y<0?n.length:Y),f=Y<0?n.length:Y+1}else{let Y=f;for(;f<n.length&&n[f]>" "&&n[f]!==">";)f++;S=n.slice(Y,f)}}A&&!(A in p)&&(p[A]=Fo(S)),f===M&&f++}if(f>=n.length){c(u),s=n.length;break}if(c(u),o=s=f+1,g){d(y);continue}Ur.has(y)&&d("p");let x={tag:y,attrs:p,children:[],parent:i,start:r++,end:0};if(x.excl=Wr.has(y)||Ln(x)||"data-pagefind-ignore"in p?x:i.excl,i.children.push(x),Vr.has(y)){let E=e.indexOf(`</${y}`,o),M=E<0?n.length:E;y==="title"&&x.children.push(n.slice(o,M));let A=E<0?-1:n.indexOf(">",E);o=s=A<0?n.length:A+1,x.end=r;continue}!Kr.has(y)&&!v?(i=x,a.set(y,(a.get(y)??0)+1)):x.end=r}for(c(n.length);i!==t;)l();return t.end=r,t}function*we(n){let t=[...n.children].reverse();for(;t.length;){let e=t.pop();if(typeof e!="string"){yield e;for(let i=e.children.length-1;i>=0;i--)t.push(e.children[i])}}}var Ln=n=>n.attrs["aria-hidden"]==="true"||"hidden"in n.attrs||n.tag==="template";function se(n){let t="",e=[n];for(;e.length;){let i=e.pop();if(typeof i=="string"){t+=Fo(i);continue}if(!(i!==n&&(Ln(i)||Yr.has(i.tag)||i.tag==="script"||i.tag==="style"))){i.tag==="br"&&(t+=" ");for(let o=i.children.length-1;o>=0;o--)e.push(i.children[o])}}return t.replace(/[\\s\xA0]+/g," ").trim()}var An=(n,t)=>n.start<=t.start&&t.end<=n.end;function Gr(n,t){var i;let e=(i=n.parent)==null?void 0:i.excl;return!e||An(e,t)}var Cn=/^h([1-6])$/,Zr=120;function kn(n,t=200){if(n.length<=t)return n;let e=n.slice(0,t),i=e.lastIndexOf(" ");return`${(i>t*.6?e.slice(0,i):e).replace(/[\\s,;:.\u2013\u2014-]+$/,"")}\\u2026`}var Be=n=>kn(n,Zr),Qr=new Set(["p","li","dd","dt","td","th","blockquote","figcaption","caption","summary","pre"]);function qe(n,t,e){for(let i of n){if(e!=null&&e(i))break;if(i.tag!=="p"||!Gr(i,t)||Ln(i))continue;let o=se(i);if(o)return kn(o)}return""}function Vt(n,t){for(let e of we(n))if(t(e))return e}function Jr(n){let t=n.attrs["data-title"]??n.attrs["aria-label"]??n.attrs.title;if(t!=null&&t.trim())return Be(t.replace(/\\s+/g," ").trim());let e=Vt(n,i=>i.tag==="figcaption"||i.tag==="caption"||i.tag==="summary"||"data-card-title"in i.attrs||"data-title"in i.attrs||Cn.test(i.tag));return e?Be(se(e)):""}var ta=n=>{var t;return n.tag==="meta"&&((t=n.attrs["http-equiv"])==null?void 0:t.trim().toLowerCase())==="refresh"&&/[;,]\\s*url\\s*=/i.test(n.attrs.content??"")};function _o(n,t){var g;let e=Xr(n);if(Vt(e,ta))return;let i=Vt(e,f=>f.tag==="main")??e,o=Vt(i,f=>f.tag==="article"&&/(?:^|\\s)docs-prose(?:\\s|$)/.test(f.attrs.class??""))??i,s=Vt(i,f=>f.tag==="h1"),r=Vt(e,f=>f.tag==="title"),a=Be(s&&se(s)||(r?se(r).split(" | ")[0].trim():"")),c=t==null?void 0:t.replace(/^#/,"");if(!c||c==="top"){let f=[...we(o)],b=s?f.indexOf(s)+1:0;return{title:a,excerpt:qe(f.slice(Math.max(0,b)),o),kind:"page"}}let l=Vt(e,f=>f.attrs.id===c);if(!l)return;let d=(g=Cn.exec(l.tag))==null?void 0:g[1];if(d==="1")return{title:a,excerpt:qe(we(o),o),kind:"page"};if(d){let f=l.parent??e,b=[...we(f)],y=b.slice(b.indexOf(l)+1).filter(v=>!An(l,v)),p=An(o,l)?o:i;return{title:a,label:Be(se(l)),excerpt:qe(y,p,v=>{let x=Cn.exec(v.tag);return!!x&&Number(x[1])<=Number(d)}),kind:"heading"}}let u=qe(we(l),l),h=!u&&Qr.has(l.tag)?kn(se(l)):"";return{title:a,label:Jr(l),excerpt:u||h,kind:"target"}}var ea="dogsbay:link-preview-load",zo=[".db-link-preview{position:fixed;z-index:60;box-sizing:border-box;max-width:min(22rem,calc(100vw - 16px));max-height:min(16rem,calc(100vh - 16px));overflow:hidden;padding:.75rem .875rem;","border:1px solid var(--border,#e4e4e7);border-radius:var(--radius,.5rem);background:var(--popover,#fff);color:var(--popover-foreground,#18181b);","box-shadow:0 8px 24px rgb(0 0 0/.14);font-size:.875rem;line-height:1.45;text-align:start}",".db-link-preview[hidden]{display:none}",".db-link-preview-title{margin:0;font-weight:600}",".db-link-preview-label{font-weight:500}",".db-link-preview-excerpt{margin:.375rem 0 0;color:var(--muted-foreground,#52525b)}","@media (prefers-reduced-motion:no-preference){.db-link-preview:not([hidden]){animation:db-link-preview-in .12s ease-out}}","@keyframes db-link-preview-in{from{opacity:0;transform:translateY(2px)}}"].join(""),xe="db-link-preview",na="nav:not(.related-resources), aside, header, footer, h1, h2, h3, h4, h5, h6, [data-no-link-preview], [data-card], db-card, db-link-button",ia="div, p, h1, h2, h3, h4, h5, h6, img, svg, picture, figure, ul, ol, table",oa=/\\.(?:pdf|zip|gz|tgz|tar|bz2|xz|7z|rar|png|jpe?g|gif|svg|webp|avif|ico|bmp|tiff?|mp[34]|m4a|webm|ogg|wav|mov|avi|json|xml|csv|tsv|txt|ya?ml|md|epub|docx?|xlsx?|pptx?|odt|ods|exe|msi|dmg|pkg|deb|rpm|apk|iso|bin|wasm|js|mjs|css|map|woff2?|ttf|otf)$/i,sa=8e6,re;async function $o(n){let t=await fetch(n,{credentials:"same-origin",redirect:"manual",headers:{Accept:"text/html"}});if(t.type==="opaqueredirect"||t.status>=300&&t.status<400){let[e,i=""]=n.split("?");return e.endsWith("/")?void 0:$o(`${e}/${i?`?${i}`:""}`)}if(!(!t.ok||!/html/i.test(t.headers.get("content-type")??"text/html")))return t.text()}function ra(n,t="article.docs-prose",e=location){if(!n.closest(t)||n.closest(na)||n.hasAttribute("download")||n.getAttribute("aria-hidden")==="true"||n.hasAttribute("data-variant")||n.querySelector(ia))return;let i=n.getAttribute("href");if(!i)return;let o;try{o=new URL(i,e.href)}catch{return}if(o.origin!==e.origin||o.protocol!=="http:"&&o.protocol!=="https:"||oa.test(o.pathname))return;let s;try{s=o.hash?decodeURIComponent(o.hash.slice(1)):void 0}catch{s=o.hash.slice(1)}if(!(o.pathname===e.pathname&&o.search===e.search&&(!s||s==="top")))return o.hash="",{url:o,...s?{id:s}:{}}}function aa(){if(document.getElementById(`${xe}-style`)||document.dbLinkPreviewSheet)return;try{let t=new CSSStyleSheet;t.replaceSync(zo),document.adoptedStyleSheets=[...document.adoptedStyleSheets,t],document.dbLinkPreviewSheet=!0;return}catch{}let n=document.createElement("style");n.id=`${xe}-style`,n.textContent=zo,document.head.append(n)}var ca=n=>!!n&&typeof n=="object"&&typeof n.title=="string";function qo(n={}){re==null||re();let t=n.content??"article.docs-prose",e=n.delay??500;n.style!==!1&&aa();let i=new Map,o=new Map,s=0,r=new Map,a,c,l=0,d,u,h=null,g,f,b,y=document.createElement("div");y.id=xe,y.className="db-link-preview",y.setAttribute("role","tooltip"),y.hidden=!0;let p=document.createElement("p");p.className="db-link-preview-title";let v=document.createElement("p");v.className="db-link-preview-excerpt",y.append(p,v);let x=T=>{let I=T.href,_=i.get(I);return _?(i.delete(I),i.set(I,_)):(_=(async()=>{if(n.load)return n.load(T);let Q=!1,it,K=new CustomEvent(ea,{cancelable:!0,detail:{url:I,respond(nt){Q=!0,it=nt}}});return document.dispatchEvent(K),Q||K.defaultPrevented?it:T.href===location.href.split("#")[0]?document.documentElement.outerHTML:$o(T.pathname+T.search)})().then(Q=>{let it=typeof Q=="string"?Q.length:0;o.set(I,it),s+=it;for(let[K]of i){if(s<=sa||K===I)break;s-=o.get(K)??0,o.delete(K),i.delete(K);for(let nt of r.keys())nt.startsWith(K)&&r.delete(nt)}return Q},()=>{i.delete(I)}),i.set(I,_)),_},E=()=>{clearTimeout(g),clearTimeout(f),a=void 0,c=void 0,d==null||d.disconnect(),d=void 0,u&&(h===null?u.removeAttribute("aria-describedby"):u.setAttribute("aria-describedby",h),u=void 0,y.hidden=!0)},M=T=>{let I=[...T.getClientRects()],_=(b&&I.find(gt=>b.y>=gt.top&&b.y<=gt.bottom))??I[0]??T.getBoundingClientRect(),Q=y.offsetWidth,it=y.offsetHeight,K=8,nt=_.bottom+K,lt=nt+it<=window.innerHeight-K||_.top-K-it<K?nt:_.top-K-it,dt=Math.max(K,Math.min(_.left,window.innerWidth-Q-K));y.style.top=`${Math.round(lt)}px`,y.style.left=`${Math.round(dt)}px`},A=(T,I)=>{if(!(a!==T||!T.isConnected)){if(p.textContent="",p.append(I.title||I.label||""),I.label&&I.title){let _=document.createElement("span");_.className="db-link-preview-label",_.textContent=` \\u203A ${I.label}`,p.append(_)}v.textContent=I.excerpt,v.hidden=!I.excerpt,!(!p.textContent&&!I.excerpt)&&(y.isConnected||document.body.append(y),u!==T&&(h=T.getAttribute("aria-describedby"),T.setAttribute("aria-describedby",h?`${h} ${xe}`:xe),u=T),y.hidden=!1,M(T),d??(d=new MutationObserver(()=>{u&&!u.isConnected&&E()})),d.observe(document.body,{childList:!0,subtree:!0}))}},S=(T,I)=>{if(a===T)return;let _=ra(T,t);_&&(E(),a=T,c=I,g=setTimeout(async()=>{let Q=await x(_.url);if(a!==T)return;let it=`${_.url.href}#${_.id??""}`,K=r.get(it);K===void 0&&!r.has(it)&&(K=ca(Q)?Q:typeof Q=="string"?_o(Q,_.id):void 0,typeof Q=="string"&&r.set(it,K)),K&&A(T,K)},e))},w=T=>T instanceof Element?T.closest("a[href]"):null,Y=T=>{if(b={x:T.clientX,y:T.clientY},T.pointerType==="touch")return;if(y.contains(T.target)){clearTimeout(f);return}let I=w(T.target);I&&!(c==="focus"&&I===a)&&(clearTimeout(f),S(I,"pointer"))},$=T=>{if(T.pointerType==="touch"||!a||c!=="pointer")return;let I=T.relatedTarget;I&&(a.contains(I)||y.contains(I))||(clearTimeout(f),f=setTimeout(E,u?200:0))},j=[[document,"pointerover",Y],[document,"pointerout",$],[y,"pointerleave",(T=>$(T))],[document,"focusin",T=>{let I=w(T.target);if(!I)return;let _=!0;try{_=I.matches(":focus-visible")}catch{}_&&(b=void 0,l=performance.now(),S(I,"focus"))}],[document,"focusout",T=>{a&&(T.target===a||a.contains(T.target))&&E()}],[document,"keydown",T=>{T.key==="Escape"&&(a||u)&&E()}],[document,"pointerdown",T=>{y.contains(T.target)||E()},{capture:!0}],[document,"touchstart",()=>E(),{passive:!0,capture:!0}],[window,"scroll",()=>{if(c==="focus"&&a){u===a&&M(a);return}performance.now()-l<100||E()},{passive:!0,capture:!0}],[window,"resize",E,{passive:!0}],[window,"pagehide",E],[document,"astro:before-swap",E]];for(let[T,I,_,Q]of j)T.addEventListener(I,_,Q);let U=()=>{E();for(let[T,I,_,Q]of j)T.removeEventListener(I,_,Q);y.remove(),re===U&&(re=void 0)};return re=U,U}function je(n){return!/^[\\x00-\\x20]*([a-z][a-z0-9+.-]*:|[\\\\/])/i.test(n.replace(/[\\t\\n\\r]/g,""))}var Ke=new Map,la=15e3;function Tn(n){let t=Ke.get(n);if(!t){let e=new Promise((i,o)=>{let s=document.createElement("script");s.src=n;let r=setTimeout(()=>a(),la),a=()=>{clearTimeout(r),s.onload=s.onerror=null,Ke.get(n)===e&&Ke.delete(n),o(new Error(`could not load ${n}`))};s.onload=()=>{clearTimeout(r),i()},s.onerror=a,document.head.appendChild(s)});Ke.set(n,t=e)}return t}function da(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 ua(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 c=(s=e.dataset).label??(s.label=e.textContent??"");e.textContent="Copied",clearTimeout(Number(e.dataset.timer)),e.dataset.timer=String(setTimeout(()=>e.textContent=c,1500))}catch{}(a=(r=e.closest("db-popover"))==null?void 0:r.close)==null||a.call(r,"close-press")},{signal:n})}function ha(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")){(je(r)||/^https?:\\/\\//i.test(r))&&(location.href=r);return}if(!(!je(r)||!je(s))){if(i.dataset.dbSwitch==="product"){location.href=r;return}try{let c=s?`${n}${s}/`:n;await Tn(`${c}_dogsbay/pages.js`);let l=(a=window.__DOGSBAY_PAGES__)==null?void 0:a[s];location.href=l&&!l.includes(e)?`${c}index.html`:r}catch{location.href=r}}},{signal:t})})}function fa(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 Ee=new Map,Ue=new Set;function Ve(){for(let[n,t]of Ee)n.isConnected||(Dt(n),t.abort(),Ee.delete(n));for(let n of Ue)n.isConnected||Dt(n)}function pa(n,t){let e=EventTarget.prototype,i=e.addEventListener,o=0;e.addEventListener=function(s,r,a){o++;let c=typeof a=="object"?a.signal:void 0;i.call(this,s,r,typeof a=="object"?{...a,signal:c?AbortSignal.any([c,n]):n}:{capture:a===!0,signal:n})};try{t()}finally{e.addEventListener=i}return o}function ma(){Ve(),document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(n=>{if(Ee.has(n)||Ue.has(n))return;let t=new AbortController;pa(t.signal,()=>hn(n))?Ee.set(n,t):n.querySelector("[data-component=\'sidebar\']")&&Ue.add(n)}),document.removeEventListener("keydown",Ve),document.addEventListener("keydown",Ve)}var ae;function ga(n){return n===!1||!document.querySelector("main[data-link-previews]")||location.protocol==="file:"?void 0:qo({delay:(typeof n=="object"?n:{}).delay,content:"main[data-link-previews] article.docs-prose"})}function On(n={}){var c;ae==null||ae.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 d=l.querySelector(":scope > [data-part=\'list\']");d&&!d.querySelector("[data-part=\'item\']")&&((c=l.parentNode)==null||c.insertBefore(l,l.nextSibling))}}ma(),n.theme!==!1&&da(e),ua(e),n.switchers!==!1&&ha(s,e),fa(e),n.search!==!1&&(Lo({unitRoot:o,siteRoot:s,prefix:i.dataset.prefix??"",loadScript:Tn,signal:e}),ko({unitRoot:o,siteRoot:s,prefix:i.dataset.prefix??"",loadScript:Tn,signal:e})),Ro(e),No(e);let r=ga(n.linkPreviews);r&&e.addEventListener("abort",r,{once:!0});let a={unmount(){if(!e.aborted){t.abort();for(let l of[...Ee.keys(),...Ue])Dt(l);Ve(),ae===a&&(ae=void 0)}}};return ae=a}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>On()):On();})();\n';
|
|
23110
|
-
var CLIENT_FILE = "dogsbay-
|
|
23111
|
-
var SSG_VERSION = "0.2.0-beta.
|
|
23298
|
+
var CLIENT_JS = '/*! dogsbay-ssg site client (Apache-2.0). Third-party notices: THIRD-PARTY-NOTICES.txt */\n"use strict";(()=>{var Ko=Object.defineProperty;var Vo=(n,t,e)=>t in n?Ko(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var g=(n,t,e)=>Vo(n,typeof t!="symbol"?t+"":t,e);var et=class extends HTMLElement{constructor(){super(...arguments);g(this,"_initialized",!1);g(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(){}},Uo={"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"},In="dogsbay-elements-display";function nt(){if(typeof document>"u"||document.getElementById(In))return;let n=Object.entries(Uo).map(([e,i])=>`:where(${e}){display:${i}}`).join(""),t=document.createElement("style");t.id=In,t.textContent=n,document.head.prepend(t)}function Wo(n){return n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}function Yt(n,t,e){let i=t;do i+=e?-1:1;while(i>=0&&i<n.length&&Wo(n[i]));return i}var ue=class{constructor(n,t,e={}){g(this,"container");g(this,"itemSelector");g(this,"opts");g(this,"keydownHandler",null);g(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=Yt(t,i,!1),o>=t.length&&(o=this.opts.loop?Yt(t,-1,!1):i)):this.isBackwardKey(n.key,e)?(o=Yt(t,i,!0),o<0&&(o=this.opts.loop?Yt(t,t.length,!0):i)):this.opts.homeEnd&&n.key==="Home"?o=Yt(t,-1,!1):this.opts.homeEnd&&n.key==="End"&&(o=Yt(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 Yo=0;function Nn(n){return`${n}-${++Yo}`}var Hn=class extends et{constructor(){super(...arguments);g(this,"list");g(this,"triggers",[]);g(this,"panels",[]);g(this,"nav",null);g(this,"value","");g(this,"syncKey",null);g(this,"orientation","horizontal");g(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)});g(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)});g(this,"handleSyncEvent",(t=>{let e=t.detail.value;e&&this.value!==e&&this.has(e)&&this.select(e)}));g(this,"handleHashChange",()=>{let t=this.valueForHash();t&&(this.select(t.value),t.target&&this.reveal(t.target))})}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 c=r.id||Nn("db-tab");r.id=c;let l=this.panels.find(d=>d.dataset.value===a);if(l){l.setAttribute("role","tabpanel");let d=l.id||Nn("db-tabpanel");l.id=d,r.setAttribute("aria-controls",d),l.setAttribute("aria-labelledby",c)}}),this.nav=new ue(t,"[data-part=\'trigger\']",{orientation:this.orientation,loop:!0,homeEnd:!0,onHighlightedIndexChange:()=>{var c;let r=document.activeElement,a=(c=r==null?void 0:r.dataset)==null?void 0:c.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=this.valueForHash();o&&(i=o.value),this.select(i),o!=null&&o.target&&this.reveal(o.target)}valueForHash(){let t=window.location.hash.slice(1);if(!t)return;try{t=decodeURIComponent(t)}catch{}if(this.triggers.some(o=>o.dataset.value===t))return{value:t};let e=document.getElementById(t);if(!e)return;let i=this.panels.find(o=>o===e||o.contains(e));return i!=null&&i.dataset.value?{value:i.dataset.value,target:e}:void 0}reveal(t){requestAnimationFrame(()=>{var e;return(e=t.scrollIntoView)==null?void 0:e.call(t)})}connect(){var t;(t=this.list)==null||t.addEventListener("click",this.handleClick),window.addEventListener("hashchange",this.handleHashChange),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),window.removeEventListener("hashchange",this.handleHashChange),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})))}};nt();customElements.get("db-tabs")||customElements.define("db-tabs",Hn);var Xo=0;function Go(n){return`${n}-${++Xo}`}var Pn=class{constructor(n,t,e={}){g(this,"trigger");g(this,"content");g(this,"_open",!1);g(this,"opts");this.trigger=n,this.content=t,this.opts=e;let i=Go("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 Fn=class extends et{constructor(){super(...arguments);g(this,"items",[]);g(this,"nav",null);g(this,"openValues",new Set);g(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||"",c=o.hasAttribute("data-disabled");c&&(s.setAttribute("disabled",""),s.setAttribute("aria-disabled","true"));let l=new Pn(s,r,{onToggle:d=>{d?this.onItemExpanded(a):this.onItemCollapsed(a)}});return{el:o,value:a,collapsible:l,disabled:c}}).filter(Boolean),this.nav=new ue(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}))}};nt();customElements.get("db-accordion")||customElements.define("db-accordion",Fn);var Zo=0;function rt(n){return`${n}-${++Zo}`}function xt(n,t){let e=n.localName;return Array.from(n.querySelectorAll(t)).filter(i=>i.closest(e)===n)}function at(n,t){return xt(n,t)[0]??null}function Xt(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 ht(n){return n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"||n.getAttribute("data-disabled")==="true"}function _n(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover=="function"}function Gt(n){if(n.hidden=!1,!_n())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 Zt(n){if(_n())try{n.matches(":popover-open")&&n.hidePopover()}catch{}n.hidden=!0}var Qo=\'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]\';function zn(n){return Array.from(n.querySelectorAll(Qo)).filter(t=>!t.closest("[hidden]")&&!ht(t))}function $n(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 Qt(n){try{return decodeURIComponent(n)}catch{return n}}var Bn=class extends et{constructor(){super(...arguments);g(this,"details",null);g(this,"summary",null);g(this,"dialog",null);g(this,"body",null);g(this,"source",null);g(this,"moved",[]);g(this,"handledHash",null);g(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())});g(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()});g(this,"onDialogClose",()=>this.restore());g(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(Qt(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)}});g(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,Jo();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=rt("db-sheet");let r=document.createElement("h2");r.className="db-sheet-title",r.id=rt("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 c=document.createElement("div");c.className="db-sheet-header",c.append(r,a);let l=document.createElement("div");l.className="db-sheet-body",s.append(c,l),this.append(s),this.dialog=s,this.body=l,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 c;let{dialog:e,details:i,body:o}=this;if(!e||!i||!o||e.open)return;let s=Array.from(i.childNodes).filter(l=>l!==this.summary),r=s.filter(l=>l.nodeType===Node.ELEMENT_NODE),a=r.length===1&&s.every(l=>{var d;return l===r[0]||!((d=l.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&&((c=t.scrollIntoView)==null||c.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=Qt(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)}},qn="dogsbay-details-sheet";function Jo(){if(document.getElementById(qn))return;let n=document.createElement("style");n.id=qn,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)}nt();customElements.get("db-details-sheet")||customElements.define("db-details-sheet",Bn);var jn=class extends et{constructor(){super(...arguments);g(this,"copyBtn",null);g(this,"copyIcon",null);g(this,"checkIcon",null);g(this,"liveRegion",null);g(this,"resetTimeout",null);g(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)}};nt();customElements.get("db-code-block")||customElements.define("db-code-block",jn);var Kn=class extends et{constructor(){super(...arguments);g(this,"navData",null);g(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))});g(this,"onKey",t=>{var l,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),c=u=>{var h;u&&(t.preventDefault(),(h=this.primary(u))==null||h.focus())};switch(t.key){case"ArrowDown":return c(i[s+1]);case"ArrowUp":return c(i[s-1]);case"Home":return c(i[0]);case"End":return c(i[i.length-1]);case"ArrowRight":if(!a)return;t.preventDefault(),this.isOpen(r)?c(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=(l=r.parentElement)==null?void 0:l.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 xt(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 xt(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=xt(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(c=>c.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,c]=o[s],l=r!=null&&!c?this.linkOf(r):null;if(l&&new URL(l.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",ts),i.id||(i.id=rt("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 xt(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=es(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,c,l],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 f=a!=null?this.linkOf(a):null;f||(a=null);let v=null;if(c!=null&&c.length)if(v=document.createElement("button"),v.type="button",v.setAttribute("data-part","toggle"),v.setAttribute("aria-expanded","false"),a!=null)v.setAttribute("aria-label",i.replace("{label}",()=>r));else{let p=document.createElement("span");p.setAttribute("data-part","label"),p.textContent=r,v.appendChild(p)}let w=this.getAttribute("toggle-position")==="end";if(v&&!w&&m.appendChild(v),a!=null){let p=document.createElement("a");p.setAttribute("data-part","link"),p.textContent=r,p.href=f.href,f.external&&(p.rel="noopener"),(s!=null?u===s:!l&&p.href.split("#")[0]===o)&&p.setAttribute("aria-current","page"),m.appendChild(p)}if(a==null&&!(c!=null&&c.length)){let p=document.createElement("span");p.setAttribute("data-part","label"),p.textContent=r,m.appendChild(p)}if(v&&w&&m.appendChild(v),c!=null&&c.length){let p=document.createElement("ul");p.setAttribute("data-part","group"),p.dataset.lazy="",p.dataset.path=u,p.hidden=!0,h.setAttribute("data-state","closed"),h.appendChild(p),this.prepareItem(h)}return h})}},ts=\'<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 es(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}nt();customElements.get("db-nav-tree")||customElements.define("db-nav-tree",Kn);var Vn=class extends et{constructor(){super(...arguments);g(this,"links",[]);g(this,"headings",[]);g(this,"observer",null);g(this,"active",null);g(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)});g(this,"onHash",()=>{let t=Qt(location.hash.slice(1));t&&this.headings.some(e=>e.id===t)&&this.setActive(t)})}slugOf(t){return t.getAttribute("data-toc-slug")??Qt(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}))}}};nt();customElements.get("db-toc")||customElements.define("db-toc",Vn);var ns=["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] *)"],Ze=ns.join(","),Yn=typeof Element>"u",he=Yn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Le=!Yn&&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},ke=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]"):ke(t.parentNode));return r},is=function(t){var e,i=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return i===""||i==="true"},os=function(t,e,i){if(ke(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ze));return e&&he.call(t,Ze)&&o.unshift(t),o=o.filter(i),o},Qe=function(t,e,i){for(var o=[],s=Array.from(t);s.length;){var r=s.shift();if(!ke(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),c=a.length?a:r.children,l=Qe(c,!0,i);i.flatten?o.push.apply(o,l):o.push({scopeParent:r,candidates:l})}else{var d=he.call(r,Ze);d&&i.filter(r)&&(e||!t.includes(r))&&o.push(r);var u=r.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(r),h=!ke(u,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(r));if(u&&h){var m=Qe(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},Xn=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Gn=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||is(t))&&!Xn(t)?0:t.tabIndex},ss=function(t,e){var i=Gn(t);return i<0&&e&&!Xn(t)?0:i},rs=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Zn=function(t){return t.tagName==="INPUT"},as=function(t){return Zn(t)&&t.type==="hidden"},cs=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return e},ls=function(t,e){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===e)return t[i]},ds=function(t){if(!t.name)return!0;var e=t.form||Le(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=ls(o,t.form);return!s||s===t},us=function(t){return Zn(t)&&t.type==="radio"},hs=function(t){return us(t)&&!ds(t)},fs=function(t){var e,i=t&&Le(t),o=(e=i)===null||e===void 0?void 0:e.host,s=!1;if(i&&i!==t){var r,a,c;for(s=!!((r=o)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!s&&o;){var l,d,u;i=Le(o),o=(l=i)===null||l===void 0?void 0:l.host,s=!!((d=o)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(o))}}return s},Un=function(t){var e=t.getBoundingClientRect(),i=e.width,o=e.height;return i===0&&o===0},ps=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 c=he.call(t,"details>summary:first-of-type"),l=c?t.parentElement:t;if(he.call(l,"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=Le(t);if(u&&!u.shadowRoot&&o(u)===!0)return Un(t);t.assignedSlot?t=t.assignedSlot:!u&&h!==t.ownerDocument?t=h.host:t=u}t=d}if(fs(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return Un(t);return!1},ms=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 he.call(e,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}e=e.parentElement}return!1},gs=function(t,e){return!(e.disabled||as(e)||ps(e,t)||cs(e)||ms(e))},Wn=function(t,e){return!(hs(e)||Gn(e)<0||!gs(t,e))},bs=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Qn=function(t){var e=[],i=[];return t.forEach(function(o,s){var r=!!o.scopeParent,a=r?o.scopeParent:o,c=ss(a,r),l=r?Qn(o.candidates):a;c===0?r?e.push.apply(e,l):e.push(a):i.push({documentOrder:s,tabIndex:c,item:o,isScope:r,content:l})}),i.sort(rs).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(e)},Je=function(t,e){e=e||{};var i;return e.getShadowRoot?i=Qe([t],e.includeContainer,{filter:Wn.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:bs}):i=os(t,e.includeContainer,Wn.bind(null,e)),Qn(i)};var tn=class{constructor(n,t={}){g(this,"root");g(this,"opts");g(this,"previouslyFocused",null);g(this,"keydownHandler",null);g(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=Je(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=Je(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 lt,Pt=(lt=class{static activate(){if(lt.count++,lt.count>1)return;let t=window.innerWidth-document.documentElement.clientWidth;lt.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(){lt.count=Math.max(0,lt.count-1),!(lt.count>0)&<.originalStyles&&(document.body.style.overflow=lt.originalStyles.overflow,document.body.style.paddingRight=lt.originalStyles.paddingRight,lt.originalStyles=null)}static reset(){lt.count=0,lt.originalStyles=null}},g(lt,"count",0),g(lt,"originalStyles",null),lt);var Et=[];function vs(n){if(n.key!=="Escape"||Et.length===0)return;let t=Et[Et.length-1];t.escapePrevented||(n.preventDefault(),n.stopPropagation(),t.opts.onDismiss("escape-key"))}var Jn=!1;function ys(){Jn||(Jn=!0,document.addEventListener("keydown",vs))}var Ft=class{constructor(n,t){g(this,"root");g(this,"opts");g(this,"outsideHandler",null);g(this,"active",!1);g(this,"frameId",null);g(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&&(ys(),Et.push(this)),this.opts.outsidePress&&(this.outsideHandler=n=>{if(Et.length>0&&Et[Et.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=Et.indexOf(this);n!==-1&&Et.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 en(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 ti=class extends et{constructor(){super(...arguments);g(this,"content",null);g(this,"backdrop",null);g(this,"trigger",null);g(this,"native",!1);g(this,"_open",!1);g(this,"openedBy",null);g(this,"focusTrap",null);g(this,"dismiss",null);g(this,"cleanupInert",null);g(this,"onTriggerClick",t=>{t.preventDefault(),this.toggle(t.currentTarget)});g(this,"onHostClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-dialog")===this&&this.close("close-press")});g(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))});g(this,"onCancel",t=>{t.preventDefault(),this.dismissible&&this.close("escape-key")});g(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")});g(this,"onNativeClose",()=>{this._open&&this.finishClose("close-press")})}get open(){return this._open}get dismissible(){return this.getAttribute("dismissible")!=="false"}setup(){if(this.content=at(this,"[data-part=\'content\']"),!this.content)return;this.native=typeof HTMLDialogElement<"u"&&this.content instanceof HTMLDialogElement&&typeof this.content.showModal=="function",this.backdrop=at(this,"[data-part=\'backdrop\']"),this.trigger=Xt(at(this,"[data-part=\'trigger\']"));let t=this.content;t.id||(t.id=rt("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=rt("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=rt("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 tn(t),this.dismiss=new Ft(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(Pt.activate(),this.native){let s=e;s.open||s.showModal()}else e.hidden=!1,this.backdrop&&(this.backdrop.hidden=!1),this.cleanupInert=en(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 c of this.triggers())c.setAttribute("aria-expanded","false");if(Pt.deactivate(),this.native){let c=i;c.open&&c.close()}else(s=this.dismiss)==null||s.deactivate(),(r=this.focusTrap)==null||r.deactivate(),(a=this.cleanupInert)==null||a.call(this),this.cleanupInert=null,$n(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}))}};nt();customElements.get("db-dialog")||customElements.define("db-dialog",ti);var ei=class extends et{constructor(){super(...arguments);g(this,"input",null);g(this,"listbox",null);g(this,"empty",null);g(this,"_open",!1);g(this,"highlighted",null);g(this,"observer",null);g(this,"base",rt("db-combobox"));g(this,"optionSeq",0);g(this,"onInput",()=>{this.filtering?this.filter(this.input.value):this.show()});g(this,"onFocus",()=>{(this.hasAttribute("open-on-focus")||this.filtering&&this.input.value)&&(this.filtering?this.filter(this.input.value):this.show())});g(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}});g(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'option\']");if(!e||e.closest("db-combobox")!==this||ht(e))return;let i=t.target.closest("a[href]");!this.choose(e,!i)&&i&&t.preventDefault()});g(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'option\']");e&&e.closest("db-combobox")===this&&!ht(e)&&!e.hidden&&this.highlight(e)});g(this,"onListDown",t=>t.preventDefault());g(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&&!ht(t))}setup(){if(this.input=at(this,"[data-part=\'input\']"),this.listbox=at(this,"[data-part=\'listbox\']"),this.empty=at(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)}};nt();customElements.get("db-combobox")||customElements.define("db-combobox",ei);var Ot=Math.min,ft=Math.max,pe=Math.round,me=Math.floor,gt=n=>({x:n,y:n}),ws={left:"right",right:"left",bottom:"top",top:"bottom"};function oi(n,t,e){return ft(n,Ot(t,e))}function Jt(n,t){return typeof n=="function"?n(t):n}function Rt(n){return n.split("-")[0]}function te(n){return n.split("-")[1]}function nn(n){return n==="x"?"y":"x"}function on(n){return n==="y"?"height":"width"}function bt(n){let t=n[0];return t==="t"||t==="b"?"y":"x"}function sn(n){return nn(bt(n))}function si(n,t,e){e===void 0&&(e=!1);let i=te(n),o=sn(n),s=on(o),r=o==="x"?i===(e?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=fe(r)),[r,fe(r)]}function ri(n){let t=fe(n);return[Te(n),t,Te(t)]}function Te(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}var ni=["left","right"],ii=["right","left"],xs=["top","bottom"],Es=["bottom","top"];function Ss(n,t,e){switch(n){case"top":case"bottom":return e?t?ii:ni:t?ni:ii;case"left":case"right":return t?xs:Es;default:return[]}}function ai(n,t,e,i){let o=te(n),s=Ss(Rt(n),e==="start",i);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(Te)))),s}function fe(n){let t=Rt(n);return ws[t]+n.slice(t.length)}function As(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 ci(n){return typeof n!="number"?As(n):{top:n,right:n,bottom:n,left:n}}function _t(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 li(n,t,e){let{reference:i,floating:o}=n,s=bt(t),r=sn(t),a=on(r),c=Rt(t),l=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(c){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 f=te(t);return f&&(m[r]+=h*(f==="end"?1:-1)*(e&&l?-1:1)),m}async function di(n,t){var e;t===void 0&&(t={});let{x:i,y:o,platform:s,rects:r,elements:a,strategy:c}=n,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:m=0}=Jt(t,n),f=ci(m),w=a[h?u==="floating"?"reference":"floating":u],p=_t(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:l,rootBoundary:d,strategy:c})),b=u==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=await(s.isElement==null?void 0:s.isElement(x))&&await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1},M=_t(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:x,strategy:c}):b);return{top:(p.top-M.top+f.top)/E.y,bottom:(M.bottom-p.bottom+f.bottom)/E.y,left:(p.left-M.left+f.left)/E.x,right:(M.right-p.right+f.right)/E.x}}var Cs=50,ui=async(n,t,e)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:di},c=await(r.isRTL==null?void 0:r.isRTL(t)),l=await r.getElementRects({reference:n,floating:t,strategy:o}),{x:d,y:u}=li(l,i,c),h=i,m=0,f={};for(let v=0;v<s.length;v++){let w=s[v];if(!w)continue;let{name:p,fn:b}=w,{x,y:E,data:M,reset:S}=await b({x:d,y:u,initialPlacement:i,placement:h,strategy:o,middlewareData:f,rects:l,platform:a,elements:{reference:n,floating:t}});d=x??d,u=E??u,f[p]={...f[p],...M},S&&m<Cs&&(m++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(l=S.rects===!0?await r.getElementRects({reference:n,floating:t,strategy:o}):S.rects),{x:d,y:u}=li(l,h,c)),v=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:f}};var hi=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:c,elements:l}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:v=!0,...w}=Jt(n,t);if((e=s.arrow)!=null&&e.alignmentOffset)return{};let p=Rt(o),b=bt(a),x=Rt(a)===a,E=await(c.isRTL==null?void 0:c.isRTL(l.floating)),M=h||(x||!v?[fe(a)]:ri(a)),S=f!=="none";!h&&S&&M.push(...ai(a,v,f,E));let A=[a,...M],y=await c.detectOverflow(t,w),W=[],z=((i=s.flip)==null?void 0:i.overflows)||[];if(d&&W.push(y[p]),u){let $=si(o,r,E);W.push(y[$[0]],y[$[1]])}if(z=[...z,{placement:o,overflows:W}],!W.every($=>$<=0)){var Z,C;let $=(((Z=s.flip)==null?void 0:Z.index)||0)+1,j=A[$];if(j&&(!(u==="alignment"?b!==bt(j):!1)||z.every(G=>bt(G.placement)===b?G.overflows[0]>0:!0)))return{data:{index:$,overflows:z},reset:{placement:j}};let _=(C=z.filter(B=>B.overflows[0]<=0).sort((B,G)=>B.overflows[1]-G.overflows[1])[0])==null?void 0:C.placement;if(!_)switch(m){case"bestFit":{var R;let B=(R=z.filter(G=>{if(S){let it=bt(G.placement);return it===b||it==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(it=>it>0).reduce((it,ot)=>it+ot,0)]).sort((G,it)=>G[1]-it[1])[0])==null?void 0:R[0];B&&(_=B);break}case"initialPlacement":_=a;break}if(o!==_)return{reset:{placement:_}}}return{}}}};var Ls=new Set(["left","top"]);async function ks(n,t){let{placement:e,platform:i,elements:o}=n,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=Rt(e),a=te(e),c=bt(e)==="y",l=Ls.has(r)?-1:1,d=s&&c?-1:1,u=Jt(t,n),{mainAxis:h,crossAxis:m,alignmentAxis:f}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof f=="number"&&(m=a==="end"?f*-1:f),c?{x:m*d,y:h*l}:{x:h*l,y:m*d}}var fi=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,c=await ks(t,n);return r===((e=a.offset)==null?void 0:e.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:r}}}}},pi=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:c={fn:b=>{let{x,y:E}=b;return{x,y:E}}},...l}=Jt(n,t),d={x:e,y:i},u=await s.detectOverflow(t,l),h=bt(o),m=nn(h),f=d[m],v=d[h],w=(b,x)=>oi(x+u[b==="y"?"top":"left"],x,x-u[b==="y"?"bottom":"right"]);r&&(f=w(m,f)),a&&(v=w(h,v));let p=c.fn({...t,[m]:f,[h]:v});return{...p,data:{x:p.x-e,y:p.y-i,enabled:{[m]:r,[h]:a}}}}}};var mi=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}=Jt(n,t),c=await o.detectOverflow(t,a),l=Rt(e),d=te(e),u=bt(e)==="y",{width:h,height:m}=i.floating,f,v;l==="top"||l==="bottom"?(f=l,v=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(v=l,f=d==="end"?"top":"bottom");let w=m-c.top-c.bottom,p=h-c.left-c.right,b=Ot(m-c[f],w),x=Ot(h-c[v],p),E=t.middlewareData.shift,M=!E,S=b,A=x;E!=null&&E.enabled.x&&(A=p),E!=null&&E.enabled.y&&(S=w),M&&!d&&(u?A=h-2*ft(c.left,c.right):S=m-2*ft(c.top,c.bottom)),await r({...t,availableWidth:A,availableHeight:S});let y=await o.getDimensions(s.floating);return h!==y.width||m!==y.height?{reset:{rects:!0}}:{}}}};function Oe(){return typeof window<"u"}function $t(n){return bi(n)?(n.nodeName||"").toLowerCase():"#document"}function dt(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function vt(n){var t;return(t=(bi(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function bi(n){return Oe()?n instanceof Node||n instanceof dt(n).Node:!1}function pt(n){return Oe()?n instanceof Element||n instanceof dt(n).Element:!1}function St(n){return Oe()?n instanceof HTMLElement||n instanceof dt(n).HTMLElement:!1}function gi(n){return!Oe()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof dt(n).ShadowRoot}function ge(n){let{overflow:t,overflowX:e,overflowY:i,display:o}=mt(n);return/auto|scroll|overlay|hidden|clip/.test(t+i+e)&&o!=="inline"&&o!=="contents"}function vi(n){return/^(table|td|th)$/.test($t(n))}function be(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}var Ts=/transform|translate|scale|rotate|perspective|filter/,Os=/paint|layout|strict|content/,zt=n=>!!n&&n!=="none",rn;function Re(n){let t=pt(n)?mt(n):n;return zt(t.transform)||zt(t.translate)||zt(t.scale)||zt(t.rotate)||zt(t.perspective)||!De()&&(zt(t.backdropFilter)||zt(t.filter))||Ts.test(t.willChange||"")||Os.test(t.contain||"")}function yi(n){let t=Dt(n);for(;St(t)&&!ne(t);){if(Re(t))return t;if(be(t))return null;t=Dt(t)}return null}function De(){return rn==null&&(rn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),rn}function ne(n){return/^(html|body|#document)$/.test($t(n))}function mt(n){return dt(n).getComputedStyle(n)}function ve(n){return pt(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Dt(n){if($t(n)==="html")return n;let t=n.assignedSlot||n.parentNode||gi(n)&&n.host||vt(n);return gi(t)?t.host:t}function wi(n){let t=Dt(n);return ne(t)?(n.ownerDocument||n).body:St(t)&&ge(t)?t:wi(t)}function ee(n,t,e){var i;t===void 0&&(t=[]),e===void 0&&(e=!0);let o=wi(n),s=o===((i=n.ownerDocument)==null?void 0:i.body),r=dt(o);if(s){let a=Me(r);return t.concat(r,r.visualViewport||[],ge(o)?o:[],a&&e?ee(a):[])}else return t.concat(o,ee(o,[],e))}function Me(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Si(n){let t=mt(n),e=parseFloat(t.width)||0,i=parseFloat(t.height)||0,o=St(n),s=o?n.offsetWidth:e,r=o?n.offsetHeight:i,a=pe(e)!==s||pe(i)!==r;return a&&(e=s,i=r),{width:e,height:i,$:a}}function cn(n){return pt(n)?n:n.contextElement}function ie(n){let t=cn(n);if(!St(t))return gt(1);let e=t.getBoundingClientRect(),{width:i,height:o,$:s}=Si(t),r=(s?pe(e.width):e.width)/i,a=(s?pe(e.height):e.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}var Rs=gt(0);function Ai(n){let t=dt(n);return!De()||!t.visualViewport?Rs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ds(n,t,e){return t===void 0&&(t=!1),!!e&&t&&e===dt(n)}function qt(n,t,e,i){t===void 0&&(t=!1),e===void 0&&(e=!1);let o=n.getBoundingClientRect(),s=cn(n),r=gt(1);t&&(i?pt(i)&&(r=ie(i)):r=ie(n));let a=Ds(s,e,i)?Ai(s):gt(0),c=(o.left+a.x)/r.x,l=(o.top+a.y)/r.y,d=o.width/r.x,u=o.height/r.y;if(s&&i){let h=dt(s),m=pt(i)?dt(i):i,f=h,v=Me(f);for(;v&&m!==f;){let w=ie(v),p=v.getBoundingClientRect(),b=mt(v),x=p.left+(v.clientLeft+parseFloat(b.paddingLeft))*w.x,E=p.top+(v.clientTop+parseFloat(b.paddingTop))*w.y;c*=w.x,l*=w.y,d*=w.x,u*=w.y,c+=x,l+=E,f=dt(v),v=Me(f)}}return _t({width:d,height:u,x:c,y:l})}function Ie(n,t){let e=ve(n).scrollLeft;return t?t.left+e:qt(vt(n)).left+e}function Ci(n,t){let e=n.getBoundingClientRect(),i=e.left+t.scrollLeft-Ie(n,e),o=e.top+t.scrollTop;return{x:i,y:o}}function Ms(n){let{elements:t,rect:e,offsetParent:i,strategy:o}=n,s=o==="fixed",r=vt(i),a=t?be(t.floating):!1;if(i===r||a&&s)return e;let c={scrollLeft:0,scrollTop:0},l=gt(1),d=gt(0),u=St(i);if((u||!s)&&(($t(i)!=="body"||ge(r))&&(c=ve(i)),u)){let m=qt(i);l=ie(i),d.x=m.x+i.clientLeft,d.y=m.y+i.clientTop}let h=r&&!u&&!s?Ci(r,c):gt(0);return{width:e.width*l.x,height:e.height*l.y,x:e.x*l.x-c.scrollLeft*l.x+d.x+h.x,y:e.y*l.y-c.scrollTop*l.y+d.y+h.y}}function Is(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function Ns(n){let t=ve(n),e=n.ownerDocument.body,i=ft(n.scrollWidth,n.clientWidth,e.scrollWidth,e.clientWidth),o=ft(n.scrollHeight,n.clientHeight,e.scrollHeight,e.clientHeight),s=-t.scrollLeft+Ie(n),r=-t.scrollTop;return mt(e).direction==="rtl"&&(s+=ft(n.clientWidth,e.clientWidth)-i),{width:i,height:o,x:s,y:r}}var Hs=25;function Ps(n,t,e){e===void 0&&(e="viewport");let i=e==="layoutViewport",o=dt(n),s=vt(n),r=o.visualViewport,a=s.clientWidth,c=s.clientHeight,l=0,d=0;if(r){let h=!De()||t==="fixed";i?h||(l=-r.offsetLeft,d=-r.offsetTop):(a=r.width,c=r.height,h&&(l=r.offsetLeft,d=r.offsetTop))}if(Ie(s)<=0){let h=s.ownerDocument,m=h.body,f=getComputedStyle(m),v=h.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,w=Math.abs(s.clientWidth-m.clientWidth-v),p=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;p<=Hs&&(a-=p)}return{width:a,height:c,x:l,y:d}}function Fs(n,t){let e=qt(n,!0,t==="fixed"),i=e.top+n.clientTop,o=e.left+n.clientLeft,s=ie(n),r=n.clientWidth*s.x,a=n.clientHeight*s.y,c=o*s.x,l=i*s.y;return{width:r,height:a,x:c,y:l}}function xi(n,t,e){let i;if(t==="viewport"||t==="layoutViewport")i=Ps(n,e,t);else if(t==="document")i=Ns(vt(n));else if(pt(t))i=Fs(t,e);else{let o=Ai(n);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return _t(i)}function _s(n,t){let e=t.get(n);if(e)return e;let i=ee(n,[],!1).filter(a=>pt(a)&&$t(a)!=="body"),o=null,s=mt(n).position==="fixed",r=s?Dt(n):n;for(;pt(r)&&!ne(r);){let a=mt(r),c=Re(r),l=o?o.position:s?"fixed":"";!c&&(l==="fixed"||l==="absolute"&&a.position==="static")?i=i.filter(u=>u!==r):o=a,r=Dt(r)}return t.set(n,i),i}function zs(n){let{element:t,boundary:e,rootBoundary:i,strategy:o}=n,r=[...e==="clippingAncestors"?be(t)?[]:_s(t,this._c):[].concat(e),i],a=xi(t,r[0],o),c=a.top,l=a.right,d=a.bottom,u=a.left;for(let h=1;h<r.length;h++){let m=xi(t,r[h],o);c=ft(m.top,c),l=Ot(m.right,l),d=Ot(m.bottom,d),u=ft(m.left,u)}return{width:l-u,height:d-c,x:u,y:c}}function $s(n){let{width:t,height:e}=Si(n);return{width:t,height:e}}function qs(n,t,e){let i=St(t),o=vt(t),s=e==="fixed",r=qt(n,!0,s,t),a={scrollLeft:0,scrollTop:0},c=gt(0);if((i||!s)&&(($t(t)!=="body"||ge(o))&&(a=ve(t)),i)){let h=qt(t,!0,s,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}!i&&o&&(c.x=Ie(o));let l=o&&!i&&!s?Ci(o,a):gt(0),d=r.left+a.scrollLeft-c.x-l.x,u=r.top+a.scrollTop-c.y-l.y;return{x:d,y:u,width:r.width,height:r.height}}function an(n){return mt(n).position==="static"}function Ei(n,t){if(!St(n)||mt(n).position==="fixed")return null;if(t)return t(n);let e=n.offsetParent;return vt(n)===e&&(e=e.ownerDocument.body),e}function Li(n,t){let e=dt(n);if(be(n))return e;if(!St(n)){let o=Dt(n);for(;o&&!ne(o);){if(pt(o)&&!an(o))return o;o=Dt(o)}return e}let i=Ei(n,t);for(;i&&vi(i)&&an(i);)i=Ei(i,t);return i&&ne(i)&&an(i)&&!Re(i)?e:i||yi(n)||e}var Bs=async function(n){let t=this.getOffsetParent||Li,e=this.getDimensions,i=await e(n.floating);return{reference:qs(n.reference,await t(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function js(n){return mt(n).direction==="rtl"}var Ks={convertOffsetParentRelativeRectToViewportRelativeRect:Ms,getDocumentElement:vt,getClippingRect:zs,getOffsetParent:Li,getElementRects:Bs,getClientRects:Is,getDimensions:$s,getScale:ie,isElement:pt,isRTL:js};function ki(n,t){return n.x===t.x&&n.y===t.y&&n.width===t.width&&n.height===t.height}function Vs(n,t,e){let i=null,o,s=vt(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:f,width:v,height:w}=h;if(d||t(),!v||!w)return;let p=me(f),b=me(s.clientWidth-(m+v)),x=me(s.clientHeight-(f+w)),E=me(m),S={rootMargin:-p+"px "+-b+"px "+-x+"px "+-E+"px",threshold:ft(0,Ot(1,u))||1},A=!0;function y(W){let z=W[0].intersectionRatio;if(!ki(h,n.getBoundingClientRect()))return a();if(z!==u){if(!A)return a();z?a(!1,z):o=setTimeout(()=>{a(!1,1e-7)},1e3)}A=!1}try{i=new IntersectionObserver(y,{...S,root:s.ownerDocument})}catch{i=new IntersectionObserver(y,S)}i.observe(n)}let c=dt(n),l=()=>a(e);return c.addEventListener("resize",l),a(!0),()=>{c.removeEventListener("resize",l),r()}}function Ti(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:c=!1}=i,l=cn(n),d=o||s?[...l?ee(l):[],...t?ee(t):[]]:[];d.forEach(p=>{o&&p.addEventListener("scroll",e),s&&p.addEventListener("resize",e)});let u=l&&a?Vs(l,e,s):null,h=-1,m=null;r&&(m=new ResizeObserver(p=>{let[b]=p;b&&b.target===l&&m&&t&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),e()}),l&&!c&&m.observe(l),t&&m.observe(t));let f,v=c?qt(n):null;c&&w();function w(){let p=qt(n);v&&!ki(v,p)&&e(),v=p,f=requestAnimationFrame(w)}return e(),()=>{var p;d.forEach(b=>{o&&b.removeEventListener("scroll",e),s&&b.removeEventListener("resize",e)}),u==null||u(),(p=m)==null||p.disconnect(),m=null,c&&cancelAnimationFrame(f)}}var Oi=fi;var Ri=pi,Di=hi,Mi=mi;var Ii=(n,t,e)=>{let i=new Map,o=e??{},s={...Ks,...o.platform,_c:i};return ui(n,t,{...o,platform:s})};function Bt(n,t,e={}){let{placement:i="bottom-start",strategy:o="absolute",offset:s=4,flip:r=!0,shift:a=!0,padding:c=8,matchWidth:l=!1}=e,d=[Oi(s),...r?[Di({padding:c})]:[],...a?[Ri({padding:c})]:[],...l?[Mi({apply({rects:h}){Object.assign(t.style,{width:`${h.reference.width}px`})}})]:[]];return t.style.position=o,Ti(n,t,async()=>{let h=await Ii(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 ln=class{constructor(n){g(this,"opts");g(this,"buffer","");g(this,"timerId",null);g(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 Ni=class extends et{constructor(){super(...arguments);g(this,"trigger",null);g(this,"content",null);g(this,"valueEl",null);g(this,"items",[]);g(this,"nativeSelect",null);g(this,"hiddenInput",null);g(this,"labelEl",null);g(this,"onLabelClick",t=>{var e;t.target.closest("[data-part=\'trigger\']")||(t.preventDefault(),(e=this.trigger)==null||e.focus())});g(this,"dismiss",null);g(this,"typeahead",null);g(this,"cleanupFloating",null);g(this,"_open",!1);g(this,"_value","");g(this,"highlighted",-1);g(this,"syncing",!1);g(this,"onNativeChange",()=>{this.syncing||this.refresh()});g(this,"onFormReset",()=>setTimeout(()=>this.refresh()));g(this,"onTriggerClick",()=>{this.isDisabled||(this._open?this.close():this.show())});g(this,"onTriggerKeyUp",t=>{t.key===" "&&t.preventDefault()});g(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))}});g(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'item\']");!e||!this.items.includes(e)||ht(e)||(this.select(e),this.close())});g(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'item\']");e&&this.items.includes(e)&&!ht(e)&&this.highlight(this.items.indexOf(e))});g(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=>!ht(t))}setup(){var a,c;if(this.nativeSelect=at(this,"select"),this.nativeSelect&&!at(this,"[data-part=\'trigger\']")&&this.buildFromNative(this.nativeSelect),this.trigger=at(this,"[data-part=\'trigger\']"),this.content=at(this,"[data-part=\'content\']"),this.valueEl=at(this,"[data-part=\'value\']"),!this.trigger||!this.content)return;let{trigger:t,content:e}=this;this.items=xt(this,"[data-part=\'item\']");let i=rt("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((l,d)=>{l.id||(l.id=`${i}-item-${d}`),l.setAttribute("role","option"),l.setAttribute("aria-selected","false")}),xt(this,"[data-part=\'group\']").forEach(l=>{l.setAttribute("role","group");let d=l.querySelector("[data-part=\'label\']");d&&(d.id||(d.id=rt("db-select-label")),l.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 ln({getItemCount:()=>this.enabled().length,getItemText:l=>{var d,u;return((u=(d=this.enabled()[l])==null?void 0:d.textContent)==null?void 0:u.trim())??""},onMatch:l=>{let d=this.enabled()[l];d&&(this._open?this.highlight(this.items.indexOf(d)):this.select(d))}}),this.dismiss=new Ft(e,{onDismiss:l=>this.close(l!=="outside-press")});let s=((a=this.nativeSelect)==null?void 0:a.value)??this.getAttribute("default-value")??"",r=this.items.find(l=>l.dataset.value===s);r&&ht(r)?this.valueEl&&(this.valueEl.textContent=((c=r.textContent)==null?void 0:c.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=rt("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 c=document.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttribute("viewBox","0 0 24 24"),c.setAttribute("aria-hidden","true"),c.setAttribute("class","db-select-chevron"),c.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,c);let l=document.createElement("div");l.setAttribute("data-part","content"),l.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[f,v]of Object.entries(u.dataset))v!=null&&(m.dataset[f]=v);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 f of Array.from(u.children))f instanceof HTMLOptionElement&&d(f,h);l.appendChild(h)}else u instanceof HTMLOptionElement&&d(u,l);t.hidden=!0,t.tabIndex=-1,t.setAttribute("aria-hidden","true"),this.append(e,l)}connect(){var t,e,i,o,s,r,a,c,l,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),(c=this.content)==null||c.addEventListener("click",this.onListClick),(l=this.content)==null||l.addEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.addEventListener("mousedown",this.preventBlur)}disconnect(){var t,e,i,o,s,r,a,c,l,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),(c=this.content)==null||c.removeEventListener("click",this.onListClick),(l=this.content)==null||l.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=Gt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=Bt(t,e,{placement:"bottom-start",offset:4,matchWidth:!this.hasAttribute("auto-width"),strategy:i==="top-layer"?"fixed":"absolute"});let s=this.items.find(c=>c.dataset.value===this._value&&!ht(c))??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,Zt(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(ht(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}))}};nt();customElements.get("db-select")||customElements.define("db-select",Ni);var Hi=class extends et{constructor(){super(...arguments);g(this,"trigger",null);g(this,"content",null);g(this,"dismiss",null);g(this,"cleanupFloating",null);g(this,"_open",!1);g(this,"onTriggerClick",()=>this.toggle());g(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=Xt(at(this,"[data-part=\'trigger\']")),this.content=at(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;let t=this.content;t.id||(t.id=rt("db-popover")),t.hasAttribute("role")||t.setAttribute("role","dialog"),!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&((e=this.trigger).id||(e.id=rt("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 Ft(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=Gt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=Bt(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&&(zn(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);Zt(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}))}};nt();customElements.get("db-popover")||customElements.define("db-popover",Hi);var Pi="db-announcement-closed:";var Fi=class extends et{constructor(){super(...arguments);g(this,"closeButton",null);g(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(Pi+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}}))}};nt();customElements.get("db-announcement")||customElements.define("db-announcement",Fi);var _i=class extends et{constructor(){super(...arguments);g(this,"trigger",null);g(this,"content",null);g(this,"cleanupFloating",null);g(this,"showTimer",null);g(this,"hideTimer",null);g(this,"_open",!1);g(this,"onEnter",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this._open||(this.showTimer=setTimeout(()=>this.show(),this.num("delay",200))))});g(this,"onLeave",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this.hideTimer=setTimeout(()=>this.hide(),this.num("close-delay",100)))});g(this,"onContentEnter",()=>this.clearTimers());g(this,"onFocus",()=>{let t=!0;try{t=this.trigger.matches(":focus-visible")}catch{}t&&(this.clearTimers(),this.show())});g(this,"onBlur",()=>this.hide());g(this,"onPress",()=>this.hide());g(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=Xt(at(this,"[data-part=\'trigger\']")),this.content=at(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;(e=this.content).id||(e.id=rt("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=Gt(e);this.setState("open"),this.cleanupFloating=Bt(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,Zt(this.content),this.setState("closed"),this.dispatchEvent(new CustomEvent("db-tooltip:close",{bubbles:!0})))}};nt();customElements.get("db-tooltip")||customElements.define("db-tooltip",_i);var zi="sidebar_state",Us="b",Ws=768,ye=new WeakMap;function Ys(n){try{return localStorage.getItem(n)}catch{return null}}function Xs(n,t){try{localStorage.setItem(n,t)}catch{}}function hn(n){if(ye.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=Ys(zi),r=s!==null?s==="true":o,a=t.querySelector("[data-sidebar-desktop]"),c=t.querySelector("[data-sidebar-mobile]"),l=t.querySelector("[data-sidebar-mobile-backdrop]"),d=window.matchMedia(`(max-width: ${Ws-1}px)`),u={provider:n,sidebar:t,desktopSidebar:a,mobileSidebar:c,mobileBackdrop:l,collapsible:e,side:i,open:r,openMobile:!1,isMobile:d.matches,mediaQuery:d};ye.set(n,u),$i(u);let h=v=>{u.isMobile=v.matches,!v.matches&&u.openMobile&&Mt(n)};d.addEventListener("change",h);let m=v=>{v.key===Us&&(v.metaKey||v.ctrlKey)?(v.preventDefault(),dn(n)):v.key==="Escape"&&u.openMobile&&(v.preventDefault(),Mt(n))};document.addEventListener("keydown",m),Gs(n,u),l&&l.addEventListener("click",()=>{Mt(n)});let f=t.querySelector("[data-part=\'rail\']");f&&f.addEventListener("click",()=>{dn(n)})}function Gs(n,t){n.querySelectorAll("[data-part=\'sidebar-trigger\']").forEach(e=>{e.addEventListener("click",()=>{dn(n)})})}function dn(n){let t=ye.get(n);t&&(t.isMobile?t.openMobile?Mt(n):Zs(n):(t.open=!t.open,$i(t),Xs(zi,String(t.open))))}function $i(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 Zs(n){var i;let t=ye.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),Pt.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 Mt(n){var o;let t=ye.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),Pt.deactivate();let i=t.provider.querySelector("[data-part=\'sidebar-trigger\']");i==null||i.focus()}function un(){document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(n=>{hn(n)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",un):un();document.addEventListener("astro:page-load",un);var qi=/^[a-z][a-z0-9_-]{0,63}$/,Ne={docs:"docs.js",shard:n=>`t-${n}.js`,fragment:n=>`f-${n}.js`},He={docs:"docs",shard:n=>n,fragment:n=>`frag:${n}`};var Qs={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"},Js={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},tr="[^aeiou]",pn="[aeiouy]",It="("+tr+"[^aeiouy]*)",Fe="("+pn+"[aeiou]*)",fn=new RegExp("^"+It+"?"+Fe+It),er=new RegExp("^"+It+"?"+Fe+It+Fe+"?$"),Pe=new RegExp("^"+It+"?("+Fe+It+"){2,}"),Bi=new RegExp("^"+It+"?"+pn),ji=new RegExp("^"+It+pn+"[^aeiouwxy]$"),nr=/ll$/,ir=/^(.+?)e$/,or=/^(.+?)y$/,sr=/^(.+?(s|t))(ion)$/,rr=/^(.+?)(ed|ing)$/,ar=/(at|bl|iz)$/,cr=/^(.+?)eed$/,lr=/^.+?[^s]s$/,dr=/^.+?(ss|i)es$/,ur=/([^aeiouylsz])\\1$/,hr=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,fr=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,pr=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;function Ki(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)),dr.test(t)?t=t.slice(0,-2):lr.test(t)&&(t=t.slice(0,-1));let i;return(i=cr.exec(t))?fn.test(i[1])&&(t=t.slice(0,-1)):(i=rr.exec(t))&&Bi.test(i[1])&&(t=i[1],ar.test(t)?t+="e":ur.test(t)?t=t.slice(0,-1):ji.test(t)&&(t+="e")),(i=or.exec(t))&&Bi.test(i[1])&&(t=i[1]+"i"),(i=hr.exec(t))&&fn.test(i[1])&&(t=i[1]+Qs[i[2]]),(i=fr.exec(t))&&fn.test(i[1])&&(t=i[1]+Js[i[2]]),(i=pr.exec(t))?Pe.test(i[1])&&(t=i[1]):(i=sr.exec(t))&&Pe.test(i[1])&&(t=i[1]),(i=ir.exec(t))&&(Pe.test(i[1])||er.test(i[1])&&!ji.test(i[1]))&&(t=i[1]),nr.test(t)&&Pe.test(t)&&(t=t.slice(0,-1)),e&&(t="y"+t.slice(1)),t}var Vi=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(" ")),mr=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u,we;function gr(n){if(we===void 0)try{we=typeof Intl<"u"&&"Segmenter"in Intl?new Intl.Segmenter(void 0,{granularity:"word"}):null}catch{we=null}if(we)return[...we.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 jt(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&&!Vi.has(s)&&t.push(s)}for(let s of o)mr.test(s)?t.push(...gr(s)):s.length>=2&&!Vi.has(s)&&t.push(s)}return t}function mn(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 xe(n){if(!(!n||!/^en(-|$)/i.test(n)))return t=>/^[a-z]{3,}$/.test(t)?Ki(t):t}function Kt(n,t={}){var w,p;let e=[],i=[],o=[],s=!1,r={tag:[],section:[]},a={tag:[],section:[]},c=Object.create(null),l=Object.create(null),d=["tag","section",...new Set((t.facets??[]).filter(b=>qi.test(b)&&b!=="tag"&&b!=="section"))],u=new RegExp(`(?<!\\\\S)(-?)(${d.join("|")}):(?:"([^"]*)"?|(?!\\\\/\\\\/)(\\\\S*))|(-?)"([^"]*)"?|(\\\\S+)`,"gi"),h=[...n.matchAll(u)].map(b=>{var x;return{facetNeg:b[1]==="-",facet:(x=b[2])==null?void 0:x.toLowerCase(),value:b[3]??b[4],neg:b[5],phrase:b[6],word:b[7]}}),m=!1,f=!1;for(let[b,x]of h.entries()){if(x.facet){let R=yn(x.value??"");if(!R)continue;x.facet==="tag"||x.facet==="section"?(x.facetNeg?a:r)[x.facet].push(R):((w=x.facetNeg?l:c)[p=x.facet]??(w[p]=[])).push(R);continue}let E=x.word;if(E==="OR"){f=e.length>0,s=!0;continue}if(E==="NOT"){m=!0,s=!0;continue}if(E==="AND"){s=!0;continue}let M=x.phrase!==void 0,S=m||x.neg==="-"||(E==null?void 0:E.startsWith("-"))&&E.length>1;m=!1;let A=M?x.phrase:S&&(E!=null&&E.startsWith("-"))?E.slice(1):E,y=[...new Set(jt(A))];if(!y.length){f=!1;continue}if(S){i.push(M?y:[y[0]]),s=!0,f=!1;continue}if(M){f=!1,s=!0,y.length>1&&o.push(jt(A).join(" "));for(let R of y)e.push({terms:[R],prefix:!1,exact:!0});continue}let W=b===h.length-1&&!/\\s$/.test(n);if(f){e[e.length-1].terms.push(y[0]);for(let R of y.slice(1))e.push({terms:[R],prefix:!1});f=!1;continue}let z=y[0],Z=/[._-]/.test(z),C=z.replace(/-/g,"");for(let[R,$]of y.entries())e.push({terms:[$],prefix:W&&$.length>=2&&(R===y.length-1||Z&&($===z||$===C))})}let v=[...new Set(e.flatMap(b=>b.terms))];return{groups:e,not:i,phrases:o,strict:s,highlight:v,filters:r,notFilters:a,...Object.keys(c).length?{facets:c}:{},...Object.keys(l).length?{notFacets:l}:{}}}async function br(n,t){let e=await t.meta(),i=typeof n=="string"?Kt(n,{facets:wn([e])}):n,o=await Gi(i,e,t),s=Ji(i,e);if(!i.groups.length)return Zi(e,o,s);let r=[];for(let c of i.groups)r.push(await wr(c,e,t));let a=bn(r,e,o,s,"and").sort(_e);return a.length||i.strict?a:bn(r,e,o,s,"or").sort(_e)}var _e=(n,t)=>t.score-n.score;async function Gi(n,t,e){let i=new Set;for(let o of n.not){let s;for(let r of o){let[a]=Qi(r,t),c=a?await e.shard(a):void 0,l=c&&Object.hasOwn(c,r)?c[r]:[],d=new Set;for(let u=0;u<l.length;u+=2)(!s||s.has(l[u]))&&d.add(l[u]);s=d}for(let r of s??[])i.add(r)}return i}function Zi(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 bn(n,t,e,i,o){let s=new Map,r=new Map;for(let c of n)for(let[l,d]of c)s.set(l,(s.get(l)??0)+d),r.set(l,(r.get(l)??0)+1);let a=[];for(let[c,l]of s){if(e.has(c)||i&&!i(c)||o==="and"&&r.get(c)!==n.length)continue;let[d,u,h]=t.docs[c];a.push({id:c,title:d,url:u,section:t.sections[h]??"",score:l*(r.get(c)/n.length)})}return a}var At={prefix:.6,stem:.4,titleAll:1.5,titleExact:2,headingAll:1.4,headingExact:1.8,phrase:1.5,typo:.3};function vr(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 Qi(n,t,e=!1){let i=yr(t);for(let s=Math.min(n.length,Ui);s>=1;s--){let r=mn(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=mn(n,Math.min(n.length,Ui));return e?t.shards.filter(s=>s.startsWith(o)).slice(0,10):[]}var Ui=3,Wi=new WeakMap;function yr(n){let t=Wi.get(n);return t||Wi.set(n,t=new Set(n.shards)),t}function yn(n){return n.replace(/"/g,"").trim().toLowerCase()}function Ji(n,t){let{tag:e,section:i}=n.filters,o=n.notFilters??{tag:[],section:[]},s=Object.entries(n.facets??{}).filter(([,p])=>p.length),r=Object.entries(n.notFacets??{}).filter(([,p])=>p.length);if(!e.length&&!i.length&&!o.tag.length&&!o.section.length&&!s.length&&!r.length)return;let a=(p,b)=>new Set(p.flatMap((x,E)=>b.includes(yn(x))?[E]:[])),c=a(t.sections,i),l=a(t.tags??[],e),d=a(t.sections,o.section),u=a(t.tags??[],o.tag),h=p=>(t.facets??[]).findIndex(b=>b.name===p),m=p=>p.map(([b,x])=>{let E=h(b);return[E,E<0?new Set:a(t.facets[E].values,x)]}),f=m(s),v=m(r).filter(([p])=>p>=0),w=(p,[b,x])=>{var E;return b>=0&&(((E=p[4])==null?void 0:E[b])??[]).some(M=>x.has(M))};return p=>{let b=t.docs[p],x=b[3]??[];if(i.length&&!c.has(b[2])||e.length&&!x.some(E=>l.has(E))||d.has(b[2])||x.some(E=>u.has(E)))return!1;for(let E of f)if(!w(b,E))return!1;for(let E of v)if(w(b,E))return!1;return!0}}function wn(n){return[...new Set(n.flatMap(t=>((t==null?void 0:t.facets)??[]).map(e=>e.name)))]}function to(n,t){let e=Object.create(null),i=new Map,o=(s,r)=>{let a=`${s}\\0${yn(r)}`,c=i.get(a);c===void 0&&i.set(a,c=r);let l=e[s]??(e[s]=Object.create(null));l[c]=(l[c]??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 c of new Set(a[3]??[]))r.tags[c]!==void 0&&o("tag",r.tags[c]);(a[4]??[]).forEach((c,l)=>{var u;let d=(u=r.facets)==null?void 0:u[l];if(d)for(let h of new Set(c))d.values[h]!==void 0&&o(d.name,d.values[h])})}}return e}async function wr(n,t,e){let i=await no(n,t,e,!0);return n.corrected=i.corrected.length?i.corrected:void 0,eo(i,vn(t.count,i.docs.size))}function vn(n,t){return Math.log(1+(n-t+.5)/(t+.5))}function eo(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 no(n,t,e,i){let o=xe(t.lang),s=new Map,r=new Map;for(let d of n.terms)for(let u of Qi(d,t,n.prefix)){let h=await e.shard(u);if(!h)continue;let m=(p,b)=>{b>(s.get(p)??0)&&(s.set(p,b),r.set(p,h))};Object.hasOwn(h,d)&&m(d,1);let f=o==null?void 0:o(d),v=f?f.slice(0,Math.max(3,f.length-1)):void 0,w=0;for(let p in h)p!==d&&(n.prefix&&p.startsWith(d)&&w++<200&&m(p,At.prefix),f&&v&&p.startsWith(v)&&o(p)===f&&m(p,At.stem));if(i&&!s.size&&!n.exact&&d.length>=4&&!/[._-]/.test(d))for(let p in h)Math.abs(p.length-d.length)<=1&&vr(d,p)&&m(p,At.typo)}let a=[...s].filter(([,d])=>d===At.typo).map(([d])=>d),c=[...s].map(([d,u])=>[r.get(d)[d],u]),l=new Set;for(let[d]of c)for(let u=0;u<d.length;u+=2)l.add(d[u]);return{lists:c,docs:l,corrected:a}}var io=n=>typeof n=="function"?n:()=>n;async function oo(n,t){let e=io(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 l;let r=await o.meta(),a=[...new Set(s.map(d=>Math.floor(d.id/r.block)))],c=new Map;await Promise.all(a.map(async d=>{try{c.set(d,await o.fragment(d))}catch{c.set(d,void 0)}}));for(let d of s)d.fragment??(d.fragment=(l=c.get(Math.floor(d.id/r.block)))==null?void 0:l[d.id%r.block])}))}async function so(n){let t=io(n),e=new Map;return async i=>{let o=t(i),s=e.get(o);if(!s){let r=xe((await o.meta()).lang);s=(a,c)=>c.terms.some(l=>a===l||c.prefix&&a.startsWith(l)||r!==void 0&&r(a)===r(l))||(c.corrected??[]).includes(a),e.set(o,s)}return s}}async function ro(n,t,e,i=10){let o=t.slice(0,i);await oo(o,e);let s=n.groups,r=await so(e);for(let a of o){let c=await r(a),[l,d]=a.fragment??["",[]],u=jt(a.title),h=1;s.length&&s.every(f=>u.some(v=>c(v,f)))&&(h=Yi(u,s,c)?At.titleExact:At.titleAll);let m=[];for(let[f,v]of d){let w=jt(f);!s.length||!s.every(p=>w.some(b=>c(b,p)))||(m.push([f,v]),h=Math.max(h,Yi(w,s,c)?At.headingExact:At.headingAll))}if(a.sections=m.slice(0,3),n.phrases.length){let f=[a.title,l,...d.map(([v])=>v)].map(v=>jt(v).join(" ")).join(" \\0 ");n.phrases.every(v=>f.includes(v))&&(h*=At.phrase)}a.score*=h}return o.sort((a,c)=>c.score-a.score),[...o,...t.slice(i)]}async function ao(n,t,e){await oo(t,e);let i=await so(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=jt(r);return n.groups.length>0&&n.groups.every(c=>a.some(l=>s(l,c)))}).slice(0,3)}}function Yi(n,t,e){return n.every(i=>t.some(o=>e(i,o)))&&t.every(i=>n.some(o=>e(o,i)))}async function co(n,t,e=10){let i=await t.meta(),o=Kt(n,{facets:wn([i])}),s=xe(i.lang);s&&(o.highlight=[...new Set([...o.highlight,...o.highlight.map(s).filter(a=>a.length>=3)])]);let r=await br(o,t);return o.highlight=[...new Set([...o.highlight,...o.groups.flatMap(a=>a.corrected??[])])],{parsed:o,results:await ro(o,r,t,e),facets:to(r,i)}}async function xr(n){return Promise.all(n.map(t=>t.data.meta().then(e=>e&&e.format===5?e:void 0,()=>{})))}async function Er(n,t,e,i){let o=e,s=new Set,r=[],a=async(S,A)=>{if(!s.has(S))try{return await A()}catch(y){s.add(S),r.push({source:S,error:y});return}},c=t.flatMap((S,A)=>e[A]?[A]:[]),l=[];await Promise.all(c.map(async S=>l[S]=await a(S,()=>Gi(n,o[S],t[S].data))??new Set));let d=[],u=[],h=(S,A)=>Promise.all(c.map(y=>a(y,()=>no(S,o[y],t[y].data,A)))),m=S=>S.every((A,y)=>!(A!=null&&A.docs.size)||s.has(c[y]));for(let S of n.groups){let A=await h(S,!1);u.push(m(A)),u[u.length-1]&&(A=await h(S,!0)),d.push(A)}for(let[S,A]of n.groups.entries())u[S]||!m(d[S])||(A.corrected=void 0,d[S]=await h(A,!0));if(c.length&&c.every(S=>s.has(S)))throw r[0].error;let f=c.filter(S=>!s.has(S)),v=[];for(let S of f)v[S]=Ji(n,o[S]);let w=(S,A)=>S.map(y=>({...y,source:A,score:y.score*Sr(t[A])})),p=S=>({results:Ar(S,t),failed:[...s].sort((A,y)=>A-y),errors:r});if(!n.groups.length)return p(f.flatMap(S=>w(Zi(o[S],l[S],v[S]),S)).sort(_e));let b=t.map(()=>[]),x=f.reduce((S,A)=>S+o[A].count,0);n.groups.forEach((S,A)=>{let y=d[A],W=c.flatMap((C,R)=>s.has(C)?[]:[[C,y[R]]]),z=[...new Set(W.flatMap(([,C])=>C.corrected))];S.corrected=z.length?z:void 0;let Z=W.reduce((C,[,R])=>C+R.docs.size,0);for(let[C,R]of W)b[C].push(eo(R,i.stats==="own"?vn(o[C].count,R.docs.size):vn(x,Z)))});let E=S=>f.flatMap(A=>w(bn(b[A],o[A],l[A],v[A],S),A)).sort(_e),M=E("and");return p(M.length||n.strict?M:E("or"))}function Sr(n){return typeof n.boost=="number"&&Number.isFinite(n.boost)&&n.boost>=0?n.boost:1}function Ar(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 lo(n,t,e=10,i={}){let o=await xr(t),s=Kt(n,{facets:wn(o)}),r=t.flatMap((u,h)=>o[h]?[]:[h]);for(let u of new Set(o.flatMap(h=>h?[h.lang]:[]))){let h=xe(u);h&&(s.highlight=[...new Set([...s.highlight,...s.highlight.map(h).filter(m=>m.length>=3)])])}let{results:a,failed:c,errors:l}=await Er(s,t,o,i);for(let u of c)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=to(a,u=>o[u.source]);return{parsed:s,results:await ro(s,a,u=>t[u.source].data,e),missing:r,facets:d,errors:l}}function xn(n,t,e=globalThis){var m,f;let i=((m=e.document)==null?void 0:m.baseURI)??((f=e.location)==null?void 0:f.href),o=Xi(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 c=(v,w,p)=>{let b;if(p){let x="",E=Xi(p,i);for(let M of r.keys())E.startsWith(M)&&M.length>x.length&&(x=M);b=x?r.get(x):void 0}!b&&r.size===1&&(b=a),b?b.set(v,w):s.q.push([v,w,p])},l=s.q;s.q=[],s.load=c;for(let[v,w,p]of l)c(v,w,p);e.__DOGSBAY_SEARCH__=s;let d=async(v,w)=>(a.has(v)||await t(n+w),a.get(v)),u,h={meta:()=>u??(u=d(He.docs,Ne.docs).then(v=>{if(!v||v.format!==5)throw new Error(`search index format ${(v==null?void 0:v.format)??"missing"}, expected ${5}: rebuild the site`);return v}).catch(v=>{throw u=void 0,v})),shard:async v=>(await h.meta()).shards.includes(v)?d(He.shard(v),Ne.shard(v)):void 0,fragment:v=>d(He.fragment(v),Ne.fragment(v))};return h}function Xi(n,t){try{return new URL(n,t).href}catch{return n}}function uo(n){let t,e=n;try{e=new URL(n||"./",document.baseURI).pathname}catch{}return async i=>{t??(t=import(new URL(`${n}pagefind/pagefind.js`,document.baseURI).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(),f=m.url.startsWith(e)?m.url.slice(e.length):m.url.replace(/^\\/+/,""),v=(m.sub_results??[]).map(w=>[w.title,w.url.split("#")[1]??""]).filter(([,w])=>w);return{id:h,title:m.meta.title??f,url:f,section:"",score:r.length-h,fragment:[Cr(m.excerpt),v],sections:v.slice(0,3)}},c=await Promise.all(r.slice(0,10).map(a)),l=Promise.all(r.slice(10,30).map((u,h)=>a(u,h+10)));return l.catch(()=>{}),{results:c,more:l,later:(u,h)=>Promise.all(r.slice(u,u+h).map((m,f)=>a(m,u+f))),total:r.length,highlight:Kt(i).highlight}}}function Cr(n){return new DOMParser().parseFromString(n,"text/html").body.textContent??""}function ho(n,t){let e=(n==null?void 0:n.units)??[],i=e.find(p=>p.prefix===t);if(!i)return{};let o=p=>p.product??"",s=p=>{var b;return((b=n==null?void 0:n.products)==null?void 0:b[p])??{versions:n==null?void 0:n.versions,defaultVersion:n==null?void 0:n.defaultVersion}},r=p=>{var b;return(b=s(o(p)).versions)==null?void 0:b.find(x=>x.id===p.version)},a=p=>{var b,x;return((x=(b=n==null?void 0:n.products)==null?void 0:b[p])==null?void 0:x.label)??(p||(n==null?void 0:n.name)||"")},c=p=>{var b;return[o(p)!==o(i)?a(o(p)):"",p.version!==void 0?((b=r(p))==null?void 0:b.label)??p.version:""].filter(Boolean).join(" \\xB7 ")},l=p=>({prefix:p.prefix,product:o(p),label:c(p),own:p===i,versioned:p.version!==void 0}),d=e.filter(p=>p.locale===i.locale),u=s(o(i)),h=(u.versions??[]).map(p=>p.id),m=p=>{var b;return p===i?-2:p.version===u.defaultVersion?-1:(b=r(p))!=null&&b.prerelease?h.length+h.indexOf(p.version):h.indexOf(p.version)},f=d.filter(p=>{var b;return o(p)===o(i)&&p.version!==void 0&&(p===i||!((b=r(p))!=null&&b.hidden))}).sort((p,b)=>m(p)-m(b)),v=[];for(let p of d){let b=o(p);if(v.some(M=>o(M)===b))continue;if(b===o(i)){v.push(i);continue}let x=d.filter(M=>o(M)===b),E=s(b).defaultVersion;v.push(x.find(M=>M.version===E)??x.find(M=>{var S;return!((S=r(M))!=null&&S.hidden)})??x[0])}let w={};return f.length>1&&(w.versions=f.map(l)),v.length>1&&(w.products=v.map(l)),(w.versions||w.products)&&(w.version=[l(i)]),w}var fo=1.5;function po(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,c)=>{let l=o[c];l!=null&&l.length&&(e[a.name]=l.map(d=>a.values[d]).filter(d=>typeof d=="string"))}),e}var Ct=n=>n.trim().toLowerCase();function mo(n,t,e){for(let[i,o]of Object.entries(t)){if(i===e||!o.length)continue;let s=new Set((n[i]??[]).map(Ct));if(!o.some(r=>s.has(Ct(r))))return!1}return!0}function go(n,t,e){return n.filter(i=>mo(t(i),e))}function bo(n,t,e,i){var s;let o={};for(let r of i){let a={},c=new Map;for(let l of n){let d=t(l);if(!((s=d[r])!=null&&s.length)||!mo(d,e,r))continue;let u=new Set;for(let h of d[r]){if(u.has(Ct(h)))continue;u.add(Ct(h));let m=c.get(Ct(h))??(c.set(Ct(h),h),h);a[m]=(a[m]??0)+1}}for(let l of e[r]??[])c.has(Ct(l))||(a[l]=0);Object.keys(a).length&&(o[r]=a)}return o}function vo(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=>Ct(a)===Ct(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 yo(n){if(!n)return{};let t={};for(let[e,i]of Object.entries(n)){let o=kr(Object.entries(i).map(([s,r])=>({value:s,count:r})));o.length>0&&(t[e]=o)}return t}function kr(n){return[...n].sort((t,e)=>t.count!==e.count?e.count-t.count:t.value.localeCompare(e.value))}function oe(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 wo(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 xo(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 Eo(n){let t=0;for(let e of Object.values(n))t+=e.length;return t}function So(n,t,e={}){if(t.length===0)return[];if(t.some(o=>o.value.includes("/"))){let o=e.nav?Or(e.nav,new Set(t.map(s=>s.value))):void 0;return Tr(n,t,e.display,o)}return Rr(n,t,e.nav,e.display)}function Tr(n,t,e,i){let o=new Map,s=[];for(let l of t){let d=l.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 f=o.get(u);f||(f={value:u,label:oe(n,u,e),count:0,depth:m,hasValue:!1,children:[]},o.set(u,f),h?h.children.push(f):s.push(u)),m===d.length-1&&(f.count=l.count,f.hasValue=!0),h=f}}let r=(l,d)=>{if(i){let u=i.get(l.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 l.count!==d.count?d.count-l.count:l.value.localeCompare(d.value)},a=l=>{if(l.children.length!==0){l.children.sort(r);for(let d of l.children)a(d)}},c=s.map(l=>o.get(l));c.sort(r);for(let l of c)a(l);return c}function Or(n,t){let e=new Map,i=0,o=s=>{for(let r of s){if(r.href){let a=Ao(r.href);for(let c=0;c<a.length;c++){let l=a[c];if(!t.has(l))continue;let d="";for(let u=c;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 Rr(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:oe(n,h.value,i),count:h.count,depth:0,hasValue:!0,children:[]}));let s=new Set,r=[],a=new Map,c=h=>{if(h.length===0)return;let m=r,f=a;for(let v=0;v<h.length;v++){let w=h[v],p=f.get(w);if(!p){let x=o.get(w);p={value:w,label:oe(n,w,i),count:x?x.count:0,depth:v,hasValue:x!==void 0,children:[]},m.push(p),f.set(w,p),x&&s.add(w)}let b=l.get(p);b||(b=new Map,l.set(p,b)),m=p.children,f=b}},l=new Map,d=h=>{for(let m of h){if(m.href){let f=Ao(m.href);c(f)}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:oe(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 Ao(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 Dr=6e4,Mr=30,ze=20,Ir=["version","versions","products"];function Lo(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=To(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 c=a.target.closest("input, textarea, select, [contenteditable]");if(a.key==="/"&&!c||a.key.toLowerCase()==="k"&&(a.metaKey||a.ctrlKey)){a.preventDefault();let l=document.querySelector("[data-db-search-page] [data-db-search-input]");l&&!e.open?l.focus():e.open?i.focus():e.show()}},{signal:t}),e.addEventListener("click",a=>{a.target.closest("a")&&e.close("api")},{signal:t})}function ko(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=Nr(),r=s.get("p")||void 0,a=s.get("v")||void 0,c=s.get("scope")??(s.get("q")?"version":void 0),l=To(n,{input:e,list:i,status:o,page:!0,params:s,scope:c,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")??"",l.activate(),e.value.trim()&&l.run()}function Nr(){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 Co=()=>!location.search&&location.hash.includes("=");function To(n,{input:t,list:e,status:i,page:o,scope:s,forward:r,params:a}){var Mn;let{signal:c}=n,l=i.textContent??"",d=xn(`${n.unitRoot}_dogsbay/search/`,n.loadScript,window),u=document.body.dataset.search??"builtin",h=location.protocol!=="file:",m=u==="pagefind"||u==="both"&&h?uo(n.unitRoot):void 0,f=u==="pagefind"&&!h,v=n.siteRoot??"",w=n.prefix??"",p={},b="version",x,E=`db-search-scope:${v}`;try{E=`db-search-scope:${new URL(v||"./",document.baseURI).pathname}`}catch{}let M=()=>{let L=window.__DOGSBAY_SITE__;if(r&&L&&S(L)||(r=void 0,m))return;p=ho(L,w);let O=s??En(()=>sessionStorage.getItem(E)),k=b;O&&Object.prototype.hasOwnProperty.call(p,O)&&(b=O),yt(),b!==k&&t.value.trim()&&V(++B)},S=L=>{var Q,tt;let O=L.units??[],k=O.find(Y=>Y.prefix===w);if(!k)return!1;let H=r.product??k.product??"",N=O.filter(Y=>Y.locale===k.locale&&(Y.product??"")===H),D=((tt=(Q=L.products)==null?void 0:Q[H])==null?void 0:tt.defaultVersion)??L.defaultVersion,P=r.version!==void 0?N.find(Y=>Y.version===r.version||Y.prefix&&Y.prefix.split("/").pop()===r.version):N.find(Y=>Y===k)??N.find(Y=>Y.version===D)??N[0];if(!P||P.prefix===w||!P.search)return!1;let q=new URLSearchParams(a);q.delete("p"),q.delete("v");let I=q.toString();return location.replace(`${y(P.prefix)}${P.search}${I?Co()?`#${I}`:`?${I}`:""}`),!0},A=()=>x??(x=n.loadScript(`${v}_dogsbay/site.js`).then(M,M)),y=L=>`${v}${L?`${L}/`:""}`,W=new Map([[w,d]]),z=L=>{let O=W.get(L);return O||W.set(L,O=xn(`${y(L)}_dogsbay/search/`,n.loadScript,window)),O},Z=new Map,C=((Mn=o?e.closest("[data-db-search-page]"):e.closest("dialog"))==null?void 0:Mn.querySelector("[data-db-search-facets]"))??void 0,R=(()=>{try{return JSON.parse(e.dataset.facets??"{}")}catch{return{}}})(),$=C?Object.keys(R):[],j=o&&a?vo(a,$):{},_=()=>{r&&A(),f?i.textContent=e.dataset.needsServer??"":m||(d.meta().catch(()=>i.textContent="Search index could not be loaded."),A())},B=0,G,it;t.addEventListener("input",()=>{clearTimeout(it),it=setTimeout(()=>void V(++B),80)},{signal:c});let ot=new Map,T=typeof IntersectionObserver=="function"?new IntersectionObserver(L=>{var O;for(let k of L)k.isIntersecting&&((O=ot.get(k.target))==null||O(),ot.delete(k.target),T.unobserve(k.target))}):void 0,F=L=>{if(!o||r)return;let O=new URLSearchParams;L&&O.set("q",L),b!=="version"&&O.set("scope",b);for(let[N,D]of Object.entries(j))for(let P of D)O.append("filter",`${N}:${P}`);let k=O.toString(),H=Co();En(()=>history.replaceState(history.state,"",`${location.pathname}${k?H?`${location.search}#${k}`:`?${k}`:""}`))},V=async L=>{let O=t.value.trim();if(F(O),!O){T==null||T.disconnect(),ot.clear(),U.hidden=!0,C&&(C.hidden=!0),Nt=void 0,e.replaceChildren(),st.hidden=K.hidden=!0,i.textContent=l;return}if(!f){Nt=void 0;try{if(m){let k=await m(O);if(L!==B)return;if(o){let H=await k.more;if(L!==B)return;Ce(O,[...k.results,...H].slice(0,ze),k.highlight,k.total,k.later)}else{Ce(O,k.results,k.highlight,k.total);let H=await k.more;L===B&&H.length&&Bo(O,H,k.highlight)}}else if(b!=="version"&&p[b]){let k=Date.now(),H=p[b],N=H.filter(I=>I.own||k-(Z.get(I.prefix)??-1/0)>Dr),D=await lo(O,N.map(I=>({data:z(I.prefix),boost:I.own?fo:1,collapse:I.product})));for(let I of D.missing)Z.set(N[I].prefix,Date.now());if(L!==B)return;G=D.parsed;let P=D.results.map(I=>{var tt;let Q=N[I.source];return Object.assign(I,{base:y(Q.prefix),from:Q.own?void 0:Q.label,also:(tt=I.others)==null?void 0:tt.map(Y=>N[Y.source].label).filter(Boolean),data:z(Q.prefix)})}),q=D.missing.length+H.length-N.length;await Ae(L,O,P,D.parsed.highlight,q?` \\xB7 ${(e.dataset.unavailable??"{n}").replace("{n}",String(q))}`:"")}else{let k=await co(O,d);if(L!==B)return;G=k.parsed,await Ae(L,O,k.results,k.parsed.highlight,"")}}catch{if(L!==B)return;i.textContent="Search index could not be loaded.",C&&(C.hidden=!0)}}},U=document.createElement("div");U.setAttribute("role","group"),U.setAttribute("aria-label",e.dataset.filterSection??"Filter by section"),U.className=o?"flex flex-wrap gap-1 pb-3":"flex flex-wrap gap-1 px-3 pb-2",U.hidden=!0,e.before(U);let X=document.createElement("div");X.setAttribute("role","group"),X.setAttribute("aria-label",e.dataset.scope??"Search in"),X.className=o?"flex flex-wrap items-center gap-1 pb-3":"flex flex-wrap items-center gap-1 px-3 pb-2",X.hidden=!0,U.before(X);let K=document.createElement("a");K.className="mx-3 mb-2 mt-1 block rounded-md px-3 py-2 text-center text-sm font-medium hover:bg-accent",K.dataset.dbSearchSeeAll="",K.hidden=!0;let st=document.createElement("button");st.type="button",st.className="mt-4 rounded-md border px-3 py-1.5 text-sm hover:bg-accent",st.textContent=e.dataset.more??"More results",st.hidden=!0,e.after(o?st:K);let yt=()=>{var k,H;let L=Ir.filter(N=>p[N]),O={version:((H=(k=p.version)==null?void 0:k[0])==null?void 0:H.versioned)===!1?e.dataset.scopeProduct:e.dataset.scopeVersion,versions:e.dataset.scopeVersions,products:e.dataset.scopeProducts};X.replaceChildren(...L.map(N=>{let D=document.createElement("button");return D.type="button",D.dataset.scope=N,D.setAttribute("aria-pressed",String(N===b)),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=O[N]??N,D.addEventListener("click",()=>{var P;b!==N&&(b=N,En(()=>sessionStorage.setItem(E,N)),yt(),(P=X.querySelector(`[data-scope="${N}"]`))==null||P.focus(),t.value.trim()?V(++B):F(""))},{signal:c}),D})),X.hidden=L.length<2};c==null||c.addEventListener("abort",()=>{clearTimeout(it),B++,T==null||T.disconnect(),ot.clear(),U.remove(),X.remove(),K.remove(),st.remove()});let Lt=L=>L.replace(/"/g,""),Wt=L=>`section:"${Lt(L)}"`,kt,de=(L,O)=>{let k=new Map;for(let P of O)P.section&&k.set(P.section,(k.get(P.section)??0)+1);let H=[...L.matchAll(/section:"([^"]*)"/gi)].map(P=>P[1].toLowerCase()),N=P=>H.includes(Lt(P).toLowerCase()),D=[...k].sort((P,q)=>q[1]-P[1]).slice(0,6).map(([P])=>P);for(let P of H)D.some(q=>Lt(q).toLowerCase()===P)||D.push(P);U.replaceChildren(...D.length>1||H.length?D.map(P=>{let q=document.createElement("button");q.type="button";let I=N(P);return q.setAttribute("aria-pressed",String(I)),q.className="rounded-full border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",q.textContent=P,q.addEventListener("click",()=>{let Q=Wt(P),tt=t.value.replace(new RegExp(`\\\\s*section:"${Lt(P).replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}"`,"i"),"").trim();t.value=I?tt:`${tt} ${Q}`.trim(),kt=P,t.dispatchEvent(new Event("input",{bubbles:!0}))},{signal:c}),q}):[]),U.hidden=!U.childElementCount,kt!==void 0&&(([...U.querySelectorAll("button")].find(q=>q.textContent===kt)??t).focus(),kt=void 0)},Nt,Ae=async(L,O,k,H,N)=>{if(!$.length){Ce(O,k,H,k.length),i.textContent+=N;return}let D=new Map;for(let q of k){let I=q.data??d;D.has(I)||D.set(I,await I.meta())}if(L!==B)return;let P=new Map(k.map(q=>[q,po(D.get(q.data??d),q.id)]));Nt={q:O,results:k,terms:H,note:N,valuesOf:q=>P.get(q)??{}},Ht()},Ht=()=>{if(!Nt)return;let{q:L,results:O,terms:k,note:H,valuesOf:N}=Nt,D=go(O,N,j);Ye(bo(O,N,j,$)),Ce(L,D,k,D.length),i.textContent+=H},Tt,Ye=L=>{var P,q;if(!C)return;let O=wo(Object.keys(L),R);if(C.hidden=!O.length,!O.length)return C.replaceChildren();let k=(I,Q,tt,Y)=>{let J=document.createElement("label");J.className="flex cursor-pointer items-center gap-2 rounded-md px-2 py-1 hover:bg-accent";let ct=document.createElement("input");ct.type="checkbox",ct.dataset.facetName=I,ct.dataset.facetValue=Q,ct.checked=(j[I]??[]).some(jo=>jo.toLowerCase()===Q.toLowerCase()),ct.className="size-3.5 rounded border-border accent-primary";let wt=document.createElement("span");wt.className="flex-1 truncate",wt.textContent=tt;let Ge=document.createElement("span");return Ge.className="text-xs text-muted-foreground",Ge.textContent=String(Y),J.append(ct,wt,Ge),J},H=(I,Q)=>{let tt=document.createElement("ul");tt.className="space-y-0.5";for(let Y of Q){let J=document.createElement("li");if(Y.hasValue)J.append(k(I,Y.value,Y.label,Y.count));else{let ct=document.createElement("span");ct.className="block px-2 py-1 text-muted-foreground",ct.textContent=Y.label,J.append(ct)}if(Y.children.length){let ct=H(I,Y.children);ct.classList.add("ml-4"),J.append(ct)}tt.append(J)}return tt},N=[],D=Eo(j);if(D){let I=document.createElement("button");I.type="button",I.dataset.clearFilters="",I.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",I.textContent=(e.dataset.facetsClear??"Clear all ({n})").replace("{n}",String(D)),N.push(I)}for(let I of O){let Q=yo({[I]:L[I]})[I]??[],tt=document.createElement("fieldset");tt.className="mb-3";let Y=document.createElement("legend");if(Y.className="mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground",Y.textContent=((P=R[I])==null?void 0:P.title)??I,tt.append(Y),(q=R[I])!=null&&q.hierarchical||Q.some(J=>J.value.includes("/")))tt.append(H(I,So(I,Q,{display:R})));else{let J=document.createElement("ul");J.className="space-y-0.5";for(let ct of Q){let wt=document.createElement("li");wt.append(k(I,ct.value,oe(I,ct.value,R),ct.count)),J.append(wt)}tt.append(J)}N.push(tt)}C.replaceChildren(...N),Tt!==void 0&&(((Tt?[...C.querySelectorAll("input[data-facet-name]")].find(Q=>`${Q.dataset.facetName}\\0${Q.dataset.facetValue}`===Tt):C.querySelector("[data-clear-filters]"))??t).focus(),Tt=void 0)};C==null||C.addEventListener("change",L=>{let O=L.target;if(!O.dataset.facetName)return;let k=O.dataset.facetName,H=O.dataset.facetValue,N=(j[k]??[]).find(D=>D.toLowerCase()===H.toLowerCase());j=xo(j,k,N??H),Tt=`${k}\\0${H}`,F(t.value.trim()),Ht()},{signal:c}),C==null||C.addEventListener("click",L=>{L.target.closest("[data-clear-filters]")&&(j={},Tt="",F(t.value.trim()),Ht())},{signal:c});let ut,Ce=(L,O,k,H,N)=>{T==null||T.disconnect(),ot.clear(),de(L,O);let D=O.slice(0,o?ze:Mr);if(ut={q:L,results:O,terms:k,shown:D.length,total:H,later:N},e.replaceChildren(...Xe(L,D,k)),i.textContent=H?`${H} result${H===1?"":"s"}`:`${e.dataset.noResults} \\u201C${L}\\u201D`,st.hidden=!o||!Rn(),K.hidden=o||!H||!e.dataset.searchPage,!K.hidden){let P=new URLSearchParams({q:L});b!=="version"&&P.set("scope",b);for(let[q,I]of Object.entries(j))for(let Q of I)P.append("filter",`${q}:${Q}`);K.href=`${e.dataset.searchPage}?${P}`,K.textContent=(e.dataset.seeAll??"See all {n} results").replace("{n}",String(H))}},Bo=(L,O,k)=>e.append(...Xe(L,O,k)),Rn=()=>!!ut&&(ut.results.length>ut.shown||!!ut.later&&ut.shown<ut.total);st.addEventListener("click",async()=>{var H,N;let L=ut;if(!L)return;let O=L.results.slice(L.shown,L.shown+ze);if(!O.length&&L.later){if(O=await L.later(L.shown,ze).catch(()=>[]),L!==ut)return;L.results.push(...O)}let k=Xe(L.q,O,L.terms);e.append(...k),L.shown+=O.length,st.hidden=!O.length||!Rn(),(N=(H=k[0])==null?void 0:H.querySelector("a"))==null||N.focus()},{signal:c});let Xe=(L,O,k)=>{var N;let H=[];for(let D of O){let P=D.base??n.unitRoot,q=Dn(P,D.url,k,"block rounded-md p-3 hover:bg-accent"),I=document.createElement("div");I.className="font-medium",I.append(...Sn(D.title,k)),q.a.appendChild(I);let Q=[D.from,D.section].filter(Boolean).join(" \\xB7 ");if(Q){let J=document.createElement("div");J.className="text-xs text-muted-foreground",J.textContent=Q,q.a.appendChild(J)}let tt=document.createElement("div");if(tt.className="mt-1 line-clamp-2 text-xs text-muted-foreground",q.a.appendChild(tt),(N=D.also)!=null&&N.length){let J=document.createElement("div");J.className="mt-1 text-xs text-muted-foreground",J.textContent=`${e.dataset.alsoIn??"Also in"} ${D.also.join(", ")}`,q.a.appendChild(J)}H.push(q.li);let Y=()=>D.fragment?(D.fragment[0]&&tt.replaceChildren(...Sn(D.fragment[0],k)),(D.sections??[]).map(([J,ct])=>{let wt=Dn(P,`${D.url}#${ct}`,k,"ml-4 block rounded-md border-l px-3 py-1.5 text-sm hover:bg-accent");return wt.a.append(...Sn(J,k)),wt.li})):[];if(D.fragment)H.push(...Y());else if(T){let J=G??Kt(L);ot.set(q.li,()=>void ao(J,[D],D.data??d).then(()=>q.li.after(...Y()),()=>{})),T.observe(q.li)}}return H},Dn=(L,O,k,H)=>{let N=document.createElement("li");o||N.setAttribute("role","none"),N.className="mb-1";let D=document.createElement("a");return o||(D.setAttribute("data-part","option"),D.dataset.value=O,D.tabIndex=-1),D.href=Hr(L+O,k),D.className=H,N.appendChild(D),{li:N,a:D}};return{activate:_,run:()=>void V(++B)}}function En(n){try{return n()}catch{return}}function Hr(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 Sn(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 Oo=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u;function Ro(n){var v;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,p)=>p.length-w.length),s=o.filter(w=>Oo.test(w)).map(i),r=o.filter(w=>!Oo.test(w)).map(i),a=[r.length?`(?<![\\\\p{L}\\\\p{N}])(?:${r.join("|")})`:"",s.length?`(?:${s.join("|")})`:""].filter(Boolean),c=new RegExp(`(${a.join("|")})`,"giu"),l=[],d=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:w=>{var p;return(p=w.parentElement)!=null&&p.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(l.length>=500)break;let p=w.data;if(c.lastIndex=0,!c.test(p))continue;c.lastIndex=0;let b=document.createDocumentFragment(),x=0;for(let E of p.matchAll(c)){b.append(p.slice(x,E.index));let M=document.createElement("mark");M.className="db-search-hl",M.textContent=E[0],b.append(M),l.push(M),x=E.index+E[0].length}b.append(p.slice(x)),w.replaceWith(b)}if(Pr(),!l.length)return;let h=((v=document.querySelector("[data-clear-highlights]"))==null?void 0:v.dataset.clearHighlights)??"Clear highlights",m=document.createElement("div");m.className="not-prose mb-4";let f=document.createElement("button");f.type="button",f.className="inline-flex h-8 items-center rounded-md border px-3 text-sm hover:bg-accent",f.textContent=h,f.addEventListener("click",()=>{var w;for(let p of l)p.replaceWith(document.createTextNode(p.textContent??""));e.normalize(),m.remove(),(w=document.getElementById("db-content"))==null||w.focus({preventScroll:!0})},{signal:n}),m.append(f),e.prepend(m),location.hash||l[0].scrollIntoView({block:"center"})}function Pr(){try{let n=new URL(location.href);n.searchParams.delete("h"),history.replaceState(history.state,"",n.toString())}catch{}}var Vt=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},$e=function(t){return t.tagName==="IMG"},Fr=function(t){return NodeList.prototype.isPrototypeOf(t)},qe=function(t){return t&&t.nodeType===1},Do=function(t){var e=t.currentSrc||t.src;return e.substr(-4).toLowerCase()===".svg"},Mo=function(t){try{return Array.isArray(t)?t.filter($e):Fr(t)?[].slice.call(t).filter($e):qe(t)?[t].filter($e):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter($e):[]}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`)}},_r=function(t){var e=document.createElement("div");return e.classList.add("medium-zoom-overlay"),e.style.background=t,e},zr=function(t){var e=t.getBoundingClientRect(),i=e.top,o=e.left,s=e.width,r=e.height,a=t.cloneNode(),c=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,l=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return a.removeAttribute("id"),a.style.position="absolute",a.style.top=i+c+"px",a.style.left=o+l+"px",a.style.width=s+"px",a.style.height=r+"px",a.style.transform="",a},se=function(t,e){var i=Vt({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},$r=function n(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=window.Promise||function(C){function R(){}C(R,R)},o=function(C){var R=C.target;if(R===W){f();return}x.indexOf(R)!==-1&&v({target:R})},s=function(){if(!(M||!y.original)){var C=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(S-C)>A.scrollOffset&&setTimeout(f,150)}},r=function(C){var R=C.key||C.keyCode;(R==="Escape"||R==="Esc"||R===27)&&f()},a=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=C;if(C.background&&(W.style.background=C.background),C.container&&C.container instanceof Object&&(R.container=Vt({},A.container,C.container)),C.template){var $=qe(C.template)?C.template:document.querySelector(C.template);R.template=$}return A=Vt({},A,R),x.forEach(function(j){j.dispatchEvent(se("medium-zoom:update",{detail:{zoom:z}}))}),z},c=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return n(Vt({},A,C))},l=function(){for(var C=arguments.length,R=Array(C),$=0;$<C;$++)R[$]=arguments[$];var j=R.reduce(function(_,B){return[].concat(_,Mo(B))},[]);return j.filter(function(_){return x.indexOf(_)===-1}).forEach(function(_){x.push(_),_.classList.add("medium-zoom-image")}),E.forEach(function(_){var B=_.type,G=_.listener,it=_.options;j.forEach(function(ot){ot.addEventListener(B,G,it)})}),z},d=function(){for(var C=arguments.length,R=Array(C),$=0;$<C;$++)R[$]=arguments[$];y.zoomed&&f();var j=R.length>0?R.reduce(function(_,B){return[].concat(_,Mo(B))},[]):x;return j.forEach(function(_){_.classList.remove("medium-zoom-image"),_.dispatchEvent(se("medium-zoom:detach",{detail:{zoom:z}}))}),x=x.filter(function(_){return j.indexOf(_)===-1}),z},u=function(C,R){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return x.forEach(function(j){j.addEventListener("medium-zoom:"+C,R,$)}),E.push({type:"medium-zoom:"+C,listener:R,options:$}),z},h=function(C,R){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return x.forEach(function(j){j.removeEventListener("medium-zoom:"+C,R,$)}),E=E.filter(function(j){return!(j.type==="medium-zoom:"+C&&j.listener.toString()===R.toString())}),z},m=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=C.target,$=function(){var _={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},B=void 0,G=void 0;if(A.container)if(A.container instanceof Object)_=Vt({},_,A.container),B=_.width-_.left-_.right-A.margin*2,G=_.height-_.top-_.bottom-A.margin*2;else{var it=qe(A.container)?A.container:document.querySelector(A.container),ot=it.getBoundingClientRect(),T=ot.width,F=ot.height,V=ot.left,U=ot.top;_=Vt({},_,{width:T,height:F,left:V,top:U})}B=B||_.width-A.margin*2,G=G||_.height-A.margin*2;var X=y.zoomedHd||y.original,K=Do(X)?B:X.naturalWidth||B,st=Do(X)?G:X.naturalHeight||G,yt=X.getBoundingClientRect(),Lt=yt.top,Wt=yt.left,kt=yt.width,de=yt.height,Nt=Math.min(Math.max(kt,K),B)/kt,Ae=Math.min(Math.max(de,st),G)/de,Ht=Math.min(Nt,Ae),Tt=(-Wt+(B-kt)/2+A.margin+_.left)/Ht,Ye=(-Lt+(G-de)/2+A.margin+_.top)/Ht,ut="scale("+Ht+") translate3d("+Tt+"px, "+Ye+"px, 0)";y.zoomed.style.transform=ut,y.zoomedHd&&(y.zoomedHd.style.transform=ut)};return new i(function(j){if(R&&x.indexOf(R)===-1){j(z);return}var _=function T(){M=!1,y.zoomed.removeEventListener("transitionend",T),y.original.dispatchEvent(se("medium-zoom:opened",{detail:{zoom:z}})),j(z)};if(y.zoomed){j(z);return}if(R)y.original=R;else if(x.length>0){var B=x;y.original=B[0]}else{j(z);return}if(y.original.dispatchEvent(se("medium-zoom:open",{detail:{zoom:z}})),S=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,M=!0,y.zoomed=zr(y.original),document.body.appendChild(W),A.template){var G=qe(A.template)?A.template:document.querySelector(A.template);y.template=document.createElement("div"),y.template.appendChild(G.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",f),y.zoomed.addEventListener("transitionend",_),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(it),console.warn("Unable to reach the zoom image target "+y.zoomedHd.src),y.zoomedHd=null,$()};var it=setInterval(function(){y.zoomedHd.complete&&(clearInterval(it),y.zoomedHd.classList.add("medium-zoom-image--opened"),y.zoomedHd.addEventListener("click",f),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 ot=y.zoomedHd.addEventListener("load",function(){y.zoomedHd.removeEventListener("load",ot),y.zoomedHd.classList.add("medium-zoom-image--opened"),y.zoomedHd.addEventListener("click",f),document.body.appendChild(y.zoomedHd),$()})}else $()})},f=function(){return new i(function(C){if(M||!y.original){C(z);return}var R=function $(){y.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(y.zoomed),y.zoomedHd&&document.body.removeChild(y.zoomedHd),document.body.removeChild(W),y.zoomed.classList.remove("medium-zoom-image--opened"),y.template&&document.body.removeChild(y.template),M=!1,y.zoomed.removeEventListener("transitionend",$),y.original.dispatchEvent(se("medium-zoom:closed",{detail:{zoom:z}})),y.original=null,y.zoomed=null,y.zoomedHd=null,y.template=null,C(z)};M=!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(se("medium-zoom:close",{detail:{zoom:z}})),y.zoomed.addEventListener("transitionend",R)})},v=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=C.target;return y.original?f():m({target:R})},w=function(){return A},p=function(){return x},b=function(){return y.original},x=[],E=[],M=!1,S=0,A=e,y={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?A=t:(t||typeof t=="string")&&l(t),A=Vt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},A);var W=_r(A.background);document.addEventListener("click",o),document.addEventListener("keyup",r),document.addEventListener("scroll",s),window.addEventListener("resize",f);var z={open:m,close:f,toggle:v,update:a,clone:c,attach:l,detach:d,on:u,off:h,getOptions:w,getImages:p,getZoomedImage:b};return z};function qr(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 Br=".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}";qr(Br);var Io=$r;var jr;function No(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=jr??(jr=Io());o.update(e),o.attach(...i),n==null||n.addEventListener("abort",()=>{o.close(),o.detach(...i)});let s={signal:n},r=!1,a=c=>c.key==="Enter"||c.key===" ";for(let c of i)c.alt&&(c.tabIndex=0,c.addEventListener("keydown",l=>{a(l)&&(l.preventDefault(),r=!0,o.open({target:c}))},s),c.addEventListener("medium-zoom:opened",()=>{let l=document.querySelector(".medium-zoom-image--opened");!r||!l||(l.tabIndex=-1,l.addEventListener("keydown",d=>{a(d)&&(d.preventDefault(),o.close())}),l.focus())},s),c.addEventListener("medium-zoom:closed",()=>{r&&c.focus(),r=!1},s))}var Kr=new Set(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"]),Vr=new Set(["script","style","textarea","title","noscript","template","xmp"]),Ur=new Set(["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"]),Wr=new Set(["nav","aside","header","footer","figure","table","details","blockquote","form","button","svg","math","dialog"]),Yr=new Set(["svg","math","button","select","img"]),Ho=Object.assign(Object.create(null),{amp:"&",lt:"<",gt:">",quot:\'"\',apos:"\'",nbsp:"\\xA0",hellip:"\\u2026",mdash:"\\u2014",ndash:"\\u2013",lsquo:"\\u2018",rsquo:"\\u2019",ldquo:"\\u201C",rdquo:"\\u201D",laquo:"\\xAB",raquo:"\\xBB",copy:"\\xA9",reg:"\\xAE",trade:"\\u2122",middot:"\\xB7",times:"\\xD7",para:"\\xB6",sect:"\\xA7",deg:"\\xB0",rarr:"\\u2192",larr:"\\u2190",bull:"\\u2022",shy:""});function Fo(n){return n.includes("&")?n.replace(/&(#[xX][0-9a-fA-F]{1,6}|#\\d{1,7}|[a-zA-Z]{2,8});/g,(t,e)=>{if(e[0]!=="#")return Ho[e]??Ho[e.toLowerCase()]??t;let i=e[1]==="x"||e[1]==="X"?Number.parseInt(e.slice(2),16):Number.parseInt(e.slice(1),10);return i>0&&i<=1114111&&!(i>=55296&&i<=57343)?String.fromCodePoint(i):"\\uFFFD"}):n}var Po=n=>n>" "&&n!==">"&&n!=="/"&&n!=="="&&n!==\'"\'&&n!=="\'";function Xr(n){let t={tag:"#root",attrs:{},children:[],start:0,end:0},e=n.toLowerCase(),i=t,o=0,s=0,r=1,a=new Map,c=u=>{u>s&&i.children.push(n.slice(s,u))},l=()=>{i.end=r,a.set(i.tag,a.get(i.tag)-1),i=i.parent},d=u=>{if(a.get(u))for(;i!==t;){let h=i.tag===u;if(l(),h)return}};for(;o<n.length;){let u=n.indexOf("<",o);if(u<0)break;let h=n[u+1]??"";if(n.startsWith("<!--",u)){c(u);let E=n.startsWith("<!-->",u)?5:n.startsWith("<!--->",u)?6:0,M=E?u:n.indexOf("-->",u+4);o=s=E?u+E:M<0?n.length:M+3;continue}if(h==="!"||h==="?"){c(u);let E=n.indexOf(">",u);o=s=E<0?n.length:E+1;continue}let m=h==="/",f=u+(m?2:1);if(!/[a-zA-Z]/.test(n[f]??"")){o=u+1;continue}let v=f;for(;f<n.length&&Po(n[f]);)f++;let w=e.slice(v,f),p={},b=!1;for(;f<n.length&&n[f]!==">";){let E=n[f];if(E==="/"){b=!0,f++;continue}if(E<=" "){f++;continue}b=!1;let M=f;for(;f<n.length&&(Po(n[f])||n[f]===\'"\'||n[f]==="\'")&&n[f]!=="=";)f++;let S=e.slice(M,f);for(;f<n.length&&n[f]<=" ";)f++;let A="";if(n[f]==="="){for(f++;f<n.length&&n[f]<=" ";)f++;let y=n[f];if(y===\'"\'||y==="\'"){let W=n.indexOf(y,f+1);A=n.slice(f+1,W<0?n.length:W),f=W<0?n.length:W+1}else{let W=f;for(;f<n.length&&n[f]>" "&&n[f]!==">";)f++;A=n.slice(W,f)}}S&&!(S in p)&&(p[S]=Fo(A)),f===M&&f++}if(f>=n.length){c(u),s=n.length;break}if(c(u),o=s=f+1,m){d(w);continue}Ur.has(w)&&d("p");let x={tag:w,attrs:p,children:[],parent:i,start:r++,end:0};if(x.excl=Wr.has(w)||Ln(x)||"data-pagefind-ignore"in p?x:i.excl,i.children.push(x),Vr.has(w)){let E=e.indexOf(`</${w}`,o),M=E<0?n.length:E;w==="title"&&x.children.push(n.slice(o,M));let S=E<0?-1:n.indexOf(">",E);o=s=S<0?n.length:S+1,x.end=r;continue}!Kr.has(w)&&!b?(i=x,a.set(w,(a.get(w)??0)+1)):x.end=r}for(c(n.length);i!==t;)l();return t.end=r,t}function*re(n){let t=[...n.children].reverse();for(;t.length;){let e=t.pop();if(typeof e!="string"){yield e;for(let i=e.children.length-1;i>=0;i--)t.push(e.children[i])}}}var Ln=n=>n.attrs["aria-hidden"]==="true"||"hidden"in n.attrs||n.tag==="template";function ae(n){let t="",e=[n];for(;e.length;){let i=e.pop();if(typeof i=="string"){t+=Fo(i);continue}if(!(i!==n&&(Ln(i)||Yr.has(i.tag)||i.tag==="script"||i.tag==="style"))){i.tag==="br"&&(t+=" ");for(let o=i.children.length-1;o>=0;o--)e.push(i.children[o])}}return t.replace(/[\\s\xA0]+/g," ").trim()}var An=(n,t)=>n.start<=t.start&&t.end<=n.end;function Gr(n,t){var i;let e=(i=n.parent)==null?void 0:i.excl;return!e||An(e,t)}var Cn=/^h([1-6])$/,Zr=120;function kn(n,t=200){if(n.length<=t)return n;let e=n.slice(0,t),i=e.lastIndexOf(" ");return`${(i>t*.6?e.slice(0,i):e).replace(/[\\s,;:.\u2013\u2014-]+$/,"")}\\u2026`}var je=n=>kn(n,Zr),Qr=new Set(["p","li","dd","dt","td","th","blockquote","figcaption","caption","summary","pre"]);function Be(n,t,e){for(let i of n){if(e!=null&&e(i))break;if(i.tag!=="p"||!Gr(i,t)||Ln(i))continue;let o=ae(i);if(o)return kn(o)}return""}function Ut(n,t){for(let e of re(n))if(t(e))return e}function Jr(n){let t=n.attrs["data-title"]??n.attrs["aria-label"]??n.attrs.title;if(t!=null&&t.trim())return je(t.replace(/\\s+/g," ").trim());let e=Ut(n,i=>i.tag==="figcaption"||i.tag==="caption"||i.tag==="summary"||"data-card-title"in i.attrs||"data-title"in i.attrs||Cn.test(i.tag))??ea(n);return e?je(ae(e)):""}var ta=n=>"data-component"in n.attrs||"data-type"in n.attrs||n.attrs.role==="note"||n.tag==="details"||n.tag==="figure"||n.tag.startsWith("db-");function ea(n){let t=new Set;for(let e of re(n)){if(e===n)continue;let i=e.parent;if(i&&i!==n&&(t.has(i)||ta(i))){t.add(e);continue}if(e.attrs["data-part"]==="title")return e}}var na=n=>{var t;return n.tag==="meta"&&((t=n.attrs["http-equiv"])==null?void 0:t.trim().toLowerCase())==="refresh"&&/[;,]\\s*url\\s*=/i.test(n.attrs.content??"")};function _o(n,t){var m;let e=Xr(n);if(Ut(e,na))return;let i=Ut(e,f=>f.tag==="main")??e,o=Ut(i,f=>f.tag==="article"&&/(?:^|\\s)docs-prose(?:\\s|$)/.test(f.attrs.class??""))??i,s=Ut(i,f=>f.tag==="h1"),r=Ut(e,f=>f.tag==="title"),a=je(s&&ae(s)||(r?ae(r).split(" | ")[0].trim():"")),c=t==null?void 0:t.replace(/^#/,"");if(!c||c==="top"){let f=[...re(o)],v=s?f.indexOf(s)+1:0;return{title:a,excerpt:Be(f.slice(Math.max(0,v)),o),kind:"page"}}let l=Ut(e,f=>f.attrs.id===c);if(!l)return;let d=(m=Cn.exec(l.tag))==null?void 0:m[1];if(d==="1")return{title:a,excerpt:Be(re(o),o),kind:"page"};if(d){let f=l.parent??e,v=[...re(f)],w=v.slice(v.indexOf(l)+1).filter(b=>!An(l,b)),p=An(o,l)?o:i;return{title:a,label:je(ae(l)),excerpt:Be(w,p,b=>{let x=Cn.exec(b.tag);return!!x&&Number(x[1])<=Number(d)}),kind:"heading"}}let u=Be(re(l),l),h=!u&&Qr.has(l.tag)?kn(ae(l)):"";return{title:a,label:Jr(l),excerpt:u||h,kind:"target"}}var ia="dogsbay:link-preview-load",zo=[".db-link-preview{position:fixed;z-index:60;box-sizing:border-box;max-width:min(22rem,calc(100vw - 16px));max-height:min(16rem,calc(100vh - 16px));overflow:hidden;padding:.75rem .875rem;","border:1px solid var(--border,#e4e4e7);border-radius:var(--radius,.5rem);background:var(--popover,#fff);color:var(--popover-foreground,#18181b);","box-shadow:0 8px 24px rgb(0 0 0/.14);font-size:.875rem;line-height:1.45;text-align:start}",".db-link-preview[hidden]{display:none}",".db-link-preview-title{margin:0;font-weight:600}",".db-link-preview-label{font-weight:500}",".db-link-preview-excerpt{margin:.375rem 0 0;color:var(--muted-foreground,#52525b)}","@media (prefers-reduced-motion:no-preference){.db-link-preview:not([hidden]){animation:db-link-preview-in .12s ease-out}}","@keyframes db-link-preview-in{from{opacity:0;transform:translateY(2px)}}"].join(""),Ee="db-link-preview",oa="nav:not(.related-resources), aside, header, footer, h1, h2, h3, h4, h5, h6, [data-no-link-preview], [data-card], db-card, db-link-button",sa="div, p, h1, h2, h3, h4, h5, h6, img, svg, picture, figure, ul, ol, table",ra=/\\.(?:pdf|zip|gz|tgz|tar|bz2|xz|7z|rar|png|jpe?g|gif|svg|webp|avif|ico|bmp|tiff?|mp[34]|m4a|webm|ogg|wav|mov|avi|json|xml|csv|tsv|txt|ya?ml|md|epub|docx?|xlsx?|pptx?|odt|ods|exe|msi|dmg|pkg|deb|rpm|apk|iso|bin|wasm|js|mjs|css|map|woff2?|ttf|otf)$/i,aa=8e6,ce;async function $o(n,t=!1){let e=new URL(location.origin),[i="/",o=""]=n.split("?");if(e.pathname=i,e.search=o,e.origin!==location.origin)return;let s=await fetch(e.href,{credentials:"same-origin",redirect:"manual",headers:{Accept:"text/html"}});if(s.type==="opaqueredirect"||s.status>=300&&s.status<400)return!t&&!i.endsWith("/")?$o(`${i}/${o?`?${o}`:""}`,!0):void 0;if(!(!s.ok||!/html/i.test(s.headers.get("content-type")??"text/html")))return s.text()}function ca(n,t="article.docs-prose",e=location){if(!n.closest(t)||n.closest(oa)||n.hasAttribute("download")||n.getAttribute("aria-hidden")==="true"||n.hasAttribute("data-variant")||n.querySelector(sa))return;let i=n.getAttribute("href");if(!i)return;let o;try{o=new URL(i,e.href)}catch{return}if(o.origin!==e.origin||o.protocol!=="http:"&&o.protocol!=="https:"||ra.test(o.pathname))return;let s;try{s=o.hash?decodeURIComponent(o.hash.slice(1)):void 0}catch{s=o.hash.slice(1)}if(!(o.pathname===e.pathname&&o.search===e.search&&(!s||s==="top")))return o.hash="",{url:o,...s?{id:s}:{}}}function la(){if(document.getElementById(`${Ee}-style`)||document.dbLinkPreviewSheet)return;try{let t=new CSSStyleSheet;t.replaceSync(zo),document.adoptedStyleSheets=[...document.adoptedStyleSheets,t],document.dbLinkPreviewSheet=!0;return}catch{}let n=document.createElement("style");n.id=`${Ee}-style`,n.textContent=zo,document.head.append(n)}var da=n=>!!n&&typeof n=="object"&&typeof n.title=="string";function qo(n={}){ce==null||ce();let t=n.content??"article.docs-prose",e=n.delay??500,i=location;if(n.base!==void 0)try{i=new URL(String(n.base))}catch{throw new TypeError(`initLinkPreviews: base must be an absolute URL, not ${String(n.base)}`)}let o=()=>i.href.split("#")[0];n.style!==!1&&la();let s=new Map,r=new Map,a=0,c=new Map,l,d,u=0,h,m,f=null,v,w,p,b=document.createElement("div");b.id=Ee,b.className="db-link-preview",b.setAttribute("role","tooltip"),b.hidden=!0;let x=document.createElement("p");x.className="db-link-preview-title";let E=document.createElement("p");E.className="db-link-preview-excerpt",b.append(x,E);let M=T=>{let F=T.href,V=s.get(F);return V?(s.delete(F),s.set(F,V)):(V=(async()=>{if(n.load)return n.load(T);let U=!1,X,K=new CustomEvent(ia,{cancelable:!0,detail:{url:F,respond(st){U=!0,X=st}}});if(document.dispatchEvent(K),U||K.defaultPrevented)return X;if(T.href===o())return document.documentElement.outerHTML;if(!(T.origin!==location.origin||!/^https?:$/.test(location.protocol)))return $o(T.pathname+T.search)})().then(U=>{let X=typeof U=="string"?U.length:0;r.set(F,X),a+=X;for(let[K]of s){if(a<=aa||K===F)break;a-=r.get(K)??0,r.delete(K),s.delete(K);for(let st of c.keys())st.startsWith(K)&&c.delete(st)}return U},()=>{s.delete(F)}),s.set(F,V)),V},S=()=>{clearTimeout(v),clearTimeout(w),l=void 0,d=void 0,h==null||h.disconnect(),h=void 0,m&&(f===null?m.removeAttribute("aria-describedby"):m.setAttribute("aria-describedby",f),m=void 0,b.hidden=!0)},A=T=>{let F=[...T.getClientRects()],V=(p&&F.find(Wt=>p.y>=Wt.top&&p.y<=Wt.bottom))??F[0]??T.getBoundingClientRect(),U=b.offsetWidth,X=b.offsetHeight,K=8,st=V.bottom+K,yt=st+X<=window.innerHeight-K||V.top-K-X<K?st:V.top-K-X,Lt=Math.max(K,Math.min(V.left,window.innerWidth-U-K));b.style.top=`${Math.round(yt)}px`,b.style.left=`${Math.round(Lt)}px`},y=(T,F)=>{if(!(l!==T||!T.isConnected)){if(x.textContent="",x.append(F.title||F.label||""),F.label&&F.title){let V=document.createElement("span");V.className="db-link-preview-label",V.textContent=` \\u203A ${F.label}`,x.append(V)}E.textContent=F.excerpt,E.hidden=!F.excerpt,!(!x.textContent&&!F.excerpt)&&(b.isConnected||document.body.append(b),m!==T&&(f=T.getAttribute("aria-describedby"),T.setAttribute("aria-describedby",f?`${f} ${Ee}`:Ee),m=T),b.hidden=!1,A(T),h??(h=new MutationObserver(()=>{m&&!m.isConnected&&S()})),h.observe(document.body,{childList:!0,subtree:!0}))}},W=(T,F)=>{if(l===T)return;let V=ca(T,t,i);V&&(S(),l=T,d=F,v=setTimeout(async()=>{let U=await M(V.url);if(l!==T)return;let X=`${V.url.href}#${V.id??""}`,K=c.get(X);K===void 0&&!c.has(X)&&(K=da(U)?U:typeof U=="string"?_o(U,V.id):void 0,typeof U=="string"&&c.set(X,K)),K&&y(T,K)},e))},z=T=>T instanceof Element?T.closest("a[href]"):null,Z=T=>{if(p={x:T.clientX,y:T.clientY},T.pointerType==="touch")return;if(b.contains(T.target)){clearTimeout(w);return}let F=z(T.target);F&&!(d==="focus"&&F===l)&&(clearTimeout(w),W(F,"pointer"))},C=T=>{if(T.pointerType==="touch"||!l||d!=="pointer")return;let F=T.relatedTarget;F&&(l.contains(F)||b.contains(F))||(clearTimeout(w),w=setTimeout(S,m?200:0))},it=[[document,"pointerover",Z],[document,"pointerout",C],[b,"pointerleave",(T=>C(T))],[document,"focusin",T=>{let F=z(T.target);if(!F)return;let V=!0;try{V=F.matches(":focus-visible")}catch{}V&&(p=void 0,u=performance.now(),W(F,"focus"))}],[document,"focusout",T=>{l&&(T.target===l||l.contains(T.target))&&S()}],[document,"keydown",T=>{T.key==="Escape"&&(l||m)&&S()}],[document,"pointerdown",T=>{b.contains(T.target)||S()},{capture:!0}],[document,"touchstart",()=>S(),{passive:!0,capture:!0}],[window,"scroll",()=>{if(d==="focus"&&l){m===l&&A(l);return}performance.now()-u<100||S()},{passive:!0,capture:!0}],[window,"resize",S,{passive:!0}],[window,"pagehide",S],[document,"astro:before-swap",S]];for(let[T,F,V,U]of it)T.addEventListener(F,V,U);let ot=()=>{S();for(let[T,F,V,U]of it)T.removeEventListener(F,V,U);b.remove(),ce===ot&&(ce=void 0)};return ce=ot,ot}function Ke(n){return!/^[\\x00-\\x20]*([a-z][a-z0-9+.-]*:|[\\\\/])/i.test(n.replace(/[\\t\\n\\r]/g,""))}var Ve=new Map,ua=15e3;function Tn(n){let t=Ve.get(n);if(!t){let e=new Promise((i,o)=>{let s=document.createElement("script");s.src=n;let r=setTimeout(()=>a(),ua),a=()=>{clearTimeout(r),s.onload=s.onerror=null,Ve.get(n)===e&&Ve.delete(n),o(new Error(`could not load ${n}`))};s.onload=()=>{clearTimeout(r),i()},s.onerror=a,document.head.appendChild(s)});Ve.set(n,t=e)}return t}function ha(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 fa(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 c=(s=e.dataset).label??(s.label=e.textContent??"");e.textContent="Copied",clearTimeout(Number(e.dataset.timer)),e.dataset.timer=String(setTimeout(()=>e.textContent=c,1500))}catch{}(a=(r=e.closest("db-popover"))==null?void 0:r.close)==null||a.call(r,"close-press")},{signal:n})}function pa(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")){(Ke(r)||/^https?:\\/\\//i.test(r))&&(location.href=r);return}if(!(!Ke(r)||!Ke(s))){if(i.dataset.dbSwitch==="product"){location.href=r;return}try{let c=s?`${n}${s}/`:n;await Tn(`${c}_dogsbay/pages.js`);let l=(a=window.__DOGSBAY_PAGES__)==null?void 0:a[s];location.href=l&&!l.includes(e)?`${c}index.html`:r}catch{location.href=r}}},{signal:t})})}function ma(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 Se=new Map,We=new Set;function Ue(){for(let[n,t]of Se)n.isConnected||(Mt(n),t.abort(),Se.delete(n));for(let n of We)n.isConnected||Mt(n)}function ga(n,t){let e=EventTarget.prototype,i=e.addEventListener,o=0;e.addEventListener=function(s,r,a){o++;let c=typeof a=="object"?a.signal:void 0;i.call(this,s,r,typeof a=="object"?{...a,signal:c?AbortSignal.any([c,n]):n}:{capture:a===!0,signal:n})};try{t()}finally{e.addEventListener=i}return o}function ba(){Ue(),document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(n=>{if(Se.has(n)||We.has(n))return;let t=new AbortController;ga(t.signal,()=>hn(n))?Se.set(n,t):n.querySelector("[data-component=\'sidebar\']")&&We.add(n)}),document.removeEventListener("keydown",Ue),document.addEventListener("keydown",Ue)}var le;function va(n){if(n===!1||!document.querySelector("main[data-link-previews]"))return;let t=typeof n=="object"?n:{};if(!(location.protocol==="file:"&&t.base===void 0))try{return qo({delay:t.delay,base:t.base,load:t.load,content:"main[data-link-previews] article.docs-prose"})}catch(e){console.warn("dogsbay: link previews not started:",e);return}}function On(n={}){var c;le==null||le.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 d=l.querySelector(":scope > [data-part=\'list\']");d&&!d.querySelector("[data-part=\'item\']")&&((c=l.parentNode)==null||c.insertBefore(l,l.nextSibling))}}ba(),n.theme!==!1&&ha(e),fa(e),n.switchers!==!1&&pa(s,e),ma(e),n.search!==!1&&(Lo({unitRoot:o,siteRoot:s,prefix:i.dataset.prefix??"",loadScript:Tn,signal:e}),ko({unitRoot:o,siteRoot:s,prefix:i.dataset.prefix??"",loadScript:Tn,signal:e})),Ro(e),No(e);let r=va(n.linkPreviews);r&&e.addEventListener("abort",r,{once:!0});let a={unmount(){if(!e.aborted){t.abort();for(let l of[...Se.keys(),...We])Mt(l);Ue(),le===a&&(le=void 0)}}};return le=a}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>On()):On();})();\n';
|
|
23299
|
+
var CLIENT_FILE = "dogsbay-7c2bde4261.js";
|
|
23300
|
+
var SSG_VERSION = "0.2.0-beta.179";
|
|
23112
23301
|
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"{% if linkPreviews %} data-link-previews{% endif %}>\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"{% if linkPreviews %} data-link-previews{% endif %}>\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
|
|
23113
23302
|
header in the callout colours of its tone. A closeable one is closed and remembered by <db-announcement>,
|
|
23114
23303
|
and the head script hides a closed one before first paint. Context: announcement = {id, key (what a close is
|
|
@@ -23338,41 +23527,41 @@ var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or
|
|
|
23338
23527
|
{%- endif %}
|
|
23339
23528
|
</section>
|
|
23340
23529
|
`, "partials/toc-popover.html": '{#- Table of contents in a header popover. -#}\n{%- set toc_label = t("toc") -%}\n{%- set toc_title = "" -%}\n<details class="dba-toc-popover relative" data-toc-popover><summary class="cursor-pointer list-none rounded-md px-2 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-foreground">{{ toc_label }}</summary><div class="absolute right-0 z-50 mt-1 max-h-[70vh] w-64 overflow-y-auto rounded-md border bg-background p-3 shadow-md">\n{%- include "partials/toc.html" -%}\n</div></details>\n', "partials/toc-rail.html": '{#- Table of contents in a right-hand rail, with a visible title. -#}\n{%- set toc_label = t("toc") -%}\n{%- set toc_title = toc_label -%}\n<div class="sticky top-12 hidden h-[calc(100vh-3rem)] w-56 shrink-0 overflow-y-auto border-l p-4 lg:block">\n{%- include "partials/toc.html" -%}\n</div>\n', "partials/toc-top.html": '{#- Table of contents above the content, collapsed. -#}\n{%- set toc_label = t("toc") -%}\n{%- set toc_title = "" -%}\n<details class="dba-toc-top not-prose mb-6 rounded-md border" data-toc-top><summary class="cursor-pointer list-none px-3 py-2 text-sm font-medium text-muted-foreground">{{ toc_label }}</summary><div class="border-t px-3 py-2">\n{%- include "partials/toc.html" -%}\n</div></details>\n', "partials/toc.html": '{#- The table-of-contents link list (DocsToc.astro), shared by toc-top, toc-rail and toc-popover.\n Context: headings = [{depth, id, text}], toc_label (aria-label), toc_title (visible heading, may be empty). -#}\n<db-toc offset="64"><nav class="text-sm" aria-label="{{ toc_label }}">\n{%- if toc_title %}<div class="text-xs font-semibold uppercase text-muted-foreground" aria-hidden="true">{{ toc_title }}</div>{% endif -%}\n<ul class="mt-2 space-y-1">\n{%- for h in headings -%}\n<li><a href="#{{ h.id }}" data-toc-link data-toc-slug="{{ h.id }}" class="block py-0.5 text-muted-foreground transition-colors hover:text-foreground data-[active]:font-medium data-[active]:text-foreground" style="padding-left:{{ (h.depth - 2) * 0.75 }}rem">{{ h.text }}</a></li>\n{%- endfor -%}\n</ul></nav></db-toc>\n{#- An included partial keeps its final newline (keepTrailingNewline); this strips it, since toc-top/rail/popover place the list inline. -#}\n', "partials/version-badge.html": '{#- The version badge above the title (Docusaurus\'s DocVersionBadge), on versions with `badge: true`.\n Context: versionBadge = "Version: 3.33" (the text, worded and filled in), or empty. -#}\n{%- if versionBadge -%}\n<div class="not-prose mb-3" data-version-badge><span class="inline-flex items-center rounded-md border border-border px-2 py-0.5 text-xs font-medium text-muted-foreground">{{ versionBadge }}</span></div>\n{%- endif -%}\n' };
|
|
23341
|
-
var CLIENT_CANDIDATES = ['""', '""}', '"&"', '")}', '"./",', '"Also', '"\\\\$&")).join("|")})', '"\\\\$&")}"', '"s"}', '"{n}").replace("{n}",', "#db-content", "#q=", "([^", "(hashed", "(here", "(inFragment()", "(index.ts)", "(the", "({n})", "./", "./elements.js", "./highlight.js", "./image-zoom.js", "./mount.js", "./pagefind.js", "./search-facets.js", "./search-scope.js", "./search.js", "./targets.js", ".medium-zoom-image--opened", "/g,", "1.0", "1.x", ":scope", "<!--", "</", "</$1", "<\\/", "<db-combobox", "<db-dialog", "<main", "<main>", "<script>", "===", "=>", "??", "?h=<terms>", "?q=", "?|\\S*)/gi,", "@dogsbay/elements/db-accordion", "@dogsbay/elements/db-announcement", "@dogsbay/elements/db-code-block", "@dogsbay/elements/db-combobox", "@dogsbay/elements/db-details-sheet", "@dogsbay/elements/db-dialog", "@dogsbay/elements/db-nav-tree", "@dogsbay/elements/db-popover", "@dogsbay/elements/db-select", "@dogsbay/elements/db-tabs", "@dogsbay/elements/db-toc", "@dogsbay/elements/db-tooltip", "@dogsbay/elements/link-previews", "@dogsbay/search/facets", "@dogsbay/search/format", "@dogsbay/search/query", "@dogsbay/ssg/client", "@dogsbay/ui/sidebar/sidebar.ts", "All", "Also", "Clear", "Copied", "DOMContentLoaded", "Enter", "Filter", "Gizmo", "More", "No", "Platform", "Product", "Search", "See", "String(missing))}", "This", "URL(siteRoot", "[^", "[aria-hidden='true']", "[contenteditable]", "[data-clear-filters]", "[data-clear-highlights]", "[data-component='sidebar']", "[data-component='sidebar-provider']", "[data-component='theme-toggle']", "[data-copy-markdown]", "[data-db-search-facets]", "[data-db-search-input]", "[data-db-search-list]", "[data-db-search-page]", "[data-db-search-status]", "[data-part='item']", "[data-part='list']", "[data-part='listbox']", "\\\\$&", "_dogsbay", "_dogsbay/nav.js", "_dogsbay/site.js", "a-b", "a.db-anchor", "abort", "accent-primary", "all", "alone.", "and", "api", "applies", "are", "aria-label", "aria-pressed", "aria-pressed:bg-primary", "aria-pressed:text-primary-foreground", "arrive", "article", "article.docs-prose", "
|
|
23530
|
+
var CLIENT_CANDIDATES = ['""', '""}', '"&"', '")}', '"./",', '"Also', '"\\\\$&")).join("|")})', '"\\\\$&")}"', '"s"}', '"{n}").replace("{n}",', "#db-content", "#q=", "([^", "(a", "(hashed", "(here", "(inFragment()", "(index.ts)", "(the", "({n})", "./", "./elements.js", "./highlight.js", "./image-zoom.js", "./mount.js", "./pagefind.js", "./search-facets.js", "./search-scope.js", "./search.js", "./targets.js", ".medium-zoom-image--opened", "/g,", "1.0", "1.x", ":scope", "<!--", "</", "</$1", "<\\/", "<db-combobox", "<db-dialog", "<main", "<main>", "<script>", "===", "=>", "??", "?h=<terms>", "?q=", "?|\\S*)/gi,", "@dogsbay/elements/db-accordion", "@dogsbay/elements/db-announcement", "@dogsbay/elements/db-code-block", "@dogsbay/elements/db-combobox", "@dogsbay/elements/db-details-sheet", "@dogsbay/elements/db-dialog", "@dogsbay/elements/db-nav-tree", "@dogsbay/elements/db-popover", "@dogsbay/elements/db-select", "@dogsbay/elements/db-tabs", "@dogsbay/elements/db-toc", "@dogsbay/elements/db-tooltip", "@dogsbay/elements/link-previews", "@dogsbay/search/facets", "@dogsbay/search/format", "@dogsbay/search/query", "@dogsbay/ssg/client", "@dogsbay/ui/sidebar/sidebar.ts", "All", "Also", "Clear", "Copied", "DOMContentLoaded", "Enter", "Filter", "Gizmo", "More", "No", "Platform", "Product", "Search", "See", "String(missing))}", "This", "URL(siteRoot", "[^", "[aria-hidden='true']", "[contenteditable]", "[data-clear-filters]", "[data-clear-highlights]", "[data-component='sidebar']", "[data-component='sidebar-provider']", "[data-component='theme-toggle']", "[data-copy-markdown]", "[data-db-search-facets]", "[data-db-search-input]", "[data-db-search-list]", "[data-db-search-page]", "[data-db-search-status]", "[data-part='item']", "[data-part='list']", "[data-part='listbox']", "\\\\$&", "_dogsbay", "_dogsbay/nav.js", "_dogsbay/site.js", "`about:srcdoc`,", "`base`,", "`blob:`,", "`file:`)", "a-b", "a.db-anchor", "abort", "accent-primary", "all", "alone.", "and", "api", "applies", "are", "aria-label", "aria-pressed", "aria-pressed:bg-primary", "aria-pressed:text-primary-foreground", "arrive", "article", "article.docs-prose", "base", "base:", "be", "before", "block", "border", "border-border", "border-l", "both", "build.navMode:", "builtin", "button", "button,", "by", "category", "center", "change", "checkbox", "click", "client", "close-press", "config", "could", "cursor-pointer", "dark", "data", "data-facets", "data-link", "data-link-previews", "data-link-previews>", "data-part", "db-content", "db-dialog:open", "db-nav-tree", "db-page-markdown", "db-popover", "db-search", "db-search-hl", "default,", "delay", "dialog", "disabled", "display,", "div", "docs.js", "document", "document.baseURI).pathname}", "dogsbay:", "dogsbay:link-preview-load", "each", "else", "except", "facet", "facets", "false", "fieldset", "file:", "filter", 'filter="none"', "filter=name:value", "flex", "flex-1", "flex-wrap", "fn", "folder", "font-medium", "font-semibold", "for", "form", "frame,", "from", "fullNavLimit", "function", "gap-1", "gap-2", "gi", "giu", "group", "h-8", "hidden", "highlights", "host", "hover:bg-accent", "hover:text-foreground", "https:", 'id="db-search">', 'img[data-zoomable="true"]', "in", 'in"}', "index", "index.html", "inline-flex", "inline>", "input", "input,", "input[data-facet-name]", "inst", "install", "install/aws", "installing", "items-center", "its", "javascript:", "keydown", "label", "last", "later", "legend", "li", "light", "line-clamp-2", "link", "linkPreviews", "linkPreviews:", "list", "load", "loaded.", "loading", "loads.", "main[data-link-previews]", "mark", "mark,", "mb-1", "mb-2", "mb-3", "mb-4", "medium-zoom", "medium-zoom:closed", "medium-zoom:opened", "ml-4", "mount()", "mounts", "mt-1", "mt-4", "mx-3", "name\\0value", "names", "none", "not", "not-prose", "object", "once", "only", "option", "others", "own", "own,", "p-3", "p=", "page", "page,", "page.html#id", "page.html?h=terms#id", "pagefind", "parameters:", "passes", "pb-2", "pb-3", "platform", "preview", "previews", "product", "product,", "product.", "product;", "products", "products:", "puts", "px-2", "px-2.5", "px-3", "py-0.5", "py-1", "py-1.5", "py-2", "query", "query:", "readDataScript:", "reader", "results", "results,", "role", "rounded", "rounded-full", "rounded-md", "scope", "scope;", "scope=", "script", "script,", "search", "search.html", "searched", "section", "select,", "select[data-db-switch]", "signal", "site", "size-3.5", "space-y-0.5", "span", "ssg.search:", "started:", "string", "style,", "submit", "tag", "taxonomies", "text-center", "text-muted-foreground", "text-sm", "text-xs", "text/html", "textarea,", "that", "the", "them,", "theme", "they", "this", "to", "tracking-wide", "transition-colors", "true", "truncate", "ul", "unit", "unmount()", "uppercase", "v:", "v=", "value", "values", "version", "versions", "w-full", "way", "when", "window.__DOGSBAY_NAV__", "with", "{n}", "{}", "||"];
|
|
23342
23531
|
var SITE_NOTICES = `Third-party software in this site's _dogsbay/ files (dogsbay.js, site.css) and pages
|
|
23343
23532
|
|
|
23344
23533
|
========================================================================
|
|
23345
|
-
@dogsbay/elements@0.2.0-beta.
|
|
23534
|
+
@dogsbay/elements@0.2.0-beta.179 (MIT)
|
|
23346
23535
|
https://github.com/dogsbay/dogsbay.git
|
|
23347
23536
|
|
|
23348
23537
|
Licensed under MIT; the package ships no licence file.
|
|
23349
23538
|
|
|
23350
23539
|
========================================================================
|
|
23351
|
-
@dogsbay/primitives@0.2.0-beta.
|
|
23540
|
+
@dogsbay/primitives@0.2.0-beta.179 (MIT)
|
|
23352
23541
|
https://github.com/dogsbay/dogsbay.git
|
|
23353
23542
|
|
|
23354
23543
|
Licensed under MIT; the package ships no licence file.
|
|
23355
23544
|
|
|
23356
23545
|
========================================================================
|
|
23357
|
-
@dogsbay/render-html@0.2.0-beta.
|
|
23546
|
+
@dogsbay/render-html@0.2.0-beta.179 (MIT)
|
|
23358
23547
|
https://github.com/dogsbay/dogsbay.git
|
|
23359
23548
|
|
|
23360
23549
|
Licensed under MIT; the package ships no licence file.
|
|
23361
23550
|
|
|
23362
23551
|
========================================================================
|
|
23363
|
-
@dogsbay/search@0.2.0-beta.
|
|
23552
|
+
@dogsbay/search@0.2.0-beta.179 (MIT)
|
|
23364
23553
|
https://github.com/dogsbay/dogsbay.git
|
|
23365
23554
|
|
|
23366
23555
|
Licensed under MIT; the package ships no licence file.
|
|
23367
23556
|
|
|
23368
23557
|
========================================================================
|
|
23369
|
-
@dogsbay/site-files@0.2.0-beta.
|
|
23558
|
+
@dogsbay/site-files@0.2.0-beta.179 (MIT)
|
|
23370
23559
|
https://github.com/dogsbay/dogsbay.git
|
|
23371
23560
|
|
|
23372
23561
|
Licensed under MIT; the package ships no licence file.
|
|
23373
23562
|
|
|
23374
23563
|
========================================================================
|
|
23375
|
-
@dogsbay/ui@0.2.0-beta.
|
|
23564
|
+
@dogsbay/ui@0.2.0-beta.179 (MIT)
|
|
23376
23565
|
https://github.com/dogsbay/dogsbay.git
|
|
23377
23566
|
|
|
23378
23567
|
Licensed under MIT; the package ships no licence file.
|
|
@@ -28317,6 +28506,246 @@ var ThemeTemplates = class {
|
|
|
28317
28506
|
}
|
|
28318
28507
|
};
|
|
28319
28508
|
|
|
28509
|
+
// node_modules/@dogsbay/site-files/dist/books.js
|
|
28510
|
+
var BOOK_SEGMENT = "~book";
|
|
28511
|
+
function planBooks(nav, options = {}) {
|
|
28512
|
+
const plans = [];
|
|
28513
|
+
const walk = (items3, inheritYes) => {
|
|
28514
|
+
for (const item of items3) {
|
|
28515
|
+
const effective = item.singlePage ?? (inheritYes ? "yes" : "no");
|
|
28516
|
+
if (effective === "yes" && item.children?.length) {
|
|
28517
|
+
const plan = planBook(item, options);
|
|
28518
|
+
if (plan)
|
|
28519
|
+
plans.push(plan);
|
|
28520
|
+
}
|
|
28521
|
+
if (item.children?.length)
|
|
28522
|
+
walk(item.children, effective === "children");
|
|
28523
|
+
}
|
|
28524
|
+
};
|
|
28525
|
+
walk(nav, options.book === true);
|
|
28526
|
+
const routes = /* @__PURE__ */ new Set();
|
|
28527
|
+
const own2 = (p) => p.entries[0]?.landing === true;
|
|
28528
|
+
for (const plan of [...plans.filter(own2), ...plans.filter((p) => !own2(p))]) {
|
|
28529
|
+
const base = plan.slug;
|
|
28530
|
+
for (let n = 2; routes.has(plan.slug); n++)
|
|
28531
|
+
plan.slug = base.replace(new RegExp(`/${escapeRe2(BOOK_SEGMENT)}$`), `-${n}/${BOOK_SEGMENT}`);
|
|
28532
|
+
routes.add(plan.slug);
|
|
28533
|
+
}
|
|
28534
|
+
return plans;
|
|
28535
|
+
}
|
|
28536
|
+
function planBook(group, options = {}) {
|
|
28537
|
+
const prefix = options.hrefPrefix ?? "";
|
|
28538
|
+
const isPage = options.isPage ?? (() => true);
|
|
28539
|
+
const entries = [];
|
|
28540
|
+
const topicAnchors = /* @__PURE__ */ new Map();
|
|
28541
|
+
const members = [];
|
|
28542
|
+
const used = /* @__PURE__ */ new Set();
|
|
28543
|
+
const unique = (base2) => uniqueId2(base2 || "section", used);
|
|
28544
|
+
const slugOf2 = (href) => {
|
|
28545
|
+
const raw = slugFromHref(href, prefix);
|
|
28546
|
+
if (raw === "index" || raw.endsWith("/index")) {
|
|
28547
|
+
const folder = raw.slice(0, -"index".length).replace(/\/$/, "");
|
|
28548
|
+
if (!isPage(raw) || isPage(folder))
|
|
28549
|
+
return folder;
|
|
28550
|
+
}
|
|
28551
|
+
return raw;
|
|
28552
|
+
};
|
|
28553
|
+
const groupSlug = slugOf2(group.href);
|
|
28554
|
+
if (groupSlug && isPage(groupSlug)) {
|
|
28555
|
+
entries.push({ label: group.label, level: 1, slug: groupSlug, anchor: "", landing: true });
|
|
28556
|
+
topicAnchors.set(groupSlug, "");
|
|
28557
|
+
members.push(groupSlug);
|
|
28558
|
+
}
|
|
28559
|
+
const assign = (items3, depth) => {
|
|
28560
|
+
for (const item of items3) {
|
|
28561
|
+
const slug = slugOf2(item.href);
|
|
28562
|
+
if (slug !== "" && slug === groupSlug && topicAnchors.has(slug) && !item.children?.length)
|
|
28563
|
+
continue;
|
|
28564
|
+
const page = slug !== "" && isPage(slug) && !topicAnchors.has(slug);
|
|
28565
|
+
const anchor = unique(slugify2(slug ? lastSegment(slug) : item.label));
|
|
28566
|
+
entries.push({ label: item.label, level: Math.min(depth + 2, 6), slug: page ? slug : "", anchor });
|
|
28567
|
+
if (page) {
|
|
28568
|
+
topicAnchors.set(slug, anchor);
|
|
28569
|
+
members.push(slug);
|
|
28570
|
+
}
|
|
28571
|
+
if (item.children?.length)
|
|
28572
|
+
assign(item.children, depth + 1);
|
|
28573
|
+
}
|
|
28574
|
+
};
|
|
28575
|
+
assign(group.children ?? [], 0);
|
|
28576
|
+
if (!members.length)
|
|
28577
|
+
return null;
|
|
28578
|
+
const base = groupSlug.replace(/(^|\/)index$/, "") || sharedFolder(members) || slugify2(group.label);
|
|
28579
|
+
return { label: group.label, slug: `${base}/${BOOK_SEGMENT}`, entries, topicAnchors, members };
|
|
28580
|
+
}
|
|
28581
|
+
function bookHeadingIds(plan, idsOf) {
|
|
28582
|
+
const used = new Set(plan.entries.map((e) => e.anchor).filter(Boolean));
|
|
28583
|
+
const out = /* @__PURE__ */ new Map();
|
|
28584
|
+
for (const slug of plan.members) {
|
|
28585
|
+
const map = /* @__PURE__ */ new Map();
|
|
28586
|
+
for (const id of idsOf(slug)) {
|
|
28587
|
+
if (!id || map.has(id))
|
|
28588
|
+
continue;
|
|
28589
|
+
map.set(id, uniqueId2(id, used));
|
|
28590
|
+
}
|
|
28591
|
+
out.set(slug, map);
|
|
28592
|
+
}
|
|
28593
|
+
return out;
|
|
28594
|
+
}
|
|
28595
|
+
function bookTarget(plan, ids, slug, fragment = "") {
|
|
28596
|
+
const anchor = plan.topicAnchors.get(slug);
|
|
28597
|
+
if (anchor === void 0)
|
|
28598
|
+
return void 0;
|
|
28599
|
+
const frag = safeDecode2(fragment.replace(/^#/, ""));
|
|
28600
|
+
const id = frag ? ids.get(slug)?.get(frag) : void 0;
|
|
28601
|
+
return `#${id ?? anchor}`;
|
|
28602
|
+
}
|
|
28603
|
+
function bookHref(bookRoute, anchor) {
|
|
28604
|
+
return anchor ? `${bookRoute}#${anchor}` : bookRoute;
|
|
28605
|
+
}
|
|
28606
|
+
function landingBody(tree, idOf2) {
|
|
28607
|
+
let dropped = "";
|
|
28608
|
+
if (tree[0]?.type === "heading" && (tree[0].props?.level ?? 1) === 1) {
|
|
28609
|
+
dropped = idOf2(tree[0]);
|
|
28610
|
+
tree.shift();
|
|
28611
|
+
}
|
|
28612
|
+
const demote = (ns) => {
|
|
28613
|
+
for (const n of ns) {
|
|
28614
|
+
if (n.type === "heading" && (n.props?.level ?? 1) === 1)
|
|
28615
|
+
n.props = { ...n.props ?? {}, level: 2 };
|
|
28616
|
+
if (n.children)
|
|
28617
|
+
demote(n.children);
|
|
28618
|
+
}
|
|
28619
|
+
};
|
|
28620
|
+
demote(tree);
|
|
28621
|
+
return dropped;
|
|
28622
|
+
}
|
|
28623
|
+
function shiftHeadings(tree, offset) {
|
|
28624
|
+
if (offset <= 0)
|
|
28625
|
+
return;
|
|
28626
|
+
for (const n of tree) {
|
|
28627
|
+
if (n.type === "heading") {
|
|
28628
|
+
const lvl = n.props?.level ?? 1;
|
|
28629
|
+
if (!n.props)
|
|
28630
|
+
n.props = {};
|
|
28631
|
+
n.props.level = Math.min(lvl + offset, 6);
|
|
28632
|
+
}
|
|
28633
|
+
if (n.children)
|
|
28634
|
+
shiftHeadings(n.children, offset);
|
|
28635
|
+
}
|
|
28636
|
+
}
|
|
28637
|
+
function estimateTreeBytes(tree) {
|
|
28638
|
+
let bytes = 0;
|
|
28639
|
+
const walk = (nodes) => {
|
|
28640
|
+
for (const n of nodes) {
|
|
28641
|
+
if (typeof n.html === "string")
|
|
28642
|
+
bytes += n.html.length;
|
|
28643
|
+
if (n.props) {
|
|
28644
|
+
for (const v of Object.values(n.props))
|
|
28645
|
+
if (typeof v === "string")
|
|
28646
|
+
bytes += v.length;
|
|
28647
|
+
}
|
|
28648
|
+
if (Array.isArray(n.inline)) {
|
|
28649
|
+
for (const i of n.inline) {
|
|
28650
|
+
if (typeof i.text === "string")
|
|
28651
|
+
bytes += i.text.length;
|
|
28652
|
+
else if (typeof i.value === "string")
|
|
28653
|
+
bytes += i.value.length;
|
|
28654
|
+
}
|
|
28655
|
+
}
|
|
28656
|
+
if (n.children?.length)
|
|
28657
|
+
walk(n.children);
|
|
28658
|
+
}
|
|
28659
|
+
};
|
|
28660
|
+
walk(tree);
|
|
28661
|
+
return bytes;
|
|
28662
|
+
}
|
|
28663
|
+
function slugFromHref(href, hrefPrefix) {
|
|
28664
|
+
if (!href || href.startsWith("//") || isExternal3(href) && !href.startsWith("/"))
|
|
28665
|
+
return "";
|
|
28666
|
+
let s = href.split("#")[0].split("?")[0].trim();
|
|
28667
|
+
if (hrefPrefix && (s === hrefPrefix || s.startsWith(`${hrefPrefix}/`)))
|
|
28668
|
+
s = s.slice(hrefPrefix.length);
|
|
28669
|
+
return s.replace(/^\/+/, "").replace(/\/+$/, "");
|
|
28670
|
+
}
|
|
28671
|
+
function slugify2(text4) {
|
|
28672
|
+
return text4.toLowerCase().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "").trim() || "section";
|
|
28673
|
+
}
|
|
28674
|
+
function sharedFolder(slugs) {
|
|
28675
|
+
return commonPath(slugs.map((s) => s.split("/").slice(0, -1).join("/")));
|
|
28676
|
+
}
|
|
28677
|
+
function commonPath(slugs) {
|
|
28678
|
+
const parts = slugs.map((s) => s ? s.split("/") : []);
|
|
28679
|
+
if (!parts.length)
|
|
28680
|
+
return "";
|
|
28681
|
+
const first = parts[0];
|
|
28682
|
+
let i = 0;
|
|
28683
|
+
while (i < first.length && parts.every((p) => p[i] === first[i]))
|
|
28684
|
+
i++;
|
|
28685
|
+
return first.slice(0, i).join("/");
|
|
28686
|
+
}
|
|
28687
|
+
function uniqueId2(base, used) {
|
|
28688
|
+
let id = base;
|
|
28689
|
+
for (let n = 1; used.has(id); n++)
|
|
28690
|
+
id = `${base}-${n}`;
|
|
28691
|
+
used.add(id);
|
|
28692
|
+
return id;
|
|
28693
|
+
}
|
|
28694
|
+
function lastSegment(slug) {
|
|
28695
|
+
return slug.split("/").pop() ?? slug;
|
|
28696
|
+
}
|
|
28697
|
+
function isExternal3(href) {
|
|
28698
|
+
return !!href && /^(?:[a-z][a-z0-9+.-]*:|\/\/|\/)/i.test(href);
|
|
28699
|
+
}
|
|
28700
|
+
function safeDecode2(s) {
|
|
28701
|
+
try {
|
|
28702
|
+
return decodeURIComponent(s);
|
|
28703
|
+
} catch {
|
|
28704
|
+
return s;
|
|
28705
|
+
}
|
|
28706
|
+
}
|
|
28707
|
+
function escapeRe2(s) {
|
|
28708
|
+
return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
28709
|
+
}
|
|
28710
|
+
|
|
28711
|
+
// src/core/books.ts
|
|
28712
|
+
function bookNav(nodes) {
|
|
28713
|
+
return nodes.map((n) => ({
|
|
28714
|
+
label: n.label,
|
|
28715
|
+
...n.slug != null && !n.alias ? { href: `/${n.slug}` } : {},
|
|
28716
|
+
...n.singlePage ? { singlePage: n.singlePage } : {},
|
|
28717
|
+
...n.children.length ? { children: bookNav(n.children) } : {}
|
|
28718
|
+
}));
|
|
28719
|
+
}
|
|
28720
|
+
function asksForBooks(nodes) {
|
|
28721
|
+
return nodes.some((n) => n.singlePage !== void 0 || asksForBooks(n.children));
|
|
28722
|
+
}
|
|
28723
|
+
function unitBooks(nav, book, isPage) {
|
|
28724
|
+
if (!book && !asksForBooks(nav)) return [];
|
|
28725
|
+
return planBooks(bookNav(nav), { book, isPage });
|
|
28726
|
+
}
|
|
28727
|
+
function sectionHeading(level, label, anchor) {
|
|
28728
|
+
return { type: "heading", props: { level }, inline: [{ type: "text", text: label }], meta: { pageId: anchor } };
|
|
28729
|
+
}
|
|
28730
|
+
function bookIds(plan, parts) {
|
|
28731
|
+
const ownIds = new Map(parts.map((p) => [p.slug, [...p.own.values()].map((v) => v.id).filter(Boolean)]));
|
|
28732
|
+
const ids = bookHeadingIds(plan, (slug) => ownIds.get(slug) ?? []);
|
|
28733
|
+
for (const p of parts) {
|
|
28734
|
+
const map = ids.get(p.slug);
|
|
28735
|
+
for (const [node, { id }] of p.own) {
|
|
28736
|
+
const book = id ? map?.get(id) : void 0;
|
|
28737
|
+
if (!book) continue;
|
|
28738
|
+
const n = node;
|
|
28739
|
+
if (n.type === "heading") n.meta = { ...n.meta, pageId: book };
|
|
28740
|
+
else n.props = { ...n.props, id: book };
|
|
28741
|
+
}
|
|
28742
|
+
}
|
|
28743
|
+
return ids;
|
|
28744
|
+
}
|
|
28745
|
+
function overCap(bytes, maxSinglePageMB) {
|
|
28746
|
+
return bytes > Math.round(maxSinglePageMB * 1024 * 1024);
|
|
28747
|
+
}
|
|
28748
|
+
|
|
28320
28749
|
// src/core/nav-scope.ts
|
|
28321
28750
|
var HOME = "/";
|
|
28322
28751
|
var ALIAS = "";
|
|
@@ -28634,7 +29063,13 @@ async function preprocess(text4, path, attributes, files, undefinedRefs = "prese
|
|
|
28634
29063
|
if (out !== unmasked) map = composeTextMaps(map, diffTextMap(unmasked, out));
|
|
28635
29064
|
}
|
|
28636
29065
|
const printed = traced.variables?.length ? traced.variables : void 0;
|
|
28637
|
-
const
|
|
29066
|
+
const carried = printed && (traced.output === out ? printed : carryVariables(printed, traced.output, out, lineForLine(traced.output, out)));
|
|
29067
|
+
const variables = carried?.map((v) => {
|
|
29068
|
+
const d = v.definition;
|
|
29069
|
+
if (d.via !== "set" || d.file === void 0 || !loaded) return v;
|
|
29070
|
+
const got = loaded.get(d.file);
|
|
29071
|
+
return { ...v, definition: { ...d, file: got?.file ?? d.file, line: d.line + (got?.frontMatter ?? 0) } };
|
|
29072
|
+
});
|
|
28638
29073
|
return { text: out, ...warnings.length ? { warnings } : {}, ...map ? { map } : {}, ...variables?.length ? { variables } : {} };
|
|
28639
29074
|
} catch (err) {
|
|
28640
29075
|
if (budget && timeout < budget.renderMs && err instanceof RenderLimitError && budget.next() <= 0) return skip();
|
|
@@ -29257,6 +29692,9 @@ var EN = {
|
|
|
29257
29692
|
searchUnavailable: "{n} could not be searched",
|
|
29258
29693
|
searchHint: "Start typing to search...",
|
|
29259
29694
|
toc: "On this page",
|
|
29695
|
+
// Book views (plans/book-views.md), as the Astro layout words them
|
|
29696
|
+
readAsSinglePage: "Read as single page \u2192",
|
|
29697
|
+
openAsPage: "Open as page \u2197",
|
|
29260
29698
|
nav: "Documentation",
|
|
29261
29699
|
skip: "Skip to content",
|
|
29262
29700
|
prev: "Previous",
|
|
@@ -30069,6 +30507,14 @@ async function siteCssBuilder(input) {
|
|
|
30069
30507
|
}
|
|
30070
30508
|
var SITE_FILES = /* @__PURE__ */ new Set(["robots.txt", "sitemap-index.xml"]);
|
|
30071
30509
|
var SEARCH_PAGE = "search.html";
|
|
30510
|
+
function decodedFragment(f) {
|
|
30511
|
+
try {
|
|
30512
|
+
return decodeURIComponent(f);
|
|
30513
|
+
} catch {
|
|
30514
|
+
return f;
|
|
30515
|
+
}
|
|
30516
|
+
}
|
|
30517
|
+
var LAYOUT_IDS = ["db-content", "db-sidebar", "db-search", "db-search-results", "db-toc-title", "db-page-markdown"];
|
|
30072
30518
|
var generatedOut = (path, cfg) => outFileFor(path, true, cfg.linkStyle);
|
|
30073
30519
|
var MERGED_FILES = /* @__PURE__ */ new Set(["_headers", "_redirects"]);
|
|
30074
30520
|
function reporter(warnings, problems) {
|
|
@@ -30237,8 +30683,19 @@ function frontMatterCopy(fm) {
|
|
|
30237
30683
|
return void 0;
|
|
30238
30684
|
}
|
|
30239
30685
|
}
|
|
30240
|
-
function rebuildUnitLazy(ctx, unit) {
|
|
30241
|
-
|
|
30686
|
+
async function rebuildUnitLazy(ctx, unit) {
|
|
30687
|
+
const { state, cfg } = ctx;
|
|
30688
|
+
const mine = new Set(state.unitRedirects?.get(unit.prefix) ?? []);
|
|
30689
|
+
state.redirects = state.redirects.filter((r) => !mine.has(r));
|
|
30690
|
+
for (const key2 of [...state.pageOut.keys()]) if (unitOfPath(ctx.allUnits, key2) === unit) state.pageOut.delete(key2);
|
|
30691
|
+
const start = state.redirects.length;
|
|
30692
|
+
const handle = await buildUnit(unit, ctx.allUnits, cfg, ctx.input, ctx.highlighter, ctx.emit, ctx.report, ctx.phase, ctx.theme.templates, state, { lazy: true, diagnostics: ctx.diagnostics, dataLines: ctx.dataLines });
|
|
30693
|
+
(state.unitRedirects ??= /* @__PURE__ */ new Map()).set(unit.prefix, state.redirects.slice(start));
|
|
30694
|
+
const inUnit = state.redirects.filter((r) => unitOfPath(ctx.allUnits, r.from) === unit);
|
|
30695
|
+
const { rules, warnings } = collectRedirects(inUnit, (p) => state.pageOut.get(p) ?? state.homeForward.get(p), () => true);
|
|
30696
|
+
for (const m of warnings) ctx.report("redirects", `[redirects] ${m}`);
|
|
30697
|
+
for (const r of rules) await ctx.emit(stubFile(r, cfg.linkStyle), renderRedirectPage(r, cfg));
|
|
30698
|
+
return handle;
|
|
30242
30699
|
}
|
|
30243
30700
|
async function build(input, hooks = {}) {
|
|
30244
30701
|
if (!input.clock) return buildWith(input, hooks);
|
|
@@ -30347,6 +30804,7 @@ async function buildWith(input, hooks) {
|
|
|
30347
30804
|
unitRecords.set(unit.prefix, { pageOut: [...state.pageOut].slice(before.pageOut), files: [...state.written].slice(before.written), iconSets: input.icons?.sets?.() ?? [] });
|
|
30348
30805
|
}
|
|
30349
30806
|
state.redirects = [...state.redirects.slice(0, configRedirects), ...allUnits.flatMap((u) => unitRedirects.get(u.prefix) ?? [])];
|
|
30807
|
+
state.unitRedirects = unitRedirects;
|
|
30350
30808
|
await emit(`_dogsbay/assets/${CLIENT_FILE}`, CLIENT_JS);
|
|
30351
30809
|
await emit("_dogsbay/assets/dogsbay.js", CLIENT_JS);
|
|
30352
30810
|
const storedUnits = [...stored.values()];
|
|
@@ -30790,6 +31248,7 @@ async function buildUnit(unit, allUnits, cfg, input, highlighter, emit, report,
|
|
|
30790
31248
|
const where = (i) => i.virtual ? `${i.virtual.project} (${i.slug || "/"})` : i.source;
|
|
30791
31249
|
const srcOf = (i) => i.virtual?.project ?? abs(i.source);
|
|
30792
31250
|
const rel = (p) => unit.members.length > 1 ? memberPath(unit, p)?.path : p.startsWith(root) ? p.slice(root.length) : void 0;
|
|
31251
|
+
const rels = (p) => unit.members.length > 1 ? memberPaths(unit, p).map((x) => x.path) : p.startsWith(root) ? [p.slice(root.length)] : [];
|
|
30793
31252
|
const named = unit.members.filter((m) => m.namespace && m.source.from !== "openapi");
|
|
30794
31253
|
const memberRel = (p) => {
|
|
30795
31254
|
const ns = named.length ? namespaceOf(p) : "";
|
|
@@ -30826,17 +31285,21 @@ async function buildUnit(unit, allUnits, cfg, input, highlighter, emit, report,
|
|
|
30826
31285
|
} else {
|
|
30827
31286
|
const from = viewFrom;
|
|
30828
31287
|
const shadowed = [];
|
|
31288
|
+
let sharedWithMain = 0;
|
|
30829
31289
|
for (const [k, v] of input.files) {
|
|
30830
|
-
const
|
|
30831
|
-
if (!
|
|
30832
|
-
const
|
|
30833
|
-
|
|
30834
|
-
|
|
30835
|
-
|
|
31290
|
+
const held = memberPaths(unit, k);
|
|
31291
|
+
if (held.length > 1 && held.some((h) => !h.member.namespace && !h.member.mount)) sharedWithMain++;
|
|
31292
|
+
for (const at of held) {
|
|
31293
|
+
const had = from.get(at.path);
|
|
31294
|
+
if (!at.member.namespace && named.some((m) => at.path.startsWith(m.namespace + "/"))) {
|
|
31295
|
+
shadowed.push(k);
|
|
31296
|
+
if (had !== void 0) continue;
|
|
31297
|
+
}
|
|
31298
|
+
from.set(at.path, k);
|
|
31299
|
+
files.set(at.path, v);
|
|
30836
31300
|
}
|
|
30837
|
-
from.set(at.path, k);
|
|
30838
|
-
files.set(at.path, v);
|
|
30839
31301
|
}
|
|
31302
|
+
if (sharedWithMain) warn("sources", `${sharedWithMain} file(s) are in the folder of an unnamed source and a named one, so each is published twice, at its own URL and under the name; give both sources a name for variants, or each its own folder`);
|
|
30840
31303
|
if (shadowed.length) warn("sources", `${shadowed.length} file(s) of the main source are in a folder named like a source's namespace, which is that source's: ${shadowed.slice(0, 5).join(", ")}${shadowed.length > 5 ? ", \u2026" : ""}`);
|
|
30841
31304
|
}
|
|
30842
31305
|
const cache = new TextCache(input.textCacheChars ?? 8e6);
|
|
@@ -30899,12 +31362,13 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30899
31362
|
const topicMaps = /* @__PURE__ */ new Map();
|
|
30900
31363
|
for (const m of unit.members) {
|
|
30901
31364
|
const path = m.source.nav;
|
|
30902
|
-
if (!path || !TOPIC_MAP.test(path) || topicMaps.has(
|
|
31365
|
+
if (!path || !TOPIC_MAP.test(path) || topicMaps.has(m.source)) continue;
|
|
30903
31366
|
const variables = withUnderscoreAliases2({ ...cfg.attributes, ...m.source.attributes ?? {} });
|
|
30904
31367
|
const key2 = state.scan ? JSON.stringify([sourceRoot(m.source), variables]) : "";
|
|
30905
|
-
const
|
|
31368
|
+
const cacheAt = `${path}\0${m.namespace}`;
|
|
31369
|
+
const kept = state.scan?.topicMap(cacheAt, key2, input.files);
|
|
30906
31370
|
if (kept) {
|
|
30907
|
-
topicMaps.set(
|
|
31371
|
+
topicMaps.set(m.source, kept);
|
|
30908
31372
|
continue;
|
|
30909
31373
|
}
|
|
30910
31374
|
const { topicMapError, topicMapNav } = await import("./topicmap-IGUURUBF.mjs");
|
|
@@ -30916,8 +31380,8 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30916
31380
|
};
|
|
30917
31381
|
const got = await topicMapNav(path, sourceRoot(m.source), projectText, variables);
|
|
30918
31382
|
if (got.errors.length) throw topicMapError(path, got.errors);
|
|
30919
|
-
state.scan?.keepTopicMap(
|
|
30920
|
-
topicMaps.set(
|
|
31383
|
+
state.scan?.keepTopicMap(cacheAt, key2, reads, got);
|
|
31384
|
+
topicMaps.set(m.source, got);
|
|
30921
31385
|
}
|
|
30922
31386
|
const navInputs = /* @__PURE__ */ new Set([...unit.members.flatMap((m) => m.source.nav ? [m.source.nav] : []), ...[...topicMaps.values()].flatMap((t2) => t2.maps)]);
|
|
30923
31387
|
const themeDir = cfg.themeDir ? cfg.themeDir.replace(/^\.\//, "").replace(/\/+$/, "") + "/" : void 0;
|
|
@@ -31211,7 +31675,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31211
31675
|
const ownNav = async (src, ns) => {
|
|
31212
31676
|
const path = src.nav;
|
|
31213
31677
|
const nsLabel = (slug) => labelFor(ns ? prefixSlug([ns], slug) : slug);
|
|
31214
|
-
const map = topicMaps.get(
|
|
31678
|
+
const map = topicMaps.get(src);
|
|
31215
31679
|
if (map) return { nav: prefixNav(parseNavJson(JSON.stringify(map.entries), nsLabel), ns), file: path, project: path, files: map.maps };
|
|
31216
31680
|
const c = input.files.get(path);
|
|
31217
31681
|
const text4 = c == null ? void 0 : await readText(c);
|
|
@@ -31359,6 +31823,22 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31359
31823
|
return all;
|
|
31360
31824
|
};
|
|
31361
31825
|
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 }) };
|
|
31826
|
+
const books = [];
|
|
31827
|
+
const bookOf = /* @__PURE__ */ new Map();
|
|
31828
|
+
for (const plan of unitBooks(drawn2, cfg.granularity.book, (s) => infos.has(s) && !isUnlisted(s) && s !== replaced)) {
|
|
31829
|
+
let bytes = 0;
|
|
31830
|
+
for (const slug of plan.members) {
|
|
31831
|
+
const i = infos.get(slug);
|
|
31832
|
+
bytes += i.virtual ? estimateTreeBytes(i.virtual.tree) : (await read(i.source))?.length ?? 0;
|
|
31833
|
+
}
|
|
31834
|
+
if (overCap(bytes, cfg.granularity.maxSinglePageMB)) {
|
|
31835
|
+
warn("book", `skipping single-page "${plan.label}": ~${(bytes / 1048576).toFixed(1)} MB exceeds maxSinglePageMB (${cfg.granularity.maxSinglePageMB}). Mark it "single-page: children" in the nav to split it into chapters.`, navFileAt());
|
|
31836
|
+
continue;
|
|
31837
|
+
}
|
|
31838
|
+
const out = outFileFor(plan.slug, false, cfg.linkStyle);
|
|
31839
|
+
books.push({ plan, out });
|
|
31840
|
+
for (const [slug, anchor] of plan.topicAnchors) bookOf.set(slug, { out, anchor });
|
|
31841
|
+
}
|
|
31362
31842
|
const readingOrder = (listedIndex?.order ?? order2).filter((s) => infos.has(s) && !isUnlisted(s));
|
|
31363
31843
|
const clientNav = cfg.navMode === "client";
|
|
31364
31844
|
const fullNav = cfg.navMode === "ssr-full" ? true : cfg.navMode === "client" || cfg.navMode === "hybrid" ? false : navSize(drawn2) <= (input.fullNavLimit ?? cfg.fullNavLimit);
|
|
@@ -31580,7 +32060,12 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31580
32060
|
t2 = now();
|
|
31581
32061
|
let tree;
|
|
31582
32062
|
let parsedOk = true;
|
|
31583
|
-
const
|
|
32063
|
+
const inMember = scoped(info.source);
|
|
32064
|
+
const printed = mode.dataLines && "variables" in pre && pre.variables ? pre.variables.map((v, index) => {
|
|
32065
|
+
const d = v.definition;
|
|
32066
|
+
const definition = d.via !== "set" ? d : d.file !== void 0 ? { ...d, file: abs(inMember ? inMember(d.file) : d.file) } : { ...d, line: d.line + fmLines };
|
|
32067
|
+
return { ...v, index, definition };
|
|
32068
|
+
}) : void 0;
|
|
31584
32069
|
try {
|
|
31585
32070
|
const parsed = trees ? { tree: await trees.tree(info.source, pre.text), diagnostics: void 0 } : dogsbayMdToTree(pre.text, mode.diagnostics || mode.dataLines ? { ...mode.diagnostics ? { diagnostics: true } : {}, ...mode.dataLines ? { sourceLines: true, sourceMap: map, ...printed ? { variablePlaces: printed } : {} } : {} } : void 0);
|
|
31586
32071
|
tree = parsed.tree;
|
|
@@ -31715,6 +32200,35 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31715
32200
|
});
|
|
31716
32201
|
}
|
|
31717
32202
|
};
|
|
32203
|
+
const childLinksIn = (tree, info, from, report2) => {
|
|
32204
|
+
const own2 = isUnlisted(info.slug);
|
|
32205
|
+
const dirs = own2 ? childLinkAllDirs ??= directoryChildren([...infos.values()], (slug) => `/${slug}`) : childLinkDirs ??= directoryChildren([...infos.values()].filter((i) => !isUnlisted(i.slug)), (slug) => `/${slug}`);
|
|
32206
|
+
const items3 = own2 ? childLinkAllItems ??= childLinkNav(nav) : childLinkItems ??= childLinkNav(drawn2);
|
|
32207
|
+
const unitPrefix = unit.prefix ? `${unit.prefix.replace(/^\/+|\/+$/g, "")}/` : "";
|
|
32208
|
+
const r = realizeChildLinks(tree, {
|
|
32209
|
+
nav: items3,
|
|
32210
|
+
pageHref: `/${info.slug}`,
|
|
32211
|
+
folderHref: (folder) => {
|
|
32212
|
+
const f = folder.replace(/^\/+/, "");
|
|
32213
|
+
return `/${unitPrefix && (f + "/").startsWith(unitPrefix) ? f.slice(unitPrefix.length) : f}`;
|
|
32214
|
+
},
|
|
32215
|
+
fallbackChildren: dirs,
|
|
32216
|
+
lookup: (href) => {
|
|
32217
|
+
const p = infos.get(navKey(href).replace(/^\//, ""));
|
|
32218
|
+
if (!p || !own2 && isUnlisted(p.slug)) return void 0;
|
|
32219
|
+
const tags = p.data?.tags;
|
|
32220
|
+
const stub = aliasOf(href);
|
|
32221
|
+
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 };
|
|
32222
|
+
},
|
|
32223
|
+
// Page-relative, as every link here (a file:// build must work).
|
|
32224
|
+
outputHref: (href) => {
|
|
32225
|
+
const ref = pageRefs.get(navKey(href).replace(/^\//, ""));
|
|
32226
|
+
const hash = href.indexOf("#");
|
|
32227
|
+
return ref ? hrefBetween(from, ref.out, cfg.linkStyle) + (hash >= 0 ? href.slice(hash) : "") : href;
|
|
32228
|
+
}
|
|
32229
|
+
});
|
|
32230
|
+
if (report2) for (const e of r.empty) warnPage(info, "child-links", `child-links found no child pages under ${e}`);
|
|
32231
|
+
};
|
|
31718
32232
|
const renderPage = async (info, prepared) => {
|
|
31719
32233
|
const isReplaced = replaced != null && info.slug === replaced;
|
|
31720
32234
|
if (isReplaced && !input.onPageBuilt) return;
|
|
@@ -31723,35 +32237,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31723
32237
|
mode.diagnostics?.(srcOf(info), got.diagnostics ?? []);
|
|
31724
32238
|
const { raw, fm, bodySrc, pre, markdown: markdown2, full } = got;
|
|
31725
32239
|
let tree = got.tree;
|
|
31726
|
-
if (hasChildLinks(tree))
|
|
31727
|
-
const own2 = isUnlisted(info.slug);
|
|
31728
|
-
const dirs = own2 ? childLinkAllDirs ??= directoryChildren([...infos.values()], (slug) => `/${slug}`) : childLinkDirs ??= directoryChildren([...infos.values()].filter((i) => !isUnlisted(i.slug)), (slug) => `/${slug}`);
|
|
31729
|
-
const items3 = own2 ? childLinkAllItems ??= childLinkNav(nav) : childLinkItems ??= childLinkNav(drawn2);
|
|
31730
|
-
const unitPrefix = unit.prefix ? `${unit.prefix.replace(/^\/+|\/+$/g, "")}/` : "";
|
|
31731
|
-
const r = realizeChildLinks(tree, {
|
|
31732
|
-
nav: items3,
|
|
31733
|
-
pageHref: `/${info.slug}`,
|
|
31734
|
-
folderHref: (folder) => {
|
|
31735
|
-
const f = folder.replace(/^\/+/, "");
|
|
31736
|
-
return `/${unitPrefix && (f + "/").startsWith(unitPrefix) ? f.slice(unitPrefix.length) : f}`;
|
|
31737
|
-
},
|
|
31738
|
-
fallbackChildren: dirs,
|
|
31739
|
-
lookup: (href) => {
|
|
31740
|
-
const p = infos.get(navKey(href).replace(/^\//, ""));
|
|
31741
|
-
if (!p || !own2 && isUnlisted(p.slug)) return void 0;
|
|
31742
|
-
const tags = p.data?.tags;
|
|
31743
|
-
const stub = aliasOf(href);
|
|
31744
|
-
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 };
|
|
31745
|
-
},
|
|
31746
|
-
// Page-relative, as every link here (a file:// build must work).
|
|
31747
|
-
outputHref: (href) => {
|
|
31748
|
-
const ref = pageRefs.get(navKey(href).replace(/^\//, ""));
|
|
31749
|
-
const hash = href.indexOf("#");
|
|
31750
|
-
return ref ? hrefBetween(info.out, ref.out, cfg.linkStyle) + (hash >= 0 ? href.slice(hash) : "") : href;
|
|
31751
|
-
}
|
|
31752
|
-
});
|
|
31753
|
-
for (const e of r.empty) warnPage(info, "child-links", `child-links found no child pages under ${e}`);
|
|
31754
|
-
}
|
|
32240
|
+
if (hasChildLinks(tree)) childLinksIn(tree, info, info.out, true);
|
|
31755
32241
|
if (diagrams && !isReplaced) {
|
|
31756
32242
|
t = now();
|
|
31757
32243
|
await diagrams.ensure(diagramSources(tree).map(detach), info.source, diagramWarn);
|
|
@@ -31771,7 +32257,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31771
32257
|
asset: resolver.asset,
|
|
31772
32258
|
highlighter: pageHighlighter,
|
|
31773
32259
|
// The layout's own ids, outside the rendered content: generated ids avoid them
|
|
31774
|
-
reservedIds:
|
|
32260
|
+
reservedIds: LAYOUT_IDS,
|
|
31775
32261
|
t: t_,
|
|
31776
32262
|
math,
|
|
31777
32263
|
diagram: diagrams ? pageDiagrams(diagrams) : void 0,
|
|
@@ -31805,6 +32291,9 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31805
32291
|
const pageTrail = hidden ? trail : listedTrail;
|
|
31806
32292
|
const navNode = pageTrail.get(info.slug)?.at(-1);
|
|
31807
32293
|
if (navNode?.children.length && !hasProse(tree)) body += childLinks2(navNode.children, (s) => pageRefs.get(s), info.out, cfg.linkStyle, infos);
|
|
32294
|
+
const inBook = bookOf.get(info.slug);
|
|
32295
|
+
if (inBook) body = `<a class="dsb-read-single-page not-prose" href="${esc(bookHref(hrefBetween(info.out, inBook.out, cfg.linkStyle), inBook.anchor))}">${esc(t_("readAsSinglePage"))}</a>
|
|
32296
|
+
${body}`;
|
|
31808
32297
|
const layoutName = str7(fm.layout) ?? (post ? "blank" : cfg.layout);
|
|
31809
32298
|
const tocMode = fm.toc === false ? "off" : ["top", "popover", "rail", "off"].includes(fm.toc) ? fm.toc : cfg.toc;
|
|
31810
32299
|
for (const u of ctx.unknown) if (!(DATA_DIRECTIVE_NODES.has(u) && dataUnresolved.has(info.source))) warnPage(info, "unsupported-node", `unsupported node "${u}" rendered as a plain container`);
|
|
@@ -31949,6 +32438,147 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31949
32438
|
phase.layout = (phase.layout ?? 0) + now() - t;
|
|
31950
32439
|
input.onPage?.(++done, total, label);
|
|
31951
32440
|
};
|
|
32441
|
+
const renderBook = async (b) => {
|
|
32442
|
+
const { plan, out } = b;
|
|
32443
|
+
const parts = [];
|
|
32444
|
+
const tops = /* @__PURE__ */ new Map();
|
|
32445
|
+
for (const e of plan.entries) {
|
|
32446
|
+
const info = e.slug ? infos.get(e.slug) : void 0;
|
|
32447
|
+
let tree = [];
|
|
32448
|
+
let own2 = /* @__PURE__ */ new Map();
|
|
32449
|
+
if (info) {
|
|
32450
|
+
const got = await prepare(info);
|
|
32451
|
+
tree = structuredClone(got.tree);
|
|
32452
|
+
if (sanitizing) tree = sanitizeTree(tree, () => {
|
|
32453
|
+
});
|
|
32454
|
+
if (hasChildLinks(tree)) childLinksIn(tree, info, out, false);
|
|
32455
|
+
own2 = headingIds(tree, { reserved: LAYOUT_IDS });
|
|
32456
|
+
if (e.landing) {
|
|
32457
|
+
const top = landingBody(tree, (h) => own2.get(h)?.id ?? "");
|
|
32458
|
+
if (top) tops.set(e.slug, top);
|
|
32459
|
+
}
|
|
32460
|
+
shiftHeadings(tree, e.level - 1);
|
|
32461
|
+
}
|
|
32462
|
+
parts.push({ slug: e.slug, level: e.level, label: e.label, anchor: e.anchor, landing: e.landing === true, info, tree, own: own2 });
|
|
32463
|
+
}
|
|
32464
|
+
const ids = bookIds(plan, parts.filter((p) => p.info));
|
|
32465
|
+
for (const [slug, top] of tops) ids.get(slug)?.set(top, "");
|
|
32466
|
+
for (const p of parts) {
|
|
32467
|
+
if (!p.info) continue;
|
|
32468
|
+
if (diagrams) await diagrams.ensure(diagramSources(p.tree).map(detach), p.info.source, diagramWarn);
|
|
32469
|
+
if (cfg.math && !math && mayHaveMath(p.tree)) math = await loadMath();
|
|
32470
|
+
if (!input.highlightPool || codeRequests(p.tree, !!diagrams).some((r) => !pageHighlighter.has(r.code, r.lang, r.opts))) await highlighter.load?.(highlightInputs(p.tree));
|
|
32471
|
+
}
|
|
32472
|
+
let current = createResolver(table2, { source: "", out });
|
|
32473
|
+
let from = "";
|
|
32474
|
+
const ctx = createRenderContext({
|
|
32475
|
+
// A fragment of the page being drawn: its id on the book; any other link through that page's resolver.
|
|
32476
|
+
link: (href) => {
|
|
32477
|
+
if (href.startsWith("#")) {
|
|
32478
|
+
const id = ids.get(from)?.get(decodedFragment(href.slice(1)));
|
|
32479
|
+
return id === void 0 ? href : `#${id}`;
|
|
32480
|
+
}
|
|
32481
|
+
return current.link(href);
|
|
32482
|
+
},
|
|
32483
|
+
asset: (src) => current.asset(src),
|
|
32484
|
+
highlighter: pageHighlighter,
|
|
32485
|
+
reservedIds: LAYOUT_IDS,
|
|
32486
|
+
t: t_,
|
|
32487
|
+
math,
|
|
32488
|
+
diagram: diagrams ? pageDiagrams(diagrams) : void 0,
|
|
32489
|
+
icons: input.icons,
|
|
32490
|
+
codeBlockTitle: cfg.codeBlockTitle,
|
|
32491
|
+
imageZoom: cfg.imageZoom ? cfg.imageZoom.excludeInsideLinks ? "outside-links" : "all" : void 0,
|
|
32492
|
+
imageCaptions: cfg.imageCaptions,
|
|
32493
|
+
rawHtml: sanitizing ? (h) => sanitizeHtml(h, () => {
|
|
32494
|
+
}) : void 0
|
|
32495
|
+
});
|
|
32496
|
+
renderBlocks([], ctx);
|
|
32497
|
+
let body = "";
|
|
32498
|
+
for (const p of parts) {
|
|
32499
|
+
if (!p.landing) body += renderBlocks([sectionHeading(p.level, p.label, p.anchor)], ctx);
|
|
32500
|
+
if (!p.info) continue;
|
|
32501
|
+
const pageOut = p.info.out;
|
|
32502
|
+
body += `<p class="dsb-open-as-page not-prose"><a href="${esc(hrefBetween(out, pageOut, cfg.linkStyle))}">${esc(t_("openAsPage"))}</a></p>
|
|
32503
|
+
`;
|
|
32504
|
+
from = p.slug;
|
|
32505
|
+
current = createResolver(table2, { source: p.info.source, out }, {
|
|
32506
|
+
pageLink: (ref, suffix) => {
|
|
32507
|
+
const hash = suffix.indexOf("#");
|
|
32508
|
+
return bookTarget(plan, ids, ref.slug, hash < 0 ? "" : suffix.slice(hash));
|
|
32509
|
+
}
|
|
32510
|
+
});
|
|
32511
|
+
body += renderBlocks(p.tree, ctx);
|
|
32512
|
+
p.tree = [];
|
|
32513
|
+
p.own = /* @__PURE__ */ new Map();
|
|
32514
|
+
}
|
|
32515
|
+
if (ctx.usedMath) {
|
|
32516
|
+
state.usedMath = true;
|
|
32517
|
+
state.mathUnits.add(unit.prefix);
|
|
32518
|
+
}
|
|
32519
|
+
const hrefTo = (slug) => {
|
|
32520
|
+
const o = pageRefs.get(slug)?.out ?? staticNav.get(slug);
|
|
32521
|
+
return o !== void 0 ? hrefBetween(out, o, cfg.linkStyle) : void 0;
|
|
32522
|
+
};
|
|
32523
|
+
const landing = plan.entries.find((e) => e.landing)?.slug;
|
|
32524
|
+
const chain = (landing !== void 0 ? listedTrail.get(landing) : void 0) ?? [];
|
|
32525
|
+
const unitRoot = rootPrefix(out);
|
|
32526
|
+
const siteRoot = unitRoot + siteDepthPrefix;
|
|
32527
|
+
const homeHref = hrefBetween(out, "index.html", cfg.linkStyle);
|
|
32528
|
+
const { order: _walk, ...side } = sidebarOf(void 0, chain, out, hrefTo, homeHref);
|
|
32529
|
+
const html = await composePage(
|
|
32530
|
+
{
|
|
32531
|
+
layout: cfg.layout,
|
|
32532
|
+
searchPage: searchPageOut && hrefBetween(out, searchPageOut, cfg.linkStyle),
|
|
32533
|
+
title: plan.label,
|
|
32534
|
+
body,
|
|
32535
|
+
hasH1: false,
|
|
32536
|
+
// The landing page's, else its first page's opening text (a page with none fails check's seo/dist-meta)
|
|
32537
|
+
description: (() => {
|
|
32538
|
+
const first = parts.find((p) => p.info);
|
|
32539
|
+
return (first?.landing ? first.info.description : void 0) ?? (first ? metaExcerpt(first.tree) : void 0);
|
|
32540
|
+
})(),
|
|
32541
|
+
tags: [],
|
|
32542
|
+
lang,
|
|
32543
|
+
dir,
|
|
32544
|
+
out,
|
|
32545
|
+
slug: plan.slug,
|
|
32546
|
+
prefix: unit.prefix,
|
|
32547
|
+
unitRoot,
|
|
32548
|
+
siteRoot,
|
|
32549
|
+
homeHref,
|
|
32550
|
+
headings: ctx.headings,
|
|
32551
|
+
toc: cfg.toc,
|
|
32552
|
+
...side,
|
|
32553
|
+
breadcrumb: [{ label: t_("home"), href: homeHref }, ...chain.map((n) => ({ label: n.label, href: n.slug != null ? hrefTo(n.slug) : void 0 }))].filter((c, i, a) => !(i > 0 && c.href === homeHref && a[0].href === homeHref)),
|
|
32554
|
+
products: productOptions(unit, cfg, siteRoot, t_),
|
|
32555
|
+
versions: switchOptions("version", unit, allUnits, cfg, out, siteRoot, t_),
|
|
32556
|
+
locales: switchOptions("locale", unit, allUnits, cfg, out, siteRoot, t_),
|
|
32557
|
+
banner: versionBanner(unit, allUnits, cfg, out, siteRoot, t_),
|
|
32558
|
+
absoluteUrl: absoluteUrl(cfg, unit.prefix, servedPath(out, cfg.linkStyle)),
|
|
32559
|
+
wide: false,
|
|
32560
|
+
meta: {},
|
|
32561
|
+
math: ctx.usedMath === true,
|
|
32562
|
+
logo: state.logo,
|
|
32563
|
+
seo: {
|
|
32564
|
+
url: absoluteUrl(cfg, unit.prefix, servedPath(out, cfg.linkStyle)),
|
|
32565
|
+
home: false,
|
|
32566
|
+
alternates: [],
|
|
32567
|
+
image: cfg.ogImage,
|
|
32568
|
+
noindex: true,
|
|
32569
|
+
nofollow: cfg.nofollow,
|
|
32570
|
+
twitterHandle: cfg.twitterHandle,
|
|
32571
|
+
themeColor: cfg.themeColor,
|
|
32572
|
+
llmsHref: cfg.llmsTxt ? `${unitRoot}llms.txt` : void 0,
|
|
32573
|
+
plausible: cfg.plausible
|
|
32574
|
+
},
|
|
32575
|
+
t: t_
|
|
32576
|
+
},
|
|
32577
|
+
cfg,
|
|
32578
|
+
templates
|
|
32579
|
+
);
|
|
32580
|
+
await emit(prefix + out, cfg.search && cfg.searchEngine !== "builtin" ? pagefindMarkup(html, { exclude: true }) : html);
|
|
32581
|
+
};
|
|
31952
32582
|
if (mode.lazy) {
|
|
31953
32583
|
for (const info of infos.values()) {
|
|
31954
32584
|
if (replaced != null && info.slug === replaced) continue;
|
|
@@ -31960,6 +32590,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31960
32590
|
} else {
|
|
31961
32591
|
for (const info of infos.values()) await renderPage(info);
|
|
31962
32592
|
}
|
|
32593
|
+
if (!mode.lazy) for (const b of books) await renderBook(b);
|
|
31963
32594
|
if (trees) {
|
|
31964
32595
|
await trees.flush();
|
|
31965
32596
|
const st = state.treeStats ??= { hits: 0, misses: 0, groupsRead: 0, groupsWritten: 0 };
|
|
@@ -32067,14 +32698,27 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
32067
32698
|
state.sitemaps.set(unit.prefix, maps);
|
|
32068
32699
|
}
|
|
32069
32700
|
phase.emit = (phase.emit ?? 0) + now() - t;
|
|
32070
|
-
const bySource =
|
|
32701
|
+
const bySource = /* @__PURE__ */ new Map();
|
|
32702
|
+
for (const i of infos.values()) if (!i.virtual) bySource.set(abs(i.source), [...bySource.get(abs(i.source)) ?? [], i]);
|
|
32703
|
+
const sourcePages = () => [...bySource.values()].flat();
|
|
32071
32704
|
const byOut = new Map([...infos.values()].filter((i) => i.slug !== replaced).map((i) => [prefix + i.out, i]));
|
|
32705
|
+
const bookByOut = new Map(books.map((b) => [prefix + b.out, b]));
|
|
32706
|
+
const booksOfPage = /* @__PURE__ */ new Map();
|
|
32707
|
+
for (const b of books) for (const slug of b.plan.members) {
|
|
32708
|
+
const o = prefix + infos.get(slug).out;
|
|
32709
|
+
booksOfPage.set(o, [...booksOfPage.get(o) ?? [], prefix + b.out]);
|
|
32710
|
+
}
|
|
32072
32711
|
return {
|
|
32073
32712
|
pages: infos.size,
|
|
32074
32713
|
assets: assetPaths.size,
|
|
32075
|
-
pageOuts: [...byOut.keys()],
|
|
32714
|
+
pageOuts: [...byOut.keys(), ...bookByOut.keys()],
|
|
32076
32715
|
navInputs: [...navInputs],
|
|
32077
32716
|
async render(out) {
|
|
32717
|
+
const book = bookByOut.get(out);
|
|
32718
|
+
if (book) {
|
|
32719
|
+
await renderBook(book);
|
|
32720
|
+
return true;
|
|
32721
|
+
}
|
|
32078
32722
|
const info = byOut.get(out);
|
|
32079
32723
|
if (!info) return false;
|
|
32080
32724
|
const before = new Map(brokenCounts);
|
|
@@ -32083,26 +32727,30 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
32083
32727
|
if (broken.length) warnPage(info, "link", `unresolved link target(s): ${broken.slice(0, 10).join(", ")}`);
|
|
32084
32728
|
return true;
|
|
32085
32729
|
},
|
|
32730
|
+
booksOf(out) {
|
|
32731
|
+
return booksOfPage.get(out) ?? [];
|
|
32732
|
+
},
|
|
32086
32733
|
sameFrontMatter(source, text4) {
|
|
32087
32734
|
return bySource.has(source) && frontMatter.get(rel(source) ?? "") === fmKey(text4);
|
|
32088
32735
|
},
|
|
32089
32736
|
pageForSource(source) {
|
|
32090
|
-
const info = bySource.get(source);
|
|
32091
|
-
return info
|
|
32737
|
+
const info = bySource.get(source)?.find((i) => i.slug !== replaced);
|
|
32738
|
+
return info ? prefix + info.out : void 0;
|
|
32739
|
+
},
|
|
32740
|
+
pagesForSource(source) {
|
|
32741
|
+
return (bySource.get(source) ?? []).filter((i) => i.slug !== replaced).map((i) => prefix + i.out);
|
|
32092
32742
|
},
|
|
32093
32743
|
sourceForPage(out) {
|
|
32094
32744
|
const info = byOut.get(out);
|
|
32095
32745
|
return info ? srcOf(info) : void 0;
|
|
32096
32746
|
},
|
|
32097
32747
|
forget(path) {
|
|
32098
|
-
const r
|
|
32099
|
-
if (r !== void 0) cache.delete(r);
|
|
32748
|
+
for (const r of rels(path)) cache.delete(r);
|
|
32100
32749
|
templatesBy = /* @__PURE__ */ new Map();
|
|
32101
32750
|
hashes.delete(path);
|
|
32102
32751
|
},
|
|
32103
32752
|
included(path) {
|
|
32104
|
-
|
|
32105
|
-
return r !== void 0 && includedPaths.has(r) || includedProject.has(path);
|
|
32753
|
+
return rels(path).some((r) => includedPaths.has(r)) || includedProject.has(path);
|
|
32106
32754
|
},
|
|
32107
32755
|
includeReaders(path) {
|
|
32108
32756
|
if (titleReads.has(path) || templateTitles) return void 0;
|
|
@@ -32115,8 +32763,8 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
32115
32763
|
for (const p of paths) hashes.delete(p);
|
|
32116
32764
|
},
|
|
32117
32765
|
neverPage(path) {
|
|
32118
|
-
const
|
|
32119
|
-
return
|
|
32766
|
+
const all = rels(path);
|
|
32767
|
+
return all.length > 0 && all.every((r) => excluded(r));
|
|
32120
32768
|
},
|
|
32121
32769
|
record(out) {
|
|
32122
32770
|
return blockRecords.get(out);
|
|
@@ -32127,7 +32775,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
32127
32775
|
dataReaders(path) {
|
|
32128
32776
|
const stem = (p) => p.replace(/\.[A-Za-z]+$/, "");
|
|
32129
32777
|
const out = [];
|
|
32130
|
-
for (const info of
|
|
32778
|
+
for (const info of sourcePages()) {
|
|
32131
32779
|
if (info.slug === replaced) continue;
|
|
32132
32780
|
const dir2 = dataDirOf(cfg, sourceOf(info.source));
|
|
32133
32781
|
if (!path.startsWith(`${dir2}/`)) continue;
|
|
@@ -32138,7 +32786,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
32138
32786
|
},
|
|
32139
32787
|
exampleReaders(path) {
|
|
32140
32788
|
const out = [];
|
|
32141
|
-
for (const info of
|
|
32789
|
+
for (const info of sourcePages()) {
|
|
32142
32790
|
if (info.slug === replaced) continue;
|
|
32143
32791
|
if (exampleReads.get(info.source)?.has(path) || exampleUnresolved.has(info.source)) out.push(prefix + info.out);
|
|
32144
32792
|
}
|
|
@@ -32923,7 +33571,7 @@ export {
|
|
|
32923
33571
|
unitOfPath,
|
|
32924
33572
|
sameProduct,
|
|
32925
33573
|
buildUnits,
|
|
32926
|
-
|
|
33574
|
+
memberPaths,
|
|
32927
33575
|
TOPIC_MAP,
|
|
32928
33576
|
projectRoots,
|
|
32929
33577
|
dataDirOf,
|