bunki 0.18.1 → 0.18.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -15416,6 +15416,57 @@ and ensure you are accounting for this risk.
15416
15416
  };
15417
15417
  });
15418
15418
 
15419
+ // node_modules/slugify/slugify.js
15420
+ var require_slugify = __commonJS((exports, module) => {
15421
+ (function(name, root, factory) {
15422
+ if (typeof exports === "object") {
15423
+ module.exports = factory();
15424
+ module.exports["default"] = factory();
15425
+ } else if (typeof define === "function" && define.amd) {
15426
+ define(factory);
15427
+ } else {
15428
+ root[name] = factory();
15429
+ }
15430
+ })("slugify", exports, function() {
15431
+ var charMap = JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E\'","\u0538":"Y\'","\u0539":"T\'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C\'","\u053F":"K","\u0540":"H","\u0541":"D\'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R\'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P\'","\u0554":"Q\'","\u0555":"O\'\'","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"\'","\u2019":"\'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}');
15432
+ var locales = JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');
15433
+ function replace(string, options2) {
15434
+ if (typeof string !== "string") {
15435
+ throw new Error("slugify: string argument expected");
15436
+ }
15437
+ options2 = typeof options2 === "string" ? { replacement: options2 } : options2 || {};
15438
+ var locale = locales[options2.locale] || {};
15439
+ var replacement = options2.replacement === undefined ? "-" : options2.replacement;
15440
+ var trim = options2.trim === undefined ? true : options2.trim;
15441
+ var slug = string.normalize().split("").reduce(function(result, ch) {
15442
+ var appendChar = locale[ch];
15443
+ if (appendChar === undefined)
15444
+ appendChar = charMap[ch];
15445
+ if (appendChar === undefined)
15446
+ appendChar = ch;
15447
+ if (appendChar === replacement)
15448
+ appendChar = " ";
15449
+ return result + appendChar.replace(options2.remove || /[^\w\s$*_+~.()'"!\-:@]+/g, "");
15450
+ }, "");
15451
+ if (options2.strict) {
15452
+ slug = slug.replace(/[^A-Za-z0-9\s]/g, "");
15453
+ }
15454
+ if (trim) {
15455
+ slug = slug.trim();
15456
+ }
15457
+ slug = slug.replace(/\s+/g, replacement);
15458
+ if (options2.lower) {
15459
+ slug = slug.toLowerCase();
15460
+ }
15461
+ return slug;
15462
+ }
15463
+ replace.extend = function(customMap) {
15464
+ Object.assign(charMap, customMap);
15465
+ };
15466
+ return replace;
15467
+ });
15468
+ });
15469
+
15419
15470
  // node_modules/nunjucks/src/lib.js
15420
15471
  var require_lib7 = __commonJS((exports, module) => {
15421
15472
  var ArrayProto = Array.prototype;
@@ -15437,11 +15488,11 @@ var require_lib7 = __commonJS((exports, module) => {
15437
15488
  function lookupEscape(ch) {
15438
15489
  return escapeMap[ch];
15439
15490
  }
15440
- function _prettifyError(path5, withInternals, err) {
15491
+ function _prettifyError(path6, withInternals, err) {
15441
15492
  if (!err.Update) {
15442
15493
  err = new _exports.TemplateError(err);
15443
15494
  }
15444
- err.Update(path5);
15495
+ err.Update(path6);
15445
15496
  if (!withInternals) {
15446
15497
  var old = err;
15447
15498
  err = new Error(old.message);
@@ -15502,8 +15553,8 @@ var require_lib7 = __commonJS((exports, module) => {
15502
15553
  err.lineno = lineno;
15503
15554
  err.colno = colno;
15504
15555
  err.firstUpdate = true;
15505
- err.Update = function Update(path5) {
15506
- var msg = "(" + (path5 || "unknown path") + ")";
15556
+ err.Update = function Update(path6) {
15557
+ var msg = "(" + (path6 || "unknown path") + ")";
15507
15558
  if (this.firstUpdate) {
15508
15559
  if (this.lineno && this.colno) {
15509
15560
  msg += " [Line " + this.lineno + ", Column " + this.colno + "]";
@@ -19700,7 +19751,7 @@ var require_loader2 = __commonJS((exports, module) => {
19700
19751
  };
19701
19752
  return _setPrototypeOf(o, p);
19702
19753
  }
19703
- var path5 = __require("path");
19754
+ var path6 = __require("path");
19704
19755
  var _require = require_object();
19705
19756
  var EmitterObj = _require.EmitterObj;
19706
19757
  module.exports = /* @__PURE__ */ function(_EmitterObj) {
@@ -19710,7 +19761,7 @@ var require_loader2 = __commonJS((exports, module) => {
19710
19761
  }
19711
19762
  var _proto = Loader.prototype;
19712
19763
  _proto.resolve = function resolve(from, to) {
19713
- return path5.resolve(path5.dirname(from), to);
19764
+ return path6.resolve(path6.dirname(from), to);
19714
19765
  };
19715
19766
  _proto.isRelative = function isRelative(filename) {
19716
19767
  return filename.indexOf("./") === 0 || filename.indexOf("../") === 0;
@@ -19764,7 +19815,7 @@ var require_precompiled_loader = __commonJS((exports, module) => {
19764
19815
 
19765
19816
  // node_modules/picomatch/lib/constants.js
19766
19817
  var require_constants = __commonJS((exports, module) => {
19767
- var path5 = __require("path");
19818
+ var path6 = __require("path");
19768
19819
  var WIN_SLASH = "\\\\/";
19769
19820
  var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
19770
19821
  var DOT_LITERAL = "\\.";
@@ -19886,7 +19937,7 @@ var require_constants = __commonJS((exports, module) => {
19886
19937
  CHAR_UNDERSCORE: 95,
19887
19938
  CHAR_VERTICAL_LINE: 124,
19888
19939
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
19889
- SEP: path5.sep,
19940
+ SEP: path6.sep,
19890
19941
  extglobChars(chars) {
19891
19942
  return {
19892
19943
  "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` },
@@ -19904,7 +19955,7 @@ var require_constants = __commonJS((exports, module) => {
19904
19955
 
19905
19956
  // node_modules/picomatch/lib/utils.js
19906
19957
  var require_utils2 = __commonJS((exports) => {
19907
- var path5 = __require("path");
19958
+ var path6 = __require("path");
19908
19959
  var win32 = process.platform === "win32";
19909
19960
  var {
19910
19961
  REGEX_BACKSLASH,
@@ -19933,7 +19984,7 @@ var require_utils2 = __commonJS((exports) => {
19933
19984
  if (options2 && typeof options2.windows === "boolean") {
19934
19985
  return options2.windows;
19935
19986
  }
19936
- return win32 === true || path5.sep === "\\";
19987
+ return win32 === true || path6.sep === "\\";
19937
19988
  };
19938
19989
  exports.escapeLast = (input, char, lastIdx) => {
19939
19990
  const idx = input.lastIndexOf(char, lastIdx);
@@ -21057,7 +21108,7 @@ var require_parse3 = __commonJS((exports, module) => {
21057
21108
 
21058
21109
  // node_modules/picomatch/lib/picomatch.js
21059
21110
  var require_picomatch = __commonJS((exports, module) => {
21060
- var path5 = __require("path");
21111
+ var path6 = __require("path");
21061
21112
  var scan = require_scan();
21062
21113
  var parse2 = require_parse3();
21063
21114
  var utils = require_utils2();
@@ -21143,7 +21194,7 @@ var require_picomatch = __commonJS((exports, module) => {
21143
21194
  };
21144
21195
  picomatch.matchBase = (input, glob, options2, posix = utils.isWindows(options2)) => {
21145
21196
  const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options2);
21146
- return regex.test(path5.basename(input));
21197
+ return regex.test(path6.basename(input));
21147
21198
  };
21148
21199
  picomatch.isMatch = (str2, patterns, options2) => picomatch(patterns, options2)(str2);
21149
21200
  picomatch.parse = (pattern, options2) => {
@@ -21252,8 +21303,8 @@ var require_readdirp = __commonJS((exports, module) => {
21252
21303
  static get defaultOptions() {
21253
21304
  return {
21254
21305
  root: ".",
21255
- fileFilter: (path5) => true,
21256
- directoryFilter: (path5) => true,
21306
+ fileFilter: (path6) => true,
21307
+ directoryFilter: (path6) => true,
21257
21308
  type: FILE_TYPE,
21258
21309
  lstat: false,
21259
21310
  depth: 2147483648,
@@ -21272,7 +21323,7 @@ var require_readdirp = __commonJS((exports, module) => {
21272
21323
  this._directoryFilter = normalizeFilter(opts.directoryFilter);
21273
21324
  const statMethod = opts.lstat ? lstat : stat;
21274
21325
  if (wantBigintFsStats) {
21275
- this._stat = (path5) => statMethod(path5, { bigint: true });
21326
+ this._stat = (path6) => statMethod(path6, { bigint: true });
21276
21327
  } else {
21277
21328
  this._stat = statMethod;
21278
21329
  }
@@ -21294,9 +21345,9 @@ var require_readdirp = __commonJS((exports, module) => {
21294
21345
  this.reading = true;
21295
21346
  try {
21296
21347
  while (!this.destroyed && batch > 0) {
21297
- const { path: path5, depth, files = [] } = this.parent || {};
21348
+ const { path: path6, depth, files = [] } = this.parent || {};
21298
21349
  if (files.length > 0) {
21299
- const slice = files.splice(0, batch).map((dirent) => this._formatEntry(dirent, path5));
21350
+ const slice = files.splice(0, batch).map((dirent) => this._formatEntry(dirent, path6));
21300
21351
  for (const entry of await Promise.all(slice)) {
21301
21352
  if (this.destroyed)
21302
21353
  return;
@@ -21333,20 +21384,20 @@ var require_readdirp = __commonJS((exports, module) => {
21333
21384
  this.reading = false;
21334
21385
  }
21335
21386
  }
21336
- async _exploreDir(path5, depth) {
21387
+ async _exploreDir(path6, depth) {
21337
21388
  let files;
21338
21389
  try {
21339
- files = await readdir(path5, this._rdOptions);
21390
+ files = await readdir(path6, this._rdOptions);
21340
21391
  } catch (error) {
21341
21392
  this._onError(error);
21342
21393
  }
21343
- return { files, depth, path: path5 };
21394
+ return { files, depth, path: path6 };
21344
21395
  }
21345
- async _formatEntry(dirent, path5) {
21396
+ async _formatEntry(dirent, path6) {
21346
21397
  let entry;
21347
21398
  try {
21348
21399
  const basename = this._isDirent ? dirent.name : dirent;
21349
- const fullPath = sysPath.resolve(sysPath.join(path5, basename));
21400
+ const fullPath = sysPath.resolve(sysPath.join(path6, basename));
21350
21401
  entry = { path: sysPath.relative(this._root, fullPath), fullPath, basename };
21351
21402
  entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
21352
21403
  } catch (err) {
@@ -21435,24 +21486,24 @@ var require_normalize_path = __commonJS((exports, module) => {
21435
21486
  * Copyright (c) 2014-2018, Jon Schlinkert.
21436
21487
  * Released under the MIT License.
21437
21488
  */
21438
- module.exports = function(path5, stripTrailing) {
21439
- if (typeof path5 !== "string") {
21489
+ module.exports = function(path6, stripTrailing) {
21490
+ if (typeof path6 !== "string") {
21440
21491
  throw new TypeError("expected path to be a string");
21441
21492
  }
21442
- if (path5 === "\\" || path5 === "/")
21493
+ if (path6 === "\\" || path6 === "/")
21443
21494
  return "/";
21444
- var len = path5.length;
21495
+ var len = path6.length;
21445
21496
  if (len <= 1)
21446
- return path5;
21497
+ return path6;
21447
21498
  var prefix = "";
21448
- if (len > 4 && path5[3] === "\\") {
21449
- var ch = path5[2];
21450
- if ((ch === "?" || ch === ".") && path5.slice(0, 2) === "\\\\") {
21451
- path5 = path5.slice(2);
21499
+ if (len > 4 && path6[3] === "\\") {
21500
+ var ch = path6[2];
21501
+ if ((ch === "?" || ch === ".") && path6.slice(0, 2) === "\\\\") {
21502
+ path6 = path6.slice(2);
21452
21503
  prefix = "//";
21453
21504
  }
21454
21505
  }
21455
- var segs = path5.split(/[/\\]+/);
21506
+ var segs = path6.split(/[/\\]+/);
21456
21507
  if (stripTrailing !== false && segs[segs.length - 1] === "") {
21457
21508
  segs.pop();
21458
21509
  }
@@ -21487,17 +21538,17 @@ var require_anymatch = __commonJS((exports, module) => {
21487
21538
  if (!isList && typeof _path !== "string") {
21488
21539
  throw new TypeError("anymatch: second argument must be a string: got " + Object.prototype.toString.call(_path));
21489
21540
  }
21490
- const path5 = normalizePath(_path, false);
21541
+ const path6 = normalizePath(_path, false);
21491
21542
  for (let index = 0;index < negPatterns.length; index++) {
21492
21543
  const nglob = negPatterns[index];
21493
- if (nglob(path5)) {
21544
+ if (nglob(path6)) {
21494
21545
  return returnIndex ? -1 : false;
21495
21546
  }
21496
21547
  }
21497
- const applied = isList && [path5].concat(args.slice(1));
21548
+ const applied = isList && [path6].concat(args.slice(1));
21498
21549
  for (let index = 0;index < patterns.length; index++) {
21499
21550
  const pattern = patterns[index];
21500
- if (isList ? pattern(...applied) : pattern(path5)) {
21551
+ if (isList ? pattern(...applied) : pattern(path6)) {
21501
21552
  return returnIndex ? index : true;
21502
21553
  }
21503
21554
  }
@@ -23016,10 +23067,10 @@ var require_binary_extensions = __commonJS((exports, module) => {
23016
23067
 
23017
23068
  // node_modules/is-binary-path/index.js
23018
23069
  var require_is_binary_path = __commonJS((exports, module) => {
23019
- var path5 = __require("path");
23070
+ var path6 = __require("path");
23020
23071
  var binaryExtensions = require_binary_extensions();
23021
23072
  var extensions = new Set(binaryExtensions);
23022
- module.exports = (filePath) => extensions.has(path5.extname(filePath).slice(1).toLowerCase());
23073
+ module.exports = (filePath) => extensions.has(path6.extname(filePath).slice(1).toLowerCase());
23023
23074
  });
23024
23075
 
23025
23076
  // node_modules/chokidar/lib/constants.js
@@ -23145,16 +23196,16 @@ var require_nodefs_handler = __commonJS((exports, module) => {
23145
23196
  };
23146
23197
  var isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val;
23147
23198
  var FsWatchInstances = new Map;
23148
- function createFsWatchInstance(path5, options2, listener, errHandler, emitRaw) {
23199
+ function createFsWatchInstance(path6, options2, listener, errHandler, emitRaw) {
23149
23200
  const handleEvent = (rawEvent, evPath) => {
23150
- listener(path5);
23151
- emitRaw(rawEvent, evPath, { watchedPath: path5 });
23152
- if (evPath && path5 !== evPath) {
23153
- fsWatchBroadcast(sysPath.resolve(path5, evPath), KEY_LISTENERS, sysPath.join(path5, evPath));
23201
+ listener(path6);
23202
+ emitRaw(rawEvent, evPath, { watchedPath: path6 });
23203
+ if (evPath && path6 !== evPath) {
23204
+ fsWatchBroadcast(sysPath.resolve(path6, evPath), KEY_LISTENERS, sysPath.join(path6, evPath));
23154
23205
  }
23155
23206
  };
23156
23207
  try {
23157
- return fs2.watch(path5, options2, handleEvent);
23208
+ return fs2.watch(path6, options2, handleEvent);
23158
23209
  } catch (error) {
23159
23210
  errHandler(error);
23160
23211
  }
@@ -23167,12 +23218,12 @@ var require_nodefs_handler = __commonJS((exports, module) => {
23167
23218
  listener(val1, val2, val3);
23168
23219
  });
23169
23220
  };
23170
- var setFsWatchListener = (path5, fullPath, options2, handlers) => {
23221
+ var setFsWatchListener = (path6, fullPath, options2, handlers) => {
23171
23222
  const { listener, errHandler, rawEmitter } = handlers;
23172
23223
  let cont = FsWatchInstances.get(fullPath);
23173
23224
  let watcher;
23174
23225
  if (!options2.persistent) {
23175
- watcher = createFsWatchInstance(path5, options2, listener, errHandler, rawEmitter);
23226
+ watcher = createFsWatchInstance(path6, options2, listener, errHandler, rawEmitter);
23176
23227
  return watcher.close.bind(watcher);
23177
23228
  }
23178
23229
  if (cont) {
@@ -23180,7 +23231,7 @@ var require_nodefs_handler = __commonJS((exports, module) => {
23180
23231
  addAndConvert(cont, KEY_ERR, errHandler);
23181
23232
  addAndConvert(cont, KEY_RAW, rawEmitter);
23182
23233
  } else {
23183
- watcher = createFsWatchInstance(path5, options2, fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), errHandler, fsWatchBroadcast.bind(null, fullPath, KEY_RAW));
23234
+ watcher = createFsWatchInstance(path6, options2, fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), errHandler, fsWatchBroadcast.bind(null, fullPath, KEY_RAW));
23184
23235
  if (!watcher)
23185
23236
  return;
23186
23237
  watcher.on(EV_ERROR, async (error) => {
@@ -23188,7 +23239,7 @@ var require_nodefs_handler = __commonJS((exports, module) => {
23188
23239
  cont.watcherUnusable = true;
23189
23240
  if (isWindows && error.code === "EPERM") {
23190
23241
  try {
23191
- const fd = await open(path5, "r");
23242
+ const fd = await open(path6, "r");
23192
23243
  await close(fd);
23193
23244
  broadcastErr(error);
23194
23245
  } catch (err) {}
@@ -23218,7 +23269,7 @@ var require_nodefs_handler = __commonJS((exports, module) => {
23218
23269
  };
23219
23270
  };
23220
23271
  var FsWatchFileInstances = new Map;
23221
- var setFsWatchFileListener = (path5, fullPath, options2, handlers) => {
23272
+ var setFsWatchFileListener = (path6, fullPath, options2, handlers) => {
23222
23273
  const { listener, rawEmitter } = handlers;
23223
23274
  let cont = FsWatchFileInstances.get(fullPath);
23224
23275
  let listeners = new Set;
@@ -23244,7 +23295,7 @@ var require_nodefs_handler = __commonJS((exports, module) => {
23244
23295
  });
23245
23296
  const currmtime = curr.mtimeMs;
23246
23297
  if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {
23247
- foreach(cont.listeners, (listener2) => listener2(path5, curr));
23298
+ foreach(cont.listeners, (listener2) => listener2(path6, curr));
23248
23299
  }
23249
23300
  })
23250
23301
  };
@@ -23267,25 +23318,25 @@ var require_nodefs_handler = __commonJS((exports, module) => {
23267
23318
  this.fsw = fsW;
23268
23319
  this._boundHandleError = (error) => fsW._handleError(error);
23269
23320
  }
23270
- _watchWithNodeFs(path5, listener) {
23321
+ _watchWithNodeFs(path6, listener) {
23271
23322
  const opts = this.fsw.options;
23272
- const directory = sysPath.dirname(path5);
23273
- const basename = sysPath.basename(path5);
23323
+ const directory = sysPath.dirname(path6);
23324
+ const basename = sysPath.basename(path6);
23274
23325
  const parent = this.fsw._getWatchedDir(directory);
23275
23326
  parent.add(basename);
23276
- const absolutePath = sysPath.resolve(path5);
23327
+ const absolutePath = sysPath.resolve(path6);
23277
23328
  const options2 = { persistent: opts.persistent };
23278
23329
  if (!listener)
23279
23330
  listener = EMPTY_FN;
23280
23331
  let closer;
23281
23332
  if (opts.usePolling) {
23282
23333
  options2.interval = opts.enableBinaryInterval && isBinaryPath(basename) ? opts.binaryInterval : opts.interval;
23283
- closer = setFsWatchFileListener(path5, absolutePath, options2, {
23334
+ closer = setFsWatchFileListener(path6, absolutePath, options2, {
23284
23335
  listener,
23285
23336
  rawEmitter: this.fsw._emitRaw
23286
23337
  });
23287
23338
  } else {
23288
- closer = setFsWatchListener(path5, absolutePath, options2, {
23339
+ closer = setFsWatchListener(path6, absolutePath, options2, {
23289
23340
  listener,
23290
23341
  errHandler: this._boundHandleError,
23291
23342
  rawEmitter: this.fsw._emitRaw
@@ -23303,7 +23354,7 @@ var require_nodefs_handler = __commonJS((exports, module) => {
23303
23354
  let prevStats = stats;
23304
23355
  if (parent.has(basename))
23305
23356
  return;
23306
- const listener = async (path5, newStats) => {
23357
+ const listener = async (path6, newStats) => {
23307
23358
  if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5))
23308
23359
  return;
23309
23360
  if (!newStats || newStats.mtimeMs === 0) {
@@ -23317,9 +23368,9 @@ var require_nodefs_handler = __commonJS((exports, module) => {
23317
23368
  this.fsw._emit(EV_CHANGE, file, newStats2);
23318
23369
  }
23319
23370
  if (isLinux && prevStats.ino !== newStats2.ino) {
23320
- this.fsw._closeFile(path5);
23371
+ this.fsw._closeFile(path6);
23321
23372
  prevStats = newStats2;
23322
- this.fsw._addPathCloser(path5, this._watchWithNodeFs(file, listener));
23373
+ this.fsw._addPathCloser(path6, this._watchWithNodeFs(file, listener));
23323
23374
  } else {
23324
23375
  prevStats = newStats2;
23325
23376
  }
@@ -23343,7 +23394,7 @@ var require_nodefs_handler = __commonJS((exports, module) => {
23343
23394
  }
23344
23395
  return closer;
23345
23396
  }
23346
- async _handleSymlink(entry, directory, path5, item) {
23397
+ async _handleSymlink(entry, directory, path6, item) {
23347
23398
  if (this.fsw.closed) {
23348
23399
  return;
23349
23400
  }
@@ -23353,7 +23404,7 @@ var require_nodefs_handler = __commonJS((exports, module) => {
23353
23404
  this.fsw._incrReadyCount();
23354
23405
  let linkPath;
23355
23406
  try {
23356
- linkPath = await fsrealpath(path5);
23407
+ linkPath = await fsrealpath(path6);
23357
23408
  } catch (e) {
23358
23409
  this.fsw._emitReady();
23359
23410
  return true;
@@ -23363,12 +23414,12 @@ var require_nodefs_handler = __commonJS((exports, module) => {
23363
23414
  if (dir.has(item)) {
23364
23415
  if (this.fsw._symlinkPaths.get(full) !== linkPath) {
23365
23416
  this.fsw._symlinkPaths.set(full, linkPath);
23366
- this.fsw._emit(EV_CHANGE, path5, entry.stats);
23417
+ this.fsw._emit(EV_CHANGE, path6, entry.stats);
23367
23418
  }
23368
23419
  } else {
23369
23420
  dir.add(item);
23370
23421
  this.fsw._symlinkPaths.set(full, linkPath);
23371
- this.fsw._emit(EV_ADD, path5, entry.stats);
23422
+ this.fsw._emit(EV_ADD, path6, entry.stats);
23372
23423
  }
23373
23424
  this.fsw._emitReady();
23374
23425
  return true;
@@ -23397,9 +23448,9 @@ var require_nodefs_handler = __commonJS((exports, module) => {
23397
23448
  return;
23398
23449
  }
23399
23450
  const item = entry.path;
23400
- let path5 = sysPath.join(directory, item);
23451
+ let path6 = sysPath.join(directory, item);
23401
23452
  current.add(item);
23402
- if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path5, item)) {
23453
+ if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path6, item)) {
23403
23454
  return;
23404
23455
  }
23405
23456
  if (this.fsw.closed) {
@@ -23408,8 +23459,8 @@ var require_nodefs_handler = __commonJS((exports, module) => {
23408
23459
  }
23409
23460
  if (item === target || !target && !previous.has(item)) {
23410
23461
  this.fsw._incrReadyCount();
23411
- path5 = sysPath.join(dir, sysPath.relative(dir, path5));
23412
- this._addToNodeFs(path5, initialAdd, wh, depth + 1);
23462
+ path6 = sysPath.join(dir, sysPath.relative(dir, path6));
23463
+ this._addToNodeFs(path6, initialAdd, wh, depth + 1);
23413
23464
  }
23414
23465
  }).on(EV_ERROR, this._boundHandleError);
23415
23466
  return new Promise((resolve) => stream.once(STR_END, () => {
@@ -23457,13 +23508,13 @@ var require_nodefs_handler = __commonJS((exports, module) => {
23457
23508
  }
23458
23509
  return closer;
23459
23510
  }
23460
- async _addToNodeFs(path5, initialAdd, priorWh, depth, target) {
23511
+ async _addToNodeFs(path6, initialAdd, priorWh, depth, target) {
23461
23512
  const ready = this.fsw._emitReady;
23462
- if (this.fsw._isIgnored(path5) || this.fsw.closed) {
23513
+ if (this.fsw._isIgnored(path6) || this.fsw.closed) {
23463
23514
  ready();
23464
23515
  return false;
23465
23516
  }
23466
- const wh = this.fsw._getWatchHelpers(path5, depth);
23517
+ const wh = this.fsw._getWatchHelpers(path6, depth);
23467
23518
  if (!wh.hasGlob && priorWh) {
23468
23519
  wh.hasGlob = priorWh.hasGlob;
23469
23520
  wh.globFilter = priorWh.globFilter;
@@ -23478,11 +23529,11 @@ var require_nodefs_handler = __commonJS((exports, module) => {
23478
23529
  ready();
23479
23530
  return false;
23480
23531
  }
23481
- const follow = this.fsw.options.followSymlinks && !path5.includes(STAR) && !path5.includes(BRACE_START);
23532
+ const follow = this.fsw.options.followSymlinks && !path6.includes(STAR) && !path6.includes(BRACE_START);
23482
23533
  let closer;
23483
23534
  if (stats.isDirectory()) {
23484
- const absPath = sysPath.resolve(path5);
23485
- const targetPath = follow ? await fsrealpath(path5) : path5;
23535
+ const absPath = sysPath.resolve(path6);
23536
+ const targetPath = follow ? await fsrealpath(path6) : path6;
23486
23537
  if (this.fsw.closed)
23487
23538
  return;
23488
23539
  closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
@@ -23492,28 +23543,28 @@ var require_nodefs_handler = __commonJS((exports, module) => {
23492
23543
  this.fsw._symlinkPaths.set(absPath, targetPath);
23493
23544
  }
23494
23545
  } else if (stats.isSymbolicLink()) {
23495
- const targetPath = follow ? await fsrealpath(path5) : path5;
23546
+ const targetPath = follow ? await fsrealpath(path6) : path6;
23496
23547
  if (this.fsw.closed)
23497
23548
  return;
23498
23549
  const parent = sysPath.dirname(wh.watchPath);
23499
23550
  this.fsw._getWatchedDir(parent).add(wh.watchPath);
23500
23551
  this.fsw._emit(EV_ADD, wh.watchPath, stats);
23501
- closer = await this._handleDir(parent, stats, initialAdd, depth, path5, wh, targetPath);
23552
+ closer = await this._handleDir(parent, stats, initialAdd, depth, path6, wh, targetPath);
23502
23553
  if (this.fsw.closed)
23503
23554
  return;
23504
23555
  if (targetPath !== undefined) {
23505
- this.fsw._symlinkPaths.set(sysPath.resolve(path5), targetPath);
23556
+ this.fsw._symlinkPaths.set(sysPath.resolve(path6), targetPath);
23506
23557
  }
23507
23558
  } else {
23508
23559
  closer = this._handleFile(wh.watchPath, stats, initialAdd);
23509
23560
  }
23510
23561
  ready();
23511
- this.fsw._addPathCloser(path5, closer);
23562
+ this.fsw._addPathCloser(path6, closer);
23512
23563
  return false;
23513
23564
  } catch (error) {
23514
23565
  if (this.fsw._handleError(error)) {
23515
23566
  ready();
23516
- return path5;
23567
+ return path6;
23517
23568
  }
23518
23569
  }
23519
23570
  }
@@ -23533,9 +23584,9 @@ var require_fsevents2 = __commonJS((exports) => {
23533
23584
  }
23534
23585
  var Native = require_fsevents();
23535
23586
  var events = Native.constants;
23536
- function watch(path5, since, handler) {
23537
- if (typeof path5 !== "string") {
23538
- throw new TypeError(`fsevents argument 1 must be a string and not a ${typeof path5}`);
23587
+ function watch(path6, since, handler) {
23588
+ if (typeof path6 !== "string") {
23589
+ throw new TypeError(`fsevents argument 1 must be a string and not a ${typeof path6}`);
23539
23590
  }
23540
23591
  if (typeof since === "function" && typeof handler === "undefined") {
23541
23592
  handler = since;
@@ -23547,18 +23598,18 @@ var require_fsevents2 = __commonJS((exports) => {
23547
23598
  if (typeof handler !== "function") {
23548
23599
  throw new TypeError(`fsevents argument 3 must be a function and not a ${typeof handler}`);
23549
23600
  }
23550
- let instance = Native.start(Native.global, path5, since, handler);
23601
+ let instance = Native.start(Native.global, path6, since, handler);
23551
23602
  if (!instance)
23552
- throw new Error(`could not watch: ${path5}`);
23603
+ throw new Error(`could not watch: ${path6}`);
23553
23604
  return () => {
23554
23605
  const result = instance ? Promise.resolve(instance).then(Native.stop) : Promise.resolve(undefined);
23555
23606
  instance = undefined;
23556
23607
  return result;
23557
23608
  };
23558
23609
  }
23559
- function getInfo(path5, flags) {
23610
+ function getInfo(path6, flags) {
23560
23611
  return {
23561
- path: path5,
23612
+ path: path6,
23562
23613
  flags,
23563
23614
  event: getEventType(flags),
23564
23615
  type: getFileType(flags),
@@ -23675,18 +23726,18 @@ var require_fsevents_handler = __commonJS((exports, module) => {
23675
23726
  131840,
23676
23727
  262912
23677
23728
  ]);
23678
- var createFSEventsInstance = (path5, callback) => {
23679
- const stop = fsevents.watch(path5, callback);
23729
+ var createFSEventsInstance = (path6, callback) => {
23730
+ const stop = fsevents.watch(path6, callback);
23680
23731
  return { stop };
23681
23732
  };
23682
- function setFSEventsListener(path5, realPath, listener, rawEmitter) {
23733
+ function setFSEventsListener(path6, realPath, listener, rawEmitter) {
23683
23734
  let watchPath = sysPath.extname(realPath) ? sysPath.dirname(realPath) : realPath;
23684
23735
  const parentPath = sysPath.dirname(watchPath);
23685
23736
  let cont = FSEventsWatchers.get(watchPath);
23686
23737
  if (couldConsolidate(parentPath)) {
23687
23738
  watchPath = parentPath;
23688
23739
  }
23689
- const resolvedPath = sysPath.resolve(path5);
23740
+ const resolvedPath = sysPath.resolve(path6);
23690
23741
  const hasSymlink = resolvedPath !== realPath;
23691
23742
  const filteredListener = (fullPath, flags, info) => {
23692
23743
  if (hasSymlink)
@@ -23736,10 +23787,10 @@ var require_fsevents_handler = __commonJS((exports, module) => {
23736
23787
  }
23737
23788
  };
23738
23789
  }
23739
- var couldConsolidate = (path5) => {
23790
+ var couldConsolidate = (path6) => {
23740
23791
  let count = 0;
23741
23792
  for (const watchPath of FSEventsWatchers.keys()) {
23742
- if (watchPath.indexOf(path5) === 0) {
23793
+ if (watchPath.indexOf(path6) === 0) {
23743
23794
  count++;
23744
23795
  if (count >= consolidateThreshhold) {
23745
23796
  return true;
@@ -23749,9 +23800,9 @@ var require_fsevents_handler = __commonJS((exports, module) => {
23749
23800
  return false;
23750
23801
  };
23751
23802
  var canUse = () => fsevents && FSEventsWatchers.size < 128;
23752
- var calcDepth = (path5, root) => {
23803
+ var calcDepth = (path6, root) => {
23753
23804
  let i = 0;
23754
- while (!path5.indexOf(root) && (path5 = sysPath.dirname(path5)) !== root)
23805
+ while (!path6.indexOf(root) && (path6 = sysPath.dirname(path6)) !== root)
23755
23806
  i++;
23756
23807
  return i;
23757
23808
  };
@@ -23761,42 +23812,42 @@ var require_fsevents_handler = __commonJS((exports, module) => {
23761
23812
  constructor(fsw) {
23762
23813
  this.fsw = fsw;
23763
23814
  }
23764
- checkIgnored(path5, stats) {
23815
+ checkIgnored(path6, stats) {
23765
23816
  const ipaths = this.fsw._ignoredPaths;
23766
- if (this.fsw._isIgnored(path5, stats)) {
23767
- ipaths.add(path5);
23817
+ if (this.fsw._isIgnored(path6, stats)) {
23818
+ ipaths.add(path6);
23768
23819
  if (stats && stats.isDirectory()) {
23769
- ipaths.add(path5 + ROOT_GLOBSTAR);
23820
+ ipaths.add(path6 + ROOT_GLOBSTAR);
23770
23821
  }
23771
23822
  return true;
23772
23823
  }
23773
- ipaths.delete(path5);
23774
- ipaths.delete(path5 + ROOT_GLOBSTAR);
23824
+ ipaths.delete(path6);
23825
+ ipaths.delete(path6 + ROOT_GLOBSTAR);
23775
23826
  }
23776
- addOrChange(path5, fullPath, realPath, parent, watchedDir, item, info, opts) {
23827
+ addOrChange(path6, fullPath, realPath, parent, watchedDir, item, info, opts) {
23777
23828
  const event = watchedDir.has(item) ? EV_CHANGE : EV_ADD;
23778
- this.handleEvent(event, path5, fullPath, realPath, parent, watchedDir, item, info, opts);
23829
+ this.handleEvent(event, path6, fullPath, realPath, parent, watchedDir, item, info, opts);
23779
23830
  }
23780
- async checkExists(path5, fullPath, realPath, parent, watchedDir, item, info, opts) {
23831
+ async checkExists(path6, fullPath, realPath, parent, watchedDir, item, info, opts) {
23781
23832
  try {
23782
- const stats = await stat(path5);
23833
+ const stats = await stat(path6);
23783
23834
  if (this.fsw.closed)
23784
23835
  return;
23785
23836
  if (sameTypes(info, stats)) {
23786
- this.addOrChange(path5, fullPath, realPath, parent, watchedDir, item, info, opts);
23837
+ this.addOrChange(path6, fullPath, realPath, parent, watchedDir, item, info, opts);
23787
23838
  } else {
23788
- this.handleEvent(EV_UNLINK, path5, fullPath, realPath, parent, watchedDir, item, info, opts);
23839
+ this.handleEvent(EV_UNLINK, path6, fullPath, realPath, parent, watchedDir, item, info, opts);
23789
23840
  }
23790
23841
  } catch (error) {
23791
23842
  if (error.code === "EACCES") {
23792
- this.addOrChange(path5, fullPath, realPath, parent, watchedDir, item, info, opts);
23843
+ this.addOrChange(path6, fullPath, realPath, parent, watchedDir, item, info, opts);
23793
23844
  } else {
23794
- this.handleEvent(EV_UNLINK, path5, fullPath, realPath, parent, watchedDir, item, info, opts);
23845
+ this.handleEvent(EV_UNLINK, path6, fullPath, realPath, parent, watchedDir, item, info, opts);
23795
23846
  }
23796
23847
  }
23797
23848
  }
23798
- handleEvent(event, path5, fullPath, realPath, parent, watchedDir, item, info, opts) {
23799
- if (this.fsw.closed || this.checkIgnored(path5))
23849
+ handleEvent(event, path6, fullPath, realPath, parent, watchedDir, item, info, opts) {
23850
+ if (this.fsw.closed || this.checkIgnored(path6))
23800
23851
  return;
23801
23852
  if (event === EV_UNLINK) {
23802
23853
  const isDirectory2 = info.type === FSEVENT_TYPE_DIRECTORY;
@@ -23806,17 +23857,17 @@ var require_fsevents_handler = __commonJS((exports, module) => {
23806
23857
  } else {
23807
23858
  if (event === EV_ADD) {
23808
23859
  if (info.type === FSEVENT_TYPE_DIRECTORY)
23809
- this.fsw._getWatchedDir(path5);
23860
+ this.fsw._getWatchedDir(path6);
23810
23861
  if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) {
23811
23862
  const curDepth = opts.depth === undefined ? undefined : calcDepth(fullPath, realPath) + 1;
23812
- return this._addToFsEvents(path5, false, true, curDepth);
23863
+ return this._addToFsEvents(path6, false, true, curDepth);
23813
23864
  }
23814
23865
  this.fsw._getWatchedDir(parent).add(item);
23815
23866
  }
23816
23867
  const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event;
23817
- this.fsw._emit(eventName, path5);
23868
+ this.fsw._emit(eventName, path6);
23818
23869
  if (eventName === EV_ADD_DIR)
23819
- this._addToFsEvents(path5, false, true);
23870
+ this._addToFsEvents(path6, false, true);
23820
23871
  }
23821
23872
  }
23822
23873
  _watchWithFsEvents(watchPath, realPath, transform, globFilter) {
@@ -23828,38 +23879,38 @@ var require_fsevents_handler = __commonJS((exports, module) => {
23828
23879
  return;
23829
23880
  if (opts.depth !== undefined && calcDepth(fullPath, realPath) > opts.depth)
23830
23881
  return;
23831
- const path5 = transform(sysPath.join(watchPath, sysPath.relative(watchPath, fullPath)));
23832
- if (globFilter && !globFilter(path5))
23882
+ const path6 = transform(sysPath.join(watchPath, sysPath.relative(watchPath, fullPath)));
23883
+ if (globFilter && !globFilter(path6))
23833
23884
  return;
23834
- const parent = sysPath.dirname(path5);
23835
- const item = sysPath.basename(path5);
23836
- const watchedDir = this.fsw._getWatchedDir(info.type === FSEVENT_TYPE_DIRECTORY ? path5 : parent);
23885
+ const parent = sysPath.dirname(path6);
23886
+ const item = sysPath.basename(path6);
23887
+ const watchedDir = this.fsw._getWatchedDir(info.type === FSEVENT_TYPE_DIRECTORY ? path6 : parent);
23837
23888
  if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) {
23838
23889
  if (typeof opts.ignored === FUNCTION_TYPE) {
23839
23890
  let stats;
23840
23891
  try {
23841
- stats = await stat(path5);
23892
+ stats = await stat(path6);
23842
23893
  } catch (error) {}
23843
23894
  if (this.fsw.closed)
23844
23895
  return;
23845
- if (this.checkIgnored(path5, stats))
23896
+ if (this.checkIgnored(path6, stats))
23846
23897
  return;
23847
23898
  if (sameTypes(info, stats)) {
23848
- this.addOrChange(path5, fullPath, realPath, parent, watchedDir, item, info, opts);
23899
+ this.addOrChange(path6, fullPath, realPath, parent, watchedDir, item, info, opts);
23849
23900
  } else {
23850
- this.handleEvent(EV_UNLINK, path5, fullPath, realPath, parent, watchedDir, item, info, opts);
23901
+ this.handleEvent(EV_UNLINK, path6, fullPath, realPath, parent, watchedDir, item, info, opts);
23851
23902
  }
23852
23903
  } else {
23853
- this.checkExists(path5, fullPath, realPath, parent, watchedDir, item, info, opts);
23904
+ this.checkExists(path6, fullPath, realPath, parent, watchedDir, item, info, opts);
23854
23905
  }
23855
23906
  } else {
23856
23907
  switch (info.event) {
23857
23908
  case FSEVENT_CREATED:
23858
23909
  case FSEVENT_MODIFIED:
23859
- return this.addOrChange(path5, fullPath, realPath, parent, watchedDir, item, info, opts);
23910
+ return this.addOrChange(path6, fullPath, realPath, parent, watchedDir, item, info, opts);
23860
23911
  case FSEVENT_DELETED:
23861
23912
  case FSEVENT_MOVED:
23862
- return this.checkExists(path5, fullPath, realPath, parent, watchedDir, item, info, opts);
23913
+ return this.checkExists(path6, fullPath, realPath, parent, watchedDir, item, info, opts);
23863
23914
  }
23864
23915
  }
23865
23916
  };
@@ -23880,12 +23931,12 @@ var require_fsevents_handler = __commonJS((exports, module) => {
23880
23931
  return this.fsw._emitReady();
23881
23932
  }
23882
23933
  this.fsw._incrReadyCount();
23883
- this._addToFsEvents(linkTarget || linkPath, (path5) => {
23934
+ this._addToFsEvents(linkTarget || linkPath, (path6) => {
23884
23935
  let aliasedPath = linkPath;
23885
23936
  if (linkTarget && linkTarget !== DOT_SLASH) {
23886
- aliasedPath = path5.replace(linkTarget, linkPath);
23887
- } else if (path5 !== DOT_SLASH) {
23888
- aliasedPath = sysPath.join(linkPath, path5);
23937
+ aliasedPath = path6.replace(linkTarget, linkPath);
23938
+ } else if (path6 !== DOT_SLASH) {
23939
+ aliasedPath = sysPath.join(linkPath, path6);
23889
23940
  }
23890
23941
  return transform(aliasedPath);
23891
23942
  }, false, curDepth);
@@ -23909,19 +23960,19 @@ var require_fsevents_handler = __commonJS((exports, module) => {
23909
23960
  this.fsw._emit(isDir ? EV_ADD_DIR : EV_ADD, pp, stats);
23910
23961
  }
23911
23962
  }
23912
- initWatch(realPath, path5, wh, processPath) {
23963
+ initWatch(realPath, path6, wh, processPath) {
23913
23964
  if (this.fsw.closed)
23914
23965
  return;
23915
23966
  const closer = this._watchWithFsEvents(wh.watchPath, sysPath.resolve(realPath || wh.watchPath), processPath, wh.globFilter);
23916
- this.fsw._addPathCloser(path5, closer);
23967
+ this.fsw._addPathCloser(path6, closer);
23917
23968
  }
23918
- async _addToFsEvents(path5, transform, forceAdd, priorDepth) {
23969
+ async _addToFsEvents(path6, transform, forceAdd, priorDepth) {
23919
23970
  if (this.fsw.closed) {
23920
23971
  return;
23921
23972
  }
23922
23973
  const opts = this.fsw.options;
23923
23974
  const processPath = typeof transform === FUNCTION_TYPE ? transform : IDENTITY_FN;
23924
- const wh = this.fsw._getWatchHelpers(path5);
23975
+ const wh = this.fsw._getWatchHelpers(path6);
23925
23976
  try {
23926
23977
  const stats = await statMethods[wh.statMethod](wh.watchPath);
23927
23978
  if (this.fsw.closed)
@@ -23931,7 +23982,7 @@ var require_fsevents_handler = __commonJS((exports, module) => {
23931
23982
  }
23932
23983
  if (stats.isDirectory()) {
23933
23984
  if (!wh.globFilter)
23934
- this.emitAdd(processPath(path5), stats, processPath, opts, forceAdd);
23985
+ this.emitAdd(processPath(path6), stats, processPath, opts, forceAdd);
23935
23986
  if (priorDepth && priorDepth > opts.depth)
23936
23987
  return;
23937
23988
  this.fsw._readdirp(wh.watchPath, {
@@ -23967,13 +24018,13 @@ var require_fsevents_handler = __commonJS((exports, module) => {
23967
24018
  }
23968
24019
  if (opts.persistent && forceAdd !== true) {
23969
24020
  if (typeof transform === FUNCTION_TYPE) {
23970
- this.initWatch(undefined, path5, wh, processPath);
24021
+ this.initWatch(undefined, path6, wh, processPath);
23971
24022
  } else {
23972
24023
  let realPath;
23973
24024
  try {
23974
24025
  realPath = await realpath(wh.watchPath);
23975
24026
  } catch (e) {}
23976
- this.initWatch(realPath, path5, wh, processPath);
24027
+ this.initWatch(realPath, path6, wh, processPath);
23977
24028
  }
23978
24029
  }
23979
24030
  }
@@ -24064,20 +24115,20 @@ var require_chokidar = __commonJS((exports) => {
24064
24115
  }
24065
24116
  return str2;
24066
24117
  };
24067
- var normalizePathToUnix = (path5) => toUnix(sysPath.normalize(toUnix(path5)));
24068
- var normalizeIgnored = (cwd = EMPTY_STR) => (path5) => {
24069
- if (typeof path5 !== STRING_TYPE)
24070
- return path5;
24071
- return normalizePathToUnix(sysPath.isAbsolute(path5) ? path5 : sysPath.join(cwd, path5));
24118
+ var normalizePathToUnix = (path6) => toUnix(sysPath.normalize(toUnix(path6)));
24119
+ var normalizeIgnored = (cwd = EMPTY_STR) => (path6) => {
24120
+ if (typeof path6 !== STRING_TYPE)
24121
+ return path6;
24122
+ return normalizePathToUnix(sysPath.isAbsolute(path6) ? path6 : sysPath.join(cwd, path6));
24072
24123
  };
24073
- var getAbsolutePath = (path5, cwd) => {
24074
- if (sysPath.isAbsolute(path5)) {
24075
- return path5;
24124
+ var getAbsolutePath = (path6, cwd) => {
24125
+ if (sysPath.isAbsolute(path6)) {
24126
+ return path6;
24076
24127
  }
24077
- if (path5.startsWith(BANG)) {
24078
- return BANG + sysPath.join(cwd, path5.slice(1));
24128
+ if (path6.startsWith(BANG)) {
24129
+ return BANG + sysPath.join(cwd, path6.slice(1));
24079
24130
  }
24080
- return sysPath.join(cwd, path5);
24131
+ return sysPath.join(cwd, path6);
24081
24132
  };
24082
24133
  var undef = (opts, key) => opts[key] === undefined;
24083
24134
 
@@ -24134,17 +24185,17 @@ var require_chokidar = __commonJS((exports) => {
24134
24185
  var STAT_METHOD_L = "lstat";
24135
24186
 
24136
24187
  class WatchHelper {
24137
- constructor(path5, watchPath, follow, fsw) {
24188
+ constructor(path6, watchPath, follow, fsw) {
24138
24189
  this.fsw = fsw;
24139
- this.path = path5 = path5.replace(REPLACER_RE, EMPTY_STR);
24190
+ this.path = path6 = path6.replace(REPLACER_RE, EMPTY_STR);
24140
24191
  this.watchPath = watchPath;
24141
24192
  this.fullWatchPath = sysPath.resolve(watchPath);
24142
- this.hasGlob = watchPath !== path5;
24143
- if (path5 === EMPTY_STR)
24193
+ this.hasGlob = watchPath !== path6;
24194
+ if (path6 === EMPTY_STR)
24144
24195
  this.hasGlob = false;
24145
24196
  this.globSymlink = this.hasGlob && follow ? undefined : false;
24146
- this.globFilter = this.hasGlob ? anymatch(path5, undefined, ANYMATCH_OPTS) : false;
24147
- this.dirParts = this.getDirParts(path5);
24197
+ this.globFilter = this.hasGlob ? anymatch(path6, undefined, ANYMATCH_OPTS) : false;
24198
+ this.dirParts = this.getDirParts(path6);
24148
24199
  this.dirParts.forEach((parts) => {
24149
24200
  if (parts.length > 1)
24150
24201
  parts.pop();
@@ -24172,13 +24223,13 @@ var require_chokidar = __commonJS((exports) => {
24172
24223
  const matchesGlob = this.hasGlob && typeof this.globFilter === FUNCTION_TYPE ? this.globFilter(resolvedPath) : true;
24173
24224
  return matchesGlob && this.fsw._isntIgnored(resolvedPath, stats) && this.fsw._hasReadPermissions(stats);
24174
24225
  }
24175
- getDirParts(path5) {
24226
+ getDirParts(path6) {
24176
24227
  if (!this.hasGlob)
24177
24228
  return [];
24178
24229
  const parts = [];
24179
- const expandedPath = path5.includes(BRACE_START) ? braces.expand(path5) : [path5];
24180
- expandedPath.forEach((path6) => {
24181
- parts.push(sysPath.relative(this.watchPath, path6).split(SLASH_OR_BACK_SLASH_RE));
24230
+ const expandedPath = path6.includes(BRACE_START) ? braces.expand(path6) : [path6];
24231
+ expandedPath.forEach((path7) => {
24232
+ parts.push(sysPath.relative(this.watchPath, path7).split(SLASH_OR_BACK_SLASH_RE));
24182
24233
  });
24183
24234
  return parts;
24184
24235
  }
@@ -24294,21 +24345,21 @@ var require_chokidar = __commonJS((exports) => {
24294
24345
  this.closed = false;
24295
24346
  let paths = unifyPaths(paths_);
24296
24347
  if (cwd) {
24297
- paths = paths.map((path5) => {
24298
- const absPath = getAbsolutePath(path5, cwd);
24299
- if (disableGlobbing || !isGlob(path5)) {
24348
+ paths = paths.map((path6) => {
24349
+ const absPath = getAbsolutePath(path6, cwd);
24350
+ if (disableGlobbing || !isGlob(path6)) {
24300
24351
  return absPath;
24301
24352
  }
24302
24353
  return normalizePath(absPath);
24303
24354
  });
24304
24355
  }
24305
- paths = paths.filter((path5) => {
24306
- if (path5.startsWith(BANG)) {
24307
- this._ignoredPaths.add(path5.slice(1));
24356
+ paths = paths.filter((path6) => {
24357
+ if (path6.startsWith(BANG)) {
24358
+ this._ignoredPaths.add(path6.slice(1));
24308
24359
  return false;
24309
24360
  }
24310
- this._ignoredPaths.delete(path5);
24311
- this._ignoredPaths.delete(path5 + SLASH_GLOBSTAR);
24361
+ this._ignoredPaths.delete(path6);
24362
+ this._ignoredPaths.delete(path6 + SLASH_GLOBSTAR);
24312
24363
  this._userIgnored = undefined;
24313
24364
  return true;
24314
24365
  });
@@ -24317,13 +24368,13 @@ var require_chokidar = __commonJS((exports) => {
24317
24368
  this._readyCount = paths.length;
24318
24369
  if (this.options.persistent)
24319
24370
  this._readyCount += paths.length;
24320
- paths.forEach((path5) => this._fsEventsHandler._addToFsEvents(path5));
24371
+ paths.forEach((path6) => this._fsEventsHandler._addToFsEvents(path6));
24321
24372
  } else {
24322
24373
  if (!this._readyCount)
24323
24374
  this._readyCount = 0;
24324
24375
  this._readyCount += paths.length;
24325
- Promise.all(paths.map(async (path5) => {
24326
- const res = await this._nodeFsHandler._addToNodeFs(path5, !_internal, 0, 0, _origAdd);
24376
+ Promise.all(paths.map(async (path6) => {
24377
+ const res = await this._nodeFsHandler._addToNodeFs(path6, !_internal, 0, 0, _origAdd);
24327
24378
  if (res)
24328
24379
  this._emitReady();
24329
24380
  return res;
@@ -24342,16 +24393,16 @@ var require_chokidar = __commonJS((exports) => {
24342
24393
  return this;
24343
24394
  const paths = unifyPaths(paths_);
24344
24395
  const { cwd } = this.options;
24345
- paths.forEach((path5) => {
24346
- if (!sysPath.isAbsolute(path5) && !this._closers.has(path5)) {
24396
+ paths.forEach((path6) => {
24397
+ if (!sysPath.isAbsolute(path6) && !this._closers.has(path6)) {
24347
24398
  if (cwd)
24348
- path5 = sysPath.join(cwd, path5);
24349
- path5 = sysPath.resolve(path5);
24399
+ path6 = sysPath.join(cwd, path6);
24400
+ path6 = sysPath.resolve(path6);
24350
24401
  }
24351
- this._closePath(path5);
24352
- this._ignoredPaths.add(path5);
24353
- if (this._watched.has(path5)) {
24354
- this._ignoredPaths.add(path5 + SLASH_GLOBSTAR);
24402
+ this._closePath(path6);
24403
+ this._ignoredPaths.add(path6);
24404
+ if (this._watched.has(path6)) {
24405
+ this._ignoredPaths.add(path6 + SLASH_GLOBSTAR);
24355
24406
  }
24356
24407
  this._userIgnored = undefined;
24357
24408
  });
@@ -24394,15 +24445,15 @@ var require_chokidar = __commonJS((exports) => {
24394
24445
  if (event !== EV_ERROR)
24395
24446
  this.emit(EV_ALL, ...args);
24396
24447
  }
24397
- async _emit(event, path5, val1, val2, val3) {
24448
+ async _emit(event, path6, val1, val2, val3) {
24398
24449
  if (this.closed)
24399
24450
  return;
24400
24451
  const opts = this.options;
24401
24452
  if (isWindows)
24402
- path5 = sysPath.normalize(path5);
24453
+ path6 = sysPath.normalize(path6);
24403
24454
  if (opts.cwd)
24404
- path5 = sysPath.relative(opts.cwd, path5);
24405
- const args = [event, path5];
24455
+ path6 = sysPath.relative(opts.cwd, path6);
24456
+ const args = [event, path6];
24406
24457
  if (val3 !== undefined)
24407
24458
  args.push(val1, val2, val3);
24408
24459
  else if (val2 !== undefined)
@@ -24411,25 +24462,25 @@ var require_chokidar = __commonJS((exports) => {
24411
24462
  args.push(val1);
24412
24463
  const awf = opts.awaitWriteFinish;
24413
24464
  let pw;
24414
- if (awf && (pw = this._pendingWrites.get(path5))) {
24465
+ if (awf && (pw = this._pendingWrites.get(path6))) {
24415
24466
  pw.lastChange = new Date;
24416
24467
  return this;
24417
24468
  }
24418
24469
  if (opts.atomic) {
24419
24470
  if (event === EV_UNLINK) {
24420
- this._pendingUnlinks.set(path5, args);
24471
+ this._pendingUnlinks.set(path6, args);
24421
24472
  setTimeout(() => {
24422
- this._pendingUnlinks.forEach((entry, path6) => {
24473
+ this._pendingUnlinks.forEach((entry, path7) => {
24423
24474
  this.emit(...entry);
24424
24475
  this.emit(EV_ALL, ...entry);
24425
- this._pendingUnlinks.delete(path6);
24476
+ this._pendingUnlinks.delete(path7);
24426
24477
  });
24427
24478
  }, typeof opts.atomic === "number" ? opts.atomic : 100);
24428
24479
  return this;
24429
24480
  }
24430
- if (event === EV_ADD && this._pendingUnlinks.has(path5)) {
24481
+ if (event === EV_ADD && this._pendingUnlinks.has(path6)) {
24431
24482
  event = args[0] = EV_CHANGE;
24432
- this._pendingUnlinks.delete(path5);
24483
+ this._pendingUnlinks.delete(path6);
24433
24484
  }
24434
24485
  }
24435
24486
  if (awf && (event === EV_ADD || event === EV_CHANGE) && this._readyEmitted) {
@@ -24447,16 +24498,16 @@ var require_chokidar = __commonJS((exports) => {
24447
24498
  this.emitWithAll(event, args);
24448
24499
  }
24449
24500
  };
24450
- this._awaitWriteFinish(path5, awf.stabilityThreshold, event, awfEmit);
24501
+ this._awaitWriteFinish(path6, awf.stabilityThreshold, event, awfEmit);
24451
24502
  return this;
24452
24503
  }
24453
24504
  if (event === EV_CHANGE) {
24454
- const isThrottled = !this._throttle(EV_CHANGE, path5, 50);
24505
+ const isThrottled = !this._throttle(EV_CHANGE, path6, 50);
24455
24506
  if (isThrottled)
24456
24507
  return this;
24457
24508
  }
24458
24509
  if (opts.alwaysStat && val1 === undefined && (event === EV_ADD || event === EV_ADD_DIR || event === EV_CHANGE)) {
24459
- const fullPath = opts.cwd ? sysPath.join(opts.cwd, path5) : path5;
24510
+ const fullPath = opts.cwd ? sysPath.join(opts.cwd, path6) : path6;
24460
24511
  let stats;
24461
24512
  try {
24462
24513
  stats = await stat(fullPath);
@@ -24475,21 +24526,21 @@ var require_chokidar = __commonJS((exports) => {
24475
24526
  }
24476
24527
  return error || this.closed;
24477
24528
  }
24478
- _throttle(actionType, path5, timeout) {
24529
+ _throttle(actionType, path6, timeout) {
24479
24530
  if (!this._throttled.has(actionType)) {
24480
24531
  this._throttled.set(actionType, new Map);
24481
24532
  }
24482
24533
  const action = this._throttled.get(actionType);
24483
- const actionPath = action.get(path5);
24534
+ const actionPath = action.get(path6);
24484
24535
  if (actionPath) {
24485
24536
  actionPath.count++;
24486
24537
  return false;
24487
24538
  }
24488
24539
  let timeoutObject;
24489
24540
  const clear = () => {
24490
- const item = action.get(path5);
24541
+ const item = action.get(path6);
24491
24542
  const count = item ? item.count : 0;
24492
- action.delete(path5);
24543
+ action.delete(path6);
24493
24544
  clearTimeout(timeoutObject);
24494
24545
  if (item)
24495
24546
  clearTimeout(item.timeoutObject);
@@ -24497,45 +24548,45 @@ var require_chokidar = __commonJS((exports) => {
24497
24548
  };
24498
24549
  timeoutObject = setTimeout(clear, timeout);
24499
24550
  const thr = { timeoutObject, clear, count: 0 };
24500
- action.set(path5, thr);
24551
+ action.set(path6, thr);
24501
24552
  return thr;
24502
24553
  }
24503
24554
  _incrReadyCount() {
24504
24555
  return this._readyCount++;
24505
24556
  }
24506
- _awaitWriteFinish(path5, threshold, event, awfEmit) {
24557
+ _awaitWriteFinish(path6, threshold, event, awfEmit) {
24507
24558
  let timeoutHandler;
24508
- let fullPath = path5;
24509
- if (this.options.cwd && !sysPath.isAbsolute(path5)) {
24510
- fullPath = sysPath.join(this.options.cwd, path5);
24559
+ let fullPath = path6;
24560
+ if (this.options.cwd && !sysPath.isAbsolute(path6)) {
24561
+ fullPath = sysPath.join(this.options.cwd, path6);
24511
24562
  }
24512
24563
  const now = new Date;
24513
24564
  const awaitWriteFinish = (prevStat) => {
24514
24565
  fs2.stat(fullPath, (err, curStat) => {
24515
- if (err || !this._pendingWrites.has(path5)) {
24566
+ if (err || !this._pendingWrites.has(path6)) {
24516
24567
  if (err && err.code !== "ENOENT")
24517
24568
  awfEmit(err);
24518
24569
  return;
24519
24570
  }
24520
24571
  const now2 = Number(new Date);
24521
24572
  if (prevStat && curStat.size !== prevStat.size) {
24522
- this._pendingWrites.get(path5).lastChange = now2;
24573
+ this._pendingWrites.get(path6).lastChange = now2;
24523
24574
  }
24524
- const pw = this._pendingWrites.get(path5);
24575
+ const pw = this._pendingWrites.get(path6);
24525
24576
  const df = now2 - pw.lastChange;
24526
24577
  if (df >= threshold) {
24527
- this._pendingWrites.delete(path5);
24578
+ this._pendingWrites.delete(path6);
24528
24579
  awfEmit(undefined, curStat);
24529
24580
  } else {
24530
24581
  timeoutHandler = setTimeout(awaitWriteFinish, this.options.awaitWriteFinish.pollInterval, curStat);
24531
24582
  }
24532
24583
  });
24533
24584
  };
24534
- if (!this._pendingWrites.has(path5)) {
24535
- this._pendingWrites.set(path5, {
24585
+ if (!this._pendingWrites.has(path6)) {
24586
+ this._pendingWrites.set(path6, {
24536
24587
  lastChange: now,
24537
24588
  cancelWait: () => {
24538
- this._pendingWrites.delete(path5);
24589
+ this._pendingWrites.delete(path6);
24539
24590
  clearTimeout(timeoutHandler);
24540
24591
  return event;
24541
24592
  }
@@ -24546,26 +24597,26 @@ var require_chokidar = __commonJS((exports) => {
24546
24597
  _getGlobIgnored() {
24547
24598
  return [...this._ignoredPaths.values()];
24548
24599
  }
24549
- _isIgnored(path5, stats) {
24550
- if (this.options.atomic && DOT_RE.test(path5))
24600
+ _isIgnored(path6, stats) {
24601
+ if (this.options.atomic && DOT_RE.test(path6))
24551
24602
  return true;
24552
24603
  if (!this._userIgnored) {
24553
24604
  const { cwd } = this.options;
24554
24605
  const ign = this.options.ignored;
24555
24606
  const ignored = ign && ign.map(normalizeIgnored(cwd));
24556
- const paths = arrify(ignored).filter((path6) => typeof path6 === STRING_TYPE && !isGlob(path6)).map((path6) => path6 + SLASH_GLOBSTAR);
24607
+ const paths = arrify(ignored).filter((path7) => typeof path7 === STRING_TYPE && !isGlob(path7)).map((path7) => path7 + SLASH_GLOBSTAR);
24557
24608
  const list = this._getGlobIgnored().map(normalizeIgnored(cwd)).concat(ignored, paths);
24558
24609
  this._userIgnored = anymatch(list, undefined, ANYMATCH_OPTS);
24559
24610
  }
24560
- return this._userIgnored([path5, stats]);
24611
+ return this._userIgnored([path6, stats]);
24561
24612
  }
24562
- _isntIgnored(path5, stat2) {
24563
- return !this._isIgnored(path5, stat2);
24613
+ _isntIgnored(path6, stat2) {
24614
+ return !this._isIgnored(path6, stat2);
24564
24615
  }
24565
- _getWatchHelpers(path5, depth) {
24566
- const watchPath = depth || this.options.disableGlobbing || !isGlob(path5) ? path5 : globParent(path5);
24616
+ _getWatchHelpers(path6, depth) {
24617
+ const watchPath = depth || this.options.disableGlobbing || !isGlob(path6) ? path6 : globParent(path6);
24567
24618
  const follow = this.options.followSymlinks;
24568
- return new WatchHelper(path5, watchPath, follow, this);
24619
+ return new WatchHelper(path6, watchPath, follow, this);
24569
24620
  }
24570
24621
  _getWatchedDir(directory) {
24571
24622
  if (!this._boundRemove)
@@ -24584,59 +24635,59 @@ var require_chokidar = __commonJS((exports) => {
24584
24635
  return Boolean(4 & it2);
24585
24636
  }
24586
24637
  _remove(directory, item, isDirectory2) {
24587
- const path5 = sysPath.join(directory, item);
24588
- const fullPath = sysPath.resolve(path5);
24589
- isDirectory2 = isDirectory2 != null ? isDirectory2 : this._watched.has(path5) || this._watched.has(fullPath);
24590
- if (!this._throttle("remove", path5, 100))
24638
+ const path6 = sysPath.join(directory, item);
24639
+ const fullPath = sysPath.resolve(path6);
24640
+ isDirectory2 = isDirectory2 != null ? isDirectory2 : this._watched.has(path6) || this._watched.has(fullPath);
24641
+ if (!this._throttle("remove", path6, 100))
24591
24642
  return;
24592
24643
  if (!isDirectory2 && !this.options.useFsEvents && this._watched.size === 1) {
24593
24644
  this.add(directory, item, true);
24594
24645
  }
24595
- const wp = this._getWatchedDir(path5);
24646
+ const wp = this._getWatchedDir(path6);
24596
24647
  const nestedDirectoryChildren = wp.getChildren();
24597
- nestedDirectoryChildren.forEach((nested) => this._remove(path5, nested));
24648
+ nestedDirectoryChildren.forEach((nested) => this._remove(path6, nested));
24598
24649
  const parent = this._getWatchedDir(directory);
24599
24650
  const wasTracked = parent.has(item);
24600
24651
  parent.remove(item);
24601
24652
  if (this._symlinkPaths.has(fullPath)) {
24602
24653
  this._symlinkPaths.delete(fullPath);
24603
24654
  }
24604
- let relPath = path5;
24655
+ let relPath = path6;
24605
24656
  if (this.options.cwd)
24606
- relPath = sysPath.relative(this.options.cwd, path5);
24657
+ relPath = sysPath.relative(this.options.cwd, path6);
24607
24658
  if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
24608
24659
  const event = this._pendingWrites.get(relPath).cancelWait();
24609
24660
  if (event === EV_ADD)
24610
24661
  return;
24611
24662
  }
24612
- this._watched.delete(path5);
24663
+ this._watched.delete(path6);
24613
24664
  this._watched.delete(fullPath);
24614
24665
  const eventName = isDirectory2 ? EV_UNLINK_DIR : EV_UNLINK;
24615
- if (wasTracked && !this._isIgnored(path5))
24616
- this._emit(eventName, path5);
24666
+ if (wasTracked && !this._isIgnored(path6))
24667
+ this._emit(eventName, path6);
24617
24668
  if (!this.options.useFsEvents) {
24618
- this._closePath(path5);
24669
+ this._closePath(path6);
24619
24670
  }
24620
24671
  }
24621
- _closePath(path5) {
24622
- this._closeFile(path5);
24623
- const dir = sysPath.dirname(path5);
24624
- this._getWatchedDir(dir).remove(sysPath.basename(path5));
24672
+ _closePath(path6) {
24673
+ this._closeFile(path6);
24674
+ const dir = sysPath.dirname(path6);
24675
+ this._getWatchedDir(dir).remove(sysPath.basename(path6));
24625
24676
  }
24626
- _closeFile(path5) {
24627
- const closers = this._closers.get(path5);
24677
+ _closeFile(path6) {
24678
+ const closers = this._closers.get(path6);
24628
24679
  if (!closers)
24629
24680
  return;
24630
24681
  closers.forEach((closer) => closer());
24631
- this._closers.delete(path5);
24682
+ this._closers.delete(path6);
24632
24683
  }
24633
- _addPathCloser(path5, closer) {
24684
+ _addPathCloser(path6, closer) {
24634
24685
  if (!closer)
24635
24686
  return;
24636
- let list = this._closers.get(path5);
24687
+ let list = this._closers.get(path6);
24637
24688
  if (!list) {
24638
24689
  list = [];
24639
- this._closers.set(path5, list);
24690
+ this._closers.set(path6, list);
24640
24691
  }
24641
24692
  list.push(closer);
24642
24693
  }
@@ -24682,7 +24733,7 @@ var require_node_loaders = __commonJS((exports, module) => {
24682
24733
  return _setPrototypeOf(o, p);
24683
24734
  }
24684
24735
  var fs2 = __require("fs");
24685
- var path5 = __require("path");
24736
+ var path6 = __require("path");
24686
24737
  var Loader = require_loader2();
24687
24738
  var _require = require_precompiled_loader();
24688
24739
  var PrecompiledLoader = _require.PrecompiledLoader;
@@ -24700,7 +24751,7 @@ var require_node_loaders = __commonJS((exports, module) => {
24700
24751
  _this.noCache = !!opts.noCache;
24701
24752
  if (searchPaths) {
24702
24753
  searchPaths = Array.isArray(searchPaths) ? searchPaths : [searchPaths];
24703
- _this.searchPaths = searchPaths.map(path5.normalize);
24754
+ _this.searchPaths = searchPaths.map(path6.normalize);
24704
24755
  } else {
24705
24756
  _this.searchPaths = ["."];
24706
24757
  }
@@ -24713,7 +24764,7 @@ var require_node_loaders = __commonJS((exports, module) => {
24713
24764
  var paths = _this.searchPaths.filter(fs2.existsSync);
24714
24765
  var watcher = chokidar.watch(paths);
24715
24766
  watcher.on("all", function(event, fullname) {
24716
- fullname = path5.resolve(fullname);
24767
+ fullname = path6.resolve(fullname);
24717
24768
  if (event === "change" && fullname in _this.pathsToNames) {
24718
24769
  _this.emit("update", _this.pathsToNames[fullname], fullname);
24719
24770
  }
@@ -24729,8 +24780,8 @@ var require_node_loaders = __commonJS((exports, module) => {
24729
24780
  var fullpath = null;
24730
24781
  var paths = this.searchPaths;
24731
24782
  for (var i = 0;i < paths.length; i++) {
24732
- var basePath = path5.resolve(paths[i]);
24733
- var p = path5.resolve(paths[i], name);
24783
+ var basePath = path6.resolve(paths[i]);
24784
+ var p = path6.resolve(paths[i], name);
24734
24785
  if (p.indexOf(basePath) === 0 && fs2.existsSync(p)) {
24735
24786
  fullpath = p;
24736
24787
  break;
@@ -24979,13 +25030,13 @@ var require_globals = __commonJS((exports, module) => {
24979
25030
 
24980
25031
  // node_modules/nunjucks/src/express-app.js
24981
25032
  var require_express_app = __commonJS((exports, module) => {
24982
- var path5 = __require("path");
25033
+ var path6 = __require("path");
24983
25034
  module.exports = function express(env, app) {
24984
25035
  function NunjucksView(name, opts) {
24985
25036
  this.name = name;
24986
25037
  this.path = name;
24987
25038
  this.defaultEngine = opts.defaultEngine;
24988
- this.ext = path5.extname(name);
25039
+ this.ext = path6.extname(name);
24989
25040
  if (!this.ext && !this.defaultEngine) {
24990
25041
  throw new Error("No default engine was specified and no extension was provided.");
24991
25042
  }
@@ -25362,7 +25413,7 @@ var require_environment = __commonJS((exports, module) => {
25362
25413
  return _Obj2.apply(this, arguments) || this;
25363
25414
  }
25364
25415
  var _proto3 = Template2.prototype;
25365
- _proto3.init = function init(src, env, path5, eagerCompile) {
25416
+ _proto3.init = function init(src, env, path6, eagerCompile) {
25366
25417
  this.env = env || new Environment;
25367
25418
  if (lib.isObject(src)) {
25368
25419
  switch (src.type) {
@@ -25380,7 +25431,7 @@ var require_environment = __commonJS((exports, module) => {
25380
25431
  } else {
25381
25432
  throw new Error("src must be a string or an object describing the source");
25382
25433
  }
25383
- this.path = path5;
25434
+ this.path = path6;
25384
25435
  if (eagerCompile) {
25385
25436
  try {
25386
25437
  this._compile();
@@ -25530,7 +25581,7 @@ var require_precompile_global = __commonJS((exports, module) => {
25530
25581
  // node_modules/nunjucks/src/precompile.js
25531
25582
  var require_precompile = __commonJS((exports, module) => {
25532
25583
  var fs2 = __require("fs");
25533
- var path5 = __require("path");
25584
+ var path6 = __require("path");
25534
25585
  var _require = require_lib7();
25535
25586
  var _prettifyError = _require._prettifyError;
25536
25587
  var compiler = require_compiler();
@@ -25567,8 +25618,8 @@ var require_precompile = __commonJS((exports, module) => {
25567
25618
  var templates = [];
25568
25619
  function addTemplates(dir) {
25569
25620
  fs2.readdirSync(dir).forEach(function(file) {
25570
- var filepath = path5.join(dir, file);
25571
- var subpath = filepath.substr(path5.join(input, "/").length);
25621
+ var filepath = path6.join(dir, file);
25622
+ var subpath = filepath.substr(path6.join(input, "/").length);
25572
25623
  var stat = fs2.statSync(filepath);
25573
25624
  if (stat && stat.isDirectory()) {
25574
25625
  subpath += "/";
@@ -25585,7 +25636,7 @@ var require_precompile = __commonJS((exports, module) => {
25585
25636
  } else if (pathStats.isDirectory()) {
25586
25637
  addTemplates(input);
25587
25638
  for (var i = 0;i < templates.length; i++) {
25588
- var name = templates[i].replace(path5.join(input, "/"), "");
25639
+ var name = templates[i].replace(path6.join(input, "/"), "");
25589
25640
  try {
25590
25641
  precompiled.push(_precompile(fs2.readFileSync(templates[i], "utf-8"), name, env));
25591
25642
  } catch (e) {
@@ -25957,11 +26008,11 @@ var require_nunjucks = __commonJS((exports, module) => {
25957
26008
  reset: function reset() {
25958
26009
  e = undefined;
25959
26010
  },
25960
- compile: function compile(src, env, path5, eagerCompile) {
26011
+ compile: function compile(src, env, path6, eagerCompile) {
25961
26012
  if (!e) {
25962
26013
  configure();
25963
26014
  }
25964
- return new Template(src, env, path5, eagerCompile);
26015
+ return new Template(src, env, path6, eagerCompile);
25965
26016
  },
25966
26017
  render: function render(name, ctx, cb) {
25967
26018
  if (!e) {
@@ -25979,57 +26030,39 @@ var require_nunjucks = __commonJS((exports, module) => {
25979
26030
  precompileString: precompile ? precompile.precompileString : undefined
25980
26031
  };
25981
26032
  });
25982
-
25983
- // node_modules/slugify/slugify.js
25984
- var require_slugify = __commonJS((exports, module) => {
25985
- (function(name, root, factory) {
25986
- if (typeof exports === "object") {
25987
- module.exports = factory();
25988
- module.exports["default"] = factory();
25989
- } else if (typeof define === "function" && define.amd) {
25990
- define(factory);
25991
- } else {
25992
- root[name] = factory();
25993
- }
25994
- })("slugify", exports, function() {
25995
- var charMap = JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E\'","\u0538":"Y\'","\u0539":"T\'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C\'","\u053F":"K","\u0540":"H","\u0541":"D\'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R\'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P\'","\u0554":"Q\'","\u0555":"O\'\'","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"\'","\u2019":"\'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}');
25996
- var locales = JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');
25997
- function replace(string, options2) {
25998
- if (typeof string !== "string") {
25999
- throw new Error("slugify: string argument expected");
26000
- }
26001
- options2 = typeof options2 === "string" ? { replacement: options2 } : options2 || {};
26002
- var locale = locales[options2.locale] || {};
26003
- var replacement = options2.replacement === undefined ? "-" : options2.replacement;
26004
- var trim = options2.trim === undefined ? true : options2.trim;
26005
- var slug = string.normalize().split("").reduce(function(result, ch) {
26006
- var appendChar = locale[ch];
26007
- if (appendChar === undefined)
26008
- appendChar = charMap[ch];
26009
- if (appendChar === undefined)
26010
- appendChar = ch;
26011
- if (appendChar === replacement)
26012
- appendChar = " ";
26013
- return result + appendChar.replace(options2.remove || /[^\w\s$*_+~.()'"!\-:@]+/g, "");
26014
- }, "");
26015
- if (options2.strict) {
26016
- slug = slug.replace(/[^A-Za-z0-9\s]/g, "");
26017
- }
26018
- if (trim) {
26019
- slug = slug.trim();
26020
- }
26021
- slug = slug.replace(/\s+/g, replacement);
26022
- if (options2.lower) {
26023
- slug = slug.toLowerCase();
26024
- }
26025
- return slug;
26026
- }
26027
- replace.extend = function(customMap) {
26028
- Object.assign(charMap, customMap);
26029
- };
26030
- return replace;
26031
- });
26032
- });
26033
+ // src/constants.ts
26034
+ var PAGINATION = {
26035
+ DEFAULT_PAGE_SIZE: 10,
26036
+ BATCH_SIZE: 10,
26037
+ RSS_FEED_LIMIT: 40
26038
+ };
26039
+ var FILES = {
26040
+ WRITE_BUFFER_SIZE: 1024 * 1024,
26041
+ MAX_SITEMAP_SIZE: 40000,
26042
+ MAX_SITEMAP_URLS: 1000
26043
+ };
26044
+ var SEO = {
26045
+ NOINDEX_AFTER_PAGE: 2
26046
+ };
26047
+ var CACHE = {
26048
+ ONE_MONTH_MS: 30 * 24 * 60 * 60 * 1000
26049
+ };
26050
+ var DATE = {
26051
+ MONTHS: [
26052
+ "January",
26053
+ "February",
26054
+ "March",
26055
+ "April",
26056
+ "May",
26057
+ "June",
26058
+ "July",
26059
+ "August",
26060
+ "September",
26061
+ "October",
26062
+ "November",
26063
+ "December"
26064
+ ]
26065
+ };
26033
26066
  // src/parser.ts
26034
26067
  import path2 from "path";
26035
26068
 
@@ -26113,6 +26146,14 @@ async function copyFile(sourcePath, targetPath) {
26113
26146
  throw error;
26114
26147
  }
26115
26148
  }
26149
+ async function getFileMtime(filePath) {
26150
+ try {
26151
+ const stat = await Bun.file(filePath).stat();
26152
+ return stat?.mtime?.getTime() ?? null;
26153
+ } catch {
26154
+ return null;
26155
+ }
26156
+ }
26116
26157
 
26117
26158
  // src/utils/markdown-utils.ts
26118
26159
  var import_gray_matter = __toESM(require_gray_matter(), 1);
@@ -30554,6 +30595,8 @@ var import_sanitize_html = __toESM(require_sanitize_html(), 1);
30554
30595
  // src/utils/markdown/constants.ts
30555
30596
  var RELATIVE_LINK_REGEX = /^(\.\.\/)+(\d{4})\/([a-zA-Z0-9_-]+?)(?:\.md)?(?:\/)?(#[^#]*)?$/;
30556
30597
  var IMAGE_PATH_REGEX = /^\.\.\/\.\.\/assets\/(\d{4})\/([^/]+)\/(.+)$/;
30598
+ var IMAGE_PATH_ASSETS_DIR = /^\.\.\/\_assets\/(.+)$/;
30599
+ var IMAGE_PATH_ASSETS_SAME_DIR = /^\.\/\_assets\/(.+)$/;
30557
30600
  var YOUTUBE_EMBED_REGEX = /<a href="(https?:\/\/(www\.)?(youtube\.com\/watch\?v=|youtu\.be\/)([\w-]+)[^"]*)"[^>]*>(.*?)<\/a>/g;
30558
30601
  var EXTERNAL_LINK_REGEX = /<a href="(https?:\/\/|\/\/)([^"]+)"/g;
30559
30602
  var SCHEMA_ORG_PLACE_TYPES = new Set([
@@ -30613,12 +30656,25 @@ function setNoFollowExceptions(exceptions) {
30613
30656
  noFollowExceptions = new Set(exceptions.map((domain) => domain.toLowerCase().replace(/^www\./, "")));
30614
30657
  }
30615
30658
  function transformImagePath(relativePath, config) {
30616
- const match = relativePath.match(IMAGE_PATH_REGEX);
30617
- if (!match)
30618
- return null;
30619
- const [, year, slug, filename] = match;
30620
- const path2 = config.pathPattern.replace("{year}", year).replace("{slug}", slug).replace("{filename}", filename);
30621
- return `${config.baseUrl}/${path2}`;
30659
+ const legacyMatch = relativePath.match(IMAGE_PATH_REGEX);
30660
+ if (legacyMatch) {
30661
+ const [, year, slug, filename] = legacyMatch;
30662
+ const path2 = config.pathPattern.replace("{year}", year).replace("{slug}", slug).replace("{filename}", filename);
30663
+ return `${config.baseUrl}/${path2}`;
30664
+ }
30665
+ const assetsDirMatch = relativePath.match(IMAGE_PATH_ASSETS_DIR);
30666
+ if (assetsDirMatch && config.postYear) {
30667
+ const [, filename] = assetsDirMatch;
30668
+ const path2 = config.pathPattern.replace("{year}", config.postYear).replace("{slug}", "").replace("{filename}", filename).replace(/\/+/g, "/").replace(/^\//, "");
30669
+ return `${config.baseUrl}/${path2}`;
30670
+ }
30671
+ const assetsSameDirMatch = relativePath.match(IMAGE_PATH_ASSETS_SAME_DIR);
30672
+ if (assetsSameDirMatch && config.postYear) {
30673
+ const [, filename] = assetsSameDirMatch;
30674
+ const path2 = config.pathPattern.replace("{year}", config.postYear).replace("{slug}", "").replace("{filename}", filename).replace(/\/+/g, "/").replace(/^\//, "");
30675
+ return `${config.baseUrl}/${path2}`;
30676
+ }
30677
+ return null;
30622
30678
  }
30623
30679
  function createMarked(cdnConfig) {
30624
30680
  const marked = new B(markedHighlight({
@@ -30658,7 +30714,7 @@ function createMarked(cdnConfig) {
30658
30714
  }
30659
30715
  if (token.type === "image" && cdnConfig?.enabled) {
30660
30716
  const href = token.href || "";
30661
- if (href.startsWith("../../assets/")) {
30717
+ if (href.startsWith("../../assets/") || href.startsWith("../_assets/") || href.startsWith("./_assets/")) {
30662
30718
  const transformed = transformImagePath(href, cdnConfig);
30663
30719
  if (transformed) {
30664
30720
  token.href = transformed;
@@ -30907,9 +30963,10 @@ async function parseMarkdownFile(filePath, cdnConfig) {
30907
30963
  }
30908
30964
  }
30909
30965
  const slug = getBaseFilename(filePath);
30910
- const sanitizedHtml = convertMarkdownToHtml(content, cdnConfig);
30911
30966
  const pacificDate = toPacificTime(data.date);
30912
30967
  const postYear = getPacificYear(data.date);
30968
+ const cdnConfigWithYear = cdnConfig ? { ...cdnConfig, postYear: String(postYear) } : undefined;
30969
+ const sanitizedHtml = convertMarkdownToHtml(content, cdnConfigWithYear);
30913
30970
  const post = {
30914
30971
  title: data.title,
30915
30972
  date: pacificDate.toISOString(),
@@ -31364,7 +31421,6 @@ async function startServer(outputDir = DEFAULT_OUTPUT_DIR, port = 3000) {
31364
31421
  return server;
31365
31422
  }
31366
31423
  // src/site-generator.ts
31367
- var import_nunjucks2 = __toESM(require_nunjucks(), 1);
31368
31424
  var import_slugify = __toESM(require_slugify(), 1);
31369
31425
  import path9 from "path";
31370
31426
 
@@ -31502,6 +31558,10 @@ function toScriptTag(jsonLd) {
31502
31558
  ${json2}
31503
31559
  </script>`;
31504
31560
  }
31561
+ function schemasToHtml(schemas) {
31562
+ return schemas.map((schema) => toScriptTag(schema)).join(`
31563
+ `);
31564
+ }
31505
31565
  function extractFirstImageUrl(html, baseUrl) {
31506
31566
  const imgMatch = html.match(/<img[^>]+src=["']([^"']+)["']/i);
31507
31567
  if (!imgMatch || !imgMatch[1]) {
@@ -31545,13 +31605,9 @@ async function hashFile(filePath) {
31545
31605
  return "";
31546
31606
  }
31547
31607
  }
31548
- async function getFileMtime(filePath) {
31549
- try {
31550
- const stat = await Bun.file(filePath).stat();
31551
- return stat?.mtime?.getTime() || 0;
31552
- } catch (error) {
31553
- return 0;
31554
- }
31608
+ async function getFileMtime2(filePath) {
31609
+ const mtime = await getFileMtime(filePath);
31610
+ return mtime ?? 0;
31555
31611
  }
31556
31612
  async function loadCache(cwd) {
31557
31613
  const cachePath = path5.join(cwd, CACHE_FILENAME);
@@ -31590,7 +31646,7 @@ async function hasFileChanged(filePath, cache) {
31590
31646
  if (!cached) {
31591
31647
  return true;
31592
31648
  }
31593
- const currentMtime = await getFileMtime(filePath);
31649
+ const currentMtime = await getFileMtime2(filePath);
31594
31650
  if (currentMtime !== cached.mtime) {
31595
31651
  const currentHash = await hashFile(filePath);
31596
31652
  return currentHash !== cached.hash;
@@ -31599,7 +31655,7 @@ async function hasFileChanged(filePath, cache) {
31599
31655
  }
31600
31656
  async function updateCacheEntry(filePath, cache, options2) {
31601
31657
  const currentHash = await hashFile(filePath);
31602
- const currentMtime = await getFileMtime(filePath);
31658
+ const currentMtime = await getFileMtime2(filePath);
31603
31659
  cache.files[filePath] = {
31604
31660
  hash: currentHash,
31605
31661
  mtime: currentMtime,
@@ -31752,31 +31808,6 @@ ${categoryTags}`;
31752
31808
  return itemXml;
31753
31809
  }
31754
31810
 
31755
- // src/utils/pagination.ts
31756
- function createPagination(items, currentPage, pageSize, pagePath) {
31757
- const totalItems = items.length;
31758
- const totalPages = Math.ceil(totalItems / pageSize);
31759
- return {
31760
- currentPage,
31761
- totalPages,
31762
- hasNextPage: currentPage < totalPages,
31763
- hasPrevPage: currentPage > 1,
31764
- nextPage: currentPage < totalPages ? currentPage + 1 : null,
31765
- prevPage: currentPage > 1 ? currentPage - 1 : null,
31766
- pageSize,
31767
- totalItems,
31768
- pagePath
31769
- };
31770
- }
31771
- function getPaginatedItems(items, page, pageSize) {
31772
- const startIndex = (page - 1) * pageSize;
31773
- const endIndex = startIndex + pageSize;
31774
- return items.slice(startIndex, endIndex);
31775
- }
31776
- function getTotalPages(totalItems, pageSize) {
31777
- return Math.ceil(totalItems / pageSize);
31778
- }
31779
-
31780
31811
  // src/generators/feeds.ts
31781
31812
  function makeAbsoluteUrl(imageUrl, baseUrl) {
31782
31813
  return imageUrl.startsWith("http") ? imageUrl : `${baseUrl}${imageUrl}`;
@@ -31785,7 +31816,7 @@ function formatRSSDate(date) {
31785
31816
  return toPacificTime(date).toUTCString();
31786
31817
  }
31787
31818
  function generateRSSFeed(site, config) {
31788
- const posts = site.posts.slice(0, 15);
31819
+ const posts = site.posts.slice(0, PAGINATION.RSS_FEED_LIMIT);
31789
31820
  const now = toPacificTime(new Date);
31790
31821
  const latestPostDate = posts.length > 0 ? posts[0].date : now.toISOString();
31791
31822
  const lastBuildDate = formatRSSDate(latestPostDate);
@@ -31846,17 +31877,12 @@ function generateSitemap(site, config, pageSize = 10) {
31846
31877
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
31847
31878
  `;
31848
31879
  sitemapContent += buildSitemapUrl(`${config.baseUrl}/`, currentDate, "daily", 1);
31849
- const totalHomePages = getTotalPages(site.posts.length, pageSize);
31850
- for (let page = 2;page <= totalHomePages; page++) {
31851
- sitemapContent += buildSitemapUrl(`${config.baseUrl}/page/${page}/`, currentDate, "daily", 0.8);
31852
- }
31853
31880
  for (const post of site.posts) {
31854
31881
  const postUrl = `${config.baseUrl}${post.url}`;
31855
31882
  const postDate = new Date(post.date).toISOString();
31856
31883
  const priority = calculateFreshnessPriority(post.date, 0.7, now);
31857
31884
  const age = now - new Date(post.date).getTime();
31858
- const ONE_MONTH = 30 * 24 * 60 * 60 * 1000;
31859
- const changefreq = age < ONE_MONTH ? "weekly" : "monthly";
31885
+ const changefreq = age < CACHE.ONE_MONTH_MS ? "weekly" : "monthly";
31860
31886
  sitemapContent += buildSitemapUrl(postUrl, postDate, changefreq, priority);
31861
31887
  }
31862
31888
  sitemapContent += buildSitemapUrl(`${config.baseUrl}/tags/`, currentDate, "weekly", 0.5);
@@ -31866,20 +31892,12 @@ function generateSitemap(site, config, pageSize = 10) {
31866
31892
  const mostRecentPost = tagData.posts[0];
31867
31893
  const tagPriority = mostRecentPost ? calculateFreshnessPriority(mostRecentPost.date, 0.4, now) : 0.4;
31868
31894
  sitemapContent += buildSitemapUrl(tagUrl, currentDate, "weekly", tagPriority);
31869
- const totalTagPages = getTotalPages(tagData.posts.length, pageSize);
31870
- for (let page = 2;page <= totalTagPages; page++) {
31871
- sitemapContent += buildSitemapUrl(`${config.baseUrl}/tags/${tagData.slug}/page/${page}/`, currentDate, "weekly", Math.max(0.3, tagPriority - 0.1));
31872
- }
31873
31895
  }
31874
31896
  for (const [year, yearPosts] of Object.entries(site.postsByYear)) {
31875
31897
  const currentYear = new Date().getFullYear();
31876
31898
  const isCurrentYear = parseInt(year) === currentYear;
31877
31899
  const yearPriority = isCurrentYear ? 0.7 : 0.5;
31878
31900
  sitemapContent += buildSitemapUrl(`${config.baseUrl}/${year}/`, currentDate, isCurrentYear ? "weekly" : "monthly", yearPriority);
31879
- const totalYearPages = getTotalPages(yearPosts.length, pageSize);
31880
- for (let page = 2;page <= totalYearPages; page++) {
31881
- sitemapContent += buildSitemapUrl(`${config.baseUrl}/${year}/page/${page}/`, currentDate, isCurrentYear ? "weekly" : "monthly", yearPriority - 0.1);
31882
- }
31883
31901
  }
31884
31902
  sitemapContent += `</urlset>`;
31885
31903
  return sitemapContent;
@@ -31917,6 +31935,58 @@ Sitemap: ${config.baseUrl}/sitemap.xml
31917
31935
  // src/generators/pages.ts
31918
31936
  var import_nunjucks = __toESM(require_nunjucks(), 1);
31919
31937
  import path6 from "path";
31938
+
31939
+ // src/utils/pagination.ts
31940
+ function createPagination(items, currentPage, pageSize, pagePath) {
31941
+ const totalItems = items.length;
31942
+ const totalPages = Math.ceil(totalItems / pageSize);
31943
+ return {
31944
+ currentPage,
31945
+ totalPages,
31946
+ hasNextPage: currentPage < totalPages,
31947
+ hasPrevPage: currentPage > 1,
31948
+ nextPage: currentPage < totalPages ? currentPage + 1 : null,
31949
+ prevPage: currentPage > 1 ? currentPage - 1 : null,
31950
+ pageSize,
31951
+ totalItems,
31952
+ pagePath
31953
+ };
31954
+ }
31955
+ function getPaginatedItems(items, page, pageSize) {
31956
+ const startIndex = (page - 1) * pageSize;
31957
+ const endIndex = startIndex + pageSize;
31958
+ return items.slice(startIndex, endIndex);
31959
+ }
31960
+ function getTotalPages(totalItems, pageSize) {
31961
+ return Math.ceil(totalItems / pageSize);
31962
+ }
31963
+
31964
+ // src/utils/schema-factory.ts
31965
+ function generateCollectionSchemas(config, options2) {
31966
+ const schemas = [
31967
+ generateCollectionPageSchema({
31968
+ title: options2.title,
31969
+ description: options2.description,
31970
+ url: options2.url,
31971
+ posts: options2.posts,
31972
+ site: config
31973
+ }),
31974
+ generateBreadcrumbListSchema({
31975
+ site: config,
31976
+ items: options2.breadcrumbs
31977
+ })
31978
+ ];
31979
+ return schemasToHtml(schemas);
31980
+ }
31981
+ function generateHomeBreadcrumbs(config) {
31982
+ const schema = generateBreadcrumbListSchema({
31983
+ site: config,
31984
+ items: [{ name: "Home", url: `${config.baseUrl}/` }]
31985
+ });
31986
+ return schemasToHtml([schema]);
31987
+ }
31988
+
31989
+ // src/generators/pages.ts
31920
31990
  function getSortedTags(tags, limit) {
31921
31991
  const sorted = Object.values(tags).sort((a, b2) => b2.count - a.count);
31922
31992
  return limit ? sorted.slice(0, limit) : sorted;
@@ -31927,7 +31997,7 @@ async function writeHtmlFile(outputDir, relativePath, content) {
31927
31997
  await ensureDir(dir);
31928
31998
  await Bun.write(fullPath, content);
31929
31999
  }
31930
- async function generateIndexPages(site, config, outputDir, pageSize = 10) {
32000
+ async function generateIndexPages(site, config, outputDir, pageSize = PAGINATION.DEFAULT_PAGE_SIZE) {
31931
32001
  const totalPages = getTotalPages(site.posts.length, pageSize);
31932
32002
  for (let page = 1;page <= totalPages; page++) {
31933
32003
  const paginatedPosts = getPaginatedItems(site.posts, page, pageSize);
@@ -31935,8 +32005,7 @@ async function generateIndexPages(site, config, outputDir, pageSize = 10) {
31935
32005
  let jsonLd = "";
31936
32006
  if (page === 1) {
31937
32007
  const schemas = generateHomePageSchemas({ site: config });
31938
- jsonLd = schemas.map((schema) => toScriptTag(schema)).join(`
31939
- `);
32008
+ jsonLd = schemasToHtml(schemas);
31940
32009
  }
31941
32010
  const pageHtml = import_nunjucks.default.render("index.njk", {
31942
32011
  site: config,
@@ -31944,16 +32013,15 @@ async function generateIndexPages(site, config, outputDir, pageSize = 10) {
31944
32013
  tags: getSortedTags(site.tags, config.maxTagsOnHomepage),
31945
32014
  pagination,
31946
32015
  jsonLd,
31947
- noindex: page > 2
32016
+ noindex: page > SEO.NOINDEX_AFTER_PAGE
31948
32017
  });
31949
32018
  const outputPath = page === 1 ? "index.html" : `page/${page}/index.html`;
31950
32019
  await writeHtmlFile(outputDir, outputPath, pageHtml);
31951
32020
  }
31952
32021
  }
31953
32022
  async function generatePostPages(site, config, outputDir) {
31954
- const batchSize = 10;
31955
- for (let i = 0;i < site.posts.length; i += batchSize) {
31956
- const batch = site.posts.slice(i, i + batchSize);
32023
+ for (let i = 0;i < site.posts.length; i += PAGINATION.BATCH_SIZE) {
32024
+ const batch = site.posts.slice(i, i + PAGINATION.BATCH_SIZE);
31957
32025
  await Promise.all(batch.map(async (post) => {
31958
32026
  const postPath = post.url.substring(1);
31959
32027
  const postHtml = import_nunjucks.default.render("post.njk", {
@@ -31965,7 +32033,7 @@ async function generatePostPages(site, config, outputDir) {
31965
32033
  }));
31966
32034
  }
31967
32035
  }
31968
- async function generateTagPages(site, config, outputDir, pageSize = 10) {
32036
+ async function generateTagPages(site, config, outputDir, pageSize = PAGINATION.DEFAULT_PAGE_SIZE) {
31969
32037
  const tagIndexHtml = import_nunjucks.default.render("tags.njk", {
31970
32038
  site: config,
31971
32039
  tags: getSortedTags(site.tags)
@@ -31980,36 +32048,25 @@ async function generateTagPages(site, config, outputDir, pageSize = 10) {
31980
32048
  posts: paginatedPosts
31981
32049
  };
31982
32050
  const pagination = createPagination(tagData.posts, page, pageSize, `/tags/${tagData.slug}/`);
31983
- let jsonLd = "";
31984
- if (page === 1) {
31985
- const schemas = [];
31986
- const description = tagData.description || `Articles tagged with ${tagName}`;
31987
- schemas.push(generateCollectionPageSchema({
31988
- title: `${tagName}`,
31989
- description,
31990
- url: `${config.baseUrl}/tags/${tagData.slug}/`,
31991
- posts: tagData.posts,
31992
- site: config
31993
- }));
31994
- schemas.push(generateBreadcrumbListSchema({
31995
- site: config,
31996
- items: [
31997
- { name: "Home", url: `${config.baseUrl}/` },
31998
- {
31999
- name: tagName,
32000
- url: `${config.baseUrl}/tags/${tagData.slug}/`
32001
- }
32002
- ]
32003
- }));
32004
- jsonLd = schemas.map((schema) => toScriptTag(schema)).join(`
32005
- `);
32006
- }
32051
+ const jsonLd = page === 1 ? generateCollectionSchemas(config, {
32052
+ title: tagName,
32053
+ description: tagData.description || `Articles tagged with ${tagName}`,
32054
+ url: `${config.baseUrl}/tags/${tagData.slug}/`,
32055
+ posts: tagData.posts,
32056
+ breadcrumbs: [
32057
+ { name: "Home", url: `${config.baseUrl}/` },
32058
+ {
32059
+ name: tagName,
32060
+ url: `${config.baseUrl}/tags/${tagData.slug}/`
32061
+ }
32062
+ ]
32063
+ }) : "";
32007
32064
  const tagPageHtml = import_nunjucks.default.render("tag.njk", {
32008
32065
  site: config,
32009
32066
  tag: paginatedTagData,
32010
32067
  tags: Object.values(site.tags),
32011
32068
  pagination,
32012
- noindex: page > 2,
32069
+ noindex: page > SEO.NOINDEX_AFTER_PAGE,
32013
32070
  jsonLd
32014
32071
  });
32015
32072
  const outputPath = page === 1 ? `tags/${tagData.slug}/index.html` : `tags/${tagData.slug}/page/${page}/index.html`;
@@ -32017,39 +32074,29 @@ async function generateTagPages(site, config, outputDir, pageSize = 10) {
32017
32074
  }
32018
32075
  }
32019
32076
  }
32020
- async function generateYearArchives(site, config, outputDir, pageSize = 10) {
32077
+ async function generateYearArchives(site, config, outputDir, pageSize = PAGINATION.DEFAULT_PAGE_SIZE) {
32021
32078
  for (const [year, yearPosts] of Object.entries(site.postsByYear)) {
32022
32079
  const totalPages = getTotalPages(yearPosts.length, pageSize);
32023
32080
  for (let page = 1;page <= totalPages; page++) {
32024
32081
  const paginatedPosts = getPaginatedItems(yearPosts, page, pageSize);
32025
32082
  const pagination = createPagination(yearPosts, page, pageSize, `/${year}/`);
32026
- let jsonLd = "";
32027
- if (page === 1) {
32028
- const schemas = [];
32029
- schemas.push(generateCollectionPageSchema({
32030
- title: `Posts from ${year}`,
32031
- description: `Articles published in ${year}`,
32032
- url: `${config.baseUrl}/${year}/`,
32033
- posts: yearPosts,
32034
- site: config
32035
- }));
32036
- schemas.push(generateBreadcrumbListSchema({
32037
- site: config,
32038
- items: [
32039
- { name: "Home", url: `${config.baseUrl}/` },
32040
- { name: year, url: `${config.baseUrl}/${year}/` }
32041
- ]
32042
- }));
32043
- jsonLd = schemas.map((schema) => toScriptTag(schema)).join(`
32044
- `);
32045
- }
32083
+ const jsonLd = page === 1 ? generateCollectionSchemas(config, {
32084
+ title: `Posts from ${year}`,
32085
+ description: `Articles published in ${year}`,
32086
+ url: `${config.baseUrl}/${year}/`,
32087
+ posts: yearPosts,
32088
+ breadcrumbs: [
32089
+ { name: "Home", url: `${config.baseUrl}/` },
32090
+ { name: year, url: `${config.baseUrl}/${year}/` }
32091
+ ]
32092
+ }) : "";
32046
32093
  const yearPageHtml = import_nunjucks.default.render("archive.njk", {
32047
32094
  site: config,
32048
32095
  posts: paginatedPosts,
32049
32096
  tags: getSortedTags(site.tags, config.maxTagsOnHomepage),
32050
32097
  year,
32051
32098
  pagination,
32052
- noindex: page > 2,
32099
+ noindex: page > SEO.NOINDEX_AFTER_PAGE,
32053
32100
  jsonLd
32054
32101
  });
32055
32102
  const outputPath = page === 1 ? `${year}/index.html` : `${year}/page/${page}/index.html`;
@@ -32333,6 +32380,36 @@ function displayMetrics(metrics) {
32333
32380
  `);
32334
32381
  }
32335
32382
 
32383
+ // src/utils/template-engine.ts
32384
+ var import_nunjucks2 = __toESM(require_nunjucks(), 1);
32385
+ function createTemplateEngine(templatesDir, watch = false) {
32386
+ const env = import_nunjucks2.default.configure(templatesDir, {
32387
+ autoescape: true,
32388
+ watch
32389
+ });
32390
+ env.addFilter("date", formatDate);
32391
+ return env;
32392
+ }
32393
+ function formatDate(date, format) {
32394
+ const d2 = toPacificTime(date);
32395
+ const month = DATE.MONTHS[d2.getMonth()];
32396
+ switch (format) {
32397
+ case "YYYY":
32398
+ return d2.getFullYear().toString();
32399
+ case "MMMM D, YYYY":
32400
+ return `${month} ${d2.getDate()}, ${d2.getFullYear()}`;
32401
+ case "MMMM D, YYYY h:mm A": {
32402
+ const hours = d2.getHours() % 12 || 12;
32403
+ const ampm = d2.getHours() >= 12 ? "PM" : "AM";
32404
+ return `${month} ${d2.getDate()}, ${d2.getFullYear()} @ ${hours} ${ampm}`;
32405
+ }
32406
+ default:
32407
+ return d2.toLocaleDateString("en-US", {
32408
+ timeZone: "America/Los_Angeles"
32409
+ });
32410
+ }
32411
+ }
32412
+
32336
32413
  // src/site-generator.ts
32337
32414
  class SiteGenerator {
32338
32415
  options;
@@ -32349,40 +32426,7 @@ class SiteGenerator {
32349
32426
  postsByYear: {}
32350
32427
  };
32351
32428
  this.metrics = new MetricsCollector;
32352
- const env = import_nunjucks2.default.configure(this.options.templatesDir, {
32353
- autoescape: true,
32354
- watch: false
32355
- });
32356
- env.addFilter("date", (date, format) => {
32357
- const d2 = toPacificTime(date);
32358
- const months = [
32359
- "January",
32360
- "February",
32361
- "March",
32362
- "April",
32363
- "May",
32364
- "June",
32365
- "July",
32366
- "August",
32367
- "September",
32368
- "October",
32369
- "November",
32370
- "December"
32371
- ];
32372
- if (format === "YYYY") {
32373
- return d2.getFullYear();
32374
- } else if (format === "MMMM D, YYYY") {
32375
- return `${months[d2.getMonth()]} ${d2.getDate()}, ${d2.getFullYear()}`;
32376
- } else if (format === "MMMM D, YYYY h:mm A") {
32377
- const hours = d2.getHours() % 12 || 12;
32378
- const ampm = d2.getHours() >= 12 ? "PM" : "AM";
32379
- return `${months[d2.getMonth()]} ${d2.getDate()}, ${d2.getFullYear()} @ ${hours} ${ampm}`;
32380
- } else {
32381
- return d2.toLocaleDateString("en-US", {
32382
- timeZone: "America/Los_Angeles"
32383
- });
32384
- }
32385
- });
32429
+ createTemplateEngine(this.options.templatesDir);
32386
32430
  }
32387
32431
  enableIncrementalMode() {
32388
32432
  this.incrementalMode = true;
@@ -32424,8 +32468,7 @@ class SiteGenerator {
32424
32468
  site: this.options.config,
32425
32469
  imageUrl: post.image
32426
32470
  });
32427
- post.jsonLd = schemas.map((schema) => toScriptTag(schema)).join(`
32428
- `);
32471
+ post.jsonLd = schemasToHtml(schemas);
32429
32472
  post.tags.forEach((tagName) => {
32430
32473
  const tagSlug = import_slugify.default(tagName, { lower: true, strict: true });
32431
32474
  post.tagSlugs[tagName] = tagSlug;
@@ -32492,15 +32535,14 @@ class SiteGenerator {
32492
32535
  }
32493
32536
  }
32494
32537
  async generateFeeds() {
32495
- const pageSize = 10;
32496
32538
  const rssContent = generateRSSFeed(this.site, this.options.config);
32497
32539
  await Bun.write(path9.join(this.options.outputDir, "feed.xml"), rssContent);
32498
- const sitemapContent = generateSitemap(this.site, this.options.config, pageSize);
32540
+ const sitemapContent = generateSitemap(this.site, this.options.config, PAGINATION.DEFAULT_PAGE_SIZE);
32499
32541
  await Bun.write(path9.join(this.options.outputDir, "sitemap.xml"), sitemapContent);
32500
32542
  console.log("Generated sitemap.xml");
32501
32543
  const urlCount = this.site.posts.length + Object.keys(this.site.tags).length + 10;
32502
32544
  const sitemapSize = sitemapContent.length;
32503
- if (urlCount > 1000 || sitemapSize > 40000) {
32545
+ if (urlCount > FILES.MAX_SITEMAP_URLS || sitemapSize > FILES.MAX_SITEMAP_SIZE) {
32504
32546
  const sitemapIndexContent = generateSitemapIndex(this.options.config);
32505
32547
  await Bun.write(path9.join(this.options.outputDir, "sitemap_index.xml"), sitemapIndexContent);
32506
32548
  console.log("Generated sitemap_index.xml");
@@ -32515,10 +32557,8 @@ class SiteGenerator {
32515
32557
  const posts = await parseMarkdownDirectory(this.options.contentDir, strictMode, this.options.config.cdn);
32516
32558
  if (this.cache) {
32517
32559
  const allFiles2 = await findFilesByPattern("**/*.md", this.options.contentDir, true);
32518
- const postsByPath = new Map(posts.map((p) => [p.url, p]));
32519
- for (let i = 0;i < allFiles2.length; i++) {
32520
- const filePath = allFiles2[i];
32521
- const post = posts[i];
32560
+ const postsWithPaths = await parseMarkdownFiles(allFiles2, this.options.config.cdn);
32561
+ for (const { post, filePath } of postsWithPaths) {
32522
32562
  await updateCacheEntry(filePath, this.cache, { post });
32523
32563
  }
32524
32564
  }
@@ -32678,14 +32718,14 @@ class S3Uploader {
32678
32718
  await Promise.all(executing);
32679
32719
  return results;
32680
32720
  }
32681
- async uploadImages(imagesDir, minYear) {
32721
+ async uploadImages(imagesDir, minYear, keyTransform) {
32682
32722
  console.log(`[S3] Uploading all images from ${imagesDir} to bucket ${this.s3Config.bucket}...`);
32683
32723
  if (minYear) {
32684
32724
  console.log(`[S3] Filtering images from year ${minYear} onwards`);
32685
32725
  }
32686
32726
  const imageUrls = {};
32687
32727
  try {
32688
- const glob = new Bun.Glob("**/*.{jpg,jpeg,png,gif,webp,svg}");
32728
+ const glob = new Bun.Glob("**/*.{jpg,jpeg,png,gif,webp,svg,mp4}");
32689
32729
  const files = [];
32690
32730
  console.log(`[S3] Scanning directory ${imagesDir} for image files...`);
32691
32731
  try {
@@ -32723,20 +32763,19 @@ class S3Uploader {
32723
32763
  const uploadTasks = imageFiles.map((imageFile) => async () => {
32724
32764
  try {
32725
32765
  const imagePath = path10.join(imagesDir, imageFile);
32726
- const filename = path10.basename(imagePath);
32766
+ const s3Key = keyTransform ? keyTransform(imageFile) : imageFile;
32727
32767
  const file = Bun.file(imagePath);
32728
- const contentType = file.type;
32729
32768
  if (process.env.BUNKI_DRY_RUN === "true") {} else {
32730
- const s3File = this.client.file(imageFile);
32769
+ const s3File = this.client.file(s3Key);
32731
32770
  await s3File.write(file);
32732
32771
  }
32733
- const imageUrl = this.getPublicUrl(imageFile);
32734
- imageUrls[imageFile] = imageUrl;
32772
+ const imageUrl = this.getPublicUrl(s3Key);
32773
+ imageUrls[s3Key] = imageUrl;
32735
32774
  uploadedCount++;
32736
32775
  if (uploadedCount % 10 === 0) {
32737
32776
  console.log(`[S3] Progress: ${uploadedCount}/${imageFiles.length} images uploaded`);
32738
32777
  }
32739
- return { success: true, file: imageFile };
32778
+ return { success: true, file: s3Key };
32740
32779
  } catch (error) {
32741
32780
  failedCount++;
32742
32781
  console.error(`[S3] Error uploading ${imageFile}:`, error);
@@ -32758,9 +32797,12 @@ function createUploader(config) {
32758
32797
 
32759
32798
  // src/utils/image-uploader.ts
32760
32799
  var DEFAULT_IMAGES_DIR = path11.join(process.cwd(), "assets");
32800
+ var DEFAULT_CONTENT_DIR2 = path11.join(process.cwd(), "content");
32761
32801
  async function uploadImages(options2 = {}) {
32762
32802
  try {
32763
- const imagesDir = path11.resolve(options2.images || DEFAULT_IMAGES_DIR);
32803
+ const contentAssetsMode = options2.contentAssets === true;
32804
+ const defaultDir = contentAssetsMode ? DEFAULT_CONTENT_DIR2 : DEFAULT_IMAGES_DIR;
32805
+ const imagesDir = path11.resolve(options2.images || defaultDir);
32764
32806
  if (!await fileExists(imagesDir)) {
32765
32807
  console.log(`Creating images directory at ${imagesDir}...`);
32766
32808
  await ensureDir(imagesDir);
@@ -32790,12 +32832,27 @@ async function uploadImages(options2 = {}) {
32790
32832
  publicUrl: config.s3.publicUrl || config.publicUrl || ""
32791
32833
  };
32792
32834
  }
32793
- console.log(`Uploading images from ${imagesDir} to bucket ${s3Config.bucket}`);
32835
+ const assetsDir = options2.contentAssetsDir || config.contentAssets?.assetsDir || "_assets";
32836
+ if (contentAssetsMode) {
32837
+ if (config.contentAssets?.s3) {
32838
+ s3Config = {
32839
+ ...config.contentAssets.s3,
32840
+ publicUrl: config.contentAssets.s3.publicUrl || s3Config.publicUrl
32841
+ };
32842
+ console.log(`[content-assets] Using dedicated S3 config (bucket: ${s3Config.bucket})`);
32843
+ }
32844
+ console.log(`Uploading content assets from ${imagesDir} to bucket ${s3Config.bucket}`);
32845
+ console.log(`[content-assets] S3 key: {year}/{filename} (/${assetsDir}/ stripped from path)`);
32846
+ } else {
32847
+ console.log(`Uploading images from ${imagesDir} to bucket ${s3Config.bucket}`);
32848
+ }
32794
32849
  if (options2.minYear) {
32795
32850
  console.log(`Filtering images from year ${options2.minYear} onwards`);
32796
32851
  }
32852
+ const escapedDir = assetsDir.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
32853
+ const keyTransform = contentAssetsMode ? (filePath) => filePath.replace(new RegExp(`/${escapedDir}/`), "/") : undefined;
32797
32854
  const uploader = createUploader(s3Config);
32798
- const imageUrlMap = await uploader.uploadImages(imagesDir, options2.minYear);
32855
+ const imageUrlMap = await uploader.uploadImages(imagesDir, options2.minYear, keyTransform);
32799
32856
  if (options2.outputJson) {
32800
32857
  const outputFile = path11.resolve(options2.outputJson);
32801
32858
  await Bun.write(outputFile, JSON.stringify(imageUrlMap, null, 2));
@@ -32825,19 +32882,27 @@ export {
32825
32882
  parseMarkdownDirectory,
32826
32883
  loadConfig,
32827
32884
  getBaseFilename,
32885
+ generateHomeBreadcrumbs,
32886
+ generateCollectionSchemas,
32828
32887
  findFilesByPattern,
32829
32888
  fileExists,
32830
32889
  extractExcerpt,
32831
32890
  ensureDir,
32832
32891
  createUploader,
32892
+ createTemplateEngine,
32833
32893
  createDefaultConfig,
32834
32894
  copyFile,
32835
32895
  convertMarkdownToHtml,
32836
32896
  configExists,
32837
32897
  SiteGenerator,
32898
+ SEO,
32899
+ PAGINATION,
32900
+ FILES,
32838
32901
  DEFAULT_TEMPLATES_DIR,
32839
32902
  DEFAULT_OUTPUT_DIR,
32840
32903
  DEFAULT_IMAGES_DIR,
32841
32904
  DEFAULT_CONTENT_DIR,
32842
- DEFAULT_CONFIG_FILE
32905
+ DEFAULT_CONFIG_FILE,
32906
+ DATE,
32907
+ CACHE
32843
32908
  };