@dogsbay/ssg-cli 0.2.0-beta.175 → 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.
@@ -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(str7, offset) {
643
+ EntityDecoder4.prototype.write = function(str8, offset) {
639
644
  switch (this.state) {
640
645
  case EntityDecoderState3.EntityStart: {
641
- if (str7.charCodeAt(offset) === CharCodes4.NUM) {
646
+ if (str8.charCodeAt(offset) === CharCodes4.NUM) {
642
647
  this.state = EntityDecoderState3.NumericStart;
643
648
  this.consumed += 1;
644
- return this.stateNumericStart(str7, offset + 1);
649
+ return this.stateNumericStart(str8, offset + 1);
645
650
  }
646
651
  this.state = EntityDecoderState3.NamedEntity;
647
- return this.stateNamedEntity(str7, offset);
652
+ return this.stateNamedEntity(str8, offset);
648
653
  }
649
654
  case EntityDecoderState3.NumericStart: {
650
- return this.stateNumericStart(str7, offset);
655
+ return this.stateNumericStart(str8, offset);
651
656
  }
652
657
  case EntityDecoderState3.NumericDecimal: {
653
- return this.stateNumericDecimal(str7, offset);
658
+ return this.stateNumericDecimal(str8, offset);
654
659
  }
655
660
  case EntityDecoderState3.NumericHex: {
656
- return this.stateNumericHex(str7, offset);
661
+ return this.stateNumericHex(str8, offset);
657
662
  }
658
663
  case EntityDecoderState3.NamedEntity: {
659
- return this.stateNamedEntity(str7, offset);
664
+ return this.stateNamedEntity(str8, offset);
660
665
  }
661
666
  }
662
667
  };
663
- EntityDecoder4.prototype.stateNumericStart = function(str7, offset) {
664
- if (offset >= str7.length) {
668
+ EntityDecoder4.prototype.stateNumericStart = function(str8, offset) {
669
+ if (offset >= str8.length) {
665
670
  return -1;
666
671
  }
667
- if ((str7.charCodeAt(offset) | TO_LOWER_BIT3) === CharCodes4.LOWER_X) {
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(str7, offset + 1);
675
+ return this.stateNumericHex(str8, offset + 1);
671
676
  }
672
677
  this.state = EntityDecoderState3.NumericDecimal;
673
- return this.stateNumericDecimal(str7, offset);
678
+ return this.stateNumericDecimal(str8, offset);
674
679
  };
675
- EntityDecoder4.prototype.addToNumericResult = function(str7, start, end, base) {
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(str7.substr(start, digitCount), base);
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(str7, offset) {
687
+ EntityDecoder4.prototype.stateNumericHex = function(str8, offset) {
683
688
  var startIdx = offset;
684
- while (offset < str7.length) {
685
- var char = str7.charCodeAt(offset);
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(str7, startIdx, offset, 16);
694
+ this.addToNumericResult(str8, startIdx, offset, 16);
690
695
  return this.emitNumericEntity(char, 3);
691
696
  }
692
697
  }
693
- this.addToNumericResult(str7, startIdx, offset, 16);
698
+ this.addToNumericResult(str8, startIdx, offset, 16);
694
699
  return -1;
695
700
  };
696
- EntityDecoder4.prototype.stateNumericDecimal = function(str7, offset) {
701
+ EntityDecoder4.prototype.stateNumericDecimal = function(str8, offset) {
697
702
  var startIdx = offset;
698
- while (offset < str7.length) {
699
- var char = str7.charCodeAt(offset);
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(str7, startIdx, offset, 10);
708
+ this.addToNumericResult(str8, startIdx, offset, 10);
704
709
  return this.emitNumericEntity(char, 2);
705
710
  }
706
711
  }
707
- this.addToNumericResult(str7, startIdx, offset, 10);
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(str7, offset) {
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 < str7.length; offset++, this.excess++) {
735
- var char = str7.charCodeAt(offset);
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(str7) {
803
- return ret += (0, decode_codepoint_js_1.fromCodePoint)(str7);
807
+ var decoder2 = new EntityDecoder3(decodeTree, function(str8) {
808
+ return ret += (0, decode_codepoint_js_1.fromCodePoint)(str8);
804
809
  });
805
- return function decodeWithTrie(str7, decodeMode) {
810
+ return function decodeWithTrie(str8, decodeMode) {
806
811
  var lastIndex = 0;
807
812
  var offset = 0;
808
- while ((offset = str7.indexOf("&", offset)) >= 0) {
809
- ret += str7.slice(lastIndex, offset);
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
- str7,
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 + str7.slice(lastIndex);
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(str7, mode) {
861
+ function decodeHTML2(str8, mode) {
857
862
  if (mode === void 0) {
858
863
  mode = DecodingMode3.Legacy;
859
864
  }
860
- return htmlDecoder2(str7, mode);
865
+ return htmlDecoder2(str8, mode);
861
866
  }
862
867
  exports.decodeHTML = decodeHTML2;
863
- function decodeHTMLAttribute2(str7) {
864
- return htmlDecoder2(str7, DecodingMode3.Attribute);
868
+ function decodeHTMLAttribute2(str8) {
869
+ return htmlDecoder2(str8, DecodingMode3.Attribute);
865
870
  }
866
871
  exports.decodeHTMLAttribute = decodeHTMLAttribute2;
867
- function decodeHTMLStrict2(str7) {
868
- return htmlDecoder2(str7, DecodingMode3.Strict);
872
+ function decodeHTMLStrict2(str8) {
873
+ return htmlDecoder2(str8, DecodingMode3.Strict);
869
874
  }
870
875
  exports.decodeHTMLStrict = decodeHTMLStrict2;
871
- function decodeXML2(str7) {
872
- return xmlDecoder2(str7, DecodingMode3.Strict);
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, "&gt;"]
906
911
  ]);
907
912
  exports.getCodePoint = // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
908
- String.prototype.codePointAt != null ? function(str7, index) {
909
- return str7.codePointAt(index);
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(str7) {
921
+ function encodeXML2(str8) {
917
922
  var ret = "";
918
923
  var lastIdx = 0;
919
924
  var match;
920
- while ((match = exports.xmlReplacer.exec(str7)) !== null) {
925
+ while ((match = exports.xmlReplacer.exec(str8)) !== null) {
921
926
  var i = match.index;
922
- var char = str7.charCodeAt(i);
927
+ var char = str8.charCodeAt(i);
923
928
  var next = xmlCodeMap2.get(char);
924
929
  if (next !== void 0) {
925
- ret += str7.substring(lastIdx, i) + next;
930
+ ret += str8.substring(lastIdx, i) + next;
926
931
  lastIdx = i + 1;
927
932
  } else {
928
- ret += "".concat(str7.substring(lastIdx, i), "&#x").concat((0, exports.getCodePoint)(str7, i).toString(16), ";");
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 + str7.substr(lastIdx);
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, str7) {
991
+ function encodeHTMLTrieRe(regExp, str8) {
987
992
  var ret = "";
988
993
  var lastIdx = 0;
989
994
  var match;
990
- while ((match = regExp.exec(str7)) !== null) {
995
+ while ((match = regExp.exec(str8)) !== null) {
991
996
  var i = match.index;
992
- ret += str7.substring(lastIdx, i);
993
- var char = str7.charCodeAt(i);
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 < str7.length) {
997
- var nextChar = str7.charCodeAt(i + 1);
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)(str7, i);
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 + str7.substr(lastIdx);
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(str7) {
1224
- return str7.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
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(str7) {
1702
- if (str7.indexOf("\\") < 0) return str7;
1703
- return str7.replace(UNESCAPE_MD_RE, "$1");
1706
+ function unescapeMd(str8) {
1707
+ if (str8.indexOf("\\") < 0) return str8;
1708
+ return str8.replace(UNESCAPE_MD_RE, "$1");
1704
1709
  }
1705
- function unescapeAll(str7) {
1706
- if (str7.indexOf("\\") < 0 && str7.indexOf("&") < 0) return str7;
1707
- return str7.replace(UNESCAPE_ALL_RE, function(match, escaped, entity2) {
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(str7) {
1724
- if (HTML_ESCAPE_TEST_RE.test(str7)) return str7.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);
1725
- return str7;
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(str7) {
1729
- return str7.replace(REGEXP_ESCAPE_RE, "\\$&");
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(str7) {
1803
- str7 = str7.trim().replace(/\s+/g, " ");
1807
+ function normalizeReference(str8) {
1808
+ str8 = str8.trim().replace(/\s+/g, " ");
1804
1809
  if ("\u1E9E".toLowerCase() === "\u1E7E")
1805
- str7 = str7.replace(/ẞ/g, "\xDF");
1806
- return str7.toLowerCase().toUpperCase();
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(str7) {
1816
+ function asciiTrim(str8) {
1812
1817
  let start = 0;
1813
- for (; start < str7.length; start++) if (!isAsciiTrimmable(str7.charCodeAt(start))) break;
1814
- let end = str7.length - 1;
1815
- for (; end >= start; end--) if (!isAsciiTrimmable(str7.charCodeAt(end))) break;
1816
- return str7.slice(start, end + 1);
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(str7, start, max) {
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 (str7.charCodeAt(pos) === 60) {
1865
+ if (str8.charCodeAt(pos) === 60) {
1861
1866
  pos++;
1862
1867
  while (pos < max) {
1863
- code2 = str7.charCodeAt(pos);
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(str7.slice(start + 1, pos));
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 = str7.charCodeAt(pos);
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 (str7.charCodeAt(pos + 1) === 32) {
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(str7.slice(start, pos));
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(str7, start, max, prev_state) {
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 = str7.charCodeAt(pos);
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 = str7.charCodeAt(pos);
1938
+ code2 = str8.charCodeAt(pos);
1934
1939
  if (code2 === state.marker) {
1935
1940
  state.pos = pos + 1;
1936
- state.str += unescapeAll(str7.slice(start, pos));
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(str7.slice(start, pos));
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 str7;
2248
- str7 = state.src.replace(NEWLINES_RE, "\n");
2249
- str7 = str7.replace(NULL_RE, "\uFFFD");
2250
- state.src = str7;
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(str7) {
2270
- return /^<a[>\s]/i.test(str7);
2274
+ function isLinkOpen$1(str8) {
2275
+ return /^<a[>\s]/i.test(str8);
2271
2276
  }
2272
- function isLinkClose$1(str7) {
2273
- return /^<\/a\s*>/i.test(str7);
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(str7, replacements) {
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 += str7.slice(lastPos, replacement.pos) + replacement.ch;
2433
+ result += str8.slice(lastPos, replacement.pos) + replacement.ch;
2429
2434
  lastPos = replacement.pos + 1;
2430
2435
  }
2431
- return result + str7.slice(lastPos);
2436
+ return result + str8.slice(lastPos);
2432
2437
  }
2433
2438
  function process_inlines(tokens, state) {
2434
2439
  let j;
@@ -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(str7) {
2692
+ function escapedSplit(str8) {
2688
2693
  const result = [];
2689
- const max = str7.length;
2694
+ const max = str8.length;
2690
2695
  let pos = 0;
2691
- let ch = str7.charCodeAt(pos);
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 + str7.substring(lastPos, pos));
2702
+ result.push(current + str8.substring(lastPos, pos));
2698
2703
  current = "";
2699
2704
  lastPos = pos + 1;
2700
2705
  } else {
2701
- current += str7.substring(lastPos, pos - 1);
2706
+ current += str8.substring(lastPos, pos - 1);
2702
2707
  lastPos = pos;
2703
2708
  }
2704
2709
  isEscaped = ch === 92;
2705
2710
  pos++;
2706
- ch = str7.charCodeAt(pos);
2711
+ ch = str8.charCodeAt(pos);
2707
2712
  }
2708
- result.push(current + str7.substring(lastPos));
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 str7 = state.src.slice(pos, max + 1);
3180
- max = str7.length;
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 = str7.charCodeAt(pos);
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
- str7 += lineContent;
3192
- max = str7.length;
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 && str7.charCodeAt(pos) === 10) {
3202
+ if (pos < max && str8.charCodeAt(pos) === 10) {
3198
3203
  const lineContent = getNextLine(nextLine);
3199
3204
  if (lineContent !== null) {
3200
- str7 += lineContent;
3201
- max = str7.length;
3205
+ str8 += lineContent;
3206
+ max = str8.length;
3202
3207
  nextLine++;
3203
3208
  }
3204
3209
  }
3205
3210
  }
3206
3211
  }
3207
- if (labelEnd < 0 || str7.charCodeAt(labelEnd + 1) !== 58) return false;
3212
+ if (labelEnd < 0 || str8.charCodeAt(labelEnd + 1) !== 58) return false;
3208
3213
  for (pos = labelEnd + 2; pos < max; pos++) {
3209
- const ch = str7.charCodeAt(pos);
3214
+ const ch = str8.charCodeAt(pos);
3210
3215
  if (ch === 10) {
3211
3216
  const lineContent = getNextLine(nextLine);
3212
3217
  if (lineContent !== null) {
3213
- str7 += lineContent;
3214
- max = str7.length;
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(str7, pos, max);
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 = str7.charCodeAt(pos);
3234
+ const ch = str8.charCodeAt(pos);
3230
3235
  if (ch === 10) {
3231
3236
  const lineContent = getNextLine(nextLine);
3232
3237
  if (lineContent !== null) {
3233
- str7 += lineContent;
3234
- max = str7.length;
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(str7, pos, max);
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
- str7 += lineContent;
3249
+ str8 += lineContent;
3245
3250
  pos = max;
3246
- max = str7.length;
3251
+ max = str8.length;
3247
3252
  nextLine++;
3248
- titleRes = state.md.helpers.parseLinkTitle(str7, pos, max, titleRes);
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(str7.charCodeAt(pos))) break;
3265
+ if (!isSpace(str8.charCodeAt(pos))) break;
3261
3266
  pos++;
3262
3267
  }
3263
- if (pos < max && str7.charCodeAt(pos) !== 10) {
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(str7.charCodeAt(pos))) break;
3274
+ if (!isSpace(str8.charCodeAt(pos))) break;
3270
3275
  pos++;
3271
3276
  }
3272
3277
  }
3273
3278
  }
3274
- if (pos < max && str7.charCodeAt(pos) !== 10) return false;
3275
- const label = normalizeReference(str7.slice(1, labelEnd));
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(str7) {
4250
- return /^<a[>\s]/i.test(str7);
4254
+ function isLinkOpen(str8) {
4255
+ return /^<a[>\s]/i.test(str8);
4251
4256
  }
4252
- function isLinkClose(str7) {
4253
- return /^<\/a\s*>/i.test(str7);
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(str7, md2, env, outTokens) {
4463
- const state = new this.State(str7, md2, env, outTokens);
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 str7 = url.trim().toLowerCase();
4572
- return BAD_PROTO_RE.test(str7) ? GOOD_DATA_RE.test(str7) : true;
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(str7, start, options) {
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 < str7.length; i++) {
4718
- if (!valueInsideQuotes && str7.slice(i, i + options.rightDelimiter.length) === options.rightDelimiter) {
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_ = str7.charAt(i);
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 (str7.charAt(i + 1) === classChar) {
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(str7, i) && value === "" && !valueInsideQuotes) {
4749
+ if (isUnescapedDoubleQuote(str8, i) && value === "" && !valueInsideQuotes) {
4745
4750
  valueInsideQuotes = true;
4746
4751
  continue;
4747
4752
  }
4748
- if (isUnescapedDoubleQuote(str7, i) && valueInsideQuotes) {
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(str7) {
4820
+ return function(str8) {
4816
4821
  const minCurlyLength = options.leftDelimiter.length + 1 + options.rightDelimiter.length;
4817
- if (!str7 || typeof str7 !== "string" || str7.length < minCurlyLength) {
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 = str7.slice(0, options.leftDelimiter.length);
4834
+ slice = str8.slice(0, options.leftDelimiter.length);
4830
4835
  start = slice === options.leftDelimiter ? 0 : -1;
4831
- end = start === -1 ? -1 : findRightDelimiter(str7, rightDelimiterMinimumShift, options);
4832
- nextChar = str7.charAt(end + options.rightDelimiter.length);
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(str7, options);
4839
- end = start === -1 ? -1 : findRightDelimiter(str7, start + rightDelimiterMinimumShift, options);
4840
- end = end === str7.length - options.rightDelimiter.length ? end : -1;
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 = str7.slice(0, options.leftDelimiter.length);
4848
+ slice = str8.slice(0, options.leftDelimiter.length);
4844
4849
  start = slice === options.leftDelimiter ? 0 : -1;
4845
- slice = str7.slice(str7.length - options.rightDelimiter.length);
4846
- end = slice === options.rightDelimiter ? str7.length - options.rightDelimiter.length : -1;
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(str7.substring(start, end + options.rightDelimiter.length));
4856
+ return start !== -1 && end !== -1 && validCurlyLength(str8.substring(start, end + options.rightDelimiter.length));
4852
4857
  };
4853
4858
  };
4854
- exports.removeDelimiter = function(str7, options) {
4855
- const start = findLeftDelimiter(str7, options);
4859
+ exports.removeDelimiter = function(str8, options) {
4860
+ const start = findLeftDelimiter(str8, options);
4856
4861
  if (start === -1) {
4857
- return str7;
4862
+ return str8;
4858
4863
  }
4859
- const end = findRightDelimiter(str7, start + options.leftDelimiter.length, options);
4860
- if (end !== str7.length - options.rightDelimiter.length) {
4861
- return str7;
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 = str7.slice(0, start);
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(str7) {
4898
- if (HTML_ESCAPE_TEST_RE.test(str7)) {
4899
- return str7.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);
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 str7;
4906
+ return str8;
4902
4907
  };
4903
- function findRightDelimiter(str7, start, options) {
4908
+ function findRightDelimiter(str8, start, options) {
4904
4909
  let valueInsideQuotes = false;
4905
- for (let i = start; i < str7.length; i++) {
4906
- if (isUnescapedDoubleQuote(str7, i)) {
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 && str7.slice(i, i + options.rightDelimiter.length) === options.rightDelimiter) {
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(str7, options) {
4921
+ function findLeftDelimiter(str8, options) {
4917
4922
  let start = -1;
4918
4923
  let valueInsideQuotes = false;
4919
- for (let i = 0; i < str7.length; i++) {
4920
- if (isUnescapedDoubleQuote(str7, i)) {
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 && str7.slice(i, i + options.leftDelimiter.length) === options.leftDelimiter) {
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(str7, i) {
4932
- if (str7.charAt(i) !== '"') {
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 && str7.charAt(n) === "\\"; n--) {
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: (str7) => str7 === "image" || str7 === "code_inline"
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: (str7) => str7 === "bullet_list_close" || str7 === "ordered_list_close"
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: (str7) => str7.match(__hr) !== null
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 meta = {};
7088
+ const meta2 = {};
7077
7089
  const tags = coerceStringArray(fm.tags);
7078
7090
  if (tags)
7079
- meta.tags = tags;
7091
+ meta2.tags = tags;
7080
7092
  const category = coerceStringArray(fm.category) ?? deriveCategoryFromSlug(options.slug);
7081
7093
  if (category)
7082
- meta.category = category;
7094
+ meta2.category = category;
7083
7095
  if (typeof fm.type === "string" && fm.type.length > 0) {
7084
- meta.type = fm.type;
7096
+ meta2.type = fm.type;
7085
7097
  }
7086
7098
  if (typeof fm.status === "string" && STATUS_VALUES.includes(fm.status)) {
7087
- meta.status = fm.status;
7099
+ meta2.status = fm.status;
7088
7100
  }
7089
7101
  const audience = coerceStringArray(fm.audience);
7090
7102
  if (audience)
7091
- meta.audience = audience;
7103
+ meta2.audience = audience;
7092
7104
  const updated = coerceIsoDate(fm.updated);
7093
7105
  if (updated)
7094
- meta.updated = updated;
7106
+ meta2.updated = updated;
7095
7107
  const created = coerceIsoDate(fm.created);
7096
7108
  if (created)
7097
- meta.created = created;
7109
+ meta2.created = created;
7098
7110
  const author = coerceStringArray(fm.author);
7099
7111
  if (author)
7100
- meta.author = author;
7112
+ meta2.author = author;
7101
7113
  if (typeof fm.weight === "number" && Number.isFinite(fm.weight)) {
7102
- meta.weight = fm.weight;
7114
+ meta2.weight = fm.weight;
7103
7115
  }
7104
7116
  if (isPlainObject(fm.props)) {
7105
- meta.props = { ...fm.props };
7117
+ meta2.props = { ...fm.props };
7106
7118
  }
7107
7119
  const taxonomies = collectTaxonomies(fm, options.taxonomyNames);
7108
7120
  if (taxonomies)
7109
- meta.taxonomies = taxonomies;
7110
- return meta;
7121
+ meta2.taxonomies = taxonomies;
7122
+ return meta2;
7111
7123
  }
7112
7124
  function deriveCategoryFromSlug(slug) {
7113
7125
  if (!slug)
@@ -8038,7 +8050,8 @@ var DIRECTIVE_PROPS = {
8038
8050
  "pdf-keep-together": [],
8039
8051
  "pdf-only": [],
8040
8052
  "web-only": [],
8041
- "pdf-page-break": []
8053
+ "pdf-page-break": [],
8054
+ "key-value": ["layout"]
8042
8055
  };
8043
8056
  function unknownProps(name, props) {
8044
8057
  const known = DIRECTIVE_PROPS[name];
@@ -8611,9 +8624,11 @@ var KNOWN_BLOCK_DIRECTIVES = [
8611
8624
  "columns",
8612
8625
  "pdf-keep-together",
8613
8626
  "pdf-only",
8614
- "web-only"
8627
+ "web-only",
8628
+ // Labels and their values, around a definition list (NAMED_CONTAINERS)
8629
+ "key-value"
8615
8630
  ];
8616
- var NAMED_CONTAINERS = ["columns", "pdf-keep-together", "pdf-only", "web-only", "pdf-page-break"];
8631
+ var NAMED_CONTAINERS = ["columns", "pdf-keep-together", "pdf-only", "web-only", "pdf-page-break", "key-value"];
8617
8632
  var LEAF_ONLY_DIRECTIVES = ["youtube", "avatar", "child-links", "data-table", "data-cards", "pdf-page-break"];
8618
8633
  var BLOCK_LEAF_DIRECTIVES = [...KNOWN_BLOCK_DIRECTIVES, ...LEAF_ONLY_DIRECTIVES.filter((n) => !KNOWN_BLOCK_DIRECTIVES.includes(n))];
8619
8634
  var GENERIC_CONTAINER = "dogsbay_generic";
@@ -9140,9 +9155,9 @@ function markPlugin(md2) {
9140
9155
  md2.inline.ruler.before("emphasis", "mark", tokenize);
9141
9156
  md2.inline.ruler2.before("emphasis", "mark", (state) => {
9142
9157
  postProcess(state, state.delimiters);
9143
- for (const meta of state.tokens_meta)
9144
- if (meta?.delimiters)
9145
- postProcess(state, meta.delimiters);
9158
+ for (const meta2 of state.tokens_meta)
9159
+ if (meta2?.delimiters)
9160
+ postProcess(state, meta2.delimiters);
9146
9161
  return false;
9147
9162
  });
9148
9163
  }
@@ -10493,7 +10508,7 @@ function renderHeading(node) {
10493
10508
  const hashes = "#".repeat(level);
10494
10509
  const text4 = inlineToDogsbayMd(oneLine(node.inline)) || (node.html ?? "") || (typeof node.props?.text === "string" ? node.props.text : "");
10495
10510
  const attrs2 = splitProps(node.props, ["level", "slug", "text"]);
10496
- const slug = node.props?.slug;
10511
+ const slug = node.meta?.idGenerated === true ? void 0 : node.props?.slug;
10497
10512
  if (slug && !attrs2.id) {
10498
10513
  attrs2.id = slug;
10499
10514
  }
@@ -11729,8 +11744,8 @@ function consumeFootnoteBlock(ctx) {
11729
11744
  }
11730
11745
  function consumeFootnoteDef(ctx) {
11731
11746
  const open = ctx.tokens[ctx.i];
11732
- const meta = open.meta ?? {};
11733
- const label = meta.label ?? String((meta.id ?? 0) + 1);
11747
+ const meta2 = open.meta ?? {};
11748
+ const label = meta2.label ?? String((meta2.id ?? 0) + 1);
11734
11749
  ctx.i++;
11735
11750
  let close = ctx.i;
11736
11751
  while (close < ctx.tokens.length && ctx.tokens[close].type !== "footnote_close")
@@ -12809,11 +12824,11 @@ function tokensToInline(tokens, inheritedFmt = []) {
12809
12824
  }
12810
12825
  const labelInline = tokensToInline(labelTokens);
12811
12826
  const labelText = inlineText(labelInline);
12812
- const meta = tok.meta;
12813
- const labelless = meta?.labelless === true;
12814
- let node = meta?.literal && meta.source ? { type: "text", text: meta.source } : inlineDirectiveToNode(name, labelText, labelInline, attrs2, labelless);
12815
- if (labelless && meta?.source && (node?.type === "html-inline" && node.html.startsWith(`:${name}[]`) || node?.type === "text" && node.text.startsWith(`:${name}{`)))
12816
- node = { type: "text", text: meta.source };
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 };
12817
12832
  if (node)
12818
12833
  result.push(node);
12819
12834
  break;
@@ -13011,6 +13026,7 @@ var DIRECTIVE_DESCRIPTIONS = {
13011
13026
  avatar: "Avatar image with a fallback: `src`, `alt`, `fallback`, `size`",
13012
13027
  "child-links": "Links to this page's children in the menu; `depth`",
13013
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)",
13014
13030
  "pdf-page-break": "What follows starts a page of the PDF; nothing on the web",
13015
13031
  "pdf-keep-together": "Content not split across pages of the PDF",
13016
13032
  "pdf-only": "Content shown in the PDF only",
@@ -13061,6 +13077,182 @@ function stripFenceMinjaMarkers(text4) {
13061
13077
  });
13062
13078
  }
13063
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
+
13064
13256
  // node_modules/@dogsbay/format-dogsbay-md/dist/data-files.js
13065
13257
  var YAML_SCHEMA = JSON_SCHEMA.withTags(mergeTag);
13066
13258
  var DataFileError = class extends Error {
@@ -13633,9 +13825,12 @@ async function pageRecord(tree, options) {
13633
13825
  const blocks = [];
13634
13826
  const walk = (nodes) => {
13635
13827
  for (const n of nodes) {
13636
- const meta = n.meta;
13637
- if (meta && typeof meta.block === "string" && typeof meta.line === "number" && meta.source)
13638
- blocks.push(blockRecord(n.type, meta.block, meta.line, typeof meta.endLine === "number" ? meta.endLine : meta.line, meta.source, options.source));
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
+ }
13639
13834
  if (n.children)
13640
13835
  walk(n.children);
13641
13836
  }
@@ -14424,7 +14619,7 @@ function callable(fn) {
14424
14619
  }
14425
14620
 
14426
14621
  // node_modules/@dogsbay/minja/dist/template/methods.js
14427
- var str = (name, v, what = "argument") => {
14622
+ var str2 = (name, v, what = "argument") => {
14428
14623
  if (v instanceof SafeString)
14429
14624
  return v.value;
14430
14625
  if (typeof v !== "string")
@@ -14465,7 +14660,7 @@ function split(s, sep2, maxsplit, fromRight, name) {
14465
14660
  const rest = s.trimEnd().replace(new RegExp(`(?:\\s+\\S+){${max}}$`), "");
14466
14661
  return [rest, ...tail];
14467
14662
  }
14468
- const by = str(name, sep2, "separator");
14663
+ const by = str2(name, sep2, "separator");
14469
14664
  if (by === "")
14470
14665
  throw new TemplateRuntimeError(`${name}(): empty separator`);
14471
14666
  const parts = s.split(by);
@@ -14474,7 +14669,7 @@ function split(s, sep2, maxsplit, fromRight, name) {
14474
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)];
14475
14670
  }
14476
14671
  function strip(s, chars, left, right, name) {
14477
- const set = chars === void 0 || chars === null ? void 0 : new Set(str(name, chars));
14672
+ const set = chars === void 0 || chars === null ? void 0 : new Set(str2(name, chars));
14478
14673
  const drop = (c) => set ? set.has(c) : /\s/.test(c);
14479
14674
  let a = 0;
14480
14675
  let b = s.length;
@@ -14487,7 +14682,7 @@ function strip(s, chars, left, right, name) {
14487
14682
  return s.slice(a, b);
14488
14683
  }
14489
14684
  function affixes(name, v) {
14490
- return [str(name, v)];
14685
+ return [str2(name, v)];
14491
14686
  }
14492
14687
  var STRING = {
14493
14688
  split: (s, args, kwargs) => split(s, ...params("split", ["sep", "maxsplit"], args, kwargs), false, "split"),
@@ -14509,8 +14704,8 @@ var STRING = {
14509
14704
  capitalize: (s, args, kwargs) => (params("capitalize", [], args, kwargs), s.charAt(0).toUpperCase() + s.slice(1).toLowerCase()),
14510
14705
  replace: (s, args, kwargs, state) => {
14511
14706
  const [from, to, count] = params("replace", ["old", "new", "count"], args, kwargs);
14512
- const a = str("replace", from);
14513
- const b = str("replace", to);
14707
+ const a = str2("replace", from);
14708
+ const b = str2("replace", to);
14514
14709
  const n = count === void 0 || count === null ? -1 : int("replace", count);
14515
14710
  const pieces = a === "" ? ["", ...s, ""] : s.split(a);
14516
14711
  const joins = pieces.length - 1;
@@ -14520,9 +14715,9 @@ var STRING = {
14520
14715
  return pieces.slice(1, -1).reduce((out, c, i) => out + (i < replaced ? b : "") + c, "") + (replaced > s.length ? b : "");
14521
14716
  return pieces.slice(0, replaced + 1).join(b) + (replaced < joins ? a + pieces.slice(replaced + 1).join(a) : "");
14522
14717
  },
14523
- find: (s, args, kwargs) => s.indexOf(str("find", params("find", ["sub"], args, kwargs)[0])),
14718
+ find: (s, args, kwargs) => s.indexOf(str2("find", params("find", ["sub"], args, kwargs)[0])),
14524
14719
  count: (s, args, kwargs) => {
14525
- const sub = str("count", params("count", ["sub"], args, kwargs)[0]);
14720
+ const sub = str2("count", params("count", ["sub"], args, kwargs)[0]);
14526
14721
  return sub === "" ? s.length + 1 : s.split(sub).length - 1;
14527
14722
  },
14528
14723
  join: (s, args, kwargs, state) => {
@@ -14531,7 +14726,7 @@ var STRING = {
14531
14726
  if (!xs)
14532
14727
  throw new TemplateRuntimeError(`join() needs a list, not ${typeName(items3)}`);
14533
14728
  state.budget.spend(xs.length * s.length);
14534
- return xs.map((x, i) => str("join", x, `item ${i}`)).join(s);
14729
+ return xs.map((x, i) => str2("join", x, `item ${i}`)).join(s);
14535
14730
  },
14536
14731
  zfill: (s, args, kwargs, state) => {
14537
14732
  const width = int("zfill", params("zfill", ["width"], args, kwargs)[0]);
@@ -15370,7 +15565,7 @@ var MORE_TESTS = {
15370
15565
  };
15371
15566
 
15372
15567
  // node_modules/@dogsbay/minja/dist/template/filters.js
15373
- function str2(v) {
15568
+ function str3(v) {
15374
15569
  return toText(v);
15375
15570
  }
15376
15571
  function items2(v) {
@@ -15402,7 +15597,7 @@ function bind2(filter2, params2, args, kwargs, defaults = []) {
15402
15597
  return out;
15403
15598
  }
15404
15599
  function mapText(v, f) {
15405
- return v instanceof SafeString ? new SafeString(f(v.value)) : f(str2(v));
15600
+ return v instanceof SafeString ? new SafeString(f(v.value)) : f(str3(v));
15406
15601
  }
15407
15602
  function htmlSafeJson(root) {
15408
15603
  const seen = /* @__PURE__ */ new Set();
@@ -15446,9 +15641,9 @@ function htmlSafeJson(root) {
15446
15641
  }
15447
15642
  function urlencode(v) {
15448
15643
  if (isMapping(v)) {
15449
- return Object.keys(v).filter((k) => v[k] !== void 0 && v[k] !== null).map((k) => `${encodeURIComponent(k)}=${encodeURIComponent(str2(v[k]))}`).join("&");
15644
+ return Object.keys(v).filter((k) => v[k] !== void 0 && v[k] !== null).map((k) => `${encodeURIComponent(k)}=${encodeURIComponent(str3(v[k]))}`).join("&");
15450
15645
  }
15451
- return encodeURIComponent(str2(v)).replace(/%2F/g, "/");
15646
+ return encodeURIComponent(str3(v)).replace(/%2F/g, "/");
15452
15647
  }
15453
15648
  function replaceText(src, from, to, count) {
15454
15649
  if (typeof count !== "number")
@@ -15553,7 +15748,7 @@ var BUILTIN_FILTERS = {
15553
15748
  e: escapeFilter,
15554
15749
  safe: (v, args, kwargs) => {
15555
15750
  bind2("safe", [], args, kwargs);
15556
- return v instanceof SafeString ? v : new SafeString(str2(v));
15751
+ return v instanceof SafeString ? v : new SafeString(str3(v));
15557
15752
  },
15558
15753
  length: lengthFilter,
15559
15754
  count: lengthFilter,
@@ -15571,10 +15766,10 @@ var BUILTIN_FILTERS = {
15571
15766
  const xs = attr === void 0 || attr === null ? items2(v) : items2(v).map((x) => mapAttribute(x, attr, state));
15572
15767
  state.budget.spend(xs.length);
15573
15768
  if (state.autoescape && (sep2 instanceof SafeString || xs.some((x) => x instanceof SafeString))) {
15574
- const s = sep2 instanceof SafeString ? sep2.value : escapeHtml2(str2(sep2));
15769
+ const s = sep2 instanceof SafeString ? sep2.value : escapeHtml2(str3(sep2));
15575
15770
  return new SafeString(xs.map((x) => escapeValue(x).value).join(s));
15576
15771
  }
15577
- return xs.map(str2).join(str2(sep2));
15772
+ return xs.map(str3).join(str3(sep2));
15578
15773
  },
15579
15774
  replace: (v, args, kwargs, state) => {
15580
15775
  const [from, to, count] = bind2("replace", ["old", "new", "count"], args, kwargs);
@@ -15582,7 +15777,7 @@ var BUILTIN_FILTERS = {
15582
15777
  const h = (x) => escapeValue(x).value;
15583
15778
  return new SafeString(replaceText(h(v), h(from), h(to), count));
15584
15779
  }
15585
- return replaceText(str2(v), str2(from), str2(to), count);
15780
+ return replaceText(str3(v), str3(from), str3(to), count);
15586
15781
  },
15587
15782
  items: (v, args, kwargs, state) => {
15588
15783
  bind2("items", [], args, kwargs);
@@ -16598,16 +16793,16 @@ var TemplatePages = class {
16598
16793
  * TemplatePageError. `firstLine` is the body's first line in the FILE, so
16599
16794
  * errors name the line an author sees (the front matter is not rendered).
16600
16795
  */
16601
- async render(body, path, meta, options = {}) {
16796
+ async render(body, path, meta2, options = {}) {
16602
16797
  const pad = Math.max(0, (options.firstLine ?? 1) - 1);
16603
- let out = await this.run("\n".repeat(pad) + body, path, meta, options.onDataRead);
16798
+ let out = await this.run("\n".repeat(pad) + body, path, meta2, options.onDataRead);
16604
16799
  if (pad)
16605
16800
  out = out.replace(new RegExp(`^\\n{0,${pad}}`), "");
16606
16801
  return joinEmptiedMarkers(stripFenceMinjaMarkers(stripInlineMinjaMarkers(out)));
16607
16802
  }
16608
16803
  /** Render a front-matter field (a title, a description) strictly. Throws TemplatePageError. */
16609
- async renderField(text4, path, meta) {
16610
- return this.run(text4, path, meta);
16804
+ async renderField(text4, path, meta2) {
16805
+ return this.run(text4, path, meta2);
16611
16806
  }
16612
16807
  /**
16613
16808
  * Load the data files a template names. A name with no file is left out (`data.x` may be
@@ -16672,13 +16867,13 @@ var TemplatePages = class {
16672
16867
  ownKeys: (t) => (paths.forEach((p) => onRead(p)), Reflect.ownKeys(t))
16673
16868
  });
16674
16869
  }
16675
- async run(text4, path, meta, onDataRead) {
16870
+ async run(text4, path, meta2, onDataRead) {
16676
16871
  if (this.loaded > (this.options.maxCachedTemplates ?? 1e3)) {
16677
16872
  this.env.invalidate();
16678
16873
  this.loaded = 0;
16679
16874
  }
16680
16875
  await this.preloadData(text4);
16681
- const context = { ...withUnderscoreAliases(this.options.attributes ?? {}), page: { meta, path } };
16876
+ const context = { ...withUnderscoreAliases(this.options.attributes ?? {}), page: { meta: meta2, path } };
16682
16877
  if (this.options.data) {
16683
16878
  if (!Object.prototype.hasOwnProperty.call(context, "data"))
16684
16879
  context.data = this.dataFor(onDataRead);
@@ -17135,7 +17330,7 @@ function apiPropertiesHtml(list5) {
17135
17330
  }
17136
17331
 
17137
17332
  // node_modules/@dogsbay/render-html/dist/api.js
17138
- var str3 = (v) => v == null || v === "" ? void 0 : String(v);
17333
+ var str4 = (v) => v == null || v === "" ? void 0 : String(v);
17139
17334
  var list3 = (v) => Array.isArray(v) ? v.filter((x) => x && typeof x === "object") : [];
17140
17335
  var API_NODE_TYPES = /* @__PURE__ */ new Set(["api-class", "api-member", "api-doc", "api-params", "api-source", "endpoint"]);
17141
17336
  function renderApiNode2(n, ctx) {
@@ -17144,7 +17339,7 @@ function renderApiNode2(n, ctx) {
17144
17339
  case "api-member":
17145
17340
  return apiSymbol(n, ctx);
17146
17341
  case "api-doc":
17147
- return docSegments(str3(n.props?.html) ?? "", "[&>p:first-child]:mt-0 [&>p:last-child]:mb-2", ctx);
17342
+ return docSegments(str4(n.props?.html) ?? "", "[&>p:first-child]:mt-0 [&>p:last-child]:mb-2", ctx);
17148
17343
  case "api-params":
17149
17344
  return apiParams(n, ctx);
17150
17345
  case "api-source":
@@ -17157,9 +17352,9 @@ function renderApiNode2(n, ctx) {
17157
17352
  }
17158
17353
  function apiSymbol(n, ctx) {
17159
17354
  const p = n.props ?? {};
17160
- const name = str3(p.name) ?? "";
17161
- const kind = str3(p.kind) ?? "func";
17162
- const signature = str3(p.signature);
17355
+ const name = str4(p.name) ?? "";
17356
+ const kind = str4(p.kind) ?? "func";
17357
+ const signature = str4(p.signature);
17163
17358
  const bases = Array.isArray(p.bases) ? p.bases.map(String) : [];
17164
17359
  const level = Math.min(6, (ctx.apiParentLevel ?? ctx.lastHeadingLevel ?? 1) + 1);
17165
17360
  const badgeKind = kind === "method" ? "meth" : kind;
@@ -17198,9 +17393,9 @@ function docSegments(html, edges, ctx) {
17198
17393
  }
17199
17394
  function apiParams(n, ctx) {
17200
17395
  const rows = list3(n.props?.params).map((p) => {
17201
- const type = str3(p.type);
17202
- const dflt = str3(p.default);
17203
- return `<tr class="border-b border-border/50"><td class="py-3 px-4 align-top"><code class="text-sm font-medium">${esc(str3(p.name) ?? "")}</code></td><td class="py-3 px-4 align-top">${docSegments(str3(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>`;
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>`;
17204
17399
  }).join("");
17205
17400
  const th = "py-3 px-4 text-left font-semibold text-muted-foreground uppercase tracking-wider text-xs";
17206
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>
@@ -17208,10 +17403,10 @@ function apiParams(n, ctx) {
17208
17403
  }
17209
17404
  function apiSource(n, ctx) {
17210
17405
  const p = n.props ?? {};
17211
- const file2 = str3(p.file);
17406
+ const file2 = str4(p.file);
17212
17407
  const line = Number(p.line) || void 0;
17213
17408
  const label = file2 ? `Source code in ${file2}${line ? `, line ${line}` : ""}` : "Source code";
17214
- return `<details class="api-source"><summary>${esc(label)}</summary>${codeHtml(str3(p.code) ?? "", "python", ctx)}</details>
17409
+ return `<details class="api-source"><summary>${esc(label)}</summary>${codeHtml(str4(p.code) ?? "", "python", ctx)}</details>
17215
17410
  `;
17216
17411
  }
17217
17412
  var METHODS = ["get", "post", "put", "patch", "delete", "head"];
@@ -17241,10 +17436,10 @@ var TYPE_TINT = {
17241
17436
  null: "bg-muted/20 text-muted-foreground"
17242
17437
  };
17243
17438
  function propertyItem(p, level, ctx) {
17244
- const name = esc(str3(p.name) ?? "");
17245
- const type = str3(p.type) ?? "";
17246
- const format = str3(p.format);
17247
- const description = str3(p.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);
17248
17443
  const children = list3(p.properties).length ? list3(p.properties) : list3(p.items);
17249
17444
  const indent2 = level * 16;
17250
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>' : "");
@@ -17290,7 +17485,7 @@ function responseTabs(responses, ctx) {
17290
17485
  const values = distinct(responses.map((r) => String(r.status ?? "")));
17291
17486
  return tabGroup(responses.map((r, i) => {
17292
17487
  const status = String(r.status ?? "");
17293
- const description = str3(r.description);
17488
+ const description = str4(r.description);
17294
17489
  return {
17295
17490
  value: values[i],
17296
17491
  label: `<span class="rounded px-1.5 py-0.5 text-xs font-mono font-bold ${statusTint(status)}">${esc(status)}</span>`,
@@ -17312,13 +17507,13 @@ var SAMPLE_LABELS = {
17312
17507
  };
17313
17508
  var sampleLang = (language) => language === "curl" ? "bash" : language;
17314
17509
  function codeSamples(samples, ctx) {
17315
- const values = distinct(samples.map((s) => str3(s.language) ?? ""));
17510
+ const values = distinct(samples.map((s) => str4(s.language) ?? ""));
17316
17511
  return tabGroup(samples.map((s, i) => {
17317
- const language = str3(s.language) ?? "";
17512
+ const language = str4(s.language) ?? "";
17318
17513
  return {
17319
17514
  value: values[i],
17320
- label: esc(str3(s.label) ?? SAMPLE_LABELS[language] ?? language),
17321
- body: () => codeHtml(str3(s.code) ?? "", sampleLang(language), ctx)
17515
+ label: esc(str4(s.label) ?? SAMPLE_LABELS[language] ?? language),
17516
+ body: () => codeHtml(str4(s.code) ?? "", sampleLang(language), ctx)
17322
17517
  };
17323
17518
  }), ctx, TABS_ROOT);
17324
17519
  }
@@ -17360,16 +17555,16 @@ function codePanels(p) {
17360
17555
  for (const r of list3(p.responses)) {
17361
17556
  if (r.example === void 0)
17362
17557
  continue;
17363
- out.push({ title: `Response ${String(r.status ?? "")}`, code: JSON.stringify(r.example, null, 2), lang: exampleLang(str3(r.contentType)) });
17558
+ out.push({ title: `Response ${String(r.status ?? "")}`, code: JSON.stringify(r.example, null, 2), lang: exampleLang(str4(r.contentType)) });
17364
17559
  }
17365
17560
  return out;
17366
17561
  }
17367
17562
  function endpoint(n, ctx) {
17368
17563
  const p = n.props ?? {};
17369
- const method = (str3(p.method) ?? "get").toLowerCase();
17370
- const path = str3(p.path) ?? "";
17371
- const baseUrl = str3(p.baseUrl) ?? "";
17372
- const summary = str3(p.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);
17373
17568
  const description = typeof p.description === "string" && p.description && p.description !== p.summary ? apiBlockHtml(p.description) : void 0;
17374
17569
  const deprecated = p.deprecated === true;
17375
17570
  const parameters = list3(apiPropertiesHtml(p.parameters));
@@ -17388,15 +17583,15 @@ function apiCodeInputs(n) {
17388
17583
  switch (n.type) {
17389
17584
  case "api-class":
17390
17585
  case "api-member":
17391
- return str3(p.signature) ? [{ lang: "python", code: String(p.signature) }] : [];
17586
+ return str4(p.signature) ? [{ lang: "python", code: String(p.signature) }] : [];
17392
17587
  case "api-source":
17393
- return [{ lang: "python", code: str3(p.code) ?? "" }];
17588
+ return [{ lang: "python", code: str4(p.code) ?? "" }];
17394
17589
  case "api-doc":
17395
- return fromHtml(str3(p.html));
17590
+ return fromHtml(str4(p.html));
17396
17591
  case "api-params":
17397
- return list3(p.params).flatMap((x) => fromHtml(str3(x.docHtml)));
17592
+ return list3(p.params).flatMap((x) => fromHtml(str4(x.docHtml)));
17398
17593
  case "endpoint":
17399
- return codePanels(p).flatMap((c) => c.samples ? c.samples.map((s) => ({ lang: sampleLang(str3(s.language) ?? ""), code: str3(s.code) ?? "" })) : [{ lang: c.lang, code: c.code }]);
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 }]);
17400
17595
  default:
17401
17596
  return [];
17402
17597
  }
@@ -17430,10 +17625,8 @@ function renderMath(latex, display, ctx) {
17430
17625
  return `<code class="text-destructive">${esc(latex)}</code>`;
17431
17626
  }
17432
17627
  }
17433
- var RESERVED_ID = /^(db-|tab-\d|tabpanel-\d|acc-\d|accpanel-\d|fn-|fnref-)/;
17434
17628
  function uniqueId(ctx, base) {
17435
- if (RESERVED_ID.test(base))
17436
- base = `h-${base}`;
17629
+ base = pageId(base);
17437
17630
  let id = base || "section";
17438
17631
  let n = 1;
17439
17632
  while (ctx.ids.has(id))
@@ -17614,21 +17807,12 @@ function proseHeadings(html, ctx) {
17614
17807
  return `<h${lvl}${at.replace(idm[0], ` id="${esc(id)}"`)}>${inner}</h${lvl}>`;
17615
17808
  });
17616
17809
  }
17617
- var plannedHeadingIds = /* @__PURE__ */ new WeakMap();
17618
- function planHeadingIds(nodes, out) {
17619
- for (const n of nodes) {
17620
- if (n.type === "heading")
17621
- out.add(str4(n.props?.id) ?? str4(n.props?.slug) ?? slugify(inlineText2(n.inline)));
17622
- if (n.children)
17623
- planHeadingIds(n.children, out);
17624
- }
17625
- return out;
17626
- }
17810
+ var pageIds = /* @__PURE__ */ new WeakMap();
17627
17811
  function renderBlocks(nodes, ctx) {
17628
17812
  if (!nodes)
17629
17813
  return "";
17630
- if (!plannedHeadingIds.has(ctx))
17631
- plannedHeadingIds.set(ctx, planHeadingIds(nodes, /* @__PURE__ */ new Set()));
17814
+ if (!pageIds.has(ctx))
17815
+ pageIds.set(ctx, headingIds(nodes, { reserved: ctx.ids }));
17632
17816
  let out = "";
17633
17817
  for (const n of nodes) {
17634
17818
  const html = markedBlock(n, ctx);
@@ -17724,8 +17908,20 @@ function withSourceAttrs(html, n, ctx) {
17724
17908
  const { kept, end } = dropAttrs(html, m[0].length, new Set(added.map(([name]) => name)));
17725
17909
  return `${m[0]}${added.map(([name, value]) => ` ${name}="${value}"`).join("")}${kept}${html.slice(end)}`;
17726
17910
  }
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
+ }
17727
17923
  var COLUMNS_STYLE = "columns:var(--db-columns) 14rem;column-gap:var(--db-column-gap)";
17728
- var str4 = (v) => v == null || v === "" ? void 0 : String(v);
17924
+ var str5 = (v) => v == null || v === "" ? void 0 : String(v);
17729
17925
  function itemBody(n, ctx) {
17730
17926
  const lead = n.inline && n.inline.length ? `<p>${renderInline2(n.inline, ctx)}</p>` : "";
17731
17927
  return lead + renderBlocks(n.children, ctx);
@@ -17765,7 +17961,8 @@ function block(n, ctx) {
17765
17961
  case "heading": {
17766
17962
  const level = Math.min(6, Math.max(1, Number(p.level) || 2));
17767
17963
  const text4 = inlineText2(n.inline);
17768
- const id = uniqueId(ctx, str4(p.id) ?? str4(p.slug) ?? slugify(text4));
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));
17769
17966
  if (level === 2 || level === 3)
17770
17967
  ctx.headings.push({ depth: level, id, text: text4 });
17771
17968
  if (ctx.apiParentLevel === void 0)
@@ -17805,7 +18002,7 @@ function block(n, ctx) {
17805
18002
  return `<tr${attrs(passthrough(p, "border-b transition-colors hover:bg-muted/50"))}>${renderBlocks(n.children, ctx)}</tr>`;
17806
18003
  case "th":
17807
18004
  case "td": {
17808
- const align = /^(left|center|right)$/i.test(str4(p.align) ?? "") ? str4(p.align).toLowerCase() : void 0;
18005
+ const align = /^(left|center|right)$/i.test(str5(p.align) ?? "") ? str5(p.align).toLowerCase() : void 0;
17809
18006
  const cls = n.type === "th" ? "px-2 py-2 text-left align-bottom font-semibold text-muted-foreground" : "p-2 align-top";
17810
18007
  const body = `${renderInline2(n.inline, ctx)}${renderBlocks(n.children, ctx)}`;
17811
18008
  const tag = n.type === "th" && !body.trim() ? "td" : n.type;
@@ -17822,7 +18019,7 @@ function block(n, ctx) {
17822
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>
17823
18020
  `;
17824
18021
  case "footnote-def": {
17825
- const label = esc(str4(p.label) ?? "");
18022
+ const label = esc(str5(p.label) ?? "");
17826
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>` : "";
17827
18024
  return `<li id="fn-${label}">${body}${renderBlocks(n.children, ctx)}</li>`;
17828
18025
  }
@@ -17844,8 +18041,8 @@ function block(n, ctx) {
17844
18041
  case "accordion":
17845
18042
  return renderAroundGroup(n, "accordion-item", (g) => accordion(g, ctx), (c) => renderBlocks([c], ctx), "");
17846
18043
  case "accordion-item": {
17847
- const { line: _line, block: _block, ...meta } = n.meta ?? {};
17848
- 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);
17849
18046
  }
17850
18047
  case "details":
17851
18048
  return details(n, ctx);
@@ -17864,7 +18061,7 @@ function block(n, ctx) {
17864
18061
  case "example":
17865
18062
  return example(n, ctx);
17866
18063
  case "cards": {
17867
- const tone = str4(p.tone);
18064
+ const tone = str5(p.tone);
17868
18065
  const kids = tone ? (n.children ?? []).map((c) => c.type === "card" && !c.props?.tone ? { ...c, props: { ...c.props, tone } } : c) : n.children;
17869
18066
  const cols = Math.min(6, Math.max(1, Math.round(Number(String(p.cols ?? "").replace(/[[\]\s]/g, "").split(",").pop()) || 2)));
17870
18067
  return `<div${attrs(passthrough(p, `my-4 grid grid-cols-1 gap-4 ${GRID_COLS[cols]}`))}>${renderBlocks(kids, ctx)}</div>
@@ -17872,12 +18069,12 @@ function block(n, ctx) {
17872
18069
  }
17873
18070
  // A scoped theme: `.dark` re-declares the tokens for its subtree (THEME_SCOPES)
17874
18071
  case "theme": {
17875
- const scope = lookup(THEME_SCOPES, str4(p.name));
18072
+ const scope = lookup(THEME_SCOPES, str5(p.name));
17876
18073
  if (!scope) {
17877
- ctx.unknown.add(`theme "${str4(p.name) ?? ""}"`);
18074
+ ctx.unknown.add(`theme "${str5(p.name) ?? ""}"`);
17878
18075
  return renderBlocks(n.children, ctx);
17879
18076
  }
17880
- return `<div${attrs({ ...passthrough(p, scope), "data-theme": str4(p.name) })}>${renderBlocks(n.children, ctx)}</div>
18077
+ return `<div${attrs({ ...passthrough(p, scope), "data-theme": str5(p.name) })}>${renderBlocks(n.children, ctx)}</div>
17881
18078
  `;
17882
18079
  }
17883
18080
  case "card":
@@ -17893,24 +18090,31 @@ function block(n, ctx) {
17893
18090
  const span = Number(p.span) || 0;
17894
18091
  const rows = Number(p.rowSpan) || 0;
17895
18092
  const style = [span > 1 && `grid-column:span ${span} / span ${span}`, rows > 1 && `grid-row:span ${rows} / span ${rows}`].filter(Boolean).join(";") || void 0;
17896
- const label = str4(p.label);
17897
- 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, str4(p.tone)) ?? TONE_CLASSES["primary-light"]}">${esc(label)}</div>` : renderBlocks(n.children, ctx);
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);
17898
18095
  const { label: _l, tone: _t, rowSpan: _r, ...rest } = p;
17899
18096
  const pass = passthrough(rest);
17900
- const merged = [style, str4(pass.style)].filter(Boolean).join(";") || void 0;
18097
+ const merged = [style, str5(pass.style)].filter(Boolean).join(";") || void 0;
17901
18098
  return `<div${attrs({ ...pass, style: merged })}>${inner}</div>`;
17902
18099
  }
17903
18100
  case "files":
17904
- return (n.children ?? []).map((c) => c.type === "unordered-list" || c.type === "ordered-list" ? fileTreeHtml(fileTreeItems(c, ctx), str4(p.class) ?? "") + "\n" : renderBlocks([c], ctx)).join("");
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("");
17905
18102
  case "container": {
17906
18103
  const name = typeof n.meta?.name === "string" ? n.meta.name : "container";
17907
18104
  if (name === "columns") {
17908
18105
  const count = Math.min(6, Math.max(1, Math.round(Number(p.count)) || 2));
17909
- const gap = /^(?:0|\d+(?:\.\d+)?(?:px|rem|em|pt|mm|cm|in|ch|%))$/.test(str4(p.gap) ?? "") ? str4(p.gap) : "1.5rem";
18106
+ const gap = /^(?:0|\d+(?:\.\d+)?(?:px|rem|em|pt|mm|cm|in|ch|%))$/.test(str5(p.gap) ?? "") ? str5(p.gap) : "1.5rem";
17910
18107
  const { count: _c, gap: _g, ...rest } = p;
17911
18108
  const pass = passthrough(rest, "my-4");
17912
- const style = [`--db-columns:${count}`, `--db-column-gap:${gap}`, COLUMNS_STYLE, str4(pass.style)].filter(Boolean).join(";");
18109
+ const style = [`--db-columns:${count}`, `--db-column-gap:${gap}`, COLUMNS_STYLE, str5(pass.style)].filter(Boolean).join(";");
17913
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>
17914
18118
  `;
17915
18119
  }
17916
18120
  if (name === "pdf-page-break" && !n.children?.length)
@@ -17936,29 +18140,29 @@ function block(n, ctx) {
17936
18140
  `;
17937
18141
  }
17938
18142
  case "link-button": {
17939
- const href = str4(p.href);
17940
- const variant = buttonVariant(str4(p.variant), ctx);
18143
+ const href = str5(p.href);
18144
+ const variant = buttonVariant(str5(p.variant), ctx);
17941
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));
17942
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>
17943
18147
  `;
17944
18148
  }
17945
18149
  case "youtube": {
17946
- const id = str4(p.id) ?? "";
17947
- const title = str4(p.title) ?? "YouTube video";
18150
+ const id = str5(p.id) ?? "";
18151
+ const title = str5(p.title) ?? "YouTube video";
17948
18152
  const { id: _vid, ...ytRest } = p;
17949
- const poster = str4(p.poster);
18153
+ const poster = str5(p.poster);
17950
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>';
17951
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>
17952
18156
  `;
17953
18157
  }
17954
18158
  case "diagram": {
17955
- const lang = str4(p.lang) ?? "mermaid";
17956
- const code = str4(p.code) ?? "";
17957
- const svg4 = str4(p.svg) ?? ctx.diagram?.(lang, code);
17958
- return svg4 ? diagramFigure(lang, svg4, str4(p.title), p) : codeBlock({ type: "code", props: { ...p, language: lang }, html: code }, ctx);
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);
17959
18163
  }
17960
18164
  case "math-block": {
17961
- const latex = str4(p.latex) ?? "";
18165
+ const latex = str5(p.latex) ?? "";
17962
18166
  const html = renderMath(latex, true, ctx);
17963
18167
  return html != null ? `<div class="my-4 overflow-x-auto">${html}</div>
17964
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>
@@ -17980,7 +18184,7 @@ function block(n, ctx) {
17980
18184
  case "endpoint":
17981
18185
  return renderApiNode2(n, ctx);
17982
18186
  case "include": {
17983
- const target = str4(p.path) ?? str4(p.src) ?? str4(p.file) ?? "";
18187
+ const target = str5(p.path) ?? str5(p.src) ?? str5(p.file) ?? "";
17984
18188
  const remote = /https?:\/\/\S+/.exec(target)?.[0];
17985
18189
  if (remote) {
17986
18190
  ctx.unknown.add("include of a remote file (not fetched)");
@@ -18059,7 +18263,7 @@ function diagramFigure(lang, svg4, title, p) {
18059
18263
  function codeRequest(n) {
18060
18264
  const p = n.props ?? {};
18061
18265
  const code = n.html ?? String(p.code ?? "");
18062
- const rawLang = str4(p.language) ?? str4(p.lang);
18266
+ const rawLang = str5(p.language) ?? str5(p.lang);
18063
18267
  const lang = rawLang === "terminal" ? "bash" : rawLang;
18064
18268
  const highlights = [...parseLineRanges(p.highlights ?? p.highlight ?? p.hl_lines), ...parseLineRanges(p.mark)];
18065
18269
  const diffAdd = [...parseLineRanges(p.diffAdd), ...parseLineRanges(p.ins)];
@@ -18080,7 +18284,7 @@ function highlightInputs(tree) {
18080
18284
  out.push({ lang, code });
18081
18285
  } else if (n.type === "diagram") {
18082
18286
  const p = n.props ?? {};
18083
- const { lang, code } = codeRequest({ type: "code", props: { ...p, language: str4(p.lang) ?? "mermaid" }, html: str4(p.code) ?? "" });
18287
+ const { lang, code } = codeRequest({ type: "code", props: { ...p, language: str5(p.lang) ?? "mermaid" }, html: str5(p.code) ?? "" });
18084
18288
  out.push({ lang, code });
18085
18289
  } else if (API_NODE_TYPES.has(n.type)) {
18086
18290
  out.push(...apiCodeInputs(n));
@@ -18101,12 +18305,12 @@ function codeHtml(code, lang, ctx) {
18101
18305
  }
18102
18306
  function codeBlock(n, ctx) {
18103
18307
  const p = n.props ?? {};
18104
- const rawLang = str4(p.language) ?? str4(p.lang);
18308
+ const rawLang = str5(p.language) ?? str5(p.lang);
18105
18309
  const { code, lang, opts } = codeRequest(n);
18106
18310
  const svg4 = rawLang && ctx.diagram ? ctx.diagram(rawLang, code) : void 0;
18107
18311
  if (svg4)
18108
- return diagramFigure(rawLang, svg4, str4(p.title) ?? str4(p.filename), p);
18109
- const title = str4(p.title) ?? str4(p.filename);
18312
+ return diagramFigure(rawLang, svg4, str5(p.title) ?? str5(p.filename), p);
18313
+ const title = str5(p.title) ?? str5(p.filename);
18110
18314
  const { highlights, lineNumbers, diffAdd, diffRemove } = opts;
18111
18315
  const hl = ctx.highlighter ?? plainHighlighter;
18112
18316
  const collapse2 = parseLineRanges(p.collapse);
@@ -18137,13 +18341,13 @@ function codeBlock(n, ctx) {
18137
18341
  "data-line-numbers": lineNumbers || void 0,
18138
18342
  // With a gutter or [!code …] markers the text on the page is not the code: copy the source, markers removed.
18139
18343
  // An `ansi` block: the text as shown, without its escape codes.
18140
- "data-copy-text": str4(p.copyText) ?? (lineNumbers || diffs || collapse2.length > 0 || code.includes("[!code") ? stripMarkersForCopy(shown) : ansi ? shown : void 0)
18344
+ "data-copy-text": str5(p.copyText) ?? (lineNumbers || diffs || collapse2.length > 0 || code.includes("[!code") ? stripMarkersForCopy(shown) : ansi ? shown : void 0)
18141
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>
18142
18346
  `;
18143
18347
  }
18144
18348
  function table(n, ctx) {
18145
18349
  const p = n.props ?? {};
18146
- const caption = str4(p.caption);
18350
+ const caption = str5(p.caption);
18147
18351
  const cap = caption ? `<caption class="mb-2 text-left text-sm font-medium text-foreground">${titleMarkup(caption, ctx)}</caption>` : "";
18148
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>
18149
18353
  `;
@@ -18154,9 +18358,9 @@ function calloutLabel(type, ctx) {
18154
18358
  }
18155
18359
  function callout(n, ctx) {
18156
18360
  const p = n.props ?? {};
18157
- const type = (str4(p.variant) ?? str4(p.type) ?? "note").toLowerCase();
18361
+ const type = (str5(p.variant) ?? str5(p.type) ?? "note").toLowerCase();
18158
18362
  const variant = ALERT_VARIANT[VARIANT_ALIAS[type] ?? type] ? VARIANT_ALIAS[type] ?? type : "note";
18159
- const title = str4(p.title);
18363
+ const title = str5(p.title);
18160
18364
  const titleHtml = title ? titleMarkup(title, ctx) : esc(calloutLabel(type, ctx));
18161
18365
  const body = renderBlocks(n.children, ctx);
18162
18366
  if (flagOn(p.collapsible) || p.collapsed != null) {
@@ -18197,7 +18401,7 @@ function flagOn(v) {
18197
18401
  return v !== void 0 && v !== null && v !== false && v !== "false";
18198
18402
  }
18199
18403
  function alertIcon(variant, p, ctx) {
18200
- const name = str4(p.icon);
18404
+ const name = str5(p.icon);
18201
18405
  const custom = name ? resolveIconMarkup(name, ctx) : void 0;
18202
18406
  if (name && custom === void 0)
18203
18407
  (ctx.missingIcons ??= /* @__PURE__ */ new Set()).add(name);
@@ -18211,22 +18415,23 @@ function collapsibleAlert(variant, titleHtml, body, open, p, ctx) {
18211
18415
  `;
18212
18416
  }
18213
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)]";
18214
18419
  var AVATAR_FALLBACK = "flex h-full w-full items-center justify-center rounded-full bg-muted text-sm font-semibold text-muted-foreground";
18215
18420
  function avatar(p, ctx) {
18216
- const src = str4(p.src);
18217
- const alt = str4(p.alt) ?? "";
18218
- const initials = str4(p.fallback) || alt.split(" ").map((w) => w[0] ?? "").join("").slice(0, 2).toUpperCase();
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();
18219
18424
  const { src: _s, alt: _a3, fallback: _f, ...rest } = p;
18220
- const inner = src ? `<img class="aspect-square h-full w-full object-cover" src="${esc(assetUrl(src, ctx))}" alt="" width="40" height="40" onerror="this.hidden=true;this.nextElementSibling.hidden=false"><span class="${AVATAR_FALLBACK}" aria-hidden="true" hidden>${esc(initials)}</span>` : `<span class="${AVATAR_FALLBACK}" aria-hidden="true">${esc(initials)}</span>`;
18221
- const label = alt ? { role: "img", "aria-label": str4(rest["aria-label"]) ?? alt } : {};
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 } : {};
18222
18427
  const { "aria-label": _l, ...own2 } = passthrough(rest, AVATAR);
18223
18428
  return `<span${attrs({ ...alt ? own2 : { ...own2, "aria-label": _l }, ...label })}>${inner}</span>`;
18224
18429
  }
18225
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>';
18226
18431
  function example(n, ctx) {
18227
18432
  const p = n.props ?? {};
18228
- const title = str4(p.title);
18229
- const src = str4(p.src);
18433
+ const title = str5(p.title);
18434
+ const src = str5(p.src);
18230
18435
  if (src && !n.children?.length) {
18231
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>
18232
18437
  `;
@@ -18251,17 +18456,17 @@ function tabs(n, ctx) {
18251
18456
  return renderBlocks(n.children, ctx);
18252
18457
  const used = /* @__PURE__ */ new Set();
18253
18458
  const items3 = kids.map((k, i) => {
18254
- const name = str4(k.props?.label) ?? str4(k.props?.title) ?? str4(k.props?.value);
18459
+ const name = str5(k.props?.label) ?? str5(k.props?.title) ?? str5(k.props?.value);
18255
18460
  let v = (name ?? `Tab ${i + 1}`).trim();
18256
18461
  while (used.has(v))
18257
18462
  v += ` (${i + 1})`;
18258
18463
  used.add(v);
18259
18464
  const signal = tabDiffSignal(k);
18260
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>` : "";
18261
- 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) };
18262
18467
  });
18263
- const syncKey = str4(p.syncKey) ?? str4(p["sync-key"]) ?? str4(p.group);
18264
- return tabGroup(items3, ctx, passthrough(p, "my-4 w-full overflow-hidden rounded-lg border border-border"), syncKey, str4(p.variant));
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));
18265
18470
  }
18266
18471
  function tabGroup(items3, ctx, rootAttrs, syncKey, variant) {
18267
18472
  const v = lookup(TAB_VARIANTS, variant);
@@ -18270,7 +18475,7 @@ function tabGroup(items3, ctx, rootAttrs, syncKey, variant) {
18270
18475
  let panels = "";
18271
18476
  items3.forEach((it, i) => {
18272
18477
  const tid = `tab-${group}-${i + 1}`;
18273
- const pid = `tabpanel-${group}-${i + 1}`;
18478
+ const pid = it.id ?? `tabpanel-${group}-${i + 1}`;
18274
18479
  const sel = i === 0;
18275
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>`;
18276
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>`;
@@ -18284,32 +18489,27 @@ function accordion(n, ctx) {
18284
18489
  const items3 = (n.children ?? []).filter((c) => c.type === "accordion-item");
18285
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>';
18286
18491
  const html = items3.map((it, i) => {
18287
- const label = str4(it.props?.label) ?? str4(it.props?.title) ?? `Item ${i + 1}`;
18288
- const value = str4(it.props?.value) ?? `${slugify(label)}-${i + 1}`;
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}`;
18289
18494
  const tid = `acc-${group}-${i + 1}`;
18290
18495
  const cid = `accpanel-${group}-${i + 1}`;
18291
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>`;
18292
18497
  }).join("");
18293
18498
  const dv = p.defaultValue;
18294
- const defaultValue = Array.isArray(dv) ? dv.map(String).join(",") : str4(dv);
18499
+ const defaultValue = Array.isArray(dv) ? dv.map(String).join(",") : str5(dv);
18295
18500
  const { defaultValue: _d, ...rest } = p;
18296
- return `<db-accordion${attrs({ ...passthrough(rest, "my-4 w-full"), type: str4(p.type) ?? "single", "default-value": defaultValue })}>${html}</db-accordion>
18501
+ return `<db-accordion${attrs({ ...passthrough(rest, "my-4 w-full"), type: str5(p.type) ?? "single", "default-value": defaultValue })}>${html}</db-accordion>
18297
18502
  `;
18298
18503
  }
18299
18504
  function details(n, ctx) {
18300
18505
  let p = n.props ?? {};
18301
- if (isDetailsSheet(p) && !str4(p.id)) {
18302
- const base = slugify(str4(p.title) ?? str4(p.summary) ?? "");
18303
- if (base) {
18304
- const planned = plannedHeadingIds.get(ctx);
18305
- let id = base;
18306
- for (let k = 2; planned?.has(id) || ctx.ids.has(id); k++)
18307
- id = `${base}-${k}`;
18308
- p = { ...p, id: uniqueId(ctx, id) };
18309
- }
18310
- }
18311
- const title = str4(p.title) ?? str4(p.summary) ?? ctx.t("details");
18312
- 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();
18313
18513
  const variant = ALERT_VARIANT[VARIANT_ALIAS[type] ?? type] ? VARIANT_ALIAS[type] ?? type : "note";
18314
18514
  const html = collapsibleAlert(variant, titleMarkup(title, ctx), renderBlocks(n.children, ctx), flagOn(p.open), p, ctx);
18315
18515
  if (!isDetailsSheet(p))
@@ -18319,7 +18519,7 @@ function details(n, ctx) {
18319
18519
  }
18320
18520
  function figure(n, ctx) {
18321
18521
  const p = n.props ?? {};
18322
- const caption = str4(p.caption);
18522
+ const caption = str5(p.caption);
18323
18523
  const kids = n.children ?? [];
18324
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);
18325
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>
@@ -18363,30 +18563,34 @@ function fileTreeItems(list5, ctx) {
18363
18563
  }
18364
18564
  function card(n, ctx) {
18365
18565
  const p = n.props ?? {};
18366
- const title = str4(p.title);
18367
- const href = str4(p.href);
18368
- const desc = str4(p.description);
18369
- const ic = str4(p.icon);
18566
+ const title = str5(p.title);
18567
+ const href = str5(p.href);
18568
+ const desc = str5(p.description);
18569
+ const ic = str5(p.icon);
18370
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);
18371
18571
  const before = ctx.lastHeadingLevel;
18372
18572
  const whole = !!href && (!title || !cardBodyHasLink(n.children));
18373
18573
  const titleText = title && href && !whole ? `<a href="${esc(linkUrl(href, ctx))}">${esc(title)}</a>` : esc(title ?? "");
18374
- const inner = insideLink(whole, ctx, () => iconHtml + (title ? `<div class="not-prose m-0 border-0 p-0 text-base font-semibold" data-card-title>${titleText}</div>` : "") + (desc ? `<p class="m-0 mt-1 text-sm text-muted-foreground [text-decoration:none]">${esc(desc)}</p>` : "") + // Body blocks in the same description wrapper as the Astro pipeline's card (a <div>: they carry their own <p>).
18375
- (n.children?.length ? `<div class="text-sm text-muted-foreground mt-1 [text-decoration:none]">${renderBlocks(n.children, ctx)}</div>` : ""));
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>` : ""));
18376
18579
  ctx.lastHeadingLevel = before;
18377
- const toned = lookup(CARD_TONE_CLASSES, str4(p.tone));
18580
+ const toned = lookup(CARD_TONE_CLASSES, str5(p.tone));
18378
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"}` : ""}`;
18379
- return whole ? `<div${attrs(passthrough(p, cls))}><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(passthrough(p, cls))}><div class="p-0">${inner}</div></div>`;
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>`;
18380
18584
  }
18381
18585
  function linkCard(n, ctx) {
18382
18586
  if (n.children?.length)
18383
18587
  return card(n, ctx);
18384
18588
  const p = n.props ?? {};
18385
- const title = str4(p.title) ?? "";
18386
- const href = str4(p.href) ?? "#";
18387
- const desc = str4(p.description);
18589
+ const title = str5(p.title) ?? "";
18590
+ const href = str5(p.href) ?? "#";
18591
+ const desc = str5(p.description);
18388
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>';
18389
- const ic = str4(p.icon);
18593
+ const ic = str5(p.icon);
18390
18594
  const iconHtml = ic ? namedIcon(ic, "size-4 shrink-0 text-muted-foreground", ctx) : "";
18391
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>`;
18392
18596
  }
@@ -20596,7 +20800,7 @@ function segments(value) {
20596
20800
  const segs = value.split("/");
20597
20801
  return segs.every((s) => s !== "" && s !== "." && s !== "..") ? segs : void 0;
20598
20802
  }
20599
- function pageFacets(meta, options = {}) {
20803
+ function pageFacets(meta2, options = {}) {
20600
20804
  const out = /* @__PURE__ */ Object.create(null);
20601
20805
  const nested2 = new Set(options.hierarchical ?? []);
20602
20806
  const add = (name, value, hierarchical) => {
@@ -20613,7 +20817,7 @@ function pageFacets(meta, options = {}) {
20613
20817
  };
20614
20818
  const list5 = (v) => Array.isArray(v) ? v : [];
20615
20819
  const tagsNested = nested2.has("tags");
20616
- for (const tag of list5(meta?.tags)) {
20820
+ for (const tag of list5(meta2?.tags)) {
20617
20821
  if (typeof tag !== "string")
20618
20822
  continue;
20619
20823
  const slash = tag.indexOf("/");
@@ -20624,19 +20828,19 @@ function pageFacets(meta, options = {}) {
20624
20828
  add("tag", tag, tagsNested);
20625
20829
  }
20626
20830
  }
20627
- for (const v of list5(meta?.audience))
20831
+ for (const v of list5(meta2?.audience))
20628
20832
  add("audience", v, nested2.has("audience"));
20629
- for (const v of list5(meta?.category))
20833
+ for (const v of list5(meta2?.category))
20630
20834
  add("category", v, nested2.has("category"));
20631
- add("status", meta?.status, nested2.has("status"));
20632
- for (const v of list5(meta?.taxonomies?.status))
20835
+ add("status", meta2?.status, nested2.has("status"));
20836
+ for (const v of list5(meta2?.taxonomies?.status))
20633
20837
  add("status", v, nested2.has("status"));
20634
- add("type", meta?.type, nested2.has("type"));
20635
- for (const v of list5(meta?.taxonomies?.type))
20838
+ add("type", meta2?.type, nested2.has("type"));
20839
+ for (const v of list5(meta2?.taxonomies?.type))
20636
20840
  add("type", v, nested2.has("type"));
20637
20841
  add("product", options.unit?.product, false);
20638
20842
  add("version", options.unit?.version, false);
20639
- for (const [name, values] of Object.entries(meta?.taxonomies ?? {})) {
20843
+ for (const [name, values] of Object.entries(meta2?.taxonomies ?? {})) {
20640
20844
  if (BUILT_IN.has(name))
20641
20845
  continue;
20642
20846
  for (const v of list5(values))
@@ -21768,7 +21972,7 @@ function hasPlaceholder(nodes, types) {
21768
21972
  async function resolvePlaceholders(tree, resolvers, ctx) {
21769
21973
  const byType = new Map(resolvers.map((r) => [r.type, r]));
21770
21974
  if (!hasPlaceholder(tree, new Set(byType.keys()))) return void 0;
21771
- const usedIds = headingIds(tree);
21975
+ const usedIds = pageIds2(tree);
21772
21976
  const warnings = [];
21773
21977
  const walk = async (nodes) => {
21774
21978
  for (let i = 0; i < nodes.length; i++) {
@@ -21789,7 +21993,7 @@ async function resolvePlaceholders(tree, resolvers, ctx) {
21789
21993
  i--;
21790
21994
  continue;
21791
21995
  }
21792
- headingIds(got.nodes, usedIds);
21996
+ pageIds2(got.nodes, usedIds);
21793
21997
  nodes.splice(i, 1, ...got.nodes);
21794
21998
  i += got.nodes.length - 1;
21795
21999
  }
@@ -21797,28 +22001,31 @@ async function resolvePlaceholders(tree, resolvers, ctx) {
21797
22001
  await walk(tree);
21798
22002
  return warnings;
21799
22003
  }
21800
- function headingIds(nodes, ids = /* @__PURE__ */ new Set()) {
21801
- const take = (raw) => {
21802
- const base = RESERVED_ID2.test(raw) ? `h-${raw}` : raw;
21803
- let id = base || "section";
21804
- for (let n = 2; ids.has(id); n++) id = `${base}-${n}`;
21805
- ids.add(id);
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
+ }
21806
22016
  };
21807
22017
  const walk = (list5) => {
21808
22018
  for (const n of list5) {
21809
- if (n.type === "heading") {
21810
- const p = n.props ?? {};
21811
- take(typeof p.id === "string" ? p.id : typeof p.slug === "string" ? p.slug : slugify(inlineText2(n.inline)));
21812
- } else if ((n.type === "prose" || n.type === "html") && typeof n.html === "string") {
21813
- for (const m of n.html.matchAll(/<h[1-6]\b[^>]*\sid="([^"]*)"/gi)) take(m[1]);
21814
- }
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);
21815
22023
  if (n.children) walk(n.children);
21816
22024
  }
21817
22025
  };
21818
22026
  walk(nodes);
21819
22027
  return ids;
21820
22028
  }
21821
- var RESERVED_ID2 = /^(db-|tab-\d|tabpanel-\d|acc-\d|accpanel-\d|fn-|fnref-)/;
21822
22029
  var autodocUnresolved = {
21823
22030
  type: "autodoc-ref",
21824
22031
  async resolve(node) {
@@ -22179,7 +22386,7 @@ function staleUnitFiles(previous, now2, written, assets) {
22179
22386
  }
22180
22387
 
22181
22388
  // src/generated/versions.ts
22182
- var PARSER_VERSION = "@dogsbay/format-dogsbay-md@0.2.0-beta.175 @dogsbay/corpus@0.2.0-beta.175 @dogsbay/minja@0.2.0-beta.175 @dogsbay/serialize-core@0.2.0-beta.175 @dogsbay/types@0.2.0-beta.175 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";
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";
22183
22390
 
22184
22391
  // src/core/tree-cache.ts
22185
22392
  var FORMAT = "p1";
@@ -22564,9 +22771,9 @@ function unitPages(cfg, unit, units, files, frontMatterOf, read, includeDrafts)
22564
22771
  }
22565
22772
 
22566
22773
  // src/generated/assets.ts
22567
- 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';
22568
- var CLIENT_FILE = "dogsbay-6e87be2597.js";
22569
- var SSG_VERSION = "0.2.0-beta.175";
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";
22570
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
22571
22778
  header in the callout colours of its tone. A closeable one is closed and remembered by <db-announcement>,
22572
22779
  and the head script hides a closed one before first paint. Context: announcement = {id, key (what a close is
@@ -22800,31 +23007,31 @@ var CLIENT_CANDIDATES = ['""', '""}', '"&"', '")}', '"./",', '"Also', '"\\\\$&")
22800
23007
  var SITE_NOTICES = `Third-party software in this site's _dogsbay/ files (dogsbay.js, site.css) and pages
22801
23008
 
22802
23009
  ========================================================================
22803
- @dogsbay/elements@0.2.0-beta.175 (MIT)
23010
+ @dogsbay/elements@0.2.0-beta.176 (MIT)
22804
23011
  https://github.com/dogsbay/dogsbay.git
22805
23012
 
22806
23013
  Licensed under MIT; the package ships no licence file.
22807
23014
 
22808
23015
  ========================================================================
22809
- @dogsbay/primitives@0.2.0-beta.175 (MIT)
23016
+ @dogsbay/primitives@0.2.0-beta.176 (MIT)
22810
23017
  https://github.com/dogsbay/dogsbay.git
22811
23018
 
22812
23019
  Licensed under MIT; the package ships no licence file.
22813
23020
 
22814
23021
  ========================================================================
22815
- @dogsbay/render-html@0.2.0-beta.175 (MIT)
23022
+ @dogsbay/render-html@0.2.0-beta.176 (MIT)
22816
23023
  https://github.com/dogsbay/dogsbay.git
22817
23024
 
22818
23025
  Licensed under MIT; the package ships no licence file.
22819
23026
 
22820
23027
  ========================================================================
22821
- @dogsbay/search@0.2.0-beta.175 (MIT)
23028
+ @dogsbay/search@0.2.0-beta.176 (MIT)
22822
23029
  https://github.com/dogsbay/dogsbay.git
22823
23030
 
22824
23031
  Licensed under MIT; the package ships no licence file.
22825
23032
 
22826
23033
  ========================================================================
22827
- @dogsbay/ui@0.2.0-beta.175 (MIT)
23034
+ @dogsbay/ui@0.2.0-beta.176 (MIT)
22828
23035
  https://github.com/dogsbay/dogsbay.git
22829
23036
 
22830
23037
  Licensed under MIT; the package ships no licence file.
@@ -25516,28 +25723,28 @@ var EntityDecoder2 = class {
25516
25723
  * @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
25517
25724
  * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
25518
25725
  */
25519
- write(str7, offset) {
25726
+ write(str8, offset) {
25520
25727
  switch (this.state) {
25521
25728
  case EntityDecoderState2.EntityStart: {
25522
- if (str7.charCodeAt(offset) === CharCodes3.NUM) {
25729
+ if (str8.charCodeAt(offset) === CharCodes3.NUM) {
25523
25730
  this.state = EntityDecoderState2.NumericStart;
25524
25731
  this.consumed += 1;
25525
- return this.stateNumericStart(str7, offset + 1);
25732
+ return this.stateNumericStart(str8, offset + 1);
25526
25733
  }
25527
25734
  this.state = EntityDecoderState2.NamedEntity;
25528
- return this.stateNamedEntity(str7, offset);
25735
+ return this.stateNamedEntity(str8, offset);
25529
25736
  }
25530
25737
  case EntityDecoderState2.NumericStart: {
25531
- return this.stateNumericStart(str7, offset);
25738
+ return this.stateNumericStart(str8, offset);
25532
25739
  }
25533
25740
  case EntityDecoderState2.NumericDecimal: {
25534
- return this.stateNumericDecimal(str7, offset);
25741
+ return this.stateNumericDecimal(str8, offset);
25535
25742
  }
25536
25743
  case EntityDecoderState2.NumericHex: {
25537
- return this.stateNumericHex(str7, offset);
25744
+ return this.stateNumericHex(str8, offset);
25538
25745
  }
25539
25746
  case EntityDecoderState2.NamedEntity: {
25540
- return this.stateNamedEntity(str7, offset);
25747
+ return this.stateNamedEntity(str8, offset);
25541
25748
  }
25542
25749
  }
25543
25750
  }
@@ -25550,22 +25757,22 @@ var EntityDecoder2 = class {
25550
25757
  * @param offset The current offset.
25551
25758
  * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
25552
25759
  */
25553
- stateNumericStart(str7, offset) {
25554
- if (offset >= str7.length) {
25760
+ stateNumericStart(str8, offset) {
25761
+ if (offset >= str8.length) {
25555
25762
  return -1;
25556
25763
  }
25557
- if ((str7.charCodeAt(offset) | TO_LOWER_BIT2) === CharCodes3.LOWER_X) {
25764
+ if ((str8.charCodeAt(offset) | TO_LOWER_BIT2) === CharCodes3.LOWER_X) {
25558
25765
  this.state = EntityDecoderState2.NumericHex;
25559
25766
  this.consumed += 1;
25560
- return this.stateNumericHex(str7, offset + 1);
25767
+ return this.stateNumericHex(str8, offset + 1);
25561
25768
  }
25562
25769
  this.state = EntityDecoderState2.NumericDecimal;
25563
- return this.stateNumericDecimal(str7, offset);
25770
+ return this.stateNumericDecimal(str8, offset);
25564
25771
  }
25565
- addToNumericResult(str7, start, end, base) {
25772
+ addToNumericResult(str8, start, end, base) {
25566
25773
  if (start !== end) {
25567
25774
  const digitCount = end - start;
25568
- this.result = this.result * Math.pow(base, digitCount) + parseInt(str7.substr(start, digitCount), base);
25775
+ this.result = this.result * Math.pow(base, digitCount) + parseInt(str8.substr(start, digitCount), base);
25569
25776
  this.consumed += digitCount;
25570
25777
  }
25571
25778
  }
@@ -25578,18 +25785,18 @@ var EntityDecoder2 = class {
25578
25785
  * @param offset The current offset.
25579
25786
  * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
25580
25787
  */
25581
- stateNumericHex(str7, offset) {
25788
+ stateNumericHex(str8, offset) {
25582
25789
  const startIdx = offset;
25583
- while (offset < str7.length) {
25584
- const char = str7.charCodeAt(offset);
25790
+ while (offset < str8.length) {
25791
+ const char = str8.charCodeAt(offset);
25585
25792
  if (isNumber2(char) || isHexadecimalCharacter2(char)) {
25586
25793
  offset += 1;
25587
25794
  } else {
25588
- this.addToNumericResult(str7, startIdx, offset, 16);
25795
+ this.addToNumericResult(str8, startIdx, offset, 16);
25589
25796
  return this.emitNumericEntity(char, 3);
25590
25797
  }
25591
25798
  }
25592
- this.addToNumericResult(str7, startIdx, offset, 16);
25799
+ this.addToNumericResult(str8, startIdx, offset, 16);
25593
25800
  return -1;
25594
25801
  }
25595
25802
  /**
@@ -25601,18 +25808,18 @@ var EntityDecoder2 = class {
25601
25808
  * @param offset The current offset.
25602
25809
  * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
25603
25810
  */
25604
- stateNumericDecimal(str7, offset) {
25811
+ stateNumericDecimal(str8, offset) {
25605
25812
  const startIdx = offset;
25606
- while (offset < str7.length) {
25607
- const char = str7.charCodeAt(offset);
25813
+ while (offset < str8.length) {
25814
+ const char = str8.charCodeAt(offset);
25608
25815
  if (isNumber2(char)) {
25609
25816
  offset += 1;
25610
25817
  } else {
25611
- this.addToNumericResult(str7, startIdx, offset, 10);
25818
+ this.addToNumericResult(str8, startIdx, offset, 10);
25612
25819
  return this.emitNumericEntity(char, 2);
25613
25820
  }
25614
25821
  }
25615
- this.addToNumericResult(str7, startIdx, offset, 10);
25822
+ this.addToNumericResult(str8, startIdx, offset, 10);
25616
25823
  return -1;
25617
25824
  }
25618
25825
  /**
@@ -25657,12 +25864,12 @@ var EntityDecoder2 = class {
25657
25864
  * @param offset The current offset.
25658
25865
  * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
25659
25866
  */
25660
- stateNamedEntity(str7, offset) {
25867
+ stateNamedEntity(str8, offset) {
25661
25868
  const { decodeTree } = this;
25662
25869
  let current = decodeTree[this.treeIndex];
25663
25870
  let valueLength = (current & BinTrieFlags2.VALUE_LENGTH) >> 14;
25664
- for (; offset < str7.length; offset++, this.excess++) {
25665
- const char = str7.charCodeAt(offset);
25871
+ for (; offset < str8.length; offset++, this.excess++) {
25872
+ const char = str8.charCodeAt(offset);
25666
25873
  this.treeIndex = determineBranch2(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
25667
25874
  if (this.treeIndex < 0) {
25668
25875
  return this.result === 0 || // If we are parsing an attribute
@@ -25747,15 +25954,15 @@ var EntityDecoder2 = class {
25747
25954
  };
25748
25955
  function getDecoder(decodeTree) {
25749
25956
  let ret = "";
25750
- const decoder2 = new EntityDecoder2(decodeTree, (str7) => ret += fromCodePoint2(str7));
25751
- return function decodeWithTrie(str7, decodeMode) {
25957
+ const decoder2 = new EntityDecoder2(decodeTree, (str8) => ret += fromCodePoint2(str8));
25958
+ return function decodeWithTrie(str8, decodeMode) {
25752
25959
  let lastIndex = 0;
25753
25960
  let offset = 0;
25754
- while ((offset = str7.indexOf("&", offset)) >= 0) {
25755
- ret += str7.slice(lastIndex, offset);
25961
+ while ((offset = str8.indexOf("&", offset)) >= 0) {
25962
+ ret += str8.slice(lastIndex, offset);
25756
25963
  decoder2.startEntity(decodeMode);
25757
25964
  const len = decoder2.write(
25758
- str7,
25965
+ str8,
25759
25966
  // Skip the "&"
25760
25967
  offset + 1
25761
25968
  );
@@ -25766,7 +25973,7 @@ function getDecoder(decodeTree) {
25766
25973
  lastIndex = offset + len;
25767
25974
  offset = len === 0 ? lastIndex + 1 : lastIndex;
25768
25975
  }
25769
- const result = ret + str7.slice(lastIndex);
25976
+ const result = ret + str8.slice(lastIndex);
25770
25977
  ret = "";
25771
25978
  return result;
25772
25979
  };
@@ -25819,28 +26026,28 @@ var xmlCodeMap = /* @__PURE__ */ new Map([
25819
26026
  ]);
25820
26027
  var getCodePoint = (
25821
26028
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
25822
- String.prototype.codePointAt != null ? (str7, index) => str7.codePointAt(index) : (
26029
+ String.prototype.codePointAt != null ? (str8, index) => str8.codePointAt(index) : (
25823
26030
  // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
25824
26031
  (c, index) => (c.charCodeAt(index) & 64512) === 55296 ? (c.charCodeAt(index) - 55296) * 1024 + c.charCodeAt(index + 1) - 56320 + 65536 : c.charCodeAt(index)
25825
26032
  )
25826
26033
  );
25827
- function encodeXML(str7) {
26034
+ function encodeXML(str8) {
25828
26035
  let ret = "";
25829
26036
  let lastIdx = 0;
25830
26037
  let match;
25831
- while ((match = xmlReplacer.exec(str7)) !== null) {
26038
+ while ((match = xmlReplacer.exec(str8)) !== null) {
25832
26039
  const i = match.index;
25833
- const char = str7.charCodeAt(i);
26040
+ const char = str8.charCodeAt(i);
25834
26041
  const next = xmlCodeMap.get(char);
25835
26042
  if (next !== void 0) {
25836
- ret += str7.substring(lastIdx, i) + next;
26043
+ ret += str8.substring(lastIdx, i) + next;
25837
26044
  lastIdx = i + 1;
25838
26045
  } else {
25839
- ret += `${str7.substring(lastIdx, i)}&#x${getCodePoint(str7, i).toString(16)};`;
26046
+ ret += `${str8.substring(lastIdx, i)}&#x${getCodePoint(str8, i).toString(16)};`;
25840
26047
  lastIdx = xmlReplacer.lastIndex += Number((char & 64512) === 55296);
25841
26048
  }
25842
26049
  }
25843
- return ret + str7.substr(lastIdx);
26050
+ return ret + str8.substr(lastIdx);
25844
26051
  }
25845
26052
  function getEscaper(regex, map) {
25846
26053
  return function escape2(data) {
@@ -26744,7 +26951,6 @@ var TEXT_HTML_TYPES = /* @__PURE__ */ new Set(["code", "math", "math-block", "di
26744
26951
  var URL_PROPS = /* @__PURE__ */ new Set(["href", "src", "url", "link", "poster", "image", "logo"]);
26745
26952
  var escAttr3 = (s) => s.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
26746
26953
  var escText2 = (s) => s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
26747
- var RESERVED_ID3 = /^(db-|tab-\d|tabpanel-\d|acc-\d|accpanel-\d|fn-|fnref-)/;
26748
26954
  function safeUrl(raw, kind) {
26749
26955
  const v = raw.replace(/[\u0000- \u007f-\u009f]/g, "").toLowerCase();
26750
26956
  const scheme = /^([a-z][a-z0-9+.-]*):/.exec(v)?.[1];
@@ -26788,7 +26994,7 @@ function sanitizeHtml(html, warn) {
26788
26994
  dropped.add(`${name}[${key2}]`);
26789
26995
  continue;
26790
26996
  }
26791
- if (key2 === "id" && RESERVED_ID3.test(v)) {
26997
+ if (key2 === "id" && RESERVED_ID.test(v)) {
26792
26998
  dropped.add(`${name}[id=${v.slice(0, 40)}]`);
26793
26999
  continue;
26794
27000
  }
@@ -26831,7 +27037,7 @@ function cleanProps(props, where, warn) {
26831
27037
  warn("attribute-dropped", `${where}: dropped the "${k}" attribute (not allowed in a sanitized page)`);
26832
27038
  continue;
26833
27039
  }
26834
- if (k === "id" && typeof v === "string" && RESERVED_ID3.test(v) && !where.startsWith("footnote")) {
27040
+ if (k === "id" && typeof v === "string" && RESERVED_ID.test(v) && !where.startsWith("footnote")) {
26835
27041
  warn("attribute-dropped", `${where}: dropped id="${v.slice(0, 40)}" (reserved for the page's own components)`);
26836
27042
  continue;
26837
27043
  }
@@ -26939,11 +27145,11 @@ function safeSegment(s) {
26939
27145
  }
26940
27146
  var ARRAY_FIELDS = /* @__PURE__ */ new Set(["tags", "category", "audience"]);
26941
27147
  var SCALAR_FIELDS = /* @__PURE__ */ new Set(["type", "status"]);
26942
- function pageTerms(meta, name) {
26943
- const m = meta;
27148
+ function pageTerms(meta2, name) {
27149
+ const m = meta2;
26944
27150
  if (ARRAY_FIELDS.has(name)) return Array.isArray(m[name]) ? m[name].filter((v) => typeof v === "string") : [];
26945
27151
  if (SCALAR_FIELDS.has(name)) return typeof m[name] === "string" ? [m[name]] : [];
26946
- return meta.taxonomies?.[name] ?? [];
27152
+ return meta2.taxonomies?.[name] ?? [];
26947
27153
  }
26948
27154
  function expandTerm(term, hierarchical) {
26949
27155
  const segs = term.split("/").filter(Boolean);
@@ -26952,12 +27158,12 @@ function expandTerm(term, hierarchical) {
26952
27158
  return segs.map((_, i) => segs.slice(0, i + 1));
26953
27159
  }
26954
27160
  function searchFilters(defs, fm, slug, unit) {
26955
- const meta = parseMeta(fm, { slug, taxonomyNames: defs.map((d) => d.name) });
26956
- if (meta.taxonomies && (Object.hasOwn(meta.taxonomies, "tag") || Object.hasOwn(meta.taxonomies, "section"))) {
26957
- const { tag: _t, section: _s, ...rest } = meta.taxonomies;
26958
- meta.taxonomies = rest;
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;
26959
27165
  }
26960
- const all = pageFacets(meta, {
27166
+ const all = pageFacets(meta2, {
26961
27167
  tagPrefixes: searchTagPrefixes(defs),
26962
27168
  hierarchical: defs.filter((d) => d.hierarchical).map((d) => d.name),
26963
27169
  unit
@@ -26987,10 +27193,10 @@ var TaxonomyCollector = class {
26987
27193
  /** Record a page's terms from its front matter. */
26988
27194
  add(slug, fm) {
26989
27195
  if (!this.defs.length) return;
26990
- const meta = parseMeta(fm, { slug, taxonomyNames: this.names });
27196
+ const meta2 = parseMeta(fm, { slug, taxonomyNames: this.names });
26991
27197
  for (const def of this.defs) {
26992
27198
  const terms = this.byName.get(def.name);
26993
- for (const value of pageTerms(meta, def.name)) {
27199
+ for (const value of pageTerms(meta2, def.name)) {
26994
27200
  for (const path of expandTerm(value, def.hierarchical)) {
26995
27201
  const key2 = path.join("/");
26996
27202
  let t = terms.get(key2);
@@ -27492,17 +27698,6 @@ function socialIconSvg(name, size = 20) {
27492
27698
  }
27493
27699
  var SOCIAL_ICONS = Object.keys(SOCIAL_ICON_BODIES);
27494
27700
 
27495
- // node_modules/@dogsbay/elements/dist/chunk-MNO3RAM2.js
27496
- 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){}})();`;
27497
-
27498
- // node_modules/@dogsbay/elements/dist/chunk-QDB537UE.js
27499
- 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)})();`;
27500
- var COLOR_MODE_HEAD_SCRIPTS = Object.freeze({
27501
- system: script('window.matchMedia("(prefers-color-scheme: dark)").matches'),
27502
- light: script("false"),
27503
- dark: script("true")
27504
- });
27505
-
27506
27701
  // src/theme/compose.ts
27507
27702
  var LINKS_LIST_HIDDEN = { lg: "lg:hidden", xl: "xl:hidden", "2xl": "2xl:hidden", never: "" };
27508
27703
  var LINKS_BAR = { lg: "hidden lg:flex", xl: "hidden xl:flex", "2xl": "hidden 2xl:flex", never: "hidden" };
@@ -28403,8 +28598,8 @@ var SearchIndexBuilder = class {
28403
28598
  if (f.length) return [d.title, d.url, i, t, f];
28404
28599
  return t.length ? [d.title, d.url, i, t] : [d.title, d.url, i];
28405
28600
  });
28406
- const meta = { format: FORMAT2, depth, count: this.docs.length, shards: [...byShard.keys()].sort(), sections: sections2, tags, ...facets.length ? { facets } : {}, block: BLOCK, lang: this.opts.lang, docs };
28407
- yield [file.docs, wrap(key.docs, meta)];
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)];
28408
28603
  for (let b = this.fragmentsOut; b * BLOCK < this.docs.length; b++) yield this.fragmentFile(b);
28409
28604
  if (!this.grouped) {
28410
28605
  const n = this.termIds.size;
@@ -28447,7 +28642,7 @@ var SearchIndexBuilder = class {
28447
28642
  this.grouped = void 0;
28448
28643
  }
28449
28644
  };
28450
- var str5 = (v) => typeof v === "string" ? v : "";
28645
+ var str6 = (v) => typeof v === "string" ? v : "";
28451
28646
  var objects = (v) => Array.isArray(v) ? v.filter((x) => !!x && typeof x === "object") : [];
28452
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(" "));
28453
28648
  var ENTITY3 = { lt: "<", gt: ">", quot: '"', "#39": "'", "#x27": "'", apos: "'", nbsp: " ", amp: "&" };
@@ -28533,13 +28728,13 @@ function htmlText(html) {
28533
28728
  }
28534
28729
  function propertyText(list5, depth = 0) {
28535
28730
  if (depth > 10) return [];
28536
- return objects(list5).flatMap((p) => [str5(p.name), specText(p.description), ...propertyText(p.properties, depth + 1), ...propertyText(p.items, depth + 1)]);
28731
+ return objects(list5).flatMap((p) => [str6(p.name), specText(p.description), ...propertyText(p.properties, depth + 1), ...propertyText(p.items, depth + 1)]);
28537
28732
  }
28538
28733
  var SPEC_MARKUP = /* @__PURE__ */ new Set(
28539
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(" ")]
28540
28735
  );
28541
28736
  function specText(v) {
28542
- const s = str5(v);
28737
+ const s = str6(v);
28543
28738
  if (!s.includes("<") && !s.includes("&")) return s;
28544
28739
  return s.split(/(`+[^`]*`+)/).map(
28545
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))
@@ -28569,7 +28764,7 @@ function extractText2(tree) {
28569
28764
  switch (n.type) {
28570
28765
  case "endpoint":
28571
28766
  body.push(
28572
- `${str5(ap.method).toUpperCase()} ${str5(ap.path)}`,
28767
+ `${str6(ap.method).toUpperCase()} ${str6(ap.path)}`,
28573
28768
  specText(ap.summary),
28574
28769
  specText(ap.description),
28575
28770
  ...propertyText(ap.parameters),
@@ -28579,15 +28774,15 @@ function extractText2(tree) {
28579
28774
  continue;
28580
28775
  case "api-class":
28581
28776
  case "api-member":
28582
- headings.push(str5(ap.name));
28777
+ headings.push(str6(ap.name));
28583
28778
  walk(n.children);
28584
28779
  continue;
28585
28780
  case "api-doc":
28586
- body.push(htmlText(str5(ap.html)));
28781
+ body.push(htmlText(str6(ap.html)));
28587
28782
  walk(n.children);
28588
28783
  continue;
28589
28784
  case "api-params":
28590
- for (const p2 of objects(ap.params)) body.push(str5(p2.name), htmlText(str5(p2.docHtml)) || str5(p2.doc) || str5(p2.description));
28785
+ for (const p2 of objects(ap.params)) body.push(str6(p2.name), htmlText(str6(p2.docHtml)) || str6(p2.doc) || str6(p2.description));
28591
28786
  continue;
28592
28787
  case "prose":
28593
28788
  if (!n.inline && typeof n.html === "string") {
@@ -29121,16 +29316,16 @@ var BlogCollector = class {
29121
29316
  }
29122
29317
  posts = /* @__PURE__ */ new Map();
29123
29318
  add(slug, title, fm) {
29124
- const meta = parseMeta(fm);
29125
- const date = meta[this.def.dateField];
29126
- const updated = meta.updated;
29319
+ const meta2 = parseMeta(fm);
29320
+ const date = meta2[this.def.dateField];
29321
+ const updated = meta2.updated;
29127
29322
  const d = (s) => s === void 0 ? void 0 : detach(s);
29128
29323
  this.posts.set(slug, {
29129
29324
  slug,
29130
29325
  title,
29131
29326
  date: d(date),
29132
29327
  updated: updated && updated !== date ? d(updated) : void 0,
29133
- authors: meta.author?.map(detach),
29328
+ authors: meta2.author?.map(detach),
29134
29329
  heroImage: typeof fm.heroImage === "string" && fm.heroImage ? d(fm.heroImage) : void 0
29135
29330
  });
29136
29331
  }
@@ -29461,7 +29656,7 @@ function diagramStore(input, cfg) {
29461
29656
  return renderer ? new DiagramStore(renderer, input.diagramCacheChars, input.diagramPinChars) : void 0;
29462
29657
  }
29463
29658
  async function siteCssBuilder(input) {
29464
- return input.css ?? (await import("./css-build-HPTUWTOJ.mjs")).buildSiteCss;
29659
+ return input.css ?? (await import("./css-build-VKKTSP6P.mjs")).buildSiteCss;
29465
29660
  }
29466
29661
  var SITE_FILES = /* @__PURE__ */ new Set(["robots.txt", "sitemap-index.xml"]);
29467
29662
  var SEARCH_PAGE = "search.html";
@@ -29504,14 +29699,14 @@ function pageLinesOf(tree) {
29504
29699
  return;
29505
29700
  }
29506
29701
  if (!node || typeof node !== "object") return;
29507
- const meta = node.meta;
29508
- if (meta && typeof meta.line === "number") {
29509
- const o = meta.source;
29702
+ const meta2 = node.meta;
29703
+ if (meta2 && typeof meta2.line === "number") {
29704
+ const o = meta2.source;
29510
29705
  const to = !o ? void 0 : o.file === void 0 ? o.from ?? o.line : o.via.find((v) => v.file === void 0)?.from;
29511
- if (to === void 0) delete meta.line;
29512
- else meta.line = to;
29706
+ if (to === void 0) delete meta2.line;
29707
+ else meta2.line = to;
29513
29708
  }
29514
- for (const v of Object.values(node)) if (v && typeof v === "object" && v !== meta) walk(v);
29709
+ for (const v of Object.values(node)) if (v && typeof v === "object" && v !== meta2) walk(v);
29515
29710
  };
29516
29711
  walk(tree);
29517
29712
  }
@@ -30443,7 +30638,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
30443
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) });
30444
30639
  {
30445
30640
  const hash = isExternal(fm.redirect) ? "" : splitSuffix(fm.redirect.trim()).suffix.replace(/^\?[^#]*/, "");
30446
- const own2 = { title: str6(fm.title) && detach(str6(fm.title)), description: typeof fm.description === "string" ? detach(fm.description) : void 0 };
30641
+ const own2 = { title: str7(fm.title) && detach(str7(fm.title)), description: typeof fm.description === "string" ? detach(fm.description) : void 0 };
30447
30642
  stubTargets.set(slug, { to: target(fm.redirect), ...hash.length > 1 ? { fragment: hash } : {}, ...own2 });
30448
30643
  }
30449
30644
  continue;
@@ -30479,11 +30674,11 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
30479
30674
  }
30480
30675
  } else {
30481
30676
  const keep = memo2 && !templatesOf(p).isTemplatePage(fm);
30482
- const titled = `${str6(fm.title) ?? ""} ${fm.description ?? ""}`;
30677
+ const titled = `${str7(fm.title) ?? ""} ${fm.description ?? ""}`;
30483
30678
  if (templatesOf(p).isTemplatePage(fm) && /\{[{%]/.test(titled) && /\bdata\s*(\.[A-Za-z_]|\[)/.test(titled)) dataInTitles = true;
30484
30679
  const reads = keep ? (f) => state.scan.read(abs(p), f) : void 0;
30485
30680
  const skippedBefore = state.templateBudget.skipped.titles;
30486
- title = detach(await resolveTitle(str6(fm.title) ?? firstH1(await source()) ?? humanize2(slug.split("/").pop() || cfg.name), await source(), p, fm, reads));
30681
+ title = detach(await resolveTitle(str7(fm.title) ?? firstH1(await source()) ?? humanize2(slug.split("/").pop() || cfg.name), await source(), p, fm, reads));
30487
30682
  description = fm.description != null ? detach(await resolveTitle(String(fm.description), await source(), p, fm, reads)) : void 0;
30488
30683
  if (keep && state.templateBudget.skipped.titles === skippedBefore) Object.assign(memo2, { title, description, resolvedWith });
30489
30684
  }
@@ -31180,8 +31375,8 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
31180
31375
  let hasH1 = tree[0]?.type === "heading" && Number(tree[0].props?.level) === 1;
31181
31376
  const post = postNeighbours.has(info.slug) ? blog.get(info.slug) : void 0;
31182
31377
  const h1Text = hasH1 ? inlineText2(tree[0].inline) : void 0;
31183
- const title = isTemplated(str6(fm.title) ?? "") ? h1Text && !isTemplated(h1Text) ? h1Text : info.title : str6(fm.title) ?? h1Text ?? info.title;
31184
- const description = isTemplated(str6(fm.description) ?? "") ? info.description : str6(fm.description);
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);
31185
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 });
31186
31381
  if (isReplaced) return;
31187
31382
  if (post && hasH1) {
@@ -31198,7 +31393,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
31198
31393
  const pageTrail = hidden ? trail : listedTrail;
31199
31394
  const navNode = pageTrail.get(info.slug)?.at(-1);
31200
31395
  if (navNode?.children.length && !hasProse(tree)) body += childLinks2(navNode.children, (s) => pageRefs.get(s), info.out, cfg.linkStyle, infos);
31201
- const layoutName = str6(fm.layout) ?? (post ? "blank" : cfg.layout);
31396
+ const layoutName = str7(fm.layout) ?? (post ? "blank" : cfg.layout);
31202
31397
  const tocMode = fm.toc === false ? "off" : ["top", "popover", "rail", "off"].includes(fm.toc) ? fm.toc : cfg.toc;
31203
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`);
31204
31399
  for (const v of ctx.unknownVariants ?? []) warnPage(info, "button-variant", `button variant "${v}" drawn as the default button`);
@@ -31289,8 +31484,8 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
31289
31484
  const ref = n.slug != null && !n.fragment ? pageRefs.get(n.slug) : void 0;
31290
31485
  return { name: n.label, url: ref ? absoluteUrl(cfg, unit.prefix, servedPath(ref.out, cfg.linkStyle)) : void 0 };
31291
31486
  }) : void 0,
31292
- image: str6(fm.ogImage) ?? cfg.ogImage,
31293
- pageType: str6(fm.type),
31487
+ image: str7(fm.ogImage) ?? cfg.ogImage,
31488
+ pageType: str7(fm.type),
31294
31489
  noindex: cfg.noindex || fm.noindex === true || fm.draft === true || canon.noindex || hidden,
31295
31490
  nofollow: cfg.nofollow || fm.nofollow === true,
31296
31491
  twitterHandle: cfg.twitterHandle,
@@ -31781,20 +31976,20 @@ var STATUS_BADGE = {
31781
31976
  };
31782
31977
  var BADGE_LINK = "transition-colors hover:opacity-80";
31783
31978
  function fieldBadges(fm, cfg, href) {
31784
- const meta = parseMeta(fm);
31979
+ const meta2 = parseMeta(fm);
31785
31980
  const link2 = (field, value) => {
31786
31981
  const def = cfg.taxonomies.find((x) => x.name === field);
31787
31982
  return def && value.split("/").filter(Boolean).every(safeSegment) ? href(generatedOut(`${def.path}/${value.split("/").filter(Boolean).join("/")}`, cfg)) : void 0;
31788
31983
  };
31789
31984
  const out = [];
31790
- if (meta.type) {
31791
- const h = link2("type", meta.type);
31792
- out.push({ label: meta.type.replace(/[-_]/g, " "), cls: [TYPE_BADGE_BASE, h ? BADGE_LINK : "", TYPE_BADGE_STYLE[meta.type] ?? "border-border bg-muted text-muted-foreground"].filter(Boolean).join(" "), href: h, attr: "data-page-type", value: meta.type });
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 });
31793
31988
  }
31794
- const s = meta.status && STATUS_BADGE[meta.status];
31989
+ const s = meta2.status && STATUS_BADGE[meta2.status];
31795
31990
  if (s) {
31796
- const h = link2("status", meta.status);
31797
- out.push({ label: s[0], cls: [STATUS_BADGE_BASE, h ? BADGE_LINK : "", s[1]].filter(Boolean).join(" "), href: h, attr: "data-status", value: meta.status });
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 });
31798
31993
  }
31799
31994
  return out;
31800
31995
  }
@@ -32060,7 +32255,6 @@ function relativeHome(from, to) {
32060
32255
  if (to.startsWith(from)) return to.slice(from.length);
32061
32256
  return "../".repeat(from.split("/").filter(Boolean).length) + to.slice(1);
32062
32257
  }
32063
- var FORWARD_SCRIPT = "location.replace(document.documentElement.dataset.to+location.search+location.hash)";
32064
32258
  function forwardKeepingQuery(target, name) {
32065
32259
  const u = esc(target);
32066
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>
@@ -32081,7 +32275,7 @@ async function optionalText(files, p) {
32081
32275
  const c = files.get(p);
32082
32276
  return c == null ? void 0 : readText(c);
32083
32277
  }
32084
- function str6(v) {
32278
+ function str7(v) {
32085
32279
  return v == null || v === "" ? void 0 : String(v);
32086
32280
  }
32087
32281
  function firstH1(src) {