@11ty/client 4.0.0-alpha.1 → 4.0.0-alpha.10

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,4 +1,4 @@
1
- /*! Eleventy v4.0.0-alpha.1 (@11ty/client/md Engine Bundle) */
1
+ /*! Eleventy (Build Awesome) v4.0.0-alpha.10 (@11ty/client/md Engine Bundle) */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
4
4
  var __export = (target, all) => {
@@ -10,6 +10,7 @@ var __export = (target, all) => {
10
10
  var utils_exports = {};
11
11
  __export(utils_exports, {
12
12
  arrayReplaceAt: () => arrayReplaceAt,
13
+ asciiTrim: () => asciiTrim,
13
14
  assign: () => assign,
14
15
  escapeHtml: () => escapeHtml,
15
16
  escapeRE: () => escapeRE,
@@ -17,6 +18,7 @@ __export(utils_exports, {
17
18
  has: () => has,
18
19
  isMdAsciiPunct: () => isMdAsciiPunct,
19
20
  isPunctChar: () => isPunctChar,
21
+ isPunctCharCode: () => isPunctCharCode,
20
22
  isSpace: () => isSpace,
21
23
  isString: () => isString,
22
24
  isValidEntityCode: () => isValidEntityCode,
@@ -862,6 +864,10 @@ function decodeHTML(str, mode = DecodingMode.Legacy) {
862
864
  return htmlDecoder(str, mode);
863
865
  }
864
866
  __name(decodeHTML, "decodeHTML");
867
+ function decodeHTMLStrict(str) {
868
+ return htmlDecoder(str, DecodingMode.Strict);
869
+ }
870
+ __name(decodeHTMLStrict, "decodeHTMLStrict");
865
871
 
866
872
  // ../../node_modules/markdown-it/node_modules/entities/lib/esm/generated/encode-html.js
867
873
  function restoreDiff(arr) {
@@ -1105,6 +1111,10 @@ function isPunctChar(ch) {
1105
1111
  return regex_default4.test(ch) || regex_default5.test(ch);
1106
1112
  }
1107
1113
  __name(isPunctChar, "isPunctChar");
1114
+ function isPunctCharCode(code2) {
1115
+ return isPunctChar(fromCodePoint2(code2));
1116
+ }
1117
+ __name(isPunctCharCode, "isPunctCharCode");
1108
1118
  function isMdAsciiPunct(ch) {
1109
1119
  switch (ch) {
1110
1120
  case 33:
@@ -1153,6 +1163,26 @@ function normalizeReference(str) {
1153
1163
  return str.toLowerCase().toUpperCase();
1154
1164
  }
1155
1165
  __name(normalizeReference, "normalizeReference");
1166
+ function isAsciiTrimmable(c) {
1167
+ return c === 32 || c === 9 || c === 10 || c === 13;
1168
+ }
1169
+ __name(isAsciiTrimmable, "isAsciiTrimmable");
1170
+ function asciiTrim(str) {
1171
+ let start = 0;
1172
+ for (; start < str.length; start++) {
1173
+ if (!isAsciiTrimmable(str.charCodeAt(start))) {
1174
+ break;
1175
+ }
1176
+ }
1177
+ let end = str.length - 1;
1178
+ for (; end >= start; end--) {
1179
+ if (!isAsciiTrimmable(str.charCodeAt(end))) {
1180
+ break;
1181
+ }
1182
+ }
1183
+ return str.slice(start, end + 1);
1184
+ }
1185
+ __name(asciiTrim, "asciiTrim");
1156
1186
  var lib = { mdurl: mdurl_exports, ucmicro: uc_exports };
1157
1187
 
1158
1188
  // ../../node_modules/markdown-it/lib/helpers/index.mjs
@@ -1922,13 +1952,29 @@ __name(replace, "replace");
1922
1952
  var QUOTE_TEST_RE = /['"]/;
1923
1953
  var QUOTE_RE = /['"]/g;
1924
1954
  var APOSTROPHE = "\u2019";
1925
- function replaceAt(str, index, ch) {
1926
- return str.slice(0, index) + ch + str.slice(index + 1);
1955
+ function addReplacement(replacements, tokenIdx, pos, ch) {
1956
+ if (!replacements[tokenIdx]) {
1957
+ replacements[tokenIdx] = [];
1958
+ }
1959
+ replacements[tokenIdx].push({ pos, ch });
1927
1960
  }
1928
- __name(replaceAt, "replaceAt");
1961
+ __name(addReplacement, "addReplacement");
1962
+ function applyReplacements(str, replacements) {
1963
+ let result = "";
1964
+ let lastPos = 0;
1965
+ replacements.sort((a, b) => a.pos - b.pos);
1966
+ for (let i = 0; i < replacements.length; i++) {
1967
+ const replacement = replacements[i];
1968
+ result += str.slice(lastPos, replacement.pos) + replacement.ch;
1969
+ lastPos = replacement.pos + 1;
1970
+ }
1971
+ return result + str.slice(lastPos);
1972
+ }
1973
+ __name(applyReplacements, "applyReplacements");
1929
1974
  function process_inlines(tokens, state) {
1930
1975
  let j;
1931
1976
  const stack = [];
1977
+ const replacements = {};
1932
1978
  for (let i = 0; i < tokens.length; i++) {
1933
1979
  const token = tokens[i];
1934
1980
  const thisLevel = tokens[i].level;
@@ -1941,9 +1987,9 @@ function process_inlines(tokens, state) {
1941
1987
  if (token.type !== "text") {
1942
1988
  continue;
1943
1989
  }
1944
- let text2 = token.content;
1990
+ const text2 = token.content;
1945
1991
  let pos = 0;
1946
- let max = text2.length;
1992
+ const max = text2.length;
1947
1993
  OUTER:
1948
1994
  while (pos < max) {
1949
1995
  QUOTE_RE.lastIndex = pos;
@@ -1977,8 +2023,8 @@ function process_inlines(tokens, state) {
1977
2023
  break;
1978
2024
  }
1979
2025
  }
1980
- const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
1981
- const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
2026
+ const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctCharCode(lastChar);
2027
+ const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctCharCode(nextChar);
1982
2028
  const isLastWhiteSpace = isWhiteSpace(lastChar);
1983
2029
  const isNextWhiteSpace = isWhiteSpace(nextChar);
1984
2030
  if (isNextWhiteSpace) {
@@ -2006,7 +2052,7 @@ function process_inlines(tokens, state) {
2006
2052
  }
2007
2053
  if (!canOpen && !canClose) {
2008
2054
  if (isSingle) {
2009
- token.content = replaceAt(token.content, t.index, APOSTROPHE);
2055
+ addReplacement(replacements, i, t.index, APOSTROPHE);
2010
2056
  }
2011
2057
  continue;
2012
2058
  }
@@ -2027,18 +2073,8 @@ function process_inlines(tokens, state) {
2027
2073
  openQuote = state.md.options.quotes[0];
2028
2074
  closeQuote = state.md.options.quotes[1];
2029
2075
  }
2030
- token.content = replaceAt(token.content, t.index, closeQuote);
2031
- tokens[item.token].content = replaceAt(
2032
- tokens[item.token].content,
2033
- item.pos,
2034
- openQuote
2035
- );
2036
- pos += closeQuote.length - 1;
2037
- if (item.token === i) {
2038
- pos += openQuote.length - 1;
2039
- }
2040
- text2 = token.content;
2041
- max = text2.length;
2076
+ addReplacement(replacements, i, t.index, closeQuote);
2077
+ addReplacement(replacements, item.token, item.pos, openQuote);
2042
2078
  stack.length = j;
2043
2079
  continue OUTER;
2044
2080
  }
@@ -2052,10 +2088,13 @@ function process_inlines(tokens, state) {
2052
2088
  level: thisLevel
2053
2089
  });
2054
2090
  } else if (canClose && isSingle) {
2055
- token.content = replaceAt(token.content, t.index, APOSTROPHE);
2091
+ addReplacement(replacements, i, t.index, APOSTROPHE);
2056
2092
  }
2057
2093
  }
2058
2094
  }
2095
+ Object.keys(replacements).forEach(function(tokenIdx) {
2096
+ tokens[tokenIdx].content = applyReplacements(tokens[tokenIdx].content, replacements[tokenIdx]);
2097
+ });
2059
2098
  }
2060
2099
  __name(process_inlines, "process_inlines");
2061
2100
  function smartquotes(state) {
@@ -3262,10 +3301,13 @@ function html_block(state, startLine, endLine, silent) {
3262
3301
  return HTML_SEQUENCES[i][2];
3263
3302
  }
3264
3303
  let nextLine = startLine + 1;
3304
+ const endsOnBlankLine = HTML_SEQUENCES[i][1].test("");
3265
3305
  if (!HTML_SEQUENCES[i][1].test(lineText)) {
3266
3306
  for (; nextLine < endLine; nextLine++) {
3267
3307
  if (state.sCount[nextLine] < state.blkIndent) {
3268
- break;
3308
+ if (endsOnBlankLine || !state.isEmpty(nextLine)) {
3309
+ break;
3310
+ }
3269
3311
  }
3270
3312
  pos = state.bMarks[nextLine] + state.tShift[nextLine];
3271
3313
  max = state.eMarks[nextLine];
@@ -3319,7 +3361,7 @@ function heading(state, startLine, endLine, silent) {
3319
3361
  token_o.markup = "########".slice(0, level);
3320
3362
  token_o.map = [startLine, state.line];
3321
3363
  const token_i = state.push("inline", "", 0);
3322
- token_i.content = state.src.slice(pos, max).trim();
3364
+ token_i.content = asciiTrim(state.src.slice(pos, max));
3323
3365
  token_i.map = [startLine, state.line];
3324
3366
  token_i.children = [];
3325
3367
  const token_c = state.push("heading_close", "h" + String(level), -1);
@@ -3373,9 +3415,10 @@ function lheading(state, startLine, endLine) {
3373
3415
  }
3374
3416
  }
3375
3417
  if (!level) {
3418
+ state.parentType = oldParentType;
3376
3419
  return false;
3377
3420
  }
3378
- const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
3421
+ const content = asciiTrim(state.getLines(startLine, nextLine, state.blkIndent, false));
3379
3422
  state.line = nextLine + 1;
3380
3423
  const token_o = state.push("heading_open", "h" + String(level), 1);
3381
3424
  token_o.markup = String.fromCharCode(marker);
@@ -3415,7 +3458,7 @@ function paragraph(state, startLine, endLine) {
3415
3458
  break;
3416
3459
  }
3417
3460
  }
3418
- const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
3461
+ const content = asciiTrim(state.getLines(startLine, nextLine, state.blkIndent, false));
3419
3462
  state.line = nextLine;
3420
3463
  const token_o = state.push("paragraph_open", "p", 1);
3421
3464
  token_o.map = [startLine, state.line];
@@ -3557,15 +3600,37 @@ StateInline.prototype.push = function(type, tag, nesting) {
3557
3600
  StateInline.prototype.scanDelims = function(start, canSplitWord) {
3558
3601
  const max = this.posMax;
3559
3602
  const marker = this.src.charCodeAt(start);
3560
- const lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 32;
3603
+ let lastChar;
3604
+ if (start === 0) {
3605
+ lastChar = 32;
3606
+ } else if (start === 1) {
3607
+ lastChar = this.src.charCodeAt(0);
3608
+ if ((lastChar & 63488) === 55296) {
3609
+ lastChar = 65533;
3610
+ }
3611
+ } else {
3612
+ lastChar = this.src.charCodeAt(start - 1);
3613
+ if ((lastChar & 64512) === 56320) {
3614
+ const highSurr = this.src.charCodeAt(start - 2);
3615
+ lastChar = (highSurr & 64512) === 55296 ? 65536 + (highSurr - 55296 << 10) + (lastChar - 56320) : 65533;
3616
+ } else if ((lastChar & 64512) === 55296) {
3617
+ lastChar = 65533;
3618
+ }
3619
+ }
3561
3620
  let pos = start;
3562
3621
  while (pos < max && this.src.charCodeAt(pos) === marker) {
3563
3622
  pos++;
3564
3623
  }
3565
3624
  const count = pos - start;
3566
- const nextChar = pos < max ? this.src.charCodeAt(pos) : 32;
3567
- const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
3568
- const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
3625
+ let nextChar = pos < max ? this.src.charCodeAt(pos) : 32;
3626
+ if ((nextChar & 64512) === 55296) {
3627
+ const lowSurr = this.src.charCodeAt(pos + 1);
3628
+ nextChar = (lowSurr & 64512) === 56320 ? 65536 + (nextChar - 55296 << 10) + (lowSurr - 56320) : 65533;
3629
+ } else if ((nextChar & 64512) === 56320) {
3630
+ nextChar = 65533;
3631
+ }
3632
+ const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctCharCode(lastChar);
3633
+ const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctCharCode(nextChar);
3569
3634
  const isLastWhiteSpace = isWhiteSpace(lastChar);
3570
3635
  const isNextWhiteSpace = isWhiteSpace(nextChar);
3571
3636
  const left_flanking = !isNextWhiteSpace && (!isNextPunctChar || isLastWhiteSpace || isLastPunctChar);
@@ -3643,7 +3708,13 @@ function linkify2(state, silent) {
3643
3708
  if (!link2) return false;
3644
3709
  let url = link2.url;
3645
3710
  if (url.length <= proto.length) return false;
3646
- url = url.replace(/\*+$/, "");
3711
+ let urlEnd = url.length;
3712
+ while (urlEnd > 0 && url.charCodeAt(urlEnd - 1) === 42) {
3713
+ urlEnd--;
3714
+ }
3715
+ if (urlEnd !== url.length) {
3716
+ url = url.slice(0, urlEnd);
3717
+ }
3647
3718
  const fullUrl = state.md.normalizeLink(url);
3648
3719
  if (!state.md.validateLink(fullUrl)) return false;
3649
3720
  if (!silent) {
@@ -4331,7 +4402,7 @@ function entity(state, silent) {
4331
4402
  } else {
4332
4403
  const match2 = state.src.slice(pos).match(NAMED_RE);
4333
4404
  if (match2) {
4334
- const decoded = decodeHTML(match2[0]);
4405
+ const decoded = decodeHTMLStrict(match2[0]);
4335
4406
  if (decoded !== match2[0]) {
4336
4407
  if (!silent) {
4337
4408
  const token = state.push("text_special", "", 0);
@@ -4698,11 +4769,6 @@ var defaultSchemas = {
4698
4769
  };
4699
4770
  var tlds_2ch_src_re = "a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]";
4700
4771
  var tlds_default = "biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");
4701
- function resetScanCache(self) {
4702
- self.__index__ = -1;
4703
- self.__text_cache__ = "";
4704
- }
4705
- __name(resetScanCache, "resetScanCache");
4706
4772
  function createValidator(re) {
4707
4773
  return function(text2, pos) {
4708
4774
  const tail = text2.slice(pos);
@@ -4733,8 +4799,11 @@ function compile(self) {
4733
4799
  }
4734
4800
  __name(untpl, "untpl");
4735
4801
  re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), "i");
4802
+ re.email_fuzzy_global = RegExp(untpl(re.tpl_email_fuzzy), "ig");
4736
4803
  re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), "i");
4804
+ re.link_fuzzy_global = RegExp(untpl(re.tpl_link_fuzzy), "ig");
4737
4805
  re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), "i");
4806
+ re.link_no_ip_fuzzy_global = RegExp(untpl(re.tpl_link_no_ip_fuzzy), "ig");
4738
4807
  re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), "i");
4739
4808
  const aliases = [];
4740
4809
  self.__compiled__ = {};
@@ -4790,27 +4859,18 @@ function compile(self) {
4790
4859
  "(" + self.re.schema_test.source + ")|(" + self.re.host_fuzzy_test.source + ")|@",
4791
4860
  "i"
4792
4861
  );
4793
- resetScanCache(self);
4794
4862
  }
4795
4863
  __name(compile, "compile");
4796
- function Match(self, shift) {
4797
- const start = self.__index__;
4798
- const end = self.__last_index__;
4799
- const text2 = self.__text_cache__.slice(start, end);
4800
- this.schema = self.__schema__.toLowerCase();
4801
- this.index = start + shift;
4802
- this.lastIndex = end + shift;
4803
- this.raw = text2;
4804
- this.text = text2;
4805
- this.url = text2;
4864
+ function Match(text2, schema, index, lastIndex) {
4865
+ const raw = text2.slice(index, lastIndex);
4866
+ this.schema = schema.toLowerCase();
4867
+ this.index = index;
4868
+ this.lastIndex = lastIndex;
4869
+ this.raw = raw;
4870
+ this.text = raw;
4871
+ this.url = raw;
4806
4872
  }
4807
4873
  __name(Match, "Match");
4808
- function createMatch(self, shift) {
4809
- const match2 = new Match(self, shift);
4810
- self.__compiled__[match2.schema].normalize(match2, self);
4811
- return match2;
4812
- }
4813
- __name(createMatch, "createMatch");
4814
4874
  function LinkifyIt(schemas, options) {
4815
4875
  if (!(this instanceof LinkifyIt)) {
4816
4876
  return new LinkifyIt(schemas, options);
@@ -4822,10 +4882,6 @@ function LinkifyIt(schemas, options) {
4822
4882
  }
4823
4883
  }
4824
4884
  this.__opts__ = assign2({}, defaultOptions, options);
4825
- this.__index__ = -1;
4826
- this.__last_index__ = -1;
4827
- this.__schema__ = "";
4828
- this.__text_cache__ = "";
4829
4885
  this.__schemas__ = assign2({}, defaultSchemas, schemas);
4830
4886
  this.__compiled__ = {};
4831
4887
  this.__tlds__ = tlds_default;
@@ -4844,55 +4900,34 @@ LinkifyIt.prototype.set = /* @__PURE__ */ __name(function set(options) {
4844
4900
  return this;
4845
4901
  }, "set");
4846
4902
  LinkifyIt.prototype.test = /* @__PURE__ */ __name(function test(text2) {
4847
- this.__text_cache__ = text2;
4848
- this.__index__ = -1;
4849
4903
  if (!text2.length) {
4850
4904
  return false;
4851
4905
  }
4852
- let m, ml, me, len, shift, next, re, tld_pos, at_pos;
4906
+ let m, re;
4853
4907
  if (this.re.schema_test.test(text2)) {
4854
4908
  re = this.re.schema_search;
4855
4909
  re.lastIndex = 0;
4856
4910
  while ((m = re.exec(text2)) !== null) {
4857
- len = this.testSchemaAt(text2, m[2], re.lastIndex);
4858
- if (len) {
4859
- this.__schema__ = m[2];
4860
- this.__index__ = m.index + m[1].length;
4861
- this.__last_index__ = m.index + m[0].length + len;
4862
- break;
4911
+ if (this.testSchemaAt(text2, m[2], re.lastIndex)) {
4912
+ return true;
4863
4913
  }
4864
4914
  }
4865
4915
  }
4866
4916
  if (this.__opts__.fuzzyLink && this.__compiled__["http:"]) {
4867
- tld_pos = text2.search(this.re.host_fuzzy_test);
4868
- if (tld_pos >= 0) {
4869
- if (this.__index__ < 0 || tld_pos < this.__index__) {
4870
- if ((ml = text2.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {
4871
- shift = ml.index + ml[1].length;
4872
- if (this.__index__ < 0 || shift < this.__index__) {
4873
- this.__schema__ = "";
4874
- this.__index__ = shift;
4875
- this.__last_index__ = ml.index + ml[0].length;
4876
- }
4877
- }
4917
+ if (text2.search(this.re.host_fuzzy_test) >= 0) {
4918
+ if (text2.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy) !== null) {
4919
+ return true;
4878
4920
  }
4879
4921
  }
4880
4922
  }
4881
4923
  if (this.__opts__.fuzzyEmail && this.__compiled__["mailto:"]) {
4882
- at_pos = text2.indexOf("@");
4883
- if (at_pos >= 0) {
4884
- if ((me = text2.match(this.re.email_fuzzy)) !== null) {
4885
- shift = me.index + me[1].length;
4886
- next = me.index + me[0].length;
4887
- if (this.__index__ < 0 || shift < this.__index__ || shift === this.__index__ && next > this.__last_index__) {
4888
- this.__schema__ = "mailto:";
4889
- this.__index__ = shift;
4890
- this.__last_index__ = next;
4891
- }
4924
+ if (text2.indexOf("@") >= 0) {
4925
+ if (text2.match(this.re.email_fuzzy) !== null) {
4926
+ return true;
4892
4927
  }
4893
4928
  }
4894
4929
  }
4895
- return this.__index__ >= 0;
4930
+ return false;
4896
4931
  }, "test");
4897
4932
  LinkifyIt.prototype.pretest = /* @__PURE__ */ __name(function pretest(text2) {
4898
4933
  return this.re.pretest.test(text2);
@@ -4905,16 +4940,88 @@ LinkifyIt.prototype.testSchemaAt = /* @__PURE__ */ __name(function testSchemaAt(
4905
4940
  }, "testSchemaAt");
4906
4941
  LinkifyIt.prototype.match = /* @__PURE__ */ __name(function match(text2) {
4907
4942
  const result = [];
4908
- let shift = 0;
4909
- if (this.__index__ >= 0 && this.__text_cache__ === text2) {
4910
- result.push(createMatch(this, shift));
4911
- shift = this.__last_index__;
4943
+ const type_schemed = [];
4944
+ const type_fuzzy_link = [];
4945
+ const type_fuzzy_email = [];
4946
+ let m, len, re;
4947
+ function choose(a, b) {
4948
+ if (!a) {
4949
+ return b;
4950
+ }
4951
+ if (!b) {
4952
+ return a;
4953
+ }
4954
+ if (a.index !== b.index) {
4955
+ return a.index < b.index ? a : b;
4956
+ }
4957
+ return a.lastIndex >= b.lastIndex ? a : b;
4912
4958
  }
4913
- let tail = shift ? text2.slice(shift) : text2;
4914
- while (this.test(tail)) {
4915
- result.push(createMatch(this, shift));
4916
- tail = tail.slice(this.__last_index__);
4917
- shift += this.__last_index__;
4959
+ __name(choose, "choose");
4960
+ if (!text2.length) {
4961
+ return null;
4962
+ }
4963
+ if (this.re.schema_test.test(text2)) {
4964
+ re = this.re.schema_search;
4965
+ re.lastIndex = 0;
4966
+ while ((m = re.exec(text2)) !== null) {
4967
+ len = this.testSchemaAt(text2, m[2], re.lastIndex);
4968
+ if (len) {
4969
+ type_schemed.push({
4970
+ schema: m[2],
4971
+ index: m.index + m[1].length,
4972
+ lastIndex: m.index + m[0].length + len
4973
+ });
4974
+ }
4975
+ }
4976
+ }
4977
+ if (this.__opts__.fuzzyLink && this.__compiled__["http:"]) {
4978
+ re = this.__opts__.fuzzyIP ? this.re.link_fuzzy_global : this.re.link_no_ip_fuzzy_global;
4979
+ re.lastIndex = 0;
4980
+ while ((m = re.exec(text2)) !== null) {
4981
+ type_fuzzy_link.push({
4982
+ schema: "",
4983
+ index: m.index + m[1].length,
4984
+ lastIndex: m.index + m[0].length
4985
+ });
4986
+ }
4987
+ }
4988
+ if (this.__opts__.fuzzyEmail && this.__compiled__["mailto:"]) {
4989
+ re = this.re.email_fuzzy_global;
4990
+ re.lastIndex = 0;
4991
+ while ((m = re.exec(text2)) !== null) {
4992
+ type_fuzzy_email.push({
4993
+ schema: "mailto:",
4994
+ index: m.index + m[1].length,
4995
+ lastIndex: m.index + m[0].length
4996
+ });
4997
+ }
4998
+ }
4999
+ const indexes = [0, 0, 0];
5000
+ let lastIndex = 0;
5001
+ for (; ; ) {
5002
+ const candidates = [
5003
+ type_schemed[indexes[0]],
5004
+ type_fuzzy_email[indexes[1]],
5005
+ type_fuzzy_link[indexes[2]]
5006
+ ];
5007
+ const candidate = choose(choose(candidates[0], candidates[1]), candidates[2]);
5008
+ if (!candidate) {
5009
+ break;
5010
+ }
5011
+ if (candidate === candidates[0]) {
5012
+ indexes[0]++;
5013
+ } else if (candidate === candidates[1]) {
5014
+ indexes[1]++;
5015
+ } else {
5016
+ indexes[2]++;
5017
+ }
5018
+ if (candidate.index < lastIndex) {
5019
+ continue;
5020
+ }
5021
+ const match2 = new Match(text2, candidate.schema, candidate.index, candidate.lastIndex);
5022
+ this.__compiled__[match2.schema].normalize(match2, this);
5023
+ result.push(match2);
5024
+ lastIndex = candidate.lastIndex;
4918
5025
  }
4919
5026
  if (result.length) {
4920
5027
  return result;
@@ -4922,17 +5029,14 @@ LinkifyIt.prototype.match = /* @__PURE__ */ __name(function match(text2) {
4922
5029
  return null;
4923
5030
  }, "match");
4924
5031
  LinkifyIt.prototype.matchAtStart = /* @__PURE__ */ __name(function matchAtStart(text2) {
4925
- this.__text_cache__ = text2;
4926
- this.__index__ = -1;
4927
5032
  if (!text2.length) return null;
4928
5033
  const m = this.re.schema_at_start.exec(text2);
4929
5034
  if (!m) return null;
4930
5035
  const len = this.testSchemaAt(text2, m[2], m[0].length);
4931
5036
  if (!len) return null;
4932
- this.__schema__ = m[2];
4933
- this.__index__ = m.index + m[1].length;
4934
- this.__last_index__ = m.index + m[0].length + len;
4935
- return createMatch(this, 0);
5037
+ const match2 = new Match(text2, m[2], m.index + m[1].length, m.index + m[0].length + len);
5038
+ this.__compiled__[match2.schema].normalize(match2, this);
5039
+ return match2;
4936
5040
  }, "matchAtStart");
4937
5041
  LinkifyIt.prototype.tlds = /* @__PURE__ */ __name(function tlds(list2, keepOld) {
4938
5042
  list2 = Array.isArray(list2) ? list2 : [list2];
@@ -5533,21 +5637,289 @@ MarkdownIt.prototype.renderInline = function(src, env) {
5533
5637
  };
5534
5638
  var lib_default = MarkdownIt;
5535
5639
 
5536
- // ../../node_modules/@11ty/package-bundler/shims/debug.js
5537
- function debug_default() {
5538
- return function() {
5640
+ // ../../node_modules/obug/dist/core.js
5641
+ function coerce(value) {
5642
+ if (value instanceof Error) return value.stack || value.message;
5643
+ return value;
5644
+ }
5645
+ __name(coerce, "coerce");
5646
+ function selectColor(colors2, namespace) {
5647
+ let hash = 0;
5648
+ for (let i = 0; i < namespace.length; i++) {
5649
+ hash = (hash << 5) - hash + namespace.charCodeAt(i);
5650
+ hash |= 0;
5651
+ }
5652
+ return colors2[Math.abs(hash) % colors2.length];
5653
+ }
5654
+ __name(selectColor, "selectColor");
5655
+ function matchesTemplate(search, template) {
5656
+ let searchIndex = 0;
5657
+ let templateIndex = 0;
5658
+ let starIndex = -1;
5659
+ let matchIndex = 0;
5660
+ while (searchIndex < search.length) if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) if (template[templateIndex] === "*") {
5661
+ starIndex = templateIndex;
5662
+ matchIndex = searchIndex;
5663
+ templateIndex++;
5664
+ } else {
5665
+ searchIndex++;
5666
+ templateIndex++;
5667
+ }
5668
+ else if (starIndex !== -1) {
5669
+ templateIndex = starIndex + 1;
5670
+ matchIndex++;
5671
+ searchIndex = matchIndex;
5672
+ } else return false;
5673
+ while (templateIndex < template.length && template[templateIndex] === "*") templateIndex++;
5674
+ return templateIndex === template.length;
5675
+ }
5676
+ __name(matchesTemplate, "matchesTemplate");
5677
+ function humanize(value) {
5678
+ if (value >= 1e3) return `${(value / 1e3).toFixed(1)}s`;
5679
+ return `${value}ms`;
5680
+ }
5681
+ __name(humanize, "humanize");
5682
+ var globalNamespaces = "";
5683
+ function createDebug(namespace, options) {
5684
+ let prevTime;
5685
+ let enableOverride;
5686
+ let namespacesCache;
5687
+ let enabledCache;
5688
+ const debug2 = /* @__PURE__ */ __name((...args) => {
5689
+ if (!debug2.enabled) return;
5690
+ const curr = Date.now();
5691
+ const diff = curr - (prevTime || curr);
5692
+ prevTime = curr;
5693
+ args[0] = coerce(args[0]);
5694
+ if (typeof args[0] !== "string") args.unshift("%O");
5695
+ let index = 0;
5696
+ args[0] = args[0].replace(/%([a-z%])/gi, (match2, format2) => {
5697
+ if (match2 === "%%") return "%";
5698
+ index++;
5699
+ const formatter = options.formatters[format2];
5700
+ if (typeof formatter === "function") {
5701
+ const value = args[index];
5702
+ match2 = formatter.call(debug2, value);
5703
+ args.splice(index, 1);
5704
+ index--;
5705
+ }
5706
+ return match2;
5707
+ });
5708
+ options.formatArgs.call(debug2, diff, args);
5709
+ debug2.log(...args);
5710
+ }, "debug");
5711
+ debug2.extend = function(namespace2, delimiter2 = ":") {
5712
+ return createDebug(this.namespace + delimiter2 + namespace2, {
5713
+ useColors: this.useColors,
5714
+ color: this.color,
5715
+ formatArgs: this.formatArgs,
5716
+ formatters: this.formatters,
5717
+ inspectOpts: this.inspectOpts,
5718
+ log: this.log,
5719
+ humanize: this.humanize
5720
+ });
5539
5721
  };
5722
+ Object.assign(debug2, options);
5723
+ debug2.namespace = namespace;
5724
+ Object.defineProperty(debug2, "enabled", {
5725
+ enumerable: true,
5726
+ configurable: false,
5727
+ get: /* @__PURE__ */ __name(() => {
5728
+ if (enableOverride != null) return enableOverride;
5729
+ if (namespacesCache !== globalNamespaces) {
5730
+ namespacesCache = globalNamespaces;
5731
+ enabledCache = enabled(namespace);
5732
+ }
5733
+ return enabledCache;
5734
+ }, "get"),
5735
+ set: /* @__PURE__ */ __name((v) => {
5736
+ enableOverride = v;
5737
+ }, "set")
5738
+ });
5739
+ return debug2;
5740
+ }
5741
+ __name(createDebug, "createDebug");
5742
+ var names = [];
5743
+ var skips = [];
5744
+ function enable(namespaces2) {
5745
+ globalNamespaces = namespaces2;
5746
+ names = [];
5747
+ skips = [];
5748
+ const split = globalNamespaces.trim().replace(/\s+/g, ",").split(",").filter(Boolean);
5749
+ for (const ns of split) if (ns[0] === "-") skips.push(ns.slice(1));
5750
+ else names.push(ns);
5751
+ }
5752
+ __name(enable, "enable");
5753
+ function enabled(name) {
5754
+ for (const skip of skips) if (matchesTemplate(name, skip)) return false;
5755
+ for (const ns of names) if (matchesTemplate(name, ns)) return true;
5756
+ return false;
5757
+ }
5758
+ __name(enabled, "enabled");
5759
+
5760
+ // ../../node_modules/obug/dist/browser.js
5761
+ var colors = [
5762
+ "#0000CC",
5763
+ "#0000FF",
5764
+ "#0033CC",
5765
+ "#0033FF",
5766
+ "#0066CC",
5767
+ "#0066FF",
5768
+ "#0099CC",
5769
+ "#0099FF",
5770
+ "#00CC00",
5771
+ "#00CC33",
5772
+ "#00CC66",
5773
+ "#00CC99",
5774
+ "#00CCCC",
5775
+ "#00CCFF",
5776
+ "#3300CC",
5777
+ "#3300FF",
5778
+ "#3333CC",
5779
+ "#3333FF",
5780
+ "#3366CC",
5781
+ "#3366FF",
5782
+ "#3399CC",
5783
+ "#3399FF",
5784
+ "#33CC00",
5785
+ "#33CC33",
5786
+ "#33CC66",
5787
+ "#33CC99",
5788
+ "#33CCCC",
5789
+ "#33CCFF",
5790
+ "#6600CC",
5791
+ "#6600FF",
5792
+ "#6633CC",
5793
+ "#6633FF",
5794
+ "#66CC00",
5795
+ "#66CC33",
5796
+ "#9900CC",
5797
+ "#9900FF",
5798
+ "#9933CC",
5799
+ "#9933FF",
5800
+ "#99CC00",
5801
+ "#99CC33",
5802
+ "#CC0000",
5803
+ "#CC0033",
5804
+ "#CC0066",
5805
+ "#CC0099",
5806
+ "#CC00CC",
5807
+ "#CC00FF",
5808
+ "#CC3300",
5809
+ "#CC3333",
5810
+ "#CC3366",
5811
+ "#CC3399",
5812
+ "#CC33CC",
5813
+ "#CC33FF",
5814
+ "#CC6600",
5815
+ "#CC6633",
5816
+ "#CC9900",
5817
+ "#CC9933",
5818
+ "#CCCC00",
5819
+ "#CCCC33",
5820
+ "#FF0000",
5821
+ "#FF0033",
5822
+ "#FF0066",
5823
+ "#FF0099",
5824
+ "#FF00CC",
5825
+ "#FF00FF",
5826
+ "#FF3300",
5827
+ "#FF3333",
5828
+ "#FF3366",
5829
+ "#FF3399",
5830
+ "#FF33CC",
5831
+ "#FF33FF",
5832
+ "#FF6600",
5833
+ "#FF6633",
5834
+ "#FF9900",
5835
+ "#FF9933",
5836
+ "#FFCC00",
5837
+ "#FFCC33"
5838
+ ];
5839
+ function formatArgs(diff, args) {
5840
+ const { useColors } = this;
5841
+ args[0] = `${(useColors ? "%c" : "") + this.namespace + (useColors ? " %c" : " ") + args[0] + (useColors ? "%c " : " ")}+${this.humanize(diff)}`;
5842
+ if (!useColors) return;
5843
+ const c = `color: ${this.color}`;
5844
+ args.splice(1, 0, c, "color: inherit");
5845
+ let index = 0;
5846
+ let lastC = 0;
5847
+ args[0].replace(/%[a-z%]/gi, (match2) => {
5848
+ if (match2 === "%%") return;
5849
+ index++;
5850
+ if (match2 === "%c") lastC = index;
5851
+ });
5852
+ args.splice(lastC, 0, c);
5853
+ }
5854
+ __name(formatArgs, "formatArgs");
5855
+ var log = console.debug || console.log || (() => {
5856
+ });
5857
+ var storage = localstorage();
5858
+ var defaultOptions2 = {
5859
+ useColors: true,
5860
+ formatArgs,
5861
+ formatters: {
5862
+ /**
5863
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
5864
+ */
5865
+ j(v) {
5866
+ try {
5867
+ return JSON.stringify(v);
5868
+ } catch (error2) {
5869
+ return `[UnexpectedJSONParseError]: ${error2.message}`;
5870
+ }
5871
+ }
5872
+ },
5873
+ inspectOpts: {},
5874
+ humanize,
5875
+ log
5876
+ };
5877
+ function createDebug2(namespace, options) {
5878
+ var _ref;
5879
+ const color = (_ref = options && options.color) !== null && _ref !== void 0 ? _ref : selectColor(colors, namespace);
5880
+ return createDebug(namespace, Object.assign(defaultOptions2, { color }, options));
5881
+ }
5882
+ __name(createDebug2, "createDebug");
5883
+ function localstorage() {
5884
+ try {
5885
+ return localStorage;
5886
+ } catch (_unused) {
5887
+ }
5888
+ }
5889
+ __name(localstorage, "localstorage");
5890
+ function load() {
5891
+ let r;
5892
+ try {
5893
+ r = storage.getItem("debug") || storage.getItem("DEBUG");
5894
+ } catch (_unused2) {
5895
+ }
5896
+ if (!r && typeof process !== "undefined" && "env" in process) r = process.env.DEBUG;
5897
+ return r || "";
5898
+ }
5899
+ __name(load, "load");
5900
+ enable(load());
5901
+
5902
+ // ../../src/Util/IsBuildAwesome.js
5903
+ function isUsingBuildAwesome() {
5904
+ return process?.env?.BUILDAWESOME_PACKAGE === "@awesome.me/buildawesome";
5905
+ }
5906
+ __name(isUsingBuildAwesome, "isUsingBuildAwesome");
5907
+
5908
+ // ../../src/Util/DebugLogUtil.js
5909
+ var PREFIX = isUsingBuildAwesome() ? "BuildAwesome:" : "Eleventy:";
5910
+ function createDebug3(name) {
5911
+ return createDebug2(`${PREFIX}:${name}`);
5540
5912
  }
5541
- __name(debug_default, "default");
5913
+ __name(createDebug3, "createDebug");
5542
5914
 
5543
- // ../../src/Errors/EleventyBaseError.js
5544
- var EleventyBaseError = class extends Error {
5915
+ // ../../src/Errors/BaseError.js
5916
+ var BaseError = class extends Error {
5545
5917
  static {
5546
- __name(this, "EleventyBaseError");
5918
+ __name(this, "BaseError");
5547
5919
  }
5548
5920
  /**
5549
5921
  * @param {string} message - The error message to display.
5550
- * @param {unknown} [originalError] - The original error caught.
5922
+ * @param {Error} [originalError] - The original error caught.
5551
5923
  */
5552
5924
  constructor(message, originalError) {
5553
5925
  if (originalError) {
@@ -5564,15 +5936,14 @@ var EleventyBaseError = class extends Error {
5564
5936
  }
5565
5937
  }
5566
5938
  };
5567
- var EleventyBaseError_default = EleventyBaseError;
5568
5939
 
5569
5940
  // ../../src/Engines/TemplateEngine.js
5570
- var TemplateEngineConfigError = class extends EleventyBaseError_default {
5941
+ var TemplateEngineConfigError = class extends BaseError {
5571
5942
  static {
5572
5943
  __name(this, "TemplateEngineConfigError");
5573
5944
  }
5574
5945
  };
5575
- var debug = debug_default("Eleventy:TemplateEngine");
5946
+ var debug = createDebug3("TemplateEngine");
5576
5947
  var AMENDED_INSTANCES = /* @__PURE__ */ new Set();
5577
5948
  var TemplateEngine = class {
5578
5949
  static {