@dogsbay/ssg-cli 0.2.0-beta.174 → 0.2.0-beta.176
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-F5ZXJUMZ.mjs → build-command-NZAGB7OC.mjs} +2 -1
- package/chunks/{check-command-QIRV3YYT.mjs → check-command-ZKMQYQNA.mjs} +3 -2
- package/chunks/{chunk-PHDPMLE6.mjs → chunk-6CPA3I2A.mjs} +1 -1
- package/chunks/{chunk-FMGFVL6D.mjs → chunk-GOEZKWKJ.mjs} +1004 -552
- package/chunks/chunk-KFYMG4VB.mjs +45 -0
- package/chunks/{css-build-V5U6W2S3.mjs → css-build-VKKTSP6P.mjs} +61 -0
- package/chunks/{dev-P3QNKKM2.mjs → dev-MX447VF6.mjs} +2 -1
- package/chunks/{publish-command-WV3D6MZV.mjs → publish-command-B5X67Y6Z.mjs} +2 -1
- package/chunks/{release-diff-YA6YME44.mjs → release-diff-KT7ZLBNY.mjs} +3 -2
- package/chunks/{serve-66FDB2G5.mjs → serve-WGWRM7JQ.mjs} +10 -5
- package/cli.mjs +11 -10
- package/package.json +2 -2
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
ANNOUNCEMENT_HEAD_SCRIPT,
|
|
5
|
+
COLOR_MODE_HEAD_SCRIPTS,
|
|
6
|
+
FORWARD_SCRIPT
|
|
7
|
+
} from "./chunk-KFYMG4VB.mjs";
|
|
3
8
|
import {
|
|
4
9
|
CORE_SCHEMA,
|
|
5
10
|
DEFAULT_PARSE_CACHE_BYTES,
|
|
@@ -635,76 +640,76 @@ var require_decode = __commonJS({
|
|
|
635
640
|
this.excess = 1;
|
|
636
641
|
this.consumed = 1;
|
|
637
642
|
};
|
|
638
|
-
EntityDecoder4.prototype.write = function(
|
|
643
|
+
EntityDecoder4.prototype.write = function(str8, offset) {
|
|
639
644
|
switch (this.state) {
|
|
640
645
|
case EntityDecoderState3.EntityStart: {
|
|
641
|
-
if (
|
|
646
|
+
if (str8.charCodeAt(offset) === CharCodes4.NUM) {
|
|
642
647
|
this.state = EntityDecoderState3.NumericStart;
|
|
643
648
|
this.consumed += 1;
|
|
644
|
-
return this.stateNumericStart(
|
|
649
|
+
return this.stateNumericStart(str8, offset + 1);
|
|
645
650
|
}
|
|
646
651
|
this.state = EntityDecoderState3.NamedEntity;
|
|
647
|
-
return this.stateNamedEntity(
|
|
652
|
+
return this.stateNamedEntity(str8, offset);
|
|
648
653
|
}
|
|
649
654
|
case EntityDecoderState3.NumericStart: {
|
|
650
|
-
return this.stateNumericStart(
|
|
655
|
+
return this.stateNumericStart(str8, offset);
|
|
651
656
|
}
|
|
652
657
|
case EntityDecoderState3.NumericDecimal: {
|
|
653
|
-
return this.stateNumericDecimal(
|
|
658
|
+
return this.stateNumericDecimal(str8, offset);
|
|
654
659
|
}
|
|
655
660
|
case EntityDecoderState3.NumericHex: {
|
|
656
|
-
return this.stateNumericHex(
|
|
661
|
+
return this.stateNumericHex(str8, offset);
|
|
657
662
|
}
|
|
658
663
|
case EntityDecoderState3.NamedEntity: {
|
|
659
|
-
return this.stateNamedEntity(
|
|
664
|
+
return this.stateNamedEntity(str8, offset);
|
|
660
665
|
}
|
|
661
666
|
}
|
|
662
667
|
};
|
|
663
|
-
EntityDecoder4.prototype.stateNumericStart = function(
|
|
664
|
-
if (offset >=
|
|
668
|
+
EntityDecoder4.prototype.stateNumericStart = function(str8, offset) {
|
|
669
|
+
if (offset >= str8.length) {
|
|
665
670
|
return -1;
|
|
666
671
|
}
|
|
667
|
-
if ((
|
|
672
|
+
if ((str8.charCodeAt(offset) | TO_LOWER_BIT3) === CharCodes4.LOWER_X) {
|
|
668
673
|
this.state = EntityDecoderState3.NumericHex;
|
|
669
674
|
this.consumed += 1;
|
|
670
|
-
return this.stateNumericHex(
|
|
675
|
+
return this.stateNumericHex(str8, offset + 1);
|
|
671
676
|
}
|
|
672
677
|
this.state = EntityDecoderState3.NumericDecimal;
|
|
673
|
-
return this.stateNumericDecimal(
|
|
678
|
+
return this.stateNumericDecimal(str8, offset);
|
|
674
679
|
};
|
|
675
|
-
EntityDecoder4.prototype.addToNumericResult = function(
|
|
680
|
+
EntityDecoder4.prototype.addToNumericResult = function(str8, start, end, base) {
|
|
676
681
|
if (start !== end) {
|
|
677
682
|
var digitCount = end - start;
|
|
678
|
-
this.result = this.result * Math.pow(base, digitCount) + parseInt(
|
|
683
|
+
this.result = this.result * Math.pow(base, digitCount) + parseInt(str8.substr(start, digitCount), base);
|
|
679
684
|
this.consumed += digitCount;
|
|
680
685
|
}
|
|
681
686
|
};
|
|
682
|
-
EntityDecoder4.prototype.stateNumericHex = function(
|
|
687
|
+
EntityDecoder4.prototype.stateNumericHex = function(str8, offset) {
|
|
683
688
|
var startIdx = offset;
|
|
684
|
-
while (offset <
|
|
685
|
-
var char =
|
|
689
|
+
while (offset < str8.length) {
|
|
690
|
+
var char = str8.charCodeAt(offset);
|
|
686
691
|
if (isNumber3(char) || isHexadecimalCharacter3(char)) {
|
|
687
692
|
offset += 1;
|
|
688
693
|
} else {
|
|
689
|
-
this.addToNumericResult(
|
|
694
|
+
this.addToNumericResult(str8, startIdx, offset, 16);
|
|
690
695
|
return this.emitNumericEntity(char, 3);
|
|
691
696
|
}
|
|
692
697
|
}
|
|
693
|
-
this.addToNumericResult(
|
|
698
|
+
this.addToNumericResult(str8, startIdx, offset, 16);
|
|
694
699
|
return -1;
|
|
695
700
|
};
|
|
696
|
-
EntityDecoder4.prototype.stateNumericDecimal = function(
|
|
701
|
+
EntityDecoder4.prototype.stateNumericDecimal = function(str8, offset) {
|
|
697
702
|
var startIdx = offset;
|
|
698
|
-
while (offset <
|
|
699
|
-
var char =
|
|
703
|
+
while (offset < str8.length) {
|
|
704
|
+
var char = str8.charCodeAt(offset);
|
|
700
705
|
if (isNumber3(char)) {
|
|
701
706
|
offset += 1;
|
|
702
707
|
} else {
|
|
703
|
-
this.addToNumericResult(
|
|
708
|
+
this.addToNumericResult(str8, startIdx, offset, 10);
|
|
704
709
|
return this.emitNumericEntity(char, 2);
|
|
705
710
|
}
|
|
706
711
|
}
|
|
707
|
-
this.addToNumericResult(
|
|
712
|
+
this.addToNumericResult(str8, startIdx, offset, 10);
|
|
708
713
|
return -1;
|
|
709
714
|
};
|
|
710
715
|
EntityDecoder4.prototype.emitNumericEntity = function(lastCp, expectedLength) {
|
|
@@ -727,12 +732,12 @@ var require_decode = __commonJS({
|
|
|
727
732
|
}
|
|
728
733
|
return this.consumed;
|
|
729
734
|
};
|
|
730
|
-
EntityDecoder4.prototype.stateNamedEntity = function(
|
|
735
|
+
EntityDecoder4.prototype.stateNamedEntity = function(str8, offset) {
|
|
731
736
|
var decodeTree = this.decodeTree;
|
|
732
737
|
var current = decodeTree[this.treeIndex];
|
|
733
738
|
var valueLength = (current & BinTrieFlags3.VALUE_LENGTH) >> 14;
|
|
734
|
-
for (; offset <
|
|
735
|
-
var char =
|
|
739
|
+
for (; offset < str8.length; offset++, this.excess++) {
|
|
740
|
+
var char = str8.charCodeAt(offset);
|
|
736
741
|
this.treeIndex = determineBranch3(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
|
|
737
742
|
if (this.treeIndex < 0) {
|
|
738
743
|
return this.result === 0 || // If we are parsing an attribute
|
|
@@ -799,17 +804,17 @@ var require_decode = __commonJS({
|
|
|
799
804
|
exports.EntityDecoder = EntityDecoder3;
|
|
800
805
|
function getDecoder2(decodeTree) {
|
|
801
806
|
var ret = "";
|
|
802
|
-
var decoder2 = new EntityDecoder3(decodeTree, function(
|
|
803
|
-
return ret += (0, decode_codepoint_js_1.fromCodePoint)(
|
|
807
|
+
var decoder2 = new EntityDecoder3(decodeTree, function(str8) {
|
|
808
|
+
return ret += (0, decode_codepoint_js_1.fromCodePoint)(str8);
|
|
804
809
|
});
|
|
805
|
-
return function decodeWithTrie(
|
|
810
|
+
return function decodeWithTrie(str8, decodeMode) {
|
|
806
811
|
var lastIndex = 0;
|
|
807
812
|
var offset = 0;
|
|
808
|
-
while ((offset =
|
|
809
|
-
ret +=
|
|
813
|
+
while ((offset = str8.indexOf("&", offset)) >= 0) {
|
|
814
|
+
ret += str8.slice(lastIndex, offset);
|
|
810
815
|
decoder2.startEntity(decodeMode);
|
|
811
816
|
var len = decoder2.write(
|
|
812
|
-
|
|
817
|
+
str8,
|
|
813
818
|
// Skip the "&"
|
|
814
819
|
offset + 1
|
|
815
820
|
);
|
|
@@ -820,7 +825,7 @@ var require_decode = __commonJS({
|
|
|
820
825
|
lastIndex = offset + len;
|
|
821
826
|
offset = len === 0 ? lastIndex + 1 : lastIndex;
|
|
822
827
|
}
|
|
823
|
-
var result = ret +
|
|
828
|
+
var result = ret + str8.slice(lastIndex);
|
|
824
829
|
ret = "";
|
|
825
830
|
return result;
|
|
826
831
|
};
|
|
@@ -853,23 +858,23 @@ var require_decode = __commonJS({
|
|
|
853
858
|
exports.determineBranch = determineBranch3;
|
|
854
859
|
var htmlDecoder2 = getDecoder2(decode_data_html_js_1.default);
|
|
855
860
|
var xmlDecoder2 = getDecoder2(decode_data_xml_js_1.default);
|
|
856
|
-
function decodeHTML2(
|
|
861
|
+
function decodeHTML2(str8, mode) {
|
|
857
862
|
if (mode === void 0) {
|
|
858
863
|
mode = DecodingMode3.Legacy;
|
|
859
864
|
}
|
|
860
|
-
return htmlDecoder2(
|
|
865
|
+
return htmlDecoder2(str8, mode);
|
|
861
866
|
}
|
|
862
867
|
exports.decodeHTML = decodeHTML2;
|
|
863
|
-
function decodeHTMLAttribute2(
|
|
864
|
-
return htmlDecoder2(
|
|
868
|
+
function decodeHTMLAttribute2(str8) {
|
|
869
|
+
return htmlDecoder2(str8, DecodingMode3.Attribute);
|
|
865
870
|
}
|
|
866
871
|
exports.decodeHTMLAttribute = decodeHTMLAttribute2;
|
|
867
|
-
function decodeHTMLStrict2(
|
|
868
|
-
return htmlDecoder2(
|
|
872
|
+
function decodeHTMLStrict2(str8) {
|
|
873
|
+
return htmlDecoder2(str8, DecodingMode3.Strict);
|
|
869
874
|
}
|
|
870
875
|
exports.decodeHTMLStrict = decodeHTMLStrict2;
|
|
871
|
-
function decodeXML2(
|
|
872
|
-
return xmlDecoder2(
|
|
876
|
+
function decodeXML2(str8) {
|
|
877
|
+
return xmlDecoder2(str8, DecodingMode3.Strict);
|
|
873
878
|
}
|
|
874
879
|
exports.decodeXML = decodeXML2;
|
|
875
880
|
}
|
|
@@ -905,31 +910,31 @@ var require_escape = __commonJS({
|
|
|
905
910
|
[62, ">"]
|
|
906
911
|
]);
|
|
907
912
|
exports.getCodePoint = // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
908
|
-
String.prototype.codePointAt != null ? function(
|
|
909
|
-
return
|
|
913
|
+
String.prototype.codePointAt != null ? function(str8, index) {
|
|
914
|
+
return str8.codePointAt(index);
|
|
910
915
|
} : (
|
|
911
916
|
// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
|
|
912
917
|
function(c, index) {
|
|
913
918
|
return (c.charCodeAt(index) & 64512) === 55296 ? (c.charCodeAt(index) - 55296) * 1024 + c.charCodeAt(index + 1) - 56320 + 65536 : c.charCodeAt(index);
|
|
914
919
|
}
|
|
915
920
|
);
|
|
916
|
-
function encodeXML2(
|
|
921
|
+
function encodeXML2(str8) {
|
|
917
922
|
var ret = "";
|
|
918
923
|
var lastIdx = 0;
|
|
919
924
|
var match;
|
|
920
|
-
while ((match = exports.xmlReplacer.exec(
|
|
925
|
+
while ((match = exports.xmlReplacer.exec(str8)) !== null) {
|
|
921
926
|
var i = match.index;
|
|
922
|
-
var char =
|
|
927
|
+
var char = str8.charCodeAt(i);
|
|
923
928
|
var next = xmlCodeMap2.get(char);
|
|
924
929
|
if (next !== void 0) {
|
|
925
|
-
ret +=
|
|
930
|
+
ret += str8.substring(lastIdx, i) + next;
|
|
926
931
|
lastIdx = i + 1;
|
|
927
932
|
} else {
|
|
928
|
-
ret += "".concat(
|
|
933
|
+
ret += "".concat(str8.substring(lastIdx, i), "&#x").concat((0, exports.getCodePoint)(str8, i).toString(16), ";");
|
|
929
934
|
lastIdx = exports.xmlReplacer.lastIndex += Number((char & 64512) === 55296);
|
|
930
935
|
}
|
|
931
936
|
}
|
|
932
|
-
return ret +
|
|
937
|
+
return ret + str8.substr(lastIdx);
|
|
933
938
|
}
|
|
934
939
|
exports.encodeXML = encodeXML2;
|
|
935
940
|
exports.escape = encodeXML2;
|
|
@@ -983,18 +988,18 @@ var require_encode = __commonJS({
|
|
|
983
988
|
return encodeHTMLTrieRe(escape_js_1.xmlReplacer, data);
|
|
984
989
|
}
|
|
985
990
|
exports.encodeNonAsciiHTML = encodeNonAsciiHTML2;
|
|
986
|
-
function encodeHTMLTrieRe(regExp,
|
|
991
|
+
function encodeHTMLTrieRe(regExp, str8) {
|
|
987
992
|
var ret = "";
|
|
988
993
|
var lastIdx = 0;
|
|
989
994
|
var match;
|
|
990
|
-
while ((match = regExp.exec(
|
|
995
|
+
while ((match = regExp.exec(str8)) !== null) {
|
|
991
996
|
var i = match.index;
|
|
992
|
-
ret +=
|
|
993
|
-
var char =
|
|
997
|
+
ret += str8.substring(lastIdx, i);
|
|
998
|
+
var char = str8.charCodeAt(i);
|
|
994
999
|
var next = encode_html_js_1.default.get(char);
|
|
995
1000
|
if (typeof next === "object") {
|
|
996
|
-
if (i + 1 <
|
|
997
|
-
var nextChar =
|
|
1001
|
+
if (i + 1 < str8.length) {
|
|
1002
|
+
var nextChar = str8.charCodeAt(i + 1);
|
|
998
1003
|
var value = typeof next.n === "number" ? next.n === nextChar ? next.o : void 0 : next.n.get(nextChar);
|
|
999
1004
|
if (value !== void 0) {
|
|
1000
1005
|
ret += value;
|
|
@@ -1008,12 +1013,12 @@ var require_encode = __commonJS({
|
|
|
1008
1013
|
ret += next;
|
|
1009
1014
|
lastIdx = i + 1;
|
|
1010
1015
|
} else {
|
|
1011
|
-
var cp = (0, escape_js_1.getCodePoint)(
|
|
1016
|
+
var cp = (0, escape_js_1.getCodePoint)(str8, i);
|
|
1012
1017
|
ret += "&#x".concat(cp.toString(16), ";");
|
|
1013
1018
|
lastIdx = regExp.lastIndex += Number(cp !== char);
|
|
1014
1019
|
}
|
|
1015
1020
|
}
|
|
1016
|
-
return ret +
|
|
1021
|
+
return ret + str8.substr(lastIdx);
|
|
1017
1022
|
}
|
|
1018
1023
|
}
|
|
1019
1024
|
});
|
|
@@ -1220,8 +1225,8 @@ var require_index_cjs3 = __commonJS({
|
|
|
1220
1225
|
function isFunction(obj) {
|
|
1221
1226
|
return _class(obj) === "[object Function]";
|
|
1222
1227
|
}
|
|
1223
|
-
function escapeRE(
|
|
1224
|
-
return
|
|
1228
|
+
function escapeRE(str8) {
|
|
1229
|
+
return str8.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
|
|
1225
1230
|
}
|
|
1226
1231
|
var defaultOptions = {
|
|
1227
1232
|
fuzzyLink: true,
|
|
@@ -1698,13 +1703,13 @@ var require_index_cjs4 = __commonJS({
|
|
|
1698
1703
|
if (decoded !== match) return decoded;
|
|
1699
1704
|
return match;
|
|
1700
1705
|
}
|
|
1701
|
-
function unescapeMd(
|
|
1702
|
-
if (
|
|
1703
|
-
return
|
|
1706
|
+
function unescapeMd(str8) {
|
|
1707
|
+
if (str8.indexOf("\\") < 0) return str8;
|
|
1708
|
+
return str8.replace(UNESCAPE_MD_RE, "$1");
|
|
1704
1709
|
}
|
|
1705
|
-
function unescapeAll(
|
|
1706
|
-
if (
|
|
1707
|
-
return
|
|
1710
|
+
function unescapeAll(str8) {
|
|
1711
|
+
if (str8.indexOf("\\") < 0 && str8.indexOf("&") < 0) return str8;
|
|
1712
|
+
return str8.replace(UNESCAPE_ALL_RE, function(match, escaped, entity2) {
|
|
1708
1713
|
if (escaped) return escaped;
|
|
1709
1714
|
return replaceEntityPattern(match, entity2);
|
|
1710
1715
|
});
|
|
@@ -1720,13 +1725,13 @@ var require_index_cjs4 = __commonJS({
|
|
|
1720
1725
|
function replaceUnsafeChar(ch) {
|
|
1721
1726
|
return HTML_REPLACEMENTS[ch];
|
|
1722
1727
|
}
|
|
1723
|
-
function escapeHtml3(
|
|
1724
|
-
if (HTML_ESCAPE_TEST_RE.test(
|
|
1725
|
-
return
|
|
1728
|
+
function escapeHtml3(str8) {
|
|
1729
|
+
if (HTML_ESCAPE_TEST_RE.test(str8)) return str8.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);
|
|
1730
|
+
return str8;
|
|
1726
1731
|
}
|
|
1727
1732
|
var REGEXP_ESCAPE_RE = /[.?*+^$[\]\\(){}|-]/g;
|
|
1728
|
-
function escapeRE(
|
|
1729
|
-
return
|
|
1733
|
+
function escapeRE(str8) {
|
|
1734
|
+
return str8.replace(REGEXP_ESCAPE_RE, "\\$&");
|
|
1730
1735
|
}
|
|
1731
1736
|
function isSpace(code2) {
|
|
1732
1737
|
switch (code2) {
|
|
@@ -1799,21 +1804,21 @@ var require_index_cjs4 = __commonJS({
|
|
|
1799
1804
|
return false;
|
|
1800
1805
|
}
|
|
1801
1806
|
}
|
|
1802
|
-
function normalizeReference(
|
|
1803
|
-
|
|
1807
|
+
function normalizeReference(str8) {
|
|
1808
|
+
str8 = str8.trim().replace(/\s+/g, " ");
|
|
1804
1809
|
if ("\u1E9E".toLowerCase() === "\u1E7E")
|
|
1805
|
-
|
|
1806
|
-
return
|
|
1810
|
+
str8 = str8.replace(/ẞ/g, "\xDF");
|
|
1811
|
+
return str8.toLowerCase().toUpperCase();
|
|
1807
1812
|
}
|
|
1808
1813
|
function isAsciiTrimmable(c) {
|
|
1809
1814
|
return c === 32 || c === 9 || c === 10 || c === 13;
|
|
1810
1815
|
}
|
|
1811
|
-
function asciiTrim(
|
|
1816
|
+
function asciiTrim(str8) {
|
|
1812
1817
|
let start = 0;
|
|
1813
|
-
for (; start <
|
|
1814
|
-
let end =
|
|
1815
|
-
for (; end >= start; end--) if (!isAsciiTrimmable(
|
|
1816
|
-
return
|
|
1818
|
+
for (; start < str8.length; start++) if (!isAsciiTrimmable(str8.charCodeAt(start))) break;
|
|
1819
|
+
let end = str8.length - 1;
|
|
1820
|
+
for (; end >= start; end--) if (!isAsciiTrimmable(str8.charCodeAt(end))) break;
|
|
1821
|
+
return str8.slice(start, end + 1);
|
|
1817
1822
|
}
|
|
1818
1823
|
var lib = {
|
|
1819
1824
|
mdurl,
|
|
@@ -1849,7 +1854,7 @@ var require_index_cjs4 = __commonJS({
|
|
|
1849
1854
|
state.pos = oldPos;
|
|
1850
1855
|
return labelEnd;
|
|
1851
1856
|
}
|
|
1852
|
-
function parseLinkDestination(
|
|
1857
|
+
function parseLinkDestination(str8, start, max) {
|
|
1853
1858
|
let code2;
|
|
1854
1859
|
let pos = start;
|
|
1855
1860
|
const result = {
|
|
@@ -1857,15 +1862,15 @@ var require_index_cjs4 = __commonJS({
|
|
|
1857
1862
|
pos: 0,
|
|
1858
1863
|
str: ""
|
|
1859
1864
|
};
|
|
1860
|
-
if (
|
|
1865
|
+
if (str8.charCodeAt(pos) === 60) {
|
|
1861
1866
|
pos++;
|
|
1862
1867
|
while (pos < max) {
|
|
1863
|
-
code2 =
|
|
1868
|
+
code2 = str8.charCodeAt(pos);
|
|
1864
1869
|
if (code2 === 10) return result;
|
|
1865
1870
|
if (code2 === 60) return result;
|
|
1866
1871
|
if (code2 === 62) {
|
|
1867
1872
|
result.pos = pos + 1;
|
|
1868
|
-
result.str = unescapeAll(
|
|
1873
|
+
result.str = unescapeAll(str8.slice(start + 1, pos));
|
|
1869
1874
|
result.ok = true;
|
|
1870
1875
|
return result;
|
|
1871
1876
|
}
|
|
@@ -1879,11 +1884,11 @@ var require_index_cjs4 = __commonJS({
|
|
|
1879
1884
|
}
|
|
1880
1885
|
let level = 0;
|
|
1881
1886
|
while (pos < max) {
|
|
1882
|
-
code2 =
|
|
1887
|
+
code2 = str8.charCodeAt(pos);
|
|
1883
1888
|
if (code2 === 32) break;
|
|
1884
1889
|
if (code2 < 32 || code2 === 127) break;
|
|
1885
1890
|
if (code2 === 92 && pos + 1 < max) {
|
|
1886
|
-
if (
|
|
1891
|
+
if (str8.charCodeAt(pos + 1) === 32) {
|
|
1887
1892
|
pos++;
|
|
1888
1893
|
continue;
|
|
1889
1894
|
}
|
|
@@ -1902,12 +1907,12 @@ var require_index_cjs4 = __commonJS({
|
|
|
1902
1907
|
}
|
|
1903
1908
|
if (start === pos) return result;
|
|
1904
1909
|
if (level !== 0) return result;
|
|
1905
|
-
result.str = unescapeAll(
|
|
1910
|
+
result.str = unescapeAll(str8.slice(start, pos));
|
|
1906
1911
|
result.pos = pos;
|
|
1907
1912
|
result.ok = true;
|
|
1908
1913
|
return result;
|
|
1909
1914
|
}
|
|
1910
|
-
function parseLinkTitle(
|
|
1915
|
+
function parseLinkTitle(str8, start, max, prev_state) {
|
|
1911
1916
|
let code2;
|
|
1912
1917
|
let pos = start;
|
|
1913
1918
|
const state = {
|
|
@@ -1922,7 +1927,7 @@ var require_index_cjs4 = __commonJS({
|
|
|
1922
1927
|
state.marker = prev_state.marker;
|
|
1923
1928
|
} else {
|
|
1924
1929
|
if (pos >= max) return state;
|
|
1925
|
-
let marker =
|
|
1930
|
+
let marker = str8.charCodeAt(pos);
|
|
1926
1931
|
if (marker !== 34 && marker !== 39 && marker !== 40) return state;
|
|
1927
1932
|
start++;
|
|
1928
1933
|
pos++;
|
|
@@ -1930,10 +1935,10 @@ var require_index_cjs4 = __commonJS({
|
|
|
1930
1935
|
state.marker = marker;
|
|
1931
1936
|
}
|
|
1932
1937
|
while (pos < max) {
|
|
1933
|
-
code2 =
|
|
1938
|
+
code2 = str8.charCodeAt(pos);
|
|
1934
1939
|
if (code2 === state.marker) {
|
|
1935
1940
|
state.pos = pos + 1;
|
|
1936
|
-
state.str += unescapeAll(
|
|
1941
|
+
state.str += unescapeAll(str8.slice(start, pos));
|
|
1937
1942
|
state.ok = true;
|
|
1938
1943
|
return state;
|
|
1939
1944
|
} else if (code2 === 40 && state.marker === 41) return state;
|
|
@@ -1941,7 +1946,7 @@ var require_index_cjs4 = __commonJS({
|
|
|
1941
1946
|
pos++;
|
|
1942
1947
|
}
|
|
1943
1948
|
state.can_continue = true;
|
|
1944
|
-
state.str += unescapeAll(
|
|
1949
|
+
state.str += unescapeAll(str8.slice(start, pos));
|
|
1945
1950
|
return state;
|
|
1946
1951
|
}
|
|
1947
1952
|
var helpers_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -2244,10 +2249,10 @@ var require_index_cjs4 = __commonJS({
|
|
|
2244
2249
|
var NEWLINES_RE = /\r\n?|\n/g;
|
|
2245
2250
|
var NULL_RE = /\0/g;
|
|
2246
2251
|
function normalize3(state) {
|
|
2247
|
-
let
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
state.src =
|
|
2252
|
+
let str8;
|
|
2253
|
+
str8 = state.src.replace(NEWLINES_RE, "\n");
|
|
2254
|
+
str8 = str8.replace(NULL_RE, "\uFFFD");
|
|
2255
|
+
state.src = str8;
|
|
2251
2256
|
}
|
|
2252
2257
|
function block2(state) {
|
|
2253
2258
|
let token;
|
|
@@ -2266,11 +2271,11 @@ var require_index_cjs4 = __commonJS({
|
|
|
2266
2271
|
if (tok.type === "inline") state.md.inline.parse(tok.content, state.md, state.env, tok.children);
|
|
2267
2272
|
}
|
|
2268
2273
|
}
|
|
2269
|
-
function isLinkOpen$1(
|
|
2270
|
-
return /^<a[>\s]/i.test(
|
|
2274
|
+
function isLinkOpen$1(str8) {
|
|
2275
|
+
return /^<a[>\s]/i.test(str8);
|
|
2271
2276
|
}
|
|
2272
|
-
function isLinkClose$1(
|
|
2273
|
-
return /^<\/a\s*>/i.test(
|
|
2277
|
+
function isLinkClose$1(str8) {
|
|
2278
|
+
return /^<\/a\s*>/i.test(str8);
|
|
2274
2279
|
}
|
|
2275
2280
|
function linkify$1(state) {
|
|
2276
2281
|
const blockTokens = state.tokens;
|
|
@@ -2419,16 +2424,16 @@ var require_index_cjs4 = __commonJS({
|
|
|
2419
2424
|
ch
|
|
2420
2425
|
});
|
|
2421
2426
|
}
|
|
2422
|
-
function applyReplacements(
|
|
2427
|
+
function applyReplacements(str8, replacements) {
|
|
2423
2428
|
let result = "";
|
|
2424
2429
|
let lastPos = 0;
|
|
2425
2430
|
replacements.sort((a, b) => a.pos - b.pos);
|
|
2426
2431
|
for (let i = 0; i < replacements.length; i++) {
|
|
2427
2432
|
const replacement = replacements[i];
|
|
2428
|
-
result +=
|
|
2433
|
+
result += str8.slice(lastPos, replacement.pos) + replacement.ch;
|
|
2429
2434
|
lastPos = replacement.pos + 1;
|
|
2430
2435
|
}
|
|
2431
|
-
return result +
|
|
2436
|
+
return result + str8.slice(lastPos);
|
|
2432
2437
|
}
|
|
2433
2438
|
function process_inlines(tokens, state) {
|
|
2434
2439
|
let j;
|
|
@@ -2659,8 +2664,8 @@ var require_index_cjs4 = __commonJS({
|
|
|
2659
2664
|
const queue = new Array(end - begin);
|
|
2660
2665
|
for (let i = 0, line = begin; line < end; line++, i++) {
|
|
2661
2666
|
let lineIndent = 0;
|
|
2662
|
-
const
|
|
2663
|
-
let first =
|
|
2667
|
+
const lineStart2 = this.bMarks[line];
|
|
2668
|
+
let first = lineStart2;
|
|
2664
2669
|
let last;
|
|
2665
2670
|
if (line + 1 < end || keepLastLF) last = this.eMarks[line] + 1;
|
|
2666
2671
|
else last = this.eMarks[line];
|
|
@@ -2668,7 +2673,7 @@ var require_index_cjs4 = __commonJS({
|
|
|
2668
2673
|
const ch = this.src.charCodeAt(first);
|
|
2669
2674
|
if (isSpace(ch)) if (ch === 9) lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4;
|
|
2670
2675
|
else lineIndent++;
|
|
2671
|
-
else if (first -
|
|
2676
|
+
else if (first - lineStart2 < this.tShift[line]) lineIndent++;
|
|
2672
2677
|
else break;
|
|
2673
2678
|
first++;
|
|
2674
2679
|
}
|
|
@@ -2684,28 +2689,28 @@ var require_index_cjs4 = __commonJS({
|
|
|
2684
2689
|
const max = state.eMarks[line];
|
|
2685
2690
|
return state.src.slice(pos, max);
|
|
2686
2691
|
}
|
|
2687
|
-
function escapedSplit(
|
|
2692
|
+
function escapedSplit(str8) {
|
|
2688
2693
|
const result = [];
|
|
2689
|
-
const max =
|
|
2694
|
+
const max = str8.length;
|
|
2690
2695
|
let pos = 0;
|
|
2691
|
-
let ch =
|
|
2696
|
+
let ch = str8.charCodeAt(pos);
|
|
2692
2697
|
let isEscaped = false;
|
|
2693
2698
|
let lastPos = 0;
|
|
2694
2699
|
let current = "";
|
|
2695
2700
|
while (pos < max) {
|
|
2696
2701
|
if (ch === 124) if (!isEscaped) {
|
|
2697
|
-
result.push(current +
|
|
2702
|
+
result.push(current + str8.substring(lastPos, pos));
|
|
2698
2703
|
current = "";
|
|
2699
2704
|
lastPos = pos + 1;
|
|
2700
2705
|
} else {
|
|
2701
|
-
current +=
|
|
2706
|
+
current += str8.substring(lastPos, pos - 1);
|
|
2702
2707
|
lastPos = pos;
|
|
2703
2708
|
}
|
|
2704
2709
|
isEscaped = ch === 92;
|
|
2705
2710
|
pos++;
|
|
2706
|
-
ch =
|
|
2711
|
+
ch = str8.charCodeAt(pos);
|
|
2707
2712
|
}
|
|
2708
|
-
result.push(current +
|
|
2713
|
+
result.push(current + str8.substring(lastPos));
|
|
2709
2714
|
return result;
|
|
2710
2715
|
}
|
|
2711
2716
|
function table2(state, startLine, endLine, silent) {
|
|
@@ -3176,11 +3181,11 @@ var require_index_cjs4 = __commonJS({
|
|
|
3176
3181
|
const max2 = state.eMarks[nextLine2];
|
|
3177
3182
|
return state.src.slice(pos2, max2 + 1);
|
|
3178
3183
|
}
|
|
3179
|
-
let
|
|
3180
|
-
max =
|
|
3184
|
+
let str8 = state.src.slice(pos, max + 1);
|
|
3185
|
+
max = str8.length;
|
|
3181
3186
|
let labelEnd = -1;
|
|
3182
3187
|
for (pos = 1; pos < max; pos++) {
|
|
3183
|
-
const ch =
|
|
3188
|
+
const ch = str8.charCodeAt(pos);
|
|
3184
3189
|
if (ch === 91) return false;
|
|
3185
3190
|
else if (ch === 93) {
|
|
3186
3191
|
labelEnd = pos;
|
|
@@ -3188,36 +3193,36 @@ var require_index_cjs4 = __commonJS({
|
|
|
3188
3193
|
} else if (ch === 10) {
|
|
3189
3194
|
const lineContent = getNextLine(nextLine);
|
|
3190
3195
|
if (lineContent !== null) {
|
|
3191
|
-
|
|
3192
|
-
max =
|
|
3196
|
+
str8 += lineContent;
|
|
3197
|
+
max = str8.length;
|
|
3193
3198
|
nextLine++;
|
|
3194
3199
|
}
|
|
3195
3200
|
} else if (ch === 92) {
|
|
3196
3201
|
pos++;
|
|
3197
|
-
if (pos < max &&
|
|
3202
|
+
if (pos < max && str8.charCodeAt(pos) === 10) {
|
|
3198
3203
|
const lineContent = getNextLine(nextLine);
|
|
3199
3204
|
if (lineContent !== null) {
|
|
3200
|
-
|
|
3201
|
-
max =
|
|
3205
|
+
str8 += lineContent;
|
|
3206
|
+
max = str8.length;
|
|
3202
3207
|
nextLine++;
|
|
3203
3208
|
}
|
|
3204
3209
|
}
|
|
3205
3210
|
}
|
|
3206
3211
|
}
|
|
3207
|
-
if (labelEnd < 0 ||
|
|
3212
|
+
if (labelEnd < 0 || str8.charCodeAt(labelEnd + 1) !== 58) return false;
|
|
3208
3213
|
for (pos = labelEnd + 2; pos < max; pos++) {
|
|
3209
|
-
const ch =
|
|
3214
|
+
const ch = str8.charCodeAt(pos);
|
|
3210
3215
|
if (ch === 10) {
|
|
3211
3216
|
const lineContent = getNextLine(nextLine);
|
|
3212
3217
|
if (lineContent !== null) {
|
|
3213
|
-
|
|
3214
|
-
max =
|
|
3218
|
+
str8 += lineContent;
|
|
3219
|
+
max = str8.length;
|
|
3215
3220
|
nextLine++;
|
|
3216
3221
|
}
|
|
3217
3222
|
} else if (isSpace(ch)) {
|
|
3218
3223
|
} else break;
|
|
3219
3224
|
}
|
|
3220
|
-
const destRes = state.md.helpers.parseLinkDestination(
|
|
3225
|
+
const destRes = state.md.helpers.parseLinkDestination(str8, pos, max);
|
|
3221
3226
|
if (!destRes.ok) return false;
|
|
3222
3227
|
const href = state.md.normalizeLink(destRes.str);
|
|
3223
3228
|
if (!state.md.validateLink(href)) return false;
|
|
@@ -3226,26 +3231,26 @@ var require_index_cjs4 = __commonJS({
|
|
|
3226
3231
|
const destEndLineNo = nextLine;
|
|
3227
3232
|
const start = pos;
|
|
3228
3233
|
for (; pos < max; pos++) {
|
|
3229
|
-
const ch =
|
|
3234
|
+
const ch = str8.charCodeAt(pos);
|
|
3230
3235
|
if (ch === 10) {
|
|
3231
3236
|
const lineContent = getNextLine(nextLine);
|
|
3232
3237
|
if (lineContent !== null) {
|
|
3233
|
-
|
|
3234
|
-
max =
|
|
3238
|
+
str8 += lineContent;
|
|
3239
|
+
max = str8.length;
|
|
3235
3240
|
nextLine++;
|
|
3236
3241
|
}
|
|
3237
3242
|
} else if (isSpace(ch)) {
|
|
3238
3243
|
} else break;
|
|
3239
3244
|
}
|
|
3240
|
-
let titleRes = state.md.helpers.parseLinkTitle(
|
|
3245
|
+
let titleRes = state.md.helpers.parseLinkTitle(str8, pos, max);
|
|
3241
3246
|
while (titleRes.can_continue) {
|
|
3242
3247
|
const lineContent = getNextLine(nextLine);
|
|
3243
3248
|
if (lineContent === null) break;
|
|
3244
|
-
|
|
3249
|
+
str8 += lineContent;
|
|
3245
3250
|
pos = max;
|
|
3246
|
-
max =
|
|
3251
|
+
max = str8.length;
|
|
3247
3252
|
nextLine++;
|
|
3248
|
-
titleRes = state.md.helpers.parseLinkTitle(
|
|
3253
|
+
titleRes = state.md.helpers.parseLinkTitle(str8, pos, max, titleRes);
|
|
3249
3254
|
}
|
|
3250
3255
|
let title;
|
|
3251
3256
|
if (pos < max && start !== pos && titleRes.ok) {
|
|
@@ -3257,22 +3262,22 @@ var require_index_cjs4 = __commonJS({
|
|
|
3257
3262
|
nextLine = destEndLineNo;
|
|
3258
3263
|
}
|
|
3259
3264
|
while (pos < max) {
|
|
3260
|
-
if (!isSpace(
|
|
3265
|
+
if (!isSpace(str8.charCodeAt(pos))) break;
|
|
3261
3266
|
pos++;
|
|
3262
3267
|
}
|
|
3263
|
-
if (pos < max &&
|
|
3268
|
+
if (pos < max && str8.charCodeAt(pos) !== 10) {
|
|
3264
3269
|
if (title) {
|
|
3265
3270
|
title = "";
|
|
3266
3271
|
pos = destEndPos;
|
|
3267
3272
|
nextLine = destEndLineNo;
|
|
3268
3273
|
while (pos < max) {
|
|
3269
|
-
if (!isSpace(
|
|
3274
|
+
if (!isSpace(str8.charCodeAt(pos))) break;
|
|
3270
3275
|
pos++;
|
|
3271
3276
|
}
|
|
3272
3277
|
}
|
|
3273
3278
|
}
|
|
3274
|
-
if (pos < max &&
|
|
3275
|
-
const label = normalizeReference(
|
|
3279
|
+
if (pos < max && str8.charCodeAt(pos) !== 10) return false;
|
|
3280
|
+
const label = normalizeReference(str8.slice(1, labelEnd));
|
|
3276
3281
|
if (!label) return false;
|
|
3277
3282
|
if (silent) return true;
|
|
3278
3283
|
if (typeof state.env.references === "undefined") state.env.references = {};
|
|
@@ -4246,11 +4251,11 @@ var require_index_cjs4 = __commonJS({
|
|
|
4246
4251
|
}
|
|
4247
4252
|
return false;
|
|
4248
4253
|
}
|
|
4249
|
-
function isLinkOpen(
|
|
4250
|
-
return /^<a[>\s]/i.test(
|
|
4254
|
+
function isLinkOpen(str8) {
|
|
4255
|
+
return /^<a[>\s]/i.test(str8);
|
|
4251
4256
|
}
|
|
4252
|
-
function isLinkClose(
|
|
4253
|
-
return /^<\/a\s*>/i.test(
|
|
4257
|
+
function isLinkClose(str8) {
|
|
4258
|
+
return /^<\/a\s*>/i.test(str8);
|
|
4254
4259
|
}
|
|
4255
4260
|
function isLetter(ch) {
|
|
4256
4261
|
const lc = ch | 32;
|
|
@@ -4459,8 +4464,8 @@ var require_index_cjs4 = __commonJS({
|
|
|
4459
4464
|
}
|
|
4460
4465
|
if (state.pending) state.pushPending();
|
|
4461
4466
|
};
|
|
4462
|
-
ParserInline.prototype.parse = function(
|
|
4463
|
-
const state = new this.State(
|
|
4467
|
+
ParserInline.prototype.parse = function(str8, md2, env, outTokens) {
|
|
4468
|
+
const state = new this.State(str8, md2, env, outTokens);
|
|
4464
4469
|
this.tokenize(state);
|
|
4465
4470
|
const rules = this.ruler2.getRules("");
|
|
4466
4471
|
const len = rules.length;
|
|
@@ -4568,8 +4573,8 @@ var require_index_cjs4 = __commonJS({
|
|
|
4568
4573
|
var BAD_PROTO_RE = /^(vbscript|javascript|file|data):/;
|
|
4569
4574
|
var GOOD_DATA_RE = /^data:image\/(gif|png|jpeg|webp);/;
|
|
4570
4575
|
function validateLink(url) {
|
|
4571
|
-
const
|
|
4572
|
-
return BAD_PROTO_RE.test(
|
|
4576
|
+
const str8 = url.trim().toLowerCase();
|
|
4577
|
+
return BAD_PROTO_RE.test(str8) ? GOOD_DATA_RE.test(str8) : true;
|
|
4573
4578
|
}
|
|
4574
4579
|
var RECODE_HOSTNAME_FOR = [
|
|
4575
4580
|
"http:",
|
|
@@ -4703,7 +4708,7 @@ var require_index_cjs4 = __commonJS({
|
|
|
4703
4708
|
// node_modules/markdown-it-attrs/utils.js
|
|
4704
4709
|
var require_utils = __commonJS({
|
|
4705
4710
|
"node_modules/markdown-it-attrs/utils.js"(exports) {
|
|
4706
|
-
exports.getAttrs = function(
|
|
4711
|
+
exports.getAttrs = function(str8, start, options) {
|
|
4707
4712
|
const allowedKeyChars = /[^\t\n\f />"'=]/;
|
|
4708
4713
|
const pairSeparator = " ";
|
|
4709
4714
|
const keySeparator = "=";
|
|
@@ -4714,20 +4719,20 @@ var require_utils = __commonJS({
|
|
|
4714
4719
|
let value = "";
|
|
4715
4720
|
let parsingKey = true;
|
|
4716
4721
|
let valueInsideQuotes = false;
|
|
4717
|
-
for (let i = start + options.leftDelimiter.length; i <
|
|
4718
|
-
if (!valueInsideQuotes &&
|
|
4722
|
+
for (let i = start + options.leftDelimiter.length; i < str8.length; i++) {
|
|
4723
|
+
if (!valueInsideQuotes && str8.slice(i, i + options.rightDelimiter.length) === options.rightDelimiter) {
|
|
4719
4724
|
if (key2 !== "") {
|
|
4720
4725
|
attrs2.push([key2, value]);
|
|
4721
4726
|
}
|
|
4722
4727
|
break;
|
|
4723
4728
|
}
|
|
4724
|
-
const char_ =
|
|
4729
|
+
const char_ = str8.charAt(i);
|
|
4725
4730
|
if (char_ === keySeparator && parsingKey) {
|
|
4726
4731
|
parsingKey = false;
|
|
4727
4732
|
continue;
|
|
4728
4733
|
}
|
|
4729
4734
|
if (char_ === classChar && key2 === "") {
|
|
4730
|
-
if (
|
|
4735
|
+
if (str8.charAt(i + 1) === classChar) {
|
|
4731
4736
|
key2 = "css-module";
|
|
4732
4737
|
i += 1;
|
|
4733
4738
|
} else {
|
|
@@ -4741,11 +4746,11 @@ var require_utils = __commonJS({
|
|
|
4741
4746
|
parsingKey = false;
|
|
4742
4747
|
continue;
|
|
4743
4748
|
}
|
|
4744
|
-
if (isUnescapedDoubleQuote(
|
|
4749
|
+
if (isUnescapedDoubleQuote(str8, i) && value === "" && !valueInsideQuotes) {
|
|
4745
4750
|
valueInsideQuotes = true;
|
|
4746
4751
|
continue;
|
|
4747
4752
|
}
|
|
4748
|
-
if (isUnescapedDoubleQuote(
|
|
4753
|
+
if (isUnescapedDoubleQuote(str8, i) && valueInsideQuotes) {
|
|
4749
4754
|
valueInsideQuotes = false;
|
|
4750
4755
|
continue;
|
|
4751
4756
|
}
|
|
@@ -4812,9 +4817,9 @@ var require_utils = __commonJS({
|
|
|
4812
4817
|
if (!where) {
|
|
4813
4818
|
throw new Error('Parameter `where` not passed. Should be "start", "end" or "only".');
|
|
4814
4819
|
}
|
|
4815
|
-
return function(
|
|
4820
|
+
return function(str8) {
|
|
4816
4821
|
const minCurlyLength = options.leftDelimiter.length + 1 + options.rightDelimiter.length;
|
|
4817
|
-
if (!
|
|
4822
|
+
if (!str8 || typeof str8 !== "string" || str8.length < minCurlyLength) {
|
|
4818
4823
|
return false;
|
|
4819
4824
|
}
|
|
4820
4825
|
function validCurlyLength(curly) {
|
|
@@ -4826,41 +4831,41 @@ var require_utils = __commonJS({
|
|
|
4826
4831
|
const rightDelimiterMinimumShift = minCurlyLength - options.rightDelimiter.length;
|
|
4827
4832
|
switch (where) {
|
|
4828
4833
|
case "start":
|
|
4829
|
-
slice =
|
|
4834
|
+
slice = str8.slice(0, options.leftDelimiter.length);
|
|
4830
4835
|
start = slice === options.leftDelimiter ? 0 : -1;
|
|
4831
|
-
end = start === -1 ? -1 : findRightDelimiter(
|
|
4832
|
-
nextChar =
|
|
4836
|
+
end = start === -1 ? -1 : findRightDelimiter(str8, rightDelimiterMinimumShift, options);
|
|
4837
|
+
nextChar = str8.charAt(end + options.rightDelimiter.length);
|
|
4833
4838
|
if (nextChar && options.rightDelimiter.indexOf(nextChar) !== -1) {
|
|
4834
4839
|
end = -1;
|
|
4835
4840
|
}
|
|
4836
4841
|
break;
|
|
4837
4842
|
case "end":
|
|
4838
|
-
start = findLeftDelimiter(
|
|
4839
|
-
end = start === -1 ? -1 : findRightDelimiter(
|
|
4840
|
-
end = end ===
|
|
4843
|
+
start = findLeftDelimiter(str8, options);
|
|
4844
|
+
end = start === -1 ? -1 : findRightDelimiter(str8, start + rightDelimiterMinimumShift, options);
|
|
4845
|
+
end = end === str8.length - options.rightDelimiter.length ? end : -1;
|
|
4841
4846
|
break;
|
|
4842
4847
|
case "only":
|
|
4843
|
-
slice =
|
|
4848
|
+
slice = str8.slice(0, options.leftDelimiter.length);
|
|
4844
4849
|
start = slice === options.leftDelimiter ? 0 : -1;
|
|
4845
|
-
slice =
|
|
4846
|
-
end = slice === options.rightDelimiter ?
|
|
4850
|
+
slice = str8.slice(str8.length - options.rightDelimiter.length);
|
|
4851
|
+
end = slice === options.rightDelimiter ? str8.length - options.rightDelimiter.length : -1;
|
|
4847
4852
|
break;
|
|
4848
4853
|
default:
|
|
4849
4854
|
throw new Error(`Unexpected case ${where}, expected 'start', 'end' or 'only'`);
|
|
4850
4855
|
}
|
|
4851
|
-
return start !== -1 && end !== -1 && validCurlyLength(
|
|
4856
|
+
return start !== -1 && end !== -1 && validCurlyLength(str8.substring(start, end + options.rightDelimiter.length));
|
|
4852
4857
|
};
|
|
4853
4858
|
};
|
|
4854
|
-
exports.removeDelimiter = function(
|
|
4855
|
-
const start = findLeftDelimiter(
|
|
4859
|
+
exports.removeDelimiter = function(str8, options) {
|
|
4860
|
+
const start = findLeftDelimiter(str8, options);
|
|
4856
4861
|
if (start === -1) {
|
|
4857
|
-
return
|
|
4862
|
+
return str8;
|
|
4858
4863
|
}
|
|
4859
|
-
const end = findRightDelimiter(
|
|
4860
|
-
if (end !==
|
|
4861
|
-
return
|
|
4864
|
+
const end = findRightDelimiter(str8, start + options.leftDelimiter.length, options);
|
|
4865
|
+
if (end !== str8.length - options.rightDelimiter.length) {
|
|
4866
|
+
return str8;
|
|
4862
4867
|
}
|
|
4863
|
-
const prefix =
|
|
4868
|
+
const prefix = str8.slice(0, start);
|
|
4864
4869
|
return /[ \n]$/.test(prefix) ? prefix.slice(0, -1) : prefix;
|
|
4865
4870
|
};
|
|
4866
4871
|
function escapeRegExp(s) {
|
|
@@ -4894,46 +4899,46 @@ var require_utils = __commonJS({
|
|
|
4894
4899
|
function replaceUnsafeChar(ch) {
|
|
4895
4900
|
return HTML_REPLACEMENTS[ch];
|
|
4896
4901
|
}
|
|
4897
|
-
exports.escapeHtml = function(
|
|
4898
|
-
if (HTML_ESCAPE_TEST_RE.test(
|
|
4899
|
-
return
|
|
4902
|
+
exports.escapeHtml = function(str8) {
|
|
4903
|
+
if (HTML_ESCAPE_TEST_RE.test(str8)) {
|
|
4904
|
+
return str8.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);
|
|
4900
4905
|
}
|
|
4901
|
-
return
|
|
4906
|
+
return str8;
|
|
4902
4907
|
};
|
|
4903
|
-
function findRightDelimiter(
|
|
4908
|
+
function findRightDelimiter(str8, start, options) {
|
|
4904
4909
|
let valueInsideQuotes = false;
|
|
4905
|
-
for (let i = start; i <
|
|
4906
|
-
if (isUnescapedDoubleQuote(
|
|
4910
|
+
for (let i = start; i < str8.length; i++) {
|
|
4911
|
+
if (isUnescapedDoubleQuote(str8, i)) {
|
|
4907
4912
|
valueInsideQuotes = !valueInsideQuotes;
|
|
4908
4913
|
continue;
|
|
4909
4914
|
}
|
|
4910
|
-
if (!valueInsideQuotes &&
|
|
4915
|
+
if (!valueInsideQuotes && str8.slice(i, i + options.rightDelimiter.length) === options.rightDelimiter) {
|
|
4911
4916
|
return i;
|
|
4912
4917
|
}
|
|
4913
4918
|
}
|
|
4914
4919
|
return -1;
|
|
4915
4920
|
}
|
|
4916
|
-
function findLeftDelimiter(
|
|
4921
|
+
function findLeftDelimiter(str8, options) {
|
|
4917
4922
|
let start = -1;
|
|
4918
4923
|
let valueInsideQuotes = false;
|
|
4919
|
-
for (let i = 0; i <
|
|
4920
|
-
if (isUnescapedDoubleQuote(
|
|
4924
|
+
for (let i = 0; i < str8.length; i++) {
|
|
4925
|
+
if (isUnescapedDoubleQuote(str8, i)) {
|
|
4921
4926
|
valueInsideQuotes = !valueInsideQuotes;
|
|
4922
4927
|
continue;
|
|
4923
4928
|
}
|
|
4924
|
-
if (!valueInsideQuotes &&
|
|
4929
|
+
if (!valueInsideQuotes && str8.slice(i, i + options.leftDelimiter.length) === options.leftDelimiter) {
|
|
4925
4930
|
start = i;
|
|
4926
4931
|
}
|
|
4927
4932
|
}
|
|
4928
4933
|
return start;
|
|
4929
4934
|
}
|
|
4930
4935
|
exports.findLeftDelimiter = findLeftDelimiter;
|
|
4931
|
-
function isUnescapedDoubleQuote(
|
|
4932
|
-
if (
|
|
4936
|
+
function isUnescapedDoubleQuote(str8, i) {
|
|
4937
|
+
if (str8.charAt(i) !== '"') {
|
|
4933
4938
|
return false;
|
|
4934
4939
|
}
|
|
4935
4940
|
let slashCount = 0;
|
|
4936
|
-
for (let n = i - 1; n >= 0 &&
|
|
4941
|
+
for (let n = i - 1; n >= 0 && str8.charAt(n) === "\\"; n--) {
|
|
4937
4942
|
slashCount++;
|
|
4938
4943
|
}
|
|
4939
4944
|
return slashCount % 2 === 0;
|
|
@@ -4987,7 +4992,7 @@ var require_patterns = __commonJS({
|
|
|
4987
4992
|
children: [
|
|
4988
4993
|
{
|
|
4989
4994
|
shift: -1,
|
|
4990
|
-
type: (
|
|
4995
|
+
type: (str8) => str8 === "image" || str8 === "code_inline"
|
|
4991
4996
|
},
|
|
4992
4997
|
{
|
|
4993
4998
|
shift: 0,
|
|
@@ -5268,7 +5273,7 @@ var require_patterns = __commonJS({
|
|
|
5268
5273
|
// let this token be i = 0 so that we can erase
|
|
5269
5274
|
// the <p>{.a}</p> tokens below
|
|
5270
5275
|
shift: 0,
|
|
5271
|
-
type: (
|
|
5276
|
+
type: (str8) => str8 === "bullet_list_close" || str8 === "ordered_list_close"
|
|
5272
5277
|
},
|
|
5273
5278
|
{
|
|
5274
5279
|
shift: 1,
|
|
@@ -5380,7 +5385,7 @@ var require_patterns = __commonJS({
|
|
|
5380
5385
|
shift: 1,
|
|
5381
5386
|
type: "inline",
|
|
5382
5387
|
children: (arr) => arr.length === 1,
|
|
5383
|
-
content: (
|
|
5388
|
+
content: (str8) => str8.match(__hr) !== null
|
|
5384
5389
|
},
|
|
5385
5390
|
{
|
|
5386
5391
|
shift: 2,
|
|
@@ -5659,6 +5664,13 @@ function leafHtml(node) {
|
|
|
5659
5664
|
}
|
|
5660
5665
|
return void 0;
|
|
5661
5666
|
}
|
|
5667
|
+
function slugifyHeadingText(text4) {
|
|
5668
|
+
return text4.toLowerCase().replace(/[^\w\s-]/g, "").trim().replace(/\s+/g, "-");
|
|
5669
|
+
}
|
|
5670
|
+
var RESERVED_ID = /^(db-|tab-\d|tabpanel-\d|acc-\d|accpanel-\d|fn-|fnref-)/;
|
|
5671
|
+
function pageId(id) {
|
|
5672
|
+
return RESERVED_ID.test(id) ? `h-${id}` : id;
|
|
5673
|
+
}
|
|
5662
5674
|
function stepTitle(node) {
|
|
5663
5675
|
const title = typeof node.props?.title === "string" ? node.props.title.trim() : "";
|
|
5664
5676
|
if (!title)
|
|
@@ -7073,41 +7085,41 @@ var STATUS_VALUES = [
|
|
|
7073
7085
|
];
|
|
7074
7086
|
function parseMeta(frontmatter, options = {}) {
|
|
7075
7087
|
const fm = frontmatter ?? {};
|
|
7076
|
-
const
|
|
7088
|
+
const meta2 = {};
|
|
7077
7089
|
const tags = coerceStringArray(fm.tags);
|
|
7078
7090
|
if (tags)
|
|
7079
|
-
|
|
7091
|
+
meta2.tags = tags;
|
|
7080
7092
|
const category = coerceStringArray(fm.category) ?? deriveCategoryFromSlug(options.slug);
|
|
7081
7093
|
if (category)
|
|
7082
|
-
|
|
7094
|
+
meta2.category = category;
|
|
7083
7095
|
if (typeof fm.type === "string" && fm.type.length > 0) {
|
|
7084
|
-
|
|
7096
|
+
meta2.type = fm.type;
|
|
7085
7097
|
}
|
|
7086
7098
|
if (typeof fm.status === "string" && STATUS_VALUES.includes(fm.status)) {
|
|
7087
|
-
|
|
7099
|
+
meta2.status = fm.status;
|
|
7088
7100
|
}
|
|
7089
7101
|
const audience = coerceStringArray(fm.audience);
|
|
7090
7102
|
if (audience)
|
|
7091
|
-
|
|
7103
|
+
meta2.audience = audience;
|
|
7092
7104
|
const updated = coerceIsoDate(fm.updated);
|
|
7093
7105
|
if (updated)
|
|
7094
|
-
|
|
7106
|
+
meta2.updated = updated;
|
|
7095
7107
|
const created = coerceIsoDate(fm.created);
|
|
7096
7108
|
if (created)
|
|
7097
|
-
|
|
7109
|
+
meta2.created = created;
|
|
7098
7110
|
const author = coerceStringArray(fm.author);
|
|
7099
7111
|
if (author)
|
|
7100
|
-
|
|
7112
|
+
meta2.author = author;
|
|
7101
7113
|
if (typeof fm.weight === "number" && Number.isFinite(fm.weight)) {
|
|
7102
|
-
|
|
7114
|
+
meta2.weight = fm.weight;
|
|
7103
7115
|
}
|
|
7104
7116
|
if (isPlainObject(fm.props)) {
|
|
7105
|
-
|
|
7117
|
+
meta2.props = { ...fm.props };
|
|
7106
7118
|
}
|
|
7107
7119
|
const taxonomies = collectTaxonomies(fm, options.taxonomyNames);
|
|
7108
7120
|
if (taxonomies)
|
|
7109
|
-
|
|
7110
|
-
return
|
|
7121
|
+
meta2.taxonomies = taxonomies;
|
|
7122
|
+
return meta2;
|
|
7111
7123
|
}
|
|
7112
7124
|
function deriveCategoryFromSlug(slug) {
|
|
7113
7125
|
if (!slug)
|
|
@@ -8032,7 +8044,14 @@ var DIRECTIVE_PROPS = {
|
|
|
8032
8044
|
// What data-directives.ts reads (docs/data-files.md)
|
|
8033
8045
|
"data-table": ["src", "path", "columns", "headers", "links", "code"],
|
|
8034
8046
|
"data-cards": ["src", "path", "title", "description", "href", "icon"],
|
|
8035
|
-
"child-links": ["depth", "title"]
|
|
8047
|
+
"child-links": ["depth", "title"],
|
|
8048
|
+
// Named containers (plans/pdf-directives.md)
|
|
8049
|
+
columns: ["count", "gap"],
|
|
8050
|
+
"pdf-keep-together": [],
|
|
8051
|
+
"pdf-only": [],
|
|
8052
|
+
"web-only": [],
|
|
8053
|
+
"pdf-page-break": [],
|
|
8054
|
+
"key-value": ["layout"]
|
|
8036
8055
|
};
|
|
8037
8056
|
function unknownProps(name, props) {
|
|
8038
8057
|
const known = DIRECTIVE_PROPS[name];
|
|
@@ -8598,9 +8617,19 @@ var KNOWN_BLOCK_DIRECTIVES = [
|
|
|
8598
8617
|
"openapi",
|
|
8599
8618
|
// A scoped theme, `:::theme{name="dark"}`: its content in another token
|
|
8600
8619
|
// set (plans/dita-variants-themes.md). A wrapper, so it takes blocks.
|
|
8601
|
-
"theme"
|
|
8620
|
+
"theme",
|
|
8621
|
+
// Named containers (NAMED_CONTAINERS below, plans/pdf-directives.md): text flowing through
|
|
8622
|
+
// columns, and the directives that are about pages or about one output. A `pdf-…` name does
|
|
8623
|
+
// nothing on the web.
|
|
8624
|
+
"columns",
|
|
8625
|
+
"pdf-keep-together",
|
|
8626
|
+
"pdf-only",
|
|
8627
|
+
"web-only",
|
|
8628
|
+
// Labels and their values, around a definition list (NAMED_CONTAINERS)
|
|
8629
|
+
"key-value"
|
|
8602
8630
|
];
|
|
8603
|
-
var
|
|
8631
|
+
var NAMED_CONTAINERS = ["columns", "pdf-keep-together", "pdf-only", "web-only", "pdf-page-break", "key-value"];
|
|
8632
|
+
var LEAF_ONLY_DIRECTIVES = ["youtube", "avatar", "child-links", "data-table", "data-cards", "pdf-page-break"];
|
|
8604
8633
|
var BLOCK_LEAF_DIRECTIVES = [...KNOWN_BLOCK_DIRECTIVES, ...LEAF_ONLY_DIRECTIVES.filter((n) => !KNOWN_BLOCK_DIRECTIVES.includes(n))];
|
|
8605
8634
|
var GENERIC_CONTAINER = "dogsbay_generic";
|
|
8606
8635
|
function containersPlugin(md2) {
|
|
@@ -8790,6 +8819,12 @@ function inlineMarkdown(nodes, blockEnd) {
|
|
|
8790
8819
|
if (!nodes || nodes.length === 0)
|
|
8791
8820
|
return "";
|
|
8792
8821
|
const out = [];
|
|
8822
|
+
let pending = "";
|
|
8823
|
+
const flush = () => {
|
|
8824
|
+
if (pending)
|
|
8825
|
+
out.push(pending);
|
|
8826
|
+
pending = "";
|
|
8827
|
+
};
|
|
8793
8828
|
const stack = [];
|
|
8794
8829
|
const lastEmittedChar = () => {
|
|
8795
8830
|
for (let i = out.length - 1; i >= 0; i--) {
|
|
@@ -8800,13 +8835,15 @@ function inlineMarkdown(nodes, blockEnd) {
|
|
|
8800
8835
|
};
|
|
8801
8836
|
let lastWasOpen = false;
|
|
8802
8837
|
let lastText = nodes.length - 1;
|
|
8803
|
-
while (lastText > 0 && nodes[lastText].type === "text" && !nodes[lastText].text.trim())
|
|
8838
|
+
while (lastText > 0 && (nodes[lastText].type === "break" || nodes[lastText].type === "text" && !nodes[lastText].text.trim()))
|
|
8804
8839
|
lastText--;
|
|
8805
8840
|
for (const [index, node] of nodes.entries()) {
|
|
8806
8841
|
const directive = isInlineDirective(node) ? node : null;
|
|
8807
8842
|
const flaggedCode = node.type === "code" && !!(node.bold || node.italic || node.strikethrough);
|
|
8808
8843
|
if (node.type === "text" || flaggedCode || directive) {
|
|
8809
8844
|
const desired = desiredFormatSet(node);
|
|
8845
|
+
const raw = node.type === "text" ? node.text : void 0;
|
|
8846
|
+
const blank = raw !== void 0 && raw !== "" && !raw.trim();
|
|
8810
8847
|
let keep = 0;
|
|
8811
8848
|
while (keep < stack.length && desired.has(stack[keep].fmt))
|
|
8812
8849
|
keep++;
|
|
@@ -8814,6 +8851,22 @@ function inlineMarkdown(nodes, blockEnd) {
|
|
|
8814
8851
|
out.push(stack.pop().mark);
|
|
8815
8852
|
lastWasOpen = false;
|
|
8816
8853
|
}
|
|
8854
|
+
if (blank) {
|
|
8855
|
+
pending += raw;
|
|
8856
|
+
continue;
|
|
8857
|
+
}
|
|
8858
|
+
if (pending) {
|
|
8859
|
+
flush();
|
|
8860
|
+
lastWasOpen = false;
|
|
8861
|
+
}
|
|
8862
|
+
const core = raw?.trimEnd();
|
|
8863
|
+
const trail = raw !== void 0 ? raw.slice(core.length) : "";
|
|
8864
|
+
let lead = core !== void 0 ? core.slice(0, core.length - core.trimStart().length) : "";
|
|
8865
|
+
if (lead && FORMAT_ORDER.some((fmt) => desired.has(fmt) && !stack.some((e) => e.fmt === fmt))) {
|
|
8866
|
+
out.push(lead);
|
|
8867
|
+
lastWasOpen = false;
|
|
8868
|
+
} else
|
|
8869
|
+
lead = "";
|
|
8817
8870
|
for (const fmt of FORMAT_ORDER) {
|
|
8818
8871
|
if (desired.has(fmt) && !stack.some((e) => e.fmt === fmt)) {
|
|
8819
8872
|
const std = FORMAT_MARK[fmt];
|
|
@@ -8823,11 +8876,18 @@ function inlineMarkdown(nodes, blockEnd) {
|
|
|
8823
8876
|
lastWasOpen = true;
|
|
8824
8877
|
}
|
|
8825
8878
|
}
|
|
8826
|
-
const body = directive ? renderInlineDirectiveBody(directive) : flaggedCode ? renderInlineCode(node.text) + (node.minja ? "{minja}" : "") : escapeInlineText(
|
|
8879
|
+
const body = directive ? renderInlineDirectiveBody(directive) : flaggedCode ? renderInlineCode(node.text) + (node.minja ? "{minja}" : "") : escapeLineStarts(escapeInlineText(core.slice(lead.length), blockEnd && index === lastText), lastEmittedChar() === "\n");
|
|
8827
8880
|
out.push(body);
|
|
8828
8881
|
if (body.length > 0)
|
|
8829
8882
|
lastWasOpen = false;
|
|
8883
|
+
pending = trail;
|
|
8830
8884
|
} else {
|
|
8885
|
+
if (node.type === "break" && index > lastText)
|
|
8886
|
+
continue;
|
|
8887
|
+
if (pending) {
|
|
8888
|
+
flush();
|
|
8889
|
+
lastWasOpen = false;
|
|
8890
|
+
}
|
|
8831
8891
|
const rendered = renderInline(node);
|
|
8832
8892
|
out.push(rendered);
|
|
8833
8893
|
if (rendered.length > 0)
|
|
@@ -8837,6 +8897,7 @@ function inlineMarkdown(nodes, blockEnd) {
|
|
|
8837
8897
|
while (stack.length > 0) {
|
|
8838
8898
|
out.push(stack.pop().mark);
|
|
8839
8899
|
}
|
|
8900
|
+
flush();
|
|
8840
8901
|
return out.join("");
|
|
8841
8902
|
}
|
|
8842
8903
|
function desiredFormatSet(node) {
|
|
@@ -8885,7 +8946,7 @@ function renderInline(node) {
|
|
|
8885
8946
|
case "html-inline":
|
|
8886
8947
|
return node.html;
|
|
8887
8948
|
case "break":
|
|
8888
|
-
return "
|
|
8949
|
+
return "\\\n";
|
|
8889
8950
|
default:
|
|
8890
8951
|
return "";
|
|
8891
8952
|
}
|
|
@@ -8934,14 +8995,37 @@ function renderInlineAttrs(attrs2) {
|
|
|
8934
8995
|
return "";
|
|
8935
8996
|
return `{${parts.join(" ")}}`;
|
|
8936
8997
|
}
|
|
8998
|
+
function rawAlt(alt) {
|
|
8999
|
+
if (alt.length > 2e3 || !safeLabel(alt))
|
|
9000
|
+
return false;
|
|
9001
|
+
const back = parseInline(``);
|
|
9002
|
+
return back.length === 1 && back[0].type === "image" && back[0].alt === alt;
|
|
9003
|
+
}
|
|
9004
|
+
function safeLabel(text4) {
|
|
9005
|
+
if (/[\r\n]/.test(text4) || text4.length > 1e4 || /\\$/.test(text4.replace(/\\\\/g, "")))
|
|
9006
|
+
return false;
|
|
9007
|
+
let depth = 0;
|
|
9008
|
+
for (let i = 0; i < text4.length; i++) {
|
|
9009
|
+
const c = text4[i];
|
|
9010
|
+
if (c === "\\")
|
|
9011
|
+
i++;
|
|
9012
|
+
else if (c === "[")
|
|
9013
|
+
depth++;
|
|
9014
|
+
else if (c === "]" && --depth < 0)
|
|
9015
|
+
return false;
|
|
9016
|
+
}
|
|
9017
|
+
return depth === 0;
|
|
9018
|
+
}
|
|
8937
9019
|
function renderImage(node) {
|
|
8938
|
-
const alt = node.alt ? escapeInlineText(node.alt) : "";
|
|
9020
|
+
const alt = node.alt ? rawAlt(node.alt) ? node.alt : escapeInlineText(node.alt.replace(/\s*\n\s*/g, " ")) : "";
|
|
8939
9021
|
const src = escapeLinkDest(node.src);
|
|
8940
9022
|
const title = node.title ? ` ${escapeAttrValue(node.title)}` : "";
|
|
8941
9023
|
const attrs2 = renderInlineAttrs(node.attrs);
|
|
8942
9024
|
return `${attrs2}`;
|
|
8943
9025
|
}
|
|
8944
|
-
function renderInlineCode(
|
|
9026
|
+
function renderInlineCode(given) {
|
|
9027
|
+
const text4 = given.includes("\n") ? given.replace(/([ \t]?)\n([ \t]*)([^\n]*)/g, (_m, before, space, line) => !before && line.trim() && lineStart(line) === line && !/^[$<]/.test(line) ? `
|
|
9028
|
+
${space}${line}` : `${before} ${space}${line}`) : given;
|
|
8945
9029
|
let maxRun = 0;
|
|
8946
9030
|
for (const match of text4.matchAll(/`+/g)) {
|
|
8947
9031
|
if (match[0].length > maxRun)
|
|
@@ -8976,6 +9060,20 @@ function escapeInlineText(text4, last = false) {
|
|
|
8976
9060
|
const escaped = escapePreservingMinja(text4, escapeInlineTextSegment);
|
|
8977
9061
|
return last ? escaped.replace(/(?<=(?:^|[^\\])(?:\\\\)*)\{(?![{%])(?!#[^}]*#\})(?=[^{}\n]*\}[ \t]*$)/, "\\{") : escaped;
|
|
8978
9062
|
}
|
|
9063
|
+
function escapeLineStarts(text4, startsLine) {
|
|
9064
|
+
if (!startsLine && !text4.includes("\n"))
|
|
9065
|
+
return text4;
|
|
9066
|
+
const lines = text4.replace(/\n[ \t]*(?=\n)/g, "").split("\n");
|
|
9067
|
+
return lines.map((line, i) => i === 0 && !startsLine ? line : lineStart(line)).join("\n");
|
|
9068
|
+
}
|
|
9069
|
+
var DELIMITER_ROW = /^[ \t]*\|?[ \t]*:?-+:?[ \t]*(?:\|[ \t]*:?-+:?[ \t]*)*\|?[ \t]*$/;
|
|
9070
|
+
function lineStart(line) {
|
|
9071
|
+
const space = /^[ \t]*/.exec(line)[0];
|
|
9072
|
+
const rest = line.slice(space.length);
|
|
9073
|
+
if (rest.includes("|") && DELIMITER_ROW.test(rest))
|
|
9074
|
+
return space + "\\" + rest;
|
|
9075
|
+
return space + rest.replace(/^([-+*])(?=[ \t]|$)/, "\\$1").replace(/^(\d{1,9})([.)])(?=[ \t]|$)/, "$1\\$2").replace(/^(#{1,6})(?=[ \t]|$)/, "\\$1").replace(/^>/, "\\>").replace(/^(:{2,})/, "\\$1").replace(/^:(?=[ \t])/, "\\:").replace(/^\$/, "\\$$").replace(/^([=-])(?=[=-]*[ \t]*$)/, "\\$1").replace(/^(_)(?=(?:[ \t]*_){2,}[ \t]*$)/, "\\$1").replace(/^(~{3,})/, "\\$1");
|
|
9076
|
+
}
|
|
8979
9077
|
function escapeInlineTextSegment(text4) {
|
|
8980
9078
|
return text4.replace(/\\/g, "\\\\").replace(/([*`\[\]])/g, "\\$1").replace(/(^|[^\w:]):([A-Za-z][\w-]*)\{/g, "$1:$2\\{").replace(/::(?=[A-Za-z])/g, (m, i, s) => i > 0 && PRECEDES_TEXT.test(s[i - 1]) ? m : "\\::").replace(/<(?=[A-Za-z/!?])/g, "\\<").replace(/_/g, (m, i, s) => i === 0 || /[\W_]/.test(s[i - 1]) || i === s.length - 1 || /[\W_]/.test(s[i + 1]) ? "\\_" : m).replace(/={2,}/g, (m, i, s) => {
|
|
8981
9079
|
const before = s[i - 1] ?? " ";
|
|
@@ -9057,9 +9155,9 @@ function markPlugin(md2) {
|
|
|
9057
9155
|
md2.inline.ruler.before("emphasis", "mark", tokenize);
|
|
9058
9156
|
md2.inline.ruler2.before("emphasis", "mark", (state) => {
|
|
9059
9157
|
postProcess(state, state.delimiters);
|
|
9060
|
-
for (const
|
|
9061
|
-
if (
|
|
9062
|
-
postProcess(state,
|
|
9158
|
+
for (const meta2 of state.tokens_meta)
|
|
9159
|
+
if (meta2?.delimiters)
|
|
9160
|
+
postProcess(state, meta2.delimiters);
|
|
9063
9161
|
return false;
|
|
9064
9162
|
});
|
|
9065
9163
|
}
|
|
@@ -9304,8 +9402,8 @@ function stashRawRegions(source, stash) {
|
|
|
9304
9402
|
const line = source.slice(0, start).split("\n").length - 1;
|
|
9305
9403
|
if (fences[line])
|
|
9306
9404
|
continue;
|
|
9307
|
-
const
|
|
9308
|
-
const backticksBefore = (source.slice(
|
|
9405
|
+
const lineStart2 = source.lastIndexOf("\n", start - 1) + 1;
|
|
9406
|
+
const backticksBefore = (source.slice(lineStart2, start).match(/`/g) ?? []).length;
|
|
9309
9407
|
if (backticksBefore % 2 === 1)
|
|
9310
9408
|
continue;
|
|
9311
9409
|
result += source.slice(last, start) + stash({ raw: m[0], form: "tag", keyword: "raw" });
|
|
@@ -9604,8 +9702,8 @@ function notThisToken(text4, at) {
|
|
|
9604
9702
|
return true;
|
|
9605
9703
|
if (text4[at - 1] === "\\")
|
|
9606
9704
|
return true;
|
|
9607
|
-
const
|
|
9608
|
-
return (text4.slice(
|
|
9705
|
+
const lineStart2 = text4.lastIndexOf("\n", at - 1) + 1;
|
|
9706
|
+
return (text4.slice(lineStart2, at).match(/`/g) ?? []).length % 2 === 1;
|
|
9609
9707
|
}
|
|
9610
9708
|
function blockForm(tag) {
|
|
9611
9709
|
if (LEAF_ONLY_DIRECTIVES.includes(tag))
|
|
@@ -9923,6 +10021,7 @@ function resolvedStyle(options) {
|
|
|
9923
10021
|
function resolveOptions(options) {
|
|
9924
10022
|
return {
|
|
9925
10023
|
githubCallouts: options?.githubCallouts ?? true,
|
|
10024
|
+
calloutForms: options?.calloutForms === "writer" ? "writer" : "as-written",
|
|
9926
10025
|
indentNested: options?.indentNested ?? false,
|
|
9927
10026
|
yamlThreshold: options?.yamlThreshold ?? 3,
|
|
9928
10027
|
literalBlockStarts: options?.literalBlockStarts ?? true,
|
|
@@ -10399,12 +10498,17 @@ function renderEndpoint(node) {
|
|
|
10399
10498
|
}
|
|
10400
10499
|
return out.join("\n").trimEnd();
|
|
10401
10500
|
}
|
|
10501
|
+
function oneLine(inline3) {
|
|
10502
|
+
if (!inline3?.some((n) => n.type === "break" || n.type === "text" && n.text.includes("\n")))
|
|
10503
|
+
return inline3;
|
|
10504
|
+
return inline3.map((n) => n.type === "break" ? { type: "text", text: " " } : n.type === "text" && n.text.includes("\n") ? { ...n, text: n.text.replace(/[ \t]*\n[ \t]*/g, " ") } : n);
|
|
10505
|
+
}
|
|
10402
10506
|
function renderHeading(node) {
|
|
10403
10507
|
const level = Math.min(6, Math.max(1, Number(node.props?.level) || 1));
|
|
10404
10508
|
const hashes = "#".repeat(level);
|
|
10405
|
-
const text4 = inlineToDogsbayMd(node.inline) || (node.html ?? "") || (typeof node.props?.text === "string" ? node.props.text : "");
|
|
10509
|
+
const text4 = inlineToDogsbayMd(oneLine(node.inline)) || (node.html ?? "") || (typeof node.props?.text === "string" ? node.props.text : "");
|
|
10406
10510
|
const attrs2 = splitProps(node.props, ["level", "slug", "text"]);
|
|
10407
|
-
const slug = node.props?.slug;
|
|
10511
|
+
const slug = node.meta?.idGenerated === true ? void 0 : node.props?.slug;
|
|
10408
10512
|
if (slug && !attrs2.id) {
|
|
10409
10513
|
attrs2.id = slug;
|
|
10410
10514
|
}
|
|
@@ -10480,9 +10584,10 @@ function renderList(node, ctx, ordered) {
|
|
|
10480
10584
|
const items3 = node.children ?? [];
|
|
10481
10585
|
const start = ordered ? Number.isFinite(Number(node.props?.start ?? 1)) ? Number(node.props?.start ?? 1) : 1 : 0;
|
|
10482
10586
|
const same3 = ordered && (ctx.listNumbers === "same" || ctx.listNumbers === "source" && node.meta?.sameNumbers === true);
|
|
10587
|
+
const loose = node.meta?.loose === true;
|
|
10483
10588
|
return items3.map((item, idx) => {
|
|
10484
10589
|
const marker = ordered ? `${same3 ? start : start + idx}.` : "-";
|
|
10485
|
-
const body = renderListItem(item, ctx);
|
|
10590
|
+
const body = renderListItem(item, ctx, loose);
|
|
10486
10591
|
const [first, ...rest] = body.split("\n");
|
|
10487
10592
|
const aligned = ctx.listIndent === "aligned" && /^\S/.test(first);
|
|
10488
10593
|
const width = aligned || ctx.listIndent !== "marker" && startsWithText(item) ? Math.max(4, marker.length + 1) : marker.length + 1;
|
|
@@ -10490,13 +10595,35 @@ function renderList(node, ctx, ordered) {
|
|
|
10490
10595
|
const continuation = rest.map((l) => l ? pad + l : l).join("\n");
|
|
10491
10596
|
const gap = aligned ? " ".repeat(width - marker.length) : " ";
|
|
10492
10597
|
return `${marker}${gap}${first}${continuation ? "\n" + continuation : ""}`;
|
|
10493
|
-
}).join("\n");
|
|
10598
|
+
}).join(loose ? "\n\n" : "\n");
|
|
10494
10599
|
}
|
|
10495
10600
|
function startsWithText(item) {
|
|
10496
10601
|
const first = item.inline && item.inline.length > 0 ? "text" : item.children?.[0]?.type;
|
|
10497
10602
|
if (first !== "text" && first !== "paragraph" && first !== "prose")
|
|
10498
10603
|
return false;
|
|
10499
|
-
return !holdsHtml(item);
|
|
10604
|
+
return !holdsHtml(item) && !holdsCodeBreak(item);
|
|
10605
|
+
}
|
|
10606
|
+
function joinCodeBreaks(node) {
|
|
10607
|
+
if (!holdsCodeBreak(node, true))
|
|
10608
|
+
return node;
|
|
10609
|
+
const inline3 = (list5) => list5.map((n) => n.type === "code" && n.text.includes("\n") ? { ...n, text: n.text.replace(/\n/g, " ") } : n.type === "link" || n.type === "highlight" ? { ...n, children: inline3(n.children) } : n);
|
|
10610
|
+
return { ...node, ...node.inline ? { inline: inline3(node.inline) } : {}, ...node.children ? { children: node.children.map(joinCodeBreaks) } : {} };
|
|
10611
|
+
}
|
|
10612
|
+
function holdsCodeBreak(node, deep = false) {
|
|
10613
|
+
for (const list5 of [node.inline, node.children]) {
|
|
10614
|
+
if (!Array.isArray(list5))
|
|
10615
|
+
continue;
|
|
10616
|
+
for (const c of list5) {
|
|
10617
|
+
if (!c || typeof c !== "object")
|
|
10618
|
+
continue;
|
|
10619
|
+
const n = c;
|
|
10620
|
+
if (n.type === "code" && typeof n.text === "string" && n.text.includes("\n"))
|
|
10621
|
+
return true;
|
|
10622
|
+
if ((deep || n.type !== "unordered-list" && n.type !== "ordered-list") && holdsCodeBreak(n, deep))
|
|
10623
|
+
return true;
|
|
10624
|
+
}
|
|
10625
|
+
}
|
|
10626
|
+
return false;
|
|
10500
10627
|
}
|
|
10501
10628
|
function holdsHtml(node) {
|
|
10502
10629
|
if (node.type === "html" || node.type === "html-inline")
|
|
@@ -10510,15 +10637,25 @@ function holdsHtml(node) {
|
|
|
10510
10637
|
}
|
|
10511
10638
|
return false;
|
|
10512
10639
|
}
|
|
10513
|
-
|
|
10640
|
+
var TIGHT_NEXT = /* @__PURE__ */ new Set(["unordered-list", "ordered-list", "code", "blockquote", "heading", "callout", "table", "math-block"]);
|
|
10641
|
+
var OPEN_ENDED = /* @__PURE__ */ new Set(["table", "paragraph", "html", "prose"]);
|
|
10642
|
+
function renderListItem(node, ctx, loose = true) {
|
|
10514
10643
|
const box = typeof node.props?.checked === "boolean" ? node.props.checked ? "[x] " : "[ ] " : "";
|
|
10515
10644
|
const inline3 = box + inlineToDogsbayMd(node.inline);
|
|
10516
|
-
const
|
|
10517
|
-
if (inline3
|
|
10518
|
-
|
|
10519
|
-
|
|
10520
|
-
|
|
10521
|
-
|
|
10645
|
+
const parts = [];
|
|
10646
|
+
if (inline3)
|
|
10647
|
+
parts.push({ type: "paragraph", md: inline3 });
|
|
10648
|
+
for (const c of node.children ?? []) {
|
|
10649
|
+
const md2 = renderNode(c, ctx);
|
|
10650
|
+
if (md2)
|
|
10651
|
+
parts.push({ type: c.type, md: md2 });
|
|
10652
|
+
}
|
|
10653
|
+
let out = parts[0]?.md ?? "";
|
|
10654
|
+
for (let i = 1; i < parts.length; i++) {
|
|
10655
|
+
const tight = !loose && TIGHT_NEXT.has(parts[i].type) && (i === 1 && inline3 ? true : !OPEN_ENDED.has(parts[i - 1].type));
|
|
10656
|
+
out += (tight ? "\n" : "\n\n") + parts[i].md;
|
|
10657
|
+
}
|
|
10658
|
+
return out;
|
|
10522
10659
|
}
|
|
10523
10660
|
function renderInlineOrChildren(node, ctx) {
|
|
10524
10661
|
const inline3 = inlineToDogsbayMd(node.inline);
|
|
@@ -10538,7 +10675,9 @@ function renderCallout(node, ctx) {
|
|
|
10538
10675
|
const props = node.props ?? {};
|
|
10539
10676
|
const hasOnlyTypeProp = Object.keys(props).every((k) => k === "type");
|
|
10540
10677
|
const labelled = typeof node.meta?.closer === "string";
|
|
10541
|
-
|
|
10678
|
+
const form = ctx.calloutForms === "writer" ? void 0 : node.meta?.form;
|
|
10679
|
+
const github = form === "github" ? true : form === "directive" ? false : ctx.githubCallouts;
|
|
10680
|
+
if (github && hasOnlyTypeProp && !labelled && GITHUB_CALLOUT_TYPES.has(type)) {
|
|
10542
10681
|
const tag = `[!${type.toUpperCase()}]`;
|
|
10543
10682
|
return [tag, guardRule(body)].join("\n").split("\n").map((l) => l ? `> ${l}` : ">").join("\n");
|
|
10544
10683
|
}
|
|
@@ -10603,8 +10742,8 @@ function renderTable(node, ctx) {
|
|
|
10603
10742
|
return "";
|
|
10604
10743
|
const headerCells = (headerRow.children ?? []).map((c) => renderTableCell(c));
|
|
10605
10744
|
const alignOf = (col) => {
|
|
10606
|
-
for (const
|
|
10607
|
-
const a = (
|
|
10745
|
+
for (const row2 of [headerRow, ...bodyRows]) {
|
|
10746
|
+
const a = (row2.children ?? [])[col]?.props?.align;
|
|
10608
10747
|
if (typeof a === "string")
|
|
10609
10748
|
return a;
|
|
10610
10749
|
}
|
|
@@ -10622,12 +10761,13 @@ function renderTable(node, ctx) {
|
|
|
10622
10761
|
return "---";
|
|
10623
10762
|
}
|
|
10624
10763
|
});
|
|
10764
|
+
const row = (cells) => "|" + cells.map((c) => c ? ` ${c} ` : " ").join("|") + "|";
|
|
10625
10765
|
const lines = [
|
|
10626
|
-
|
|
10627
|
-
|
|
10766
|
+
row(headerCells),
|
|
10767
|
+
writtenDelimiter(node, separator) ?? row(separator)
|
|
10628
10768
|
];
|
|
10629
|
-
for (const
|
|
10630
|
-
lines.push(
|
|
10769
|
+
for (const r of bodyRows) {
|
|
10770
|
+
lines.push(row((r.children ?? []).map((c) => renderTableCell(c))));
|
|
10631
10771
|
}
|
|
10632
10772
|
const pipe = lines.join("\n");
|
|
10633
10773
|
const attrs2 = renderAttrs(splitProps(node.props));
|
|
@@ -10637,6 +10777,16 @@ function renderTable(node, ctx) {
|
|
|
10637
10777
|
${attrs2}`;
|
|
10638
10778
|
return pipe;
|
|
10639
10779
|
}
|
|
10780
|
+
function writtenDelimiter(node, separator) {
|
|
10781
|
+
const written = node.meta?.delimiter;
|
|
10782
|
+
if (typeof written !== "string" || written.length > 1e4 || /[\r\n]/.test(written) || !written.includes("|") || separator.length < 2)
|
|
10783
|
+
return void 0;
|
|
10784
|
+
const cells = written.trim().replace(/^\|/, "").replace(/\|$/, "").split("|").map((c) => c.trim());
|
|
10785
|
+
if (cells.length !== separator.length || !cells.every((c) => /^:?-+:?$/.test(c)))
|
|
10786
|
+
return void 0;
|
|
10787
|
+
const align = (c) => c.startsWith(":") ? c.endsWith(":") ? "c" : "l" : c.endsWith(":") ? "r" : "";
|
|
10788
|
+
return cells.every((c, i) => align(c) === align(separator[i])) ? written : void 0;
|
|
10789
|
+
}
|
|
10640
10790
|
function cellIsComplex(cell) {
|
|
10641
10791
|
const cs = Number(cell.props?.colspan ?? 1);
|
|
10642
10792
|
const rs = Number(cell.props?.rowspan ?? 1);
|
|
@@ -10816,7 +10966,7 @@ function termLabel(text4) {
|
|
|
10816
10966
|
}
|
|
10817
10967
|
function renderTabItem(node, ctx) {
|
|
10818
10968
|
const label = termLabel(String(node.props?.label ?? node.props?.title ?? node.props?.value ?? "Tab"));
|
|
10819
|
-
const content = (node.children ?? []).map((c) => renderNode(c, ctx)).join("\n\n");
|
|
10969
|
+
const content = (node.children ?? []).map((c) => renderNode(joinCodeBreaks(c), ctx)).join("\n\n");
|
|
10820
10970
|
const [first, ...rest] = content.split("\n");
|
|
10821
10971
|
const pad = " ";
|
|
10822
10972
|
const restLines = rest.map((l) => l ? pad + l : l).join("\n");
|
|
@@ -10837,6 +10987,7 @@ function renderSteps(node, ctx) {
|
|
|
10837
10987
|
if (stepChildren.length > 0) {
|
|
10838
10988
|
list5 = {
|
|
10839
10989
|
type: "ordered-list",
|
|
10990
|
+
...node.meta?.loose === true ? { meta: { loose: true } } : {},
|
|
10840
10991
|
children: stepChildren.map((step) => ({
|
|
10841
10992
|
type: "list-item",
|
|
10842
10993
|
inline: step.inline,
|
|
@@ -10952,8 +11103,9 @@ function renderDeflist(node, ctx) {
|
|
|
10952
11103
|
currentTerm = currentTerm !== null && !termOpen ? `${currentTerm}<br>${term}` : term;
|
|
10953
11104
|
termOpen = false;
|
|
10954
11105
|
} else if (child.type === "dd" && currentTerm !== null) {
|
|
10955
|
-
const
|
|
10956
|
-
const
|
|
11106
|
+
const dd = joinCodeBreaks(child);
|
|
11107
|
+
const def = (dd.children ?? []).map((c) => renderNode(c, ctx)).join("\n\n");
|
|
11108
|
+
const inline3 = inlineToDogsbayMd(dd.inline);
|
|
10957
11109
|
const defBody = [inline3, def].filter(Boolean).join("\n\n");
|
|
10958
11110
|
const [first, ...rest] = defBody.split("\n");
|
|
10959
11111
|
const pad = " ";
|
|
@@ -10983,7 +11135,7 @@ function renderAccordion(node, ctx) {
|
|
|
10983
11135
|
}
|
|
10984
11136
|
function renderAccordionDefItem(node, ctx) {
|
|
10985
11137
|
const label = termLabel(String(node.props?.label ?? node.props?.title ?? "Item"));
|
|
10986
|
-
const content = (node.children ?? []).map((c) => renderNode(c, ctx)).join("\n\n");
|
|
11138
|
+
const content = (node.children ?? []).map((c) => renderNode(joinCodeBreaks(c), ctx)).join("\n\n");
|
|
10987
11139
|
const [first, ...rest] = content.split("\n");
|
|
10988
11140
|
const pad = " ";
|
|
10989
11141
|
const restLines = rest.map((l) => l ? pad + l : l).join("\n");
|
|
@@ -11061,6 +11213,8 @@ function renderUnknown(node, ctx) {
|
|
|
11061
11213
|
return renderBlockDirective({ name, props: node.props, body, yamlEligible: true }, ctx);
|
|
11062
11214
|
}
|
|
11063
11215
|
const attrs2 = renderAttrs(splitProps(node.props, [])).trim();
|
|
11216
|
+
if (name === "pdf-page-break" && !body && !title)
|
|
11217
|
+
return `::pdf-page-break${attrs2}`;
|
|
11064
11218
|
return `:::${name}${title}${attrs2 ? (title ? " " : "") + attrs2 : ""}
|
|
11065
11219
|
${guardRule(body)}
|
|
11066
11220
|
:::`;
|
|
@@ -11082,11 +11236,23 @@ ${guardRule(body)}
|
|
|
11082
11236
|
}
|
|
11083
11237
|
|
|
11084
11238
|
// node_modules/@dogsbay/format-dogsbay-md/dist/parse.js
|
|
11239
|
+
var keepSoftBreaks = false;
|
|
11240
|
+
var keepWritten = false;
|
|
11085
11241
|
function sourceLineOf(source) {
|
|
11086
11242
|
let lines;
|
|
11087
11243
|
return (line) => (lines ??= source.split(/\r\n|\n/))[line - 1];
|
|
11088
11244
|
}
|
|
11089
11245
|
function dogsbayMdToTree(source, options) {
|
|
11246
|
+
const outer = [keepSoftBreaks, keepWritten];
|
|
11247
|
+
keepWritten = options?.asWritten === true;
|
|
11248
|
+
keepSoftBreaks = options?.softBreaks === true || keepWritten;
|
|
11249
|
+
try {
|
|
11250
|
+
return parseTree(source, options);
|
|
11251
|
+
} finally {
|
|
11252
|
+
[keepSoftBreaks, keepWritten] = outer;
|
|
11253
|
+
}
|
|
11254
|
+
}
|
|
11255
|
+
function parseTree(source, options) {
|
|
11090
11256
|
if (options?.diagnostics && /\r(?!\n)/.test(source)) {
|
|
11091
11257
|
const { diagnostics: diagnostics2 } = dogsbayMdToTree(source.replace(/\r(?!\n)/g, "\n"), { ...options, sourceLines: false });
|
|
11092
11258
|
return { ...dogsbayMdToTree(source, { ...options, diagnostics: false }), ...diagnostics2 ? { diagnostics: diagnostics2 } : {} };
|
|
@@ -11294,6 +11460,49 @@ function parseInline(source) {
|
|
|
11294
11460
|
return [];
|
|
11295
11461
|
return tokensToInline(tokens[0].children ?? []);
|
|
11296
11462
|
}
|
|
11463
|
+
function codeBreaks(raw, children) {
|
|
11464
|
+
if (/\\`|<[^>\n]*`/.test(raw))
|
|
11465
|
+
return;
|
|
11466
|
+
let cursor = 0;
|
|
11467
|
+
for (const child of children) {
|
|
11468
|
+
if (child.type !== "code_inline")
|
|
11469
|
+
continue;
|
|
11470
|
+
const run = child.markup;
|
|
11471
|
+
let found = false;
|
|
11472
|
+
for (let tries = 0; tries < 64 && !found; tries++) {
|
|
11473
|
+
const open = raw.indexOf(run, cursor);
|
|
11474
|
+
if (open < 0)
|
|
11475
|
+
return;
|
|
11476
|
+
const afterOpen = open + run.length;
|
|
11477
|
+
if (raw[open - 1] === "`" || raw[afterOpen] === "`") {
|
|
11478
|
+
cursor = afterOpen;
|
|
11479
|
+
while (raw[cursor] === "`")
|
|
11480
|
+
cursor++;
|
|
11481
|
+
continue;
|
|
11482
|
+
}
|
|
11483
|
+
let close = raw.indexOf(run, afterOpen);
|
|
11484
|
+
while (close >= 0 && raw[close + run.length] === "`") {
|
|
11485
|
+
close = raw.indexOf(run, close + run.length);
|
|
11486
|
+
while (close >= 0 && raw[close - 1] === "`")
|
|
11487
|
+
close = raw.indexOf(run, close + 1);
|
|
11488
|
+
}
|
|
11489
|
+
if (close < 0)
|
|
11490
|
+
return;
|
|
11491
|
+
const body = raw.slice(afterOpen, close);
|
|
11492
|
+
const read = body.replace(/\n/g, " ");
|
|
11493
|
+
const strip2 = /^ (.+) $/.test(read);
|
|
11494
|
+
if ((strip2 ? read.slice(1, -1) : read) === child.content) {
|
|
11495
|
+
if (body.includes("\n"))
|
|
11496
|
+
child.content = strip2 ? body.slice(1, -1) : body;
|
|
11497
|
+
cursor = close + run.length;
|
|
11498
|
+
found = true;
|
|
11499
|
+
} else
|
|
11500
|
+
cursor = afterOpen;
|
|
11501
|
+
}
|
|
11502
|
+
if (!found)
|
|
11503
|
+
return;
|
|
11504
|
+
}
|
|
11505
|
+
}
|
|
11297
11506
|
var shared;
|
|
11298
11507
|
function sharedParser() {
|
|
11299
11508
|
return shared ??= createParser();
|
|
@@ -11312,6 +11521,13 @@ function createParser() {
|
|
|
11312
11521
|
md2.use(blockLeafDirectivePlugin);
|
|
11313
11522
|
md2.use(containersPlugin);
|
|
11314
11523
|
md2.use(mathPlugin);
|
|
11524
|
+
md2.core.ruler.push("dogsbay_code_breaks", (state) => {
|
|
11525
|
+
if (!keepWritten)
|
|
11526
|
+
return;
|
|
11527
|
+
for (const tok of state.tokens)
|
|
11528
|
+
if (tok.type === "inline" && tok.children && tok.content.includes("\n"))
|
|
11529
|
+
codeBreaks(tok.content, tok.children);
|
|
11530
|
+
});
|
|
11315
11531
|
md2.core.ruler.push("dogsbay_attr_unescape", (state) => {
|
|
11316
11532
|
const visit = (tokens) => {
|
|
11317
11533
|
for (const tok of tokens) {
|
|
@@ -11528,8 +11744,8 @@ function consumeFootnoteBlock(ctx) {
|
|
|
11528
11744
|
}
|
|
11529
11745
|
function consumeFootnoteDef(ctx) {
|
|
11530
11746
|
const open = ctx.tokens[ctx.i];
|
|
11531
|
-
const
|
|
11532
|
-
const label =
|
|
11747
|
+
const meta2 = open.meta ?? {};
|
|
11748
|
+
const label = meta2.label ?? String((meta2.id ?? 0) + 1);
|
|
11533
11749
|
ctx.i++;
|
|
11534
11750
|
let close = ctx.i;
|
|
11535
11751
|
while (close < ctx.tokens.length && ctx.tokens[close].type !== "footnote_close")
|
|
@@ -11650,6 +11866,7 @@ function consumeParagraph(ctx) {
|
|
|
11650
11866
|
return node;
|
|
11651
11867
|
}
|
|
11652
11868
|
function consumeList(ctx, ordered) {
|
|
11869
|
+
const openAt = ctx.i;
|
|
11653
11870
|
const open = ctx.tokens[ctx.i];
|
|
11654
11871
|
ctx.i++;
|
|
11655
11872
|
const items3 = [];
|
|
@@ -11672,6 +11889,8 @@ function consumeList(ctx, ordered) {
|
|
|
11672
11889
|
type: ordered ? "ordered-list" : "unordered-list",
|
|
11673
11890
|
children: items3
|
|
11674
11891
|
};
|
|
11892
|
+
if (looseList(ctx.tokens, openAt))
|
|
11893
|
+
node.meta = { ...node.meta, loose: true };
|
|
11675
11894
|
if (ordered) {
|
|
11676
11895
|
const startAttr = open.attrs?.find(([k]) => k === "start");
|
|
11677
11896
|
if (startAttr) {
|
|
@@ -11682,6 +11901,17 @@ function consumeList(ctx, ordered) {
|
|
|
11682
11901
|
}
|
|
11683
11902
|
return node;
|
|
11684
11903
|
}
|
|
11904
|
+
function looseList(tokens, start) {
|
|
11905
|
+
const open = tokens[start];
|
|
11906
|
+
for (let i = start + 1; i < tokens.length; i++) {
|
|
11907
|
+
const t = tokens[i];
|
|
11908
|
+
if (t.level <= open.level)
|
|
11909
|
+
break;
|
|
11910
|
+
if (t.type === "paragraph_open" && t.level === open.level + 2)
|
|
11911
|
+
return !t.hidden;
|
|
11912
|
+
}
|
|
11913
|
+
return false;
|
|
11914
|
+
}
|
|
11685
11915
|
function consumeListItem(ctx) {
|
|
11686
11916
|
const open = ctx.tokens[ctx.i];
|
|
11687
11917
|
const raw = ctx.tokens[ctx.i + 1]?.type === "paragraph_open" && ctx.tokens[ctx.i + 2]?.type === "inline" ? ctx.tokens[ctx.i + 2].content ?? "" : "";
|
|
@@ -11783,7 +12013,8 @@ function consumeBlockquote(ctx) {
|
|
|
11783
12013
|
return {
|
|
11784
12014
|
type: "callout",
|
|
11785
12015
|
props: { type: type.toLowerCase() },
|
|
11786
|
-
children: calloutChildren
|
|
12016
|
+
children: calloutChildren,
|
|
12017
|
+
meta: { form: "github" }
|
|
11787
12018
|
};
|
|
11788
12019
|
}
|
|
11789
12020
|
}
|
|
@@ -11873,6 +12104,9 @@ function consumeTable(ctx) {
|
|
|
11873
12104
|
}
|
|
11874
12105
|
}
|
|
11875
12106
|
const node = { type: "table", children };
|
|
12107
|
+
const delimiter = keepWritten && openTok.map ? ctx.lines?.[openTok.map[0] + 1]?.replace(/^[ \t>]*/, "").trimEnd() : void 0;
|
|
12108
|
+
if (delimiter && /^\|?[ \t]*:?-+:?[ \t]*(?:\|[ \t]*:?-+:?[ \t]*)*\|?$/.test(delimiter))
|
|
12109
|
+
node.meta = { delimiter };
|
|
11876
12110
|
if (openTok.attrs && openTok.attrs.length > 0) {
|
|
11877
12111
|
const props = {};
|
|
11878
12112
|
for (const [k, v] of openTok.attrs)
|
|
@@ -12130,7 +12364,7 @@ function mapContainerToTreeNode(name, attrs2, children) {
|
|
|
12130
12364
|
const calloutProps = { ...props };
|
|
12131
12365
|
if (name !== "callout")
|
|
12132
12366
|
calloutProps.type = name;
|
|
12133
|
-
return { type: "callout", props: calloutProps, children };
|
|
12367
|
+
return { type: "callout", props: calloutProps, children, meta: { form: "directive" } };
|
|
12134
12368
|
}
|
|
12135
12369
|
if (name === "tabs") {
|
|
12136
12370
|
return tabsFromChildren(props, children);
|
|
@@ -12141,6 +12375,9 @@ function mapContainerToTreeNode(name, attrs2, children) {
|
|
|
12141
12375
|
if (name === "cards") {
|
|
12142
12376
|
return cardsFromChildren(props, children);
|
|
12143
12377
|
}
|
|
12378
|
+
if (NAMED_CONTAINERS.includes(name)) {
|
|
12379
|
+
return { type: "container", props, children, meta: { container: true, name } };
|
|
12380
|
+
}
|
|
12144
12381
|
if (name === "grid") {
|
|
12145
12382
|
return { type: "grid", props, children };
|
|
12146
12383
|
}
|
|
@@ -12290,7 +12527,7 @@ function stepsFromChildren(props, children) {
|
|
|
12290
12527
|
});
|
|
12291
12528
|
}
|
|
12292
12529
|
}
|
|
12293
|
-
return { type: "steps", props, children: steps3 };
|
|
12530
|
+
return { type: "steps", props, children: steps3, ...list5.meta?.loose ? { meta: { loose: true } } : {} };
|
|
12294
12531
|
}
|
|
12295
12532
|
const steps2 = children.filter((c) => c.type === "step");
|
|
12296
12533
|
if (steps2.length > 0) {
|
|
@@ -12478,7 +12715,7 @@ function tokensToInline(tokens, inheritedFmt = []) {
|
|
|
12478
12715
|
const last = result[k];
|
|
12479
12716
|
if (last && !fmtStack.includes("bold") && isBoldRun(last))
|
|
12480
12717
|
last.lineEnd = true;
|
|
12481
|
-
result.push(makeText(" ", fmtStack));
|
|
12718
|
+
result.push(makeText(keepSoftBreaks ? "\n" : " ", fmtStack));
|
|
12482
12719
|
break;
|
|
12483
12720
|
}
|
|
12484
12721
|
case "hardbreak": {
|
|
@@ -12587,11 +12824,11 @@ function tokensToInline(tokens, inheritedFmt = []) {
|
|
|
12587
12824
|
}
|
|
12588
12825
|
const labelInline = tokensToInline(labelTokens);
|
|
12589
12826
|
const labelText = inlineText(labelInline);
|
|
12590
|
-
const
|
|
12591
|
-
const labelless =
|
|
12592
|
-
let node =
|
|
12593
|
-
if (labelless &&
|
|
12594
|
-
node = { type: "text", text:
|
|
12827
|
+
const meta2 = tok.meta;
|
|
12828
|
+
const labelless = meta2?.labelless === true;
|
|
12829
|
+
let node = meta2?.literal && meta2.source ? { type: "text", text: meta2.source } : inlineDirectiveToNode(name, labelText, labelInline, attrs2, labelless);
|
|
12830
|
+
if (labelless && meta2?.source && (node?.type === "html-inline" && node.html.startsWith(`:${name}[]`) || node?.type === "text" && node.text.startsWith(`:${name}{`)))
|
|
12831
|
+
node = { type: "text", text: meta2.source };
|
|
12595
12832
|
if (node)
|
|
12596
12833
|
result.push(node);
|
|
12597
12834
|
break;
|
|
@@ -12788,6 +13025,12 @@ var DIRECTIVE_DESCRIPTIONS = {
|
|
|
12788
13025
|
theme: 'Content in another theme\'s tokens: `name="dark"`',
|
|
12789
13026
|
avatar: "Avatar image with a fallback: `src`, `alt`, `fallback`, `size`",
|
|
12790
13027
|
"child-links": "Links to this page's children in the menu; `depth`",
|
|
13028
|
+
columns: "Text that flows through columns; `count` (1 to 6), `gap`",
|
|
13029
|
+
"key-value": "Labels and values, from a definition list; `layout`: `rows` or `across` (pairs side by side)",
|
|
13030
|
+
"pdf-page-break": "What follows starts a page of the PDF; nothing on the web",
|
|
13031
|
+
"pdf-keep-together": "Content not split across pages of the PDF",
|
|
13032
|
+
"pdf-only": "Content shown in the PDF only",
|
|
13033
|
+
"web-only": "Content shown on the web only, left out of the PDF",
|
|
12791
13034
|
"data-table": "Table from a data file: `src`, `path` to a list in it, `columns`, `headers`, `links` (column=field), `code`",
|
|
12792
13035
|
"data-cards": "Cards from a data file: `src`, `path`; `title`, `description`, `href`, `icon` name its keys"
|
|
12793
13036
|
};
|
|
@@ -12834,6 +13077,182 @@ function stripFenceMinjaMarkers(text4) {
|
|
|
12834
13077
|
});
|
|
12835
13078
|
}
|
|
12836
13079
|
|
|
13080
|
+
// node_modules/@dogsbay/format-dogsbay-md/dist/anchors.js
|
|
13081
|
+
var NOT_ANCHORS = /* @__PURE__ */ new Set(["youtube", "footnote-def"]);
|
|
13082
|
+
function authoredAnchor(node) {
|
|
13083
|
+
if (NOT_ANCHORS.has(node.type))
|
|
13084
|
+
return void 0;
|
|
13085
|
+
if (node.meta?.idGenerated === true)
|
|
13086
|
+
return void 0;
|
|
13087
|
+
const props = node.props;
|
|
13088
|
+
const id = node.type === "heading" ? props?.slug : props?.id;
|
|
13089
|
+
return typeof id === "string" && id ? id : void 0;
|
|
13090
|
+
}
|
|
13091
|
+
function authoredInlineAnchor(node) {
|
|
13092
|
+
const id = node.attrs?.id;
|
|
13093
|
+
return typeof id === "string" && id ? id : void 0;
|
|
13094
|
+
}
|
|
13095
|
+
|
|
13096
|
+
// node_modules/@dogsbay/format-dogsbay-md/dist/headings.js
|
|
13097
|
+
function collectInlineText(nodes) {
|
|
13098
|
+
let out = "";
|
|
13099
|
+
for (const n of nodes) {
|
|
13100
|
+
if (!n || typeof n !== "object")
|
|
13101
|
+
continue;
|
|
13102
|
+
const node = n;
|
|
13103
|
+
if (typeof node.text === "string")
|
|
13104
|
+
out += node.text;
|
|
13105
|
+
else if (typeof node.alt === "string")
|
|
13106
|
+
out += node.alt;
|
|
13107
|
+
if (Array.isArray(node.children))
|
|
13108
|
+
out += collectInlineText(node.children);
|
|
13109
|
+
}
|
|
13110
|
+
return out;
|
|
13111
|
+
}
|
|
13112
|
+
function pageLevel(tree) {
|
|
13113
|
+
return tree.flatMap((n) => n.type === "theme" ? pageLevel(n.children ?? []) : [n]);
|
|
13114
|
+
}
|
|
13115
|
+
var meta = (node) => node.meta;
|
|
13116
|
+
var str = (v) => typeof v === "string" && v ? v : void 0;
|
|
13117
|
+
var earlierId = (node) => {
|
|
13118
|
+
if (meta(node)?.idGenerated !== true)
|
|
13119
|
+
return void 0;
|
|
13120
|
+
return node.type === "heading" ? typeof node.props?.slug === "string" ? node.props.slug : void 0 : str(node.props?.id);
|
|
13121
|
+
};
|
|
13122
|
+
var authoredHeadingId = (node) => str(node.props?.id) ?? (meta(node)?.idGenerated === true ? void 0 : str(node.props?.slug));
|
|
13123
|
+
var HTML_ID = /(?:^|[\s<])id\s*=\s*(["'])([^"']*)\1/gi;
|
|
13124
|
+
function slugPass(tree, options) {
|
|
13125
|
+
const top = new Set(pageLevel(tree));
|
|
13126
|
+
const slots = [];
|
|
13127
|
+
const taken = new Set(options.reserved ?? []);
|
|
13128
|
+
const reserveInline = (nodes) => {
|
|
13129
|
+
for (const n of nodes ?? []) {
|
|
13130
|
+
const id = authoredInlineAnchor(n);
|
|
13131
|
+
if (id)
|
|
13132
|
+
taken.add(id);
|
|
13133
|
+
const html = n.html;
|
|
13134
|
+
if (typeof html === "string") {
|
|
13135
|
+
for (const m of html.matchAll(HTML_ID))
|
|
13136
|
+
if (m[2])
|
|
13137
|
+
taken.add(m[2]);
|
|
13138
|
+
}
|
|
13139
|
+
const kids = n.children;
|
|
13140
|
+
if (Array.isArray(kids))
|
|
13141
|
+
reserveInline(kids);
|
|
13142
|
+
}
|
|
13143
|
+
};
|
|
13144
|
+
const sheetNodes = [];
|
|
13145
|
+
const visit = (nodes) => {
|
|
13146
|
+
for (const node of nodes ?? []) {
|
|
13147
|
+
if (node.type !== "heading") {
|
|
13148
|
+
const authored = authoredAnchor(node);
|
|
13149
|
+
if (authored)
|
|
13150
|
+
taken.add(authored);
|
|
13151
|
+
}
|
|
13152
|
+
const again = earlierId(node);
|
|
13153
|
+
if (again)
|
|
13154
|
+
taken.add(again);
|
|
13155
|
+
if ((node.type === "html" || node.type === "html-container") && typeof node.html === "string") {
|
|
13156
|
+
for (const m of node.html.matchAll(HTML_ID))
|
|
13157
|
+
if (m[2])
|
|
13158
|
+
taken.add(m[2]);
|
|
13159
|
+
}
|
|
13160
|
+
reserveInline(node.inline);
|
|
13161
|
+
if (node.type === "details" && isDetailsSheet(node.props) && (!node.props?.id || again))
|
|
13162
|
+
sheetNodes.push(node);
|
|
13163
|
+
if (node.type === "heading" && node.inline) {
|
|
13164
|
+
const text4 = node.inline.map((n) => n.type === "text" ? n.text : "").join("").trim();
|
|
13165
|
+
const fallback = !slugifyHeadingText(text4);
|
|
13166
|
+
slots.push({
|
|
13167
|
+
node,
|
|
13168
|
+
// Upgrade the TEXT here, before any slug is assigned. Doing it inside
|
|
13169
|
+
// pass 2 skipped every heading that already had a slug from an explicit
|
|
13170
|
+
// `{#id}` — so `## \`demo.run(opts)\` {#run}` anchored correctly and
|
|
13171
|
+
// still showed a BLANK row in the table of contents.
|
|
13172
|
+
text: fallback ? collectInlineText(node.inline).trim() || text4 : text4,
|
|
13173
|
+
fallback,
|
|
13174
|
+
top: top.has(node),
|
|
13175
|
+
generated: false
|
|
13176
|
+
});
|
|
13177
|
+
}
|
|
13178
|
+
visit(node.children);
|
|
13179
|
+
}
|
|
13180
|
+
};
|
|
13181
|
+
visit(tree);
|
|
13182
|
+
for (const slot of slots) {
|
|
13183
|
+
const again = earlierId(slot.node);
|
|
13184
|
+
if (again !== void 0) {
|
|
13185
|
+
slot.id = again;
|
|
13186
|
+
slot.generated = true;
|
|
13187
|
+
continue;
|
|
13188
|
+
}
|
|
13189
|
+
const explicit = authoredHeadingId(slot.node);
|
|
13190
|
+
if (!explicit)
|
|
13191
|
+
continue;
|
|
13192
|
+
const base = pageId(explicit);
|
|
13193
|
+
let id = base;
|
|
13194
|
+
for (let n = 2; taken.has(id); n++)
|
|
13195
|
+
id = `${base}-${n}`;
|
|
13196
|
+
slot.id = id;
|
|
13197
|
+
taken.add(id);
|
|
13198
|
+
}
|
|
13199
|
+
const seen = /* @__PURE__ */ new Map();
|
|
13200
|
+
const assign = (slot, base) => {
|
|
13201
|
+
let n = seen.get(base) ?? 0;
|
|
13202
|
+
let id = n === 0 ? base : `${base}-${n}`;
|
|
13203
|
+
while (taken.has(id)) {
|
|
13204
|
+
n += 1;
|
|
13205
|
+
id = `${base}-${n}`;
|
|
13206
|
+
}
|
|
13207
|
+
seen.set(base, n + 1);
|
|
13208
|
+
slot.id = id;
|
|
13209
|
+
slot.generated = true;
|
|
13210
|
+
taken.add(id);
|
|
13211
|
+
};
|
|
13212
|
+
for (const slot of slots) {
|
|
13213
|
+
if (slot.id !== void 0 || slot.fallback)
|
|
13214
|
+
continue;
|
|
13215
|
+
assign(slot, pageId(slugifyHeadingText(slot.text)));
|
|
13216
|
+
}
|
|
13217
|
+
for (const slot of slots) {
|
|
13218
|
+
if (slot.id !== void 0)
|
|
13219
|
+
continue;
|
|
13220
|
+
const base = slugifyHeadingText(slot.text);
|
|
13221
|
+
if (!base) {
|
|
13222
|
+
slot.id = "";
|
|
13223
|
+
slot.generated = true;
|
|
13224
|
+
continue;
|
|
13225
|
+
}
|
|
13226
|
+
assign(slot, pageId(base));
|
|
13227
|
+
}
|
|
13228
|
+
const sheets = /* @__PURE__ */ new Map();
|
|
13229
|
+
for (const n of sheetNodes) {
|
|
13230
|
+
const again = earlierId(n);
|
|
13231
|
+
if (again) {
|
|
13232
|
+
sheets.set(n, again);
|
|
13233
|
+
continue;
|
|
13234
|
+
}
|
|
13235
|
+
const base = pageId(slugifyHeadingText(String(n.props?.title ?? n.props?.summary ?? "")));
|
|
13236
|
+
if (!base || base === "h-")
|
|
13237
|
+
continue;
|
|
13238
|
+
let id = base;
|
|
13239
|
+
for (let k = 1; taken.has(id); k++)
|
|
13240
|
+
id = `${base}-${k}`;
|
|
13241
|
+
taken.add(id);
|
|
13242
|
+
sheets.set(n, id);
|
|
13243
|
+
}
|
|
13244
|
+
return { slots, sheets };
|
|
13245
|
+
}
|
|
13246
|
+
function headingIds(tree, options = {}) {
|
|
13247
|
+
const { slots, sheets } = slugPass(tree, options);
|
|
13248
|
+
const out = /* @__PURE__ */ new Map();
|
|
13249
|
+
for (const slot of slots)
|
|
13250
|
+
out.set(slot.node, { id: slot.id ?? "", generated: slot.generated });
|
|
13251
|
+
for (const [node, id] of sheets)
|
|
13252
|
+
out.set(node, { id, generated: true });
|
|
13253
|
+
return out;
|
|
13254
|
+
}
|
|
13255
|
+
|
|
12837
13256
|
// node_modules/@dogsbay/format-dogsbay-md/dist/data-files.js
|
|
12838
13257
|
var YAML_SCHEMA = JSON_SCHEMA.withTags(mergeTag);
|
|
12839
13258
|
var DataFileError = class extends Error {
|
|
@@ -13406,9 +13825,12 @@ async function pageRecord(tree, options) {
|
|
|
13406
13825
|
const blocks = [];
|
|
13407
13826
|
const walk = (nodes) => {
|
|
13408
13827
|
for (const n of nodes) {
|
|
13409
|
-
const
|
|
13410
|
-
if (
|
|
13411
|
-
|
|
13828
|
+
const meta2 = n.meta;
|
|
13829
|
+
if (meta2 && typeof meta2.block === "string" && typeof meta2.line === "number" && meta2.source) {
|
|
13830
|
+
const record = blockRecord(n.type, meta2.block, meta2.line, typeof meta2.endLine === "number" ? meta2.endLine : meta2.line, meta2.source, options.source);
|
|
13831
|
+
const anchor = authoredAnchor(n);
|
|
13832
|
+
blocks.push(anchor ? { ...record, anchor } : record);
|
|
13833
|
+
}
|
|
13412
13834
|
if (n.children)
|
|
13413
13835
|
walk(n.children);
|
|
13414
13836
|
}
|
|
@@ -14197,7 +14619,7 @@ function callable(fn) {
|
|
|
14197
14619
|
}
|
|
14198
14620
|
|
|
14199
14621
|
// node_modules/@dogsbay/minja/dist/template/methods.js
|
|
14200
|
-
var
|
|
14622
|
+
var str2 = (name, v, what = "argument") => {
|
|
14201
14623
|
if (v instanceof SafeString)
|
|
14202
14624
|
return v.value;
|
|
14203
14625
|
if (typeof v !== "string")
|
|
@@ -14238,7 +14660,7 @@ function split(s, sep2, maxsplit, fromRight, name) {
|
|
|
14238
14660
|
const rest = s.trimEnd().replace(new RegExp(`(?:\\s+\\S+){${max}}$`), "");
|
|
14239
14661
|
return [rest, ...tail];
|
|
14240
14662
|
}
|
|
14241
|
-
const by =
|
|
14663
|
+
const by = str2(name, sep2, "separator");
|
|
14242
14664
|
if (by === "")
|
|
14243
14665
|
throw new TemplateRuntimeError(`${name}(): empty separator`);
|
|
14244
14666
|
const parts = s.split(by);
|
|
@@ -14247,7 +14669,7 @@ function split(s, sep2, maxsplit, fromRight, name) {
|
|
|
14247
14669
|
return fromRight ? [parts.slice(0, parts.length - max).join(by), ...parts.slice(parts.length - max)] : [...parts.slice(0, max), parts.slice(max).join(by)];
|
|
14248
14670
|
}
|
|
14249
14671
|
function strip(s, chars, left, right, name) {
|
|
14250
|
-
const set = chars === void 0 || chars === null ? void 0 : new Set(
|
|
14672
|
+
const set = chars === void 0 || chars === null ? void 0 : new Set(str2(name, chars));
|
|
14251
14673
|
const drop = (c) => set ? set.has(c) : /\s/.test(c);
|
|
14252
14674
|
let a = 0;
|
|
14253
14675
|
let b = s.length;
|
|
@@ -14260,7 +14682,7 @@ function strip(s, chars, left, right, name) {
|
|
|
14260
14682
|
return s.slice(a, b);
|
|
14261
14683
|
}
|
|
14262
14684
|
function affixes(name, v) {
|
|
14263
|
-
return [
|
|
14685
|
+
return [str2(name, v)];
|
|
14264
14686
|
}
|
|
14265
14687
|
var STRING = {
|
|
14266
14688
|
split: (s, args, kwargs) => split(s, ...params("split", ["sep", "maxsplit"], args, kwargs), false, "split"),
|
|
@@ -14282,8 +14704,8 @@ var STRING = {
|
|
|
14282
14704
|
capitalize: (s, args, kwargs) => (params("capitalize", [], args, kwargs), s.charAt(0).toUpperCase() + s.slice(1).toLowerCase()),
|
|
14283
14705
|
replace: (s, args, kwargs, state) => {
|
|
14284
14706
|
const [from, to, count] = params("replace", ["old", "new", "count"], args, kwargs);
|
|
14285
|
-
const a =
|
|
14286
|
-
const b =
|
|
14707
|
+
const a = str2("replace", from);
|
|
14708
|
+
const b = str2("replace", to);
|
|
14287
14709
|
const n = count === void 0 || count === null ? -1 : int("replace", count);
|
|
14288
14710
|
const pieces = a === "" ? ["", ...s, ""] : s.split(a);
|
|
14289
14711
|
const joins = pieces.length - 1;
|
|
@@ -14293,9 +14715,9 @@ var STRING = {
|
|
|
14293
14715
|
return pieces.slice(1, -1).reduce((out, c, i) => out + (i < replaced ? b : "") + c, "") + (replaced > s.length ? b : "");
|
|
14294
14716
|
return pieces.slice(0, replaced + 1).join(b) + (replaced < joins ? a + pieces.slice(replaced + 1).join(a) : "");
|
|
14295
14717
|
},
|
|
14296
|
-
find: (s, args, kwargs) => s.indexOf(
|
|
14718
|
+
find: (s, args, kwargs) => s.indexOf(str2("find", params("find", ["sub"], args, kwargs)[0])),
|
|
14297
14719
|
count: (s, args, kwargs) => {
|
|
14298
|
-
const sub =
|
|
14720
|
+
const sub = str2("count", params("count", ["sub"], args, kwargs)[0]);
|
|
14299
14721
|
return sub === "" ? s.length + 1 : s.split(sub).length - 1;
|
|
14300
14722
|
},
|
|
14301
14723
|
join: (s, args, kwargs, state) => {
|
|
@@ -14304,7 +14726,7 @@ var STRING = {
|
|
|
14304
14726
|
if (!xs)
|
|
14305
14727
|
throw new TemplateRuntimeError(`join() needs a list, not ${typeName(items3)}`);
|
|
14306
14728
|
state.budget.spend(xs.length * s.length);
|
|
14307
|
-
return xs.map((x, i) =>
|
|
14729
|
+
return xs.map((x, i) => str2("join", x, `item ${i}`)).join(s);
|
|
14308
14730
|
},
|
|
14309
14731
|
zfill: (s, args, kwargs, state) => {
|
|
14310
14732
|
const width = int("zfill", params("zfill", ["width"], args, kwargs)[0]);
|
|
@@ -15143,7 +15565,7 @@ var MORE_TESTS = {
|
|
|
15143
15565
|
};
|
|
15144
15566
|
|
|
15145
15567
|
// node_modules/@dogsbay/minja/dist/template/filters.js
|
|
15146
|
-
function
|
|
15568
|
+
function str3(v) {
|
|
15147
15569
|
return toText(v);
|
|
15148
15570
|
}
|
|
15149
15571
|
function items2(v) {
|
|
@@ -15175,7 +15597,7 @@ function bind2(filter2, params2, args, kwargs, defaults = []) {
|
|
|
15175
15597
|
return out;
|
|
15176
15598
|
}
|
|
15177
15599
|
function mapText(v, f) {
|
|
15178
|
-
return v instanceof SafeString ? new SafeString(f(v.value)) : f(
|
|
15600
|
+
return v instanceof SafeString ? new SafeString(f(v.value)) : f(str3(v));
|
|
15179
15601
|
}
|
|
15180
15602
|
function htmlSafeJson(root) {
|
|
15181
15603
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -15219,9 +15641,9 @@ function htmlSafeJson(root) {
|
|
|
15219
15641
|
}
|
|
15220
15642
|
function urlencode(v) {
|
|
15221
15643
|
if (isMapping(v)) {
|
|
15222
|
-
return Object.keys(v).filter((k) => v[k] !== void 0 && v[k] !== null).map((k) => `${encodeURIComponent(k)}=${encodeURIComponent(
|
|
15644
|
+
return Object.keys(v).filter((k) => v[k] !== void 0 && v[k] !== null).map((k) => `${encodeURIComponent(k)}=${encodeURIComponent(str3(v[k]))}`).join("&");
|
|
15223
15645
|
}
|
|
15224
|
-
return encodeURIComponent(
|
|
15646
|
+
return encodeURIComponent(str3(v)).replace(/%2F/g, "/");
|
|
15225
15647
|
}
|
|
15226
15648
|
function replaceText(src, from, to, count) {
|
|
15227
15649
|
if (typeof count !== "number")
|
|
@@ -15326,7 +15748,7 @@ var BUILTIN_FILTERS = {
|
|
|
15326
15748
|
e: escapeFilter,
|
|
15327
15749
|
safe: (v, args, kwargs) => {
|
|
15328
15750
|
bind2("safe", [], args, kwargs);
|
|
15329
|
-
return v instanceof SafeString ? v : new SafeString(
|
|
15751
|
+
return v instanceof SafeString ? v : new SafeString(str3(v));
|
|
15330
15752
|
},
|
|
15331
15753
|
length: lengthFilter,
|
|
15332
15754
|
count: lengthFilter,
|
|
@@ -15344,10 +15766,10 @@ var BUILTIN_FILTERS = {
|
|
|
15344
15766
|
const xs = attr === void 0 || attr === null ? items2(v) : items2(v).map((x) => mapAttribute(x, attr, state));
|
|
15345
15767
|
state.budget.spend(xs.length);
|
|
15346
15768
|
if (state.autoescape && (sep2 instanceof SafeString || xs.some((x) => x instanceof SafeString))) {
|
|
15347
|
-
const s = sep2 instanceof SafeString ? sep2.value : escapeHtml2(
|
|
15769
|
+
const s = sep2 instanceof SafeString ? sep2.value : escapeHtml2(str3(sep2));
|
|
15348
15770
|
return new SafeString(xs.map((x) => escapeValue(x).value).join(s));
|
|
15349
15771
|
}
|
|
15350
|
-
return xs.map(
|
|
15772
|
+
return xs.map(str3).join(str3(sep2));
|
|
15351
15773
|
},
|
|
15352
15774
|
replace: (v, args, kwargs, state) => {
|
|
15353
15775
|
const [from, to, count] = bind2("replace", ["old", "new", "count"], args, kwargs);
|
|
@@ -15355,7 +15777,7 @@ var BUILTIN_FILTERS = {
|
|
|
15355
15777
|
const h = (x) => escapeValue(x).value;
|
|
15356
15778
|
return new SafeString(replaceText(h(v), h(from), h(to), count));
|
|
15357
15779
|
}
|
|
15358
|
-
return replaceText(
|
|
15780
|
+
return replaceText(str3(v), str3(from), str3(to), count);
|
|
15359
15781
|
},
|
|
15360
15782
|
items: (v, args, kwargs, state) => {
|
|
15361
15783
|
bind2("items", [], args, kwargs);
|
|
@@ -16371,16 +16793,16 @@ var TemplatePages = class {
|
|
|
16371
16793
|
* TemplatePageError. `firstLine` is the body's first line in the FILE, so
|
|
16372
16794
|
* errors name the line an author sees (the front matter is not rendered).
|
|
16373
16795
|
*/
|
|
16374
|
-
async render(body, path,
|
|
16796
|
+
async render(body, path, meta2, options = {}) {
|
|
16375
16797
|
const pad = Math.max(0, (options.firstLine ?? 1) - 1);
|
|
16376
|
-
let out = await this.run("\n".repeat(pad) + body, path,
|
|
16798
|
+
let out = await this.run("\n".repeat(pad) + body, path, meta2, options.onDataRead);
|
|
16377
16799
|
if (pad)
|
|
16378
16800
|
out = out.replace(new RegExp(`^\\n{0,${pad}}`), "");
|
|
16379
16801
|
return joinEmptiedMarkers(stripFenceMinjaMarkers(stripInlineMinjaMarkers(out)));
|
|
16380
16802
|
}
|
|
16381
16803
|
/** Render a front-matter field (a title, a description) strictly. Throws TemplatePageError. */
|
|
16382
|
-
async renderField(text4, path,
|
|
16383
|
-
return this.run(text4, path,
|
|
16804
|
+
async renderField(text4, path, meta2) {
|
|
16805
|
+
return this.run(text4, path, meta2);
|
|
16384
16806
|
}
|
|
16385
16807
|
/**
|
|
16386
16808
|
* Load the data files a template names. A name with no file is left out (`data.x` may be
|
|
@@ -16445,13 +16867,13 @@ var TemplatePages = class {
|
|
|
16445
16867
|
ownKeys: (t) => (paths.forEach((p) => onRead(p)), Reflect.ownKeys(t))
|
|
16446
16868
|
});
|
|
16447
16869
|
}
|
|
16448
|
-
async run(text4, path,
|
|
16870
|
+
async run(text4, path, meta2, onDataRead) {
|
|
16449
16871
|
if (this.loaded > (this.options.maxCachedTemplates ?? 1e3)) {
|
|
16450
16872
|
this.env.invalidate();
|
|
16451
16873
|
this.loaded = 0;
|
|
16452
16874
|
}
|
|
16453
16875
|
await this.preloadData(text4);
|
|
16454
|
-
const context = { ...withUnderscoreAliases(this.options.attributes ?? {}), page: { meta, path } };
|
|
16876
|
+
const context = { ...withUnderscoreAliases(this.options.attributes ?? {}), page: { meta: meta2, path } };
|
|
16455
16877
|
if (this.options.data) {
|
|
16456
16878
|
if (!Object.prototype.hasOwnProperty.call(context, "data"))
|
|
16457
16879
|
context.data = this.dataFor(onDataRead);
|
|
@@ -16711,6 +17133,26 @@ var icons = {
|
|
|
16711
17133
|
};
|
|
16712
17134
|
var chevronSvg = '<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"><polyline points="6 9 12 15 18 9"/></svg>';
|
|
16713
17135
|
|
|
17136
|
+
// node_modules/@dogsbay/render-html/dist/callout-markup.js
|
|
17137
|
+
var VARIANT_ALIAS = { important: "info", caution: "danger", error: "failure", hint: "tip", attention: "warning" };
|
|
17138
|
+
var ALERT_BASE = "relative w-full rounded-lg border p-4 [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:size-4 [&>svg~div]:pl-7";
|
|
17139
|
+
var ALERT_VARIANT = {
|
|
17140
|
+
note: "border-note/50 bg-note/5 text-foreground [&>svg]:text-note",
|
|
17141
|
+
abstract: "border-abstract/50 bg-abstract/5 text-foreground [&>svg]:text-abstract",
|
|
17142
|
+
info: "border-info/50 bg-info/5 text-foreground [&>svg]:text-info",
|
|
17143
|
+
tip: "border-tip/50 bg-tip/5 text-foreground [&>svg]:text-tip",
|
|
17144
|
+
success: "border-success/50 bg-success/5 text-foreground [&>svg]:text-success",
|
|
17145
|
+
question: "border-question/50 bg-question/5 text-foreground [&>svg]:text-question",
|
|
17146
|
+
warning: "border-warning/50 bg-warning/5 text-foreground [&>svg]:text-warning",
|
|
17147
|
+
failure: "border-failure/50 bg-failure/5 text-foreground [&>svg]:text-failure",
|
|
17148
|
+
danger: "border-danger/50 bg-danger/5 text-foreground [&>svg]:text-danger",
|
|
17149
|
+
bug: "border-bug/50 bg-bug/5 text-foreground [&>svg]:text-bug",
|
|
17150
|
+
example: "border-example/50 bg-example/5 text-foreground [&>svg]:text-example",
|
|
17151
|
+
quote: "border-quote/50 bg-quote/5 text-foreground [&>svg]:text-quote"
|
|
17152
|
+
};
|
|
17153
|
+
var ALERT_TITLE_CLASS = "mb-1 text-sm font-semibold leading-none tracking-tight";
|
|
17154
|
+
var ALERT_BODY_CLASS = "text-sm [&_p]:leading-relaxed";
|
|
17155
|
+
|
|
16714
17156
|
// node_modules/@dogsbay/render-html/dist/diff.js
|
|
16715
17157
|
var diffMarksOf = (node) => node;
|
|
16716
17158
|
function hasDiffMarks(node) {
|
|
@@ -16888,7 +17330,7 @@ function apiPropertiesHtml(list5) {
|
|
|
16888
17330
|
}
|
|
16889
17331
|
|
|
16890
17332
|
// node_modules/@dogsbay/render-html/dist/api.js
|
|
16891
|
-
var
|
|
17333
|
+
var str4 = (v) => v == null || v === "" ? void 0 : String(v);
|
|
16892
17334
|
var list3 = (v) => Array.isArray(v) ? v.filter((x) => x && typeof x === "object") : [];
|
|
16893
17335
|
var API_NODE_TYPES = /* @__PURE__ */ new Set(["api-class", "api-member", "api-doc", "api-params", "api-source", "endpoint"]);
|
|
16894
17336
|
function renderApiNode2(n, ctx) {
|
|
@@ -16897,7 +17339,7 @@ function renderApiNode2(n, ctx) {
|
|
|
16897
17339
|
case "api-member":
|
|
16898
17340
|
return apiSymbol(n, ctx);
|
|
16899
17341
|
case "api-doc":
|
|
16900
|
-
return docSegments(
|
|
17342
|
+
return docSegments(str4(n.props?.html) ?? "", "[&>p:first-child]:mt-0 [&>p:last-child]:mb-2", ctx);
|
|
16901
17343
|
case "api-params":
|
|
16902
17344
|
return apiParams(n, ctx);
|
|
16903
17345
|
case "api-source":
|
|
@@ -16910,9 +17352,9 @@ function renderApiNode2(n, ctx) {
|
|
|
16910
17352
|
}
|
|
16911
17353
|
function apiSymbol(n, ctx) {
|
|
16912
17354
|
const p = n.props ?? {};
|
|
16913
|
-
const name =
|
|
16914
|
-
const kind =
|
|
16915
|
-
const signature =
|
|
17355
|
+
const name = str4(p.name) ?? "";
|
|
17356
|
+
const kind = str4(p.kind) ?? "func";
|
|
17357
|
+
const signature = str4(p.signature);
|
|
16916
17358
|
const bases = Array.isArray(p.bases) ? p.bases.map(String) : [];
|
|
16917
17359
|
const level = Math.min(6, (ctx.apiParentLevel ?? ctx.lastHeadingLevel ?? 1) + 1);
|
|
16918
17360
|
const badgeKind = kind === "method" ? "meth" : kind;
|
|
@@ -16951,9 +17393,9 @@ function docSegments(html, edges, ctx) {
|
|
|
16951
17393
|
}
|
|
16952
17394
|
function apiParams(n, ctx) {
|
|
16953
17395
|
const rows = list3(n.props?.params).map((p) => {
|
|
16954
|
-
const type =
|
|
16955
|
-
const dflt =
|
|
16956
|
-
return `<tr class="border-b border-border/50"><td class="py-3 px-4 align-top"><code class="text-sm font-medium">${esc(
|
|
17396
|
+
const type = str4(p.type);
|
|
17397
|
+
const dflt = str4(p.default);
|
|
17398
|
+
return `<tr class="border-b border-border/50"><td class="py-3 px-4 align-top"><code class="text-sm font-medium">${esc(str4(p.name) ?? "")}</code></td><td class="py-3 px-4 align-top">${docSegments(str4(p.docHtml) ?? "", "[&>p:first-child]:mt-0 [&>p:last-child]:mb-0", ctx)}<div class="flex items-center gap-4 mt-2 text-xs text-muted-foreground">` + (type ? `<span><strong>TYPE:</strong> <code class="text-xs">${esc(type)}</code></span>` : "") + (dflt ? `<span class="ml-auto"><strong>DEFAULT:</strong> <code class="text-xs">${esc(dflt)}</code></span>` : "") + `</div></td></tr>`;
|
|
16957
17399
|
}).join("");
|
|
16958
17400
|
const th = "py-3 px-4 text-left font-semibold text-muted-foreground uppercase tracking-wider text-xs";
|
|
16959
17401
|
return `<table class="api-params w-full text-sm border-collapse"><thead><tr class="border-b border-border"><th class="${th} w-[140px]">Parameter</th><th class="${th}">Description</th></tr></thead><tbody>${rows}</tbody></table>
|
|
@@ -16961,10 +17403,10 @@ function apiParams(n, ctx) {
|
|
|
16961
17403
|
}
|
|
16962
17404
|
function apiSource(n, ctx) {
|
|
16963
17405
|
const p = n.props ?? {};
|
|
16964
|
-
const file2 =
|
|
17406
|
+
const file2 = str4(p.file);
|
|
16965
17407
|
const line = Number(p.line) || void 0;
|
|
16966
17408
|
const label = file2 ? `Source code in ${file2}${line ? `, line ${line}` : ""}` : "Source code";
|
|
16967
|
-
return `<details class="api-source"><summary>${esc(label)}</summary>${codeHtml(
|
|
17409
|
+
return `<details class="api-source"><summary>${esc(label)}</summary>${codeHtml(str4(p.code) ?? "", "python", ctx)}</details>
|
|
16968
17410
|
`;
|
|
16969
17411
|
}
|
|
16970
17412
|
var METHODS = ["get", "post", "put", "patch", "delete", "head"];
|
|
@@ -16994,10 +17436,10 @@ var TYPE_TINT = {
|
|
|
16994
17436
|
null: "bg-muted/20 text-muted-foreground"
|
|
16995
17437
|
};
|
|
16996
17438
|
function propertyItem(p, level, ctx) {
|
|
16997
|
-
const name = esc(
|
|
16998
|
-
const type =
|
|
16999
|
-
const format =
|
|
17000
|
-
const description =
|
|
17439
|
+
const name = esc(str4(p.name) ?? "");
|
|
17440
|
+
const type = str4(p.type) ?? "";
|
|
17441
|
+
const format = str4(p.format);
|
|
17442
|
+
const description = str4(p.description);
|
|
17001
17443
|
const children = list3(p.properties).length ? list3(p.properties) : list3(p.items);
|
|
17002
17444
|
const indent2 = level * 16;
|
|
17003
17445
|
const badge = `<span class="rounded px-1.5 py-0.5 text-[10px] font-medium ${Object.hasOwn(TYPE_TINT, type) ? TYPE_TINT[type] : TYPE_TINT.string}">${esc(type)}${format ? esc(` <${format}>`) : ""}</span>` + (p.nullable === true ? '<span class="text-muted-foreground text-[10px]">nullable</span>' : "");
|
|
@@ -17043,7 +17485,7 @@ function responseTabs(responses, ctx) {
|
|
|
17043
17485
|
const values = distinct(responses.map((r) => String(r.status ?? "")));
|
|
17044
17486
|
return tabGroup(responses.map((r, i) => {
|
|
17045
17487
|
const status = String(r.status ?? "");
|
|
17046
|
-
const description =
|
|
17488
|
+
const description = str4(r.description);
|
|
17047
17489
|
return {
|
|
17048
17490
|
value: values[i],
|
|
17049
17491
|
label: `<span class="rounded px-1.5 py-0.5 text-xs font-mono font-bold ${statusTint(status)}">${esc(status)}</span>`,
|
|
@@ -17065,13 +17507,13 @@ var SAMPLE_LABELS = {
|
|
|
17065
17507
|
};
|
|
17066
17508
|
var sampleLang = (language) => language === "curl" ? "bash" : language;
|
|
17067
17509
|
function codeSamples(samples, ctx) {
|
|
17068
|
-
const values = distinct(samples.map((s) =>
|
|
17510
|
+
const values = distinct(samples.map((s) => str4(s.language) ?? ""));
|
|
17069
17511
|
return tabGroup(samples.map((s, i) => {
|
|
17070
|
-
const language =
|
|
17512
|
+
const language = str4(s.language) ?? "";
|
|
17071
17513
|
return {
|
|
17072
17514
|
value: values[i],
|
|
17073
|
-
label: esc(
|
|
17074
|
-
body: () => codeHtml(
|
|
17515
|
+
label: esc(str4(s.label) ?? SAMPLE_LABELS[language] ?? language),
|
|
17516
|
+
body: () => codeHtml(str4(s.code) ?? "", sampleLang(language), ctx)
|
|
17075
17517
|
};
|
|
17076
17518
|
}), ctx, TABS_ROOT);
|
|
17077
17519
|
}
|
|
@@ -17113,16 +17555,16 @@ function codePanels(p) {
|
|
|
17113
17555
|
for (const r of list3(p.responses)) {
|
|
17114
17556
|
if (r.example === void 0)
|
|
17115
17557
|
continue;
|
|
17116
|
-
out.push({ title: `Response ${String(r.status ?? "")}`, code: JSON.stringify(r.example, null, 2), lang: exampleLang(
|
|
17558
|
+
out.push({ title: `Response ${String(r.status ?? "")}`, code: JSON.stringify(r.example, null, 2), lang: exampleLang(str4(r.contentType)) });
|
|
17117
17559
|
}
|
|
17118
17560
|
return out;
|
|
17119
17561
|
}
|
|
17120
17562
|
function endpoint(n, ctx) {
|
|
17121
17563
|
const p = n.props ?? {};
|
|
17122
|
-
const method = (
|
|
17123
|
-
const path =
|
|
17124
|
-
const baseUrl =
|
|
17125
|
-
const summary =
|
|
17564
|
+
const method = (str4(p.method) ?? "get").toLowerCase();
|
|
17565
|
+
const path = str4(p.path) ?? "";
|
|
17566
|
+
const baseUrl = str4(p.baseUrl) ?? "";
|
|
17567
|
+
const summary = str4(p.summary);
|
|
17126
17568
|
const description = typeof p.description === "string" && p.description && p.description !== p.summary ? apiBlockHtml(p.description) : void 0;
|
|
17127
17569
|
const deprecated = p.deprecated === true;
|
|
17128
17570
|
const parameters = list3(apiPropertiesHtml(p.parameters));
|
|
@@ -17141,15 +17583,15 @@ function apiCodeInputs(n) {
|
|
|
17141
17583
|
switch (n.type) {
|
|
17142
17584
|
case "api-class":
|
|
17143
17585
|
case "api-member":
|
|
17144
|
-
return
|
|
17586
|
+
return str4(p.signature) ? [{ lang: "python", code: String(p.signature) }] : [];
|
|
17145
17587
|
case "api-source":
|
|
17146
|
-
return [{ lang: "python", code:
|
|
17588
|
+
return [{ lang: "python", code: str4(p.code) ?? "" }];
|
|
17147
17589
|
case "api-doc":
|
|
17148
|
-
return fromHtml(
|
|
17590
|
+
return fromHtml(str4(p.html));
|
|
17149
17591
|
case "api-params":
|
|
17150
|
-
return list3(p.params).flatMap((x) => fromHtml(
|
|
17592
|
+
return list3(p.params).flatMap((x) => fromHtml(str4(x.docHtml)));
|
|
17151
17593
|
case "endpoint":
|
|
17152
|
-
return codePanels(p).flatMap((c) => c.samples ? c.samples.map((s) => ({ lang: sampleLang(
|
|
17594
|
+
return codePanels(p).flatMap((c) => c.samples ? c.samples.map((s) => ({ lang: sampleLang(str4(s.language) ?? ""), code: str4(s.code) ?? "" })) : [{ lang: c.lang, code: c.code }]);
|
|
17153
17595
|
default:
|
|
17154
17596
|
return [];
|
|
17155
17597
|
}
|
|
@@ -17183,10 +17625,8 @@ function renderMath(latex, display, ctx) {
|
|
|
17183
17625
|
return `<code class="text-destructive">${esc(latex)}</code>`;
|
|
17184
17626
|
}
|
|
17185
17627
|
}
|
|
17186
|
-
var RESERVED_ID = /^(db-|tab-\d|tabpanel-\d|acc-\d|accpanel-\d|fn-|fnref-)/;
|
|
17187
17628
|
function uniqueId(ctx, base) {
|
|
17188
|
-
|
|
17189
|
-
base = `h-${base}`;
|
|
17629
|
+
base = pageId(base);
|
|
17190
17630
|
let id = base || "section";
|
|
17191
17631
|
let n = 1;
|
|
17192
17632
|
while (ctx.ids.has(id))
|
|
@@ -17367,21 +17807,12 @@ function proseHeadings(html, ctx) {
|
|
|
17367
17807
|
return `<h${lvl}${at.replace(idm[0], ` id="${esc(id)}"`)}>${inner}</h${lvl}>`;
|
|
17368
17808
|
});
|
|
17369
17809
|
}
|
|
17370
|
-
var
|
|
17371
|
-
function planHeadingIds(nodes, out) {
|
|
17372
|
-
for (const n of nodes) {
|
|
17373
|
-
if (n.type === "heading")
|
|
17374
|
-
out.add(str4(n.props?.id) ?? str4(n.props?.slug) ?? slugify(inlineText2(n.inline)));
|
|
17375
|
-
if (n.children)
|
|
17376
|
-
planHeadingIds(n.children, out);
|
|
17377
|
-
}
|
|
17378
|
-
return out;
|
|
17379
|
-
}
|
|
17810
|
+
var pageIds = /* @__PURE__ */ new WeakMap();
|
|
17380
17811
|
function renderBlocks(nodes, ctx) {
|
|
17381
17812
|
if (!nodes)
|
|
17382
17813
|
return "";
|
|
17383
|
-
if (!
|
|
17384
|
-
|
|
17814
|
+
if (!pageIds.has(ctx))
|
|
17815
|
+
pageIds.set(ctx, headingIds(nodes, { reserved: ctx.ids }));
|
|
17385
17816
|
let out = "";
|
|
17386
17817
|
for (const n of nodes) {
|
|
17387
17818
|
const html = markedBlock(n, ctx);
|
|
@@ -17477,7 +17908,20 @@ function withSourceAttrs(html, n, ctx) {
|
|
|
17477
17908
|
const { kept, end } = dropAttrs(html, m[0].length, new Set(added.map(([name]) => name)));
|
|
17478
17909
|
return `${m[0]}${added.map(([name, value]) => ` ${name}="${value}"`).join("")}${kept}${html.slice(end)}`;
|
|
17479
17910
|
}
|
|
17480
|
-
|
|
17911
|
+
function keyValueList(list5, ctx) {
|
|
17912
|
+
const parts = (list5.children ?? []).map((c) => {
|
|
17913
|
+
if (c.type === "dt")
|
|
17914
|
+
return `<dt data-part="label">${renderInline2(c.inline, ctx)}</dt>`;
|
|
17915
|
+
if (c.type === "dd")
|
|
17916
|
+
return `<dd data-part="value">${itemBody(c, ctx)}</dd>`;
|
|
17917
|
+
return renderBlocks([c], ctx);
|
|
17918
|
+
}).join("");
|
|
17919
|
+
const html = `<dl${attrs({ ...passthrough(list5.props ?? {}), "data-part": "list" })}>${parts}</dl>
|
|
17920
|
+
`;
|
|
17921
|
+
return ctx.dataLines || ctx.blockIds ? withSourceAttrs(html, list5, ctx) : html;
|
|
17922
|
+
}
|
|
17923
|
+
var COLUMNS_STYLE = "columns:var(--db-columns) 14rem;column-gap:var(--db-column-gap)";
|
|
17924
|
+
var str5 = (v) => v == null || v === "" ? void 0 : String(v);
|
|
17481
17925
|
function itemBody(n, ctx) {
|
|
17482
17926
|
const lead = n.inline && n.inline.length ? `<p>${renderInline2(n.inline, ctx)}</p>` : "";
|
|
17483
17927
|
return lead + renderBlocks(n.children, ctx);
|
|
@@ -17517,7 +17961,8 @@ function block(n, ctx) {
|
|
|
17517
17961
|
case "heading": {
|
|
17518
17962
|
const level = Math.min(6, Math.max(1, Number(p.level) || 2));
|
|
17519
17963
|
const text4 = inlineText2(n.inline);
|
|
17520
|
-
const
|
|
17964
|
+
const given = pageIds.get(ctx)?.get(n)?.id || str5(n.meta?.pageId);
|
|
17965
|
+
const id = given && !ctx.ids.has(given) ? (ctx.ids.add(given), given) : uniqueId(ctx, given ?? str5(p.id) ?? str5(p.slug) ?? slugify(text4));
|
|
17521
17966
|
if (level === 2 || level === 3)
|
|
17522
17967
|
ctx.headings.push({ depth: level, id, text: text4 });
|
|
17523
17968
|
if (ctx.apiParentLevel === void 0)
|
|
@@ -17557,7 +18002,7 @@ function block(n, ctx) {
|
|
|
17557
18002
|
return `<tr${attrs(passthrough(p, "border-b transition-colors hover:bg-muted/50"))}>${renderBlocks(n.children, ctx)}</tr>`;
|
|
17558
18003
|
case "th":
|
|
17559
18004
|
case "td": {
|
|
17560
|
-
const align = /^(left|center|right)$/i.test(
|
|
18005
|
+
const align = /^(left|center|right)$/i.test(str5(p.align) ?? "") ? str5(p.align).toLowerCase() : void 0;
|
|
17561
18006
|
const cls = n.type === "th" ? "px-2 py-2 text-left align-bottom font-semibold text-muted-foreground" : "p-2 align-top";
|
|
17562
18007
|
const body = `${renderInline2(n.inline, ctx)}${renderBlocks(n.children, ctx)}`;
|
|
17563
18008
|
const tag = n.type === "th" && !body.trim() ? "td" : n.type;
|
|
@@ -17574,7 +18019,7 @@ function block(n, ctx) {
|
|
|
17574
18019
|
return `<section class="footnotes mt-12 border-t pt-6 text-sm text-muted-foreground" role="doc-endnotes" aria-label="Footnotes"><ol>${renderBlocks(n.children, ctx)}</ol></section>
|
|
17575
18020
|
`;
|
|
17576
18021
|
case "footnote-def": {
|
|
17577
|
-
const label = esc(
|
|
18022
|
+
const label = esc(str5(p.label) ?? "");
|
|
17578
18023
|
const body = n.inline?.length ? `<p>${renderInline2(n.inline, ctx)} <a href="#fnref-${label}" class="text-primary no-underline" role="doc-backlink" aria-label="${esc(ctx.t("backToContent"))}">\u21A9</a></p>` : "";
|
|
17579
18024
|
return `<li id="fn-${label}">${body}${renderBlocks(n.children, ctx)}</li>`;
|
|
17580
18025
|
}
|
|
@@ -17596,8 +18041,8 @@ function block(n, ctx) {
|
|
|
17596
18041
|
case "accordion":
|
|
17597
18042
|
return renderAroundGroup(n, "accordion-item", (g) => accordion(g, ctx), (c) => renderBlocks([c], ctx), "");
|
|
17598
18043
|
case "accordion-item": {
|
|
17599
|
-
const { line: _line, block: _block, ...
|
|
17600
|
-
return accordion({ type: "accordion", children: [{ ...n, meta }] }, ctx);
|
|
18044
|
+
const { line: _line, block: _block, ...meta2 } = n.meta ?? {};
|
|
18045
|
+
return accordion({ type: "accordion", children: [{ ...n, meta: meta2 }] }, ctx);
|
|
17601
18046
|
}
|
|
17602
18047
|
case "details":
|
|
17603
18048
|
return details(n, ctx);
|
|
@@ -17616,7 +18061,7 @@ function block(n, ctx) {
|
|
|
17616
18061
|
case "example":
|
|
17617
18062
|
return example(n, ctx);
|
|
17618
18063
|
case "cards": {
|
|
17619
|
-
const tone =
|
|
18064
|
+
const tone = str5(p.tone);
|
|
17620
18065
|
const kids = tone ? (n.children ?? []).map((c) => c.type === "card" && !c.props?.tone ? { ...c, props: { ...c.props, tone } } : c) : n.children;
|
|
17621
18066
|
const cols = Math.min(6, Math.max(1, Math.round(Number(String(p.cols ?? "").replace(/[[\]\s]/g, "").split(",").pop()) || 2)));
|
|
17622
18067
|
return `<div${attrs(passthrough(p, `my-4 grid grid-cols-1 gap-4 ${GRID_COLS[cols]}`))}>${renderBlocks(kids, ctx)}</div>
|
|
@@ -17624,12 +18069,12 @@ function block(n, ctx) {
|
|
|
17624
18069
|
}
|
|
17625
18070
|
// A scoped theme: `.dark` re-declares the tokens for its subtree (THEME_SCOPES)
|
|
17626
18071
|
case "theme": {
|
|
17627
|
-
const scope = lookup(THEME_SCOPES,
|
|
18072
|
+
const scope = lookup(THEME_SCOPES, str5(p.name));
|
|
17628
18073
|
if (!scope) {
|
|
17629
|
-
ctx.unknown.add(`theme "${
|
|
18074
|
+
ctx.unknown.add(`theme "${str5(p.name) ?? ""}"`);
|
|
17630
18075
|
return renderBlocks(n.children, ctx);
|
|
17631
18076
|
}
|
|
17632
|
-
return `<div${attrs({ ...passthrough(p, scope), "data-theme":
|
|
18077
|
+
return `<div${attrs({ ...passthrough(p, scope), "data-theme": str5(p.name) })}>${renderBlocks(n.children, ctx)}</div>
|
|
17633
18078
|
`;
|
|
17634
18079
|
}
|
|
17635
18080
|
case "card":
|
|
@@ -17645,17 +18090,49 @@ function block(n, ctx) {
|
|
|
17645
18090
|
const span = Number(p.span) || 0;
|
|
17646
18091
|
const rows = Number(p.rowSpan) || 0;
|
|
17647
18092
|
const style = [span > 1 && `grid-column:span ${span} / span ${span}`, rows > 1 && `grid-row:span ${rows} / span ${rows}`].filter(Boolean).join(";") || void 0;
|
|
17648
|
-
const label =
|
|
17649
|
-
const inner = label !== void 0 ? `<div class="flex h-full min-h-16 items-center justify-center rounded-lg font-mono text-sm font-medium ${lookup(TONE_CLASSES,
|
|
18093
|
+
const label = str5(p.label);
|
|
18094
|
+
const inner = label !== void 0 ? `<div class="flex h-full min-h-16 items-center justify-center rounded-lg font-mono text-sm font-medium ${lookup(TONE_CLASSES, str5(p.tone)) ?? TONE_CLASSES["primary-light"]}">${esc(label)}</div>` : renderBlocks(n.children, ctx);
|
|
17650
18095
|
const { label: _l, tone: _t, rowSpan: _r, ...rest } = p;
|
|
17651
18096
|
const pass = passthrough(rest);
|
|
17652
|
-
const merged = [style,
|
|
18097
|
+
const merged = [style, str5(pass.style)].filter(Boolean).join(";") || void 0;
|
|
17653
18098
|
return `<div${attrs({ ...pass, style: merged })}>${inner}</div>`;
|
|
17654
18099
|
}
|
|
17655
18100
|
case "files":
|
|
17656
|
-
return (n.children ?? []).map((c) => c.type === "unordered-list" || c.type === "ordered-list" ? fileTreeHtml(fileTreeItems(c, ctx),
|
|
18101
|
+
return (n.children ?? []).map((c) => c.type === "unordered-list" || c.type === "ordered-list" ? fileTreeHtml(fileTreeItems(c, ctx), str5(p.class) ?? "") + "\n" : renderBlocks([c], ctx)).join("");
|
|
17657
18102
|
case "container": {
|
|
17658
18103
|
const name = typeof n.meta?.name === "string" ? n.meta.name : "container";
|
|
18104
|
+
if (name === "columns") {
|
|
18105
|
+
const count = Math.min(6, Math.max(1, Math.round(Number(p.count)) || 2));
|
|
18106
|
+
const gap = /^(?:0|\d+(?:\.\d+)?(?:px|rem|em|pt|mm|cm|in|ch|%))$/.test(str5(p.gap) ?? "") ? str5(p.gap) : "1.5rem";
|
|
18107
|
+
const { count: _c, gap: _g, ...rest } = p;
|
|
18108
|
+
const pass = passthrough(rest, "my-4");
|
|
18109
|
+
const style = [`--db-columns:${count}`, `--db-column-gap:${gap}`, COLUMNS_STYLE, str5(pass.style)].filter(Boolean).join(";");
|
|
18110
|
+
return `<div${attrs({ ...pass, "data-directive": "columns", "data-columns": String(count), style })}>${renderBlocks(n.children, ctx)}</div>
|
|
18111
|
+
`;
|
|
18112
|
+
}
|
|
18113
|
+
if (name === "key-value") {
|
|
18114
|
+
const layout = str5(p.layout) === "across" ? "across" : "rows";
|
|
18115
|
+
const { layout: _l, ...rest } = p;
|
|
18116
|
+
const inner = (n.children ?? []).map((c) => c.type === "deflist" ? keyValueList(c, ctx) : renderBlocks([c], ctx)).join("");
|
|
18117
|
+
return `<div${attrs({ ...passthrough(rest, "my-4"), "data-directive": "key-value", "data-layout": layout })}>${inner}</div>
|
|
18118
|
+
`;
|
|
18119
|
+
}
|
|
18120
|
+
if (name === "pdf-page-break" && !n.children?.length)
|
|
18121
|
+
return `<div${attrs({ ...passthrough(p), "data-pdf": "page-break" })}></div>
|
|
18122
|
+
`;
|
|
18123
|
+
if (name === "pdf-keep-together")
|
|
18124
|
+
return `<div${attrs({ ...passthrough(p), "data-pdf": "keep-together" })}>${renderBlocks(n.children, ctx)}</div>
|
|
18125
|
+
`;
|
|
18126
|
+
if (name === "pdf-only") {
|
|
18127
|
+
const headings = ctx.headings.length;
|
|
18128
|
+
const inner = renderBlocks(n.children, ctx);
|
|
18129
|
+
ctx.headings.length = headings;
|
|
18130
|
+
return `<div${attrs({ ...passthrough(p), "data-pdf": "only", hidden: true })}>${inner}</div>
|
|
18131
|
+
`;
|
|
18132
|
+
}
|
|
18133
|
+
if (name === "web-only")
|
|
18134
|
+
return `<div${attrs({ ...passthrough(p), "data-web-only": true })}>${renderBlocks(n.children, ctx)}</div>
|
|
18135
|
+
`;
|
|
17659
18136
|
ctx.unknown.add(`:::${name}`);
|
|
17660
18137
|
const title = typeof n.meta?.title === "string" ? `<p class="font-semibold">${esc(n.meta.title)}</p>` : "";
|
|
17661
18138
|
const nested2 = Object.fromEntries(Object.entries(p).filter(([, v]) => v !== null && typeof v === "object"));
|
|
@@ -17663,29 +18140,29 @@ function block(n, ctx) {
|
|
|
17663
18140
|
`;
|
|
17664
18141
|
}
|
|
17665
18142
|
case "link-button": {
|
|
17666
|
-
const href =
|
|
17667
|
-
const variant = buttonVariant(
|
|
18143
|
+
const href = str5(p.href);
|
|
18144
|
+
const variant = buttonVariant(str5(p.variant), ctx);
|
|
17668
18145
|
const label = insideLink(true, ctx, () => n.children?.length === 1 && n.children[0].type === "paragraph" ? renderInline2(n.children[0].inline, ctx) : renderBlocks(n.children, ctx));
|
|
17669
18146
|
return `<p><a${attrs({ ...passthrough(p, `${BUTTON_BASE} ${lookup(BUTTON_VARIANTS, variant) ?? BUTTON_VARIANTS.default} h-10 px-4 py-2 no-underline`), "data-variant": variant, "data-size": "default", href: href ? linkUrl(href, ctx) : void 0 })}>${label}</a></p>
|
|
17670
18147
|
`;
|
|
17671
18148
|
}
|
|
17672
18149
|
case "youtube": {
|
|
17673
|
-
const id =
|
|
17674
|
-
const title =
|
|
18150
|
+
const id = str5(p.id) ?? "";
|
|
18151
|
+
const title = str5(p.title) ?? "YouTube video";
|
|
17675
18152
|
const { id: _vid, ...ytRest } = p;
|
|
17676
|
-
const poster =
|
|
18153
|
+
const poster = str5(p.poster);
|
|
17677
18154
|
const play = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path d="M8 5v14l11-7z"/></svg>';
|
|
17678
18155
|
return `<a${attrs({ ...passthrough(ytRest, "not-prose group my-4 flex items-center gap-4 rounded-lg border bg-card p-3 text-card-foreground no-underline shadow-sm transition-colors hover:bg-accent/50"), href: `https://www.youtube.com/watch?v=${encodeURIComponent(id)}`, rel: "noopener", "data-component": "youtube" })}>` + (poster ? `<img src="${esc(assetUrl(poster, ctx))}" alt="" class="h-16 w-28 shrink-0 rounded object-cover" loading="lazy">` : "") + `<span class="flex size-10 shrink-0 items-center justify-center rounded-full bg-red-600 text-white">${play}</span><span class="min-w-0"><span class="block font-semibold group-hover:underline">${esc(title)}</span><span class="block text-xs text-muted-foreground">YouTube</span></span></a>
|
|
17679
18156
|
`;
|
|
17680
18157
|
}
|
|
17681
18158
|
case "diagram": {
|
|
17682
|
-
const lang =
|
|
17683
|
-
const code =
|
|
17684
|
-
const svg4 =
|
|
17685
|
-
return svg4 ? diagramFigure(lang, svg4,
|
|
18159
|
+
const lang = str5(p.lang) ?? "mermaid";
|
|
18160
|
+
const code = str5(p.code) ?? "";
|
|
18161
|
+
const svg4 = str5(p.svg) ?? ctx.diagram?.(lang, code);
|
|
18162
|
+
return svg4 ? diagramFigure(lang, svg4, str5(p.title), p) : codeBlock({ type: "code", props: { ...p, language: lang }, html: code }, ctx);
|
|
17686
18163
|
}
|
|
17687
18164
|
case "math-block": {
|
|
17688
|
-
const latex =
|
|
18165
|
+
const latex = str5(p.latex) ?? "";
|
|
17689
18166
|
const html = renderMath(latex, true, ctx);
|
|
17690
18167
|
return html != null ? `<div class="my-4 overflow-x-auto">${html}</div>
|
|
17691
18168
|
` : `<pre class="my-4 overflow-x-auto rounded-md border bg-muted p-4 text-sm"><code class="math-display">${esc(latex)}</code></pre>
|
|
@@ -17707,7 +18184,7 @@ function block(n, ctx) {
|
|
|
17707
18184
|
case "endpoint":
|
|
17708
18185
|
return renderApiNode2(n, ctx);
|
|
17709
18186
|
case "include": {
|
|
17710
|
-
const target =
|
|
18187
|
+
const target = str5(p.path) ?? str5(p.src) ?? str5(p.file) ?? "";
|
|
17711
18188
|
const remote = /https?:\/\/\S+/.exec(target)?.[0];
|
|
17712
18189
|
if (remote) {
|
|
17713
18190
|
ctx.unknown.add("include of a remote file (not fetched)");
|
|
@@ -17786,7 +18263,7 @@ function diagramFigure(lang, svg4, title, p) {
|
|
|
17786
18263
|
function codeRequest(n) {
|
|
17787
18264
|
const p = n.props ?? {};
|
|
17788
18265
|
const code = n.html ?? String(p.code ?? "");
|
|
17789
|
-
const rawLang =
|
|
18266
|
+
const rawLang = str5(p.language) ?? str5(p.lang);
|
|
17790
18267
|
const lang = rawLang === "terminal" ? "bash" : rawLang;
|
|
17791
18268
|
const highlights = [...parseLineRanges(p.highlights ?? p.highlight ?? p.hl_lines), ...parseLineRanges(p.mark)];
|
|
17792
18269
|
const diffAdd = [...parseLineRanges(p.diffAdd), ...parseLineRanges(p.ins)];
|
|
@@ -17807,7 +18284,7 @@ function highlightInputs(tree) {
|
|
|
17807
18284
|
out.push({ lang, code });
|
|
17808
18285
|
} else if (n.type === "diagram") {
|
|
17809
18286
|
const p = n.props ?? {};
|
|
17810
|
-
const { lang, code } = codeRequest({ type: "code", props: { ...p, language:
|
|
18287
|
+
const { lang, code } = codeRequest({ type: "code", props: { ...p, language: str5(p.lang) ?? "mermaid" }, html: str5(p.code) ?? "" });
|
|
17811
18288
|
out.push({ lang, code });
|
|
17812
18289
|
} else if (API_NODE_TYPES.has(n.type)) {
|
|
17813
18290
|
out.push(...apiCodeInputs(n));
|
|
@@ -17828,12 +18305,12 @@ function codeHtml(code, lang, ctx) {
|
|
|
17828
18305
|
}
|
|
17829
18306
|
function codeBlock(n, ctx) {
|
|
17830
18307
|
const p = n.props ?? {};
|
|
17831
|
-
const rawLang =
|
|
18308
|
+
const rawLang = str5(p.language) ?? str5(p.lang);
|
|
17832
18309
|
const { code, lang, opts } = codeRequest(n);
|
|
17833
18310
|
const svg4 = rawLang && ctx.diagram ? ctx.diagram(rawLang, code) : void 0;
|
|
17834
18311
|
if (svg4)
|
|
17835
|
-
return diagramFigure(rawLang, svg4,
|
|
17836
|
-
const title =
|
|
18312
|
+
return diagramFigure(rawLang, svg4, str5(p.title) ?? str5(p.filename), p);
|
|
18313
|
+
const title = str5(p.title) ?? str5(p.filename);
|
|
17837
18314
|
const { highlights, lineNumbers, diffAdd, diffRemove } = opts;
|
|
17838
18315
|
const hl = ctx.highlighter ?? plainHighlighter;
|
|
17839
18316
|
const collapse2 = parseLineRanges(p.collapse);
|
|
@@ -17864,49 +18341,33 @@ function codeBlock(n, ctx) {
|
|
|
17864
18341
|
"data-line-numbers": lineNumbers || void 0,
|
|
17865
18342
|
// With a gutter or [!code …] markers the text on the page is not the code: copy the source, markers removed.
|
|
17866
18343
|
// An `ansi` block: the text as shown, without its escape codes.
|
|
17867
|
-
"data-copy-text":
|
|
18344
|
+
"data-copy-text": str5(p.copyText) ?? (lineNumbers || diffs || collapse2.length > 0 || code.includes("[!code") ? stripMarkersForCopy(shown) : ansi ? shown : void 0)
|
|
17868
18345
|
})}>` + header2 + floating + `<div data-part="code" class="${rich ? "code-rich-body " : ""}relative overflow-x-auto [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:px-4 [&_pre]:py-3">${pre}</div></db-code-block>
|
|
17869
18346
|
`;
|
|
17870
18347
|
}
|
|
17871
18348
|
function table(n, ctx) {
|
|
17872
18349
|
const p = n.props ?? {};
|
|
17873
|
-
const caption =
|
|
18350
|
+
const caption = str5(p.caption);
|
|
17874
18351
|
const cap = caption ? `<caption class="mb-2 text-left text-sm font-medium text-foreground">${titleMarkup(caption, ctx)}</caption>` : "";
|
|
17875
18352
|
return `<div class="relative w-full overflow-x-auto" tabindex="0"><table${attrs(passthrough(p, "my-4 w-full caption-top text-sm"))}>${cap}${renderBlocks(n.children, ctx)}</table></div>
|
|
17876
18353
|
`;
|
|
17877
18354
|
}
|
|
17878
|
-
var VARIANT_ALIAS = { important: "info", caution: "danger", error: "failure", hint: "tip", attention: "warning" };
|
|
17879
|
-
var ALERT_BASE = "relative w-full rounded-lg border p-4 [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:size-4 [&>svg~div]:pl-7";
|
|
17880
|
-
var ALERT_VARIANT = {
|
|
17881
|
-
note: "border-note/50 bg-note/5 text-foreground [&>svg]:text-note",
|
|
17882
|
-
abstract: "border-abstract/50 bg-abstract/5 text-foreground [&>svg]:text-abstract",
|
|
17883
|
-
info: "border-info/50 bg-info/5 text-foreground [&>svg]:text-info",
|
|
17884
|
-
tip: "border-tip/50 bg-tip/5 text-foreground [&>svg]:text-tip",
|
|
17885
|
-
success: "border-success/50 bg-success/5 text-foreground [&>svg]:text-success",
|
|
17886
|
-
question: "border-question/50 bg-question/5 text-foreground [&>svg]:text-question",
|
|
17887
|
-
warning: "border-warning/50 bg-warning/5 text-foreground [&>svg]:text-warning",
|
|
17888
|
-
failure: "border-failure/50 bg-failure/5 text-foreground [&>svg]:text-failure",
|
|
17889
|
-
danger: "border-danger/50 bg-danger/5 text-foreground [&>svg]:text-danger",
|
|
17890
|
-
bug: "border-bug/50 bg-bug/5 text-foreground [&>svg]:text-bug",
|
|
17891
|
-
example: "border-example/50 bg-example/5 text-foreground [&>svg]:text-example",
|
|
17892
|
-
quote: "border-quote/50 bg-quote/5 text-foreground [&>svg]:text-quote"
|
|
17893
|
-
};
|
|
17894
18355
|
var COLLAPSIBLE = Object.fromEntries(Object.keys(ALERT_VARIANT).map((v) => [v, { border: `border-${v}/50`, summary: `bg-${v}/10`, icon: `text-${v}`, body: `bg-${v}/3` }]));
|
|
17895
18356
|
function calloutLabel(type, ctx) {
|
|
17896
18357
|
return ctx.t(`callout.${type}`) || CALLOUTS[type]?.label || type.charAt(0).toUpperCase() + type.slice(1);
|
|
17897
18358
|
}
|
|
17898
18359
|
function callout(n, ctx) {
|
|
17899
18360
|
const p = n.props ?? {};
|
|
17900
|
-
const type = (
|
|
18361
|
+
const type = (str5(p.variant) ?? str5(p.type) ?? "note").toLowerCase();
|
|
17901
18362
|
const variant = ALERT_VARIANT[VARIANT_ALIAS[type] ?? type] ? VARIANT_ALIAS[type] ?? type : "note";
|
|
17902
|
-
const title =
|
|
18363
|
+
const title = str5(p.title);
|
|
17903
18364
|
const titleHtml = title ? titleMarkup(title, ctx) : esc(calloutLabel(type, ctx));
|
|
17904
18365
|
const body = renderBlocks(n.children, ctx);
|
|
17905
18366
|
if (flagOn(p.collapsible) || p.collapsed != null) {
|
|
17906
18367
|
const open = p.collapsed === false || p.collapsed === "false" || flagOn(p.open);
|
|
17907
18368
|
return collapsibleAlert(variant, titleHtml, body, open, { ...p, "data-type": p["data-type"] ?? type }, ctx);
|
|
17908
18369
|
}
|
|
17909
|
-
return `<div${attrs({ ...passthrough(p, `${ALERT_BASE} ${ALERT_VARIANT[variant]} my-4`), "data-variant": variant, "data-type": type, role: "note" })}>` + alertIcon(variant, p, ctx) + `<div data-part="title" class="
|
|
18370
|
+
return `<div${attrs({ ...passthrough(p, `${ALERT_BASE} ${ALERT_VARIANT[variant]} my-4`), "data-variant": variant, "data-type": type, role: "note" })}>` + alertIcon(variant, p, ctx) + `<div data-part="title" class="${ALERT_TITLE_CLASS}">${titleHtml}</div><div class="${ALERT_BODY_CLASS}">${body}</div></div>
|
|
17910
18371
|
`;
|
|
17911
18372
|
}
|
|
17912
18373
|
var TITLE_TAG = /^<\/?(?:code|kbd|b|strong|i|em|s|del|mark|sub|sup|br)\s*\/?>$/i;
|
|
@@ -17940,7 +18401,7 @@ function flagOn(v) {
|
|
|
17940
18401
|
return v !== void 0 && v !== null && v !== false && v !== "false";
|
|
17941
18402
|
}
|
|
17942
18403
|
function alertIcon(variant, p, ctx) {
|
|
17943
|
-
const name =
|
|
18404
|
+
const name = str5(p.icon);
|
|
17944
18405
|
const custom = name ? resolveIconMarkup(name, ctx) : void 0;
|
|
17945
18406
|
if (name && custom === void 0)
|
|
17946
18407
|
(ctx.missingIcons ??= /* @__PURE__ */ new Set()).add(name);
|
|
@@ -17954,22 +18415,23 @@ function collapsibleAlert(variant, titleHtml, body, open, p, ctx) {
|
|
|
17954
18415
|
`;
|
|
17955
18416
|
}
|
|
17956
18417
|
var AVATAR = "relative inline-flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted";
|
|
18418
|
+
var AVATAR_IMAGE = "absolute inset-0 aspect-square h-full w-full object-cover before:absolute before:inset-0 before:flex before:items-center before:justify-center before:rounded-full before:bg-muted before:text-sm before:font-semibold before:text-muted-foreground before:content-[attr(data-initials)]";
|
|
17957
18419
|
var AVATAR_FALLBACK = "flex h-full w-full items-center justify-center rounded-full bg-muted text-sm font-semibold text-muted-foreground";
|
|
17958
18420
|
function avatar(p, ctx) {
|
|
17959
|
-
const src =
|
|
17960
|
-
const alt =
|
|
17961
|
-
const initials =
|
|
18421
|
+
const src = str5(p.src);
|
|
18422
|
+
const alt = str5(p.alt) ?? "";
|
|
18423
|
+
const initials = str5(p.fallback) || alt.split(" ").map((w) => w[0] ?? "").join("").slice(0, 2).toUpperCase();
|
|
17962
18424
|
const { src: _s, alt: _a3, fallback: _f, ...rest } = p;
|
|
17963
|
-
const inner = src ? `<
|
|
17964
|
-
const label = alt ? { role: "img", "aria-label":
|
|
18425
|
+
const inner = src ? `<span class="${AVATAR_FALLBACK}" aria-hidden="true">${esc(initials)}</span><img class="${AVATAR_IMAGE}" src="${esc(assetUrl(src, ctx))}" alt="" width="40" height="40" data-initials="${esc(initials)}">` : `<span class="${AVATAR_FALLBACK}" aria-hidden="true">${esc(initials)}</span>`;
|
|
18426
|
+
const label = alt ? { role: "img", "aria-label": str5(rest["aria-label"]) ?? alt } : {};
|
|
17965
18427
|
const { "aria-label": _l, ...own2 } = passthrough(rest, AVATAR);
|
|
17966
18428
|
return `<span${attrs({ ...alt ? own2 : { ...own2, "aria-label": _l }, ...label })}>${inner}</span>`;
|
|
17967
18429
|
}
|
|
17968
18430
|
var CHEVRON = '<svg class="h-3 w-3 transition-transform group-open:rotate-90" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
|
|
17969
18431
|
function example(n, ctx) {
|
|
17970
18432
|
const p = n.props ?? {};
|
|
17971
|
-
const title =
|
|
17972
|
-
const src =
|
|
18433
|
+
const title = str5(p.title);
|
|
18434
|
+
const src = str5(p.src);
|
|
17973
18435
|
if (src && !n.children?.length) {
|
|
17974
18436
|
return `<p class="my-4 rounded-lg border border-dashed border-border px-4 py-3 text-sm text-muted-foreground">Example <code>${esc(src)}</code>${title ? `: ${esc(title)}` : ""}, shown when the site is built.</p>
|
|
17975
18437
|
`;
|
|
@@ -17994,17 +18456,17 @@ function tabs(n, ctx) {
|
|
|
17994
18456
|
return renderBlocks(n.children, ctx);
|
|
17995
18457
|
const used = /* @__PURE__ */ new Set();
|
|
17996
18458
|
const items3 = kids.map((k, i) => {
|
|
17997
|
-
const name =
|
|
18459
|
+
const name = str5(k.props?.label) ?? str5(k.props?.title) ?? str5(k.props?.value);
|
|
17998
18460
|
let v = (name ?? `Tab ${i + 1}`).trim();
|
|
17999
18461
|
while (used.has(v))
|
|
18000
18462
|
v += ` (${i + 1})`;
|
|
18001
18463
|
used.add(v);
|
|
18002
18464
|
const signal = tabDiffSignal(k);
|
|
18003
18465
|
const mark = signal ? `<span class="db-tab-mark" data-diff-tab="${esc(signal)}"><span aria-hidden="true">${TAB_GLYPH[signal] ?? "\u2022"}</span><span class="sr-only">${esc(signal)} in this comparison</span></span>` : "";
|
|
18004
|
-
return { value: v, label: esc(name ?? `Tab ${i + 1}`) + mark, body: () => renderBlocks(k.children, ctx), panelAttrs: sourceAttrText(k, ctx) };
|
|
18466
|
+
return { value: v, label: esc(name ?? `Tab ${i + 1}`) + mark, body: () => renderBlocks(k.children, ctx), panelAttrs: sourceAttrText(k, ctx), id: str5(k.props?.id) };
|
|
18005
18467
|
});
|
|
18006
|
-
const syncKey =
|
|
18007
|
-
return tabGroup(items3, ctx, passthrough(p, "my-4 w-full overflow-hidden rounded-lg border border-border"), syncKey,
|
|
18468
|
+
const syncKey = str5(p.syncKey) ?? str5(p["sync-key"]) ?? str5(p.group);
|
|
18469
|
+
return tabGroup(items3, ctx, passthrough(p, "my-4 w-full overflow-hidden rounded-lg border border-border"), syncKey, str5(p.variant));
|
|
18008
18470
|
}
|
|
18009
18471
|
function tabGroup(items3, ctx, rootAttrs, syncKey, variant) {
|
|
18010
18472
|
const v = lookup(TAB_VARIANTS, variant);
|
|
@@ -18013,7 +18475,7 @@ function tabGroup(items3, ctx, rootAttrs, syncKey, variant) {
|
|
|
18013
18475
|
let panels = "";
|
|
18014
18476
|
items3.forEach((it, i) => {
|
|
18015
18477
|
const tid = `tab-${group}-${i + 1}`;
|
|
18016
|
-
const pid = `tabpanel-${group}-${i + 1}`;
|
|
18478
|
+
const pid = it.id ?? `tabpanel-${group}-${i + 1}`;
|
|
18017
18479
|
const sel = i === 0;
|
|
18018
18480
|
list5 += `<button data-part="trigger" data-value="${esc(it.value)}" role="tab" type="button" id="${tid}" aria-controls="${pid}" aria-selected="${sel}" tabindex="${sel ? 0 : -1}"${sel ? ' data-state="active"' : ""} class="${v?.trigger ?? TAB_TRIGGER}">${it.label}</button>`;
|
|
18019
18481
|
panels += `<div data-part="content" data-value="${esc(it.value)}" role="tabpanel" id="${pid}" aria-labelledby="${tid}" tabindex="0"${sel ? ' data-state="active"' : " hidden"} class="${TAB_CONTENT}"${it.panelAttrs ?? ""}>${it.body()}</div>`;
|
|
@@ -18027,32 +18489,27 @@ function accordion(n, ctx) {
|
|
|
18027
18489
|
const items3 = (n.children ?? []).filter((c) => c.type === "accordion-item");
|
|
18028
18490
|
const chevron = '<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" class="shrink-0 transition-transform duration-200" aria-hidden="true" focusable="false"><path d="m6 9 6 6 6-6"/></svg>';
|
|
18029
18491
|
const html = items3.map((it, i) => {
|
|
18030
|
-
const label =
|
|
18031
|
-
const value =
|
|
18492
|
+
const label = str5(it.props?.label) ?? str5(it.props?.title) ?? `Item ${i + 1}`;
|
|
18493
|
+
const value = str5(it.props?.value) ?? `${slugify(label)}-${i + 1}`;
|
|
18032
18494
|
const tid = `acc-${group}-${i + 1}`;
|
|
18033
18495
|
const cid = `accpanel-${group}-${i + 1}`;
|
|
18034
18496
|
return `<div data-part="item" data-value="${esc(value)}" class="border-b"${sourceAttrText(it, ctx)}><button data-part="trigger" type="button" id="${tid}" aria-controls="${cid}" aria-expanded="false" class="flex w-full items-center justify-between border-0 bg-transparent py-4 text-left font-medium text-foreground transition-all hover:underline disabled:pointer-events-none disabled:opacity-50 [&[aria-expanded=true]>svg]:rotate-180"><span>${esc(label)}</span>${chevron}</button><div data-part="content" id="${cid}" role="region" aria-labelledby="${tid}" hidden class="overflow-hidden pb-4 text-sm transition-all">${renderBlocks(it.children, ctx)}</div></div>`;
|
|
18035
18497
|
}).join("");
|
|
18036
18498
|
const dv = p.defaultValue;
|
|
18037
|
-
const defaultValue = Array.isArray(dv) ? dv.map(String).join(",") :
|
|
18499
|
+
const defaultValue = Array.isArray(dv) ? dv.map(String).join(",") : str5(dv);
|
|
18038
18500
|
const { defaultValue: _d, ...rest } = p;
|
|
18039
|
-
return `<db-accordion${attrs({ ...passthrough(rest, "my-4 w-full"), type:
|
|
18501
|
+
return `<db-accordion${attrs({ ...passthrough(rest, "my-4 w-full"), type: str5(p.type) ?? "single", "default-value": defaultValue })}>${html}</db-accordion>
|
|
18040
18502
|
`;
|
|
18041
18503
|
}
|
|
18042
18504
|
function details(n, ctx) {
|
|
18043
18505
|
let p = n.props ?? {};
|
|
18044
|
-
|
|
18045
|
-
|
|
18046
|
-
|
|
18047
|
-
|
|
18048
|
-
|
|
18049
|
-
|
|
18050
|
-
|
|
18051
|
-
p = { ...p, id: uniqueId(ctx, id) };
|
|
18052
|
-
}
|
|
18053
|
-
}
|
|
18054
|
-
const title = str4(p.title) ?? str4(p.summary) ?? ctx.t("details");
|
|
18055
|
-
const type = (str4(p.variant) ?? str4(p.type) ?? "").toLowerCase();
|
|
18506
|
+
const sheetId = !str5(p.id) && isDetailsSheet(p) ? pageIds.get(ctx)?.get(n)?.id : void 0;
|
|
18507
|
+
if (sheetId) {
|
|
18508
|
+
ctx.ids.add(sheetId);
|
|
18509
|
+
p = { ...p, id: sheetId };
|
|
18510
|
+
}
|
|
18511
|
+
const title = str5(p.title) ?? str5(p.summary) ?? ctx.t("details");
|
|
18512
|
+
const type = (str5(p.variant) ?? str5(p.type) ?? "").toLowerCase();
|
|
18056
18513
|
const variant = ALERT_VARIANT[VARIANT_ALIAS[type] ?? type] ? VARIANT_ALIAS[type] ?? type : "note";
|
|
18057
18514
|
const html = collapsibleAlert(variant, titleMarkup(title, ctx), renderBlocks(n.children, ctx), flagOn(p.open), p, ctx);
|
|
18058
18515
|
if (!isDetailsSheet(p))
|
|
@@ -18062,7 +18519,7 @@ function details(n, ctx) {
|
|
|
18062
18519
|
}
|
|
18063
18520
|
function figure(n, ctx) {
|
|
18064
18521
|
const p = n.props ?? {};
|
|
18065
|
-
const caption =
|
|
18522
|
+
const caption = str5(p.caption);
|
|
18066
18523
|
const kids = n.children ?? [];
|
|
18067
18524
|
const body = kids.length === 1 && kids[0].type === "paragraph" && kids[0].inline?.every((i) => i.type === "image" || i.type === "text" && !i.text.trim()) ? renderInline2(kids[0].inline, ctx) : renderBlocks(kids, ctx);
|
|
18068
18525
|
return `<figure${attrs(passthrough(p, "my-4"))}>${body}${caption ? `<figcaption class="mt-2 text-center text-sm text-muted-foreground">${titleMarkup(caption, ctx)}</figcaption>` : ""}</figure>
|
|
@@ -18106,30 +18563,34 @@ function fileTreeItems(list5, ctx) {
|
|
|
18106
18563
|
}
|
|
18107
18564
|
function card(n, ctx) {
|
|
18108
18565
|
const p = n.props ?? {};
|
|
18109
|
-
const title =
|
|
18110
|
-
const href =
|
|
18111
|
-
const desc =
|
|
18112
|
-
const ic =
|
|
18566
|
+
const title = str5(p.title);
|
|
18567
|
+
const href = str5(p.href);
|
|
18568
|
+
const desc = str5(p.description);
|
|
18569
|
+
const ic = str5(p.icon);
|
|
18113
18570
|
const iconHtml = !ic ? "" : /\.(svg|png|jpe?g|webp|avif)$/i.test(ic) ? `<img src="${esc(assetUrl(ic, ctx))}" alt="" class="size-5 mb-2" loading="lazy">` : namedIcon(ic, "mb-2 size-5 text-muted-foreground", ctx);
|
|
18114
18571
|
const before = ctx.lastHeadingLevel;
|
|
18115
18572
|
const whole = !!href && (!title || !cardBodyHasLink(n.children));
|
|
18116
18573
|
const titleText = title && href && !whole ? `<a href="${esc(linkUrl(href, ctx))}">${esc(title)}</a>` : esc(title ?? "");
|
|
18117
|
-
const inner = insideLink(whole, ctx, () => iconHtml +
|
|
18118
|
-
|
|
18574
|
+
const inner = insideLink(whole, ctx, () => iconHtml + // The parts are named (`data-part`), and the card and its tone below (`data-component`,
|
|
18575
|
+
// `data-tone`): what a print theme may rely on, where the classes are the site's own business
|
|
18576
|
+
// (docs/pdf-directives.md, "What a print theme can rely on"). `data-card-title` is the older name.
|
|
18577
|
+
(title ? `<div class="not-prose m-0 border-0 p-0 text-base font-semibold" data-part="title" data-card-title>${titleText}</div>` : "") + (desc ? `<p class="m-0 mt-1 text-sm text-muted-foreground [text-decoration:none]" data-part="description">${esc(desc)}</p>` : "") + // Body blocks in the same description wrapper as the Astro pipeline's card (a <div>: they carry their own <p>).
|
|
18578
|
+
(n.children?.length ? `<div class="text-sm text-muted-foreground mt-1 [text-decoration:none]" data-part="body">${renderBlocks(n.children, ctx)}</div>` : ""));
|
|
18119
18579
|
ctx.lastHeadingLevel = before;
|
|
18120
|
-
const toned = lookup(CARD_TONE_CLASSES,
|
|
18580
|
+
const toned = lookup(CARD_TONE_CLASSES, str5(p.tone));
|
|
18121
18581
|
const cls = `rounded-lg border ${toned ?? "bg-card"} p-4 text-card-foreground shadow-sm${whole ? ` transition-colors ${toned ? "hover:shadow-md" : "hover:border-foreground/20"}` : ""}`;
|
|
18122
|
-
|
|
18582
|
+
const root = { ...passthrough(p, cls), "data-component": "card", "data-tone": toned ? str5(p.tone) : void 0 };
|
|
18583
|
+
return whole ? `<div${attrs(root)}><div class="p-0"><a href="${esc(linkUrl(href, ctx))}" data-variant="card" class="block text-foreground [text-decoration:none]">${inner}</a></div></div>` : `<div${attrs(root)}><div class="p-0">${inner}</div></div>`;
|
|
18123
18584
|
}
|
|
18124
18585
|
function linkCard(n, ctx) {
|
|
18125
18586
|
if (n.children?.length)
|
|
18126
18587
|
return card(n, ctx);
|
|
18127
18588
|
const p = n.props ?? {};
|
|
18128
|
-
const title =
|
|
18129
|
-
const href =
|
|
18130
|
-
const desc =
|
|
18589
|
+
const title = str5(p.title) ?? "";
|
|
18590
|
+
const href = str5(p.href) ?? "#";
|
|
18591
|
+
const desc = str5(p.description);
|
|
18131
18592
|
const chevron = '<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" class="size-4 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5" aria-hidden="true" focusable="false"><path d="m9 18 6-6-6-6"/></svg>';
|
|
18132
|
-
const ic =
|
|
18593
|
+
const ic = str5(p.icon);
|
|
18133
18594
|
const iconHtml = ic ? namedIcon(ic, "size-4 shrink-0 text-muted-foreground", ctx) : "";
|
|
18134
18595
|
return `<a${attrs({ ...passthrough(p, "group not-prose my-4 flex flex-col gap-1 rounded-lg border bg-card p-4 text-card-foreground no-underline shadow-sm transition-colors hover:bg-accent/50"), href: linkUrl(href, ctx) })}><div class="flex items-center justify-between"><span class="flex min-w-0 items-center gap-2">${iconHtml}<span class="text-sm font-semibold group-hover:underline">${esc(title)}</span></span>${chevron}</div>${desc ? `<p class="m-0 text-sm text-muted-foreground">${esc(desc)}</p>` : ""}</a>`;
|
|
18135
18596
|
}
|
|
@@ -20339,7 +20800,7 @@ function segments(value) {
|
|
|
20339
20800
|
const segs = value.split("/");
|
|
20340
20801
|
return segs.every((s) => s !== "" && s !== "." && s !== "..") ? segs : void 0;
|
|
20341
20802
|
}
|
|
20342
|
-
function pageFacets(
|
|
20803
|
+
function pageFacets(meta2, options = {}) {
|
|
20343
20804
|
const out = /* @__PURE__ */ Object.create(null);
|
|
20344
20805
|
const nested2 = new Set(options.hierarchical ?? []);
|
|
20345
20806
|
const add = (name, value, hierarchical) => {
|
|
@@ -20356,7 +20817,7 @@ function pageFacets(meta, options = {}) {
|
|
|
20356
20817
|
};
|
|
20357
20818
|
const list5 = (v) => Array.isArray(v) ? v : [];
|
|
20358
20819
|
const tagsNested = nested2.has("tags");
|
|
20359
|
-
for (const tag of list5(
|
|
20820
|
+
for (const tag of list5(meta2?.tags)) {
|
|
20360
20821
|
if (typeof tag !== "string")
|
|
20361
20822
|
continue;
|
|
20362
20823
|
const slash = tag.indexOf("/");
|
|
@@ -20367,19 +20828,19 @@ function pageFacets(meta, options = {}) {
|
|
|
20367
20828
|
add("tag", tag, tagsNested);
|
|
20368
20829
|
}
|
|
20369
20830
|
}
|
|
20370
|
-
for (const v of list5(
|
|
20831
|
+
for (const v of list5(meta2?.audience))
|
|
20371
20832
|
add("audience", v, nested2.has("audience"));
|
|
20372
|
-
for (const v of list5(
|
|
20833
|
+
for (const v of list5(meta2?.category))
|
|
20373
20834
|
add("category", v, nested2.has("category"));
|
|
20374
|
-
add("status",
|
|
20375
|
-
for (const v of list5(
|
|
20835
|
+
add("status", meta2?.status, nested2.has("status"));
|
|
20836
|
+
for (const v of list5(meta2?.taxonomies?.status))
|
|
20376
20837
|
add("status", v, nested2.has("status"));
|
|
20377
|
-
add("type",
|
|
20378
|
-
for (const v of list5(
|
|
20838
|
+
add("type", meta2?.type, nested2.has("type"));
|
|
20839
|
+
for (const v of list5(meta2?.taxonomies?.type))
|
|
20379
20840
|
add("type", v, nested2.has("type"));
|
|
20380
20841
|
add("product", options.unit?.product, false);
|
|
20381
20842
|
add("version", options.unit?.version, false);
|
|
20382
|
-
for (const [name, values] of Object.entries(
|
|
20843
|
+
for (const [name, values] of Object.entries(meta2?.taxonomies ?? {})) {
|
|
20383
20844
|
if (BUILT_IN.has(name))
|
|
20384
20845
|
continue;
|
|
20385
20846
|
for (const v of list5(values))
|
|
@@ -21511,7 +21972,7 @@ function hasPlaceholder(nodes, types) {
|
|
|
21511
21972
|
async function resolvePlaceholders(tree, resolvers, ctx) {
|
|
21512
21973
|
const byType = new Map(resolvers.map((r) => [r.type, r]));
|
|
21513
21974
|
if (!hasPlaceholder(tree, new Set(byType.keys()))) return void 0;
|
|
21514
|
-
const usedIds =
|
|
21975
|
+
const usedIds = pageIds2(tree);
|
|
21515
21976
|
const warnings = [];
|
|
21516
21977
|
const walk = async (nodes) => {
|
|
21517
21978
|
for (let i = 0; i < nodes.length; i++) {
|
|
@@ -21532,7 +21993,7 @@ async function resolvePlaceholders(tree, resolvers, ctx) {
|
|
|
21532
21993
|
i--;
|
|
21533
21994
|
continue;
|
|
21534
21995
|
}
|
|
21535
|
-
|
|
21996
|
+
pageIds2(got.nodes, usedIds);
|
|
21536
21997
|
nodes.splice(i, 1, ...got.nodes);
|
|
21537
21998
|
i += got.nodes.length - 1;
|
|
21538
21999
|
}
|
|
@@ -21540,28 +22001,31 @@ async function resolvePlaceholders(tree, resolvers, ctx) {
|
|
|
21540
22001
|
await walk(tree);
|
|
21541
22002
|
return warnings;
|
|
21542
22003
|
}
|
|
21543
|
-
function
|
|
21544
|
-
const
|
|
21545
|
-
|
|
21546
|
-
|
|
21547
|
-
|
|
21548
|
-
|
|
22004
|
+
function pageIds2(nodes, ids = /* @__PURE__ */ new Set()) {
|
|
22005
|
+
for (const { id } of headingIds(nodes).values()) ids.add(id);
|
|
22006
|
+
const fromHtml = (html) => {
|
|
22007
|
+
for (const m of html.matchAll(/\sid\s*=\s*["']([^"']+)["']/gi)) ids.add(m[1]);
|
|
22008
|
+
};
|
|
22009
|
+
const inline3 = (list5) => {
|
|
22010
|
+
for (const x of list5) {
|
|
22011
|
+
const a = authoredInlineAnchor(x);
|
|
22012
|
+
if (a) ids.add(a);
|
|
22013
|
+
if (x.type === "html-inline") fromHtml(x.html);
|
|
22014
|
+
if ("children" in x && Array.isArray(x.children)) inline3(x.children);
|
|
22015
|
+
}
|
|
21549
22016
|
};
|
|
21550
22017
|
const walk = (list5) => {
|
|
21551
22018
|
for (const n of list5) {
|
|
21552
|
-
|
|
21553
|
-
|
|
21554
|
-
|
|
21555
|
-
|
|
21556
|
-
for (const m of n.html.matchAll(/<h[1-6]\b[^>]*\sid="([^"]*)"/gi)) take(m[1]);
|
|
21557
|
-
}
|
|
22019
|
+
const p = n.props ?? {};
|
|
22020
|
+
if (n.type !== "heading" && typeof p.id === "string" && p.id) ids.add(p.id);
|
|
22021
|
+
if (typeof n.html === "string" && /^(?:prose|html|html-container)$/.test(n.type)) fromHtml(n.html);
|
|
22022
|
+
if (n.inline) inline3(n.inline);
|
|
21558
22023
|
if (n.children) walk(n.children);
|
|
21559
22024
|
}
|
|
21560
22025
|
};
|
|
21561
22026
|
walk(nodes);
|
|
21562
22027
|
return ids;
|
|
21563
22028
|
}
|
|
21564
|
-
var RESERVED_ID2 = /^(db-|tab-\d|tabpanel-\d|acc-\d|accpanel-\d|fn-|fnref-)/;
|
|
21565
22029
|
var autodocUnresolved = {
|
|
21566
22030
|
type: "autodoc-ref",
|
|
21567
22031
|
async resolve(node) {
|
|
@@ -21922,7 +22386,7 @@ function staleUnitFiles(previous, now2, written, assets) {
|
|
|
21922
22386
|
}
|
|
21923
22387
|
|
|
21924
22388
|
// src/generated/versions.ts
|
|
21925
|
-
var PARSER_VERSION = "@dogsbay/format-dogsbay-md@0.2.0-beta.
|
|
22389
|
+
var PARSER_VERSION = "@dogsbay/format-dogsbay-md@0.2.0-beta.176 @dogsbay/corpus@0.2.0-beta.176 @dogsbay/minja@0.2.0-beta.176 @dogsbay/serialize-core@0.2.0-beta.176 @dogsbay/types@0.2.0-beta.176 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";
|
|
21926
22390
|
|
|
21927
22391
|
// src/core/tree-cache.ts
|
|
21928
22392
|
var FORMAT = "p1";
|
|
@@ -22307,9 +22771,9 @@ function unitPages(cfg, unit, units, files, frontMatterOf, read, includeDrafts)
|
|
|
22307
22771
|
}
|
|
22308
22772
|
|
|
22309
22773
|
// src/generated/assets.ts
|
|
22310
|
-
var CLIENT_JS = '/*! dogsbay-ssg site client (Apache-2.0). Third-party notices: THIRD-PARTY-NOTICES.txt */\n"use strict";(()=>{var Lo=Object.defineProperty;var ko=(n,t,e)=>t in n?Lo(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var p=(n,t,e)=>ko(n,typeof t!="symbol"?t+"":t,e);var Y=class extends HTMLElement{constructor(){super(...arguments);p(this,"_initialized",!1);p(this,"_deferred",!1)}connectedCallback(){if(!this._initialized&&!this.firstElementChild&&typeof document<"u"&&document.readyState==="loading"){this._deferred||(this._deferred=!0,document.addEventListener("DOMContentLoaded",()=>{this._deferred=!1,this.isConnected&&this.connectedCallback()},{once:!0}));return}this._initialized||(this.setup(),this._initialized=!0),this.connect()}disconnectedCallback(){this.disconnect()}setup(){}connect(){}disconnect(){}},To={"db-tabs":"block","db-accordion":"block","db-collapsible":"block","db-details-sheet":"block","db-card":"block","db-steps":"block","db-code-block":"block","db-link-button":"inline-block","db-dialog":"contents","db-popover":"inline-block","db-tooltip":"inline-block","db-select":"inline-block","db-combobox":"block","db-nav-tree":"block","db-toc":"block","db-announcement":"block"},xn="dogsbay-elements-display";function G(){if(typeof document>"u"||document.getElementById(xn))return;let n=Object.entries(To).map(([e,i])=>`:where(${e}){display:${i}}`).join(""),t=document.createElement("style");t.id=xn,t.textContent=n,document.head.prepend(t)}function Oo(n){return n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}function Ut(n,t,e){let i=t;do i+=e?-1:1;while(i>=0&&i<n.length&&Oo(n[i]));return i}var re=class{constructor(n,t,e={}){p(this,"container");p(this,"itemSelector");p(this,"opts");p(this,"keydownHandler",null);p(this,"active",!1);this.container=n,this.itemSelector=t,this.opts={orientation:e.orientation??"horizontal",loop:e.loop??!0,homeEnd:e.homeEnd??!0,onHighlightedIndexChange:e.onHighlightedIndexChange??(()=>{})}}getItems(){return Array.from(this.container.querySelectorAll(this.itemSelector))}isForwardKey(n,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&n===(t?"ArrowLeft":"ArrowRight")||(e==="vertical"||e==="both")&&n==="ArrowDown"}isBackwardKey(n,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&n===(t?"ArrowRight":"ArrowLeft")||(e==="vertical"||e==="both")&&n==="ArrowUp"}activate(){this.active||(this.active=!0,this.keydownHandler=n=>{let t=this.getItems();if(t.length===0||n.ctrlKey||n.altKey||n.metaKey)return;let e=getComputedStyle(this.container).direction==="rtl",i=t.indexOf(document.activeElement);if(i===-1)return;let o=null;this.isForwardKey(n.key,e)?(o=Ut(t,i,!1),o>=t.length&&(o=this.opts.loop?Ut(t,-1,!1):i)):this.isBackwardKey(n.key,e)?(o=Ut(t,i,!0),o<0&&(o=this.opts.loop?Ut(t,t.length,!0):i)):this.opts.homeEnd&&n.key==="Home"?o=Ut(t,-1,!1):this.opts.homeEnd&&n.key==="End"&&(o=Ut(t,t.length,!0)),o!==null&&(o<0||o>=t.length||o!==i&&(n.preventDefault(),t[i].setAttribute("tabindex","-1"),t[o].setAttribute("tabindex","0"),t[o].focus(),this.opts.onHighlightedIndexChange(o)))},this.container.addEventListener("keydown",this.keydownHandler))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(this.container.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null))}setActiveIndex(n,t){n.forEach((e,i)=>{e.setAttribute("tabindex",i===t?"0":"-1")})}isActive(){return this.active}};var Do=0;function Sn(n){return`${n}-${++Do}`}var An=class extends Y{constructor(){super(...arguments);p(this,"list");p(this,"triggers",[]);p(this,"panels",[]);p(this,"nav",null);p(this,"value","");p(this,"syncKey",null);p(this,"orientation","horizontal");p(this,"handleClick",t=>{let e=t.target.closest("[data-part=\'trigger\']");if(!e||e.hasAttribute("disabled"))return;let i=e.dataset.value;i&&this.select(i)});p(this,"handleStorage",t=>{if(!this.syncKey||t.key!==`db-tabs-sync:${this.syncKey}`)return;let e=t.newValue;e&&this.value!==e&&this.has(e)&&this.select(e)});p(this,"handleSyncEvent",(t=>{let e=t.detail.value;e&&this.value!==e&&this.has(e)&&this.select(e)}))}has(t){return this.triggers.some(e=>e.dataset.value===t)}own(t){return Array.from(this.querySelectorAll(t)).filter(e=>e.closest("db-tabs")===this)}setup(){var s;let t=this.own("[data-part=\'list\']")[0]??null;if(!t)return;this.list=t,this.triggers=this.own("[data-part=\'trigger\']"),this.panels=this.own("[data-part=\'content\']"),this.orientation=this.getAttribute("orientation")||"horizontal",this.syncKey=this.getAttribute("sync-key")||null,t.setAttribute("role","tablist"),t.setAttribute("aria-orientation",this.orientation),this.triggers.forEach(r=>{let a=r.dataset.value;r.setAttribute("role","tab");let l=r.id||Sn("db-tab");r.id=l;let c=this.panels.find(d=>d.dataset.value===a);if(c){c.setAttribute("role","tabpanel");let d=c.id||Sn("db-tabpanel");c.id=d,r.setAttribute("aria-controls",d),c.setAttribute("aria-labelledby",l)}}),this.nav=new re(t,"[data-part=\'trigger\']",{orientation:this.orientation,loop:!0,homeEnd:!0,onHighlightedIndexChange:()=>{var l;let r=document.activeElement,a=(l=r==null?void 0:r.dataset)==null?void 0:l.value;a&&this.select(a)}}),this.nav.activate();let i=this.getAttribute("default-value")||((s=this.triggers[0])==null?void 0:s.dataset.value)||"";if(this.syncKey){let r=localStorage.getItem(`db-tabs-sync:${this.syncKey}`);r&&this.triggers.some(a=>a.dataset.value===r)&&(i=r)}let o=window.location.hash.slice(1);o&&this.triggers.some(r=>r.dataset.value===o)&&(i=o),this.select(i)}connect(){var t;(t=this.list)==null||t.addEventListener("click",this.handleClick),this.syncKey&&(window.addEventListener("storage",this.handleStorage),document.addEventListener(`db-tabs-sync:${this.syncKey}`,this.handleSyncEvent))}disconnect(){var t;(t=this.list)==null||t.removeEventListener("click",this.handleClick),this.syncKey&&(window.removeEventListener("storage",this.handleStorage),document.removeEventListener(`db-tabs-sync:${this.syncKey}`,this.handleSyncEvent))}select(t){this.value!==t&&(this.value=t,this.triggers.forEach(e=>{let i=e.dataset.value===t;e.setAttribute("aria-selected",String(i)),e.setAttribute("tabindex",i?"0":"-1"),i?e.setAttribute("data-state","active"):e.removeAttribute("data-state")}),this.panels.forEach(e=>{let i=e.dataset.value===t;e.hidden=!i,i?(e.setAttribute("data-state","active"),e.hasAttribute("tabindex")||e.setAttribute("tabindex","0")):e.removeAttribute("data-state")}),this.syncKey&&(localStorage.setItem(`db-tabs-sync:${this.syncKey}`,t),document.dispatchEvent(new CustomEvent(`db-tabs-sync:${this.syncKey}`,{detail:{value:t,source:this}}))),this.dispatchEvent(new CustomEvent("db-tabs:change",{detail:{value:t},bubbles:!0})))}};G();customElements.get("db-tabs")||customElements.define("db-tabs",An);var Ro=0;function Mo(n){return`${n}-${++Ro}`}var Cn=class{constructor(n,t,e={}){p(this,"trigger");p(this,"content");p(this,"_open",!1);p(this,"opts");this.trigger=n,this.content=t,this.opts=e;let i=Mo("base-collapsible");n.id||(n.id=`${i}-trigger`),t.id||(t.id=`${i}-content`),n.setAttribute("aria-controls",t.id),t.setAttribute("aria-labelledby",n.id),t.setAttribute("role","region"),n.setAttribute("aria-expanded","false"),n.addEventListener("click",()=>{n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"||this.toggle()})}get isOpen(){return this._open}toggle(){this._open?this.collapse():this.expand()}expand(){var n,t;this._open||(this._open=!0,this.trigger.setAttribute("aria-expanded","true"),this.content.hidden=!1,this.content.setAttribute("data-state","open"),(t=(n=this.opts).onToggle)==null||t.call(n,!0))}collapse(){var n,t;this._open&&(this._open=!1,this.trigger.setAttribute("aria-expanded","false"),this.content.hidden=!0,this.content.removeAttribute("data-state"),(t=(n=this.opts).onToggle)==null||t.call(n,!1))}};var Ln=class extends Y{constructor(){super(...arguments);p(this,"items",[]);p(this,"nav",null);p(this,"openValues",new Set);p(this,"type","single")}setup(){this.type=this.getAttribute("type")||"single";let t=this.getAttribute("default-value")||"",e=t?t.split(","):[],i=Array.from(this.querySelectorAll("[data-part=\'item\']"));this.items=i.map(o=>{let s=o.querySelector("[data-part=\'trigger\']"),r=o.querySelector("[data-part=\'content\']");if(!s||!r)return null;let a=o.dataset.value||"",l=o.hasAttribute("data-disabled");l&&(s.setAttribute("disabled",""),s.setAttribute("aria-disabled","true"));let c=new Cn(s,r,{onToggle:d=>{d?this.onItemExpanded(a):this.onItemCollapsed(a)}});return{el:o,value:a,collapsible:c,disabled:l}}).filter(Boolean),this.nav=new re(this,"[data-part=\'trigger\']",{orientation:"vertical",loop:!0,homeEnd:!0}),this.nav.activate(),this.items.forEach((o,s)=>{o.collapsible.trigger.setAttribute("tabindex",s===0?"0":"-1")}),e.forEach(o=>{let s=this.items.find(r=>r.value===o&&!r.disabled);s&&s.collapsible.expand()})}onItemExpanded(t){if(this.type==="single"){for(let i of this.openValues)if(i!==t){let o=this.items.find(s=>s.value===i);o&&o.collapsible.collapse()}}this.openValues.add(t);let e=this.items.find(i=>i.value===t);e&&e.el.setAttribute("data-state","open"),this.dispatchEvent(new CustomEvent("db-accordion:change",{detail:{value:t,open:!0,openValues:[...this.openValues]},bubbles:!0}))}onItemCollapsed(t){this.openValues.delete(t);let e=this.items.find(i=>i.value===t);e&&e.el.removeAttribute("data-state"),this.dispatchEvent(new CustomEvent("db-accordion:change",{detail:{value:t,open:!1,openValues:[...this.openValues]},bubbles:!0}))}};G();customElements.get("db-accordion")||customElements.define("db-accordion",Ln);var Io=0;function Z(n){return`${n}-${++Io}`}function vt(n,t){let e=n.localName;return Array.from(n.querySelectorAll(t)).filter(i=>i.closest(e)===n)}function Q(n,t){return vt(n,t)[0]??null}function Wt(n){if(!n||!n.hasAttribute("data-as-child"))return n;let t=n.firstElementChild;if(!t)return n;let e=n.getAttribute("data-part");return e&&t.setAttribute("data-part",e),t}function dt(n){return n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"||n.getAttribute("data-disabled")==="true"}function kn(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover=="function"}function Yt(n){if(n.hidden=!1,!kn())return"inline";n.hasAttribute("popover")||n.setAttribute("popover","manual"),n.style.inset="auto",n.style.margin="0";try{n.matches(":popover-open")||n.showPopover()}catch{return"inline"}return"top-layer"}function Gt(n){if(kn())try{n.matches(":popover-open")&&n.hidePopover()}catch{}n.hidden=!0}var No=\'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]\';function Tn(n){return Array.from(n.querySelectorAll(No)).filter(t=>!t.closest("[hidden]")&&!dt(t))}function On(n,t){let e=typeof n.getAnimations=="function"?n.getAnimations():[];if(!e.length)return t();Promise.all(e.map(i=>i.finished)).then(t,t)}function Xt(n){try{return decodeURIComponent(n)}catch{return n}}var Rn=class extends Y{constructor(){super(...arguments);p(this,"details",null);p(this,"summary",null);p(this,"dialog",null);p(this,"body",null);p(this,"source",null);p(this,"moved",[]);p(this,"handledHash",null);p(this,"onSummaryClick",t=>{var i,o;let e=t.target;e&&e!==this.summary&&((o=(i=e.closest)==null?void 0:i.call(e,"a[href], button, input, select, textarea, label"))==null?void 0:o.closest("summary"))===this.summary||(t.preventDefault(),this.show())});p(this,"onDialogClick",t=>{let e=this.dialog;if(!e||t.target!==e)return;let i=e.getBoundingClientRect();!(t.clientX>=i.left&&t.clientX<=i.right&&t.clientY>=i.top&&t.clientY<=i.bottom)&&(t.clientX!==0||t.clientY!==0)&&e.close()});p(this,"onDialogClose",()=>this.restore());p(this,"onDocClick",t=>{var s,r;if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let e=(r=(s=t.target)==null?void 0:s.closest)==null?void 0:r.call(s,"a[href]");if(!e||!this.details||this.open||e.hasAttribute("download")||e.target&&e.target!=="_self")return;let i=new URL(e.href,location.href);if(!i.hash||i.hash!==location.hash||i.pathname!==location.pathname||i.search!==location.search)return;let o=document.getElementById(Xt(i.hash.slice(1)));if(!(!o||!this.details.contains(o))){for(let a of this.details.querySelectorAll("db-details-sheet"))a.handledHash=null;this.show(o)}});p(this,"onHash",()=>{this.handledHash=null,this.openForHash()})}get open(){var t;return!!((t=this.dialog)!=null&&t.open)}setup(){var d;let t=Array.from(this.children).find(u=>u.tagName==="DETAILS")??null,e=t?Array.from(t.children).find(u=>u.tagName==="SUMMARY")??null:null,i=typeof HTMLDialogElement<"u"&&typeof HTMLDialogElement.prototype.showModal=="function";if(!t||!e||!i)return;for(let u of Array.from(t.children))u.getAttribute("role")==="status"&&u.setAttribute("aria-live","off");this.details=t,this.summary=e,t.open=!1,Ho();let o=(((d=e.querySelector("[data-part=\'title\']"))==null?void 0:d.textContent)??e.textContent??"").trim(),s=document.createElement("dialog");s.className="db-sheet",s.id=Z("db-sheet");let r=document.createElement("h2");r.className="db-sheet-title",r.id=Z("db-sheet-title"),r.textContent=o,s.setAttribute("aria-labelledby",r.id);let a=document.createElement("button");a.type="button",a.className="db-sheet-close",a.setAttribute("aria-label",this.getAttribute("close-label")||"Close"),a.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>\',a.addEventListener("click",()=>s.close());let l=document.createElement("div");l.className="db-sheet-header",l.append(r,a);let c=document.createElement("div");c.className="db-sheet-body",s.append(l,c),this.append(s),this.dialog=s,this.body=c,e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-controls",s.id),e.setAttribute("aria-expanded","false"),this.setAttribute("data-state","closed")}connect(){this.dialog&&(this.summary.addEventListener("click",this.onSummaryClick),this.dialog.addEventListener("click",this.onDialogClick),this.dialog.addEventListener("close",this.onDialogClose),window.addEventListener("hashchange",this.onHash),document.addEventListener("click",this.onDocClick),queueMicrotask(()=>this.isConnected&&this.openForHash()))}disconnect(){this.dialog&&(this.dialog.open&&this.dialog.close(),this.restore(!1),this.summary.removeEventListener("click",this.onSummaryClick),this.dialog.removeEventListener("click",this.onDialogClick),this.dialog.removeEventListener("close",this.onDialogClose),window.removeEventListener("hashchange",this.onHash),document.removeEventListener("click",this.onDocClick))}show(t){var l;let{dialog:e,details:i,body:o}=this;if(!e||!i||!o||e.open)return;let s=Array.from(i.childNodes).filter(c=>c!==this.summary),r=s.filter(c=>c.nodeType===Node.ELEMENT_NODE),a=r.length===1&&s.every(c=>{var d;return c===r[0]||!((d=c.textContent)!=null&&d.trim())})?r[0]:null;this.source=a??i,this.moved=a?Array.from(a.childNodes):s,o.append(...this.moved),e.showModal(),this.summary.setAttribute("aria-expanded","true"),this.setAttribute("data-state","open"),t&&t!==i&&((l=t.scrollIntoView)==null||l.call(t,{block:"start"})),this.dispatchEvent(new CustomEvent("db-details-sheet:open",{bubbles:!0}))}close(){var t;(t=this.dialog)==null||t.close()}restore(t=!0){var e,i;this.source&&(this.source.append(...this.moved),this.source=null,this.moved=[],this.summary.setAttribute("aria-expanded","false"),this.setAttribute("data-state","closed"),t&&this.isConnected&&((i=(e=this.summary).checkVisibility)==null?void 0:i.call(e))!==!1&&this.summary.focus(),this.dispatchEvent(new CustomEvent("db-details-sheet:close",{bubbles:!0})))}openForHash(){let t=Xt(location.hash.slice(1));if(!t||!this.details||this.handledHash===location.hash||(this.handledHash=location.hash,this.open))return;let e=document.getElementById(t);e&&this.details.contains(e)&&this.show(e)}},Dn="dogsbay-details-sheet";function Ho(){if(document.getElementById(Dn))return;let n=document.createElement("style");n.id=Dn,n.textContent=["dialog.db-sheet{position:fixed;inset:0 0 0 auto;margin:0;height:100dvh;max-height:none;width:min(32rem,100vw);max-width:100vw;padding:0;border:0;border-left:1px solid var(--border);background:var(--background);color:var(--foreground);box-shadow:0 10px 15px -3px rgb(0 0 0/.1),0 4px 6px -4px rgb(0 0 0/.1);flex-direction:column}","dialog.db-sheet[open]{display:flex}","dialog.db-sheet::backdrop{background:rgb(0 0 0/.6)}",".db-sheet-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.5rem;border-bottom:1px solid var(--border)}","dialog.db-sheet h2.db-sheet-title{margin:0;padding:0;border:0;font-size:1.125rem;line-height:1.75rem;font-weight:600;scroll-margin:0}",".db-sheet-close{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:.375rem;background:transparent;color:var(--muted-foreground);cursor:pointer}",".db-sheet-close:hover{background:var(--accent,var(--muted));color:var(--foreground)}",".db-sheet-close:focus-visible{outline:2px solid var(--ring);outline-offset:2px}",".db-sheet-body{flex:1;overflow-y:auto;padding:1.5rem;font-size:.875rem;line-height:1.625}","dialog.db-sheet .db-sheet-body>:first-child{margin-top:0}","html:has(dialog.db-sheet[open]){overflow:hidden}","db-details-sheet>details>summary>span:last-child{transform:rotate(-90deg)}","@media (prefers-reduced-motion:no-preference){dialog.db-sheet[open]{animation:db-sheet-in .2s ease-out}dialog.db-sheet[open]::backdrop{animation:db-sheet-fade .2s ease-out}}","@keyframes db-sheet-in{from{transform:translateX(100%)}}","@keyframes db-sheet-fade{from{opacity:0}}"].join(""),document.head.append(n)}G();customElements.get("db-details-sheet")||customElements.define("db-details-sheet",Rn);var Mn=class extends Y{constructor(){super(...arguments);p(this,"copyBtn",null);p(this,"copyIcon",null);p(this,"checkIcon",null);p(this,"liveRegion",null);p(this,"resetTimeout",null);p(this,"handleCopy",async()=>{let t=this.getCopyText();if(t)try{await navigator.clipboard.writeText(t),this.showCopiedFeedback(),this.dispatchEvent(new CustomEvent("db-code-block:copied",{detail:{text:t},bubbles:!0}))}catch{}})}setup(){this.copyBtn=this.querySelector("[data-part=\'copy\']"),this.copyIcon=this.querySelector("[data-part=\'copy-icon\']"),this.checkIcon=this.querySelector("[data-part=\'check-icon\']"),this.copyBtn&&!this.copyBtn.hasAttribute("aria-label")&&this.copyBtn.setAttribute("aria-label","Copy code"),this.liveRegion=document.createElement("span"),this.liveRegion.setAttribute("aria-live","polite"),this.liveRegion.setAttribute("role","status"),this.liveRegion.className="sr-only",this.liveRegion.style.position="absolute",this.liveRegion.style.width="1px",this.liveRegion.style.height="1px",this.liveRegion.style.overflow="hidden",this.liveRegion.style.clip="rect(0, 0, 0, 0)",this.liveRegion.style.whiteSpace="nowrap",this.appendChild(this.liveRegion)}connect(){var t;(t=this.copyBtn)==null||t.addEventListener("click",this.handleCopy)}disconnect(){var t;(t=this.copyBtn)==null||t.removeEventListener("click",this.handleCopy),this.clearResetTimeout()}getCopyText(){let t=this.getAttribute("data-copy-text");if(t)return t;let e=this.querySelector("[data-part=\'code\'] code");if(e)return e.textContent??"";let i=this.querySelector("[data-part=\'code\']");return(i==null?void 0:i.textContent)??""}showCopiedFeedback(){this.clearResetTimeout(),this.copyIcon&&(this.copyIcon.hidden=!0),this.checkIcon&&(this.checkIcon.hidden=!1),this.setAttribute("data-state","copied"),this.liveRegion&&(this.liveRegion.textContent="Copied!"),this.resetTimeout=setTimeout(()=>{this.copyIcon&&(this.copyIcon.hidden=!1),this.checkIcon&&(this.checkIcon.hidden=!0),this.removeAttribute("data-state"),this.liveRegion&&(this.liveRegion.textContent=""),this.resetTimeout=null},2e3)}clearResetTimeout(){this.resetTimeout!==null&&(clearTimeout(this.resetTimeout),this.resetTimeout=null)}};G();customElements.get("db-code-block")||customElements.define("db-code-block",Mn);var In=class extends Y{constructor(){super(...arguments);p(this,"navData",null);p(this,"onClick",t=>{let e=t.target.closest("[data-part=\'toggle\']");if(!e||e.closest("db-nav-tree")!==this)return;let i=e.closest("[data-part=\'item\']");i&&(this.ensurePrepared(i),this.toggle(i))});p(this,"onKey",t=>{var c,d;if(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)return;let e=document.activeElement;if(!e||!this.contains(e))return;let i=this.visibleRows(),o=e.closest("[data-part=\'row\']"),s=o?i.indexOf(o):-1;if(s<0)return;let r=o.closest("[data-part=\'item\']");this.ensurePrepared(r);let a=!!this.groupOf(r),l=u=>{var h;u&&(t.preventDefault(),(h=this.primary(u))==null||h.focus())};switch(t.key){case"ArrowDown":return l(i[s+1]);case"ArrowUp":return l(i[s-1]);case"Home":return l(i[0]);case"End":return l(i[i.length-1]);case"ArrowRight":if(!a)return;t.preventDefault(),this.isOpen(r)?l(this.visibleRows()[s+1]):this.setOpen(r,!0);return;case"ArrowLeft":{if(t.preventDefault(),a&&this.isOpen(r))return this.setOpen(r,!1);let u=(c=r.parentElement)==null?void 0:c.closest("[data-part=\'item\']");if(u&&this.contains(u)){let h=u.querySelector(":scope > [data-part=\'row\']");h&&((d=this.primary(h))==null||d.focus())}return}}})}setup(){for(let t of vt(this,"[data-part=\'item\']"))t.style.getPropertyValue("--db-level")||t.style.setProperty("--db-level",String(this.depthOf(t))),this.prepareItem(t)}depthOf(t){var i,o;let e=0;for(let s=(i=t.parentElement)==null?void 0:i.closest("[data-part=\'item\']");s&&this.contains(s);s=(o=s.parentElement)==null?void 0:o.closest("[data-part=\'item\']"))e++;return e}pathOf(t){var i,o;let e=[];for(let s=t;s&&this.contains(s);s=((i=s.parentElement)==null?void 0:i.closest("[data-part=\'item\']"))??null){let r=Array.from(((o=s.parentElement)==null?void 0:o.children)??[]).filter(a=>a.getAttribute("data-part")==="item");e.unshift(r.indexOf(s))}return e.join(".")}connect(){this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKey);for(let t of vt(this,"[data-part=\'group\'][data-lazy]")){let e=t.closest("[data-part=\'item\']");e&&this.isOpen(e)&&this.fill(t)}!this.fillEmpty()&&this.emptyList()&&document.readyState!=="complete"&&addEventListener("load",()=>this.isConnected&&this.fillEmpty()&&this.afterFill(),{once:!0}),this.afterFill()}afterFill(){this.hasAttribute("scroll-current")&&requestAnimationFrame(()=>this.revealCurrent())}emptyList(){let t=vt(this,"[data-part=\'list\']")[0];return t&&!t.querySelector("[data-part=\'item\']")?t:null}fillEmpty(){let t=this.emptyList(),e=this.data();if(!t||!e)return!1;t.replaceChildren(...this.build(e,""));let i=t,o=this.serverPath();for(let s of o!=null?o.split(".").map(Number):this.currentPath(e)){let r=Array.from(i.children).filter(l=>l.getAttribute("data-part")==="item")[s],a=r&&this.groupOf(r);if(!r||!a)break;a.hasAttribute("data-lazy")&&this.fill(a),this.apply(r,!0),i=a}return!0}serverPath(){var s;let t=(s=this.getAttribute("current-path"))==null?void 0:s.trim(),e=this.data();if(!t||!e||!/^\\d+(?:\\.\\d+)*$/.test(t))return null;let i=t.split(".").map(Number),o=e;for(let r of i){let a=o==null?void 0:o[r];if(!a)return null;o=a[2]}return i.join(".")}currentPath(t){let e=location.href.split("#")[0],i=o=>{for(let s=0;s<o.length;s++){let[,r,a,l]=o[s],c=r!=null&&!l?this.linkOf(r):null;if(c&&new URL(c.href,document.baseURI).href.split("#")[0]===e)return[s];let d=a!=null&&a.length?i(a):null;if(d)return[s,...d]}return null};return i(t)??[]}linkOf(t){let e=t.replace(/[\\u0000-\\u0020]/g,"");if(/^[a-z][a-z0-9+.-]*:/i.test(e)&&!/^(?:https?|mailto):/i.test(e))return null;let i=/^[a-z][a-z0-9+.-]*:|^\\/\\//i.test(e);return{href:i?t:(this.getAttribute("base")??"")+t,external:i}}disconnect(){this.removeEventListener("click",this.onClick),this.removeEventListener("keydown",this.onKey)}prepareItem(t){let e=t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'toggle\']");if(!e)return;let i=this.groupOf(t);i||(i=document.createElement("ul"),i.setAttribute("data-part","group"),i.dataset.lazy="",i.dataset.path=this.pathOf(t),i.hidden=!0,t.appendChild(i));let o=t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'link\']");o&&!e.hasAttribute("aria-label")&&!e.querySelector("[data-part=\'label\']")&&e.setAttribute("aria-label",(this.getAttribute("toggle-label")??"Toggle {label}").replace("{label}",()=>(o.getAttribute("aria-label")??o.textContent??"").trim())),this.getAttribute("chevron")!=="css"&&!e.querySelector("[data-part=\'chevron\']")&&e.insertAdjacentHTML("beforeend",Fo),i.id||(i.id=Z("db-nav-group")),e.setAttribute("aria-controls",i.id),e instanceof HTMLButtonElement&&!e.hasAttribute("type")&&(e.type="button");let s=e.getAttribute("aria-expanded")==="true"||t.getAttribute("data-state")==="open";this.apply(t,s)}ensurePrepared(t){let e=this.toggleOf(t);e&&!e.hasAttribute("aria-controls")&&this.prepareItem(t)}groupOf(t){return t.querySelector(":scope > [data-part=\'group\']")}toggleOf(t){return t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'toggle\']")}primary(t){return t.querySelector(":scope > [data-part=\'link\']")??t.querySelector(":scope > [data-part=\'toggle\']")}visibleRows(){return vt(this,"[data-part=\'row\']").filter(t=>!t.closest("[hidden]"))}isOpen(t){return t.getAttribute("data-state")==="open"}toggle(t){this.setOpen(t,!this.isOpen(t))}setOpen(t,e){let i=this.groupOf(t);!i||this.isOpen(t)===e||(e&&i.hasAttribute("data-lazy")&&this.fill(i),this.apply(t,e),this.dispatchEvent(new CustomEvent("db-nav-tree:toggle",{detail:{item:t,open:e},bubbles:!0})))}apply(t,e){let i=this.groupOf(t),o=this.toggleOf(t);i&&(i.hidden=!e),o==null||o.setAttribute("aria-expanded",String(e)),t.setAttribute("data-state",e?"open":"closed")}revealCurrent(){var s;let t=this.querySelector("[aria-current=\'page\']");if(!t)return;for(let r=t.closest("[data-part=\'item\']");r&&this.contains(r);r=((s=r.parentElement)==null?void 0:s.closest("[data-part=\'item\']"))??null)this.groupOf(r)&&!this.groupOf(r).contains(t)||this.groupOf(r)&&this.setOpen(r,!0);let e=Po(this);if(!e)return;let i=t.getBoundingClientRect(),o=e.getBoundingClientRect();(i.top<o.top||i.bottom>o.bottom)&&(e.scrollTop+=i.top-o.top-o.height/2+i.height/2)}data(){if(this.navData)return this.navData;let t=this.getAttribute("data-source"),e=t?globalThis[t]:void 0;return Array.isArray(e)?e:null}fill(t){let e=this.data(),i=t.dataset.path;if(!e||i==null)return;let o=e,s;for(let r of i.split(".").map(Number))s=o==null?void 0:o[r],o=s==null?void 0:s[2];s!=null&&s[2]&&(t.replaceChildren(...this.build(s[2],i)),t.removeAttribute("data-lazy"))}build(t,e){let i=this.getAttribute("toggle-label")??"Toggle {label}",o=location.href.split("#")[0],s=this.serverPath();return t.map(([r,a,l,c],d)=>{let u=e?`${e}.${d}`:String(d),h=document.createElement("li");h.setAttribute("data-part","item"),h.style.setProperty("--db-level",String(u.split(".").length-1));let m=document.createElement("div");m.setAttribute("data-part","row"),h.appendChild(m);let b=a!=null?this.linkOf(a):null;b||(a=null);let g=null;if(l!=null&&l.length)if(g=document.createElement("button"),g.type="button",g.setAttribute("data-part","toggle"),g.setAttribute("aria-expanded","false"),a!=null)g.setAttribute("aria-label",i.replace("{label}",()=>r));else{let f=document.createElement("span");f.setAttribute("data-part","label"),f.textContent=r,g.appendChild(f)}let w=this.getAttribute("toggle-position")==="end";if(g&&!w&&m.appendChild(g),a!=null){let f=document.createElement("a");f.setAttribute("data-part","link"),f.textContent=r,f.href=b.href,b.external&&(f.rel="noopener"),(s!=null?u===s:!c&&f.href.split("#")[0]===o)&&f.setAttribute("aria-current","page"),m.appendChild(f)}if(a==null&&!(l!=null&&l.length)){let f=document.createElement("span");f.setAttribute("data-part","label"),f.textContent=r,m.appendChild(f)}if(g&&w&&m.appendChild(g),l!=null&&l.length){let f=document.createElement("ul");f.setAttribute("data-part","group"),f.dataset.lazy="",f.dataset.path=u,f.hidden=!0,h.setAttribute("data-state","closed"),h.appendChild(f),this.prepareItem(h)}return h})}},Fo=\'<svg data-part="chevron" viewBox="0 0 24 24" width="16" height="16" aria-hidden="true" focusable="false"><path d="m9 18 6-6-6-6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>\';function Po(n){for(let t=n.parentElement;t;t=t.parentElement){let e=getComputedStyle(t).overflowY;if((e==="auto"||e==="scroll")&&t.scrollHeight>t.clientHeight)return t}return null}G();customElements.get("db-nav-tree")||customElements.define("db-nav-tree",In);var Nn=class extends Y{constructor(){super(...arguments);p(this,"links",[]);p(this,"headings",[]);p(this,"observer",null);p(this,"active",null);p(this,"onScroll",()=>{let t=document.documentElement;window.innerHeight+window.scrollY>=t.scrollHeight-2&&this.headings.length&&this.setActive(this.headings[this.headings.length-1].id)});p(this,"onHash",()=>{let t=Xt(location.hash.slice(1));t&&this.headings.some(e=>e.id===t)&&this.setActive(t)})}slugOf(t){return t.getAttribute("data-toc-slug")??Xt(t.getAttribute("href").slice(1))}setup(){this.links=Array.from(this.querySelectorAll("a[href^=\'#\'], a[data-toc-link]"))}connect(){var e;if(this.headings=this.links.map(i=>document.getElementById(this.slugOf(i))).filter(i=>!!i),!this.headings.length)return;let t=Number(this.getAttribute("offset")??80);typeof IntersectionObserver<"u"&&(this.observer=new IntersectionObserver(i=>{var s;let o=i.find(r=>r.isIntersecting);if(o)return this.setActive(o.target.id);this.setActive(((s=this.lastAbove(t))==null?void 0:s.id)??null)},{rootMargin:`-${t}px 0px -70% 0px`,threshold:0}),this.headings.forEach(i=>this.observer.observe(i))),window.addEventListener("hashchange",this.onHash),window.addEventListener("scroll",this.onScroll,{passive:!0}),this.setActive(((e=this.lastAbove(t))==null?void 0:e.id)??this.headings[0].id)}disconnect(){var t;(t=this.observer)==null||t.disconnect(),this.observer=null,window.removeEventListener("hashchange",this.onHash),window.removeEventListener("scroll",this.onScroll)}lastAbove(t){let e=null;for(let i of this.headings)i.getBoundingClientRect().top<=t+20&&(e=i);return e}setActive(t){if(!(!t||t===this.active)){this.active=t;for(let e of this.links)this.slugOf(e)===t?(e.setAttribute("aria-current","location"),e.setAttribute("data-active","")):(e.removeAttribute("aria-current"),e.removeAttribute("data-active"));this.dispatchEvent(new CustomEvent("db-toc:change",{detail:{id:t},bubbles:!0}))}}};G();customElements.get("db-toc")||customElements.define("db-toc",Nn);var _o=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",\'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)\',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],je=_o.join(","),Pn=typeof Element>"u",ae=Pn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,we=!Pn&&Element.prototype.getRootNode?function(n){var t;return n==null||(t=n.getRootNode)===null||t===void 0?void 0:t.call(n)}:function(n){return n==null?void 0:n.ownerDocument},Ee=function(t,e){var i;e===void 0&&(e=!0);var o=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),s=o===""||o==="true",r=s||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Ee(t.parentNode));return r},zo=function(t){var e,i=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return i===""||i==="true"},$o=function(t,e,i){if(Ee(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(je));return e&&ae.call(t,je)&&o.unshift(t),o=o.filter(i),o},Ve=function(t,e,i){for(var o=[],s=Array.from(t);s.length;){var r=s.shift();if(!Ee(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),l=a.length?a:r.children,c=Ve(l,!0,i);i.flatten?o.push.apply(o,c):o.push({scopeParent:r,candidates:c})}else{var d=ae.call(r,je);d&&i.filter(r)&&(e||!t.includes(r))&&o.push(r);var u=r.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(r),h=!Ee(u,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(r));if(u&&h){var m=Ve(u===!0?r.children:u.children,!0,i);i.flatten?o.push.apply(o,m):o.push({scopeParent:r,candidates:m})}else s.unshift.apply(s,r.children)}}return o},_n=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},zn=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||zo(t))&&!_n(t)?0:t.tabIndex},Bo=function(t,e){var i=zn(t);return i<0&&e&&!_n(t)?0:i},qo=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},$n=function(t){return t.tagName==="INPUT"},Ko=function(t){return $n(t)&&t.type==="hidden"},jo=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return e},Vo=function(t,e){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===e)return t[i]},Uo=function(t){if(!t.name)return!0;var e=t.form||we(t),i=function(a){return e.querySelectorAll(\'input[type="radio"][name="\'+a+\'"]\')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=i(window.CSS.escape(t.name));else try{o=i(t.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var s=Vo(o,t.form);return!s||s===t},Wo=function(t){return $n(t)&&t.type==="radio"},Yo=function(t){return Wo(t)&&!Uo(t)},Go=function(t){var e,i=t&&we(t),o=(e=i)===null||e===void 0?void 0:e.host,s=!1;if(i&&i!==t){var r,a,l;for(s=!!((r=o)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,d,u;i=we(o),o=(c=i)===null||c===void 0?void 0:c.host,s=!!((d=o)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(o))}}return s},Hn=function(t){var e=t.getBoundingClientRect(),i=e.width,o=e.height;return i===0&&o===0},Xo=function(t,e){var i=e.displayCheck,o=e.getShadowRoot;if(i==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}var r=getComputedStyle(t),a=r.visibility;if(a==="hidden"||a==="collapse")return!0;var l=ae.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(ae.call(c,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="full-native"||i==="legacy-full"){if(typeof o=="function"){for(var d=t;t;){var u=t.parentElement,h=we(t);if(u&&!u.shadowRoot&&o(u)===!0)return Hn(t);t.assignedSlot?t=t.assignedSlot:!u&&h!==t.ownerDocument?t=h.host:t=u}t=d}if(Go(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return Hn(t);return!1},Zo=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var i=0;i<e.children.length;i++){var o=e.children.item(i);if(o.tagName==="LEGEND")return ae.call(e,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}e=e.parentElement}return!1},Qo=function(t,e){return!(e.disabled||Ko(e)||Xo(e,t)||jo(e)||Zo(e))},Fn=function(t,e){return!(Yo(e)||zn(e)<0||!Qo(t,e))},Jo=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Bn=function(t){var e=[],i=[];return t.forEach(function(o,s){var r=!!o.scopeParent,a=r?o.scopeParent:o,l=Bo(a,r),c=r?Bn(o.candidates):a;l===0?r?e.push.apply(e,c):e.push(a):i.push({documentOrder:s,tabIndex:l,item:o,isScope:r,content:c})}),i.sort(qo).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(e)},Ue=function(t,e){e=e||{};var i;return e.getShadowRoot?i=Ve([t],e.includeContainer,{filter:Fn.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Jo}):i=$o(t,e.includeContainer,Fn.bind(null,e)),Bn(i)};var We=class{constructor(n,t={}){p(this,"root");p(this,"opts");p(this,"previouslyFocused",null);p(this,"keydownHandler",null);p(this,"active",!1);this.root=n,this.opts={initialFocus:t.initialFocus??"first",returnFocus:t.returnFocus??!0}}activate(){this.active||(this.active=!0,this.previouslyFocused=document.activeElement,this.keydownHandler=n=>{if(n.key!=="Tab")return;let t=Ue(this.root);if(t.length===0){n.preventDefault();return}let e=t[0],i=t[t.length-1];n.shiftKey?document.activeElement===e&&(i.focus(),n.preventDefault()):document.activeElement===i&&(e.focus(),n.preventDefault())},document.addEventListener("keydown",this.keydownHandler),requestAnimationFrame(()=>{var t;if(!this.active)return;let n=Ue(this.root);this.opts.initialFocus instanceof HTMLElement&&this.root.contains(this.opts.initialFocus)?this.opts.initialFocus.focus():this.opts.initialFocus==="container"?(this.root.hasAttribute("tabindex")||this.root.setAttribute("tabindex","-1"),this.root.focus()):(t=n[0])==null||t.focus()}))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(document.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null),this.opts.returnFocus&&this.previouslyFocused&&document.contains(this.previouslyFocused)&&this.previouslyFocused.focus(),this.previouslyFocused=null)}isActive(){return this.active}};var et,It=(et=class{static activate(){if(et.count++,et.count>1)return;let t=window.innerWidth-document.documentElement.clientWidth;et.originalStyles={overflow:document.body.style.overflow,paddingRight:document.body.style.paddingRight},document.body.style.overflow="hidden",t>0&&(document.body.style.paddingRight=`${t}px`)}static deactivate(){et.count=Math.max(0,et.count-1),!(et.count>0)&&et.originalStyles&&(document.body.style.overflow=et.originalStyles.overflow,document.body.style.paddingRight=et.originalStyles.paddingRight,et.originalStyles=null)}static reset(){et.count=0,et.originalStyles=null}},p(et,"count",0),p(et,"originalStyles",null),et);var yt=[];function ts(n){if(n.key!=="Escape"||yt.length===0)return;let t=yt[yt.length-1];t.escapePrevented||(n.preventDefault(),n.stopPropagation(),t.opts.onDismiss("escape-key"))}var qn=!1;function es(){qn||(qn=!0,document.addEventListener("keydown",ts))}var Nt=class{constructor(n,t){p(this,"root");p(this,"opts");p(this,"outsideHandler",null);p(this,"active",!1);p(this,"frameId",null);p(this,"escapePrevented",!1);this.root=n,this.opts={onDismiss:t.onDismiss,escapeKey:t.escapeKey??!0,outsidePress:t.outsidePress??!0}}activate(){this.active||(this.active=!0,this.opts.escapeKey&&(es(),yt.push(this)),this.opts.outsidePress&&(this.outsideHandler=n=>{if(yt.length>0&&yt[yt.length-1]!==this)return;let t=n.target;if(this.root.contains(t))return;let e=this.root.id;if(e){let o=document.querySelector(`[aria-controls="${e}"]`);if(o!=null&&o.contains(t))return}let i=this.root.getAttribute("aria-labelledby");if(i){let o=document.getElementById(i);if(o!=null&&o.contains(t))return}typeof this.opts.outsidePress=="function"&&!this.opts.outsidePress(n)||this.opts.onDismiss("outside-press")},this.frameId=requestAnimationFrame(()=>{this.frameId=null,this.outsideHandler&&document.addEventListener("pointerdown",this.outsideHandler)})))}deactivate(){if(!this.active)return;this.active=!1;let n=yt.indexOf(this);n!==-1&&yt.splice(n,1),this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null),this.outsideHandler&&(document.removeEventListener("pointerdown",this.outsideHandler),this.outsideHandler=null)}isActive(){return this.active}};function Ye(n){let t=[],e=n;for(;e&&e!==document.body;){let i=e.parentElement;if(!i)break;for(let o=0;o<i.children.length;o++){let s=i.children[o];if(s===e||s.contains(n))continue;let r=s.tagName;if(r==="SCRIPT"||r==="STYLE"||r==="LINK")continue;let a=s.getAttribute("aria-hidden");a!=="true"&&(t.push({el:s,prev:a}),s.setAttribute("aria-hidden","true"))}e=i}return()=>{for(let{el:i,prev:o}of t)o===null?i.removeAttribute("aria-hidden"):i.setAttribute("aria-hidden",o)}}var Kn=class extends Y{constructor(){super(...arguments);p(this,"content",null);p(this,"backdrop",null);p(this,"trigger",null);p(this,"native",!1);p(this,"_open",!1);p(this,"openedBy",null);p(this,"focusTrap",null);p(this,"dismiss",null);p(this,"cleanupInert",null);p(this,"onTriggerClick",t=>{t.preventDefault(),this.toggle(t.currentTarget)});p(this,"onHostClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-dialog")===this&&this.close("close-press")});p(this,"onDocumentClick",t=>{var o,s,r;let e=(s=(o=t.target).closest)==null?void 0:s.call(o,"[data-dialog-for]");if(!e||e===this.trigger)return;let i=e.getAttribute("data-dialog-for");i&&(i===this.id||i===((r=this.content)==null?void 0:r.id))&&(t.preventDefault(),this.toggle(e))});p(this,"onCancel",t=>{t.preventDefault(),this.dismissible&&this.close("escape-key")});p(this,"onNativeClick",t=>{if(!this.dismissible||t.target!==this.content||!this.content)return;let e=this.content.getBoundingClientRect();!(t.clientX>=e.left&&t.clientX<=e.right&&t.clientY>=e.top&&t.clientY<=e.bottom)&&(t.clientX!==0||t.clientY!==0)&&this.close("outside-press")});p(this,"onNativeClose",()=>{this._open&&this.finishClose("close-press")})}get open(){return this._open}get dismissible(){return this.getAttribute("dismissible")!=="false"}setup(){if(this.content=Q(this,"[data-part=\'content\']"),!this.content)return;this.native=typeof HTMLDialogElement<"u"&&this.content instanceof HTMLDialogElement&&typeof this.content.showModal=="function",this.backdrop=Q(this,"[data-part=\'backdrop\']"),this.trigger=Wt(Q(this,"[data-part=\'trigger\']"));let t=this.content;t.id||(t.id=Z("db-dialog")),this.native||(t.setAttribute("role",t.getAttribute("role")||"dialog"),t.setAttribute("aria-modal","true"),t.hidden=!this.hasAttribute("open"),this.backdrop&&(this.backdrop.hidden=!0));let e=t.querySelector("[data-part=\'title\']");e&&!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&(e.id||(e.id=Z("db-dialog-title")),t.setAttribute("aria-labelledby",e.id));let i=t.querySelector("[data-part=\'description\']");i&&!t.hasAttribute("aria-describedby")&&(i.id||(i.id=Z("db-dialog-desc")),t.setAttribute("aria-describedby",i.id));for(let o of this.triggers())this.prepareTrigger(o);this.setState("closed"),this.native||(this.focusTrap=new We(t),this.dismiss=new Nt(t,{onDismiss:o=>this.dismissible&&this.close(o)}))}connect(){var t;this.content&&((t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),this.addEventListener("click",this.onHostClick),document.addEventListener("click",this.onDocumentClick),this.native&&(this.content.addEventListener("cancel",this.onCancel),this.content.addEventListener("click",this.onNativeClick),this.content.addEventListener("close",this.onNativeClose)),queueMicrotask(()=>{if(this.isConnected){for(let e of this.triggers())e.hasAttribute("aria-controls")||this.prepareTrigger(e);this.hasAttribute("open")&&!this._open&&this.show()}}))}disconnect(){var t;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),this.removeEventListener("click",this.onHostClick),document.removeEventListener("click",this.onDocumentClick),this.content&&this.native&&(this.content.removeEventListener("cancel",this.onCancel),this.content.removeEventListener("click",this.onNativeClick),this.content.removeEventListener("close",this.onNativeClose)),this._open&&this.finishClose("api",!1)}triggers(){var i;let t=this.trigger?[this.trigger]:[],e=[this.id,(i=this.content)==null?void 0:i.id].filter(Boolean);for(let o of e)document.querySelectorAll(`[data-dialog-for="${CSS.escape(o)}"]`).forEach(s=>t.push(s));return t}prepareTrigger(t){t.hasAttribute("aria-haspopup")||t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-controls",this.content.id),t.setAttribute("aria-expanded","false")}setState(t){var e,i;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t),(i=this.backdrop)==null||i.setAttribute("data-state",t)}toggle(t){this._open?this.close("trigger-press"):this.show(t)}show(t){var i,o;let e=this.content;if(!(!e||this._open)){this._open=!0,this.openedBy=t??document.activeElement??this.trigger;for(let s of this.triggers())this.prepareTrigger(s),s.setAttribute("aria-expanded","true");if(It.activate(),this.native){let s=e;s.open||s.showModal()}else e.hidden=!1,this.backdrop&&(this.backdrop.hidden=!1),this.cleanupInert=Ye(e),(i=this.focusTrap)==null||i.activate(),(o=this.dismiss)==null||o.activate();this.setState("open"),this.dispatchEvent(new CustomEvent("db-dialog:open",{bubbles:!0}))}}close(t="api"){this._open&&this.finishClose(t)}finishClose(t,e=!0){var s,r,a;let i=this.content;this._open=!1,this.setState("closed");for(let l of this.triggers())l.setAttribute("aria-expanded","false");if(It.deactivate(),this.native){let l=i;l.open&&l.close()}else(s=this.dismiss)==null||s.deactivate(),(r=this.focusTrap)==null||r.deactivate(),(a=this.cleanupInert)==null||a.call(this),this.cleanupInert=null,On(i,()=>{this._open||(i.hidden=!0,this.backdrop&&(this.backdrop.hidden=!0))});let o=this.openedBy;this.openedBy=null,e&&o&&document.contains(o)&&o.focus(),this.dispatchEvent(new CustomEvent("db-dialog:close",{detail:{reason:t},bubbles:!0}))}};G();customElements.get("db-dialog")||customElements.define("db-dialog",Kn);var jn=class extends Y{constructor(){super(...arguments);p(this,"input",null);p(this,"listbox",null);p(this,"empty",null);p(this,"_open",!1);p(this,"highlighted",null);p(this,"observer",null);p(this,"base",Z("db-combobox"));p(this,"optionSeq",0);p(this,"onInput",()=>{this.filtering?this.filter(this.input.value):this.show()});p(this,"onFocus",()=>{(this.hasAttribute("open-on-focus")||this.filtering&&this.input.value)&&(this.filtering?this.filter(this.input.value):this.show())});p(this,"onKey",t=>{let e=this.visible(),i=this.highlighted?e.indexOf(this.highlighted):-1;switch(t.key){case"ArrowDown":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[i<0?0:Math.min(i+1,e.length-1)]);break;case"ArrowUp":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[i<0?e.length-1:Math.max(i-1,0)]);break;case"Home":case"End":this._open&&this.highlighted&&e.length&&(t.preventDefault(),this.highlight(t.key==="Home"?e[0]:e[e.length-1]));break;case"Enter":this._open&&this.highlighted&&(t.preventDefault(),this.choose(this.highlighted));break;case"Escape":this._open&&!this.inline?(t.preventDefault(),t.stopPropagation(),this.hide()):this.input.value&&(t.preventDefault(),t.stopPropagation(),this.input.value="",this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.hide());break;case"Tab":this.inline||this.hide();break}});p(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'option\']");if(!e||e.closest("db-combobox")!==this||dt(e))return;let i=t.target.closest("a[href]");!this.choose(e,!i)&&i&&t.preventDefault()});p(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'option\']");e&&e.closest("db-combobox")===this&&!dt(e)&&!e.hidden&&this.highlight(e)});p(this,"onListDown",t=>t.preventDefault());p(this,"onDocDown",t=>{this._open&&!this.inline&&!this.contains(t.target)&&this.hide()})}get open(){return this._open}get inline(){return this.hasAttribute("inline")}get filtering(){return(this.getAttribute("filter")??"contains")!=="none"}options(){return this.listbox?Array.from(this.listbox.querySelectorAll("[data-part=\'option\']")).filter(t=>t.closest("db-combobox")===this):[]}visible(){return this.options().filter(t=>!t.hidden&&!dt(t))}setup(){if(this.input=Q(this,"[data-part=\'input\']"),this.listbox=Q(this,"[data-part=\'listbox\']"),this.empty=Q(this,"[data-part=\'empty\']"),!this.input||!this.listbox)return;let{input:t,listbox:e}=this;e.id||(e.id=`${this.base}-listbox`),e.setAttribute("role","listbox"),t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-controls",e.id),t.setAttribute("autocomplete","off"),this.inline||(e.hidden=!0),this.prepareOptions(),this.syncExpanded()}prepareOptions(){this.options().forEach(t=>{t.id||(t.id=`${this.base}-option-${++this.optionSeq}`),t.setAttribute("role","option"),t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.matches("a[href], button")&&t.setAttribute("tabindex","-1"),t.querySelectorAll("a, button").forEach(e=>e.setAttribute("tabindex","-1")),t.parentElement&&t.parentElement!==this.listbox&&t.parentElement.localName==="li"&&!t.parentElement.hasAttribute("role")&&t.parentElement.setAttribute("role","none")})}connect(){let{input:t,listbox:e}=this;!t||!e||(t.addEventListener("input",this.onInput),t.addEventListener("focus",this.onFocus),t.addEventListener("keydown",this.onKey),e.addEventListener("click",this.onListClick),e.addEventListener("pointermove",this.onListPointer),e.addEventListener("mousedown",this.onListDown),document.addEventListener("pointerdown",this.onDocDown),typeof MutationObserver<"u"&&(this.observer=new MutationObserver(()=>this.onOptionsChanged()),this.observer.observe(e,{childList:!0,subtree:!0})))}disconnect(){var i;let{input:t,listbox:e}=this;t==null||t.removeEventListener("input",this.onInput),t==null||t.removeEventListener("focus",this.onFocus),t==null||t.removeEventListener("keydown",this.onKey),e==null||e.removeEventListener("click",this.onListClick),e==null||e.removeEventListener("pointermove",this.onListPointer),e==null||e.removeEventListener("mousedown",this.onListDown),document.removeEventListener("pointerdown",this.onDocDown),(i=this.observer)==null||i.disconnect(),this.observer=null}refresh(){this.onOptionsChanged()}onOptionsChanged(){this.prepareOptions(),this.highlighted&&!this.options().includes(this.highlighted)&&this.clearHighlight();let t=this.visible();this.filtering||(t.length||this.inline?this.show():this.hide(),t.length&&!this.highlighted&&!this.hasAttribute("no-autohighlight")&&this.highlight(t[0])),this.syncExpanded(),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count:t.length},bubbles:!0}))}filter(t){let e=t.toLowerCase().trim(),i=0;for(let s of this.options()){let r=!e||(s.textContent??"").toLowerCase().includes(e)||(s.dataset.value??"").toLowerCase().includes(e);s.hidden=!r,r&&i++}this.empty&&(this.empty.hidden=i>0||!e),this.clearHighlight(),i||e&&this.empty?this.show():this.hide();let o=this.visible();o.length&&!this.hasAttribute("no-autohighlight")&&this.highlight(o[0]),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count:i},bubbles:!0}))}syncExpanded(){if(!this.input)return;let t=this.inline?this.visible().length>0:this._open;this.input.setAttribute("aria-expanded",String(t)),this.setAttribute("data-state",t?"open":"closed")}show(){if(!this.listbox||this._open)return this.syncExpanded();this._open=!0,this.listbox.hidden=!1,this.syncExpanded()}hide(){if(this.listbox){if(this.clearHighlight(),!this._open)return this.syncExpanded();this._open=!1,this.inline||(this.listbox.hidden=!0),this.syncExpanded()}}highlight(t){var e,i,o;this.input&&((e=this.highlighted)==null||e.removeAttribute("data-highlighted"),(i=this.highlighted)==null||i.setAttribute("aria-selected","false"),this.highlighted=t,t.setAttribute("data-highlighted",""),t.setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",t.id),(o=t.scrollIntoView)==null||o.call(t,{block:"nearest"}))}clearHighlight(){var t,e,i;(t=this.highlighted)==null||t.removeAttribute("data-highlighted"),(e=this.highlighted)==null||e.setAttribute("aria-selected","false"),this.highlighted=null,(i=this.input)==null||i.removeAttribute("aria-activedescendant")}choose(t,e=!0){var a;let i=t.dataset.value??"",o=((a=t.textContent)==null?void 0:a.trim())??i,s=new CustomEvent("db-combobox:select",{detail:{value:i,text:o,option:t},bubbles:!0,cancelable:!0});if(!this.dispatchEvent(s))return!1;let r=t.matches("a[href]")?t:t.querySelector("a[href]");return r?(e&&r.click(),!0):(this.input&&(this.input.value=t.getAttribute("data-label")??o),this.inline||this.hide(),this.dispatchEvent(new CustomEvent("db-combobox:change",{detail:{value:i,text:o},bubbles:!0})),!0)}};G();customElements.get("db-combobox")||customElements.define("db-combobox",jn);var Ct=Math.min,ut=Math.max,ce=Math.round,de=Math.floor,pt=n=>({x:n,y:n}),ns={left:"right",right:"left",bottom:"top",top:"bottom"};function Wn(n,t,e){return ut(n,Ct(t,e))}function Zt(n,t){return typeof n=="function"?n(t):n}function Lt(n){return n.split("-")[0]}function Qt(n){return n.split("-")[1]}function Ge(n){return n==="x"?"y":"x"}function Xe(n){return n==="y"?"height":"width"}function mt(n){let t=n[0];return t==="t"||t==="b"?"y":"x"}function Ze(n){return Ge(mt(n))}function Yn(n,t,e){e===void 0&&(e=!1);let i=Qt(n),o=Ze(n),s=Xe(o),r=o==="x"?i===(e?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=le(r)),[r,le(r)]}function Gn(n){let t=le(n);return[xe(n),t,xe(t)]}function xe(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}var Vn=["left","right"],Un=["right","left"],is=["top","bottom"],os=["bottom","top"];function ss(n,t,e){switch(n){case"top":case"bottom":return e?t?Un:Vn:t?Vn:Un;case"left":case"right":return t?is:os;default:return[]}}function Xn(n,t,e,i){let o=Qt(n),s=ss(Lt(n),e==="start",i);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(xe)))),s}function le(n){let t=Lt(n);return ns[t]+n.slice(t.length)}function rs(n){var t,e,i,o;return{top:(t=n.top)!=null?t:0,right:(e=n.right)!=null?e:0,bottom:(i=n.bottom)!=null?i:0,left:(o=n.left)!=null?o:0}}function Zn(n){return typeof n!="number"?rs(n):{top:n,right:n,bottom:n,left:n}}function Ht(n){let{x:t,y:e,width:i,height:o}=n;return{width:i,height:o,top:e,left:t,right:t+i,bottom:e+o,x:t,y:e}}function Qn(n,t,e){let{reference:i,floating:o}=n,s=mt(t),r=Ze(t),a=Xe(r),l=Lt(t),c=s==="y",d=i.x+i.width/2-o.width/2,u=i.y+i.height/2-o.height/2,h=i[a]/2-o[a]/2,m;switch(l){case"top":m={x:d,y:i.y-o.height};break;case"bottom":m={x:d,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:u};break;case"left":m={x:i.x-o.width,y:u};break;default:m={x:i.x,y:i.y}}let b=Qt(t);return b&&(m[r]+=h*(b==="end"?1:-1)*(e&&c?-1:1)),m}async function Jn(n,t){var e;t===void 0&&(t={});let{x:i,y:o,platform:s,rects:r,elements:a,strategy:l}=n,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:m=0}=Zt(t,n),b=Zn(m),w=a[h?u==="floating"?"reference":"floating":u],f=Ht(await s.getClippingRect({element:(e=await(s.isElement==null?void 0:s.isElement(w)))==null||e?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),v=u==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(E))&&await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1},I=Ht(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:E,strategy:l}):v);return{top:(f.top-I.top+b.top)/C.y,bottom:(I.bottom-f.bottom+b.bottom)/C.y,left:(f.left-I.left+b.left)/C.x,right:(I.right-f.right+b.right)/C.x}}var as=50,ti=async(n,t,e)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:Jn},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:n,floating:t,strategy:o}),{x:d,y:u}=Qn(c,i,l),h=i,m=0,b={};for(let g=0;g<s.length;g++){let w=s[g];if(!w)continue;let{name:f,fn:v}=w,{x:E,y:C,data:I,reset:L}=await v({x:d,y:u,initialPlacement:i,placement:h,strategy:o,middlewareData:b,rects:c,platform:a,elements:{reference:n,floating:t}});d=E??d,u=C??u,b[f]={...b[f],...I},L&&m<as&&(m++,typeof L=="object"&&(L.placement&&(h=L.placement),L.rects&&(c=L.rects===!0?await r.getElementRects({reference:n,floating:t,strategy:o}):L.rects),{x:d,y:u}=Qn(c,h,l)),g=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:b}};var ei=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(t){var e,i;let{placement:o,middlewareData:s,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...w}=Zt(n,t);if((e=s.arrow)!=null&&e.alignmentOffset)return{};let f=Lt(o),v=mt(a),E=Lt(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(c.floating)),I=h||(E||!g?[le(a)]:Gn(a)),L=b!=="none";!h&&L&&I.push(...Xn(a,g,b,C));let x=[a,...I],y=await l.detectOverflow(t,w),X=[],z=((i=s.flip)==null?void 0:i.overflows)||[];if(d&&X.push(y[f]),u){let _=Yn(o,r,C);X.push(y[_[0]],y[_[1]])}if(z=[...z,{placement:o,overflows:X}],!X.every(_=>_<=0)){var U,S;let _=(((U=s.flip)==null?void 0:U.index)||0)+1,B=x[_];if(B&&(!(u==="alignment"?v!==mt(B):!1)||z.every(K=>mt(K.placement)===v?K.overflows[0]>0:!0)))return{data:{index:_,overflows:z},reset:{placement:B}};let F=(S=z.filter($=>$.overflows[0]<=0).sort(($,K)=>$.overflows[1]-K.overflows[1])[0])==null?void 0:S.placement;if(!F)switch(m){case"bestFit":{var O;let $=(O=z.filter(K=>{if(L){let J=mt(K.placement);return J===v||J==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(J=>J>0).reduce((J,nt)=>J+nt,0)]).sort((K,J)=>K[1]-J[1])[0])==null?void 0:O[0];$&&(F=$);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};var ls=new Set(["left","top"]);async function cs(n,t){let{placement:e,platform:i,elements:o}=n,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=Lt(e),a=Qt(e),l=mt(e)==="y",c=ls.has(r)?-1:1,d=s&&l?-1:1,u=Zt(t,n),{mainAxis:h,crossAxis:m,alignmentAxis:b}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof b=="number"&&(m=a==="end"?b*-1:b),l?{x:m*d,y:h*c}:{x:h*c,y:m*d}}var ni=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(t){var e,i;let{x:o,y:s,placement:r,middlewareData:a}=t,l=await cs(t,n);return r===((e=a.offset)==null?void 0:e.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:r}}}}},ii=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(t){let{x:e,y:i,placement:o,platform:s}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:E,y:C}=v;return{x:E,y:C}}},...c}=Zt(n,t),d={x:e,y:i},u=await s.detectOverflow(t,c),h=mt(o),m=Ge(h),b=d[m],g=d[h],w=(v,E)=>Wn(E+u[v==="y"?"top":"left"],E,E-u[v==="y"?"bottom":"right"]);r&&(b=w(m,b)),a&&(g=w(h,g));let f=l.fn({...t,[m]:b,[h]:g});return{...f,data:{x:f.x-e,y:f.y-i,enabled:{[m]:r,[h]:a}}}}}};var oi=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(t){let{placement:e,rects:i,platform:o,elements:s}=t,{apply:r=()=>{},...a}=Zt(n,t),l=await o.detectOverflow(t,a),c=Lt(e),d=Qt(e),u=mt(e)==="y",{width:h,height:m}=i.floating,b,g;c==="top"||c==="bottom"?(b=c,g=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(g=c,b=d==="end"?"top":"bottom");let w=m-l.top-l.bottom,f=h-l.left-l.right,v=Ct(m-l[b],w),E=Ct(h-l[g],f),C=t.middlewareData.shift,I=!C,L=v,x=E;C!=null&&C.enabled.x&&(x=f),C!=null&&C.enabled.y&&(L=w),I&&!d&&(u?x=h-2*ut(l.left,l.right):L=m-2*ut(l.top,l.bottom)),await r({...t,availableWidth:x,availableHeight:L});let y=await o.getDimensions(s.floating);return h!==y.width||m!==y.height?{reset:{rects:!0}}:{}}}};function Se(){return typeof window<"u"}function Pt(n){return ri(n)?(n.nodeName||"").toLowerCase():"#document"}function st(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function gt(n){var t;return(t=(ri(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function ri(n){return Se()?n instanceof Node||n instanceof st(n).Node:!1}function ht(n){return Se()?n instanceof Element||n instanceof st(n).Element:!1}function wt(n){return Se()?n instanceof HTMLElement||n instanceof st(n).HTMLElement:!1}function si(n){return!Se()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof st(n).ShadowRoot}function ue(n){let{overflow:t,overflowX:e,overflowY:i,display:o}=ft(n);return/auto|scroll|overlay|hidden|clip/.test(t+i+e)&&o!=="inline"&&o!=="contents"}function ai(n){return/^(table|td|th)$/.test(Pt(n))}function he(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}var ds=/transform|translate|scale|rotate|perspective|filter/,us=/paint|layout|strict|content/,Ft=n=>!!n&&n!=="none",Qe;function Ae(n){let t=ht(n)?ft(n):n;return Ft(t.transform)||Ft(t.translate)||Ft(t.scale)||Ft(t.rotate)||Ft(t.perspective)||!Ce()&&(Ft(t.backdropFilter)||Ft(t.filter))||ds.test(t.willChange||"")||us.test(t.contain||"")}function li(n){let t=kt(n);for(;wt(t)&&!te(t);){if(Ae(t))return t;if(he(t))return null;t=kt(t)}return null}function Ce(){return Qe==null&&(Qe=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Qe}function te(n){return/^(html|body|#document)$/.test(Pt(n))}function ft(n){return st(n).getComputedStyle(n)}function fe(n){return ht(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function kt(n){if(Pt(n)==="html")return n;let t=n.assignedSlot||n.parentNode||si(n)&&n.host||gt(n);return si(t)?t.host:t}function ci(n){let t=kt(n);return te(t)?(n.ownerDocument||n).body:wt(t)&&ue(t)?t:ci(t)}function Jt(n,t,e){var i;t===void 0&&(t=[]),e===void 0&&(e=!0);let o=ci(n),s=o===((i=n.ownerDocument)==null?void 0:i.body),r=st(o);if(s){let a=Le(r);return t.concat(r,r.visualViewport||[],ue(o)?o:[],a&&e?Jt(a):[])}else return t.concat(o,Jt(o,[],e))}function Le(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function hi(n){let t=ft(n),e=parseFloat(t.width)||0,i=parseFloat(t.height)||0,o=wt(n),s=o?n.offsetWidth:e,r=o?n.offsetHeight:i,a=ce(e)!==s||ce(i)!==r;return a&&(e=s,i=r),{width:e,height:i,$:a}}function tn(n){return ht(n)?n:n.contextElement}function ee(n){let t=tn(n);if(!wt(t))return pt(1);let e=t.getBoundingClientRect(),{width:i,height:o,$:s}=hi(t),r=(s?ce(e.width):e.width)/i,a=(s?ce(e.height):e.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}var hs=pt(0);function fi(n){let t=st(n);return!Ce()||!t.visualViewport?hs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fs(n,t,e){return t===void 0&&(t=!1),!!e&&t&&e===st(n)}function _t(n,t,e,i){t===void 0&&(t=!1),e===void 0&&(e=!1);let o=n.getBoundingClientRect(),s=tn(n),r=pt(1);t&&(i?ht(i)&&(r=ee(i)):r=ee(n));let a=fs(s,e,i)?fi(s):pt(0),l=(o.left+a.x)/r.x,c=(o.top+a.y)/r.y,d=o.width/r.x,u=o.height/r.y;if(s&&i){let h=st(s),m=ht(i)?st(i):i,b=h,g=Le(b);for(;g&&m!==b;){let w=ee(g),f=g.getBoundingClientRect(),v=ft(g),E=f.left+(g.clientLeft+parseFloat(v.paddingLeft))*w.x,C=f.top+(g.clientTop+parseFloat(v.paddingTop))*w.y;l*=w.x,c*=w.y,d*=w.x,u*=w.y,l+=E,c+=C,b=st(g),g=Le(b)}}return Ht({width:d,height:u,x:l,y:c})}function ke(n,t){let e=fe(n).scrollLeft;return t?t.left+e:_t(gt(n)).left+e}function pi(n,t){let e=n.getBoundingClientRect(),i=e.left+t.scrollLeft-ke(n,e),o=e.top+t.scrollTop;return{x:i,y:o}}function ps(n){let{elements:t,rect:e,offsetParent:i,strategy:o}=n,s=o==="fixed",r=gt(i),a=t?he(t.floating):!1;if(i===r||a&&s)return e;let l={scrollLeft:0,scrollTop:0},c=pt(1),d=pt(0),u=wt(i);if((u||!s)&&((Pt(i)!=="body"||ue(r))&&(l=fe(i)),u)){let m=_t(i);c=ee(i),d.x=m.x+i.clientLeft,d.y=m.y+i.clientTop}let h=r&&!u&&!s?pi(r,l):pt(0);return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:e.y*c.y-l.scrollTop*c.y+d.y+h.y}}function ms(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function gs(n){let t=fe(n),e=n.ownerDocument.body,i=ut(n.scrollWidth,n.clientWidth,e.scrollWidth,e.clientWidth),o=ut(n.scrollHeight,n.clientHeight,e.scrollHeight,e.clientHeight),s=-t.scrollLeft+ke(n),r=-t.scrollTop;return ft(e).direction==="rtl"&&(s+=ut(n.clientWidth,e.clientWidth)-i),{width:i,height:o,x:s,y:r}}var bs=25;function vs(n,t,e){e===void 0&&(e="viewport");let i=e==="layoutViewport",o=st(n),s=gt(n),r=o.visualViewport,a=s.clientWidth,l=s.clientHeight,c=0,d=0;if(r){let h=!Ce()||t==="fixed";i?h||(c=-r.offsetLeft,d=-r.offsetTop):(a=r.width,l=r.height,h&&(c=r.offsetLeft,d=r.offsetTop))}if(ke(s)<=0){let h=s.ownerDocument,m=h.body,b=getComputedStyle(m),g=h.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,w=Math.abs(s.clientWidth-m.clientWidth-g),f=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;f<=bs&&(a-=f)}return{width:a,height:l,x:c,y:d}}function ys(n,t){let e=_t(n,!0,t==="fixed"),i=e.top+n.clientTop,o=e.left+n.clientLeft,s=ee(n),r=n.clientWidth*s.x,a=n.clientHeight*s.y,l=o*s.x,c=i*s.y;return{width:r,height:a,x:l,y:c}}function di(n,t,e){let i;if(t==="viewport"||t==="layoutViewport")i=vs(n,e,t);else if(t==="document")i=gs(gt(n));else if(ht(t))i=ys(t,e);else{let o=fi(n);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ht(i)}function ws(n,t){let e=t.get(n);if(e)return e;let i=Jt(n,[],!1).filter(a=>ht(a)&&Pt(a)!=="body"),o=null,s=ft(n).position==="fixed",r=s?kt(n):n;for(;ht(r)&&!te(r);){let a=ft(r),l=Ae(r),c=o?o.position:s?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(u=>u!==r):o=a,r=kt(r)}return t.set(n,i),i}function Es(n){let{element:t,boundary:e,rootBoundary:i,strategy:o}=n,r=[...e==="clippingAncestors"?he(t)?[]:ws(t,this._c):[].concat(e),i],a=di(t,r[0],o),l=a.top,c=a.right,d=a.bottom,u=a.left;for(let h=1;h<r.length;h++){let m=di(t,r[h],o);l=ut(m.top,l),c=Ct(m.right,c),d=Ct(m.bottom,d),u=ut(m.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function xs(n){let{width:t,height:e}=hi(n);return{width:t,height:e}}function Ss(n,t,e){let i=wt(t),o=gt(t),s=e==="fixed",r=_t(n,!0,s,t),a={scrollLeft:0,scrollTop:0},l=pt(0);if((i||!s)&&((Pt(t)!=="body"||ue(o))&&(a=fe(t)),i)){let h=_t(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}!i&&o&&(l.x=ke(o));let c=o&&!i&&!s?pi(o,a):pt(0),d=r.left+a.scrollLeft-l.x-c.x,u=r.top+a.scrollTop-l.y-c.y;return{x:d,y:u,width:r.width,height:r.height}}function Je(n){return ft(n).position==="static"}function ui(n,t){if(!wt(n)||ft(n).position==="fixed")return null;if(t)return t(n);let e=n.offsetParent;return gt(n)===e&&(e=e.ownerDocument.body),e}function mi(n,t){let e=st(n);if(he(n))return e;if(!wt(n)){let o=kt(n);for(;o&&!te(o);){if(ht(o)&&!Je(o))return o;o=kt(o)}return e}let i=ui(n,t);for(;i&&ai(i)&&Je(i);)i=ui(i,t);return i&&te(i)&&Je(i)&&!Ae(i)?e:i||li(n)||e}var As=async function(n){let t=this.getOffsetParent||mi,e=this.getDimensions,i=await e(n.floating);return{reference:Ss(n.reference,await t(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Cs(n){return ft(n).direction==="rtl"}var Ls={convertOffsetParentRelativeRectToViewportRelativeRect:ps,getDocumentElement:gt,getClippingRect:Es,getOffsetParent:mi,getElementRects:As,getClientRects:ms,getDimensions:xs,getScale:ee,isElement:ht,isRTL:Cs};function gi(n,t){return n.x===t.x&&n.y===t.y&&n.width===t.width&&n.height===t.height}function ks(n,t,e){let i=null,o,s=gt(n);function r(){var d;clearTimeout(o),(d=i)==null||d.disconnect(),i=null}function a(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let h=n.getBoundingClientRect(),{left:m,top:b,width:g,height:w}=h;if(d||t(),!g||!w)return;let f=de(b),v=de(s.clientWidth-(m+g)),E=de(s.clientHeight-(b+w)),C=de(m),L={rootMargin:-f+"px "+-v+"px "+-E+"px "+-C+"px",threshold:ut(0,Ct(1,u))||1},x=!0;function y(X){let z=X[0].intersectionRatio;if(!gi(h,n.getBoundingClientRect()))return a();if(z!==u){if(!x)return a();z?a(!1,z):o=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{i=new IntersectionObserver(y,{...L,root:s.ownerDocument})}catch{i=new IntersectionObserver(y,L)}i.observe(n)}let l=st(n),c=()=>a(e);return l.addEventListener("resize",c),a(!0),()=>{l.removeEventListener("resize",c),r()}}function bi(n,t,e,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=tn(n),d=o||s?[...c?Jt(c):[],...t?Jt(t):[]]:[];d.forEach(f=>{o&&f.addEventListener("scroll",e),s&&f.addEventListener("resize",e)});let u=c&&a?ks(c,e,s):null,h=-1,m=null;r&&(m=new ResizeObserver(f=>{let[v]=f;v&&v.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=m)==null||E.observe(t)})),e()}),c&&!l&&m.observe(c),t&&m.observe(t));let b,g=l?_t(n):null;l&&w();function w(){let f=_t(n);g&&!gi(g,f)&&e(),g=f,b=requestAnimationFrame(w)}return e(),()=>{var f;d.forEach(v=>{o&&v.removeEventListener("scroll",e),s&&v.removeEventListener("resize",e)}),u==null||u(),(f=m)==null||f.disconnect(),m=null,l&&cancelAnimationFrame(b)}}var vi=ni;var yi=ii,wi=ei,Ei=oi;var xi=(n,t,e)=>{let i=new Map,o=e??{},s={...Ls,...o.platform,_c:i};return ti(n,t,{...o,platform:s})};function zt(n,t,e={}){let{placement:i="bottom-start",strategy:o="absolute",offset:s=4,flip:r=!0,shift:a=!0,padding:l=8,matchWidth:c=!1}=e,d=[vi(s),...r?[wi({padding:l})]:[],...a?[yi({padding:l})]:[],...c?[Ei({apply({rects:h}){Object.assign(t.style,{width:`${h.reference.width}px`})}})]:[]];return t.style.position=o,bi(n,t,async()=>{let h=await xi(n,t,{placement:i,strategy:o,middleware:d});Object.assign(t.style,{left:`${h.x}px`,top:`${h.y}px`});let m=h.placement.split("-")[0];t.setAttribute("data-side",m)})}var en=class{constructor(n){p(this,"opts");p(this,"buffer","");p(this,"timerId",null);p(this,"timeout");this.opts=n,this.timeout=n.timeout??1e3}handle(n){if(n.length!==1)return!1;this.timerId!==null&&clearTimeout(this.timerId),this.buffer+=n.toLowerCase(),this.timerId=setTimeout(()=>{this.buffer="",this.timerId=null},this.timeout);let t=this.opts.getItemCount();for(let e=0;e<t;e++)if(this.opts.getItemText(e).toLowerCase().startsWith(this.buffer))return this.opts.onMatch(e),!0;return!0}reset(){this.buffer="",this.timerId!==null&&(clearTimeout(this.timerId),this.timerId=null)}};var Si=class extends Y{constructor(){super(...arguments);p(this,"trigger",null);p(this,"content",null);p(this,"valueEl",null);p(this,"items",[]);p(this,"nativeSelect",null);p(this,"hiddenInput",null);p(this,"labelEl",null);p(this,"onLabelClick",t=>{var e;t.target.closest("[data-part=\'trigger\']")||(t.preventDefault(),(e=this.trigger)==null||e.focus())});p(this,"dismiss",null);p(this,"typeahead",null);p(this,"cleanupFloating",null);p(this,"_open",!1);p(this,"_value","");p(this,"highlighted",-1);p(this,"syncing",!1);p(this,"onNativeChange",()=>{this.syncing||this.refresh()});p(this,"onFormReset",()=>setTimeout(()=>this.refresh()));p(this,"onTriggerClick",()=>{this.isDisabled||(this._open?this.close():this.show())});p(this,"onTriggerKeyUp",t=>{t.key===" "&&t.preventDefault()});p(this,"onTriggerKey",t=>{var s,r;if(this.isDisabled)return;let e=this.enabled();if(!this._open){if(t.key==="ArrowDown"||t.key==="ArrowUp"||t.key==="Enter"||t.key===" "||t.altKey&&t.key==="ArrowDown")t.preventDefault(),this.show(),t.key==="ArrowUp"&&e.length&&this.highlight(this.items.indexOf(e[e.length-1]));else if(t.key==="Home"||t.key==="End"){t.preventDefault(),this.show();let a=t.key==="Home"?e[0]:e[e.length-1];a&&this.highlight(this.items.indexOf(a))}else t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&((s=this.typeahead)==null||s.handle(t.key));return}if(!e.length)return;let i=this.highlighted>=0?e.indexOf(this.items[this.highlighted]):-1,o=a=>{t.preventDefault(),this.highlight(this.items.indexOf(e[a]))};switch(t.key){case"ArrowDown":return o(Math.min(i+1,e.length-1));case"ArrowUp":return t.altKey?(t.preventDefault(),this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close()):o(Math.max(i-1,0));case"Home":return o(0);case"End":return o(e.length-1);case"PageDown":return o(Math.min(i+10,e.length-1));case"PageUp":return o(Math.max(i-10,0));case"Enter":case" ":return t.preventDefault(),this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close();case"Tab":return this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close(!1);default:t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&((r=this.typeahead)==null||r.handle(t.key))}});p(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'item\']");!e||!this.items.includes(e)||dt(e)||(this.select(e),this.close())});p(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'item\']");e&&this.items.includes(e)&&!dt(e)&&this.highlight(this.items.indexOf(e))});p(this,"preventBlur",t=>t.preventDefault())}get open(){return this._open}get value(){return this._value}set value(t){let e=this.items.find(i=>i.dataset.value===t);e&&this.select(e,!1)}get isDisabled(){var t;return this.hasAttribute("disabled")||!!((t=this.nativeSelect)!=null&&t.disabled)}refresh(){var i;let t=this.nativeSelect;if(!t)return;let e=this.items.find(o=>o.dataset.value===t.value);e&&this.select(e,!1),(i=this.trigger)==null||i.setAttribute("aria-disabled",String(this.isDisabled))}enabled(){return this.items.filter(t=>!dt(t))}setup(){var a,l;if(this.nativeSelect=Q(this,"select"),this.nativeSelect&&!Q(this,"[data-part=\'trigger\']")&&this.buildFromNative(this.nativeSelect),this.trigger=Q(this,"[data-part=\'trigger\']"),this.content=Q(this,"[data-part=\'content\']"),this.valueEl=Q(this,"[data-part=\'value\']"),!this.trigger||!this.content)return;let{trigger:t,content:e}=this;this.items=vt(this,"[data-part=\'item\']");let i=Z("db-select");e.id||(e.id=`${i}-listbox`),e.setAttribute("role","listbox"),e.hidden=!0,t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",e.id),t instanceof HTMLButtonElement&&!t.hasAttribute("type")&&(t.type="button"),this.isDisabled&&t.setAttribute("aria-disabled","true"),this.items.forEach((c,d)=>{c.id||(c.id=`${i}-item-${d}`),c.setAttribute("role","option"),c.setAttribute("aria-selected","false")}),vt(this,"[data-part=\'group\']").forEach(c=>{c.setAttribute("role","group");let d=c.querySelector("[data-part=\'label\']");d&&(d.id||(d.id=Z("db-select-label")),c.setAttribute("aria-labelledby",d.id))});let o=this.getAttribute("name");o&&!this.nativeSelect&&(this.hiddenInput=document.createElement("input"),this.hiddenInput.type="hidden",this.hiddenInput.name=o,this.hasAttribute("required")&&(this.hiddenInput.required=!0),this.appendChild(this.hiddenInput)),this.typeahead=new en({getItemCount:()=>this.enabled().length,getItemText:c=>{var d,u;return((u=(d=this.enabled()[c])==null?void 0:d.textContent)==null?void 0:u.trim())??""},onMatch:c=>{let d=this.enabled()[c];d&&(this._open?this.highlight(this.items.indexOf(d)):this.select(d))}}),this.dismiss=new Nt(e,{onDismiss:c=>this.close(c!=="outside-press")});let s=((a=this.nativeSelect)==null?void 0:a.value)??this.getAttribute("default-value")??"",r=this.items.find(c=>c.dataset.value===s);r&&dt(r)?this.valueEl&&(this.valueEl.textContent=((l=r.textContent)==null?void 0:l.trim())??"",this.valueEl.setAttribute("data-placeholder","")):r&&this.select(r,!1),this.setState("closed")}buildFromNative(t){let e=document.createElement("button");e.type="button",e.setAttribute("data-part","trigger"),e.className="db-select-trigger";let i=t.getAttribute("aria-label"),o=t.getAttribute("aria-labelledby"),s=!o&&t.id?document.querySelector(`label[for="${CSS.escape(t.id)}"]`):null;s&&(o=s.id||(s.id=Z("db-select-for"))),i&&e.setAttribute("aria-label",i),o&&e.setAttribute("aria-labelledby",o);let r=t.closest("label");if(r){if(this.labelEl=r,!i&&!o){let u=Array.from(r.childNodes).filter(h=>!(h instanceof Element&&(h===t||h.contains(t)||h.localName==="db-select"))).map(h=>h.textContent??"").join(" ").replace(/\\s+/g," ").trim();u&&e.setAttribute("aria-label",u)}}else s&&(this.labelEl=s);let a=document.createElement("span");a.setAttribute("data-part","value"),a.className="db-select-value";let l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("viewBox","0 0 24 24"),l.setAttribute("aria-hidden","true"),l.setAttribute("class","db-select-chevron"),l.innerHTML=\'<path d="m6 9 6 6 6-6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\',e.append(a,l);let c=document.createElement("div");c.setAttribute("data-part","content"),c.className="db-select-content";let d=(u,h)=>{let m=document.createElement("div");m.setAttribute("data-part","item"),m.className="db-select-item",m.dataset.value=u.value;for(let[b,g]of Object.entries(u.dataset))g!=null&&(m.dataset[b]=g);u.disabled&&m.setAttribute("aria-disabled","true"),m.textContent=u.textContent??u.value,h.appendChild(m)};for(let u of Array.from(t.children))if(u instanceof HTMLOptGroupElement){let h=document.createElement("div");h.setAttribute("data-part","group");let m=document.createElement("div");m.setAttribute("data-part","label"),m.className="db-select-label",m.textContent=u.label,h.appendChild(m);for(let b of Array.from(u.children))b instanceof HTMLOptionElement&&d(b,h);c.appendChild(h)}else u instanceof HTMLOptionElement&&d(u,c);t.hidden=!0,t.tabIndex=-1,t.setAttribute("aria-hidden","true"),this.append(e,c)}connect(){var t,e,i,o,s,r,a,l,c,d;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.addEventListener("keydown",this.onTriggerKey),(i=this.trigger)==null||i.addEventListener("keyup",this.onTriggerKeyUp),(o=this.nativeSelect)==null||o.addEventListener("change",this.onNativeChange),(r=(s=this.nativeSelect)==null?void 0:s.form)==null||r.addEventListener("reset",this.onFormReset),(a=this.labelEl)==null||a.addEventListener("click",this.onLabelClick),(l=this.content)==null||l.addEventListener("click",this.onListClick),(c=this.content)==null||c.addEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.addEventListener("mousedown",this.preventBlur)}disconnect(){var t,e,i,o,s,r,a,l,c,d;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.removeEventListener("keydown",this.onTriggerKey),(i=this.trigger)==null||i.removeEventListener("keyup",this.onTriggerKeyUp),(o=this.nativeSelect)==null||o.removeEventListener("change",this.onNativeChange),(r=(s=this.nativeSelect)==null?void 0:s.form)==null||r.removeEventListener("reset",this.onFormReset),(a=this.labelEl)==null||a.removeEventListener("click",this.onLabelClick),(l=this.content)==null||l.removeEventListener("click",this.onListClick),(c=this.content)==null||c.removeEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.removeEventListener("mousedown",this.preventBlur),this._open&&this.close(!1)}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}show(){var r,a;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let i=Yt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=zt(t,e,{placement:"bottom-start",offset:4,matchWidth:!this.hasAttribute("auto-width"),strategy:i==="top-layer"?"fixed":"absolute"});let s=this.items.find(l=>l.dataset.value===this._value&&!dt(l))??this.enabled()[0];s&&this.highlight(this.items.indexOf(s)),(r=this.dismiss)==null||r.activate(),(a=this.typeahead)==null||a.reset(),t.focus()}close(t=!0){var o,s,r;let{trigger:e,content:i}=this;!e||!i||!this._open||(this._open=!1,(o=this.dismiss)==null||o.deactivate(),(s=this.cleanupFloating)==null||s.call(this),this.cleanupFloating=null,Gt(i),this.setState("closed"),e.setAttribute("aria-expanded","false"),e.removeAttribute("aria-activedescendant"),this.items.forEach(a=>a.removeAttribute("data-highlighted")),this.highlighted=-1,(r=this.typeahead)==null||r.reset(),t&&e.focus())}highlight(t){var r;let e=this.items[t],i=this.content;if(!e||!i||!this.trigger)return;this.highlighted>=0&&((r=this.items[this.highlighted])==null||r.removeAttribute("data-highlighted")),this.highlighted=t,e.setAttribute("data-highlighted",""),this.trigger.setAttribute("aria-activedescendant",e.id);let o=e.offsetTop,s=o+e.offsetHeight;o<i.scrollTop?i.scrollTop=o:s>i.scrollTop+i.clientHeight&&(i.scrollTop=s-i.clientHeight)}select(t,e=!0){var s;if(dt(t))return;let i=t.dataset.value??"",o=i!==this._value;this._value=i;for(let r of this.items){let a=r===t;r.setAttribute("aria-selected",String(a)),a?r.setAttribute("data-state","checked"):r.removeAttribute("data-state")}if(this.valueEl&&(this.valueEl.textContent=((s=t.textContent)==null?void 0:s.trim())??"",this.valueEl.removeAttribute("data-placeholder")),this.hiddenInput&&(this.hiddenInput.value=i),!e||!o){this.nativeSelect&&(this.nativeSelect.value=i);return}if(this.nativeSelect){this.nativeSelect.value=i,this.syncing=!0;try{this.nativeSelect.dispatchEvent(new Event("input",{bubbles:!0})),this.nativeSelect.dispatchEvent(new Event("change",{bubbles:!0}))}finally{this.syncing=!1}}this.dispatchEvent(new CustomEvent("db-select:change",{detail:{value:i},bubbles:!0}))}};G();customElements.get("db-select")||customElements.define("db-select",Si);var Ai=class extends Y{constructor(){super(...arguments);p(this,"trigger",null);p(this,"content",null);p(this,"dismiss",null);p(this,"cleanupFloating",null);p(this,"_open",!1);p(this,"onTriggerClick",()=>this.toggle());p(this,"onContentClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-popover")===this&&this.close("close-press")})}get open(){return this._open}setup(){var e;if(this.trigger=Wt(Q(this,"[data-part=\'trigger\']")),this.content=Q(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;let t=this.content;t.id||(t.id=Z("db-popover")),t.hasAttribute("role")||t.setAttribute("role","dialog"),!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&((e=this.trigger).id||(e.id=Z("db-popover-trigger")),t.setAttribute("aria-labelledby",this.trigger.id)),t.hidden=!0,this.trigger.setAttribute("aria-haspopup","dialog"),this.trigger.setAttribute("aria-controls",t.id),this.trigger.setAttribute("aria-expanded","false"),this.setState("closed"),this.dismiss=new Nt(t,{onDismiss:i=>this.close(i)})}connect(){var t,e;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.content)==null||e.addEventListener("click",this.onContentClick)}disconnect(){var t,e;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.content)==null||e.removeEventListener("click",this.onContentClick),this._open&&this.close("api")}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}placement(){var o,s;let t=this.getAttribute("placement");if(t)return t;let e=((o=this.content)==null?void 0:o.dataset.side)||"bottom",i=((s=this.content)==null?void 0:s.dataset.align)||"center";return`${e}${i!=="center"?`-${i}`:""}`}toggle(){this._open?this.close("trigger-press"):this.show()}show(){var o;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let i=Yt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=zt(t,e,{placement:this.placement(),offset:Number(this.getAttribute("offset")??8),strategy:i==="top-layer"?"fixed":"absolute"}),(o=this.dismiss)==null||o.activate(),this.hasAttribute("no-autofocus")||requestAnimationFrame(()=>{this._open&&(Tn(e)[0]??e).focus({preventScroll:!0})}),this.dispatchEvent(new CustomEvent("db-popover:open",{bubbles:!0}))}close(t="api"){var s,r;let{trigger:e,content:i}=this;if(!e||!i||!this._open)return;this._open=!1,(s=this.dismiss)==null||s.deactivate(),(r=this.cleanupFloating)==null||r.call(this),this.cleanupFloating=null;let o=i.contains(document.activeElement);Gt(i),this.setState("closed"),e.setAttribute("aria-expanded","false"),t!=="outside-press"&&(o||t==="escape-key"||t==="close-press")&&e.focus(),this.dispatchEvent(new CustomEvent("db-popover:close",{detail:{reason:t},bubbles:!0}))}};G();customElements.get("db-popover")||customElements.define("db-popover",Ai);var Ci="db-announcement-closed:";var Li=class extends Y{constructor(){super(...arguments);p(this,"closeButton",null);p(this,"onClose",()=>this.close())}setup(){var t;this.closeButton=[...this.querySelectorAll("[data-part=\'close\']")].find(e=>e.closest("db-announcement")===this)??null,this.closeButton&&!this.closeButton.hasAttribute("aria-label")&&!((t=this.closeButton.textContent)!=null&&t.trim())&&this.closeButton.setAttribute("aria-label","Close announcement")}connect(){var t;(t=this.closeButton)==null||t.addEventListener("click",this.onClose)}disconnect(){var t;(t=this.closeButton)==null||t.removeEventListener("click",this.onClose)}close(){var i;let t=this.getAttribute("announcement-id")??"";try{t&&localStorage.setItem(Ci+t,"1")}catch{}let e=this.contains(document.activeElement);if(document.documentElement.setAttribute("data-announcement-closed",""),this.hidden=!0,this.style.display="none",e){let o=document.querySelector("main, [role=\'main\']");o?(o.hasAttribute("tabindex")||o.setAttribute("tabindex","-1"),o.focus({preventScroll:!0})):(i=document.activeElement)==null||i.blur()}this.dispatchEvent(new CustomEvent("db-announcement:close",{bubbles:!0,detail:{id:t}}))}};G();customElements.get("db-announcement")||customElements.define("db-announcement",Li);var ki=class extends Y{constructor(){super(...arguments);p(this,"trigger",null);p(this,"content",null);p(this,"cleanupFloating",null);p(this,"showTimer",null);p(this,"hideTimer",null);p(this,"_open",!1);p(this,"onEnter",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this._open||(this.showTimer=setTimeout(()=>this.show(),this.num("delay",200))))});p(this,"onLeave",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this.hideTimer=setTimeout(()=>this.hide(),this.num("close-delay",100)))});p(this,"onContentEnter",()=>this.clearTimers());p(this,"onFocus",()=>{let t=!0;try{t=this.trigger.matches(":focus-visible")}catch{}t&&(this.clearTimers(),this.show())});p(this,"onBlur",()=>this.hide());p(this,"onPress",()=>this.hide());p(this,"onKey",t=>{t.key==="Escape"&&this._open&&(t.preventDefault(),t.stopImmediatePropagation(),this.hide())})}get open(){return this._open}num(t,e){let i=Number(this.getAttribute(t));return Number.isFinite(i)&&this.hasAttribute(t)?i:e}setup(){var e;if(this.trigger=Wt(Q(this,"[data-part=\'trigger\']")),this.content=Q(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;(e=this.content).id||(e.id=Z("db-tooltip")),this.content.setAttribute("role","tooltip"),this.content.hidden=!0;let t=(this.trigger.getAttribute("aria-describedby")??"").split(/\\s+/).filter(Boolean);t.includes(this.content.id)||this.trigger.setAttribute("aria-describedby",[...t,this.content.id].join(" ")),this.setState("closed")}connect(){let{trigger:t,content:e}=this;!t||!e||(t.addEventListener("pointerenter",this.onEnter),t.addEventListener("pointerleave",this.onLeave),t.addEventListener("focus",this.onFocus),t.addEventListener("blur",this.onBlur),t.addEventListener("pointerdown",this.onPress),e.addEventListener("pointerenter",this.onContentEnter),e.addEventListener("pointerleave",this.onLeave))}disconnect(){let{trigger:t,content:e}=this;t==null||t.removeEventListener("pointerenter",this.onEnter),t==null||t.removeEventListener("pointerleave",this.onLeave),t==null||t.removeEventListener("focus",this.onFocus),t==null||t.removeEventListener("blur",this.onBlur),t==null||t.removeEventListener("pointerdown",this.onPress),e==null||e.removeEventListener("pointerenter",this.onContentEnter),e==null||e.removeEventListener("pointerleave",this.onLeave),this.hide()}clearTimers(){this.showTimer&&clearTimeout(this.showTimer),this.hideTimer&&clearTimeout(this.hideTimer),this.showTimer=this.hideTimer=null}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}show(){let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0,this.clearTimers();let i=Yt(e);this.setState("open"),this.cleanupFloating=zt(t,e,{placement:this.getAttribute("placement")||e.dataset.side||"top",offset:8,strategy:i==="top-layer"?"fixed":"absolute"}),document.addEventListener("keydown",this.onKey,!0),this.dispatchEvent(new CustomEvent("db-tooltip:open",{bubbles:!0}))}hide(){var t;this.clearTimers(),!(!this._open||!this.content)&&(this._open=!1,document.removeEventListener("keydown",this.onKey,!0),(t=this.cleanupFloating)==null||t.call(this),this.cleanupFloating=null,Gt(this.content),this.setState("closed"),this.dispatchEvent(new CustomEvent("db-tooltip:close",{bubbles:!0})))}};G();customElements.get("db-tooltip")||customElements.define("db-tooltip",ki);var Ti="sidebar_state",Ts="b",Os=768,pe=new WeakMap;function Ds(n){try{return localStorage.getItem(n)}catch{return null}}function Rs(n,t){try{localStorage.setItem(n,t)}catch{}}function sn(n){if(pe.has(n))return;let t=n.querySelector("[data-component=\'sidebar\']");if(!t)return;let e=t.dataset.collapsible||"offcanvas",i=t.dataset.side||"left",o=t.dataset.defaultOpen!=="false",s=Ds(Ti),r=s!==null?s==="true":o,a=t.querySelector("[data-sidebar-desktop]"),l=t.querySelector("[data-sidebar-mobile]"),c=t.querySelector("[data-sidebar-mobile-backdrop]"),d=window.matchMedia(`(max-width: ${Os-1}px)`),u={provider:n,sidebar:t,desktopSidebar:a,mobileSidebar:l,mobileBackdrop:c,collapsible:e,side:i,open:r,openMobile:!1,isMobile:d.matches,mediaQuery:d};pe.set(n,u),Oi(u);let h=g=>{u.isMobile=g.matches,!g.matches&&u.openMobile&&Tt(n)};d.addEventListener("change",h);let m=g=>{g.key===Ts&&(g.metaKey||g.ctrlKey)?(g.preventDefault(),nn(n)):g.key==="Escape"&&u.openMobile&&(g.preventDefault(),Tt(n))};document.addEventListener("keydown",m),Ms(n,u),c&&c.addEventListener("click",()=>{Tt(n)});let b=t.querySelector("[data-part=\'rail\']");b&&b.addEventListener("click",()=>{nn(n)})}function Ms(n,t){n.querySelectorAll("[data-part=\'sidebar-trigger\']").forEach(e=>{e.addEventListener("click",()=>{nn(n)})})}function nn(n){let t=pe.get(n);t&&(t.isMobile?t.openMobile?Tt(n):Is(n):(t.open=!t.open,Oi(t),Rs(Ti,String(t.open))))}function Oi(n){let t=n.open?"expanded":"collapsed";n.provider.setAttribute("data-state",t),n.sidebar.setAttribute("data-state",t),n.desktopSidebar&&(n.desktopSidebar.setAttribute("data-state",t),n.open?n.desktopSidebar.setAttribute("data-collapsible",""):n.desktopSidebar.setAttribute("data-collapsible",n.collapsible))}function Is(n){var i;let t=pe.get(n);if(!t||t.openMobile||!t.mobileSidebar)return;t.openMobile=!0;let e=(i=t.desktopSidebar)==null?void 0:i.querySelector("[data-sidebar=\'sidebar-inner\']");if(e)for(;e.firstChild;)t.mobileSidebar.appendChild(e.firstChild);t.mobileSidebar.hidden=!1,t.mobileSidebar.setAttribute("data-state","open"),t.mobileBackdrop&&(t.mobileBackdrop.hidden=!1),It.activate(),requestAnimationFrame(()=>{var s;let o=(s=t.mobileSidebar)==null?void 0:s.querySelector(\'a, button, [tabindex]:not([tabindex="-1"])\');o==null||o.focus()})}function Tt(n){var o;let t=pe.get(n);if(!t||!t.openMobile||!t.mobileSidebar)return;t.openMobile=!1;let e=(o=t.desktopSidebar)==null?void 0:o.querySelector("[data-sidebar=\'sidebar-inner\']");if(e&&t.mobileSidebar)for(;t.mobileSidebar.firstChild;)e.appendChild(t.mobileSidebar.firstChild);t.mobileSidebar.setAttribute("data-state","closed"),t.mobileSidebar.hidden=!0,t.mobileBackdrop&&(t.mobileBackdrop.hidden=!0),It.deactivate();let i=t.provider.querySelector("[data-part=\'sidebar-trigger\']");i==null||i.focus()}function on(){document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(n=>{sn(n)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",on):on();document.addEventListener("astro:page-load",on);var Di=/^[a-z][a-z0-9_-]{0,63}$/,Te={docs:"docs.js",shard:n=>`t-${n}.js`,fragment:n=>`f-${n}.js`},Oe={docs:"docs",shard:n=>n,fragment:n=>`frag:${n}`};var Ns={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},Hs={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},Fs="[^aeiou]",an="[aeiouy]",Ot="("+Fs+"[^aeiouy]*)",Re="("+an+"[aeiou]*)",rn=new RegExp("^"+Ot+"?"+Re+Ot),Ps=new RegExp("^"+Ot+"?"+Re+Ot+Re+"?$"),De=new RegExp("^"+Ot+"?("+Re+Ot+"){2,}"),Ri=new RegExp("^"+Ot+"?"+an),Mi=new RegExp("^"+Ot+an+"[^aeiouwxy]$"),_s=/ll$/,zs=/^(.+?)e$/,$s=/^(.+?)y$/,Bs=/^(.+?(s|t))(ion)$/,qs=/^(.+?)(ed|ing)$/,Ks=/(at|bl|iz)$/,js=/^(.+?)eed$/,Vs=/^.+?[^s]s$/,Us=/^.+?(ss|i)es$/,Ws=/([^aeiouylsz])\\1$/,Ys=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,Gs=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,Xs=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;function Ii(n){let t=String(n).toLowerCase();if(t.length<3)return t;let e=!1;t.codePointAt(0)===121&&(e=!0,t="Y"+t.slice(1)),Us.test(t)?t=t.slice(0,-2):Vs.test(t)&&(t=t.slice(0,-1));let i;return(i=js.exec(t))?rn.test(i[1])&&(t=t.slice(0,-1)):(i=qs.exec(t))&&Ri.test(i[1])&&(t=i[1],Ks.test(t)?t+="e":Ws.test(t)?t=t.slice(0,-1):Mi.test(t)&&(t+="e")),(i=$s.exec(t))&&Ri.test(i[1])&&(t=i[1]+"i"),(i=Ys.exec(t))&&rn.test(i[1])&&(t=i[1]+Ns[i[2]]),(i=Gs.exec(t))&&rn.test(i[1])&&(t=i[1]+Hs[i[2]]),(i=Xs.exec(t))?De.test(i[1])&&(t=i[1]):(i=Bs.exec(t))&&De.test(i[1])&&(t=i[1]),(i=zs.exec(t))&&(De.test(i[1])||Ps.test(i[1])&&!Mi.test(i[1]))&&(t=i[1]),_s.test(t)&&De.test(t)&&(t=t.slice(0,-1)),e&&(t="y"+t.slice(1)),t}var Ni=new Set("a an and are as at be by for from has have in is it its of on or that the this to was were will with you your can not".split(" ")),Zs=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u,me;function Qs(n){if(me===void 0)try{me=typeof Intl<"u"&&"Segmenter"in Intl?new Intl.Segmenter(void 0,{granularity:"word"}):null}catch{me=null}if(me)return[...me.segment(n)].filter(i=>i.isWordLike).map(i=>i.segment);let t=[...n];if(t.length<2)return t;let e=[];for(let i=0;i<t.length-1;i++)e.push(t[i]+t[i+1]);return e}function $t(n){let t=[];for(let e of n.toLowerCase().normalize("NFKD").replace(/[\u0300-\u036F]/g,"").normalize("NFC").matchAll(/[\\p{L}\\p{N}][\\p{L}\\p{N}_.-]*[\\p{L}\\p{N}]|[\\p{L}\\p{N}]/gu)){let i=e[0],o=i.split(/[._-]+/).filter(Boolean);if(o.length>1&&t.push(i),o.length>1&&!/[._]/.test(i)){let s=o.join("");s.length>=3&&!Ni.has(s)&&t.push(s)}for(let s of o)Zs.test(s)?t.push(...Qs(s)):s.length>=2&&!Ni.has(s)&&t.push(s)}return t}function ln(n,t){let e="";for(let i of n.slice(0,t))e+=/[a-z0-9]/.test(i)?i:`_${i.codePointAt(0).toString(16)}_`;return e}function ge(n){if(!(!n||!/^en(-|$)/i.test(n)))return t=>/^[a-z]{3,}$/.test(t)?Ii(t):t}function Bt(n,t={}){var w,f;let e=[],i=[],o=[],s=!1,r={tag:[],section:[]},a={tag:[],section:[]},l=Object.create(null),c=Object.create(null),d=["tag","section",...new Set((t.facets??[]).filter(v=>Di.test(v)&&v!=="tag"&&v!=="section"))],u=new RegExp(`(?<!\\\\S)(-?)(${d.join("|")}):(?:"([^"]*)"?|(?!\\\\/\\\\/)(\\\\S*))|(-?)"([^"]*)"?|(\\\\S+)`,"gi"),h=[...n.matchAll(u)].map(v=>{var E;return{facetNeg:v[1]==="-",facet:(E=v[2])==null?void 0:E.toLowerCase(),value:v[3]??v[4],neg:v[5],phrase:v[6],word:v[7]}}),m=!1,b=!1;for(let[v,E]of h.entries()){if(E.facet){let O=hn(E.value??"");if(!O)continue;E.facet==="tag"||E.facet==="section"?(E.facetNeg?a:r)[E.facet].push(O):((w=E.facetNeg?c:l)[f=E.facet]??(w[f]=[])).push(O);continue}let C=E.word;if(C==="OR"){b=e.length>0,s=!0;continue}if(C==="NOT"){m=!0,s=!0;continue}if(C==="AND"){s=!0;continue}let I=E.phrase!==void 0,L=m||E.neg==="-"||(C==null?void 0:C.startsWith("-"))&&C.length>1;m=!1;let x=I?E.phrase:L&&(C!=null&&C.startsWith("-"))?C.slice(1):C,y=[...new Set($t(x))];if(!y.length){b=!1;continue}if(L){i.push(I?y:[y[0]]),s=!0,b=!1;continue}if(I){b=!1,s=!0,y.length>1&&o.push($t(x).join(" "));for(let O of y)e.push({terms:[O],prefix:!1,exact:!0});continue}let X=v===h.length-1&&!/\\s$/.test(n);if(b){e[e.length-1].terms.push(y[0]);for(let O of y.slice(1))e.push({terms:[O],prefix:!1});b=!1;continue}let z=y[0],U=/[._-]/.test(z),S=z.replace(/-/g,"");for(let[O,_]of y.entries())e.push({terms:[_],prefix:X&&_.length>=2&&(O===y.length-1||U&&(_===z||_===S))})}let g=[...new Set(e.flatMap(v=>v.terms))];return{groups:e,not:i,phrases:o,strict:s,highlight:g,filters:r,notFilters:a,...Object.keys(l).length?{facets:l}:{},...Object.keys(c).length?{notFacets:c}:{}}}async function Js(n,t){let e=await t.meta(),i=typeof n=="string"?Bt(n,{facets:fn([e])}):n,o=await zi(i,e,t),s=qi(i,e);if(!i.groups.length)return $i(e,o,s);let r=[];for(let l of i.groups)r.push(await nr(l,e,t));let a=dn(r,e,o,s,"and").sort(Me);return a.length||i.strict?a:dn(r,e,o,s,"or").sort(Me)}var Me=(n,t)=>t.score-n.score;async function zi(n,t,e){let i=new Set;for(let o of n.not){let s;for(let r of o){let[a]=Bi(r,t),l=a?await e.shard(a):void 0,c=l&&Object.hasOwn(l,r)?l[r]:[],d=new Set;for(let u=0;u<c.length;u+=2)(!s||s.has(c[u]))&&d.add(c[u]);s=d}for(let r of s??[])i.add(r)}return i}function $i(n,t,e){if(!e)return[];let i=[];return n.docs.forEach(([o,s,r],a)=>e(a)&&!t.has(a)&&i.push({id:a,title:o,url:s,section:n.sections[r]??"",score:1})),i}function dn(n,t,e,i,o){let s=new Map,r=new Map;for(let l of n)for(let[c,d]of l)s.set(c,(s.get(c)??0)+d),r.set(c,(r.get(c)??0)+1);let a=[];for(let[l,c]of s){if(e.has(l)||i&&!i(l)||o==="and"&&r.get(l)!==n.length)continue;let[d,u,h]=t.docs[l];a.push({id:l,title:d,url:u,section:t.sections[h]??"",score:c*(r.get(l)/n.length)})}return a}var Et={prefix:.6,stem:.4,titleAll:1.5,titleExact:2,headingAll:1.4,headingExact:1.8,phrase:1.5,typo:.3};function tr(n,t){if(n===t)return!1;if(n.length===t.length){let s=[];for(let r=0;r<n.length&&s.length<=2;r++)n[r]!==t[r]&&s.push(r);return s.length===1?!0:s.length===2&&s[1]===s[0]+1&&n[s[0]]===t[s[1]]&&n[s[1]]===t[s[0]]}let[e,i]=n.length<t.length?[n,t]:[t,n];if(i.length-e.length!==1)return!1;let o=0;for(;o<e.length&&e[o]===i[o];)o++;return e.slice(o)===i.slice(o+1)}function Bi(n,t,e=!1){let i=er(t);for(let s=Math.min(n.length,Hi);s>=1;s--){let r=ln(n,s);if(i.has(r))return!e||s<n.length?[r]:[r,...t.shards.filter(a=>a.length>r.length&&a.startsWith(r)).slice(0,10)]}let o=ln(n,Math.min(n.length,Hi));return e?t.shards.filter(s=>s.startsWith(o)).slice(0,10):[]}var Hi=3,Fi=new WeakMap;function er(n){let t=Fi.get(n);return t||Fi.set(n,t=new Set(n.shards)),t}function hn(n){return n.replace(/"/g,"").trim().toLowerCase()}function qi(n,t){let{tag:e,section:i}=n.filters,o=n.notFilters??{tag:[],section:[]},s=Object.entries(n.facets??{}).filter(([,f])=>f.length),r=Object.entries(n.notFacets??{}).filter(([,f])=>f.length);if(!e.length&&!i.length&&!o.tag.length&&!o.section.length&&!s.length&&!r.length)return;let a=(f,v)=>new Set(f.flatMap((E,C)=>v.includes(hn(E))?[C]:[])),l=a(t.sections,i),c=a(t.tags??[],e),d=a(t.sections,o.section),u=a(t.tags??[],o.tag),h=f=>(t.facets??[]).findIndex(v=>v.name===f),m=f=>f.map(([v,E])=>{let C=h(v);return[C,C<0?new Set:a(t.facets[C].values,E)]}),b=m(s),g=m(r).filter(([f])=>f>=0),w=(f,[v,E])=>{var C;return v>=0&&(((C=f[4])==null?void 0:C[v])??[]).some(I=>E.has(I))};return f=>{let v=t.docs[f],E=v[3]??[];if(i.length&&!l.has(v[2])||e.length&&!E.some(C=>c.has(C))||d.has(v[2])||E.some(C=>u.has(C)))return!1;for(let C of b)if(!w(v,C))return!1;for(let C of g)if(w(v,C))return!1;return!0}}function fn(n){return[...new Set(n.flatMap(t=>((t==null?void 0:t.facets)??[]).map(e=>e.name)))]}function Ki(n,t){let e=Object.create(null),i=new Map,o=(s,r)=>{let a=`${s}\\0${hn(r)}`,l=i.get(a);l===void 0&&i.set(a,l=r);let c=e[s]??(e[s]=Object.create(null));c[l]=(c[l]??0)+1};for(let s of n){let r=typeof t=="function"?t(s):t,a=r==null?void 0:r.docs[s.id];if(a){r.sections[a[2]]&&o("section",r.sections[a[2]]);for(let l of new Set(a[3]??[]))r.tags[l]!==void 0&&o("tag",r.tags[l]);(a[4]??[]).forEach((l,c)=>{var u;let d=(u=r.facets)==null?void 0:u[c];if(d)for(let h of new Set(l))d.values[h]!==void 0&&o(d.name,d.values[h])})}}return e}async function nr(n,t,e){let i=await Vi(n,t,e,!0);return n.corrected=i.corrected.length?i.corrected:void 0,ji(i,un(t.count,i.docs.size))}function un(n,t){return Math.log(1+(n-t+.5)/(t+.5))}function ji(n,t){let e=new Map;for(let[i,o]of n.lists)for(let s=0;s<i.length;s+=2)e.set(i[s],Math.max(e.get(i[s])??0,i[s+1]*o*t));return e}async function Vi(n,t,e,i){let o=ge(t.lang),s=new Map,r=new Map;for(let d of n.terms)for(let u of Bi(d,t,n.prefix)){let h=await e.shard(u);if(!h)continue;let m=(f,v)=>{v>(s.get(f)??0)&&(s.set(f,v),r.set(f,h))};Object.hasOwn(h,d)&&m(d,1);let b=o==null?void 0:o(d),g=b?b.slice(0,Math.max(3,b.length-1)):void 0,w=0;for(let f in h)f!==d&&(n.prefix&&f.startsWith(d)&&w++<200&&m(f,Et.prefix),b&&g&&f.startsWith(g)&&o(f)===b&&m(f,Et.stem));if(i&&!s.size&&!n.exact&&d.length>=4&&!/[._-]/.test(d))for(let f in h)Math.abs(f.length-d.length)<=1&&tr(d,f)&&m(f,Et.typo)}let a=[...s].filter(([,d])=>d===Et.typo).map(([d])=>d),l=[...s].map(([d,u])=>[r.get(d)[d],u]),c=new Set;for(let[d]of l)for(let u=0;u<d.length;u+=2)c.add(d[u]);return{lists:l,docs:c,corrected:a}}var Ui=n=>typeof n=="function"?n:()=>n;async function Wi(n,t){let e=Ui(t),i=new Map;for(let o of n){let s=e(o),r=i.get(s);r||i.set(s,r=[]),r.push(o)}await Promise.all([...i].map(async([o,s])=>{var c;let r=await o.meta(),a=[...new Set(s.map(d=>Math.floor(d.id/r.block)))],l=new Map;await Promise.all(a.map(async d=>{try{l.set(d,await o.fragment(d))}catch{l.set(d,void 0)}}));for(let d of s)d.fragment??(d.fragment=(c=l.get(Math.floor(d.id/r.block)))==null?void 0:c[d.id%r.block])}))}async function Yi(n){let t=Ui(n),e=new Map;return async i=>{let o=t(i),s=e.get(o);if(!s){let r=ge((await o.meta()).lang);s=(a,l)=>l.terms.some(c=>a===c||l.prefix&&a.startsWith(c)||r!==void 0&&r(a)===r(c))||(l.corrected??[]).includes(a),e.set(o,s)}return s}}async function Gi(n,t,e,i=10){let o=t.slice(0,i);await Wi(o,e);let s=n.groups,r=await Yi(e);for(let a of o){let l=await r(a),[c,d]=a.fragment??["",[]],u=$t(a.title),h=1;s.length&&s.every(b=>u.some(g=>l(g,b)))&&(h=Pi(u,s,l)?Et.titleExact:Et.titleAll);let m=[];for(let[b,g]of d){let w=$t(b);!s.length||!s.every(f=>w.some(v=>l(v,f)))||(m.push([b,g]),h=Math.max(h,Pi(w,s,l)?Et.headingExact:Et.headingAll))}if(a.sections=m.slice(0,3),n.phrases.length){let b=[a.title,c,...d.map(([g])=>g)].map(g=>$t(g).join(" ")).join(" \\0 ");n.phrases.every(g=>b.includes(g))&&(h*=Et.phrase)}a.score*=h}return o.sort((a,l)=>l.score-a.score),[...o,...t.slice(i)]}async function Xi(n,t,e){await Wi(t,e);let i=await Yi(e);for(let o of t){if(!o.fragment||o.sections)continue;let s=await i(o);o.sections=o.fragment[1].filter(([r])=>{let a=$t(r);return n.groups.length>0&&n.groups.every(l=>a.some(c=>s(c,l)))}).slice(0,3)}}function Pi(n,t,e){return n.every(i=>t.some(o=>e(i,o)))&&t.every(i=>n.some(o=>e(o,i)))}async function Zi(n,t,e=10){let i=await t.meta(),o=Bt(n,{facets:fn([i])}),s=ge(i.lang);s&&(o.highlight=[...new Set([...o.highlight,...o.highlight.map(s).filter(a=>a.length>=3)])]);let r=await Js(o,t);return o.highlight=[...new Set([...o.highlight,...o.groups.flatMap(a=>a.corrected??[])])],{parsed:o,results:await Gi(o,r,t,e),facets:Ki(r,i)}}async function ir(n){return Promise.all(n.map(t=>t.data.meta().then(e=>e&&e.format===5?e:void 0,()=>{})))}async function or(n,t,e,i){let o=e,s=new Set,r=[],a=async(L,x)=>{if(!s.has(L))try{return await x()}catch(y){s.add(L),r.push({source:L,error:y});return}},l=t.flatMap((L,x)=>e[x]?[x]:[]),c=[];await Promise.all(l.map(async L=>c[L]=await a(L,()=>zi(n,o[L],t[L].data))??new Set));let d=[],u=[],h=(L,x)=>Promise.all(l.map(y=>a(y,()=>Vi(L,o[y],t[y].data,x)))),m=L=>L.every((x,y)=>!(x!=null&&x.docs.size)||s.has(l[y]));for(let L of n.groups){let x=await h(L,!1);u.push(m(x)),u[u.length-1]&&(x=await h(L,!0)),d.push(x)}for(let[L,x]of n.groups.entries())u[L]||!m(d[L])||(x.corrected=void 0,d[L]=await h(x,!0));if(l.length&&l.every(L=>s.has(L)))throw r[0].error;let b=l.filter(L=>!s.has(L)),g=[];for(let L of b)g[L]=qi(n,o[L]);let w=(L,x)=>L.map(y=>({...y,source:x,score:y.score*sr(t[x])})),f=L=>({results:rr(L,t),failed:[...s].sort((x,y)=>x-y),errors:r});if(!n.groups.length)return f(b.flatMap(L=>w($i(o[L],c[L],g[L]),L)).sort(Me));let v=t.map(()=>[]),E=b.reduce((L,x)=>L+o[x].count,0);n.groups.forEach((L,x)=>{let y=d[x],X=l.flatMap((S,O)=>s.has(S)?[]:[[S,y[O]]]),z=[...new Set(X.flatMap(([,S])=>S.corrected))];L.corrected=z.length?z:void 0;let U=X.reduce((S,[,O])=>S+O.docs.size,0);for(let[S,O]of X)v[S].push(ji(O,i.stats==="own"?un(o[S].count,O.docs.size):un(E,U)))});let C=L=>b.flatMap(x=>w(dn(v[x],o[x],c[x],g[x],L),x)).sort(Me),I=C("and");return f(I.length||n.strict?I:C("or"))}function sr(n){return typeof n.boost=="number"&&Number.isFinite(n.boost)&&n.boost>=0?n.boost:1}function rr(n,t){let e=new Map,i=[];for(let o of n){let s=t[o.source].collapse;if(s===void 0){i.push(o);continue}let r=`${s}\\0${o.url}`,a=e.get(r);a?(a.others??(a.others=[])).push({source:o.source,id:o.id,url:o.url,score:o.score}):(e.set(r,o),i.push(o))}return i}async function Qi(n,t,e=10,i={}){let o=await ir(t),s=Bt(n,{facets:fn(o)}),r=t.flatMap((u,h)=>o[h]?[]:[h]);for(let u of new Set(o.flatMap(h=>h?[h.lang]:[]))){let h=ge(u);h&&(s.highlight=[...new Set([...s.highlight,...s.highlight.map(h).filter(m=>m.length>=3)])])}let{results:a,failed:l,errors:c}=await or(s,t,o,i);for(let u of l)r.includes(u)||r.push(u);r.sort((u,h)=>u-h),s.highlight=[...new Set([...s.highlight,...s.groups.flatMap(u=>u.corrected??[])])];let d=Ki(a,u=>o[u.source]);return{parsed:s,results:await Gi(s,a,u=>t[u.source].data,e),missing:r,facets:d,errors:c}}function pn(n,t,e=globalThis){var m,b;let i=((m=e.document)==null?void 0:m.baseURI)??((b=e.location)==null?void 0:b.href),o=_i(n,i),s=e.__DOGSBAY_SEARCH__??{q:[],load(){}},r=s.stores??(s.stores=new Map),a=r.get(o)??new Map;r.set(o,a);let l=(g,w,f)=>{let v;if(f){let E="",C=_i(f,i);for(let I of r.keys())C.startsWith(I)&&I.length>E.length&&(E=I);v=E?r.get(E):void 0}!v&&r.size===1&&(v=a),v?v.set(g,w):s.q.push([g,w,f])},c=s.q;s.q=[],s.load=l;for(let[g,w,f]of c)l(g,w,f);e.__DOGSBAY_SEARCH__=s;let d=async(g,w)=>(a.has(g)||await t(n+w),a.get(g)),u,h={meta:()=>u??(u=d(Oe.docs,Te.docs).then(g=>{if(!g||g.format!==5)throw new Error(`search index format ${(g==null?void 0:g.format)??"missing"}, expected ${5}: rebuild the site`);return g}).catch(g=>{throw u=void 0,g})),shard:async g=>(await h.meta()).shards.includes(g)?d(Oe.shard(g),Te.shard(g)):void 0,fragment:g=>d(Oe.fragment(g),Te.fragment(g))};return h}function _i(n,t){try{return new URL(n,t).href}catch{return n}}function Ji(n){let t,e=new URL(n||"./",location.href).pathname;return async i=>{t??(t=import(new URL(`${n}pagefind/pagefind.js`,location.href).href).catch(u=>{throw t=void 0,u}));let o=i.replace(new RegExp(\'(?<!\\\\S)-?(tag|section):("[^"]*"?|\\\\S*)\',"gi")," ").trim(),s=o?await(await t).search(o):null,r=(s==null?void 0:s.results)??[],a=async(u,h)=>{let m=await u.data(),b=m.url.startsWith(e)?m.url.slice(e.length):m.url.replace(/^\\/+/,""),g=(m.sub_results??[]).map(w=>[w.title,w.url.split("#")[1]??""]).filter(([,w])=>w);return{id:h,title:m.meta.title??b,url:b,section:"",score:r.length-h,fragment:[ar(m.excerpt),g],sections:g.slice(0,3)}},l=await Promise.all(r.slice(0,10).map(a)),c=Promise.all(r.slice(10,30).map((u,h)=>a(u,h+10)));return c.catch(()=>{}),{results:l,more:c,later:(u,h)=>Promise.all(r.slice(u,u+h).map((m,b)=>a(m,u+b))),total:r.length,highlight:Bt(i).highlight}}}function ar(n){return new DOMParser().parseFromString(n,"text/html").body.textContent??""}function to(n,t){let e=(n==null?void 0:n.units)??[],i=e.find(f=>f.prefix===t);if(!i)return{};let o=f=>f.product??"",s=f=>{var v;return((v=n==null?void 0:n.products)==null?void 0:v[f])??{versions:n==null?void 0:n.versions,defaultVersion:n==null?void 0:n.defaultVersion}},r=f=>{var v;return(v=s(o(f)).versions)==null?void 0:v.find(E=>E.id===f.version)},a=f=>{var v,E;return((E=(v=n==null?void 0:n.products)==null?void 0:v[f])==null?void 0:E.label)??(f||(n==null?void 0:n.name)||"")},l=f=>{var v;return[o(f)!==o(i)?a(o(f)):"",f.version!==void 0?((v=r(f))==null?void 0:v.label)??f.version:""].filter(Boolean).join(" \\xB7 ")},c=f=>({prefix:f.prefix,product:o(f),label:l(f),own:f===i,versioned:f.version!==void 0}),d=e.filter(f=>f.locale===i.locale),u=s(o(i)),h=(u.versions??[]).map(f=>f.id),m=f=>{var v;return f===i?-2:f.version===u.defaultVersion?-1:(v=r(f))!=null&&v.prerelease?h.length+h.indexOf(f.version):h.indexOf(f.version)},b=d.filter(f=>{var v;return o(f)===o(i)&&f.version!==void 0&&(f===i||!((v=r(f))!=null&&v.hidden))}).sort((f,v)=>m(f)-m(v)),g=[];for(let f of d){let v=o(f);if(g.some(I=>o(I)===v))continue;if(v===o(i)){g.push(i);continue}let E=d.filter(I=>o(I)===v),C=s(v).defaultVersion;g.push(E.find(I=>I.version===C)??E.find(I=>{var L;return!((L=r(I))!=null&&L.hidden)})??E[0])}let w={};return b.length>1&&(w.versions=b.map(c)),g.length>1&&(w.products=g.map(c)),(w.versions||w.products)&&(w.version=[c(i)]),w}var eo=1.5;function no(n,t){var s,r;let e={},i=(s=n.docs[t])==null?void 0:s[3];i!=null&&i.length&&(e.tag=i.map(a=>n.tags[a]).filter(a=>typeof a=="string"));let o=(r=n.docs[t])==null?void 0:r[4];return!o||!n.facets||n.facets.forEach((a,l)=>{let c=o[l];c!=null&&c.length&&(e[a.name]=c.map(d=>a.values[d]).filter(d=>typeof d=="string"))}),e}var xt=n=>n.trim().toLowerCase();function io(n,t,e){for(let[i,o]of Object.entries(t)){if(i===e||!o.length)continue;let s=new Set((n[i]??[]).map(xt));if(!o.some(r=>s.has(xt(r))))return!1}return!0}function oo(n,t,e){return n.filter(i=>io(t(i),e))}function so(n,t,e,i){var s;let o={};for(let r of i){let a={},l=new Map;for(let c of n){let d=t(c);if(!((s=d[r])!=null&&s.length)||!io(d,e,r))continue;let u=new Set;for(let h of d[r]){if(u.has(xt(h)))continue;u.add(xt(h));let m=l.get(xt(h))??(l.set(xt(h),h),h);a[m]=(a[m]??0)+1}}for(let c of e[r]??[])l.has(xt(c))||(a[c]=0);Object.keys(a).length&&(o[r]=a)}return o}function ro(n,t){let e={};for(let i of n.getAll("filter")){let o=i.indexOf(":");if(o<=0)continue;let s=i.slice(0,o),r=i.slice(o+1);!t.includes(s)||!r||(e[s]??(e[s]=[])).some(a=>xt(a)===xt(r))||e[s].push(r)}return e}function lr(n,t,e){var s;if(n.length===0)return"";let i=n.join("/"),o=e==null?void 0:e[i];if(o&&o.length>0)return o;if(n.length===1){let r=(s=t==null?void 0:t[n[0]])==null?void 0:s.label;if(r&&r.length>0)return r}return n[n.length-1]}function ao(n){if(!n)return{};let t={};for(let[e,i]of Object.entries(n)){let o=cr(Object.entries(i).map(([s,r])=>({value:s,count:r})));o.length>0&&(t[e]=o)}return t}function cr(n){return[...n].sort((t,e)=>t.count!==e.count?e.count-t.count:t.value.localeCompare(e.value))}function ne(n,t,e){let i=e==null?void 0:e[n],o=t.split("/").filter(s=>s.length>0);return lr(o,i==null?void 0:i.prefixes,i==null?void 0:i.labels)}function lo(n,t){let e=i=>{var s;let o=(s=t==null?void 0:t[i])==null?void 0:s.order;return typeof o=="number"?o:void 0};return[...n].sort((i,o)=>{let s=e(i),r=e(o);return s!==void 0&&r!==void 0?s!==r?s-r:i.localeCompare(o):s!==void 0?-1:r!==void 0?1:i.localeCompare(o)})}function co(n,t,e){let i={...n},o=i[t]??[];if(o.includes(e)){let s=o.filter(r=>r!==e);s.length===0?delete i[t]:i[t]=s}else i[t]=[...o,e];return i}function uo(n){let t=0;for(let e of Object.values(n))t+=e.length;return t}function ho(n,t,e={}){if(t.length===0)return[];if(t.some(o=>o.value.includes("/"))){let o=e.nav?ur(e.nav,new Set(t.map(s=>s.value))):void 0;return dr(n,t,e.display,o)}return hr(n,t,e.nav,e.display)}function dr(n,t,e,i){let o=new Map,s=[];for(let c of t){let d=c.value.split("/").filter(m=>m.length>0);if(d.length===0)continue;let u="",h=null;for(let m=0;m<d.length;m++){u=u?`${u}/${d[m]}`:d[m];let b=o.get(u);b||(b={value:u,label:ne(n,u,e),count:0,depth:m,hasValue:!1,children:[]},o.set(u,b),h?h.children.push(b):s.push(u)),m===d.length-1&&(b.count=c.count,b.hasValue=!0),h=b}}let r=(c,d)=>{if(i){let u=i.get(c.value),h=i.get(d.value);if(u!==void 0&&h!==void 0&&u!==h)return u-h;if(u!==void 0&&h===void 0)return-1;if(u===void 0&&h!==void 0)return 1}return c.count!==d.count?d.count-c.count:c.value.localeCompare(d.value)},a=c=>{if(c.children.length!==0){c.children.sort(r);for(let d of c.children)a(d)}},l=s.map(c=>o.get(c));l.sort(r);for(let c of l)a(c);return l}function ur(n,t){let e=new Map,i=0,o=s=>{for(let r of s){if(r.href){let a=fo(r.href);for(let l=0;l<a.length;l++){let c=a[l];if(!t.has(c))continue;let d="";for(let u=l;u<a.length;u++)d=d?`${d}/${a[u]}`:a[u],t.has(d)&&!e.has(d)&&e.set(d,i++);break}}r.children&&r.children.length>0&&o(r.children)}};return o(n),e}function hr(n,t,e,i){let o=new Map;for(let h of t)o.set(h.value,h);if(!e||e.length===0)return t.map(h=>({value:h.value,label:ne(n,h.value,i),count:h.count,depth:0,hasValue:!0,children:[]}));let s=new Set,r=[],a=new Map,l=h=>{if(h.length===0)return;let m=r,b=a;for(let g=0;g<h.length;g++){let w=h[g],f=b.get(w);if(!f){let E=o.get(w);f={value:w,label:ne(n,w,i),count:E?E.count:0,depth:g,hasValue:E!==void 0,children:[]},m.push(f),b.set(w,f),E&&s.add(w)}let v=c.get(f);v||(v=new Map,c.set(f,v)),m=f.children,b=v}},c=new Map,d=h=>{for(let m of h){if(m.href){let b=fo(m.href);l(b)}m.children&&m.children.length>0&&d(m.children)}};d(e);let u=[];for(let h of t)s.has(h.value)||u.push({value:h.value,label:ne(n,h.value,i),count:h.count,depth:0,hasValue:!0,children:[]});return u.sort((h,m)=>h.value.localeCompare(m.value)),[...r,...u]}function fo(n){let t=n;try{/^[a-z]+:\\/\\//i.test(n)&&(t=new URL(n).pathname)}catch{}t=t.split("#")[0].split("?")[0];let e=t.split("/").filter(i=>i.length>0);return e.length<2?[]:e.slice(0,-1)}var fr=6e4,pr=30,Ie=20,mr=["version","versions","products"];function mo(n){let{signal:t}=n,e=document.getElementById("db-search");if(!e)return;let i=e.querySelector("[data-db-search-input]"),o=e.querySelector("[data-part=\'listbox\']"),s=e.querySelector("[data-db-search-status]"),r=bo(n,{input:i,list:o,status:s,page:!1});e.addEventListener("db-dialog:open",()=>{i.focus(),i.select(),r.activate()},{signal:t}),document.addEventListener("keydown",a=>{let l=a.target.closest("input, textarea, select, [contenteditable]");if(a.key==="/"&&!l||a.key.toLowerCase()==="k"&&(a.metaKey||a.ctrlKey)){a.preventDefault();let c=document.querySelector("[data-db-search-page] [data-db-search-input]");c&&!e.open?c.focus():e.open?i.focus():e.show()}},{signal:t}),e.addEventListener("click",a=>{a.target.closest("a")&&e.close("api")},{signal:t})}function go(n){var d;let t=document.querySelector("[data-db-search-page]");if(!t)return;let e=t.querySelector("[data-db-search-input]"),i=t.querySelector("[data-db-search-list]"),o=t.querySelector("[data-db-search-status]"),s=gr(),r=s.get("p")||void 0,a=s.get("v")||void 0,l=s.get("scope")??(s.get("q")?"version":void 0),c=bo(n,{input:e,list:i,status:o,page:!0,params:s,scope:l,forward:r!==void 0||a!==void 0?{product:r,version:a}:void 0});(d=t.querySelector("form"))==null||d.addEventListener("submit",u=>u.preventDefault(),{signal:n.signal}),e.value=s.get("q")??"",c.activate(),e.value.trim()&&c.run()}function gr(){let n=new URLSearchParams(location.search);if(location.hash.includes("="))for(let[t,e]of new URLSearchParams(location.hash.slice(1)))n.has(t)||n.set(t,e);return n}var po=()=>!location.search&&location.hash.includes("=");function bo(n,{input:t,list:e,status:i,page:o,scope:s,forward:r,params:a}){var En;let{signal:l}=n,c=i.textContent??"",d=pn(`${n.unitRoot}_dogsbay/search/`,n.loadScript,window),u=document.body.dataset.search??"builtin",h=location.protocol!=="file:",m=u==="pagefind"||u==="both"&&h?Ji(n.unitRoot):void 0,b=u==="pagefind"&&!h,g=n.siteRoot??"",w=n.prefix??"",f={},v="version",E,C=`db-search-scope:${new URL(g||"./",location.href).pathname}`,I=()=>{let A=window.__DOGSBAY_SITE__;if(r&&A&&L(A)||(r=void 0,m))return;f=to(A,w);let T=s??mn(()=>sessionStorage.getItem(C)),k=v;T&&Object.prototype.hasOwnProperty.call(f,T)&&(v=T),Dt(),v!==k&&t.value.trim()&&jt(++$)},L=A=>{var j,W;let T=A.units??[],k=T.find(q=>q.prefix===w);if(!k)return!1;let N=r.product??k.product??"",M=T.filter(q=>q.locale===k.locale&&(q.product??"")===N),D=((W=(j=A.products)==null?void 0:j[N])==null?void 0:W.defaultVersion)??A.defaultVersion,H=r.version!==void 0?M.find(q=>q.version===r.version||q.prefix&&q.prefix.split("/").pop()===r.version):M.find(q=>q===k)??M.find(q=>q.version===D)??M[0];if(!H||H.prefix===w||!H.search)return!1;let P=new URLSearchParams(a);P.delete("p"),P.delete("v");let R=P.toString();return location.replace(`${y(H.prefix)}${H.search}${R?po()?`#${R}`:`?${R}`:""}`),!0},x=()=>E??(E=n.loadScript(`${g}_dogsbay/site.js`).then(I,I)),y=A=>`${g}${A?`${A}/`:""}`,X=new Map([[w,d]]),z=A=>{let T=X.get(A);return T||X.set(A,T=pn(`${y(A)}_dogsbay/search/`,n.loadScript,window)),T},U=new Map,S=((En=o?e.closest("[data-db-search-page]"):e.closest("dialog"))==null?void 0:En.querySelector("[data-db-search-facets]"))??void 0,O=(()=>{try{return JSON.parse(e.dataset.facets??"{}")}catch{return{}}})(),_=S?Object.keys(O):[],B=o&&a?ro(a,_):{},F=()=>{r&&x(),b?i.textContent=e.dataset.needsServer??"":m||(d.meta().catch(()=>i.textContent="Search index could not be loaded."),x())},$=0,K,J;t.addEventListener("input",()=>{clearTimeout(J),J=setTimeout(()=>void jt(++$),80)},{signal:l});let nt=new Map,it=typeof IntersectionObserver=="function"?new IntersectionObserver(A=>{var T;for(let k of A)k.isIntersecting&&((T=nt.get(k.target))==null||T(),nt.delete(k.target),it.unobserve(k.target))}):void 0,Kt=A=>{if(!o||r)return;let T=new URLSearchParams;A&&T.set("q",A),v!=="version"&&T.set("scope",v);for(let[M,D]of Object.entries(B))for(let H of D)T.append("filter",`${M}:${H}`);let k=T.toString(),N=po();mn(()=>history.replaceState(history.state,"",`${location.pathname}${k?N?`${location.search}#${k}`:`?${k}`:""}`))},jt=async A=>{let T=t.value.trim();if(Kt(T),!T){it==null||it.disconnect(),nt.clear(),rt.hidden=!0,S&&(S.hidden=!0),Rt=void 0,e.replaceChildren(),lt.hidden=at.hidden=!0,i.textContent=c;return}if(!b){Rt=void 0;try{if(m){let k=await m(T);if(A!==$)return;if(o){let N=await k.more;if(A!==$)return;ye(T,[...k.results,...N].slice(0,Ie),k.highlight,k.total,k.later)}else{ye(T,k.results,k.highlight,k.total);let N=await k.more;A===$&&N.length&&Ao(T,N,k.highlight)}}else if(v!=="version"&&f[v]){let k=Date.now(),N=f[v],M=N.filter(R=>R.own||k-(U.get(R.prefix)??-1/0)>fr),D=await Qi(T,M.map(R=>({data:z(R.prefix),boost:R.own?eo:1,collapse:R.product})));for(let R of D.missing)U.set(M[R].prefix,Date.now());if(A!==$)return;K=D.parsed;let H=D.results.map(R=>{var W;let j=M[R.source];return Object.assign(R,{base:y(j.prefix),from:j.own?void 0:j.label,also:(W=R.others)==null?void 0:W.map(q=>M[q.source].label).filter(Boolean),data:z(j.prefix)})}),P=D.missing.length+N.length-M.length;await ve(A,T,H,D.parsed.highlight,P?` \\xB7 ${(e.dataset.unavailable??"{n}").replace("{n}",String(P))}`:"")}else{let k=await Zi(T,d);if(A!==$)return;K=k.parsed,await ve(A,T,k.results,k.parsed.highlight,"")}}catch{if(A!==$)return;i.textContent="Search index could not be loaded.",S&&(S.hidden=!0)}}},rt=document.createElement("div");rt.setAttribute("role","group"),rt.setAttribute("aria-label",e.dataset.filterSection??"Filter by section"),rt.className=o?"flex flex-wrap gap-1 pb-3":"flex flex-wrap gap-1 px-3 pb-2",rt.hidden=!0,e.before(rt);let ot=document.createElement("div");ot.setAttribute("role","group"),ot.setAttribute("aria-label",e.dataset.scope??"Search in"),ot.className=o?"flex flex-wrap items-center gap-1 pb-3":"flex flex-wrap items-center gap-1 px-3 pb-2",ot.hidden=!0,rt.before(ot);let at=document.createElement("a");at.className="mx-3 mb-2 mt-1 block rounded-md px-3 py-2 text-center text-sm font-medium hover:bg-accent",at.dataset.dbSearchSeeAll="",at.hidden=!0;let lt=document.createElement("button");lt.type="button",lt.className="mt-4 rounded-md border px-3 py-1.5 text-sm hover:bg-accent",lt.textContent=e.dataset.more??"More results",lt.hidden=!0,e.after(o?lt:at);let Dt=()=>{var k,N;let A=mr.filter(M=>f[M]),T={version:((N=(k=f.version)==null?void 0:k[0])==null?void 0:N.versioned)===!1?e.dataset.scopeProduct:e.dataset.scopeVersion,versions:e.dataset.scopeVersions,products:e.dataset.scopeProducts};ot.replaceChildren(...A.map(M=>{let D=document.createElement("button");return D.type="button",D.dataset.scope=M,D.setAttribute("aria-pressed",String(M===v)),D.className="rounded-md border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",D.textContent=T[M]??M,D.addEventListener("click",()=>{var H;v!==M&&(v=M,mn(()=>sessionStorage.setItem(C,M)),Dt(),(H=ot.querySelector(`[data-scope="${M}"]`))==null||H.focus(),t.value.trim()?jt(++$):Kt(""))},{signal:l}),D})),ot.hidden=A.length<2};l==null||l.addEventListener("abort",()=>{clearTimeout(J),$++,it==null||it.disconnect(),nt.clear(),rt.remove(),ot.remove(),at.remove(),lt.remove()});let Vt=A=>A.replace(/"/g,""),$e=A=>`section:"${Vt(A)}"`,St,se=(A,T)=>{let k=new Map;for(let H of T)H.section&&k.set(H.section,(k.get(H.section)??0)+1);let N=[...A.matchAll(/section:"([^"]*)"/gi)].map(H=>H[1].toLowerCase()),M=H=>N.includes(Vt(H).toLowerCase()),D=[...k].sort((H,P)=>P[1]-H[1]).slice(0,6).map(([H])=>H);for(let H of N)D.some(P=>Vt(P).toLowerCase()===H)||D.push(H);rt.replaceChildren(...D.length>1||N.length?D.map(H=>{let P=document.createElement("button");P.type="button";let R=M(H);return P.setAttribute("aria-pressed",String(R)),P.className="rounded-full border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",P.textContent=H,P.addEventListener("click",()=>{let j=$e(H),W=t.value.replace(new RegExp(`\\\\s*section:"${Vt(H).replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}"`,"i"),"").trim();t.value=R?W:`${W} ${j}`.trim(),St=H,t.dispatchEvent(new Event("input",{bubbles:!0}))},{signal:l}),P}):[]),rt.hidden=!rt.childElementCount,St!==void 0&&(([...rt.querySelectorAll("button")].find(P=>P.textContent===St)??t).focus(),St=void 0)},Rt,ve=async(A,T,k,N,M)=>{if(!_.length){ye(T,k,N,k.length),i.textContent+=M;return}let D=new Map;for(let P of k){let R=P.data??d;D.has(R)||D.set(R,await R.meta())}if(A!==$)return;let H=new Map(k.map(P=>[P,no(D.get(P.data??d),P.id)]));Rt={q:T,results:k,terms:N,note:M,valuesOf:P=>H.get(P)??{}},Mt()},Mt=()=>{if(!Rt)return;let{q:A,results:T,terms:k,note:N,valuesOf:M}=Rt,D=oo(T,M,B);Be(so(T,M,B,_)),ye(A,D,k,D.length),i.textContent+=N},At,Be=A=>{var H,P;if(!S)return;let T=lo(Object.keys(A),O);if(S.hidden=!T.length,!T.length)return S.replaceChildren();let k=(R,j,W,q)=>{let V=document.createElement("label");V.className="flex cursor-pointer items-center gap-2 rounded-md px-2 py-1 hover:bg-accent";let tt=document.createElement("input");tt.type="checkbox",tt.dataset.facetName=R,tt.dataset.facetValue=j,tt.checked=(B[R]??[]).some(Co=>Co.toLowerCase()===j.toLowerCase()),tt.className="size-3.5 rounded border-border accent-primary";let bt=document.createElement("span");bt.className="flex-1 truncate",bt.textContent=W;let Ke=document.createElement("span");return Ke.className="text-xs text-muted-foreground",Ke.textContent=String(q),V.append(tt,bt,Ke),V},N=(R,j)=>{let W=document.createElement("ul");W.className="space-y-0.5";for(let q of j){let V=document.createElement("li");if(q.hasValue)V.append(k(R,q.value,q.label,q.count));else{let tt=document.createElement("span");tt.className="block px-2 py-1 text-muted-foreground",tt.textContent=q.label,V.append(tt)}if(q.children.length){let tt=N(R,q.children);tt.classList.add("ml-4"),V.append(tt)}W.append(V)}return W},M=[],D=uo(B);if(D){let R=document.createElement("button");R.type="button",R.dataset.clearFilters="",R.className="mb-3 w-full rounded-md border border-border px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",R.textContent=(e.dataset.facetsClear??"Clear all ({n})").replace("{n}",String(D)),M.push(R)}for(let R of T){let j=ao({[R]:A[R]})[R]??[],W=document.createElement("fieldset");W.className="mb-3";let q=document.createElement("legend");if(q.className="mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground",q.textContent=((H=O[R])==null?void 0:H.title)??R,W.append(q),(P=O[R])!=null&&P.hierarchical||j.some(V=>V.value.includes("/")))W.append(N(R,ho(R,j,{display:O})));else{let V=document.createElement("ul");V.className="space-y-0.5";for(let tt of j){let bt=document.createElement("li");bt.append(k(R,tt.value,ne(R,tt.value,O),tt.count)),V.append(bt)}W.append(V)}M.push(W)}S.replaceChildren(...M),At!==void 0&&(((At?[...S.querySelectorAll("input[data-facet-name]")].find(j=>`${j.dataset.facetName}\\0${j.dataset.facetValue}`===At):S.querySelector("[data-clear-filters]"))??t).focus(),At=void 0)};S==null||S.addEventListener("change",A=>{let T=A.target;if(!T.dataset.facetName)return;let k=T.dataset.facetName,N=T.dataset.facetValue,M=(B[k]??[]).find(D=>D.toLowerCase()===N.toLowerCase());B=co(B,k,M??N),At=`${k}\\0${N}`,Kt(t.value.trim()),Mt()},{signal:l}),S==null||S.addEventListener("click",A=>{A.target.closest("[data-clear-filters]")&&(B={},At="",Kt(t.value.trim()),Mt())},{signal:l});let ct,ye=(A,T,k,N,M)=>{it==null||it.disconnect(),nt.clear(),se(A,T);let D=T.slice(0,o?Ie:pr);if(ct={q:A,results:T,terms:k,shown:D.length,total:N,later:M},e.replaceChildren(...qe(A,D,k)),i.textContent=N?`${N} result${N===1?"":"s"}`:`${e.dataset.noResults} \\u201C${A}\\u201D`,lt.hidden=!o||!yn(),at.hidden=o||!N||!e.dataset.searchPage,!at.hidden){let H=new URLSearchParams({q:A});v!=="version"&&H.set("scope",v);for(let[P,R]of Object.entries(B))for(let j of R)H.append("filter",`${P}:${j}`);at.href=`${e.dataset.searchPage}?${H}`,at.textContent=(e.dataset.seeAll??"See all {n} results").replace("{n}",String(N))}},Ao=(A,T,k)=>e.append(...qe(A,T,k)),yn=()=>!!ct&&(ct.results.length>ct.shown||!!ct.later&&ct.shown<ct.total);lt.addEventListener("click",async()=>{var N,M;let A=ct;if(!A)return;let T=A.results.slice(A.shown,A.shown+Ie);if(!T.length&&A.later){if(T=await A.later(A.shown,Ie).catch(()=>[]),A!==ct)return;A.results.push(...T)}let k=qe(A.q,T,A.terms);e.append(...k),A.shown+=T.length,lt.hidden=!T.length||!yn(),(M=(N=k[0])==null?void 0:N.querySelector("a"))==null||M.focus()},{signal:l});let qe=(A,T,k)=>{var M;let N=[];for(let D of T){let H=D.base??n.unitRoot,P=wn(H,D.url,k,"block rounded-md p-3 hover:bg-accent"),R=document.createElement("div");R.className="font-medium",R.append(...gn(D.title,k)),P.a.appendChild(R);let j=[D.from,D.section].filter(Boolean).join(" \\xB7 ");if(j){let V=document.createElement("div");V.className="text-xs text-muted-foreground",V.textContent=j,P.a.appendChild(V)}let W=document.createElement("div");if(W.className="mt-1 line-clamp-2 text-xs text-muted-foreground",P.a.appendChild(W),(M=D.also)!=null&&M.length){let V=document.createElement("div");V.className="mt-1 text-xs text-muted-foreground",V.textContent=`${e.dataset.alsoIn??"Also in"} ${D.also.join(", ")}`,P.a.appendChild(V)}N.push(P.li);let q=()=>D.fragment?(D.fragment[0]&&W.replaceChildren(...gn(D.fragment[0],k)),(D.sections??[]).map(([V,tt])=>{let bt=wn(H,`${D.url}#${tt}`,k,"ml-4 block rounded-md border-l px-3 py-1.5 text-sm hover:bg-accent");return bt.a.append(...gn(V,k)),bt.li})):[];if(D.fragment)N.push(...q());else if(it){let V=K??Bt(A);nt.set(P.li,()=>void Xi(V,[D],D.data??d).then(()=>P.li.after(...q()),()=>{})),it.observe(P.li)}}return N},wn=(A,T,k,N)=>{let M=document.createElement("li");o||M.setAttribute("role","none"),M.className="mb-1";let D=document.createElement("a");return o||(D.setAttribute("data-part","option"),D.dataset.value=T,D.tabIndex=-1),D.href=br(A+T,k),D.className=N,M.appendChild(D),{li:M,a:D}};return{activate:F,run:()=>void jt(++$)}}function mn(n){try{return n()}catch{return}}function br(n,t){if(!t.length)return n;let e=n.indexOf("#"),[i,o]=e<0?[n,""]:[n.slice(0,e),n.slice(e)];return`${i}${i.includes("?")?"&":"?"}h=${encodeURIComponent(t.join(" "))}${o}`}function gn(n,t){if(!t.length)return[document.createTextNode(n)];let e=new RegExp(`(${t.map(i=>i.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")).join("|")})`,"gi");return n.split(e).map((i,o)=>{if(o%2===0)return document.createTextNode(i);let s=document.createElement("mark");return s.textContent=i,s})}var vo=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u;function yo(n){var g;let t;try{t=(new URLSearchParams(location.search).get("h")??"").split(/\\s+/).filter(w=>w.length>0)}catch{return}let e=document.querySelector("#db-content article")??document.querySelector("#db-content");if(!t.length||!e)return;let i=w=>w.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&"),o=[...t].sort((w,f)=>f.length-w.length),s=o.filter(w=>vo.test(w)).map(i),r=o.filter(w=>!vo.test(w)).map(i),a=[r.length?`(?<![\\\\p{L}\\\\p{N}])(?:${r.join("|")})`:"",s.length?`(?:${s.join("|")})`:""].filter(Boolean),l=new RegExp(`(${a.join("|")})`,"giu"),c=[],d=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:w=>{var f;return(f=w.parentElement)!=null&&f.closest("script, style, mark, button, [aria-hidden=\'true\']")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),u=[];for(let w=d.nextNode();w;w=d.nextNode())u.push(w);for(let w of u){if(c.length>=500)break;let f=w.data;if(l.lastIndex=0,!l.test(f))continue;l.lastIndex=0;let v=document.createDocumentFragment(),E=0;for(let C of f.matchAll(l)){v.append(f.slice(E,C.index));let I=document.createElement("mark");I.className="db-search-hl",I.textContent=C[0],v.append(I),c.push(I),E=C.index+C[0].length}v.append(f.slice(E)),w.replaceWith(v)}if(vr(),!c.length)return;let h=((g=document.querySelector("[data-clear-highlights]"))==null?void 0:g.dataset.clearHighlights)??"Clear highlights",m=document.createElement("div");m.className="not-prose mb-4";let b=document.createElement("button");b.type="button",b.className="inline-flex h-8 items-center rounded-md border px-3 text-sm hover:bg-accent",b.textContent=h,b.addEventListener("click",()=>{var w;for(let f of c)f.replaceWith(document.createTextNode(f.textContent??""));e.normalize(),m.remove(),(w=document.getElementById("db-content"))==null||w.focus({preventScroll:!0})},{signal:n}),m.append(b),e.prepend(m),location.hash||c[0].scrollIntoView({block:"center"})}function vr(){try{let n=new URL(location.href);n.searchParams.delete("h"),history.replaceState(history.state,"",n.toString())}catch{}}var qt=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},Ne=function(t){return t.tagName==="IMG"},yr=function(t){return NodeList.prototype.isPrototypeOf(t)},He=function(t){return t&&t.nodeType===1},wo=function(t){var e=t.currentSrc||t.src;return e.substr(-4).toLowerCase()===".svg"},Eo=function(t){try{return Array.isArray(t)?t.filter(Ne):yr(t)?[].slice.call(t).filter(Ne):He(t)?[t].filter(Ne):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(Ne):[]}catch{throw new TypeError(`The provided selector is invalid.\nExpects a CSS selector, a Node element, a NodeList or an array.\nSee: https://github.com/francoischalifour/medium-zoom`)}},wr=function(t){var e=document.createElement("div");return e.classList.add("medium-zoom-overlay"),e.style.background=t,e},Er=function(t){var e=t.getBoundingClientRect(),i=e.top,o=e.left,s=e.width,r=e.height,a=t.cloneNode(),l=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,c=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return a.removeAttribute("id"),a.style.position="absolute",a.style.top=i+l+"px",a.style.left=o+c+"px",a.style.width=s+"px",a.style.height=r+"px",a.style.transform="",a},ie=function(t,e){var i=qt({bubbles:!1,cancelable:!1,detail:void 0},e);if(typeof window.CustomEvent=="function")return new CustomEvent(t,i);var o=document.createEvent("CustomEvent");return o.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),o},xr=function n(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=window.Promise||function(S){function O(){}S(O,O)},o=function(S){var O=S.target;if(O===X){b();return}E.indexOf(O)!==-1&&g({target:O})},s=function(){if(!(I||!y.original)){var S=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(L-S)>x.scrollOffset&&setTimeout(b,150)}},r=function(S){var O=S.key||S.keyCode;(O==="Escape"||O==="Esc"||O===27)&&b()},a=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=S;if(S.background&&(X.style.background=S.background),S.container&&S.container instanceof Object&&(O.container=qt({},x.container,S.container)),S.template){var _=He(S.template)?S.template:document.querySelector(S.template);O.template=_}return x=qt({},x,O),E.forEach(function(B){B.dispatchEvent(ie("medium-zoom:update",{detail:{zoom:z}}))}),z},l=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return n(qt({},x,S))},c=function(){for(var S=arguments.length,O=Array(S),_=0;_<S;_++)O[_]=arguments[_];var B=O.reduce(function(F,$){return[].concat(F,Eo($))},[]);return B.filter(function(F){return E.indexOf(F)===-1}).forEach(function(F){E.push(F),F.classList.add("medium-zoom-image")}),C.forEach(function(F){var $=F.type,K=F.listener,J=F.options;B.forEach(function(nt){nt.addEventListener($,K,J)})}),z},d=function(){for(var S=arguments.length,O=Array(S),_=0;_<S;_++)O[_]=arguments[_];y.zoomed&&b();var B=O.length>0?O.reduce(function(F,$){return[].concat(F,Eo($))},[]):E;return B.forEach(function(F){F.classList.remove("medium-zoom-image"),F.dispatchEvent(ie("medium-zoom:detach",{detail:{zoom:z}}))}),E=E.filter(function(F){return B.indexOf(F)===-1}),z},u=function(S,O){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return E.forEach(function(B){B.addEventListener("medium-zoom:"+S,O,_)}),C.push({type:"medium-zoom:"+S,listener:O,options:_}),z},h=function(S,O){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return E.forEach(function(B){B.removeEventListener("medium-zoom:"+S,O,_)}),C=C.filter(function(B){return!(B.type==="medium-zoom:"+S&&B.listener.toString()===O.toString())}),z},m=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=S.target,_=function(){var F={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},$=void 0,K=void 0;if(x.container)if(x.container instanceof Object)F=qt({},F,x.container),$=F.width-F.left-F.right-x.margin*2,K=F.height-F.top-F.bottom-x.margin*2;else{var J=He(x.container)?x.container:document.querySelector(x.container),nt=J.getBoundingClientRect(),it=nt.width,Kt=nt.height,jt=nt.left,rt=nt.top;F=qt({},F,{width:it,height:Kt,left:jt,top:rt})}$=$||F.width-x.margin*2,K=K||F.height-x.margin*2;var ot=y.zoomedHd||y.original,at=wo(ot)?$:ot.naturalWidth||$,lt=wo(ot)?K:ot.naturalHeight||K,Dt=ot.getBoundingClientRect(),Vt=Dt.top,$e=Dt.left,St=Dt.width,se=Dt.height,Rt=Math.min(Math.max(St,at),$)/St,ve=Math.min(Math.max(se,lt),K)/se,Mt=Math.min(Rt,ve),At=(-$e+($-St)/2+x.margin+F.left)/Mt,Be=(-Vt+(K-se)/2+x.margin+F.top)/Mt,ct="scale("+Mt+") translate3d("+At+"px, "+Be+"px, 0)";y.zoomed.style.transform=ct,y.zoomedHd&&(y.zoomedHd.style.transform=ct)};return new i(function(B){if(O&&E.indexOf(O)===-1){B(z);return}var F=function it(){I=!1,y.zoomed.removeEventListener("transitionend",it),y.original.dispatchEvent(ie("medium-zoom:opened",{detail:{zoom:z}})),B(z)};if(y.zoomed){B(z);return}if(O)y.original=O;else if(E.length>0){var $=E;y.original=$[0]}else{B(z);return}if(y.original.dispatchEvent(ie("medium-zoom:open",{detail:{zoom:z}})),L=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,I=!0,y.zoomed=Er(y.original),document.body.appendChild(X),x.template){var K=He(x.template)?x.template:document.querySelector(x.template);y.template=document.createElement("div"),y.template.appendChild(K.content.cloneNode(!0)),document.body.appendChild(y.template)}if(y.original.parentElement&&y.original.parentElement.tagName==="PICTURE"&&y.original.currentSrc&&(y.zoomed.src=y.original.currentSrc),document.body.appendChild(y.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),y.original.classList.add("medium-zoom-image--hidden"),y.zoomed.classList.add("medium-zoom-image--opened"),y.zoomed.addEventListener("click",b),y.zoomed.addEventListener("transitionend",F),y.original.getAttribute("data-zoom-src")){y.zoomedHd=y.zoomed.cloneNode(),y.zoomedHd.removeAttribute("srcset"),y.zoomedHd.removeAttribute("sizes"),y.zoomedHd.removeAttribute("loading"),y.zoomedHd.src=y.zoomed.getAttribute("data-zoom-src"),y.zoomedHd.onerror=function(){clearInterval(J),console.warn("Unable to reach the zoom image target "+y.zoomedHd.src),y.zoomedHd=null,_()};var J=setInterval(function(){y.zoomedHd.complete&&(clearInterval(J),y.zoomedHd.classList.add("medium-zoom-image--opened"),y.zoomedHd.addEventListener("click",b),document.body.appendChild(y.zoomedHd),_())},10)}else if(y.original.hasAttribute("srcset")){y.zoomedHd=y.zoomed.cloneNode(),y.zoomedHd.removeAttribute("sizes"),y.zoomedHd.removeAttribute("loading");var nt=y.zoomedHd.addEventListener("load",function(){y.zoomedHd.removeEventListener("load",nt),y.zoomedHd.classList.add("medium-zoom-image--opened"),y.zoomedHd.addEventListener("click",b),document.body.appendChild(y.zoomedHd),_()})}else _()})},b=function(){return new i(function(S){if(I||!y.original){S(z);return}var O=function _(){y.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(y.zoomed),y.zoomedHd&&document.body.removeChild(y.zoomedHd),document.body.removeChild(X),y.zoomed.classList.remove("medium-zoom-image--opened"),y.template&&document.body.removeChild(y.template),I=!1,y.zoomed.removeEventListener("transitionend",_),y.original.dispatchEvent(ie("medium-zoom:closed",{detail:{zoom:z}})),y.original=null,y.zoomed=null,y.zoomedHd=null,y.template=null,S(z)};I=!0,document.body.classList.remove("medium-zoom--opened"),y.zoomed.style.transform="",y.zoomedHd&&(y.zoomedHd.style.transform=""),y.template&&(y.template.style.transition="opacity 150ms",y.template.style.opacity=0),y.original.dispatchEvent(ie("medium-zoom:close",{detail:{zoom:z}})),y.zoomed.addEventListener("transitionend",O)})},g=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=S.target;return y.original?b():m({target:O})},w=function(){return x},f=function(){return E},v=function(){return y.original},E=[],C=[],I=!1,L=0,x=e,y={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?x=t:(t||typeof t=="string")&&c(t),x=qt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},x);var X=wr(x.background);document.addEventListener("click",o),document.addEventListener("keyup",r),document.addEventListener("scroll",s),window.addEventListener("resize",b);var z={open:m,close:b,toggle:g,update:a,clone:l,attach:c,detach:d,on:u,off:h,getOptions:w,getImages:f,getZoomedImage:v};return z};function Sr(n,t){t===void 0&&(t={});var e=t.insertAt;if(!(!n||typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n))}}var Ar=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";Sr(Ar);var xo=xr;var Cr;function So(n){let t=document.body.dataset.imageZoom;if(!t)return;let e;try{e=JSON.parse(t)}catch{return}let i=[...document.querySelectorAll(\'img[data-zoomable="true"]\')];if(!i.length)return;let o=Cr??(Cr=xo());o.update(e),o.attach(...i),n==null||n.addEventListener("abort",()=>{o.close(),o.detach(...i)});let s={signal:n},r=!1,a=l=>l.key==="Enter"||l.key===" ";for(let l of i)l.alt&&(l.tabIndex=0,l.addEventListener("keydown",c=>{a(c)&&(c.preventDefault(),r=!0,o.open({target:l}))},s),l.addEventListener("medium-zoom:opened",()=>{let c=document.querySelector(".medium-zoom-image--opened");!r||!c||(c.tabIndex=-1,c.addEventListener("keydown",d=>{a(d)&&(d.preventDefault(),o.close())}),c.focus())},s),l.addEventListener("medium-zoom:closed",()=>{r&&l.focus(),r=!1},s))}function Fe(n){return!/^[\\x00-\\x20]*([a-z][a-z0-9+.-]*:|[\\\\/])/i.test(n.replace(/[\\t\\n\\r]/g,""))}var Pe=new Map,Lr=15e3;function bn(n){let t=Pe.get(n);if(!t){let e=new Promise((i,o)=>{let s=document.createElement("script");s.src=n;let r=setTimeout(()=>a(),Lr),a=()=>{clearTimeout(r),s.onload=s.onerror=null,Pe.get(n)===e&&Pe.delete(n),o(new Error(`could not load ${n}`))};s.onload=()=>{clearTimeout(r),i()},s.onerror=a,document.head.appendChild(s)});Pe.set(n,t=e)}return t}function kr(n){document.querySelectorAll("[data-component=\'theme-toggle\']").forEach(t=>{let e=()=>t.setAttribute("aria-pressed",String(document.documentElement.classList.contains("dark")));e(),t.addEventListener("click",()=>{let i=!document.documentElement.classList.contains("dark");document.documentElement.classList.toggle("dark",i);try{localStorage.setItem("theme",i?"dark":"light")}catch{}e()},{signal:n})})}function Tr(n){document.addEventListener("click",async t=>{var o,s,r,a;let e=t.target.closest("[data-copy-markdown]");if(!e)return;let i=(((o=document.getElementById("db-page-markdown"))==null?void 0:o.textContent)??"").replace(/<\\\\\\/(script)/gi,"</$1").replace(/<\\\\!--/g,"<!--");try{await navigator.clipboard.writeText(i);let l=(s=e.dataset).label??(s.label=e.textContent??"");e.textContent="Copied",clearTimeout(Number(e.dataset.timer)),e.dataset.timer=String(setTimeout(()=>e.textContent=l,1500))}catch{}(a=(r=e.closest("db-popover"))==null?void 0:r.close)==null||a.call(r,"close-press")},{signal:n})}function Or(n,t){let e=document.body.dataset.page??"index.html";document.querySelectorAll("select[data-db-switch]").forEach(i=>{i.addEventListener("change",async()=>{var a;let o=i.selectedOptions[0];if(!o||o.disabled||!o.hasAttribute("value"))return;let s=o.dataset.prefix??"",r=i.value;if(o.hasAttribute("data-link")){(Fe(r)||/^https?:\\/\\//i.test(r))&&(location.href=r);return}if(!(!Fe(r)||!Fe(s))){if(i.dataset.dbSwitch==="product"){location.href=r;return}try{let l=s?`${n}${s}/`:n;await bn(`${l}_dogsbay/pages.js`);let c=(a=window.__DOGSBAY_PAGES__)==null?void 0:a[s];location.href=c&&!c.includes(e)?`${l}index.html`:r}catch{location.href=r}}},{signal:t})})}function Dr(n){document.addEventListener("click",t=>{var i;let e=t.target.closest("a.db-anchor");!e||location.protocol==="file:"||(i=navigator.clipboard)==null||i.writeText(e.href).catch(()=>{})},{signal:n})}var be=new Map,ze=new Set;function _e(){for(let[n,t]of be)n.isConnected||(Tt(n),t.abort(),be.delete(n));for(let n of ze)n.isConnected||Tt(n)}function Rr(n,t){let e=EventTarget.prototype,i=e.addEventListener,o=0;e.addEventListener=function(s,r,a){o++;let l=typeof a=="object"?a.signal:void 0;i.call(this,s,r,typeof a=="object"?{...a,signal:l?AbortSignal.any([l,n]):n}:{capture:a===!0,signal:n})};try{t()}finally{e.addEventListener=i}return o}function Mr(){_e(),document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(n=>{if(be.has(n)||ze.has(n))return;let t=new AbortController;Rr(t.signal,()=>sn(n))?be.set(n,t):n.querySelector("[data-component=\'sidebar\']")&&ze.add(n)}),document.removeEventListener("keydown",_e),document.addEventListener("keydown",_e)}var oe;function vn(n={}){var a;oe==null||oe.unmount();let t=new AbortController,{signal:e}=t,i=document.body,o=i.dataset.unitRoot??"",s=i.dataset.siteRoot??"";if(n.nav!==void 0){window.__DOGSBAY_NAV__=n.nav;for(let l of document.querySelectorAll("db-nav-tree")){let c=l.querySelector(":scope > [data-part=\'list\']");c&&!c.querySelector("[data-part=\'item\']")&&((a=l.parentNode)==null||a.insertBefore(l,l.nextSibling))}}Mr(),n.theme!==!1&&kr(e),Tr(e),n.switchers!==!1&&Or(s,e),Dr(e),n.search!==!1&&(mo({unitRoot:o,siteRoot:s,prefix:i.dataset.prefix??"",loadScript:bn,signal:e}),go({unitRoot:o,siteRoot:s,prefix:i.dataset.prefix??"",loadScript:bn,signal:e})),yo(e),So(e);let r={unmount(){if(!e.aborted){t.abort();for(let l of[...be.keys(),...ze])Tt(l);_e(),oe===r&&(oe=void 0)}}};return oe=r}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>vn()):vn();})();\n';
|
|
22311
|
-
var CLIENT_FILE = "dogsbay-
|
|
22312
|
-
var SSG_VERSION = "0.2.0-beta.
|
|
22774
|
+
var CLIENT_JS = '/*! dogsbay-ssg site client (Apache-2.0). Third-party notices: THIRD-PARTY-NOTICES.txt */\n"use strict";(()=>{var Lo=Object.defineProperty;var ko=(n,t,e)=>t in n?Lo(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var m=(n,t,e)=>ko(n,typeof t!="symbol"?t+"":t,e);var Y=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(){}},To={"db-tabs":"block","db-accordion":"block","db-collapsible":"block","db-details-sheet":"block","db-card":"block","db-steps":"block","db-code-block":"block","db-link-button":"inline-block","db-dialog":"contents","db-popover":"inline-block","db-tooltip":"inline-block","db-select":"inline-block","db-combobox":"block","db-nav-tree":"block","db-toc":"block","db-announcement":"block"},xn="dogsbay-elements-display";function G(){if(typeof document>"u"||document.getElementById(xn))return;let n=Object.entries(To).map(([e,i])=>`:where(${e}){display:${i}}`).join(""),t=document.createElement("style");t.id=xn,t.textContent=n,document.head.prepend(t)}function Oo(n){return n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}function Ut(n,t,e){let i=t;do i+=e?-1:1;while(i>=0&&i<n.length&&Oo(n[i]));return i}var re=class{constructor(n,t,e={}){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=Ut(t,i,!1),o>=t.length&&(o=this.opts.loop?Ut(t,-1,!1):i)):this.isBackwardKey(n.key,e)?(o=Ut(t,i,!0),o<0&&(o=this.opts.loop?Ut(t,t.length,!0):i)):this.opts.homeEnd&&n.key==="Home"?o=Ut(t,-1,!1):this.opts.homeEnd&&n.key==="End"&&(o=Ut(t,t.length,!0)),o!==null&&(o<0||o>=t.length||o!==i&&(n.preventDefault(),t[i].setAttribute("tabindex","-1"),t[o].setAttribute("tabindex","0"),t[o].focus(),this.opts.onHighlightedIndexChange(o)))},this.container.addEventListener("keydown",this.keydownHandler))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(this.container.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null))}setActiveIndex(n,t){n.forEach((e,i)=>{e.setAttribute("tabindex",i===t?"0":"-1")})}isActive(){return this.active}};var Do=0;function Sn(n){return`${n}-${++Do}`}var An=class extends Y{constructor(){super(...arguments);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 l=r.id||Sn("db-tab");r.id=l;let c=this.panels.find(d=>d.dataset.value===a);if(c){c.setAttribute("role","tabpanel");let d=c.id||Sn("db-tabpanel");c.id=d,r.setAttribute("aria-controls",d),c.setAttribute("aria-labelledby",l)}}),this.nav=new re(t,"[data-part=\'trigger\']",{orientation:this.orientation,loop:!0,homeEnd:!0,onHighlightedIndexChange:()=>{var l;let r=document.activeElement,a=(l=r==null?void 0:r.dataset)==null?void 0:l.value;a&&this.select(a)}}),this.nav.activate();let i=this.getAttribute("default-value")||((s=this.triggers[0])==null?void 0:s.dataset.value)||"";if(this.syncKey){let r=localStorage.getItem(`db-tabs-sync:${this.syncKey}`);r&&this.triggers.some(a=>a.dataset.value===r)&&(i=r)}let o=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})))}};G();customElements.get("db-tabs")||customElements.define("db-tabs",An);var Ro=0;function Mo(n){return`${n}-${++Ro}`}var Cn=class{constructor(n,t,e={}){m(this,"trigger");m(this,"content");m(this,"_open",!1);m(this,"opts");this.trigger=n,this.content=t,this.opts=e;let i=Mo("base-collapsible");n.id||(n.id=`${i}-trigger`),t.id||(t.id=`${i}-content`),n.setAttribute("aria-controls",t.id),t.setAttribute("aria-labelledby",n.id),t.setAttribute("role","region"),n.setAttribute("aria-expanded","false"),n.addEventListener("click",()=>{n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"||this.toggle()})}get isOpen(){return this._open}toggle(){this._open?this.collapse():this.expand()}expand(){var n,t;this._open||(this._open=!0,this.trigger.setAttribute("aria-expanded","true"),this.content.hidden=!1,this.content.setAttribute("data-state","open"),(t=(n=this.opts).onToggle)==null||t.call(n,!0))}collapse(){var n,t;this._open&&(this._open=!1,this.trigger.setAttribute("aria-expanded","false"),this.content.hidden=!0,this.content.removeAttribute("data-state"),(t=(n=this.opts).onToggle)==null||t.call(n,!1))}};var Ln=class extends Y{constructor(){super(...arguments);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||"",l=o.hasAttribute("data-disabled");l&&(s.setAttribute("disabled",""),s.setAttribute("aria-disabled","true"));let c=new Cn(s,r,{onToggle:d=>{d?this.onItemExpanded(a):this.onItemCollapsed(a)}});return{el:o,value:a,collapsible:c,disabled:l}}).filter(Boolean),this.nav=new re(this,"[data-part=\'trigger\']",{orientation:"vertical",loop:!0,homeEnd:!0}),this.nav.activate(),this.items.forEach((o,s)=>{o.collapsible.trigger.setAttribute("tabindex",s===0?"0":"-1")}),e.forEach(o=>{let s=this.items.find(r=>r.value===o&&!r.disabled);s&&s.collapsible.expand()})}onItemExpanded(t){if(this.type==="single"){for(let i of this.openValues)if(i!==t){let o=this.items.find(s=>s.value===i);o&&o.collapsible.collapse()}}this.openValues.add(t);let e=this.items.find(i=>i.value===t);e&&e.el.setAttribute("data-state","open"),this.dispatchEvent(new CustomEvent("db-accordion:change",{detail:{value:t,open:!0,openValues:[...this.openValues]},bubbles:!0}))}onItemCollapsed(t){this.openValues.delete(t);let e=this.items.find(i=>i.value===t);e&&e.el.removeAttribute("data-state"),this.dispatchEvent(new CustomEvent("db-accordion:change",{detail:{value:t,open:!1,openValues:[...this.openValues]},bubbles:!0}))}};G();customElements.get("db-accordion")||customElements.define("db-accordion",Ln);var Io=0;function Q(n){return`${n}-${++Io}`}function vt(n,t){let e=n.localName;return Array.from(n.querySelectorAll(t)).filter(i=>i.closest(e)===n)}function Z(n,t){return vt(n,t)[0]??null}function Wt(n){if(!n||!n.hasAttribute("data-as-child"))return n;let t=n.firstElementChild;if(!t)return n;let e=n.getAttribute("data-part");return e&&t.setAttribute("data-part",e),t}function dt(n){return n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"||n.getAttribute("data-disabled")==="true"}function kn(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover=="function"}function Yt(n){if(n.hidden=!1,!kn())return"inline";n.hasAttribute("popover")||n.setAttribute("popover","manual"),n.style.inset="auto",n.style.margin="0";try{n.matches(":popover-open")||n.showPopover()}catch{return"inline"}return"top-layer"}function Gt(n){if(kn())try{n.matches(":popover-open")&&n.hidePopover()}catch{}n.hidden=!0}var No=\'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]\';function Tn(n){return Array.from(n.querySelectorAll(No)).filter(t=>!t.closest("[hidden]")&&!dt(t))}function On(n,t){let e=typeof n.getAnimations=="function"?n.getAnimations():[];if(!e.length)return t();Promise.all(e.map(i=>i.finished)).then(t,t)}function Xt(n){try{return decodeURIComponent(n)}catch{return n}}var Rn=class extends Y{constructor(){super(...arguments);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(Xt(i.hash.slice(1)));if(!(!o||!this.details.contains(o))){for(let a of this.details.querySelectorAll("db-details-sheet"))a.handledHash=null;this.show(o)}});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,Ho();let o=(((d=e.querySelector("[data-part=\'title\']"))==null?void 0:d.textContent)??e.textContent??"").trim(),s=document.createElement("dialog");s.className="db-sheet",s.id=Q("db-sheet");let r=document.createElement("h2");r.className="db-sheet-title",r.id=Q("db-sheet-title"),r.textContent=o,s.setAttribute("aria-labelledby",r.id);let a=document.createElement("button");a.type="button",a.className="db-sheet-close",a.setAttribute("aria-label",this.getAttribute("close-label")||"Close"),a.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>\',a.addEventListener("click",()=>s.close());let l=document.createElement("div");l.className="db-sheet-header",l.append(r,a);let c=document.createElement("div");c.className="db-sheet-body",s.append(l,c),this.append(s),this.dialog=s,this.body=c,e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-controls",s.id),e.setAttribute("aria-expanded","false"),this.setAttribute("data-state","closed")}connect(){this.dialog&&(this.summary.addEventListener("click",this.onSummaryClick),this.dialog.addEventListener("click",this.onDialogClick),this.dialog.addEventListener("close",this.onDialogClose),window.addEventListener("hashchange",this.onHash),document.addEventListener("click",this.onDocClick),queueMicrotask(()=>this.isConnected&&this.openForHash()))}disconnect(){this.dialog&&(this.dialog.open&&this.dialog.close(),this.restore(!1),this.summary.removeEventListener("click",this.onSummaryClick),this.dialog.removeEventListener("click",this.onDialogClick),this.dialog.removeEventListener("close",this.onDialogClose),window.removeEventListener("hashchange",this.onHash),document.removeEventListener("click",this.onDocClick))}show(t){var l;let{dialog:e,details:i,body:o}=this;if(!e||!i||!o||e.open)return;let s=Array.from(i.childNodes).filter(c=>c!==this.summary),r=s.filter(c=>c.nodeType===Node.ELEMENT_NODE),a=r.length===1&&s.every(c=>{var d;return c===r[0]||!((d=c.textContent)!=null&&d.trim())})?r[0]:null;this.source=a??i,this.moved=a?Array.from(a.childNodes):s,o.append(...this.moved),e.showModal(),this.summary.setAttribute("aria-expanded","true"),this.setAttribute("data-state","open"),t&&t!==i&&((l=t.scrollIntoView)==null||l.call(t,{block:"start"})),this.dispatchEvent(new CustomEvent("db-details-sheet:open",{bubbles:!0}))}close(){var t;(t=this.dialog)==null||t.close()}restore(t=!0){var e,i;this.source&&(this.source.append(...this.moved),this.source=null,this.moved=[],this.summary.setAttribute("aria-expanded","false"),this.setAttribute("data-state","closed"),t&&this.isConnected&&((i=(e=this.summary).checkVisibility)==null?void 0:i.call(e))!==!1&&this.summary.focus(),this.dispatchEvent(new CustomEvent("db-details-sheet:close",{bubbles:!0})))}openForHash(){let t=Xt(location.hash.slice(1));if(!t||!this.details||this.handledHash===location.hash||(this.handledHash=location.hash,this.open))return;let e=document.getElementById(t);e&&this.details.contains(e)&&this.show(e)}},Dn="dogsbay-details-sheet";function Ho(){if(document.getElementById(Dn))return;let n=document.createElement("style");n.id=Dn,n.textContent=["dialog.db-sheet{position:fixed;inset:0 0 0 auto;margin:0;height:100dvh;max-height:none;width:min(32rem,100vw);max-width:100vw;padding:0;border:0;border-left:1px solid var(--border);background:var(--background);color:var(--foreground);box-shadow:0 10px 15px -3px rgb(0 0 0/.1),0 4px 6px -4px rgb(0 0 0/.1);flex-direction:column}","dialog.db-sheet[open]{display:flex}","dialog.db-sheet::backdrop{background:rgb(0 0 0/.6)}",".db-sheet-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.5rem;border-bottom:1px solid var(--border)}","dialog.db-sheet h2.db-sheet-title{margin:0;padding:0;border:0;font-size:1.125rem;line-height:1.75rem;font-weight:600;scroll-margin:0}",".db-sheet-close{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:.375rem;background:transparent;color:var(--muted-foreground);cursor:pointer}",".db-sheet-close:hover{background:var(--accent,var(--muted));color:var(--foreground)}",".db-sheet-close:focus-visible{outline:2px solid var(--ring);outline-offset:2px}",".db-sheet-body{flex:1;overflow-y:auto;padding:1.5rem;font-size:.875rem;line-height:1.625}","dialog.db-sheet .db-sheet-body>:first-child{margin-top:0}","html:has(dialog.db-sheet[open]){overflow:hidden}","db-details-sheet>details>summary>span:last-child{transform:rotate(-90deg)}","@media (prefers-reduced-motion:no-preference){dialog.db-sheet[open]{animation:db-sheet-in .2s ease-out}dialog.db-sheet[open]::backdrop{animation:db-sheet-fade .2s ease-out}}","@keyframes db-sheet-in{from{transform:translateX(100%)}}","@keyframes db-sheet-fade{from{opacity:0}}"].join(""),document.head.append(n)}G();customElements.get("db-details-sheet")||customElements.define("db-details-sheet",Rn);var Mn=class extends Y{constructor(){super(...arguments);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)}};G();customElements.get("db-code-block")||customElements.define("db-code-block",Mn);var In=class extends Y{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 c,d;if(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)return;let e=document.activeElement;if(!e||!this.contains(e))return;let i=this.visibleRows(),o=e.closest("[data-part=\'row\']"),s=o?i.indexOf(o):-1;if(s<0)return;let r=o.closest("[data-part=\'item\']");this.ensurePrepared(r);let a=!!this.groupOf(r),l=u=>{var h;u&&(t.preventDefault(),(h=this.primary(u))==null||h.focus())};switch(t.key){case"ArrowDown":return l(i[s+1]);case"ArrowUp":return l(i[s-1]);case"Home":return l(i[0]);case"End":return l(i[i.length-1]);case"ArrowRight":if(!a)return;t.preventDefault(),this.isOpen(r)?l(this.visibleRows()[s+1]):this.setOpen(r,!0);return;case"ArrowLeft":{if(t.preventDefault(),a&&this.isOpen(r))return this.setOpen(r,!1);let u=(c=r.parentElement)==null?void 0:c.closest("[data-part=\'item\']");if(u&&this.contains(u)){let h=u.querySelector(":scope > [data-part=\'row\']");h&&((d=this.primary(h))==null||d.focus())}return}}})}setup(){for(let t of vt(this,"[data-part=\'item\']"))t.style.getPropertyValue("--db-level")||t.style.setProperty("--db-level",String(this.depthOf(t))),this.prepareItem(t)}depthOf(t){var i,o;let e=0;for(let s=(i=t.parentElement)==null?void 0:i.closest("[data-part=\'item\']");s&&this.contains(s);s=(o=s.parentElement)==null?void 0:o.closest("[data-part=\'item\']"))e++;return e}pathOf(t){var i,o;let e=[];for(let s=t;s&&this.contains(s);s=((i=s.parentElement)==null?void 0:i.closest("[data-part=\'item\']"))??null){let r=Array.from(((o=s.parentElement)==null?void 0:o.children)??[]).filter(a=>a.getAttribute("data-part")==="item");e.unshift(r.indexOf(s))}return e.join(".")}connect(){this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKey);for(let t of vt(this,"[data-part=\'group\'][data-lazy]")){let e=t.closest("[data-part=\'item\']");e&&this.isOpen(e)&&this.fill(t)}!this.fillEmpty()&&this.emptyList()&&document.readyState!=="complete"&&addEventListener("load",()=>this.isConnected&&this.fillEmpty()&&this.afterFill(),{once:!0}),this.afterFill()}afterFill(){this.hasAttribute("scroll-current")&&requestAnimationFrame(()=>this.revealCurrent())}emptyList(){let t=vt(this,"[data-part=\'list\']")[0];return t&&!t.querySelector("[data-part=\'item\']")?t:null}fillEmpty(){let t=this.emptyList(),e=this.data();if(!t||!e)return!1;t.replaceChildren(...this.build(e,""));let i=t,o=this.serverPath();for(let s of o!=null?o.split(".").map(Number):this.currentPath(e)){let r=Array.from(i.children).filter(l=>l.getAttribute("data-part")==="item")[s],a=r&&this.groupOf(r);if(!r||!a)break;a.hasAttribute("data-lazy")&&this.fill(a),this.apply(r,!0),i=a}return!0}serverPath(){var s;let t=(s=this.getAttribute("current-path"))==null?void 0:s.trim(),e=this.data();if(!t||!e||!/^\\d+(?:\\.\\d+)*$/.test(t))return null;let i=t.split(".").map(Number),o=e;for(let r of i){let a=o==null?void 0:o[r];if(!a)return null;o=a[2]}return i.join(".")}currentPath(t){let e=location.href.split("#")[0],i=o=>{for(let s=0;s<o.length;s++){let[,r,a,l]=o[s],c=r!=null&&!l?this.linkOf(r):null;if(c&&new URL(c.href,document.baseURI).href.split("#")[0]===e)return[s];let d=a!=null&&a.length?i(a):null;if(d)return[s,...d]}return null};return i(t)??[]}linkOf(t){let e=t.replace(/[\\u0000-\\u0020]/g,"");if(/^[a-z][a-z0-9+.-]*:/i.test(e)&&!/^(?:https?|mailto):/i.test(e))return null;let i=/^[a-z][a-z0-9+.-]*:|^\\/\\//i.test(e);return{href:i?t:(this.getAttribute("base")??"")+t,external:i}}disconnect(){this.removeEventListener("click",this.onClick),this.removeEventListener("keydown",this.onKey)}prepareItem(t){let e=t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'toggle\']");if(!e)return;let i=this.groupOf(t);i||(i=document.createElement("ul"),i.setAttribute("data-part","group"),i.dataset.lazy="",i.dataset.path=this.pathOf(t),i.hidden=!0,t.appendChild(i));let o=t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'link\']");o&&!e.hasAttribute("aria-label")&&!e.querySelector("[data-part=\'label\']")&&e.setAttribute("aria-label",(this.getAttribute("toggle-label")??"Toggle {label}").replace("{label}",()=>(o.getAttribute("aria-label")??o.textContent??"").trim())),this.getAttribute("chevron")!=="css"&&!e.querySelector("[data-part=\'chevron\']")&&e.insertAdjacentHTML("beforeend",Fo),i.id||(i.id=Q("db-nav-group")),e.setAttribute("aria-controls",i.id),e instanceof HTMLButtonElement&&!e.hasAttribute("type")&&(e.type="button");let s=e.getAttribute("aria-expanded")==="true"||t.getAttribute("data-state")==="open";this.apply(t,s)}ensurePrepared(t){let e=this.toggleOf(t);e&&!e.hasAttribute("aria-controls")&&this.prepareItem(t)}groupOf(t){return t.querySelector(":scope > [data-part=\'group\']")}toggleOf(t){return t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'toggle\']")}primary(t){return t.querySelector(":scope > [data-part=\'link\']")??t.querySelector(":scope > [data-part=\'toggle\']")}visibleRows(){return vt(this,"[data-part=\'row\']").filter(t=>!t.closest("[hidden]"))}isOpen(t){return t.getAttribute("data-state")==="open"}toggle(t){this.setOpen(t,!this.isOpen(t))}setOpen(t,e){let i=this.groupOf(t);!i||this.isOpen(t)===e||(e&&i.hasAttribute("data-lazy")&&this.fill(i),this.apply(t,e),this.dispatchEvent(new CustomEvent("db-nav-tree:toggle",{detail:{item:t,open:e},bubbles:!0})))}apply(t,e){let i=this.groupOf(t),o=this.toggleOf(t);i&&(i.hidden=!e),o==null||o.setAttribute("aria-expanded",String(e)),t.setAttribute("data-state",e?"open":"closed")}revealCurrent(){var s;let t=this.querySelector("[aria-current=\'page\']");if(!t)return;for(let r=t.closest("[data-part=\'item\']");r&&this.contains(r);r=((s=r.parentElement)==null?void 0:s.closest("[data-part=\'item\']"))??null)this.groupOf(r)&&!this.groupOf(r).contains(t)||this.groupOf(r)&&this.setOpen(r,!0);let e=Po(this);if(!e)return;let i=t.getBoundingClientRect(),o=e.getBoundingClientRect();(i.top<o.top||i.bottom>o.bottom)&&(e.scrollTop+=i.top-o.top-o.height/2+i.height/2)}data(){if(this.navData)return this.navData;let t=this.getAttribute("data-source"),e=t?globalThis[t]:void 0;return Array.isArray(e)?e:null}fill(t){let e=this.data(),i=t.dataset.path;if(!e||i==null)return;let o=e,s;for(let r of i.split(".").map(Number))s=o==null?void 0:o[r],o=s==null?void 0:s[2];s!=null&&s[2]&&(t.replaceChildren(...this.build(s[2],i)),t.removeAttribute("data-lazy"))}build(t,e){let i=this.getAttribute("toggle-label")??"Toggle {label}",o=location.href.split("#")[0],s=this.serverPath();return t.map(([r,a,l,c],d)=>{let u=e?`${e}.${d}`:String(d),h=document.createElement("li");h.setAttribute("data-part","item"),h.style.setProperty("--db-level",String(u.split(".").length-1));let p=document.createElement("div");p.setAttribute("data-part","row"),h.appendChild(p);let b=a!=null?this.linkOf(a):null;b||(a=null);let g=null;if(l!=null&&l.length)if(g=document.createElement("button"),g.type="button",g.setAttribute("data-part","toggle"),g.setAttribute("aria-expanded","false"),a!=null)g.setAttribute("aria-label",i.replace("{label}",()=>r));else{let f=document.createElement("span");f.setAttribute("data-part","label"),f.textContent=r,g.appendChild(f)}let w=this.getAttribute("toggle-position")==="end";if(g&&!w&&p.appendChild(g),a!=null){let f=document.createElement("a");f.setAttribute("data-part","link"),f.textContent=r,f.href=b.href,b.external&&(f.rel="noopener"),(s!=null?u===s:!c&&f.href.split("#")[0]===o)&&f.setAttribute("aria-current","page"),p.appendChild(f)}if(a==null&&!(l!=null&&l.length)){let f=document.createElement("span");f.setAttribute("data-part","label"),f.textContent=r,p.appendChild(f)}if(g&&w&&p.appendChild(g),l!=null&&l.length){let f=document.createElement("ul");f.setAttribute("data-part","group"),f.dataset.lazy="",f.dataset.path=u,f.hidden=!0,h.setAttribute("data-state","closed"),h.appendChild(f),this.prepareItem(h)}return h})}},Fo=\'<svg data-part="chevron" viewBox="0 0 24 24" width="16" height="16" aria-hidden="true" focusable="false"><path d="m9 18 6-6-6-6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>\';function Po(n){for(let t=n.parentElement;t;t=t.parentElement){let e=getComputedStyle(t).overflowY;if((e==="auto"||e==="scroll")&&t.scrollHeight>t.clientHeight)return t}return null}G();customElements.get("db-nav-tree")||customElements.define("db-nav-tree",In);var Nn=class extends Y{constructor(){super(...arguments);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=Xt(location.hash.slice(1));t&&this.headings.some(e=>e.id===t)&&this.setActive(t)})}slugOf(t){return t.getAttribute("data-toc-slug")??Xt(t.getAttribute("href").slice(1))}setup(){this.links=Array.from(this.querySelectorAll("a[href^=\'#\'], a[data-toc-link]"))}connect(){var e;if(this.headings=this.links.map(i=>document.getElementById(this.slugOf(i))).filter(i=>!!i),!this.headings.length)return;let t=Number(this.getAttribute("offset")??80);typeof IntersectionObserver<"u"&&(this.observer=new IntersectionObserver(i=>{var s;let o=i.find(r=>r.isIntersecting);if(o)return this.setActive(o.target.id);this.setActive(((s=this.lastAbove(t))==null?void 0:s.id)??null)},{rootMargin:`-${t}px 0px -70% 0px`,threshold:0}),this.headings.forEach(i=>this.observer.observe(i))),window.addEventListener("hashchange",this.onHash),window.addEventListener("scroll",this.onScroll,{passive:!0}),this.setActive(((e=this.lastAbove(t))==null?void 0:e.id)??this.headings[0].id)}disconnect(){var t;(t=this.observer)==null||t.disconnect(),this.observer=null,window.removeEventListener("hashchange",this.onHash),window.removeEventListener("scroll",this.onScroll)}lastAbove(t){let e=null;for(let i of this.headings)i.getBoundingClientRect().top<=t+20&&(e=i);return e}setActive(t){if(!(!t||t===this.active)){this.active=t;for(let e of this.links)this.slugOf(e)===t?(e.setAttribute("aria-current","location"),e.setAttribute("data-active","")):(e.removeAttribute("aria-current"),e.removeAttribute("data-active"));this.dispatchEvent(new CustomEvent("db-toc:change",{detail:{id:t},bubbles:!0}))}}};G();customElements.get("db-toc")||customElements.define("db-toc",Nn);var _o=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",\'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)\',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Ve=_o.join(","),Pn=typeof Element>"u",ae=Pn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,we=!Pn&&Element.prototype.getRootNode?function(n){var t;return n==null||(t=n.getRootNode)===null||t===void 0?void 0:t.call(n)}:function(n){return n==null?void 0:n.ownerDocument},Ee=function(t,e){var i;e===void 0&&(e=!0);var o=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),s=o===""||o==="true",r=s||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Ee(t.parentNode));return r},zo=function(t){var e,i=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return i===""||i==="true"},$o=function(t,e,i){if(Ee(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ve));return e&&ae.call(t,Ve)&&o.unshift(t),o=o.filter(i),o},je=function(t,e,i){for(var o=[],s=Array.from(t);s.length;){var r=s.shift();if(!Ee(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),l=a.length?a:r.children,c=je(l,!0,i);i.flatten?o.push.apply(o,c):o.push({scopeParent:r,candidates:c})}else{var d=ae.call(r,Ve);d&&i.filter(r)&&(e||!t.includes(r))&&o.push(r);var u=r.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(r),h=!Ee(u,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(r));if(u&&h){var p=je(u===!0?r.children:u.children,!0,i);i.flatten?o.push.apply(o,p):o.push({scopeParent:r,candidates:p})}else s.unshift.apply(s,r.children)}}return o},_n=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},zn=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||zo(t))&&!_n(t)?0:t.tabIndex},Bo=function(t,e){var i=zn(t);return i<0&&e&&!_n(t)?0:i},qo=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},$n=function(t){return t.tagName==="INPUT"},Ko=function(t){return $n(t)&&t.type==="hidden"},Vo=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return e},jo=function(t,e){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===e)return t[i]},Uo=function(t){if(!t.name)return!0;var e=t.form||we(t),i=function(a){return e.querySelectorAll(\'input[type="radio"][name="\'+a+\'"]\')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=i(window.CSS.escape(t.name));else try{o=i(t.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var s=jo(o,t.form);return!s||s===t},Wo=function(t){return $n(t)&&t.type==="radio"},Yo=function(t){return Wo(t)&&!Uo(t)},Go=function(t){var e,i=t&&we(t),o=(e=i)===null||e===void 0?void 0:e.host,s=!1;if(i&&i!==t){var r,a,l;for(s=!!((r=o)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,d,u;i=we(o),o=(c=i)===null||c===void 0?void 0:c.host,s=!!((d=o)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(o))}}return s},Hn=function(t){var e=t.getBoundingClientRect(),i=e.width,o=e.height;return i===0&&o===0},Xo=function(t,e){var i=e.displayCheck,o=e.getShadowRoot;if(i==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}var r=getComputedStyle(t),a=r.visibility;if(a==="hidden"||a==="collapse")return!0;var l=ae.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(ae.call(c,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="full-native"||i==="legacy-full"){if(typeof o=="function"){for(var d=t;t;){var u=t.parentElement,h=we(t);if(u&&!u.shadowRoot&&o(u)===!0)return Hn(t);t.assignedSlot?t=t.assignedSlot:!u&&h!==t.ownerDocument?t=h.host:t=u}t=d}if(Go(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return Hn(t);return!1},Qo=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var i=0;i<e.children.length;i++){var o=e.children.item(i);if(o.tagName==="LEGEND")return ae.call(e,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}e=e.parentElement}return!1},Zo=function(t,e){return!(e.disabled||Ko(e)||Xo(e,t)||Vo(e)||Qo(e))},Fn=function(t,e){return!(Yo(e)||zn(e)<0||!Zo(t,e))},Jo=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Bn=function(t){var e=[],i=[];return t.forEach(function(o,s){var r=!!o.scopeParent,a=r?o.scopeParent:o,l=Bo(a,r),c=r?Bn(o.candidates):a;l===0?r?e.push.apply(e,c):e.push(a):i.push({documentOrder:s,tabIndex:l,item:o,isScope:r,content:c})}),i.sort(qo).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(e)},Ue=function(t,e){e=e||{};var i;return e.getShadowRoot?i=je([t],e.includeContainer,{filter:Fn.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Jo}):i=$o(t,e.includeContainer,Fn.bind(null,e)),Bn(i)};var We=class{constructor(n,t={}){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=Ue(this.root);if(t.length===0){n.preventDefault();return}let e=t[0],i=t[t.length-1];n.shiftKey?document.activeElement===e&&(i.focus(),n.preventDefault()):document.activeElement===i&&(e.focus(),n.preventDefault())},document.addEventListener("keydown",this.keydownHandler),requestAnimationFrame(()=>{var t;if(!this.active)return;let n=Ue(this.root);this.opts.initialFocus instanceof HTMLElement&&this.root.contains(this.opts.initialFocus)?this.opts.initialFocus.focus():this.opts.initialFocus==="container"?(this.root.hasAttribute("tabindex")||this.root.setAttribute("tabindex","-1"),this.root.focus()):(t=n[0])==null||t.focus()}))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(document.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null),this.opts.returnFocus&&this.previouslyFocused&&document.contains(this.previouslyFocused)&&this.previouslyFocused.focus(),this.previouslyFocused=null)}isActive(){return this.active}};var et,It=(et=class{static activate(){if(et.count++,et.count>1)return;let t=window.innerWidth-document.documentElement.clientWidth;et.originalStyles={overflow:document.body.style.overflow,paddingRight:document.body.style.paddingRight},document.body.style.overflow="hidden",t>0&&(document.body.style.paddingRight=`${t}px`)}static deactivate(){et.count=Math.max(0,et.count-1),!(et.count>0)&&et.originalStyles&&(document.body.style.overflow=et.originalStyles.overflow,document.body.style.paddingRight=et.originalStyles.paddingRight,et.originalStyles=null)}static reset(){et.count=0,et.originalStyles=null}},m(et,"count",0),m(et,"originalStyles",null),et);var yt=[];function ts(n){if(n.key!=="Escape"||yt.length===0)return;let t=yt[yt.length-1];t.escapePrevented||(n.preventDefault(),n.stopPropagation(),t.opts.onDismiss("escape-key"))}var qn=!1;function es(){qn||(qn=!0,document.addEventListener("keydown",ts))}var Nt=class{constructor(n,t){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&&(es(),yt.push(this)),this.opts.outsidePress&&(this.outsideHandler=n=>{if(yt.length>0&&yt[yt.length-1]!==this)return;let t=n.target;if(this.root.contains(t))return;let e=this.root.id;if(e){let o=document.querySelector(`[aria-controls="${e}"]`);if(o!=null&&o.contains(t))return}let i=this.root.getAttribute("aria-labelledby");if(i){let o=document.getElementById(i);if(o!=null&&o.contains(t))return}typeof this.opts.outsidePress=="function"&&!this.opts.outsidePress(n)||this.opts.onDismiss("outside-press")},this.frameId=requestAnimationFrame(()=>{this.frameId=null,this.outsideHandler&&document.addEventListener("pointerdown",this.outsideHandler)})))}deactivate(){if(!this.active)return;this.active=!1;let n=yt.indexOf(this);n!==-1&&yt.splice(n,1),this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null),this.outsideHandler&&(document.removeEventListener("pointerdown",this.outsideHandler),this.outsideHandler=null)}isActive(){return this.active}};function Ye(n){let t=[],e=n;for(;e&&e!==document.body;){let i=e.parentElement;if(!i)break;for(let o=0;o<i.children.length;o++){let s=i.children[o];if(s===e||s.contains(n))continue;let r=s.tagName;if(r==="SCRIPT"||r==="STYLE"||r==="LINK")continue;let a=s.getAttribute("aria-hidden");a!=="true"&&(t.push({el:s,prev:a}),s.setAttribute("aria-hidden","true"))}e=i}return()=>{for(let{el:i,prev:o}of t)o===null?i.removeAttribute("aria-hidden"):i.setAttribute("aria-hidden",o)}}var Kn=class extends Y{constructor(){super(...arguments);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=Z(this,"[data-part=\'content\']"),!this.content)return;this.native=typeof HTMLDialogElement<"u"&&this.content instanceof HTMLDialogElement&&typeof this.content.showModal=="function",this.backdrop=Z(this,"[data-part=\'backdrop\']"),this.trigger=Wt(Z(this,"[data-part=\'trigger\']"));let t=this.content;t.id||(t.id=Q("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=Q("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=Q("db-dialog-desc")),t.setAttribute("aria-describedby",i.id));for(let o of this.triggers())this.prepareTrigger(o);this.setState("closed"),this.native||(this.focusTrap=new We(t),this.dismiss=new Nt(t,{onDismiss:o=>this.dismissible&&this.close(o)}))}connect(){var t;this.content&&((t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),this.addEventListener("click",this.onHostClick),document.addEventListener("click",this.onDocumentClick),this.native&&(this.content.addEventListener("cancel",this.onCancel),this.content.addEventListener("click",this.onNativeClick),this.content.addEventListener("close",this.onNativeClose)),queueMicrotask(()=>{if(this.isConnected){for(let e of this.triggers())e.hasAttribute("aria-controls")||this.prepareTrigger(e);this.hasAttribute("open")&&!this._open&&this.show()}}))}disconnect(){var t;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),this.removeEventListener("click",this.onHostClick),document.removeEventListener("click",this.onDocumentClick),this.content&&this.native&&(this.content.removeEventListener("cancel",this.onCancel),this.content.removeEventListener("click",this.onNativeClick),this.content.removeEventListener("close",this.onNativeClose)),this._open&&this.finishClose("api",!1)}triggers(){var i;let t=this.trigger?[this.trigger]:[],e=[this.id,(i=this.content)==null?void 0:i.id].filter(Boolean);for(let o of e)document.querySelectorAll(`[data-dialog-for="${CSS.escape(o)}"]`).forEach(s=>t.push(s));return t}prepareTrigger(t){t.hasAttribute("aria-haspopup")||t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-controls",this.content.id),t.setAttribute("aria-expanded","false")}setState(t){var e,i;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t),(i=this.backdrop)==null||i.setAttribute("data-state",t)}toggle(t){this._open?this.close("trigger-press"):this.show(t)}show(t){var i,o;let e=this.content;if(!(!e||this._open)){this._open=!0,this.openedBy=t??document.activeElement??this.trigger;for(let s of this.triggers())this.prepareTrigger(s),s.setAttribute("aria-expanded","true");if(It.activate(),this.native){let s=e;s.open||s.showModal()}else e.hidden=!1,this.backdrop&&(this.backdrop.hidden=!1),this.cleanupInert=Ye(e),(i=this.focusTrap)==null||i.activate(),(o=this.dismiss)==null||o.activate();this.setState("open"),this.dispatchEvent(new CustomEvent("db-dialog:open",{bubbles:!0}))}}close(t="api"){this._open&&this.finishClose(t)}finishClose(t,e=!0){var s,r,a;let i=this.content;this._open=!1,this.setState("closed");for(let l of this.triggers())l.setAttribute("aria-expanded","false");if(It.deactivate(),this.native){let l=i;l.open&&l.close()}else(s=this.dismiss)==null||s.deactivate(),(r=this.focusTrap)==null||r.deactivate(),(a=this.cleanupInert)==null||a.call(this),this.cleanupInert=null,On(i,()=>{this._open||(i.hidden=!0,this.backdrop&&(this.backdrop.hidden=!0))});let o=this.openedBy;this.openedBy=null,e&&o&&document.contains(o)&&o.focus(),this.dispatchEvent(new CustomEvent("db-dialog:close",{detail:{reason:t},bubbles:!0}))}};G();customElements.get("db-dialog")||customElements.define("db-dialog",Kn);var Vn=class extends Y{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",Q("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||dt(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&&!dt(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&&!dt(t))}setup(){if(this.input=Z(this,"[data-part=\'input\']"),this.listbox=Z(this,"[data-part=\'listbox\']"),this.empty=Z(this,"[data-part=\'empty\']"),!this.input||!this.listbox)return;let{input:t,listbox:e}=this;e.id||(e.id=`${this.base}-listbox`),e.setAttribute("role","listbox"),t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-controls",e.id),t.setAttribute("autocomplete","off"),this.inline||(e.hidden=!0),this.prepareOptions(),this.syncExpanded()}prepareOptions(){this.options().forEach(t=>{t.id||(t.id=`${this.base}-option-${++this.optionSeq}`),t.setAttribute("role","option"),t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.matches("a[href], button")&&t.setAttribute("tabindex","-1"),t.querySelectorAll("a, button").forEach(e=>e.setAttribute("tabindex","-1")),t.parentElement&&t.parentElement!==this.listbox&&t.parentElement.localName==="li"&&!t.parentElement.hasAttribute("role")&&t.parentElement.setAttribute("role","none")})}connect(){let{input:t,listbox:e}=this;!t||!e||(t.addEventListener("input",this.onInput),t.addEventListener("focus",this.onFocus),t.addEventListener("keydown",this.onKey),e.addEventListener("click",this.onListClick),e.addEventListener("pointermove",this.onListPointer),e.addEventListener("mousedown",this.onListDown),document.addEventListener("pointerdown",this.onDocDown),typeof MutationObserver<"u"&&(this.observer=new MutationObserver(()=>this.onOptionsChanged()),this.observer.observe(e,{childList:!0,subtree:!0})))}disconnect(){var i;let{input:t,listbox:e}=this;t==null||t.removeEventListener("input",this.onInput),t==null||t.removeEventListener("focus",this.onFocus),t==null||t.removeEventListener("keydown",this.onKey),e==null||e.removeEventListener("click",this.onListClick),e==null||e.removeEventListener("pointermove",this.onListPointer),e==null||e.removeEventListener("mousedown",this.onListDown),document.removeEventListener("pointerdown",this.onDocDown),(i=this.observer)==null||i.disconnect(),this.observer=null}refresh(){this.onOptionsChanged()}onOptionsChanged(){this.prepareOptions(),this.highlighted&&!this.options().includes(this.highlighted)&&this.clearHighlight();let t=this.visible();this.filtering||(t.length||this.inline?this.show():this.hide(),t.length&&!this.highlighted&&!this.hasAttribute("no-autohighlight")&&this.highlight(t[0])),this.syncExpanded(),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count:t.length},bubbles:!0}))}filter(t){let e=t.toLowerCase().trim(),i=0;for(let s of this.options()){let r=!e||(s.textContent??"").toLowerCase().includes(e)||(s.dataset.value??"").toLowerCase().includes(e);s.hidden=!r,r&&i++}this.empty&&(this.empty.hidden=i>0||!e),this.clearHighlight(),i||e&&this.empty?this.show():this.hide();let o=this.visible();o.length&&!this.hasAttribute("no-autohighlight")&&this.highlight(o[0]),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count:i},bubbles:!0}))}syncExpanded(){if(!this.input)return;let t=this.inline?this.visible().length>0:this._open;this.input.setAttribute("aria-expanded",String(t)),this.setAttribute("data-state",t?"open":"closed")}show(){if(!this.listbox||this._open)return this.syncExpanded();this._open=!0,this.listbox.hidden=!1,this.syncExpanded()}hide(){if(this.listbox){if(this.clearHighlight(),!this._open)return this.syncExpanded();this._open=!1,this.inline||(this.listbox.hidden=!0),this.syncExpanded()}}highlight(t){var e,i,o;this.input&&((e=this.highlighted)==null||e.removeAttribute("data-highlighted"),(i=this.highlighted)==null||i.setAttribute("aria-selected","false"),this.highlighted=t,t.setAttribute("data-highlighted",""),t.setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",t.id),(o=t.scrollIntoView)==null||o.call(t,{block:"nearest"}))}clearHighlight(){var t,e,i;(t=this.highlighted)==null||t.removeAttribute("data-highlighted"),(e=this.highlighted)==null||e.setAttribute("aria-selected","false"),this.highlighted=null,(i=this.input)==null||i.removeAttribute("aria-activedescendant")}choose(t,e=!0){var a;let i=t.dataset.value??"",o=((a=t.textContent)==null?void 0:a.trim())??i,s=new CustomEvent("db-combobox:select",{detail:{value:i,text:o,option:t},bubbles:!0,cancelable:!0});if(!this.dispatchEvent(s))return!1;let r=t.matches("a[href]")?t:t.querySelector("a[href]");return r?(e&&r.click(),!0):(this.input&&(this.input.value=t.getAttribute("data-label")??o),this.inline||this.hide(),this.dispatchEvent(new CustomEvent("db-combobox:change",{detail:{value:i,text:o},bubbles:!0})),!0)}};G();customElements.get("db-combobox")||customElements.define("db-combobox",Vn);var Ct=Math.min,ut=Math.max,ce=Math.round,de=Math.floor,mt=n=>({x:n,y:n}),ns={left:"right",right:"left",bottom:"top",top:"bottom"};function Wn(n,t,e){return ut(n,Ct(t,e))}function Qt(n,t){return typeof n=="function"?n(t):n}function Lt(n){return n.split("-")[0]}function Zt(n){return n.split("-")[1]}function Ge(n){return n==="x"?"y":"x"}function Xe(n){return n==="y"?"height":"width"}function pt(n){let t=n[0];return t==="t"||t==="b"?"y":"x"}function Qe(n){return Ge(pt(n))}function Yn(n,t,e){e===void 0&&(e=!1);let i=Zt(n),o=Qe(n),s=Xe(o),r=o==="x"?i===(e?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=le(r)),[r,le(r)]}function Gn(n){let t=le(n);return[xe(n),t,xe(t)]}function xe(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}var jn=["left","right"],Un=["right","left"],is=["top","bottom"],os=["bottom","top"];function ss(n,t,e){switch(n){case"top":case"bottom":return e?t?Un:jn:t?jn:Un;case"left":case"right":return t?is:os;default:return[]}}function Xn(n,t,e,i){let o=Zt(n),s=ss(Lt(n),e==="start",i);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(xe)))),s}function le(n){let t=Lt(n);return ns[t]+n.slice(t.length)}function rs(n){var t,e,i,o;return{top:(t=n.top)!=null?t:0,right:(e=n.right)!=null?e:0,bottom:(i=n.bottom)!=null?i:0,left:(o=n.left)!=null?o:0}}function Qn(n){return typeof n!="number"?rs(n):{top:n,right:n,bottom:n,left:n}}function Ht(n){let{x:t,y:e,width:i,height:o}=n;return{width:i,height:o,top:e,left:t,right:t+i,bottom:e+o,x:t,y:e}}function Zn(n,t,e){let{reference:i,floating:o}=n,s=pt(t),r=Qe(t),a=Xe(r),l=Lt(t),c=s==="y",d=i.x+i.width/2-o.width/2,u=i.y+i.height/2-o.height/2,h=i[a]/2-o[a]/2,p;switch(l){case"top":p={x:d,y:i.y-o.height};break;case"bottom":p={x:d,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:u};break;case"left":p={x:i.x-o.width,y:u};break;default:p={x:i.x,y:i.y}}let b=Zt(t);return b&&(p[r]+=h*(b==="end"?1:-1)*(e&&c?-1:1)),p}async function Jn(n,t){var e;t===void 0&&(t={});let{x:i,y:o,platform:s,rects:r,elements:a,strategy:l}=n,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=Qt(t,n),b=Qn(p),w=a[h?u==="floating"?"reference":"floating":u],f=Ht(await s.getClippingRect({element:(e=await(s.isElement==null?void 0:s.isElement(w)))==null||e?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),v=u==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(E))&&await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1},I=Ht(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:E,strategy:l}):v);return{top:(f.top-I.top+b.top)/C.y,bottom:(I.bottom-f.bottom+b.bottom)/C.y,left:(f.left-I.left+b.left)/C.x,right:(I.right-f.right+b.right)/C.x}}var as=50,ti=async(n,t,e)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:Jn},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:n,floating:t,strategy:o}),{x:d,y:u}=Zn(c,i,l),h=i,p=0,b={};for(let g=0;g<s.length;g++){let w=s[g];if(!w)continue;let{name:f,fn:v}=w,{x:E,y:C,data:I,reset:L}=await v({x:d,y:u,initialPlacement:i,placement:h,strategy:o,middlewareData:b,rects:c,platform:a,elements:{reference:n,floating:t}});d=E??d,u=C??u,b[f]={...b[f],...I},L&&p<as&&(p++,typeof L=="object"&&(L.placement&&(h=L.placement),L.rects&&(c=L.rects===!0?await r.getElementRects({reference:n,floating:t,strategy:o}):L.rects),{x:d,y:u}=Zn(c,h,l)),g=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:b}};var ei=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(t){var e,i;let{placement:o,middlewareData:s,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...w}=Qt(n,t);if((e=s.arrow)!=null&&e.alignmentOffset)return{};let f=Lt(o),v=pt(a),E=Lt(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(c.floating)),I=h||(E||!g?[le(a)]:Gn(a)),L=b!=="none";!h&&L&&I.push(...Xn(a,g,b,C));let x=[a,...I],y=await l.detectOverflow(t,w),X=[],z=((i=s.flip)==null?void 0:i.overflows)||[];if(d&&X.push(y[f]),u){let _=Yn(o,r,C);X.push(y[_[0]],y[_[1]])}if(z=[...z,{placement:o,overflows:X}],!X.every(_=>_<=0)){var U,S;let _=(((U=s.flip)==null?void 0:U.index)||0)+1,B=x[_];if(B&&(!(u==="alignment"?v!==pt(B):!1)||z.every(K=>pt(K.placement)===v?K.overflows[0]>0:!0)))return{data:{index:_,overflows:z},reset:{placement:B}};let F=(S=z.filter($=>$.overflows[0]<=0).sort(($,K)=>$.overflows[1]-K.overflows[1])[0])==null?void 0:S.placement;if(!F)switch(p){case"bestFit":{var O;let $=(O=z.filter(K=>{if(L){let J=pt(K.placement);return J===v||J==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(J=>J>0).reduce((J,nt)=>J+nt,0)]).sort((K,J)=>K[1]-J[1])[0])==null?void 0:O[0];$&&(F=$);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};var ls=new Set(["left","top"]);async function cs(n,t){let{placement:e,platform:i,elements:o}=n,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=Lt(e),a=Zt(e),l=pt(e)==="y",c=ls.has(r)?-1:1,d=s&&l?-1:1,u=Qt(t,n),{mainAxis:h,crossAxis:p,alignmentAxis:b}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof b=="number"&&(p=a==="end"?b*-1:b),l?{x:p*d,y:h*c}:{x:h*c,y:p*d}}var ni=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(t){var e,i;let{x:o,y:s,placement:r,middlewareData:a}=t,l=await cs(t,n);return r===((e=a.offset)==null?void 0:e.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:r}}}}},ii=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(t){let{x:e,y:i,placement:o,platform:s}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:E,y:C}=v;return{x:E,y:C}}},...c}=Qt(n,t),d={x:e,y:i},u=await s.detectOverflow(t,c),h=pt(o),p=Ge(h),b=d[p],g=d[h],w=(v,E)=>Wn(E+u[v==="y"?"top":"left"],E,E-u[v==="y"?"bottom":"right"]);r&&(b=w(p,b)),a&&(g=w(h,g));let f=l.fn({...t,[p]:b,[h]:g});return{...f,data:{x:f.x-e,y:f.y-i,enabled:{[p]:r,[h]:a}}}}}};var oi=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(t){let{placement:e,rects:i,platform:o,elements:s}=t,{apply:r=()=>{},...a}=Qt(n,t),l=await o.detectOverflow(t,a),c=Lt(e),d=Zt(e),u=pt(e)==="y",{width:h,height:p}=i.floating,b,g;c==="top"||c==="bottom"?(b=c,g=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(g=c,b=d==="end"?"top":"bottom");let w=p-l.top-l.bottom,f=h-l.left-l.right,v=Ct(p-l[b],w),E=Ct(h-l[g],f),C=t.middlewareData.shift,I=!C,L=v,x=E;C!=null&&C.enabled.x&&(x=f),C!=null&&C.enabled.y&&(L=w),I&&!d&&(u?x=h-2*ut(l.left,l.right):L=p-2*ut(l.top,l.bottom)),await r({...t,availableWidth:x,availableHeight:L});let y=await o.getDimensions(s.floating);return h!==y.width||p!==y.height?{reset:{rects:!0}}:{}}}};function Se(){return typeof window<"u"}function Pt(n){return ri(n)?(n.nodeName||"").toLowerCase():"#document"}function st(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function gt(n){var t;return(t=(ri(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function ri(n){return Se()?n instanceof Node||n instanceof st(n).Node:!1}function ht(n){return Se()?n instanceof Element||n instanceof st(n).Element:!1}function wt(n){return Se()?n instanceof HTMLElement||n instanceof st(n).HTMLElement:!1}function si(n){return!Se()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof st(n).ShadowRoot}function ue(n){let{overflow:t,overflowX:e,overflowY:i,display:o}=ft(n);return/auto|scroll|overlay|hidden|clip/.test(t+i+e)&&o!=="inline"&&o!=="contents"}function ai(n){return/^(table|td|th)$/.test(Pt(n))}function he(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}var ds=/transform|translate|scale|rotate|perspective|filter/,us=/paint|layout|strict|content/,Ft=n=>!!n&&n!=="none",Ze;function Ae(n){let t=ht(n)?ft(n):n;return Ft(t.transform)||Ft(t.translate)||Ft(t.scale)||Ft(t.rotate)||Ft(t.perspective)||!Ce()&&(Ft(t.backdropFilter)||Ft(t.filter))||ds.test(t.willChange||"")||us.test(t.contain||"")}function li(n){let t=kt(n);for(;wt(t)&&!te(t);){if(Ae(t))return t;if(he(t))return null;t=kt(t)}return null}function Ce(){return Ze==null&&(Ze=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ze}function te(n){return/^(html|body|#document)$/.test(Pt(n))}function ft(n){return st(n).getComputedStyle(n)}function fe(n){return ht(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function kt(n){if(Pt(n)==="html")return n;let t=n.assignedSlot||n.parentNode||si(n)&&n.host||gt(n);return si(t)?t.host:t}function ci(n){let t=kt(n);return te(t)?(n.ownerDocument||n).body:wt(t)&&ue(t)?t:ci(t)}function Jt(n,t,e){var i;t===void 0&&(t=[]),e===void 0&&(e=!0);let o=ci(n),s=o===((i=n.ownerDocument)==null?void 0:i.body),r=st(o);if(s){let a=Le(r);return t.concat(r,r.visualViewport||[],ue(o)?o:[],a&&e?Jt(a):[])}else return t.concat(o,Jt(o,[],e))}function Le(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function hi(n){let t=ft(n),e=parseFloat(t.width)||0,i=parseFloat(t.height)||0,o=wt(n),s=o?n.offsetWidth:e,r=o?n.offsetHeight:i,a=ce(e)!==s||ce(i)!==r;return a&&(e=s,i=r),{width:e,height:i,$:a}}function tn(n){return ht(n)?n:n.contextElement}function ee(n){let t=tn(n);if(!wt(t))return mt(1);let e=t.getBoundingClientRect(),{width:i,height:o,$:s}=hi(t),r=(s?ce(e.width):e.width)/i,a=(s?ce(e.height):e.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}var hs=mt(0);function fi(n){let t=st(n);return!Ce()||!t.visualViewport?hs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fs(n,t,e){return t===void 0&&(t=!1),!!e&&t&&e===st(n)}function _t(n,t,e,i){t===void 0&&(t=!1),e===void 0&&(e=!1);let o=n.getBoundingClientRect(),s=tn(n),r=mt(1);t&&(i?ht(i)&&(r=ee(i)):r=ee(n));let a=fs(s,e,i)?fi(s):mt(0),l=(o.left+a.x)/r.x,c=(o.top+a.y)/r.y,d=o.width/r.x,u=o.height/r.y;if(s&&i){let h=st(s),p=ht(i)?st(i):i,b=h,g=Le(b);for(;g&&p!==b;){let w=ee(g),f=g.getBoundingClientRect(),v=ft(g),E=f.left+(g.clientLeft+parseFloat(v.paddingLeft))*w.x,C=f.top+(g.clientTop+parseFloat(v.paddingTop))*w.y;l*=w.x,c*=w.y,d*=w.x,u*=w.y,l+=E,c+=C,b=st(g),g=Le(b)}}return Ht({width:d,height:u,x:l,y:c})}function ke(n,t){let e=fe(n).scrollLeft;return t?t.left+e:_t(gt(n)).left+e}function mi(n,t){let e=n.getBoundingClientRect(),i=e.left+t.scrollLeft-ke(n,e),o=e.top+t.scrollTop;return{x:i,y:o}}function ms(n){let{elements:t,rect:e,offsetParent:i,strategy:o}=n,s=o==="fixed",r=gt(i),a=t?he(t.floating):!1;if(i===r||a&&s)return e;let l={scrollLeft:0,scrollTop:0},c=mt(1),d=mt(0),u=wt(i);if((u||!s)&&((Pt(i)!=="body"||ue(r))&&(l=fe(i)),u)){let p=_t(i);c=ee(i),d.x=p.x+i.clientLeft,d.y=p.y+i.clientTop}let h=r&&!u&&!s?mi(r,l):mt(0);return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:e.y*c.y-l.scrollTop*c.y+d.y+h.y}}function ps(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function gs(n){let t=fe(n),e=n.ownerDocument.body,i=ut(n.scrollWidth,n.clientWidth,e.scrollWidth,e.clientWidth),o=ut(n.scrollHeight,n.clientHeight,e.scrollHeight,e.clientHeight),s=-t.scrollLeft+ke(n),r=-t.scrollTop;return ft(e).direction==="rtl"&&(s+=ut(n.clientWidth,e.clientWidth)-i),{width:i,height:o,x:s,y:r}}var bs=25;function vs(n,t,e){e===void 0&&(e="viewport");let i=e==="layoutViewport",o=st(n),s=gt(n),r=o.visualViewport,a=s.clientWidth,l=s.clientHeight,c=0,d=0;if(r){let h=!Ce()||t==="fixed";i?h||(c=-r.offsetLeft,d=-r.offsetTop):(a=r.width,l=r.height,h&&(c=r.offsetLeft,d=r.offsetTop))}if(ke(s)<=0){let h=s.ownerDocument,p=h.body,b=getComputedStyle(p),g=h.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,w=Math.abs(s.clientWidth-p.clientWidth-g),f=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;f<=bs&&(a-=f)}return{width:a,height:l,x:c,y:d}}function ys(n,t){let e=_t(n,!0,t==="fixed"),i=e.top+n.clientTop,o=e.left+n.clientLeft,s=ee(n),r=n.clientWidth*s.x,a=n.clientHeight*s.y,l=o*s.x,c=i*s.y;return{width:r,height:a,x:l,y:c}}function di(n,t,e){let i;if(t==="viewport"||t==="layoutViewport")i=vs(n,e,t);else if(t==="document")i=gs(gt(n));else if(ht(t))i=ys(t,e);else{let o=fi(n);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ht(i)}function ws(n,t){let e=t.get(n);if(e)return e;let i=Jt(n,[],!1).filter(a=>ht(a)&&Pt(a)!=="body"),o=null,s=ft(n).position==="fixed",r=s?kt(n):n;for(;ht(r)&&!te(r);){let a=ft(r),l=Ae(r),c=o?o.position:s?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(u=>u!==r):o=a,r=kt(r)}return t.set(n,i),i}function Es(n){let{element:t,boundary:e,rootBoundary:i,strategy:o}=n,r=[...e==="clippingAncestors"?he(t)?[]:ws(t,this._c):[].concat(e),i],a=di(t,r[0],o),l=a.top,c=a.right,d=a.bottom,u=a.left;for(let h=1;h<r.length;h++){let p=di(t,r[h],o);l=ut(p.top,l),c=Ct(p.right,c),d=Ct(p.bottom,d),u=ut(p.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function xs(n){let{width:t,height:e}=hi(n);return{width:t,height:e}}function Ss(n,t,e){let i=wt(t),o=gt(t),s=e==="fixed",r=_t(n,!0,s,t),a={scrollLeft:0,scrollTop:0},l=mt(0);if((i||!s)&&((Pt(t)!=="body"||ue(o))&&(a=fe(t)),i)){let h=_t(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}!i&&o&&(l.x=ke(o));let c=o&&!i&&!s?mi(o,a):mt(0),d=r.left+a.scrollLeft-l.x-c.x,u=r.top+a.scrollTop-l.y-c.y;return{x:d,y:u,width:r.width,height:r.height}}function Je(n){return ft(n).position==="static"}function ui(n,t){if(!wt(n)||ft(n).position==="fixed")return null;if(t)return t(n);let e=n.offsetParent;return gt(n)===e&&(e=e.ownerDocument.body),e}function pi(n,t){let e=st(n);if(he(n))return e;if(!wt(n)){let o=kt(n);for(;o&&!te(o);){if(ht(o)&&!Je(o))return o;o=kt(o)}return e}let i=ui(n,t);for(;i&&ai(i)&&Je(i);)i=ui(i,t);return i&&te(i)&&Je(i)&&!Ae(i)?e:i||li(n)||e}var As=async function(n){let t=this.getOffsetParent||pi,e=this.getDimensions,i=await e(n.floating);return{reference:Ss(n.reference,await t(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Cs(n){return ft(n).direction==="rtl"}var Ls={convertOffsetParentRelativeRectToViewportRelativeRect:ms,getDocumentElement:gt,getClippingRect:Es,getOffsetParent:pi,getElementRects:As,getClientRects:ps,getDimensions:xs,getScale:ee,isElement:ht,isRTL:Cs};function gi(n,t){return n.x===t.x&&n.y===t.y&&n.width===t.width&&n.height===t.height}function ks(n,t,e){let i=null,o,s=gt(n);function r(){var d;clearTimeout(o),(d=i)==null||d.disconnect(),i=null}function a(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let h=n.getBoundingClientRect(),{left:p,top:b,width:g,height:w}=h;if(d||t(),!g||!w)return;let f=de(b),v=de(s.clientWidth-(p+g)),E=de(s.clientHeight-(b+w)),C=de(p),L={rootMargin:-f+"px "+-v+"px "+-E+"px "+-C+"px",threshold:ut(0,Ct(1,u))||1},x=!0;function y(X){let z=X[0].intersectionRatio;if(!gi(h,n.getBoundingClientRect()))return a();if(z!==u){if(!x)return a();z?a(!1,z):o=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{i=new IntersectionObserver(y,{...L,root:s.ownerDocument})}catch{i=new IntersectionObserver(y,L)}i.observe(n)}let l=st(n),c=()=>a(e);return l.addEventListener("resize",c),a(!0),()=>{l.removeEventListener("resize",c),r()}}function bi(n,t,e,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=tn(n),d=o||s?[...c?Jt(c):[],...t?Jt(t):[]]:[];d.forEach(f=>{o&&f.addEventListener("scroll",e),s&&f.addEventListener("resize",e)});let u=c&&a?ks(c,e,s):null,h=-1,p=null;r&&(p=new ResizeObserver(f=>{let[v]=f;v&&v.target===c&&p&&t&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=p)==null||E.observe(t)})),e()}),c&&!l&&p.observe(c),t&&p.observe(t));let b,g=l?_t(n):null;l&&w();function w(){let f=_t(n);g&&!gi(g,f)&&e(),g=f,b=requestAnimationFrame(w)}return e(),()=>{var f;d.forEach(v=>{o&&v.removeEventListener("scroll",e),s&&v.removeEventListener("resize",e)}),u==null||u(),(f=p)==null||f.disconnect(),p=null,l&&cancelAnimationFrame(b)}}var vi=ni;var yi=ii,wi=ei,Ei=oi;var xi=(n,t,e)=>{let i=new Map,o=e??{},s={...Ls,...o.platform,_c:i};return ti(n,t,{...o,platform:s})};function zt(n,t,e={}){let{placement:i="bottom-start",strategy:o="absolute",offset:s=4,flip:r=!0,shift:a=!0,padding:l=8,matchWidth:c=!1}=e,d=[vi(s),...r?[wi({padding:l})]:[],...a?[yi({padding:l})]:[],...c?[Ei({apply({rects:h}){Object.assign(t.style,{width:`${h.reference.width}px`})}})]:[]];return t.style.position=o,bi(n,t,async()=>{let h=await xi(n,t,{placement:i,strategy:o,middleware:d});Object.assign(t.style,{left:`${h.x}px`,top:`${h.y}px`});let p=h.placement.split("-")[0];t.setAttribute("data-side",p)})}var en=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 Si=class extends Y{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)||dt(e)||(this.select(e),this.close())});m(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'item\']");e&&this.items.includes(e)&&!dt(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=>!dt(t))}setup(){var a,l;if(this.nativeSelect=Z(this,"select"),this.nativeSelect&&!Z(this,"[data-part=\'trigger\']")&&this.buildFromNative(this.nativeSelect),this.trigger=Z(this,"[data-part=\'trigger\']"),this.content=Z(this,"[data-part=\'content\']"),this.valueEl=Z(this,"[data-part=\'value\']"),!this.trigger||!this.content)return;let{trigger:t,content:e}=this;this.items=vt(this,"[data-part=\'item\']");let i=Q("db-select");e.id||(e.id=`${i}-listbox`),e.setAttribute("role","listbox"),e.hidden=!0,t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",e.id),t instanceof HTMLButtonElement&&!t.hasAttribute("type")&&(t.type="button"),this.isDisabled&&t.setAttribute("aria-disabled","true"),this.items.forEach((c,d)=>{c.id||(c.id=`${i}-item-${d}`),c.setAttribute("role","option"),c.setAttribute("aria-selected","false")}),vt(this,"[data-part=\'group\']").forEach(c=>{c.setAttribute("role","group");let d=c.querySelector("[data-part=\'label\']");d&&(d.id||(d.id=Q("db-select-label")),c.setAttribute("aria-labelledby",d.id))});let o=this.getAttribute("name");o&&!this.nativeSelect&&(this.hiddenInput=document.createElement("input"),this.hiddenInput.type="hidden",this.hiddenInput.name=o,this.hasAttribute("required")&&(this.hiddenInput.required=!0),this.appendChild(this.hiddenInput)),this.typeahead=new en({getItemCount:()=>this.enabled().length,getItemText:c=>{var d,u;return((u=(d=this.enabled()[c])==null?void 0:d.textContent)==null?void 0:u.trim())??""},onMatch:c=>{let d=this.enabled()[c];d&&(this._open?this.highlight(this.items.indexOf(d)):this.select(d))}}),this.dismiss=new Nt(e,{onDismiss:c=>this.close(c!=="outside-press")});let s=((a=this.nativeSelect)==null?void 0:a.value)??this.getAttribute("default-value")??"",r=this.items.find(c=>c.dataset.value===s);r&&dt(r)?this.valueEl&&(this.valueEl.textContent=((l=r.textContent)==null?void 0:l.trim())??"",this.valueEl.setAttribute("data-placeholder","")):r&&this.select(r,!1),this.setState("closed")}buildFromNative(t){let e=document.createElement("button");e.type="button",e.setAttribute("data-part","trigger"),e.className="db-select-trigger";let i=t.getAttribute("aria-label"),o=t.getAttribute("aria-labelledby"),s=!o&&t.id?document.querySelector(`label[for="${CSS.escape(t.id)}"]`):null;s&&(o=s.id||(s.id=Q("db-select-for"))),i&&e.setAttribute("aria-label",i),o&&e.setAttribute("aria-labelledby",o);let r=t.closest("label");if(r){if(this.labelEl=r,!i&&!o){let u=Array.from(r.childNodes).filter(h=>!(h instanceof Element&&(h===t||h.contains(t)||h.localName==="db-select"))).map(h=>h.textContent??"").join(" ").replace(/\\s+/g," ").trim();u&&e.setAttribute("aria-label",u)}}else s&&(this.labelEl=s);let a=document.createElement("span");a.setAttribute("data-part","value"),a.className="db-select-value";let l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("viewBox","0 0 24 24"),l.setAttribute("aria-hidden","true"),l.setAttribute("class","db-select-chevron"),l.innerHTML=\'<path d="m6 9 6 6 6-6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\',e.append(a,l);let c=document.createElement("div");c.setAttribute("data-part","content"),c.className="db-select-content";let d=(u,h)=>{let p=document.createElement("div");p.setAttribute("data-part","item"),p.className="db-select-item",p.dataset.value=u.value;for(let[b,g]of Object.entries(u.dataset))g!=null&&(p.dataset[b]=g);u.disabled&&p.setAttribute("aria-disabled","true"),p.textContent=u.textContent??u.value,h.appendChild(p)};for(let u of Array.from(t.children))if(u instanceof HTMLOptGroupElement){let h=document.createElement("div");h.setAttribute("data-part","group");let p=document.createElement("div");p.setAttribute("data-part","label"),p.className="db-select-label",p.textContent=u.label,h.appendChild(p);for(let b of Array.from(u.children))b instanceof HTMLOptionElement&&d(b,h);c.appendChild(h)}else u instanceof HTMLOptionElement&&d(u,c);t.hidden=!0,t.tabIndex=-1,t.setAttribute("aria-hidden","true"),this.append(e,c)}connect(){var t,e,i,o,s,r,a,l,c,d;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.addEventListener("keydown",this.onTriggerKey),(i=this.trigger)==null||i.addEventListener("keyup",this.onTriggerKeyUp),(o=this.nativeSelect)==null||o.addEventListener("change",this.onNativeChange),(r=(s=this.nativeSelect)==null?void 0:s.form)==null||r.addEventListener("reset",this.onFormReset),(a=this.labelEl)==null||a.addEventListener("click",this.onLabelClick),(l=this.content)==null||l.addEventListener("click",this.onListClick),(c=this.content)==null||c.addEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.addEventListener("mousedown",this.preventBlur)}disconnect(){var t,e,i,o,s,r,a,l,c,d;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.removeEventListener("keydown",this.onTriggerKey),(i=this.trigger)==null||i.removeEventListener("keyup",this.onTriggerKeyUp),(o=this.nativeSelect)==null||o.removeEventListener("change",this.onNativeChange),(r=(s=this.nativeSelect)==null?void 0:s.form)==null||r.removeEventListener("reset",this.onFormReset),(a=this.labelEl)==null||a.removeEventListener("click",this.onLabelClick),(l=this.content)==null||l.removeEventListener("click",this.onListClick),(c=this.content)==null||c.removeEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.removeEventListener("mousedown",this.preventBlur),this._open&&this.close(!1)}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}show(){var r,a;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let i=Yt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=zt(t,e,{placement:"bottom-start",offset:4,matchWidth:!this.hasAttribute("auto-width"),strategy:i==="top-layer"?"fixed":"absolute"});let s=this.items.find(l=>l.dataset.value===this._value&&!dt(l))??this.enabled()[0];s&&this.highlight(this.items.indexOf(s)),(r=this.dismiss)==null||r.activate(),(a=this.typeahead)==null||a.reset(),t.focus()}close(t=!0){var o,s,r;let{trigger:e,content:i}=this;!e||!i||!this._open||(this._open=!1,(o=this.dismiss)==null||o.deactivate(),(s=this.cleanupFloating)==null||s.call(this),this.cleanupFloating=null,Gt(i),this.setState("closed"),e.setAttribute("aria-expanded","false"),e.removeAttribute("aria-activedescendant"),this.items.forEach(a=>a.removeAttribute("data-highlighted")),this.highlighted=-1,(r=this.typeahead)==null||r.reset(),t&&e.focus())}highlight(t){var r;let e=this.items[t],i=this.content;if(!e||!i||!this.trigger)return;this.highlighted>=0&&((r=this.items[this.highlighted])==null||r.removeAttribute("data-highlighted")),this.highlighted=t,e.setAttribute("data-highlighted",""),this.trigger.setAttribute("aria-activedescendant",e.id);let o=e.offsetTop,s=o+e.offsetHeight;o<i.scrollTop?i.scrollTop=o:s>i.scrollTop+i.clientHeight&&(i.scrollTop=s-i.clientHeight)}select(t,e=!0){var s;if(dt(t))return;let i=t.dataset.value??"",o=i!==this._value;this._value=i;for(let r of this.items){let a=r===t;r.setAttribute("aria-selected",String(a)),a?r.setAttribute("data-state","checked"):r.removeAttribute("data-state")}if(this.valueEl&&(this.valueEl.textContent=((s=t.textContent)==null?void 0:s.trim())??"",this.valueEl.removeAttribute("data-placeholder")),this.hiddenInput&&(this.hiddenInput.value=i),!e||!o){this.nativeSelect&&(this.nativeSelect.value=i);return}if(this.nativeSelect){this.nativeSelect.value=i,this.syncing=!0;try{this.nativeSelect.dispatchEvent(new Event("input",{bubbles:!0})),this.nativeSelect.dispatchEvent(new Event("change",{bubbles:!0}))}finally{this.syncing=!1}}this.dispatchEvent(new CustomEvent("db-select:change",{detail:{value:i},bubbles:!0}))}};G();customElements.get("db-select")||customElements.define("db-select",Si);var Ai=class extends Y{constructor(){super(...arguments);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=Wt(Z(this,"[data-part=\'trigger\']")),this.content=Z(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;let t=this.content;t.id||(t.id=Q("db-popover")),t.hasAttribute("role")||t.setAttribute("role","dialog"),!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&((e=this.trigger).id||(e.id=Q("db-popover-trigger")),t.setAttribute("aria-labelledby",this.trigger.id)),t.hidden=!0,this.trigger.setAttribute("aria-haspopup","dialog"),this.trigger.setAttribute("aria-controls",t.id),this.trigger.setAttribute("aria-expanded","false"),this.setState("closed"),this.dismiss=new Nt(t,{onDismiss:i=>this.close(i)})}connect(){var t,e;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.content)==null||e.addEventListener("click",this.onContentClick)}disconnect(){var t,e;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.content)==null||e.removeEventListener("click",this.onContentClick),this._open&&this.close("api")}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}placement(){var o,s;let t=this.getAttribute("placement");if(t)return t;let e=((o=this.content)==null?void 0:o.dataset.side)||"bottom",i=((s=this.content)==null?void 0:s.dataset.align)||"center";return`${e}${i!=="center"?`-${i}`:""}`}toggle(){this._open?this.close("trigger-press"):this.show()}show(){var o;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let i=Yt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=zt(t,e,{placement:this.placement(),offset:Number(this.getAttribute("offset")??8),strategy:i==="top-layer"?"fixed":"absolute"}),(o=this.dismiss)==null||o.activate(),this.hasAttribute("no-autofocus")||requestAnimationFrame(()=>{this._open&&(Tn(e)[0]??e).focus({preventScroll:!0})}),this.dispatchEvent(new CustomEvent("db-popover:open",{bubbles:!0}))}close(t="api"){var s,r;let{trigger:e,content:i}=this;if(!e||!i||!this._open)return;this._open=!1,(s=this.dismiss)==null||s.deactivate(),(r=this.cleanupFloating)==null||r.call(this),this.cleanupFloating=null;let o=i.contains(document.activeElement);Gt(i),this.setState("closed"),e.setAttribute("aria-expanded","false"),t!=="outside-press"&&(o||t==="escape-key"||t==="close-press")&&e.focus(),this.dispatchEvent(new CustomEvent("db-popover:close",{detail:{reason:t},bubbles:!0}))}};G();customElements.get("db-popover")||customElements.define("db-popover",Ai);var Ci="db-announcement-closed:";var Li=class extends Y{constructor(){super(...arguments);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(Ci+t,"1")}catch{}let e=this.contains(document.activeElement);if(document.documentElement.setAttribute("data-announcement-closed",""),this.hidden=!0,this.style.display="none",e){let o=document.querySelector("main, [role=\'main\']");o?(o.hasAttribute("tabindex")||o.setAttribute("tabindex","-1"),o.focus({preventScroll:!0})):(i=document.activeElement)==null||i.blur()}this.dispatchEvent(new CustomEvent("db-announcement:close",{bubbles:!0,detail:{id:t}}))}};G();customElements.get("db-announcement")||customElements.define("db-announcement",Li);var ki=class extends Y{constructor(){super(...arguments);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=Wt(Z(this,"[data-part=\'trigger\']")),this.content=Z(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;(e=this.content).id||(e.id=Q("db-tooltip")),this.content.setAttribute("role","tooltip"),this.content.hidden=!0;let t=(this.trigger.getAttribute("aria-describedby")??"").split(/\\s+/).filter(Boolean);t.includes(this.content.id)||this.trigger.setAttribute("aria-describedby",[...t,this.content.id].join(" ")),this.setState("closed")}connect(){let{trigger:t,content:e}=this;!t||!e||(t.addEventListener("pointerenter",this.onEnter),t.addEventListener("pointerleave",this.onLeave),t.addEventListener("focus",this.onFocus),t.addEventListener("blur",this.onBlur),t.addEventListener("pointerdown",this.onPress),e.addEventListener("pointerenter",this.onContentEnter),e.addEventListener("pointerleave",this.onLeave))}disconnect(){let{trigger:t,content:e}=this;t==null||t.removeEventListener("pointerenter",this.onEnter),t==null||t.removeEventListener("pointerleave",this.onLeave),t==null||t.removeEventListener("focus",this.onFocus),t==null||t.removeEventListener("blur",this.onBlur),t==null||t.removeEventListener("pointerdown",this.onPress),e==null||e.removeEventListener("pointerenter",this.onContentEnter),e==null||e.removeEventListener("pointerleave",this.onLeave),this.hide()}clearTimers(){this.showTimer&&clearTimeout(this.showTimer),this.hideTimer&&clearTimeout(this.hideTimer),this.showTimer=this.hideTimer=null}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}show(){let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0,this.clearTimers();let i=Yt(e);this.setState("open"),this.cleanupFloating=zt(t,e,{placement:this.getAttribute("placement")||e.dataset.side||"top",offset:8,strategy:i==="top-layer"?"fixed":"absolute"}),document.addEventListener("keydown",this.onKey,!0),this.dispatchEvent(new CustomEvent("db-tooltip:open",{bubbles:!0}))}hide(){var t;this.clearTimers(),!(!this._open||!this.content)&&(this._open=!1,document.removeEventListener("keydown",this.onKey,!0),(t=this.cleanupFloating)==null||t.call(this),this.cleanupFloating=null,Gt(this.content),this.setState("closed"),this.dispatchEvent(new CustomEvent("db-tooltip:close",{bubbles:!0})))}};G();customElements.get("db-tooltip")||customElements.define("db-tooltip",ki);var Ti="sidebar_state",Ts="b",Os=768,me=new WeakMap;function Ds(n){try{return localStorage.getItem(n)}catch{return null}}function Rs(n,t){try{localStorage.setItem(n,t)}catch{}}function sn(n){if(me.has(n))return;let t=n.querySelector("[data-component=\'sidebar\']");if(!t)return;let e=t.dataset.collapsible||"offcanvas",i=t.dataset.side||"left",o=t.dataset.defaultOpen!=="false",s=Ds(Ti),r=s!==null?s==="true":o,a=t.querySelector("[data-sidebar-desktop]"),l=t.querySelector("[data-sidebar-mobile]"),c=t.querySelector("[data-sidebar-mobile-backdrop]"),d=window.matchMedia(`(max-width: ${Os-1}px)`),u={provider:n,sidebar:t,desktopSidebar:a,mobileSidebar:l,mobileBackdrop:c,collapsible:e,side:i,open:r,openMobile:!1,isMobile:d.matches,mediaQuery:d};me.set(n,u),Oi(u);let h=g=>{u.isMobile=g.matches,!g.matches&&u.openMobile&&Tt(n)};d.addEventListener("change",h);let p=g=>{g.key===Ts&&(g.metaKey||g.ctrlKey)?(g.preventDefault(),nn(n)):g.key==="Escape"&&u.openMobile&&(g.preventDefault(),Tt(n))};document.addEventListener("keydown",p),Ms(n,u),c&&c.addEventListener("click",()=>{Tt(n)});let b=t.querySelector("[data-part=\'rail\']");b&&b.addEventListener("click",()=>{nn(n)})}function Ms(n,t){n.querySelectorAll("[data-part=\'sidebar-trigger\']").forEach(e=>{e.addEventListener("click",()=>{nn(n)})})}function nn(n){let t=me.get(n);t&&(t.isMobile?t.openMobile?Tt(n):Is(n):(t.open=!t.open,Oi(t),Rs(Ti,String(t.open))))}function Oi(n){let t=n.open?"expanded":"collapsed";n.provider.setAttribute("data-state",t),n.sidebar.setAttribute("data-state",t),n.desktopSidebar&&(n.desktopSidebar.setAttribute("data-state",t),n.open?n.desktopSidebar.setAttribute("data-collapsible",""):n.desktopSidebar.setAttribute("data-collapsible",n.collapsible))}function Is(n){var i;let t=me.get(n);if(!t||t.openMobile||!t.mobileSidebar)return;t.openMobile=!0;let e=(i=t.desktopSidebar)==null?void 0:i.querySelector("[data-sidebar=\'sidebar-inner\']");if(e)for(;e.firstChild;)t.mobileSidebar.appendChild(e.firstChild);t.mobileSidebar.hidden=!1,t.mobileSidebar.setAttribute("data-state","open"),t.mobileBackdrop&&(t.mobileBackdrop.hidden=!1),It.activate(),requestAnimationFrame(()=>{var s;let o=(s=t.mobileSidebar)==null?void 0:s.querySelector(\'a, button, [tabindex]:not([tabindex="-1"])\');o==null||o.focus()})}function Tt(n){var o;let t=me.get(n);if(!t||!t.openMobile||!t.mobileSidebar)return;t.openMobile=!1;let e=(o=t.desktopSidebar)==null?void 0:o.querySelector("[data-sidebar=\'sidebar-inner\']");if(e&&t.mobileSidebar)for(;t.mobileSidebar.firstChild;)e.appendChild(t.mobileSidebar.firstChild);t.mobileSidebar.setAttribute("data-state","closed"),t.mobileSidebar.hidden=!0,t.mobileBackdrop&&(t.mobileBackdrop.hidden=!0),It.deactivate();let i=t.provider.querySelector("[data-part=\'sidebar-trigger\']");i==null||i.focus()}function on(){document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(n=>{sn(n)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",on):on();document.addEventListener("astro:page-load",on);var Di=/^[a-z][a-z0-9_-]{0,63}$/,Te={docs:"docs.js",shard:n=>`t-${n}.js`,fragment:n=>`f-${n}.js`},Oe={docs:"docs",shard:n=>n,fragment:n=>`frag:${n}`};var Ns={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},Hs={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},Fs="[^aeiou]",an="[aeiouy]",Ot="("+Fs+"[^aeiouy]*)",Re="("+an+"[aeiou]*)",rn=new RegExp("^"+Ot+"?"+Re+Ot),Ps=new RegExp("^"+Ot+"?"+Re+Ot+Re+"?$"),De=new RegExp("^"+Ot+"?("+Re+Ot+"){2,}"),Ri=new RegExp("^"+Ot+"?"+an),Mi=new RegExp("^"+Ot+an+"[^aeiouwxy]$"),_s=/ll$/,zs=/^(.+?)e$/,$s=/^(.+?)y$/,Bs=/^(.+?(s|t))(ion)$/,qs=/^(.+?)(ed|ing)$/,Ks=/(at|bl|iz)$/,Vs=/^(.+?)eed$/,js=/^.+?[^s]s$/,Us=/^.+?(ss|i)es$/,Ws=/([^aeiouylsz])\\1$/,Ys=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,Gs=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,Xs=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;function Ii(n){let t=String(n).toLowerCase();if(t.length<3)return t;let e=!1;t.codePointAt(0)===121&&(e=!0,t="Y"+t.slice(1)),Us.test(t)?t=t.slice(0,-2):js.test(t)&&(t=t.slice(0,-1));let i;return(i=Vs.exec(t))?rn.test(i[1])&&(t=t.slice(0,-1)):(i=qs.exec(t))&&Ri.test(i[1])&&(t=i[1],Ks.test(t)?t+="e":Ws.test(t)?t=t.slice(0,-1):Mi.test(t)&&(t+="e")),(i=$s.exec(t))&&Ri.test(i[1])&&(t=i[1]+"i"),(i=Ys.exec(t))&&rn.test(i[1])&&(t=i[1]+Ns[i[2]]),(i=Gs.exec(t))&&rn.test(i[1])&&(t=i[1]+Hs[i[2]]),(i=Xs.exec(t))?De.test(i[1])&&(t=i[1]):(i=Bs.exec(t))&&De.test(i[1])&&(t=i[1]),(i=zs.exec(t))&&(De.test(i[1])||Ps.test(i[1])&&!Mi.test(i[1]))&&(t=i[1]),_s.test(t)&&De.test(t)&&(t=t.slice(0,-1)),e&&(t="y"+t.slice(1)),t}var Ni=new Set("a an and are as at be by for from has have in is it its of on or that the this to was were will with you your can not".split(" ")),Qs=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u,pe;function Zs(n){if(pe===void 0)try{pe=typeof Intl<"u"&&"Segmenter"in Intl?new Intl.Segmenter(void 0,{granularity:"word"}):null}catch{pe=null}if(pe)return[...pe.segment(n)].filter(i=>i.isWordLike).map(i=>i.segment);let t=[...n];if(t.length<2)return t;let e=[];for(let i=0;i<t.length-1;i++)e.push(t[i]+t[i+1]);return e}function $t(n){let t=[];for(let e of n.toLowerCase().normalize("NFKD").replace(/[\u0300-\u036F]/g,"").normalize("NFC").matchAll(/[\\p{L}\\p{N}][\\p{L}\\p{N}_.-]*[\\p{L}\\p{N}]|[\\p{L}\\p{N}]/gu)){let i=e[0],o=i.split(/[._-]+/).filter(Boolean);if(o.length>1&&t.push(i),o.length>1&&!/[._]/.test(i)){let s=o.join("");s.length>=3&&!Ni.has(s)&&t.push(s)}for(let s of o)Qs.test(s)?t.push(...Zs(s)):s.length>=2&&!Ni.has(s)&&t.push(s)}return t}function ln(n,t){let e="";for(let i of n.slice(0,t))e+=/[a-z0-9]/.test(i)?i:`_${i.codePointAt(0).toString(16)}_`;return e}function ge(n){if(!(!n||!/^en(-|$)/i.test(n)))return t=>/^[a-z]{3,}$/.test(t)?Ii(t):t}function Bt(n,t={}){var w,f;let e=[],i=[],o=[],s=!1,r={tag:[],section:[]},a={tag:[],section:[]},l=Object.create(null),c=Object.create(null),d=["tag","section",...new Set((t.facets??[]).filter(v=>Di.test(v)&&v!=="tag"&&v!=="section"))],u=new RegExp(`(?<!\\\\S)(-?)(${d.join("|")}):(?:"([^"]*)"?|(?!\\\\/\\\\/)(\\\\S*))|(-?)"([^"]*)"?|(\\\\S+)`,"gi"),h=[...n.matchAll(u)].map(v=>{var E;return{facetNeg:v[1]==="-",facet:(E=v[2])==null?void 0:E.toLowerCase(),value:v[3]??v[4],neg:v[5],phrase:v[6],word:v[7]}}),p=!1,b=!1;for(let[v,E]of h.entries()){if(E.facet){let O=hn(E.value??"");if(!O)continue;E.facet==="tag"||E.facet==="section"?(E.facetNeg?a:r)[E.facet].push(O):((w=E.facetNeg?c:l)[f=E.facet]??(w[f]=[])).push(O);continue}let C=E.word;if(C==="OR"){b=e.length>0,s=!0;continue}if(C==="NOT"){p=!0,s=!0;continue}if(C==="AND"){s=!0;continue}let I=E.phrase!==void 0,L=p||E.neg==="-"||(C==null?void 0:C.startsWith("-"))&&C.length>1;p=!1;let x=I?E.phrase:L&&(C!=null&&C.startsWith("-"))?C.slice(1):C,y=[...new Set($t(x))];if(!y.length){b=!1;continue}if(L){i.push(I?y:[y[0]]),s=!0,b=!1;continue}if(I){b=!1,s=!0,y.length>1&&o.push($t(x).join(" "));for(let O of y)e.push({terms:[O],prefix:!1,exact:!0});continue}let X=v===h.length-1&&!/\\s$/.test(n);if(b){e[e.length-1].terms.push(y[0]);for(let O of y.slice(1))e.push({terms:[O],prefix:!1});b=!1;continue}let z=y[0],U=/[._-]/.test(z),S=z.replace(/-/g,"");for(let[O,_]of y.entries())e.push({terms:[_],prefix:X&&_.length>=2&&(O===y.length-1||U&&(_===z||_===S))})}let g=[...new Set(e.flatMap(v=>v.terms))];return{groups:e,not:i,phrases:o,strict:s,highlight:g,filters:r,notFilters:a,...Object.keys(l).length?{facets:l}:{},...Object.keys(c).length?{notFacets:c}:{}}}async function Js(n,t){let e=await t.meta(),i=typeof n=="string"?Bt(n,{facets:fn([e])}):n,o=await zi(i,e,t),s=qi(i,e);if(!i.groups.length)return $i(e,o,s);let r=[];for(let l of i.groups)r.push(await nr(l,e,t));let a=dn(r,e,o,s,"and").sort(Me);return a.length||i.strict?a:dn(r,e,o,s,"or").sort(Me)}var Me=(n,t)=>t.score-n.score;async function zi(n,t,e){let i=new Set;for(let o of n.not){let s;for(let r of o){let[a]=Bi(r,t),l=a?await e.shard(a):void 0,c=l&&Object.hasOwn(l,r)?l[r]:[],d=new Set;for(let u=0;u<c.length;u+=2)(!s||s.has(c[u]))&&d.add(c[u]);s=d}for(let r of s??[])i.add(r)}return i}function $i(n,t,e){if(!e)return[];let i=[];return n.docs.forEach(([o,s,r],a)=>e(a)&&!t.has(a)&&i.push({id:a,title:o,url:s,section:n.sections[r]??"",score:1})),i}function dn(n,t,e,i,o){let s=new Map,r=new Map;for(let l of n)for(let[c,d]of l)s.set(c,(s.get(c)??0)+d),r.set(c,(r.get(c)??0)+1);let a=[];for(let[l,c]of s){if(e.has(l)||i&&!i(l)||o==="and"&&r.get(l)!==n.length)continue;let[d,u,h]=t.docs[l];a.push({id:l,title:d,url:u,section:t.sections[h]??"",score:c*(r.get(l)/n.length)})}return a}var Et={prefix:.6,stem:.4,titleAll:1.5,titleExact:2,headingAll:1.4,headingExact:1.8,phrase:1.5,typo:.3};function tr(n,t){if(n===t)return!1;if(n.length===t.length){let s=[];for(let r=0;r<n.length&&s.length<=2;r++)n[r]!==t[r]&&s.push(r);return s.length===1?!0:s.length===2&&s[1]===s[0]+1&&n[s[0]]===t[s[1]]&&n[s[1]]===t[s[0]]}let[e,i]=n.length<t.length?[n,t]:[t,n];if(i.length-e.length!==1)return!1;let o=0;for(;o<e.length&&e[o]===i[o];)o++;return e.slice(o)===i.slice(o+1)}function Bi(n,t,e=!1){let i=er(t);for(let s=Math.min(n.length,Hi);s>=1;s--){let r=ln(n,s);if(i.has(r))return!e||s<n.length?[r]:[r,...t.shards.filter(a=>a.length>r.length&&a.startsWith(r)).slice(0,10)]}let o=ln(n,Math.min(n.length,Hi));return e?t.shards.filter(s=>s.startsWith(o)).slice(0,10):[]}var Hi=3,Fi=new WeakMap;function er(n){let t=Fi.get(n);return t||Fi.set(n,t=new Set(n.shards)),t}function hn(n){return n.replace(/"/g,"").trim().toLowerCase()}function qi(n,t){let{tag:e,section:i}=n.filters,o=n.notFilters??{tag:[],section:[]},s=Object.entries(n.facets??{}).filter(([,f])=>f.length),r=Object.entries(n.notFacets??{}).filter(([,f])=>f.length);if(!e.length&&!i.length&&!o.tag.length&&!o.section.length&&!s.length&&!r.length)return;let a=(f,v)=>new Set(f.flatMap((E,C)=>v.includes(hn(E))?[C]:[])),l=a(t.sections,i),c=a(t.tags??[],e),d=a(t.sections,o.section),u=a(t.tags??[],o.tag),h=f=>(t.facets??[]).findIndex(v=>v.name===f),p=f=>f.map(([v,E])=>{let C=h(v);return[C,C<0?new Set:a(t.facets[C].values,E)]}),b=p(s),g=p(r).filter(([f])=>f>=0),w=(f,[v,E])=>{var C;return v>=0&&(((C=f[4])==null?void 0:C[v])??[]).some(I=>E.has(I))};return f=>{let v=t.docs[f],E=v[3]??[];if(i.length&&!l.has(v[2])||e.length&&!E.some(C=>c.has(C))||d.has(v[2])||E.some(C=>u.has(C)))return!1;for(let C of b)if(!w(v,C))return!1;for(let C of g)if(w(v,C))return!1;return!0}}function fn(n){return[...new Set(n.flatMap(t=>((t==null?void 0:t.facets)??[]).map(e=>e.name)))]}function Ki(n,t){let e=Object.create(null),i=new Map,o=(s,r)=>{let a=`${s}\\0${hn(r)}`,l=i.get(a);l===void 0&&i.set(a,l=r);let c=e[s]??(e[s]=Object.create(null));c[l]=(c[l]??0)+1};for(let s of n){let r=typeof t=="function"?t(s):t,a=r==null?void 0:r.docs[s.id];if(a){r.sections[a[2]]&&o("section",r.sections[a[2]]);for(let l of new Set(a[3]??[]))r.tags[l]!==void 0&&o("tag",r.tags[l]);(a[4]??[]).forEach((l,c)=>{var u;let d=(u=r.facets)==null?void 0:u[c];if(d)for(let h of new Set(l))d.values[h]!==void 0&&o(d.name,d.values[h])})}}return e}async function nr(n,t,e){let i=await ji(n,t,e,!0);return n.corrected=i.corrected.length?i.corrected:void 0,Vi(i,un(t.count,i.docs.size))}function un(n,t){return Math.log(1+(n-t+.5)/(t+.5))}function Vi(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 ji(n,t,e,i){let o=ge(t.lang),s=new Map,r=new Map;for(let d of n.terms)for(let u of Bi(d,t,n.prefix)){let h=await e.shard(u);if(!h)continue;let p=(f,v)=>{v>(s.get(f)??0)&&(s.set(f,v),r.set(f,h))};Object.hasOwn(h,d)&&p(d,1);let b=o==null?void 0:o(d),g=b?b.slice(0,Math.max(3,b.length-1)):void 0,w=0;for(let f in h)f!==d&&(n.prefix&&f.startsWith(d)&&w++<200&&p(f,Et.prefix),b&&g&&f.startsWith(g)&&o(f)===b&&p(f,Et.stem));if(i&&!s.size&&!n.exact&&d.length>=4&&!/[._-]/.test(d))for(let f in h)Math.abs(f.length-d.length)<=1&&tr(d,f)&&p(f,Et.typo)}let a=[...s].filter(([,d])=>d===Et.typo).map(([d])=>d),l=[...s].map(([d,u])=>[r.get(d)[d],u]),c=new Set;for(let[d]of l)for(let u=0;u<d.length;u+=2)c.add(d[u]);return{lists:l,docs:c,corrected:a}}var Ui=n=>typeof n=="function"?n:()=>n;async function Wi(n,t){let e=Ui(t),i=new Map;for(let o of n){let s=e(o),r=i.get(s);r||i.set(s,r=[]),r.push(o)}await Promise.all([...i].map(async([o,s])=>{var c;let r=await o.meta(),a=[...new Set(s.map(d=>Math.floor(d.id/r.block)))],l=new Map;await Promise.all(a.map(async d=>{try{l.set(d,await o.fragment(d))}catch{l.set(d,void 0)}}));for(let d of s)d.fragment??(d.fragment=(c=l.get(Math.floor(d.id/r.block)))==null?void 0:c[d.id%r.block])}))}async function Yi(n){let t=Ui(n),e=new Map;return async i=>{let o=t(i),s=e.get(o);if(!s){let r=ge((await o.meta()).lang);s=(a,l)=>l.terms.some(c=>a===c||l.prefix&&a.startsWith(c)||r!==void 0&&r(a)===r(c))||(l.corrected??[]).includes(a),e.set(o,s)}return s}}async function Gi(n,t,e,i=10){let o=t.slice(0,i);await Wi(o,e);let s=n.groups,r=await Yi(e);for(let a of o){let l=await r(a),[c,d]=a.fragment??["",[]],u=$t(a.title),h=1;s.length&&s.every(b=>u.some(g=>l(g,b)))&&(h=Pi(u,s,l)?Et.titleExact:Et.titleAll);let p=[];for(let[b,g]of d){let w=$t(b);!s.length||!s.every(f=>w.some(v=>l(v,f)))||(p.push([b,g]),h=Math.max(h,Pi(w,s,l)?Et.headingExact:Et.headingAll))}if(a.sections=p.slice(0,3),n.phrases.length){let b=[a.title,c,...d.map(([g])=>g)].map(g=>$t(g).join(" ")).join(" \\0 ");n.phrases.every(g=>b.includes(g))&&(h*=Et.phrase)}a.score*=h}return o.sort((a,l)=>l.score-a.score),[...o,...t.slice(i)]}async function Xi(n,t,e){await Wi(t,e);let i=await Yi(e);for(let o of t){if(!o.fragment||o.sections)continue;let s=await i(o);o.sections=o.fragment[1].filter(([r])=>{let a=$t(r);return n.groups.length>0&&n.groups.every(l=>a.some(c=>s(c,l)))}).slice(0,3)}}function Pi(n,t,e){return n.every(i=>t.some(o=>e(i,o)))&&t.every(i=>n.some(o=>e(o,i)))}async function Qi(n,t,e=10){let i=await t.meta(),o=Bt(n,{facets:fn([i])}),s=ge(i.lang);s&&(o.highlight=[...new Set([...o.highlight,...o.highlight.map(s).filter(a=>a.length>=3)])]);let r=await Js(o,t);return o.highlight=[...new Set([...o.highlight,...o.groups.flatMap(a=>a.corrected??[])])],{parsed:o,results:await Gi(o,r,t,e),facets:Ki(r,i)}}async function ir(n){return Promise.all(n.map(t=>t.data.meta().then(e=>e&&e.format===5?e:void 0,()=>{})))}async function or(n,t,e,i){let o=e,s=new Set,r=[],a=async(L,x)=>{if(!s.has(L))try{return await x()}catch(y){s.add(L),r.push({source:L,error:y});return}},l=t.flatMap((L,x)=>e[x]?[x]:[]),c=[];await Promise.all(l.map(async L=>c[L]=await a(L,()=>zi(n,o[L],t[L].data))??new Set));let d=[],u=[],h=(L,x)=>Promise.all(l.map(y=>a(y,()=>ji(L,o[y],t[y].data,x)))),p=L=>L.every((x,y)=>!(x!=null&&x.docs.size)||s.has(l[y]));for(let L of n.groups){let x=await h(L,!1);u.push(p(x)),u[u.length-1]&&(x=await h(L,!0)),d.push(x)}for(let[L,x]of n.groups.entries())u[L]||!p(d[L])||(x.corrected=void 0,d[L]=await h(x,!0));if(l.length&&l.every(L=>s.has(L)))throw r[0].error;let b=l.filter(L=>!s.has(L)),g=[];for(let L of b)g[L]=qi(n,o[L]);let w=(L,x)=>L.map(y=>({...y,source:x,score:y.score*sr(t[x])})),f=L=>({results:rr(L,t),failed:[...s].sort((x,y)=>x-y),errors:r});if(!n.groups.length)return f(b.flatMap(L=>w($i(o[L],c[L],g[L]),L)).sort(Me));let v=t.map(()=>[]),E=b.reduce((L,x)=>L+o[x].count,0);n.groups.forEach((L,x)=>{let y=d[x],X=l.flatMap((S,O)=>s.has(S)?[]:[[S,y[O]]]),z=[...new Set(X.flatMap(([,S])=>S.corrected))];L.corrected=z.length?z:void 0;let U=X.reduce((S,[,O])=>S+O.docs.size,0);for(let[S,O]of X)v[S].push(Vi(O,i.stats==="own"?un(o[S].count,O.docs.size):un(E,U)))});let C=L=>b.flatMap(x=>w(dn(v[x],o[x],c[x],g[x],L),x)).sort(Me),I=C("and");return f(I.length||n.strict?I:C("or"))}function sr(n){return typeof n.boost=="number"&&Number.isFinite(n.boost)&&n.boost>=0?n.boost:1}function rr(n,t){let e=new Map,i=[];for(let o of n){let s=t[o.source].collapse;if(s===void 0){i.push(o);continue}let r=`${s}\\0${o.url}`,a=e.get(r);a?(a.others??(a.others=[])).push({source:o.source,id:o.id,url:o.url,score:o.score}):(e.set(r,o),i.push(o))}return i}async function Zi(n,t,e=10,i={}){let o=await ir(t),s=Bt(n,{facets:fn(o)}),r=t.flatMap((u,h)=>o[h]?[]:[h]);for(let u of new Set(o.flatMap(h=>h?[h.lang]:[]))){let h=ge(u);h&&(s.highlight=[...new Set([...s.highlight,...s.highlight.map(h).filter(p=>p.length>=3)])])}let{results:a,failed:l,errors:c}=await or(s,t,o,i);for(let u of l)r.includes(u)||r.push(u);r.sort((u,h)=>u-h),s.highlight=[...new Set([...s.highlight,...s.groups.flatMap(u=>u.corrected??[])])];let d=Ki(a,u=>o[u.source]);return{parsed:s,results:await Gi(s,a,u=>t[u.source].data,e),missing:r,facets:d,errors:c}}function mn(n,t,e=globalThis){var p,b;let i=((p=e.document)==null?void 0:p.baseURI)??((b=e.location)==null?void 0:b.href),o=_i(n,i),s=e.__DOGSBAY_SEARCH__??{q:[],load(){}},r=s.stores??(s.stores=new Map),a=r.get(o)??new Map;r.set(o,a);let l=(g,w,f)=>{let v;if(f){let E="",C=_i(f,i);for(let I of r.keys())C.startsWith(I)&&I.length>E.length&&(E=I);v=E?r.get(E):void 0}!v&&r.size===1&&(v=a),v?v.set(g,w):s.q.push([g,w,f])},c=s.q;s.q=[],s.load=l;for(let[g,w,f]of c)l(g,w,f);e.__DOGSBAY_SEARCH__=s;let d=async(g,w)=>(a.has(g)||await t(n+w),a.get(g)),u,h={meta:()=>u??(u=d(Oe.docs,Te.docs).then(g=>{if(!g||g.format!==5)throw new Error(`search index format ${(g==null?void 0:g.format)??"missing"}, expected ${5}: rebuild the site`);return g}).catch(g=>{throw u=void 0,g})),shard:async g=>(await h.meta()).shards.includes(g)?d(Oe.shard(g),Te.shard(g)):void 0,fragment:g=>d(Oe.fragment(g),Te.fragment(g))};return h}function _i(n,t){try{return new URL(n,t).href}catch{return n}}function Ji(n){let t,e=new URL(n||"./",location.href).pathname;return async i=>{t??(t=import(new URL(`${n}pagefind/pagefind.js`,location.href).href).catch(u=>{throw t=void 0,u}));let o=i.replace(new RegExp(\'(?<!\\\\S)-?(tag|section):("[^"]*"?|\\\\S*)\',"gi")," ").trim(),s=o?await(await t).search(o):null,r=(s==null?void 0:s.results)??[],a=async(u,h)=>{let p=await u.data(),b=p.url.startsWith(e)?p.url.slice(e.length):p.url.replace(/^\\/+/,""),g=(p.sub_results??[]).map(w=>[w.title,w.url.split("#")[1]??""]).filter(([,w])=>w);return{id:h,title:p.meta.title??b,url:b,section:"",score:r.length-h,fragment:[ar(p.excerpt),g],sections:g.slice(0,3)}},l=await Promise.all(r.slice(0,10).map(a)),c=Promise.all(r.slice(10,30).map((u,h)=>a(u,h+10)));return c.catch(()=>{}),{results:l,more:c,later:(u,h)=>Promise.all(r.slice(u,u+h).map((p,b)=>a(p,u+b))),total:r.length,highlight:Bt(i).highlight}}}function ar(n){return new DOMParser().parseFromString(n,"text/html").body.textContent??""}function to(n,t){let e=(n==null?void 0:n.units)??[],i=e.find(f=>f.prefix===t);if(!i)return{};let o=f=>f.product??"",s=f=>{var v;return((v=n==null?void 0:n.products)==null?void 0:v[f])??{versions:n==null?void 0:n.versions,defaultVersion:n==null?void 0:n.defaultVersion}},r=f=>{var v;return(v=s(o(f)).versions)==null?void 0:v.find(E=>E.id===f.version)},a=f=>{var v,E;return((E=(v=n==null?void 0:n.products)==null?void 0:v[f])==null?void 0:E.label)??(f||(n==null?void 0:n.name)||"")},l=f=>{var v;return[o(f)!==o(i)?a(o(f)):"",f.version!==void 0?((v=r(f))==null?void 0:v.label)??f.version:""].filter(Boolean).join(" \\xB7 ")},c=f=>({prefix:f.prefix,product:o(f),label:l(f),own:f===i,versioned:f.version!==void 0}),d=e.filter(f=>f.locale===i.locale),u=s(o(i)),h=(u.versions??[]).map(f=>f.id),p=f=>{var v;return f===i?-2:f.version===u.defaultVersion?-1:(v=r(f))!=null&&v.prerelease?h.length+h.indexOf(f.version):h.indexOf(f.version)},b=d.filter(f=>{var v;return o(f)===o(i)&&f.version!==void 0&&(f===i||!((v=r(f))!=null&&v.hidden))}).sort((f,v)=>p(f)-p(v)),g=[];for(let f of d){let v=o(f);if(g.some(I=>o(I)===v))continue;if(v===o(i)){g.push(i);continue}let E=d.filter(I=>o(I)===v),C=s(v).defaultVersion;g.push(E.find(I=>I.version===C)??E.find(I=>{var L;return!((L=r(I))!=null&&L.hidden)})??E[0])}let w={};return b.length>1&&(w.versions=b.map(c)),g.length>1&&(w.products=g.map(c)),(w.versions||w.products)&&(w.version=[c(i)]),w}var eo=1.5;function no(n,t){var s,r;let e={},i=(s=n.docs[t])==null?void 0:s[3];i!=null&&i.length&&(e.tag=i.map(a=>n.tags[a]).filter(a=>typeof a=="string"));let o=(r=n.docs[t])==null?void 0:r[4];return!o||!n.facets||n.facets.forEach((a,l)=>{let c=o[l];c!=null&&c.length&&(e[a.name]=c.map(d=>a.values[d]).filter(d=>typeof d=="string"))}),e}var xt=n=>n.trim().toLowerCase();function io(n,t,e){for(let[i,o]of Object.entries(t)){if(i===e||!o.length)continue;let s=new Set((n[i]??[]).map(xt));if(!o.some(r=>s.has(xt(r))))return!1}return!0}function oo(n,t,e){return n.filter(i=>io(t(i),e))}function so(n,t,e,i){var s;let o={};for(let r of i){let a={},l=new Map;for(let c of n){let d=t(c);if(!((s=d[r])!=null&&s.length)||!io(d,e,r))continue;let u=new Set;for(let h of d[r]){if(u.has(xt(h)))continue;u.add(xt(h));let p=l.get(xt(h))??(l.set(xt(h),h),h);a[p]=(a[p]??0)+1}}for(let c of e[r]??[])l.has(xt(c))||(a[c]=0);Object.keys(a).length&&(o[r]=a)}return o}function ro(n,t){let e={};for(let i of n.getAll("filter")){let o=i.indexOf(":");if(o<=0)continue;let s=i.slice(0,o),r=i.slice(o+1);!t.includes(s)||!r||(e[s]??(e[s]=[])).some(a=>xt(a)===xt(r))||e[s].push(r)}return e}function lr(n,t,e){var s;if(n.length===0)return"";let i=n.join("/"),o=e==null?void 0:e[i];if(o&&o.length>0)return o;if(n.length===1){let r=(s=t==null?void 0:t[n[0]])==null?void 0:s.label;if(r&&r.length>0)return r}return n[n.length-1]}function ao(n){if(!n)return{};let t={};for(let[e,i]of Object.entries(n)){let o=cr(Object.entries(i).map(([s,r])=>({value:s,count:r})));o.length>0&&(t[e]=o)}return t}function cr(n){return[...n].sort((t,e)=>t.count!==e.count?e.count-t.count:t.value.localeCompare(e.value))}function ne(n,t,e){let i=e==null?void 0:e[n],o=t.split("/").filter(s=>s.length>0);return lr(o,i==null?void 0:i.prefixes,i==null?void 0:i.labels)}function lo(n,t){let e=i=>{var s;let o=(s=t==null?void 0:t[i])==null?void 0:s.order;return typeof o=="number"?o:void 0};return[...n].sort((i,o)=>{let s=e(i),r=e(o);return s!==void 0&&r!==void 0?s!==r?s-r:i.localeCompare(o):s!==void 0?-1:r!==void 0?1:i.localeCompare(o)})}function co(n,t,e){let i={...n},o=i[t]??[];if(o.includes(e)){let s=o.filter(r=>r!==e);s.length===0?delete i[t]:i[t]=s}else i[t]=[...o,e];return i}function uo(n){let t=0;for(let e of Object.values(n))t+=e.length;return t}function ho(n,t,e={}){if(t.length===0)return[];if(t.some(o=>o.value.includes("/"))){let o=e.nav?ur(e.nav,new Set(t.map(s=>s.value))):void 0;return dr(n,t,e.display,o)}return hr(n,t,e.nav,e.display)}function dr(n,t,e,i){let o=new Map,s=[];for(let c of t){let d=c.value.split("/").filter(p=>p.length>0);if(d.length===0)continue;let u="",h=null;for(let p=0;p<d.length;p++){u=u?`${u}/${d[p]}`:d[p];let b=o.get(u);b||(b={value:u,label:ne(n,u,e),count:0,depth:p,hasValue:!1,children:[]},o.set(u,b),h?h.children.push(b):s.push(u)),p===d.length-1&&(b.count=c.count,b.hasValue=!0),h=b}}let r=(c,d)=>{if(i){let u=i.get(c.value),h=i.get(d.value);if(u!==void 0&&h!==void 0&&u!==h)return u-h;if(u!==void 0&&h===void 0)return-1;if(u===void 0&&h!==void 0)return 1}return c.count!==d.count?d.count-c.count:c.value.localeCompare(d.value)},a=c=>{if(c.children.length!==0){c.children.sort(r);for(let d of c.children)a(d)}},l=s.map(c=>o.get(c));l.sort(r);for(let c of l)a(c);return l}function ur(n,t){let e=new Map,i=0,o=s=>{for(let r of s){if(r.href){let a=fo(r.href);for(let l=0;l<a.length;l++){let c=a[l];if(!t.has(c))continue;let d="";for(let u=l;u<a.length;u++)d=d?`${d}/${a[u]}`:a[u],t.has(d)&&!e.has(d)&&e.set(d,i++);break}}r.children&&r.children.length>0&&o(r.children)}};return o(n),e}function hr(n,t,e,i){let o=new Map;for(let h of t)o.set(h.value,h);if(!e||e.length===0)return t.map(h=>({value:h.value,label:ne(n,h.value,i),count:h.count,depth:0,hasValue:!0,children:[]}));let s=new Set,r=[],a=new Map,l=h=>{if(h.length===0)return;let p=r,b=a;for(let g=0;g<h.length;g++){let w=h[g],f=b.get(w);if(!f){let E=o.get(w);f={value:w,label:ne(n,w,i),count:E?E.count:0,depth:g,hasValue:E!==void 0,children:[]},p.push(f),b.set(w,f),E&&s.add(w)}let v=c.get(f);v||(v=new Map,c.set(f,v)),p=f.children,b=v}},c=new Map,d=h=>{for(let p of h){if(p.href){let b=fo(p.href);l(b)}p.children&&p.children.length>0&&d(p.children)}};d(e);let u=[];for(let h of t)s.has(h.value)||u.push({value:h.value,label:ne(n,h.value,i),count:h.count,depth:0,hasValue:!0,children:[]});return u.sort((h,p)=>h.value.localeCompare(p.value)),[...r,...u]}function fo(n){let t=n;try{/^[a-z]+:\\/\\//i.test(n)&&(t=new URL(n).pathname)}catch{}t=t.split("#")[0].split("?")[0];let e=t.split("/").filter(i=>i.length>0);return e.length<2?[]:e.slice(0,-1)}var fr=6e4,mr=30,Ie=20,pr=["version","versions","products"];function po(n){let{signal:t}=n,e=document.getElementById("db-search");if(!e)return;let i=e.querySelector("[data-db-search-input]"),o=e.querySelector("[data-part=\'listbox\']"),s=e.querySelector("[data-db-search-status]"),r=bo(n,{input:i,list:o,status:s,page:!1});e.addEventListener("db-dialog:open",()=>{i.focus(),i.select(),r.activate()},{signal:t}),document.addEventListener("keydown",a=>{let l=a.target.closest("input, textarea, select, [contenteditable]");if(a.key==="/"&&!l||a.key.toLowerCase()==="k"&&(a.metaKey||a.ctrlKey)){a.preventDefault();let c=document.querySelector("[data-db-search-page] [data-db-search-input]");c&&!e.open?c.focus():e.open?i.focus():e.show()}},{signal:t}),e.addEventListener("click",a=>{a.target.closest("a")&&e.close("api")},{signal:t})}function go(n){var d;let t=document.querySelector("[data-db-search-page]");if(!t)return;let e=t.querySelector("[data-db-search-input]"),i=t.querySelector("[data-db-search-list]"),o=t.querySelector("[data-db-search-status]"),s=gr(),r=s.get("p")||void 0,a=s.get("v")||void 0,l=s.get("scope")??(s.get("q")?"version":void 0),c=bo(n,{input:e,list:i,status:o,page:!0,params:s,scope:l,forward:r!==void 0||a!==void 0?{product:r,version:a}:void 0});(d=t.querySelector("form"))==null||d.addEventListener("submit",u=>u.preventDefault(),{signal:n.signal}),e.value=s.get("q")??"",c.activate(),e.value.trim()&&c.run()}function gr(){let n=new URLSearchParams(location.search);if(location.hash.includes("="))for(let[t,e]of new URLSearchParams(location.hash.slice(1)))n.has(t)||n.set(t,e);return n}var mo=()=>!location.search&&location.hash.includes("=");function bo(n,{input:t,list:e,status:i,page:o,scope:s,forward:r,params:a}){var En;let{signal:l}=n,c=i.textContent??"",d=mn(`${n.unitRoot}_dogsbay/search/`,n.loadScript,window),u=document.body.dataset.search??"builtin",h=location.protocol!=="file:",p=u==="pagefind"||u==="both"&&h?Ji(n.unitRoot):void 0,b=u==="pagefind"&&!h,g=n.siteRoot??"",w=n.prefix??"",f={},v="version",E,C=`db-search-scope:${new URL(g||"./",location.href).pathname}`,I=()=>{let A=window.__DOGSBAY_SITE__;if(r&&A&&L(A)||(r=void 0,p))return;f=to(A,w);let T=s??pn(()=>sessionStorage.getItem(C)),k=v;T&&Object.prototype.hasOwnProperty.call(f,T)&&(v=T),Dt(),v!==k&&t.value.trim()&&Vt(++$)},L=A=>{var V,W;let T=A.units??[],k=T.find(q=>q.prefix===w);if(!k)return!1;let N=r.product??k.product??"",M=T.filter(q=>q.locale===k.locale&&(q.product??"")===N),D=((W=(V=A.products)==null?void 0:V[N])==null?void 0:W.defaultVersion)??A.defaultVersion,H=r.version!==void 0?M.find(q=>q.version===r.version||q.prefix&&q.prefix.split("/").pop()===r.version):M.find(q=>q===k)??M.find(q=>q.version===D)??M[0];if(!H||H.prefix===w||!H.search)return!1;let P=new URLSearchParams(a);P.delete("p"),P.delete("v");let R=P.toString();return location.replace(`${y(H.prefix)}${H.search}${R?mo()?`#${R}`:`?${R}`:""}`),!0},x=()=>E??(E=n.loadScript(`${g}_dogsbay/site.js`).then(I,I)),y=A=>`${g}${A?`${A}/`:""}`,X=new Map([[w,d]]),z=A=>{let T=X.get(A);return T||X.set(A,T=mn(`${y(A)}_dogsbay/search/`,n.loadScript,window)),T},U=new Map,S=((En=o?e.closest("[data-db-search-page]"):e.closest("dialog"))==null?void 0:En.querySelector("[data-db-search-facets]"))??void 0,O=(()=>{try{return JSON.parse(e.dataset.facets??"{}")}catch{return{}}})(),_=S?Object.keys(O):[],B=o&&a?ro(a,_):{},F=()=>{r&&x(),b?i.textContent=e.dataset.needsServer??"":p||(d.meta().catch(()=>i.textContent="Search index could not be loaded."),x())},$=0,K,J;t.addEventListener("input",()=>{clearTimeout(J),J=setTimeout(()=>void Vt(++$),80)},{signal:l});let nt=new Map,it=typeof IntersectionObserver=="function"?new IntersectionObserver(A=>{var T;for(let k of A)k.isIntersecting&&((T=nt.get(k.target))==null||T(),nt.delete(k.target),it.unobserve(k.target))}):void 0,Kt=A=>{if(!o||r)return;let T=new URLSearchParams;A&&T.set("q",A),v!=="version"&&T.set("scope",v);for(let[M,D]of Object.entries(B))for(let H of D)T.append("filter",`${M}:${H}`);let k=T.toString(),N=mo();pn(()=>history.replaceState(history.state,"",`${location.pathname}${k?N?`${location.search}#${k}`:`?${k}`:""}`))},Vt=async A=>{let T=t.value.trim();if(Kt(T),!T){it==null||it.disconnect(),nt.clear(),rt.hidden=!0,S&&(S.hidden=!0),Rt=void 0,e.replaceChildren(),lt.hidden=at.hidden=!0,i.textContent=c;return}if(!b){Rt=void 0;try{if(p){let k=await p(T);if(A!==$)return;if(o){let N=await k.more;if(A!==$)return;ye(T,[...k.results,...N].slice(0,Ie),k.highlight,k.total,k.later)}else{ye(T,k.results,k.highlight,k.total);let N=await k.more;A===$&&N.length&&Ao(T,N,k.highlight)}}else if(v!=="version"&&f[v]){let k=Date.now(),N=f[v],M=N.filter(R=>R.own||k-(U.get(R.prefix)??-1/0)>fr),D=await Zi(T,M.map(R=>({data:z(R.prefix),boost:R.own?eo:1,collapse:R.product})));for(let R of D.missing)U.set(M[R].prefix,Date.now());if(A!==$)return;K=D.parsed;let H=D.results.map(R=>{var W;let V=M[R.source];return Object.assign(R,{base:y(V.prefix),from:V.own?void 0:V.label,also:(W=R.others)==null?void 0:W.map(q=>M[q.source].label).filter(Boolean),data:z(V.prefix)})}),P=D.missing.length+N.length-M.length;await ve(A,T,H,D.parsed.highlight,P?` \\xB7 ${(e.dataset.unavailable??"{n}").replace("{n}",String(P))}`:"")}else{let k=await Qi(T,d);if(A!==$)return;K=k.parsed,await ve(A,T,k.results,k.parsed.highlight,"")}}catch{if(A!==$)return;i.textContent="Search index could not be loaded.",S&&(S.hidden=!0)}}},rt=document.createElement("div");rt.setAttribute("role","group"),rt.setAttribute("aria-label",e.dataset.filterSection??"Filter by section"),rt.className=o?"flex flex-wrap gap-1 pb-3":"flex flex-wrap gap-1 px-3 pb-2",rt.hidden=!0,e.before(rt);let ot=document.createElement("div");ot.setAttribute("role","group"),ot.setAttribute("aria-label",e.dataset.scope??"Search in"),ot.className=o?"flex flex-wrap items-center gap-1 pb-3":"flex flex-wrap items-center gap-1 px-3 pb-2",ot.hidden=!0,rt.before(ot);let at=document.createElement("a");at.className="mx-3 mb-2 mt-1 block rounded-md px-3 py-2 text-center text-sm font-medium hover:bg-accent",at.dataset.dbSearchSeeAll="",at.hidden=!0;let lt=document.createElement("button");lt.type="button",lt.className="mt-4 rounded-md border px-3 py-1.5 text-sm hover:bg-accent",lt.textContent=e.dataset.more??"More results",lt.hidden=!0,e.after(o?lt:at);let Dt=()=>{var k,N;let A=pr.filter(M=>f[M]),T={version:((N=(k=f.version)==null?void 0:k[0])==null?void 0:N.versioned)===!1?e.dataset.scopeProduct:e.dataset.scopeVersion,versions:e.dataset.scopeVersions,products:e.dataset.scopeProducts};ot.replaceChildren(...A.map(M=>{let D=document.createElement("button");return D.type="button",D.dataset.scope=M,D.setAttribute("aria-pressed",String(M===v)),D.className="rounded-md border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",D.textContent=T[M]??M,D.addEventListener("click",()=>{var H;v!==M&&(v=M,pn(()=>sessionStorage.setItem(C,M)),Dt(),(H=ot.querySelector(`[data-scope="${M}"]`))==null||H.focus(),t.value.trim()?Vt(++$):Kt(""))},{signal:l}),D})),ot.hidden=A.length<2};l==null||l.addEventListener("abort",()=>{clearTimeout(J),$++,it==null||it.disconnect(),nt.clear(),rt.remove(),ot.remove(),at.remove(),lt.remove()});let jt=A=>A.replace(/"/g,""),$e=A=>`section:"${jt(A)}"`,St,se=(A,T)=>{let k=new Map;for(let H of T)H.section&&k.set(H.section,(k.get(H.section)??0)+1);let N=[...A.matchAll(/section:"([^"]*)"/gi)].map(H=>H[1].toLowerCase()),M=H=>N.includes(jt(H).toLowerCase()),D=[...k].sort((H,P)=>P[1]-H[1]).slice(0,6).map(([H])=>H);for(let H of N)D.some(P=>jt(P).toLowerCase()===H)||D.push(H);rt.replaceChildren(...D.length>1||N.length?D.map(H=>{let P=document.createElement("button");P.type="button";let R=M(H);return P.setAttribute("aria-pressed",String(R)),P.className="rounded-full border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",P.textContent=H,P.addEventListener("click",()=>{let V=$e(H),W=t.value.replace(new RegExp(`\\\\s*section:"${jt(H).replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}"`,"i"),"").trim();t.value=R?W:`${W} ${V}`.trim(),St=H,t.dispatchEvent(new Event("input",{bubbles:!0}))},{signal:l}),P}):[]),rt.hidden=!rt.childElementCount,St!==void 0&&(([...rt.querySelectorAll("button")].find(P=>P.textContent===St)??t).focus(),St=void 0)},Rt,ve=async(A,T,k,N,M)=>{if(!_.length){ye(T,k,N,k.length),i.textContent+=M;return}let D=new Map;for(let P of k){let R=P.data??d;D.has(R)||D.set(R,await R.meta())}if(A!==$)return;let H=new Map(k.map(P=>[P,no(D.get(P.data??d),P.id)]));Rt={q:T,results:k,terms:N,note:M,valuesOf:P=>H.get(P)??{}},Mt()},Mt=()=>{if(!Rt)return;let{q:A,results:T,terms:k,note:N,valuesOf:M}=Rt,D=oo(T,M,B);Be(so(T,M,B,_)),ye(A,D,k,D.length),i.textContent+=N},At,Be=A=>{var H,P;if(!S)return;let T=lo(Object.keys(A),O);if(S.hidden=!T.length,!T.length)return S.replaceChildren();let k=(R,V,W,q)=>{let j=document.createElement("label");j.className="flex cursor-pointer items-center gap-2 rounded-md px-2 py-1 hover:bg-accent";let tt=document.createElement("input");tt.type="checkbox",tt.dataset.facetName=R,tt.dataset.facetValue=V,tt.checked=(B[R]??[]).some(Co=>Co.toLowerCase()===V.toLowerCase()),tt.className="size-3.5 rounded border-border accent-primary";let bt=document.createElement("span");bt.className="flex-1 truncate",bt.textContent=W;let Ke=document.createElement("span");return Ke.className="text-xs text-muted-foreground",Ke.textContent=String(q),j.append(tt,bt,Ke),j},N=(R,V)=>{let W=document.createElement("ul");W.className="space-y-0.5";for(let q of V){let j=document.createElement("li");if(q.hasValue)j.append(k(R,q.value,q.label,q.count));else{let tt=document.createElement("span");tt.className="block px-2 py-1 text-muted-foreground",tt.textContent=q.label,j.append(tt)}if(q.children.length){let tt=N(R,q.children);tt.classList.add("ml-4"),j.append(tt)}W.append(j)}return W},M=[],D=uo(B);if(D){let R=document.createElement("button");R.type="button",R.dataset.clearFilters="",R.className="mb-3 w-full rounded-md border border-border px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",R.textContent=(e.dataset.facetsClear??"Clear all ({n})").replace("{n}",String(D)),M.push(R)}for(let R of T){let V=ao({[R]:A[R]})[R]??[],W=document.createElement("fieldset");W.className="mb-3";let q=document.createElement("legend");if(q.className="mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground",q.textContent=((H=O[R])==null?void 0:H.title)??R,W.append(q),(P=O[R])!=null&&P.hierarchical||V.some(j=>j.value.includes("/")))W.append(N(R,ho(R,V,{display:O})));else{let j=document.createElement("ul");j.className="space-y-0.5";for(let tt of V){let bt=document.createElement("li");bt.append(k(R,tt.value,ne(R,tt.value,O),tt.count)),j.append(bt)}W.append(j)}M.push(W)}S.replaceChildren(...M),At!==void 0&&(((At?[...S.querySelectorAll("input[data-facet-name]")].find(V=>`${V.dataset.facetName}\\0${V.dataset.facetValue}`===At):S.querySelector("[data-clear-filters]"))??t).focus(),At=void 0)};S==null||S.addEventListener("change",A=>{let T=A.target;if(!T.dataset.facetName)return;let k=T.dataset.facetName,N=T.dataset.facetValue,M=(B[k]??[]).find(D=>D.toLowerCase()===N.toLowerCase());B=co(B,k,M??N),At=`${k}\\0${N}`,Kt(t.value.trim()),Mt()},{signal:l}),S==null||S.addEventListener("click",A=>{A.target.closest("[data-clear-filters]")&&(B={},At="",Kt(t.value.trim()),Mt())},{signal:l});let ct,ye=(A,T,k,N,M)=>{it==null||it.disconnect(),nt.clear(),se(A,T);let D=T.slice(0,o?Ie:mr);if(ct={q:A,results:T,terms:k,shown:D.length,total:N,later:M},e.replaceChildren(...qe(A,D,k)),i.textContent=N?`${N} result${N===1?"":"s"}`:`${e.dataset.noResults} \\u201C${A}\\u201D`,lt.hidden=!o||!yn(),at.hidden=o||!N||!e.dataset.searchPage,!at.hidden){let H=new URLSearchParams({q:A});v!=="version"&&H.set("scope",v);for(let[P,R]of Object.entries(B))for(let V of R)H.append("filter",`${P}:${V}`);at.href=`${e.dataset.searchPage}?${H}`,at.textContent=(e.dataset.seeAll??"See all {n} results").replace("{n}",String(N))}},Ao=(A,T,k)=>e.append(...qe(A,T,k)),yn=()=>!!ct&&(ct.results.length>ct.shown||!!ct.later&&ct.shown<ct.total);lt.addEventListener("click",async()=>{var N,M;let A=ct;if(!A)return;let T=A.results.slice(A.shown,A.shown+Ie);if(!T.length&&A.later){if(T=await A.later(A.shown,Ie).catch(()=>[]),A!==ct)return;A.results.push(...T)}let k=qe(A.q,T,A.terms);e.append(...k),A.shown+=T.length,lt.hidden=!T.length||!yn(),(M=(N=k[0])==null?void 0:N.querySelector("a"))==null||M.focus()},{signal:l});let qe=(A,T,k)=>{var M;let N=[];for(let D of T){let H=D.base??n.unitRoot,P=wn(H,D.url,k,"block rounded-md p-3 hover:bg-accent"),R=document.createElement("div");R.className="font-medium",R.append(...gn(D.title,k)),P.a.appendChild(R);let V=[D.from,D.section].filter(Boolean).join(" \\xB7 ");if(V){let j=document.createElement("div");j.className="text-xs text-muted-foreground",j.textContent=V,P.a.appendChild(j)}let W=document.createElement("div");if(W.className="mt-1 line-clamp-2 text-xs text-muted-foreground",P.a.appendChild(W),(M=D.also)!=null&&M.length){let j=document.createElement("div");j.className="mt-1 text-xs text-muted-foreground",j.textContent=`${e.dataset.alsoIn??"Also in"} ${D.also.join(", ")}`,P.a.appendChild(j)}N.push(P.li);let q=()=>D.fragment?(D.fragment[0]&&W.replaceChildren(...gn(D.fragment[0],k)),(D.sections??[]).map(([j,tt])=>{let bt=wn(H,`${D.url}#${tt}`,k,"ml-4 block rounded-md border-l px-3 py-1.5 text-sm hover:bg-accent");return bt.a.append(...gn(j,k)),bt.li})):[];if(D.fragment)N.push(...q());else if(it){let j=K??Bt(A);nt.set(P.li,()=>void Xi(j,[D],D.data??d).then(()=>P.li.after(...q()),()=>{})),it.observe(P.li)}}return N},wn=(A,T,k,N)=>{let M=document.createElement("li");o||M.setAttribute("role","none"),M.className="mb-1";let D=document.createElement("a");return o||(D.setAttribute("data-part","option"),D.dataset.value=T,D.tabIndex=-1),D.href=br(A+T,k),D.className=N,M.appendChild(D),{li:M,a:D}};return{activate:F,run:()=>void Vt(++$)}}function pn(n){try{return n()}catch{return}}function br(n,t){if(!t.length)return n;let e=n.indexOf("#"),[i,o]=e<0?[n,""]:[n.slice(0,e),n.slice(e)];return`${i}${i.includes("?")?"&":"?"}h=${encodeURIComponent(t.join(" "))}${o}`}function gn(n,t){if(!t.length)return[document.createTextNode(n)];let e=new RegExp(`(${t.map(i=>i.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")).join("|")})`,"gi");return n.split(e).map((i,o)=>{if(o%2===0)return document.createTextNode(i);let s=document.createElement("mark");return s.textContent=i,s})}var vo=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u;function yo(n){var g;let t;try{t=(new URLSearchParams(location.search).get("h")??"").split(/\\s+/).filter(w=>w.length>0)}catch{return}let e=document.querySelector("#db-content article")??document.querySelector("#db-content");if(!t.length||!e)return;let i=w=>w.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&"),o=[...t].sort((w,f)=>f.length-w.length),s=o.filter(w=>vo.test(w)).map(i),r=o.filter(w=>!vo.test(w)).map(i),a=[r.length?`(?<![\\\\p{L}\\\\p{N}])(?:${r.join("|")})`:"",s.length?`(?:${s.join("|")})`:""].filter(Boolean),l=new RegExp(`(${a.join("|")})`,"giu"),c=[],d=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:w=>{var f;return(f=w.parentElement)!=null&&f.closest("script, style, mark, button, [aria-hidden=\'true\']")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),u=[];for(let w=d.nextNode();w;w=d.nextNode())u.push(w);for(let w of u){if(c.length>=500)break;let f=w.data;if(l.lastIndex=0,!l.test(f))continue;l.lastIndex=0;let v=document.createDocumentFragment(),E=0;for(let C of f.matchAll(l)){v.append(f.slice(E,C.index));let I=document.createElement("mark");I.className="db-search-hl",I.textContent=C[0],v.append(I),c.push(I),E=C.index+C[0].length}v.append(f.slice(E)),w.replaceWith(v)}if(vr(),!c.length)return;let h=((g=document.querySelector("[data-clear-highlights]"))==null?void 0:g.dataset.clearHighlights)??"Clear highlights",p=document.createElement("div");p.className="not-prose mb-4";let b=document.createElement("button");b.type="button",b.className="inline-flex h-8 items-center rounded-md border px-3 text-sm hover:bg-accent",b.textContent=h,b.addEventListener("click",()=>{var w;for(let f of c)f.replaceWith(document.createTextNode(f.textContent??""));e.normalize(),p.remove(),(w=document.getElementById("db-content"))==null||w.focus({preventScroll:!0})},{signal:n}),p.append(b),e.prepend(p),location.hash||c[0].scrollIntoView({block:"center"})}function vr(){try{let n=new URL(location.href);n.searchParams.delete("h"),history.replaceState(history.state,"",n.toString())}catch{}}var qt=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},Ne=function(t){return t.tagName==="IMG"},yr=function(t){return NodeList.prototype.isPrototypeOf(t)},He=function(t){return t&&t.nodeType===1},wo=function(t){var e=t.currentSrc||t.src;return e.substr(-4).toLowerCase()===".svg"},Eo=function(t){try{return Array.isArray(t)?t.filter(Ne):yr(t)?[].slice.call(t).filter(Ne):He(t)?[t].filter(Ne):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(Ne):[]}catch{throw new TypeError(`The provided selector is invalid.\nExpects a CSS selector, a Node element, a NodeList or an array.\nSee: https://github.com/francoischalifour/medium-zoom`)}},wr=function(t){var e=document.createElement("div");return e.classList.add("medium-zoom-overlay"),e.style.background=t,e},Er=function(t){var e=t.getBoundingClientRect(),i=e.top,o=e.left,s=e.width,r=e.height,a=t.cloneNode(),l=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,c=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return a.removeAttribute("id"),a.style.position="absolute",a.style.top=i+l+"px",a.style.left=o+c+"px",a.style.width=s+"px",a.style.height=r+"px",a.style.transform="",a},ie=function(t,e){var i=qt({bubbles:!1,cancelable:!1,detail:void 0},e);if(typeof window.CustomEvent=="function")return new CustomEvent(t,i);var o=document.createEvent("CustomEvent");return o.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),o},xr=function n(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=window.Promise||function(S){function O(){}S(O,O)},o=function(S){var O=S.target;if(O===X){b();return}E.indexOf(O)!==-1&&g({target:O})},s=function(){if(!(I||!y.original)){var S=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(L-S)>x.scrollOffset&&setTimeout(b,150)}},r=function(S){var O=S.key||S.keyCode;(O==="Escape"||O==="Esc"||O===27)&&b()},a=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=S;if(S.background&&(X.style.background=S.background),S.container&&S.container instanceof Object&&(O.container=qt({},x.container,S.container)),S.template){var _=He(S.template)?S.template:document.querySelector(S.template);O.template=_}return x=qt({},x,O),E.forEach(function(B){B.dispatchEvent(ie("medium-zoom:update",{detail:{zoom:z}}))}),z},l=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return n(qt({},x,S))},c=function(){for(var S=arguments.length,O=Array(S),_=0;_<S;_++)O[_]=arguments[_];var B=O.reduce(function(F,$){return[].concat(F,Eo($))},[]);return B.filter(function(F){return E.indexOf(F)===-1}).forEach(function(F){E.push(F),F.classList.add("medium-zoom-image")}),C.forEach(function(F){var $=F.type,K=F.listener,J=F.options;B.forEach(function(nt){nt.addEventListener($,K,J)})}),z},d=function(){for(var S=arguments.length,O=Array(S),_=0;_<S;_++)O[_]=arguments[_];y.zoomed&&b();var B=O.length>0?O.reduce(function(F,$){return[].concat(F,Eo($))},[]):E;return B.forEach(function(F){F.classList.remove("medium-zoom-image"),F.dispatchEvent(ie("medium-zoom:detach",{detail:{zoom:z}}))}),E=E.filter(function(F){return B.indexOf(F)===-1}),z},u=function(S,O){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return E.forEach(function(B){B.addEventListener("medium-zoom:"+S,O,_)}),C.push({type:"medium-zoom:"+S,listener:O,options:_}),z},h=function(S,O){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return E.forEach(function(B){B.removeEventListener("medium-zoom:"+S,O,_)}),C=C.filter(function(B){return!(B.type==="medium-zoom:"+S&&B.listener.toString()===O.toString())}),z},p=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=S.target,_=function(){var F={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},$=void 0,K=void 0;if(x.container)if(x.container instanceof Object)F=qt({},F,x.container),$=F.width-F.left-F.right-x.margin*2,K=F.height-F.top-F.bottom-x.margin*2;else{var J=He(x.container)?x.container:document.querySelector(x.container),nt=J.getBoundingClientRect(),it=nt.width,Kt=nt.height,Vt=nt.left,rt=nt.top;F=qt({},F,{width:it,height:Kt,left:Vt,top:rt})}$=$||F.width-x.margin*2,K=K||F.height-x.margin*2;var ot=y.zoomedHd||y.original,at=wo(ot)?$:ot.naturalWidth||$,lt=wo(ot)?K:ot.naturalHeight||K,Dt=ot.getBoundingClientRect(),jt=Dt.top,$e=Dt.left,St=Dt.width,se=Dt.height,Rt=Math.min(Math.max(St,at),$)/St,ve=Math.min(Math.max(se,lt),K)/se,Mt=Math.min(Rt,ve),At=(-$e+($-St)/2+x.margin+F.left)/Mt,Be=(-jt+(K-se)/2+x.margin+F.top)/Mt,ct="scale("+Mt+") translate3d("+At+"px, "+Be+"px, 0)";y.zoomed.style.transform=ct,y.zoomedHd&&(y.zoomedHd.style.transform=ct)};return new i(function(B){if(O&&E.indexOf(O)===-1){B(z);return}var F=function it(){I=!1,y.zoomed.removeEventListener("transitionend",it),y.original.dispatchEvent(ie("medium-zoom:opened",{detail:{zoom:z}})),B(z)};if(y.zoomed){B(z);return}if(O)y.original=O;else if(E.length>0){var $=E;y.original=$[0]}else{B(z);return}if(y.original.dispatchEvent(ie("medium-zoom:open",{detail:{zoom:z}})),L=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,I=!0,y.zoomed=Er(y.original),document.body.appendChild(X),x.template){var K=He(x.template)?x.template:document.querySelector(x.template);y.template=document.createElement("div"),y.template.appendChild(K.content.cloneNode(!0)),document.body.appendChild(y.template)}if(y.original.parentElement&&y.original.parentElement.tagName==="PICTURE"&&y.original.currentSrc&&(y.zoomed.src=y.original.currentSrc),document.body.appendChild(y.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),y.original.classList.add("medium-zoom-image--hidden"),y.zoomed.classList.add("medium-zoom-image--opened"),y.zoomed.addEventListener("click",b),y.zoomed.addEventListener("transitionend",F),y.original.getAttribute("data-zoom-src")){y.zoomedHd=y.zoomed.cloneNode(),y.zoomedHd.removeAttribute("srcset"),y.zoomedHd.removeAttribute("sizes"),y.zoomedHd.removeAttribute("loading"),y.zoomedHd.src=y.zoomed.getAttribute("data-zoom-src"),y.zoomedHd.onerror=function(){clearInterval(J),console.warn("Unable to reach the zoom image target "+y.zoomedHd.src),y.zoomedHd=null,_()};var J=setInterval(function(){y.zoomedHd.complete&&(clearInterval(J),y.zoomedHd.classList.add("medium-zoom-image--opened"),y.zoomedHd.addEventListener("click",b),document.body.appendChild(y.zoomedHd),_())},10)}else if(y.original.hasAttribute("srcset")){y.zoomedHd=y.zoomed.cloneNode(),y.zoomedHd.removeAttribute("sizes"),y.zoomedHd.removeAttribute("loading");var nt=y.zoomedHd.addEventListener("load",function(){y.zoomedHd.removeEventListener("load",nt),y.zoomedHd.classList.add("medium-zoom-image--opened"),y.zoomedHd.addEventListener("click",b),document.body.appendChild(y.zoomedHd),_()})}else _()})},b=function(){return new i(function(S){if(I||!y.original){S(z);return}var O=function _(){y.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(y.zoomed),y.zoomedHd&&document.body.removeChild(y.zoomedHd),document.body.removeChild(X),y.zoomed.classList.remove("medium-zoom-image--opened"),y.template&&document.body.removeChild(y.template),I=!1,y.zoomed.removeEventListener("transitionend",_),y.original.dispatchEvent(ie("medium-zoom:closed",{detail:{zoom:z}})),y.original=null,y.zoomed=null,y.zoomedHd=null,y.template=null,S(z)};I=!0,document.body.classList.remove("medium-zoom--opened"),y.zoomed.style.transform="",y.zoomedHd&&(y.zoomedHd.style.transform=""),y.template&&(y.template.style.transition="opacity 150ms",y.template.style.opacity=0),y.original.dispatchEvent(ie("medium-zoom:close",{detail:{zoom:z}})),y.zoomed.addEventListener("transitionend",O)})},g=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=S.target;return y.original?b():p({target:O})},w=function(){return x},f=function(){return E},v=function(){return y.original},E=[],C=[],I=!1,L=0,x=e,y={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?x=t:(t||typeof t=="string")&&c(t),x=qt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},x);var X=wr(x.background);document.addEventListener("click",o),document.addEventListener("keyup",r),document.addEventListener("scroll",s),window.addEventListener("resize",b);var z={open:p,close:b,toggle:g,update:a,clone:l,attach:c,detach:d,on:u,off:h,getOptions:w,getImages:f,getZoomedImage:v};return z};function Sr(n,t){t===void 0&&(t={});var e=t.insertAt;if(!(!n||typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n))}}var Ar=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";Sr(Ar);var xo=xr;var Cr;function So(n){let t=document.body.dataset.imageZoom;if(!t)return;let e;try{e=JSON.parse(t)}catch{return}let i=[...document.querySelectorAll(\'img[data-zoomable="true"]\')];if(!i.length)return;let o=Cr??(Cr=xo());o.update(e),o.attach(...i),n==null||n.addEventListener("abort",()=>{o.close(),o.detach(...i)});let s={signal:n},r=!1,a=l=>l.key==="Enter"||l.key===" ";for(let l of i)l.alt&&(l.tabIndex=0,l.addEventListener("keydown",c=>{a(c)&&(c.preventDefault(),r=!0,o.open({target:l}))},s),l.addEventListener("medium-zoom:opened",()=>{let c=document.querySelector(".medium-zoom-image--opened");!r||!c||(c.tabIndex=-1,c.addEventListener("keydown",d=>{a(d)&&(d.preventDefault(),o.close())}),c.focus())},s),l.addEventListener("medium-zoom:closed",()=>{r&&l.focus(),r=!1},s))}function Fe(n){return!/^[\\x00-\\x20]*([a-z][a-z0-9+.-]*:|[\\\\/])/i.test(n.replace(/[\\t\\n\\r]/g,""))}var Pe=new Map,Lr=15e3;function bn(n){let t=Pe.get(n);if(!t){let e=new Promise((i,o)=>{let s=document.createElement("script");s.src=n;let r=setTimeout(()=>a(),Lr),a=()=>{clearTimeout(r),s.onload=s.onerror=null,Pe.get(n)===e&&Pe.delete(n),o(new Error(`could not load ${n}`))};s.onload=()=>{clearTimeout(r),i()},s.onerror=a,document.head.appendChild(s)});Pe.set(n,t=e)}return t}function kr(n){document.querySelectorAll("[data-component=\'theme-toggle\']").forEach(t=>{let e=()=>t.setAttribute("aria-pressed",String(document.documentElement.classList.contains("dark")));e(),t.addEventListener("click",()=>{let i=!document.documentElement.classList.contains("dark");document.documentElement.classList.toggle("dark",i);try{localStorage.setItem("theme",i?"dark":"light")}catch{}e()},{signal:n})})}function Tr(n){document.addEventListener("click",async t=>{var o,s,r,a;let e=t.target.closest("[data-copy-markdown]");if(!e)return;let i=(((o=document.getElementById("db-page-markdown"))==null?void 0:o.textContent)??"").replace(/<\\\\\\/(script)/gi,"</$1").replace(/<\\\\!--/g,"<!--");try{await navigator.clipboard.writeText(i);let l=(s=e.dataset).label??(s.label=e.textContent??"");e.textContent="Copied",clearTimeout(Number(e.dataset.timer)),e.dataset.timer=String(setTimeout(()=>e.textContent=l,1500))}catch{}(a=(r=e.closest("db-popover"))==null?void 0:r.close)==null||a.call(r,"close-press")},{signal:n})}function Or(n,t){let e=document.body.dataset.page??"index.html";document.querySelectorAll("select[data-db-switch]").forEach(i=>{i.addEventListener("change",async()=>{var a;let o=i.selectedOptions[0];if(!o||o.disabled||!o.hasAttribute("value"))return;let s=o.dataset.prefix??"",r=i.value;if(o.hasAttribute("data-link")){(Fe(r)||/^https?:\\/\\//i.test(r))&&(location.href=r);return}if(!(!Fe(r)||!Fe(s))){if(i.dataset.dbSwitch==="product"){location.href=r;return}try{let l=s?`${n}${s}/`:n;await bn(`${l}_dogsbay/pages.js`);let c=(a=window.__DOGSBAY_PAGES__)==null?void 0:a[s];location.href=c&&!c.includes(e)?`${l}index.html`:r}catch{location.href=r}}},{signal:t})})}function Dr(n){document.addEventListener("click",t=>{var i;let e=t.target.closest("a.db-anchor");!e||location.protocol==="file:"||(i=navigator.clipboard)==null||i.writeText(e.href).catch(()=>{})},{signal:n})}var be=new Map,ze=new Set;function _e(){for(let[n,t]of be)n.isConnected||(Tt(n),t.abort(),be.delete(n));for(let n of ze)n.isConnected||Tt(n)}function Rr(n,t){let e=EventTarget.prototype,i=e.addEventListener,o=0;e.addEventListener=function(s,r,a){o++;let l=typeof a=="object"?a.signal:void 0;i.call(this,s,r,typeof a=="object"?{...a,signal:l?AbortSignal.any([l,n]):n}:{capture:a===!0,signal:n})};try{t()}finally{e.addEventListener=i}return o}function Mr(){_e(),document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(n=>{if(be.has(n)||ze.has(n))return;let t=new AbortController;Rr(t.signal,()=>sn(n))?be.set(n,t):n.querySelector("[data-component=\'sidebar\']")&&ze.add(n)}),document.removeEventListener("keydown",_e),document.addEventListener("keydown",_e)}var oe;function vn(n={}){var a;oe==null||oe.unmount();let t=new AbortController,{signal:e}=t,i=document.body,o=i.dataset.unitRoot??"",s=i.dataset.siteRoot??"";if(n.nav!==void 0){window.__DOGSBAY_NAV__=n.nav;for(let l of document.querySelectorAll("db-nav-tree")){let c=l.querySelector(":scope > [data-part=\'list\']");c&&!c.querySelector("[data-part=\'item\']")&&((a=l.parentNode)==null||a.insertBefore(l,l.nextSibling))}}Mr(),n.theme!==!1&&kr(e),Tr(e),n.switchers!==!1&&Or(s,e),Dr(e),n.search!==!1&&(po({unitRoot:o,siteRoot:s,prefix:i.dataset.prefix??"",loadScript:bn,signal:e}),go({unitRoot:o,siteRoot:s,prefix:i.dataset.prefix??"",loadScript:bn,signal:e})),yo(e),So(e);let r={unmount(){if(!e.aborted){t.abort();for(let l of[...be.keys(),...ze])Tt(l);_e(),oe===r&&(oe=void 0)}}};return oe=r}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>vn()):vn();})();\n';
|
|
22775
|
+
var CLIENT_FILE = "dogsbay-f4d41625ab.js";
|
|
22776
|
+
var SSG_VERSION = "0.2.0-beta.176";
|
|
22313
22777
|
var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or table of contents: landing pages, splash pages, 404. -#}\n<!doctype html>\n<html lang="{{ page.lang }}" dir="{{ page.dir }}"{% if site.colorMode == "dark" %} class="dark"{% endif %}{% if has.crowdedHeader %} data-header="crowded"{% endif %}>\n<head>\n{% include "partials/head.html" %}\n</head>\n<body class="bg-background text-foreground antialiased" data-unit-root="{{ paths.unit }}" data-site-root="{{ paths.site }}" data-prefix="{{ page.prefix }}" data-page="{{ page.out }}"{{ bodyAttrs }}>\n{{ skipLink }}\n<div class="relative flex min-h-svh w-full flex-col bg-background">\n{{ announcementBar }}\n{% include "partials/header.html" %}\n<main id="db-content" class="min-w-0 flex-1 px-6 py-8 outline-none lg:px-12" tabindex="-1">\n<div class="mx-auto {{ widthClass }}">\n{{ banner }}{{ versionBadge }}{{ h1 }}{{ byline }}{{ lede }}{{ hero }}{{ metaStrip }}{{ tocTop }}\n<article class="docs-prose">\n{{ content }}\n</article>\n{% include "partials/footer.html" %}\n</div>\n</main>\n</div>\n{{ searchDialog }}\n{{ scripts }}\n</body>\n</html>\n', "layouts/docs.html": '{# The docs layout: a port of @dogsbay/docs-layout DocsLayout.astro. -#}\n<!doctype html>\n<html lang="{{ page.lang }}" dir="{{ page.dir }}"{% if site.colorMode == "dark" %} class="dark"{% endif %}{% if has.crowdedHeader %} data-header="crowded"{% endif %}>\n<head>\n{% include "partials/head.html" %}\n</head>\n<body class="bg-background text-foreground antialiased" data-unit-root="{{ paths.unit }}" data-site-root="{{ paths.site }}" data-prefix="{{ page.prefix }}" data-page="{{ page.out }}"{{ bodyAttrs }}>\n{{ skipLink }}\n<div class="group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar" data-component="sidebar-provider" style="--sidebar-width: 16rem; --sidebar-width-icon: 3rem;">\n{{ sidebar }}\n<div class="relative flex w-full min-w-0 flex-1 flex-col bg-background">\n{{ announcementBar }}\n{% include "partials/header.html" %}\n<div class="flex min-w-0">\n<main id="db-content" class="min-w-0 flex-1 px-6 py-8 outline-none lg:px-12" tabindex="-1">\n<div class="mx-auto {{ widthClass }}">\n{{ banner }}{{ breadcrumb }}{{ pageActionsInline }}{{ versionBadge }}{{ h1 }}{{ byline }}{{ lede }}{{ hero }}{{ metaStrip }}{{ tocTop }}\n<article class="docs-prose">\n{{ content }}\n</article>\n{% include "partials/footer.html" %}\n</div>\n</main>\n{{ tocRail }}\n</div>\n</div>\n</div>\n{{ searchDialog }}\n{{ scripts }}\n</body>\n</html>\n', "partials/announcement.html": `{#- The site's announcement bar (site.announcement), as DocsLayout's AnnouncementBar.astro: a band above the
|
|
22314
22778
|
header in the callout colours of its tone. A closeable one is closed and remembered by <db-announcement>,
|
|
22315
22779
|
and the head script hides a closed one before first paint. Context: announcement = {id, key (what a close is
|
|
@@ -22543,31 +23007,31 @@ var CLIENT_CANDIDATES = ['""', '""}', '"&"', '")}', '"./",', '"Also', '"\\\\$&")
|
|
|
22543
23007
|
var SITE_NOTICES = `Third-party software in this site's _dogsbay/ files (dogsbay.js, site.css) and pages
|
|
22544
23008
|
|
|
22545
23009
|
========================================================================
|
|
22546
|
-
@dogsbay/elements@0.2.0-beta.
|
|
23010
|
+
@dogsbay/elements@0.2.0-beta.176 (MIT)
|
|
22547
23011
|
https://github.com/dogsbay/dogsbay.git
|
|
22548
23012
|
|
|
22549
23013
|
Licensed under MIT; the package ships no licence file.
|
|
22550
23014
|
|
|
22551
23015
|
========================================================================
|
|
22552
|
-
@dogsbay/primitives@0.2.0-beta.
|
|
23016
|
+
@dogsbay/primitives@0.2.0-beta.176 (MIT)
|
|
22553
23017
|
https://github.com/dogsbay/dogsbay.git
|
|
22554
23018
|
|
|
22555
23019
|
Licensed under MIT; the package ships no licence file.
|
|
22556
23020
|
|
|
22557
23021
|
========================================================================
|
|
22558
|
-
@dogsbay/render-html@0.2.0-beta.
|
|
23022
|
+
@dogsbay/render-html@0.2.0-beta.176 (MIT)
|
|
22559
23023
|
https://github.com/dogsbay/dogsbay.git
|
|
22560
23024
|
|
|
22561
23025
|
Licensed under MIT; the package ships no licence file.
|
|
22562
23026
|
|
|
22563
23027
|
========================================================================
|
|
22564
|
-
@dogsbay/search@0.2.0-beta.
|
|
23028
|
+
@dogsbay/search@0.2.0-beta.176 (MIT)
|
|
22565
23029
|
https://github.com/dogsbay/dogsbay.git
|
|
22566
23030
|
|
|
22567
23031
|
Licensed under MIT; the package ships no licence file.
|
|
22568
23032
|
|
|
22569
23033
|
========================================================================
|
|
22570
|
-
@dogsbay/ui@0.2.0-beta.
|
|
23034
|
+
@dogsbay/ui@0.2.0-beta.176 (MIT)
|
|
22571
23035
|
https://github.com/dogsbay/dogsbay.git
|
|
22572
23036
|
|
|
22573
23037
|
Licensed under MIT; the package ships no licence file.
|
|
@@ -25259,28 +25723,28 @@ var EntityDecoder2 = class {
|
|
|
25259
25723
|
* @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
|
|
25260
25724
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
25261
25725
|
*/
|
|
25262
|
-
write(
|
|
25726
|
+
write(str8, offset) {
|
|
25263
25727
|
switch (this.state) {
|
|
25264
25728
|
case EntityDecoderState2.EntityStart: {
|
|
25265
|
-
if (
|
|
25729
|
+
if (str8.charCodeAt(offset) === CharCodes3.NUM) {
|
|
25266
25730
|
this.state = EntityDecoderState2.NumericStart;
|
|
25267
25731
|
this.consumed += 1;
|
|
25268
|
-
return this.stateNumericStart(
|
|
25732
|
+
return this.stateNumericStart(str8, offset + 1);
|
|
25269
25733
|
}
|
|
25270
25734
|
this.state = EntityDecoderState2.NamedEntity;
|
|
25271
|
-
return this.stateNamedEntity(
|
|
25735
|
+
return this.stateNamedEntity(str8, offset);
|
|
25272
25736
|
}
|
|
25273
25737
|
case EntityDecoderState2.NumericStart: {
|
|
25274
|
-
return this.stateNumericStart(
|
|
25738
|
+
return this.stateNumericStart(str8, offset);
|
|
25275
25739
|
}
|
|
25276
25740
|
case EntityDecoderState2.NumericDecimal: {
|
|
25277
|
-
return this.stateNumericDecimal(
|
|
25741
|
+
return this.stateNumericDecimal(str8, offset);
|
|
25278
25742
|
}
|
|
25279
25743
|
case EntityDecoderState2.NumericHex: {
|
|
25280
|
-
return this.stateNumericHex(
|
|
25744
|
+
return this.stateNumericHex(str8, offset);
|
|
25281
25745
|
}
|
|
25282
25746
|
case EntityDecoderState2.NamedEntity: {
|
|
25283
|
-
return this.stateNamedEntity(
|
|
25747
|
+
return this.stateNamedEntity(str8, offset);
|
|
25284
25748
|
}
|
|
25285
25749
|
}
|
|
25286
25750
|
}
|
|
@@ -25293,22 +25757,22 @@ var EntityDecoder2 = class {
|
|
|
25293
25757
|
* @param offset The current offset.
|
|
25294
25758
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
25295
25759
|
*/
|
|
25296
|
-
stateNumericStart(
|
|
25297
|
-
if (offset >=
|
|
25760
|
+
stateNumericStart(str8, offset) {
|
|
25761
|
+
if (offset >= str8.length) {
|
|
25298
25762
|
return -1;
|
|
25299
25763
|
}
|
|
25300
|
-
if ((
|
|
25764
|
+
if ((str8.charCodeAt(offset) | TO_LOWER_BIT2) === CharCodes3.LOWER_X) {
|
|
25301
25765
|
this.state = EntityDecoderState2.NumericHex;
|
|
25302
25766
|
this.consumed += 1;
|
|
25303
|
-
return this.stateNumericHex(
|
|
25767
|
+
return this.stateNumericHex(str8, offset + 1);
|
|
25304
25768
|
}
|
|
25305
25769
|
this.state = EntityDecoderState2.NumericDecimal;
|
|
25306
|
-
return this.stateNumericDecimal(
|
|
25770
|
+
return this.stateNumericDecimal(str8, offset);
|
|
25307
25771
|
}
|
|
25308
|
-
addToNumericResult(
|
|
25772
|
+
addToNumericResult(str8, start, end, base) {
|
|
25309
25773
|
if (start !== end) {
|
|
25310
25774
|
const digitCount = end - start;
|
|
25311
|
-
this.result = this.result * Math.pow(base, digitCount) + parseInt(
|
|
25775
|
+
this.result = this.result * Math.pow(base, digitCount) + parseInt(str8.substr(start, digitCount), base);
|
|
25312
25776
|
this.consumed += digitCount;
|
|
25313
25777
|
}
|
|
25314
25778
|
}
|
|
@@ -25321,18 +25785,18 @@ var EntityDecoder2 = class {
|
|
|
25321
25785
|
* @param offset The current offset.
|
|
25322
25786
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
25323
25787
|
*/
|
|
25324
|
-
stateNumericHex(
|
|
25788
|
+
stateNumericHex(str8, offset) {
|
|
25325
25789
|
const startIdx = offset;
|
|
25326
|
-
while (offset <
|
|
25327
|
-
const char =
|
|
25790
|
+
while (offset < str8.length) {
|
|
25791
|
+
const char = str8.charCodeAt(offset);
|
|
25328
25792
|
if (isNumber2(char) || isHexadecimalCharacter2(char)) {
|
|
25329
25793
|
offset += 1;
|
|
25330
25794
|
} else {
|
|
25331
|
-
this.addToNumericResult(
|
|
25795
|
+
this.addToNumericResult(str8, startIdx, offset, 16);
|
|
25332
25796
|
return this.emitNumericEntity(char, 3);
|
|
25333
25797
|
}
|
|
25334
25798
|
}
|
|
25335
|
-
this.addToNumericResult(
|
|
25799
|
+
this.addToNumericResult(str8, startIdx, offset, 16);
|
|
25336
25800
|
return -1;
|
|
25337
25801
|
}
|
|
25338
25802
|
/**
|
|
@@ -25344,18 +25808,18 @@ var EntityDecoder2 = class {
|
|
|
25344
25808
|
* @param offset The current offset.
|
|
25345
25809
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
25346
25810
|
*/
|
|
25347
|
-
stateNumericDecimal(
|
|
25811
|
+
stateNumericDecimal(str8, offset) {
|
|
25348
25812
|
const startIdx = offset;
|
|
25349
|
-
while (offset <
|
|
25350
|
-
const char =
|
|
25813
|
+
while (offset < str8.length) {
|
|
25814
|
+
const char = str8.charCodeAt(offset);
|
|
25351
25815
|
if (isNumber2(char)) {
|
|
25352
25816
|
offset += 1;
|
|
25353
25817
|
} else {
|
|
25354
|
-
this.addToNumericResult(
|
|
25818
|
+
this.addToNumericResult(str8, startIdx, offset, 10);
|
|
25355
25819
|
return this.emitNumericEntity(char, 2);
|
|
25356
25820
|
}
|
|
25357
25821
|
}
|
|
25358
|
-
this.addToNumericResult(
|
|
25822
|
+
this.addToNumericResult(str8, startIdx, offset, 10);
|
|
25359
25823
|
return -1;
|
|
25360
25824
|
}
|
|
25361
25825
|
/**
|
|
@@ -25400,12 +25864,12 @@ var EntityDecoder2 = class {
|
|
|
25400
25864
|
* @param offset The current offset.
|
|
25401
25865
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
25402
25866
|
*/
|
|
25403
|
-
stateNamedEntity(
|
|
25867
|
+
stateNamedEntity(str8, offset) {
|
|
25404
25868
|
const { decodeTree } = this;
|
|
25405
25869
|
let current = decodeTree[this.treeIndex];
|
|
25406
25870
|
let valueLength = (current & BinTrieFlags2.VALUE_LENGTH) >> 14;
|
|
25407
|
-
for (; offset <
|
|
25408
|
-
const char =
|
|
25871
|
+
for (; offset < str8.length; offset++, this.excess++) {
|
|
25872
|
+
const char = str8.charCodeAt(offset);
|
|
25409
25873
|
this.treeIndex = determineBranch2(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
|
|
25410
25874
|
if (this.treeIndex < 0) {
|
|
25411
25875
|
return this.result === 0 || // If we are parsing an attribute
|
|
@@ -25490,15 +25954,15 @@ var EntityDecoder2 = class {
|
|
|
25490
25954
|
};
|
|
25491
25955
|
function getDecoder(decodeTree) {
|
|
25492
25956
|
let ret = "";
|
|
25493
|
-
const decoder2 = new EntityDecoder2(decodeTree, (
|
|
25494
|
-
return function decodeWithTrie(
|
|
25957
|
+
const decoder2 = new EntityDecoder2(decodeTree, (str8) => ret += fromCodePoint2(str8));
|
|
25958
|
+
return function decodeWithTrie(str8, decodeMode) {
|
|
25495
25959
|
let lastIndex = 0;
|
|
25496
25960
|
let offset = 0;
|
|
25497
|
-
while ((offset =
|
|
25498
|
-
ret +=
|
|
25961
|
+
while ((offset = str8.indexOf("&", offset)) >= 0) {
|
|
25962
|
+
ret += str8.slice(lastIndex, offset);
|
|
25499
25963
|
decoder2.startEntity(decodeMode);
|
|
25500
25964
|
const len = decoder2.write(
|
|
25501
|
-
|
|
25965
|
+
str8,
|
|
25502
25966
|
// Skip the "&"
|
|
25503
25967
|
offset + 1
|
|
25504
25968
|
);
|
|
@@ -25509,7 +25973,7 @@ function getDecoder(decodeTree) {
|
|
|
25509
25973
|
lastIndex = offset + len;
|
|
25510
25974
|
offset = len === 0 ? lastIndex + 1 : lastIndex;
|
|
25511
25975
|
}
|
|
25512
|
-
const result = ret +
|
|
25976
|
+
const result = ret + str8.slice(lastIndex);
|
|
25513
25977
|
ret = "";
|
|
25514
25978
|
return result;
|
|
25515
25979
|
};
|
|
@@ -25562,28 +26026,28 @@ var xmlCodeMap = /* @__PURE__ */ new Map([
|
|
|
25562
26026
|
]);
|
|
25563
26027
|
var getCodePoint = (
|
|
25564
26028
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
25565
|
-
String.prototype.codePointAt != null ? (
|
|
26029
|
+
String.prototype.codePointAt != null ? (str8, index) => str8.codePointAt(index) : (
|
|
25566
26030
|
// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
|
|
25567
26031
|
(c, index) => (c.charCodeAt(index) & 64512) === 55296 ? (c.charCodeAt(index) - 55296) * 1024 + c.charCodeAt(index + 1) - 56320 + 65536 : c.charCodeAt(index)
|
|
25568
26032
|
)
|
|
25569
26033
|
);
|
|
25570
|
-
function encodeXML(
|
|
26034
|
+
function encodeXML(str8) {
|
|
25571
26035
|
let ret = "";
|
|
25572
26036
|
let lastIdx = 0;
|
|
25573
26037
|
let match;
|
|
25574
|
-
while ((match = xmlReplacer.exec(
|
|
26038
|
+
while ((match = xmlReplacer.exec(str8)) !== null) {
|
|
25575
26039
|
const i = match.index;
|
|
25576
|
-
const char =
|
|
26040
|
+
const char = str8.charCodeAt(i);
|
|
25577
26041
|
const next = xmlCodeMap.get(char);
|
|
25578
26042
|
if (next !== void 0) {
|
|
25579
|
-
ret +=
|
|
26043
|
+
ret += str8.substring(lastIdx, i) + next;
|
|
25580
26044
|
lastIdx = i + 1;
|
|
25581
26045
|
} else {
|
|
25582
|
-
ret += `${
|
|
26046
|
+
ret += `${str8.substring(lastIdx, i)}&#x${getCodePoint(str8, i).toString(16)};`;
|
|
25583
26047
|
lastIdx = xmlReplacer.lastIndex += Number((char & 64512) === 55296);
|
|
25584
26048
|
}
|
|
25585
26049
|
}
|
|
25586
|
-
return ret +
|
|
26050
|
+
return ret + str8.substr(lastIdx);
|
|
25587
26051
|
}
|
|
25588
26052
|
function getEscaper(regex, map) {
|
|
25589
26053
|
return function escape2(data) {
|
|
@@ -26487,7 +26951,6 @@ var TEXT_HTML_TYPES = /* @__PURE__ */ new Set(["code", "math", "math-block", "di
|
|
|
26487
26951
|
var URL_PROPS = /* @__PURE__ */ new Set(["href", "src", "url", "link", "poster", "image", "logo"]);
|
|
26488
26952
|
var escAttr3 = (s) => s.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
26489
26953
|
var escText2 = (s) => s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
26490
|
-
var RESERVED_ID3 = /^(db-|tab-\d|tabpanel-\d|acc-\d|accpanel-\d|fn-|fnref-)/;
|
|
26491
26954
|
function safeUrl(raw, kind) {
|
|
26492
26955
|
const v = raw.replace(/[\u0000- \u007f-\u009f]/g, "").toLowerCase();
|
|
26493
26956
|
const scheme = /^([a-z][a-z0-9+.-]*):/.exec(v)?.[1];
|
|
@@ -26531,7 +26994,7 @@ function sanitizeHtml(html, warn) {
|
|
|
26531
26994
|
dropped.add(`${name}[${key2}]`);
|
|
26532
26995
|
continue;
|
|
26533
26996
|
}
|
|
26534
|
-
if (key2 === "id" &&
|
|
26997
|
+
if (key2 === "id" && RESERVED_ID.test(v)) {
|
|
26535
26998
|
dropped.add(`${name}[id=${v.slice(0, 40)}]`);
|
|
26536
26999
|
continue;
|
|
26537
27000
|
}
|
|
@@ -26574,7 +27037,7 @@ function cleanProps(props, where, warn) {
|
|
|
26574
27037
|
warn("attribute-dropped", `${where}: dropped the "${k}" attribute (not allowed in a sanitized page)`);
|
|
26575
27038
|
continue;
|
|
26576
27039
|
}
|
|
26577
|
-
if (k === "id" && typeof v === "string" &&
|
|
27040
|
+
if (k === "id" && typeof v === "string" && RESERVED_ID.test(v) && !where.startsWith("footnote")) {
|
|
26578
27041
|
warn("attribute-dropped", `${where}: dropped id="${v.slice(0, 40)}" (reserved for the page's own components)`);
|
|
26579
27042
|
continue;
|
|
26580
27043
|
}
|
|
@@ -26682,11 +27145,11 @@ function safeSegment(s) {
|
|
|
26682
27145
|
}
|
|
26683
27146
|
var ARRAY_FIELDS = /* @__PURE__ */ new Set(["tags", "category", "audience"]);
|
|
26684
27147
|
var SCALAR_FIELDS = /* @__PURE__ */ new Set(["type", "status"]);
|
|
26685
|
-
function pageTerms(
|
|
26686
|
-
const m =
|
|
27148
|
+
function pageTerms(meta2, name) {
|
|
27149
|
+
const m = meta2;
|
|
26687
27150
|
if (ARRAY_FIELDS.has(name)) return Array.isArray(m[name]) ? m[name].filter((v) => typeof v === "string") : [];
|
|
26688
27151
|
if (SCALAR_FIELDS.has(name)) return typeof m[name] === "string" ? [m[name]] : [];
|
|
26689
|
-
return
|
|
27152
|
+
return meta2.taxonomies?.[name] ?? [];
|
|
26690
27153
|
}
|
|
26691
27154
|
function expandTerm(term, hierarchical) {
|
|
26692
27155
|
const segs = term.split("/").filter(Boolean);
|
|
@@ -26695,12 +27158,12 @@ function expandTerm(term, hierarchical) {
|
|
|
26695
27158
|
return segs.map((_, i) => segs.slice(0, i + 1));
|
|
26696
27159
|
}
|
|
26697
27160
|
function searchFilters(defs, fm, slug, unit) {
|
|
26698
|
-
const
|
|
26699
|
-
if (
|
|
26700
|
-
const { tag: _t, section: _s, ...rest } =
|
|
26701
|
-
|
|
27161
|
+
const meta2 = parseMeta(fm, { slug, taxonomyNames: defs.map((d) => d.name) });
|
|
27162
|
+
if (meta2.taxonomies && (Object.hasOwn(meta2.taxonomies, "tag") || Object.hasOwn(meta2.taxonomies, "section"))) {
|
|
27163
|
+
const { tag: _t, section: _s, ...rest } = meta2.taxonomies;
|
|
27164
|
+
meta2.taxonomies = rest;
|
|
26702
27165
|
}
|
|
26703
|
-
const all = pageFacets(
|
|
27166
|
+
const all = pageFacets(meta2, {
|
|
26704
27167
|
tagPrefixes: searchTagPrefixes(defs),
|
|
26705
27168
|
hierarchical: defs.filter((d) => d.hierarchical).map((d) => d.name),
|
|
26706
27169
|
unit
|
|
@@ -26730,10 +27193,10 @@ var TaxonomyCollector = class {
|
|
|
26730
27193
|
/** Record a page's terms from its front matter. */
|
|
26731
27194
|
add(slug, fm) {
|
|
26732
27195
|
if (!this.defs.length) return;
|
|
26733
|
-
const
|
|
27196
|
+
const meta2 = parseMeta(fm, { slug, taxonomyNames: this.names });
|
|
26734
27197
|
for (const def of this.defs) {
|
|
26735
27198
|
const terms = this.byName.get(def.name);
|
|
26736
|
-
for (const value of pageTerms(
|
|
27199
|
+
for (const value of pageTerms(meta2, def.name)) {
|
|
26737
27200
|
for (const path of expandTerm(value, def.hierarchical)) {
|
|
26738
27201
|
const key2 = path.join("/");
|
|
26739
27202
|
let t = terms.get(key2);
|
|
@@ -27235,17 +27698,6 @@ function socialIconSvg(name, size = 20) {
|
|
|
27235
27698
|
}
|
|
27236
27699
|
var SOCIAL_ICONS = Object.keys(SOCIAL_ICON_BODIES);
|
|
27237
27700
|
|
|
27238
|
-
// node_modules/@dogsbay/elements/dist/chunk-MNO3RAM2.js
|
|
27239
|
-
var ANNOUNCEMENT_HEAD_SCRIPT = `(function(){try{var m=document.querySelector('meta[name="db-announcement"]');if(m&&m.content&&localStorage.getItem("db-announcement-closed:"+m.content))document.documentElement.setAttribute("data-announcement-closed","")}catch(e){}})();`;
|
|
27240
|
-
|
|
27241
|
-
// node_modules/@dogsbay/elements/dist/chunk-QDB537UE.js
|
|
27242
|
-
var script = (fallback) => `(function(){var s=null;try{s=localStorage.getItem("theme")}catch(e){}var d=s==="dark"||(s!=="light"&&${fallback});document.documentElement.classList.toggle("dark",d)})();`;
|
|
27243
|
-
var COLOR_MODE_HEAD_SCRIPTS = Object.freeze({
|
|
27244
|
-
system: script('window.matchMedia("(prefers-color-scheme: dark)").matches'),
|
|
27245
|
-
light: script("false"),
|
|
27246
|
-
dark: script("true")
|
|
27247
|
-
});
|
|
27248
|
-
|
|
27249
27701
|
// src/theme/compose.ts
|
|
27250
27702
|
var LINKS_LIST_HIDDEN = { lg: "lg:hidden", xl: "xl:hidden", "2xl": "2xl:hidden", never: "" };
|
|
27251
27703
|
var LINKS_BAR = { lg: "hidden lg:flex", xl: "hidden xl:flex", "2xl": "hidden 2xl:flex", never: "hidden" };
|
|
@@ -27470,7 +27922,7 @@ async function composePage(p, cfg, templates) {
|
|
|
27470
27922
|
// src/theme/pagefind.ts
|
|
27471
27923
|
function pagefindMarkup(html, o = {}) {
|
|
27472
27924
|
if (o.exclude) return html.replace(/<body\b(?![^>]*data-pagefind-ignore)/, "<body data-pagefind-ignore");
|
|
27473
|
-
return html.replace(/<main\b(?![^>]*data-pagefind-body)/, "<main data-pagefind-body").replace(/<details\b(?![^>]*data-pagefind-ignore)([^>]*\bdata-toc-top\b)/g, "<details data-pagefind-ignore$1").replace(/<db-toc\b(?![^>]*data-pagefind-ignore)/g, "<db-toc data-pagefind-ignore").replace(/<nav\b(?![^>]*data-pagefind-ignore)([^>]*\bdata-pager\b)/g, "<nav data-pagefind-ignore$1").replace(/<div\b(?![^>]*data-pagefind-ignore)([^>]*\bdata-page-meta-strip\b)/g, "<div data-pagefind-ignore$1").replace(/<ul\b(?![^>]*data-pagefind-weight)([^>]*\bdata-tag-list\b)/g, '<ul data-pagefind-weight="5"$1');
|
|
27925
|
+
return html.replace(/<main\b(?![^>]*data-pagefind-body)/, "<main data-pagefind-body").replace(/<details\b(?![^>]*data-pagefind-ignore)([^>]*\bdata-toc-top\b)/g, "<details data-pagefind-ignore$1").replace(/<db-toc\b(?![^>]*data-pagefind-ignore)/g, "<db-toc data-pagefind-ignore").replace(/<nav\b(?![^>]*data-pagefind-ignore)([^>]*\bdata-pager\b)/g, "<nav data-pagefind-ignore$1").replace(/<div\b(?![^>]*data-pagefind-ignore)([^>]*\bdata-page-meta-strip\b)/g, "<div data-pagefind-ignore$1").replace(/<div\b(?![^>]*data-pagefind-ignore)([^>]*\bdata-pdf="only")/g, '<div data-pagefind-ignore="all"$1').replace(/<ul\b(?![^>]*data-pagefind-weight)([^>]*\bdata-tag-list\b)/g, '<ul data-pagefind-weight="5"$1');
|
|
27474
27926
|
}
|
|
27475
27927
|
|
|
27476
27928
|
// src/theme/page.ts
|
|
@@ -28146,8 +28598,8 @@ var SearchIndexBuilder = class {
|
|
|
28146
28598
|
if (f.length) return [d.title, d.url, i, t, f];
|
|
28147
28599
|
return t.length ? [d.title, d.url, i, t] : [d.title, d.url, i];
|
|
28148
28600
|
});
|
|
28149
|
-
const
|
|
28150
|
-
yield [file.docs, wrap(key.docs,
|
|
28601
|
+
const meta2 = { format: FORMAT2, depth, count: this.docs.length, shards: [...byShard.keys()].sort(), sections: sections2, tags, ...facets.length ? { facets } : {}, block: BLOCK, lang: this.opts.lang, docs };
|
|
28602
|
+
yield [file.docs, wrap(key.docs, meta2)];
|
|
28151
28603
|
for (let b = this.fragmentsOut; b * BLOCK < this.docs.length; b++) yield this.fragmentFile(b);
|
|
28152
28604
|
if (!this.grouped) {
|
|
28153
28605
|
const n = this.termIds.size;
|
|
@@ -28190,7 +28642,7 @@ var SearchIndexBuilder = class {
|
|
|
28190
28642
|
this.grouped = void 0;
|
|
28191
28643
|
}
|
|
28192
28644
|
};
|
|
28193
|
-
var
|
|
28645
|
+
var str6 = (v) => typeof v === "string" ? v : "";
|
|
28194
28646
|
var objects = (v) => Array.isArray(v) ? v.filter((x) => !!x && typeof x === "object") : [];
|
|
28195
28647
|
var INLINE_TAGS = new Set("a abbr b bdi bdo cite code data del dfn em i ins kbd mark q s samp small span strong sub sup time u var wbr".split(" "));
|
|
28196
28648
|
var ENTITY3 = { lt: "<", gt: ">", quot: '"', "#39": "'", "#x27": "'", apos: "'", nbsp: " ", amp: "&" };
|
|
@@ -28276,13 +28728,13 @@ function htmlText(html) {
|
|
|
28276
28728
|
}
|
|
28277
28729
|
function propertyText(list5, depth = 0) {
|
|
28278
28730
|
if (depth > 10) return [];
|
|
28279
|
-
return objects(list5).flatMap((p) => [
|
|
28731
|
+
return objects(list5).flatMap((p) => [str6(p.name), specText(p.description), ...propertyText(p.properties, depth + 1), ...propertyText(p.items, depth + 1)]);
|
|
28280
28732
|
}
|
|
28281
28733
|
var SPEC_MARKUP = /* @__PURE__ */ new Set(
|
|
28282
28734
|
[...INLINE_TAGS, ..."br p div ul ol li dl dt dd table thead tbody tfoot tr td th caption h1 h2 h3 h4 h5 h6 blockquote hr img pre section".split(" ")]
|
|
28283
28735
|
);
|
|
28284
28736
|
function specText(v) {
|
|
28285
|
-
const s =
|
|
28737
|
+
const s = str6(v);
|
|
28286
28738
|
if (!s.includes("<") && !s.includes("&")) return s;
|
|
28287
28739
|
return s.split(/(`+[^`]*`+)/).map(
|
|
28288
28740
|
(part, i) => i % 2 ? part : decode2(part.replace(/<\/?([a-z][a-z0-9]*)\b[^<>]*>/gi, (m, name) => SPEC_MARKUP.has(name.toLowerCase()) ? INLINE_TAGS.has(name.toLowerCase()) ? "" : " " : m))
|
|
@@ -28307,11 +28759,12 @@ function extractText2(tree) {
|
|
|
28307
28759
|
const walk = (nodes) => {
|
|
28308
28760
|
for (const n of nodes ?? []) {
|
|
28309
28761
|
if (n.type === "code" || n.type === "api-source") continue;
|
|
28762
|
+
if (n.type === "container" && n.meta?.name === "pdf-only") continue;
|
|
28310
28763
|
const ap = n.props ?? {};
|
|
28311
28764
|
switch (n.type) {
|
|
28312
28765
|
case "endpoint":
|
|
28313
28766
|
body.push(
|
|
28314
|
-
`${
|
|
28767
|
+
`${str6(ap.method).toUpperCase()} ${str6(ap.path)}`,
|
|
28315
28768
|
specText(ap.summary),
|
|
28316
28769
|
specText(ap.description),
|
|
28317
28770
|
...propertyText(ap.parameters),
|
|
@@ -28321,15 +28774,15 @@ function extractText2(tree) {
|
|
|
28321
28774
|
continue;
|
|
28322
28775
|
case "api-class":
|
|
28323
28776
|
case "api-member":
|
|
28324
|
-
headings.push(
|
|
28777
|
+
headings.push(str6(ap.name));
|
|
28325
28778
|
walk(n.children);
|
|
28326
28779
|
continue;
|
|
28327
28780
|
case "api-doc":
|
|
28328
|
-
body.push(htmlText(
|
|
28781
|
+
body.push(htmlText(str6(ap.html)));
|
|
28329
28782
|
walk(n.children);
|
|
28330
28783
|
continue;
|
|
28331
28784
|
case "api-params":
|
|
28332
|
-
for (const p2 of objects(ap.params)) body.push(
|
|
28785
|
+
for (const p2 of objects(ap.params)) body.push(str6(p2.name), htmlText(str6(p2.docHtml)) || str6(p2.doc) || str6(p2.description));
|
|
28333
28786
|
continue;
|
|
28334
28787
|
case "prose":
|
|
28335
28788
|
if (!n.inline && typeof n.html === "string") {
|
|
@@ -28863,16 +29316,16 @@ var BlogCollector = class {
|
|
|
28863
29316
|
}
|
|
28864
29317
|
posts = /* @__PURE__ */ new Map();
|
|
28865
29318
|
add(slug, title, fm) {
|
|
28866
|
-
const
|
|
28867
|
-
const date =
|
|
28868
|
-
const updated =
|
|
29319
|
+
const meta2 = parseMeta(fm);
|
|
29320
|
+
const date = meta2[this.def.dateField];
|
|
29321
|
+
const updated = meta2.updated;
|
|
28869
29322
|
const d = (s) => s === void 0 ? void 0 : detach(s);
|
|
28870
29323
|
this.posts.set(slug, {
|
|
28871
29324
|
slug,
|
|
28872
29325
|
title,
|
|
28873
29326
|
date: d(date),
|
|
28874
29327
|
updated: updated && updated !== date ? d(updated) : void 0,
|
|
28875
|
-
authors:
|
|
29328
|
+
authors: meta2.author?.map(detach),
|
|
28876
29329
|
heroImage: typeof fm.heroImage === "string" && fm.heroImage ? d(fm.heroImage) : void 0
|
|
28877
29330
|
});
|
|
28878
29331
|
}
|
|
@@ -29203,7 +29656,7 @@ function diagramStore(input, cfg) {
|
|
|
29203
29656
|
return renderer ? new DiagramStore(renderer, input.diagramCacheChars, input.diagramPinChars) : void 0;
|
|
29204
29657
|
}
|
|
29205
29658
|
async function siteCssBuilder(input) {
|
|
29206
|
-
return input.css ?? (await import("./css-build-
|
|
29659
|
+
return input.css ?? (await import("./css-build-VKKTSP6P.mjs")).buildSiteCss;
|
|
29207
29660
|
}
|
|
29208
29661
|
var SITE_FILES = /* @__PURE__ */ new Set(["robots.txt", "sitemap-index.xml"]);
|
|
29209
29662
|
var SEARCH_PAGE = "search.html";
|
|
@@ -29246,14 +29699,14 @@ function pageLinesOf(tree) {
|
|
|
29246
29699
|
return;
|
|
29247
29700
|
}
|
|
29248
29701
|
if (!node || typeof node !== "object") return;
|
|
29249
|
-
const
|
|
29250
|
-
if (
|
|
29251
|
-
const o =
|
|
29702
|
+
const meta2 = node.meta;
|
|
29703
|
+
if (meta2 && typeof meta2.line === "number") {
|
|
29704
|
+
const o = meta2.source;
|
|
29252
29705
|
const to = !o ? void 0 : o.file === void 0 ? o.from ?? o.line : o.via.find((v) => v.file === void 0)?.from;
|
|
29253
|
-
if (to === void 0) delete
|
|
29254
|
-
else
|
|
29706
|
+
if (to === void 0) delete meta2.line;
|
|
29707
|
+
else meta2.line = to;
|
|
29255
29708
|
}
|
|
29256
|
-
for (const v of Object.values(node)) if (v && typeof v === "object" && v !==
|
|
29709
|
+
for (const v of Object.values(node)) if (v && typeof v === "object" && v !== meta2) walk(v);
|
|
29257
29710
|
};
|
|
29258
29711
|
walk(tree);
|
|
29259
29712
|
}
|
|
@@ -30185,7 +30638,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30185
30638
|
state.redirects.push({ from: inUnit(slug), to: target(fm.redirect), suffix: suffix || void 0, status: 301, origin: "frontmatter", declaredBy: `${label}:${p}`, stub: prefix + outFileFor(slug, isIndexFile, cfg.linkStyle) });
|
|
30186
30639
|
{
|
|
30187
30640
|
const hash = isExternal(fm.redirect) ? "" : splitSuffix(fm.redirect.trim()).suffix.replace(/^\?[^#]*/, "");
|
|
30188
|
-
const own2 = { title:
|
|
30641
|
+
const own2 = { title: str7(fm.title) && detach(str7(fm.title)), description: typeof fm.description === "string" ? detach(fm.description) : void 0 };
|
|
30189
30642
|
stubTargets.set(slug, { to: target(fm.redirect), ...hash.length > 1 ? { fragment: hash } : {}, ...own2 });
|
|
30190
30643
|
}
|
|
30191
30644
|
continue;
|
|
@@ -30221,11 +30674,11 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30221
30674
|
}
|
|
30222
30675
|
} else {
|
|
30223
30676
|
const keep = memo2 && !templatesOf(p).isTemplatePage(fm);
|
|
30224
|
-
const titled = `${
|
|
30677
|
+
const titled = `${str7(fm.title) ?? ""} ${fm.description ?? ""}`;
|
|
30225
30678
|
if (templatesOf(p).isTemplatePage(fm) && /\{[{%]/.test(titled) && /\bdata\s*(\.[A-Za-z_]|\[)/.test(titled)) dataInTitles = true;
|
|
30226
30679
|
const reads = keep ? (f) => state.scan.read(abs(p), f) : void 0;
|
|
30227
30680
|
const skippedBefore = state.templateBudget.skipped.titles;
|
|
30228
|
-
title = detach(await resolveTitle(
|
|
30681
|
+
title = detach(await resolveTitle(str7(fm.title) ?? firstH1(await source()) ?? humanize2(slug.split("/").pop() || cfg.name), await source(), p, fm, reads));
|
|
30229
30682
|
description = fm.description != null ? detach(await resolveTitle(String(fm.description), await source(), p, fm, reads)) : void 0;
|
|
30230
30683
|
if (keep && state.templateBudget.skipped.titles === skippedBefore) Object.assign(memo2, { title, description, resolvedWith });
|
|
30231
30684
|
}
|
|
@@ -30922,8 +31375,8 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30922
31375
|
let hasH1 = tree[0]?.type === "heading" && Number(tree[0].props?.level) === 1;
|
|
30923
31376
|
const post = postNeighbours.has(info.slug) ? blog.get(info.slug) : void 0;
|
|
30924
31377
|
const h1Text = hasH1 ? inlineText2(tree[0].inline) : void 0;
|
|
30925
|
-
const title = isTemplated(
|
|
30926
|
-
const description = isTemplated(
|
|
31378
|
+
const title = isTemplated(str7(fm.title) ?? "") ? h1Text && !isTemplated(h1Text) ? h1Text : info.title : str7(fm.title) ?? h1Text ?? info.title;
|
|
31379
|
+
const description = isTemplated(str7(fm.description) ?? "") ? info.description : str7(fm.description);
|
|
30927
31380
|
input.onPageBuilt?.({ slug: [unit.prefix, info.slug].filter(Boolean).join("/"), unit: unit.prefix, source: srcOf(info), contentPath: info.source, text: raw, title, frontmatter: fm, tree });
|
|
30928
31381
|
if (isReplaced) return;
|
|
30929
31382
|
if (post && hasH1) {
|
|
@@ -30940,7 +31393,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30940
31393
|
const pageTrail = hidden ? trail : listedTrail;
|
|
30941
31394
|
const navNode = pageTrail.get(info.slug)?.at(-1);
|
|
30942
31395
|
if (navNode?.children.length && !hasProse(tree)) body += childLinks2(navNode.children, (s) => pageRefs.get(s), info.out, cfg.linkStyle, infos);
|
|
30943
|
-
const layoutName =
|
|
31396
|
+
const layoutName = str7(fm.layout) ?? (post ? "blank" : cfg.layout);
|
|
30944
31397
|
const tocMode = fm.toc === false ? "off" : ["top", "popover", "rail", "off"].includes(fm.toc) ? fm.toc : cfg.toc;
|
|
30945
31398
|
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`);
|
|
30946
31399
|
for (const v of ctx.unknownVariants ?? []) warnPage(info, "button-variant", `button variant "${v}" drawn as the default button`);
|
|
@@ -31031,8 +31484,8 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31031
31484
|
const ref = n.slug != null && !n.fragment ? pageRefs.get(n.slug) : void 0;
|
|
31032
31485
|
return { name: n.label, url: ref ? absoluteUrl(cfg, unit.prefix, servedPath(ref.out, cfg.linkStyle)) : void 0 };
|
|
31033
31486
|
}) : void 0,
|
|
31034
|
-
image:
|
|
31035
|
-
pageType:
|
|
31487
|
+
image: str7(fm.ogImage) ?? cfg.ogImage,
|
|
31488
|
+
pageType: str7(fm.type),
|
|
31036
31489
|
noindex: cfg.noindex || fm.noindex === true || fm.draft === true || canon.noindex || hidden,
|
|
31037
31490
|
nofollow: cfg.nofollow || fm.nofollow === true,
|
|
31038
31491
|
twitterHandle: cfg.twitterHandle,
|
|
@@ -31523,20 +31976,20 @@ var STATUS_BADGE = {
|
|
|
31523
31976
|
};
|
|
31524
31977
|
var BADGE_LINK = "transition-colors hover:opacity-80";
|
|
31525
31978
|
function fieldBadges(fm, cfg, href) {
|
|
31526
|
-
const
|
|
31979
|
+
const meta2 = parseMeta(fm);
|
|
31527
31980
|
const link2 = (field, value) => {
|
|
31528
31981
|
const def = cfg.taxonomies.find((x) => x.name === field);
|
|
31529
31982
|
return def && value.split("/").filter(Boolean).every(safeSegment) ? href(generatedOut(`${def.path}/${value.split("/").filter(Boolean).join("/")}`, cfg)) : void 0;
|
|
31530
31983
|
};
|
|
31531
31984
|
const out = [];
|
|
31532
|
-
if (
|
|
31533
|
-
const h = link2("type",
|
|
31534
|
-
out.push({ label:
|
|
31985
|
+
if (meta2.type) {
|
|
31986
|
+
const h = link2("type", meta2.type);
|
|
31987
|
+
out.push({ label: meta2.type.replace(/[-_]/g, " "), cls: [TYPE_BADGE_BASE, h ? BADGE_LINK : "", TYPE_BADGE_STYLE[meta2.type] ?? "border-border bg-muted text-muted-foreground"].filter(Boolean).join(" "), href: h, attr: "data-page-type", value: meta2.type });
|
|
31535
31988
|
}
|
|
31536
|
-
const s =
|
|
31989
|
+
const s = meta2.status && STATUS_BADGE[meta2.status];
|
|
31537
31990
|
if (s) {
|
|
31538
|
-
const h = link2("status",
|
|
31539
|
-
out.push({ label: s[0], cls: [STATUS_BADGE_BASE, h ? BADGE_LINK : "", s[1]].filter(Boolean).join(" "), href: h, attr: "data-status", value:
|
|
31991
|
+
const h = link2("status", meta2.status);
|
|
31992
|
+
out.push({ label: s[0], cls: [STATUS_BADGE_BASE, h ? BADGE_LINK : "", s[1]].filter(Boolean).join(" "), href: h, attr: "data-status", value: meta2.status });
|
|
31540
31993
|
}
|
|
31541
31994
|
return out;
|
|
31542
31995
|
}
|
|
@@ -31802,7 +32255,6 @@ function relativeHome(from, to) {
|
|
|
31802
32255
|
if (to.startsWith(from)) return to.slice(from.length);
|
|
31803
32256
|
return "../".repeat(from.split("/").filter(Boolean).length) + to.slice(1);
|
|
31804
32257
|
}
|
|
31805
|
-
var FORWARD_SCRIPT = "location.replace(document.documentElement.dataset.to+location.search+location.hash)";
|
|
31806
32258
|
function forwardKeepingQuery(target, name) {
|
|
31807
32259
|
const u = esc(target);
|
|
31808
32260
|
return `<!doctype html><html data-to="${u}"><head><meta charset="utf-8"><title>${esc(name)}</title><meta name="robots" content="noindex"><script>${FORWARD_SCRIPT}</script><meta http-equiv="refresh" content="0; url=${u}"><link rel="icon" href="data:,"></head><body><p><a href="${u}">${esc(name)}</a></p></body></html>
|
|
@@ -31823,7 +32275,7 @@ async function optionalText(files, p) {
|
|
|
31823
32275
|
const c = files.get(p);
|
|
31824
32276
|
return c == null ? void 0 : readText(c);
|
|
31825
32277
|
}
|
|
31826
|
-
function
|
|
32278
|
+
function str7(v) {
|
|
31827
32279
|
return v == null || v === "" ? void 0 : String(v);
|
|
31828
32280
|
}
|
|
31829
32281
|
function firstH1(src) {
|