halo-pc 1.0.40 → 1.0.41

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. package/dist/{Article-CqtkXVmQ.js → Article-BMW_FzdK.js} +32 -31
  2. package/dist/{ArticleFooter-DeJdTtZD.js → ArticleFooter-7iPkMQaX.js} +13 -12
  3. package/dist/Autocomplete-B6Mwp9rT.js +50 -0
  4. package/dist/{Autocomplete-0fxB2_FC.js → Autocomplete-C-El55Lz.js} +1 -1
  5. package/dist/{Autocomplete-LQiKcvz1.js → Autocomplete-PZTjEBIx.js} +11 -10
  6. package/dist/{CSharp-BIFRQLaK.js → CSharp-BQUrQwua.js} +1 -1
  7. package/dist/{Calender-DPNTn-S4.js → Calender-CJXR7uhM.js} +2 -2
  8. package/dist/Callback-CyDW9WU2.js +21 -0
  9. package/dist/{Cascader-Vhc81TDV.js → Cascader-CFc_8QSm.js} +18 -17
  10. package/dist/Cascader-DMQjalNv.js +47 -0
  11. package/dist/{Checkbox-D9Sp6ZGQ.js → Checkbox-aU8e779g.js} +12 -11
  12. package/dist/{Checkbox-CIim5NiB.js → Checkbox-pV01os-T.js} +1 -1
  13. package/dist/Code-C0Kxulod.js +4 -0
  14. package/dist/Code-C4pIa8BE.js +60 -0
  15. package/dist/Code-CCJx9RSm.js +42 -0
  16. package/dist/{Code-yDKaH1uF.js → Code-kDBbVC1W.js} +1 -1
  17. package/dist/Code.vue_vue_type_style_index_0_lang-36NN7tgP.js +65 -0
  18. package/dist/Column-BebDf5Z9.js +75 -0
  19. package/dist/{Comment-tU2wBvGO.js → Comment-BgfD9WtL.js} +25 -19
  20. package/dist/{Compare-DqvGyQWA.js → Compare-BZucuvFP.js} +9 -8
  21. package/dist/{Compare-D7Gz-lE9.js → Compare-D-Byn_Gq.js} +11 -10
  22. package/dist/Copy-DW4jSNQi.js +44 -0
  23. package/dist/Custom-DIF-RYi3.js +55 -0
  24. package/dist/{DataExport-BDftKI0U.js → DataExport-CyQy2xjO.js} +1 -1
  25. package/dist/{DataExport.vue_vue_type_script_setup_true_lang-Dzy9UC11.js → DataExport.vue_vue_type_script_setup_true_lang-C4n6xWcP.js} +28 -27
  26. package/dist/{DataImport-CRYaaQfA.js → DataImport-BVF83UsQ.js} +1 -1
  27. package/dist/{DataImport.vue_vue_type_script_setup_true_lang-D7UdCnBM.js → DataImport.vue_vue_type_script_setup_true_lang-BZhFLOqB.js} +31 -30
  28. package/dist/{Date-Dlh1_S7p.js → Date-CqpFvbYZ.js} +1 -1
  29. package/dist/{Date-DPPiYLWw.js → Date-g1XKWU4b.js} +8 -7
  30. package/dist/{DateRange-BgF_T3ls.js → DateRange-B2afkdbT.js} +6 -5
  31. package/dist/{DateTime-DP-VfmtN.js → DateTime-D_x_wBZR.js} +8 -7
  32. package/dist/{DateTime-CNjPeK9t.js → DateTime-Zi3vtH77.js} +1 -1
  33. package/dist/{DateTimeRange-DbEpW4nB.js → DateTimeRange-BFWM_U7H.js} +10 -9
  34. package/dist/{Daterange-DHVjhrK9.js → Daterange-tXA0b0Ak.js} +5 -4
  35. package/dist/{Decimal-BDEWVSsK.js → Decimal-DKQ38XS_.js} +1 -1
  36. package/dist/{Delete-Bl0GmthL.js → Delete-BOkBpAGN.js} +20 -19
  37. package/dist/{Detail-BozyhOTt.js → Detail-SWgERqKG.js} +11 -10
  38. package/dist/{Dictionary-CJwZPQz6.js → Dictionary-Xsj_Qorw.js} +15 -9
  39. package/dist/{Email-D5X1SzuJ.js → Email-DILPnLkb.js} +12 -11
  40. package/dist/{File-DixK0K7p.js → File-BDUTK7hV.js} +40 -39
  41. package/dist/Image-Yx3ZHHJK.js +9 -0
  42. package/dist/Index-BTa4YIN9.js +174 -0
  43. package/dist/Index-BWukqxQl.js +4 -0
  44. package/dist/Index-BahY1OIJ.js +4 -0
  45. package/dist/Index-C9ffFYsl.js +4 -0
  46. package/dist/{Index-j15c7lwJ.js → Index-CiQQmYeA.js} +1 -1
  47. package/dist/Index-DG7Hovsx.js +4 -0
  48. package/dist/{Index-D2FOeoNQ.js → Index-DeYqTT9Q.js} +1 -1
  49. package/dist/{Index-DbXgnBz6.js → Index-WVLyjyqt.js} +16 -15
  50. package/dist/{Index.vue_vue_type_script_setup_true_lang-DT7eOyjs.js → Index.vue_vue_type_script_setup_true_lang-42C0EEto.js} +13 -12
  51. package/dist/{Index.vue_vue_type_script_setup_true_lang-ByxBNAdg.js → Index.vue_vue_type_script_setup_true_lang-DWMiv0dC.js} +21 -15
  52. package/dist/{Install-WR3b4IfI.js → Install-DW5uDsXF.js} +14 -13
  53. package/dist/{Int-GGWiUqO2.js → Int-BM4sbZvh.js} +14 -13
  54. package/dist/{Int-CWsDtoxE.js → Int-BrFE_Hmm.js} +10 -9
  55. package/dist/List-DWjTqrJR.js +72 -0
  56. package/dist/Maintaince-DF3nu9Jd.js +20 -0
  57. package/dist/{Markdown-nVfQs7kc.js → Markdown-BC8l7O_U.js} +1 -1
  58. package/dist/{Month-CxKMP4kO.js → Month-DRa9o-WC.js} +1 -1
  59. package/dist/{Month-DnYlAi7k.js → Month-QG6OiiLU.js} +11 -10
  60. package/dist/Month-Y0kLXgV7.js +38 -0
  61. package/dist/{Normal-RcqEyIFN.js → Normal-CSy3DFPH.js} +50 -49
  62. package/dist/{Paging-DrdGzxeP.js → Paging-BYccIXmC.js} +43 -42
  63. package/dist/{PagingHeader-C8UpM9Kj.js → PagingHeader-U-oJ1TQE.js} +16 -15
  64. package/dist/{PagingRow-oQWCofO4.js → PagingRow-BmokRXX3.js} +14 -13
  65. package/dist/{Racebar-CvoF2ySW.js → Racebar-BvFHNGb8.js} +28 -22
  66. package/dist/{Radio-DhjfkC14.js → Radio-CjfXrTOE.js} +1 -1
  67. package/dist/{Register-B0Vx60wY.js → Register-BG-3_Q2E.js} +55 -54
  68. package/dist/RichText-C88f59ao.js +47 -0
  69. package/dist/{SearchForm-BHVnQaSL.js → SearchForm-C0zqD7UP.js} +1 -1
  70. package/dist/{SearchForm.vue_vue_type_style_index_0_lang-ByICIL6w.js → SearchForm.vue_vue_type_style_index_0_lang-Bv1_VqSl.js} +46 -45
  71. package/dist/{SearchHeader-C9yovXli.js → SearchHeader-e2LOidgU.js} +1 -1
  72. package/dist/{SearchHeader.vue_vue_type_style_index_0_lang-CHAg97-Y.js → SearchHeader.vue_vue_type_style_index_0_lang-DebuWiG6.js} +1 -1
  73. package/dist/{Select-vgwpegBi.js → Select-CfIvGDPS.js} +21 -20
  74. package/dist/{Select-CX4i5KPQ.js → Select-CvP_zGxM.js} +1 -1
  75. package/dist/{Select-BDoCqD3I.js → Select-Cz6MPDCC.js} +11 -10
  76. package/dist/{Single-C3629BdC.js → Single-p-8OfzhQ.js} +101 -100
  77. package/dist/{Statistic-WPezAlUn.js → Statistic-BIKfbZCI.js} +32 -31
  78. package/dist/{Stock-EPM3j2f_.js → Stock-B7RP-SuF.js} +1 -1
  79. package/dist/{Stock-BD5Acf8y.js → Stock-BhOP8J0c.js} +1 -1
  80. package/dist/{Stock.vue_vue_type_style_index_0_lang-D5RR2MRP.js → Stock.vue_vue_type_style_index_0_lang-Dpw8BlLu.js} +20 -19
  81. package/dist/{Switch-B0XN4K-9.js → Switch-BcDhe4_E.js} +1 -1
  82. package/dist/{Table-BklK1hSh.js → Table-Cy7FarYr.js} +71 -70
  83. package/dist/{Table-JFdOXuME.js → Table-DK-TaejU.js} +58 -57
  84. package/dist/Text-B580p9od.js +49 -0
  85. package/dist/Text-D89aQLxL.js +4 -0
  86. package/dist/{Text-DrJkdxZF.js → Text-YNB0It4-.js} +13 -12
  87. package/dist/Text.vue_vue_type_style_index_0_lang-Dokzd_qM.js +59 -0
  88. package/dist/{TextLink-BnijIoEJ.js → TextLink-CI-AIgdm.js} +9 -8
  89. package/dist/{Textarea-3SWLqQvO.js → Textarea-86C9lCtg.js} +1 -1
  90. package/dist/{Time-C3qlNZkJ.js → Time-BgArfSc6.js} +10 -9
  91. package/dist/{Timeline-B6hUIYhL.js → Timeline-O_jWjdxT.js} +19 -13
  92. package/dist/{Tree-JexLPBXX.js → Tree-BfFRW-xZ.js} +41 -35
  93. package/dist/{Tree-DBvFF4Rj.js → Tree-DayADkaC.js} +73 -72
  94. package/dist/{TreeNode-BOWB2WN9.js → TreeNode-BZp8w6M5.js} +10 -9
  95. package/dist/{Update-CDLYYwgj.js → Update-Bcdz87R4.js} +6 -5
  96. package/dist/{UpdateChild-DUG7pAuO.js → UpdateChild-YzPMnj_r.js} +20 -19
  97. package/dist/{Upload-B2hbxDsT.js → Upload-DU5VOqXj.js} +47 -46
  98. package/dist/Upload-Dj5nSsug.js +71 -0
  99. package/dist/{Year-BUF60NmB.js → Year-B3E0kOiA.js} +8 -7
  100. package/dist/{Year-BRsJ7b1J.js → Year-CcbzIuwy.js} +1 -1
  101. package/dist/assets/{clipboard-ClN4QccS.js → clipboard-DjQPoCBJ.js} +3 -1
  102. package/dist/assets/clone-BZn0cTAu.js +134 -0
  103. package/dist/assets/file-saver-CwlpTZSc.js +74 -0
  104. package/dist/assets/liquidjs-BfOWWjtJ.js +2907 -0
  105. package/dist/assets/moment-h96o7c8I.js +2578 -0
  106. package/dist/assets/sprintf-js-BPTdvBYM.js +148 -0
  107. package/dist/assets/underscore-B0BCaBxV.js +1070 -0
  108. package/dist/assets/underscore.string-DVXD2SZo.js +425 -0
  109. package/dist/assets/util-deprecate-Dzun97re.js +28 -0
  110. package/dist/main-DxH9UW19.js +10723 -0
  111. package/dist/main.js +60 -59
  112. package/dist/style.css +1 -1
  113. package/esm/coms/drivers/@types/CrudProps.d.ts +2 -2
  114. package/package.json +1 -1
  115. package/dist/Autocomplete-BfhYwZ5G.js +0 -49
  116. package/dist/Callback-Ci5KrWOC.js +0 -20
  117. package/dist/Cascader-CnOEgPDf.js +0 -41
  118. package/dist/Code-BEjqqeFZ.js +0 -54
  119. package/dist/Code-BSrEPuXk.js +0 -4
  120. package/dist/Code-Dp1-k8sW.js +0 -36
  121. package/dist/Code.vue_vue_type_style_index_0_lang-CmkomJXY.js +0 -59
  122. package/dist/Column-B0ViSver.js +0 -69
  123. package/dist/Copy-Dm1LH9qB.js +0 -43
  124. package/dist/Custom-CLKAPWEo.js +0 -49
  125. package/dist/Image-BrelhCGo.js +0 -9
  126. package/dist/Index-BeM6hKX9.js +0 -4
  127. package/dist/Index-BkfLyqpm.js +0 -173
  128. package/dist/Index-D8UVsXwf.js +0 -4
  129. package/dist/Index-FL-dxfFB.js +0 -4
  130. package/dist/Index-fWOqfFkG.js +0 -4
  131. package/dist/List-kRCsHp6d.js +0 -71
  132. package/dist/Maintaince-BG8MUi3A.js +0 -14
  133. package/dist/Month-B1icZmL4.js +0 -37
  134. package/dist/RichText-4wrLw9cy.js +0 -41
  135. package/dist/Text-CNtHdodK.js +0 -4
  136. package/dist/Text-KAuEjP7I.js +0 -48
  137. package/dist/Text.vue_vue_type_style_index_0_lang-BJIbv4kF.js +0 -53
  138. package/dist/Upload-mlk6Y4Po.js +0 -65
  139. package/dist/main-DymfKjqO.js +0 -16480
@@ -0,0 +1,2907 @@
1
+ class F {
2
+ constructor(e, s, r, i, n) {
3
+ this.kind = e, this.input = s, this.begin = r, this.end = i, this.file = n;
4
+ }
5
+ getText() {
6
+ return this.input.slice(this.begin, this.end);
7
+ }
8
+ getPosition() {
9
+ let [e, s] = [1, 1];
10
+ for (let r = 0; r < this.begin; r++)
11
+ this.input[r] === `
12
+ ` ? (e++, s = 1) : s++;
13
+ return [e, s];
14
+ }
15
+ size() {
16
+ return this.end - this.begin;
17
+ }
18
+ }
19
+ class V {
20
+ liquidMethodMissing(e) {
21
+ }
22
+ }
23
+ const pt = Object.prototype.toString, be = String.prototype.toLowerCase, ce = Object.hasOwnProperty;
24
+ function _(t) {
25
+ return typeof t == "string";
26
+ }
27
+ function w(t) {
28
+ return typeof t == "function";
29
+ }
30
+ function gt(t) {
31
+ return t && w(t.then);
32
+ }
33
+ function X(t) {
34
+ return t && w(t.next) && w(t.throw) && w(t.return);
35
+ }
36
+ function mt(t) {
37
+ return t.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
38
+ }
39
+ function c(t) {
40
+ return t = d(t), _(t) ? t : v(t) ? "" : k(t) ? t.map((e) => c(e)).join("") : String(t);
41
+ }
42
+ function ue(t) {
43
+ return t = d(t), k(t) ? t : _(t) && t.length > 0 ? [t] : wt(t) ? Array.from(t) : te(t) ? Object.keys(t).map((e) => [e, t[e]]) : [];
44
+ }
45
+ function T(t) {
46
+ return t = d(t), v(t) ? [] : k(t) ? t : [t];
47
+ }
48
+ function d(t) {
49
+ return t instanceof V && w(t.valueOf) ? t.valueOf() : t;
50
+ }
51
+ function xe(t) {
52
+ return t = Number(t), isNaN(t) ? 0 : t;
53
+ }
54
+ function de(t) {
55
+ return typeof t == "number";
56
+ }
57
+ function He(t) {
58
+ return t && w(t.toLiquid) ? He(t.toLiquid()) : t;
59
+ }
60
+ function v(t) {
61
+ return t == null;
62
+ }
63
+ function yt(t) {
64
+ return t === void 0;
65
+ }
66
+ function k(t) {
67
+ return pt.call(t) === "[object Array]";
68
+ }
69
+ function wt(t) {
70
+ return te(t) && Symbol.iterator in t;
71
+ }
72
+ function _e(t, e) {
73
+ t = t || {};
74
+ for (const s in t)
75
+ if (ce.call(t, s) && e(t[s], s, t) === !1)
76
+ break;
77
+ return t;
78
+ }
79
+ function We(t) {
80
+ return t[t.length - 1];
81
+ }
82
+ function te(t) {
83
+ const e = typeof t;
84
+ return t !== null && (e === "object" || e === "function");
85
+ }
86
+ function Ye(t, e, s = 1) {
87
+ const r = [];
88
+ for (let i = t; i < e; i += s)
89
+ r.push(i);
90
+ return r;
91
+ }
92
+ function J(t, e, s = " ") {
93
+ return Je(t, e, s, (r, i) => i + r);
94
+ }
95
+ function Tt(t, e, s = " ") {
96
+ return Je(t, e, s, (r, i) => r + i);
97
+ }
98
+ function Je(t, e, s, r) {
99
+ t = String(t);
100
+ let i = e - t.length;
101
+ for (; i-- > 0; )
102
+ t = r(t, s);
103
+ return t;
104
+ }
105
+ function Qe(t) {
106
+ return t;
107
+ }
108
+ function kt(t) {
109
+ return [...t].some((s) => s >= "a" && s <= "z") ? t.toUpperCase() : t.toLowerCase();
110
+ }
111
+ function bt(t, e) {
112
+ return t.length > e ? t.slice(0, e - 3) + "..." : t;
113
+ }
114
+ function ve(t, e) {
115
+ return t == null && e == null ? 0 : t == null ? 1 : e == null || (t = be.call(t), e = be.call(e), t < e) ? -1 : t > e ? 1 : 0;
116
+ }
117
+ function x(t) {
118
+ return function(...e) {
119
+ return t.call(this, ...e.map(d));
120
+ };
121
+ }
122
+ function fe(t) {
123
+ return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
124
+ }
125
+ const Le = "__liquidClass__";
126
+ class B extends Error {
127
+ constructor(e, s) {
128
+ super(typeof e == "string" ? e : e.message), this.context = "", typeof e != "string" && Object.defineProperty(this, "originalError", { value: e, enumerable: !1 }), Object.defineProperty(this, "token", { value: s, enumerable: !1 }), Object.defineProperty(this, Le, { value: "LiquidError", enumerable: !1 });
129
+ }
130
+ update() {
131
+ Object.defineProperty(this, "context", { value: Ot(this.token), enumerable: !1 }), this.message = Rt(this.message, this.token), this.stack = this.message + `
132
+ ` + this.context + `
133
+ ` + this.stack, this.originalError && (this.stack += `
134
+ From ` + this.originalError.stack);
135
+ }
136
+ static is(e) {
137
+ return (e == null ? void 0 : e[Le]) === "LiquidError";
138
+ }
139
+ }
140
+ class xt extends B {
141
+ constructor(e, s) {
142
+ super(e, s), this.name = "TokenizationError", super.update();
143
+ }
144
+ }
145
+ class _t extends B {
146
+ constructor(e, s) {
147
+ super(e, s), this.name = "ParseError", this.message = e.message, super.update();
148
+ }
149
+ }
150
+ class vt extends B {
151
+ constructor(e, s) {
152
+ super(e, s.token), this.name = "RenderError", this.message = e.message, super.update();
153
+ }
154
+ static is(e) {
155
+ return e.name === "RenderError";
156
+ }
157
+ }
158
+ class Ze extends B {
159
+ constructor(e) {
160
+ super(e[0], e[0].token), this.errors = e, this.name = "LiquidErrors";
161
+ const s = e.length > 1 ? "s" : "";
162
+ this.message = `${e.length} error${s} found`, super.update();
163
+ }
164
+ static is(e) {
165
+ return e.name === "LiquidErrors";
166
+ }
167
+ }
168
+ class Lt extends B {
169
+ constructor(e, s) {
170
+ super(e, s), this.name = "UndefinedVariableError", this.message = e.message, super.update();
171
+ }
172
+ }
173
+ class Ft extends Error {
174
+ constructor(e) {
175
+ super(`undefined variable: ${e}`), this.name = "InternalUndefinedVariableError", this.variableName = e;
176
+ }
177
+ }
178
+ class St extends Error {
179
+ constructor(e) {
180
+ super(e), this.name = "AssertionError", this.message = e + "";
181
+ }
182
+ }
183
+ function Ot(t) {
184
+ const [e, s] = t.getPosition(), r = t.input.split(`
185
+ `), i = Math.max(e - 2, 1), n = Math.min(e + 3, r.length);
186
+ return Ye(i, n + 1).map((a) => {
187
+ const l = a === e ? ">> " : " ", h = J(String(a), String(n).length);
188
+ let u = `${l}${h}| `;
189
+ const p = a === e ? `
190
+ ` + J("^", s + u.length) : "";
191
+ return u += r[a - 1], u += p, u;
192
+ }).join(`
193
+ `);
194
+ }
195
+ function Rt(t, e) {
196
+ e.file && (t += `, file:${e.file}`);
197
+ const [s, r] = e.getPosition();
198
+ return t += `, line:${s}, col:${r}`, t;
199
+ }
200
+ const f = [0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 4, 4, 4, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 2, 8, 0, 0, 0, 0, 8, 0, 0, 0, 64, 0, 65, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 2, 2, 2, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0], Et = 1, H = 4, Fe = 8, Ge = 16, zt = 32, Nt = 64, Dt = 128;
201
+ function Q(t) {
202
+ const e = t.charCodeAt(0);
203
+ return e >= 128 ? !f[e] : !!(f[e] & Et);
204
+ }
205
+ f[160] = f[5760] = f[6158] = f[8192] = f[8193] = f[8194] = f[8195] = f[8196] = f[8197] = f[8198] = f[8199] = f[8200] = f[8201] = f[8202] = f[8232] = f[8233] = f[8239] = f[8287] = f[12288] = H;
206
+ f[8220] = f[8221] = Dt;
207
+ function b(t, e) {
208
+ if (!t) {
209
+ const s = typeof e == "function" ? e() : e || `expect ${t} to be true`;
210
+ throw new St(s);
211
+ }
212
+ }
213
+ function K(t, e = `unexpected ${JSON.stringify(t)}`) {
214
+ b(!t, e);
215
+ }
216
+ class qt extends V {
217
+ equals(e) {
218
+ return v(d(e));
219
+ }
220
+ gt() {
221
+ return !1;
222
+ }
223
+ geq() {
224
+ return !1;
225
+ }
226
+ lt() {
227
+ return !1;
228
+ }
229
+ leq() {
230
+ return !1;
231
+ }
232
+ valueOf() {
233
+ return null;
234
+ }
235
+ }
236
+ class se extends V {
237
+ equals(e) {
238
+ return e instanceof se ? !1 : (e = d(e), _(e) || k(e) ? e.length === 0 : te(e) ? Object.keys(e).length === 0 : !1);
239
+ }
240
+ gt() {
241
+ return !1;
242
+ }
243
+ geq() {
244
+ return !1;
245
+ }
246
+ lt() {
247
+ return !1;
248
+ }
249
+ leq() {
250
+ return !1;
251
+ }
252
+ valueOf() {
253
+ return "";
254
+ }
255
+ }
256
+ class Mt extends se {
257
+ equals(e) {
258
+ return e === !1 || v(d(e)) ? !0 : _(e) ? /^\s*$/.test(e) : super.equals(e);
259
+ }
260
+ }
261
+ class pe extends V {
262
+ constructor(e, s, r) {
263
+ super(), this.i = 0, this.length = e, this.name = `${r}-${s}`;
264
+ }
265
+ next() {
266
+ this.i++;
267
+ }
268
+ index0() {
269
+ return this.i;
270
+ }
271
+ index() {
272
+ return this.i + 1;
273
+ }
274
+ first() {
275
+ return this.i === 0;
276
+ }
277
+ last() {
278
+ return this.i === this.length - 1;
279
+ }
280
+ rindex() {
281
+ return this.length - this.i;
282
+ }
283
+ rindex0() {
284
+ return this.length - this.i - 1;
285
+ }
286
+ valueOf() {
287
+ return JSON.stringify(this);
288
+ }
289
+ }
290
+ class Se extends V {
291
+ constructor(e = () => "") {
292
+ super(), this.superBlockRender = e;
293
+ }
294
+ /**
295
+ * Provide parent access in child block by
296
+ * {{ block.super }}
297
+ */
298
+ super() {
299
+ return this.superBlockRender();
300
+ }
301
+ }
302
+ function E(t) {
303
+ return t && w(t.equals) && w(t.gt) && w(t.geq) && w(t.lt) && w(t.leq);
304
+ }
305
+ const Oe = new qt(), Xe = {
306
+ true: !0,
307
+ false: !1,
308
+ nil: Oe,
309
+ null: Oe,
310
+ empty: new se(),
311
+ blank: new Mt()
312
+ };
313
+ function Re(t) {
314
+ const e = {};
315
+ for (const [s, r] of Object.entries(t)) {
316
+ let i = e;
317
+ for (let n = 0; n < s.length; n++) {
318
+ const o = s[n];
319
+ i[o] = i[o] || {}, n === s.length - 1 && Q(s[n]) && (i[o].needBoundary = !0), i = i[o];
320
+ }
321
+ i.data = r, i.end = !0;
322
+ }
323
+ return e;
324
+ }
325
+ var ee = function() {
326
+ return ee = Object.assign || function(e) {
327
+ for (var s, r = 1, i = arguments.length; r < i; r++) {
328
+ s = arguments[r];
329
+ for (var n in s) Object.prototype.hasOwnProperty.call(s, n) && (e[n] = s[n]);
330
+ }
331
+ return e;
332
+ }, ee.apply(this, arguments);
333
+ };
334
+ function O(t, e, s, r) {
335
+ function i(n) {
336
+ return n instanceof s ? n : new s(function(o) {
337
+ o(n);
338
+ });
339
+ }
340
+ return new (s || (s = Promise))(function(n, o) {
341
+ function a(u) {
342
+ try {
343
+ h(r.next(u));
344
+ } catch (p) {
345
+ o(p);
346
+ }
347
+ }
348
+ function l(u) {
349
+ try {
350
+ h(r.throw(u));
351
+ } catch (p) {
352
+ o(p);
353
+ }
354
+ }
355
+ function h(u) {
356
+ u.done ? n(u.value) : i(u.value).then(a, l);
357
+ }
358
+ h((r = r.apply(t, [])).next());
359
+ });
360
+ }
361
+ function N(t) {
362
+ return O(this, void 0, void 0, function* () {
363
+ if (!X(t))
364
+ return t;
365
+ let e, s = !1, r = "next";
366
+ do {
367
+ const i = t[r](e);
368
+ s = i.done, e = i.value, r = "next";
369
+ try {
370
+ X(e) && (e = N(e)), gt(e) && (e = yield e);
371
+ } catch (n) {
372
+ r = "throw", e = n;
373
+ }
374
+ } while (!s);
375
+ return e;
376
+ });
377
+ }
378
+ function D(t) {
379
+ if (!X(t))
380
+ return t;
381
+ let e, s = !1, r = "next";
382
+ do {
383
+ const i = t[r](e);
384
+ if (s = i.done, e = i.value, r = "next", X(e))
385
+ try {
386
+ e = D(e);
387
+ } catch (n) {
388
+ r = "throw", e = n;
389
+ }
390
+ } while (!s);
391
+ return e;
392
+ }
393
+ const It = /%([-_0^#:]+)?(\d+)?([EO])?(.)/;
394
+ function $t(t) {
395
+ return [31, Pt(t) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
396
+ }
397
+ function Ke(t) {
398
+ let e = 0;
399
+ for (let s = 0; s < t.getMonth(); ++s)
400
+ e += $t(t)[s];
401
+ return e + t.getDate();
402
+ }
403
+ function Ee(t, e) {
404
+ const s = Ke(t) + (e - t.getDay()), i = 7 - new Date(t.getFullYear(), 0, 1).getDay() + e;
405
+ return String(Math.floor((s - i) / 7) + 1);
406
+ }
407
+ function Pt(t) {
408
+ const e = t.getFullYear();
409
+ return !!(!(e & 3) && (e % 100 || e % 400 === 0 && e));
410
+ }
411
+ function Ct(t) {
412
+ const e = t.getDate();
413
+ if ([11, 12, 13].includes(e))
414
+ return "th";
415
+ switch (e % 10) {
416
+ case 1:
417
+ return "st";
418
+ case 2:
419
+ return "nd";
420
+ case 3:
421
+ return "rd";
422
+ default:
423
+ return "th";
424
+ }
425
+ }
426
+ function At(t) {
427
+ return parseInt(t.getFullYear().toString().substring(0, 2), 10);
428
+ }
429
+ const Vt = {
430
+ d: 2,
431
+ e: 2,
432
+ H: 2,
433
+ I: 2,
434
+ j: 3,
435
+ k: 2,
436
+ l: 2,
437
+ L: 3,
438
+ m: 2,
439
+ M: 2,
440
+ S: 2,
441
+ U: 2,
442
+ W: 2
443
+ }, Bt = new Set("aAbBceklpP");
444
+ function ze(t, e) {
445
+ const s = Math.abs(t.getTimezoneOffset()), r = Math.floor(s / 60), i = s % 60;
446
+ return (t.getTimezoneOffset() > 0 ? "-" : "+") + J(r, 2, "0") + (e.flags[":"] ? ":" : "") + J(i, 2, "0");
447
+ }
448
+ const le = {
449
+ a: (t) => t.getShortWeekdayName(),
450
+ A: (t) => t.getLongWeekdayName(),
451
+ b: (t) => t.getShortMonthName(),
452
+ B: (t) => t.getLongMonthName(),
453
+ c: (t) => t.toLocaleString(),
454
+ C: (t) => At(t),
455
+ d: (t) => t.getDate(),
456
+ e: (t) => t.getDate(),
457
+ H: (t) => t.getHours(),
458
+ I: (t) => String(t.getHours() % 12 || 12),
459
+ j: (t) => Ke(t),
460
+ k: (t) => t.getHours(),
461
+ l: (t) => String(t.getHours() % 12 || 12),
462
+ L: (t) => t.getMilliseconds(),
463
+ m: (t) => t.getMonth() + 1,
464
+ M: (t) => t.getMinutes(),
465
+ N: (t, e) => {
466
+ const s = Number(e.width) || 9, r = String(t.getMilliseconds()).slice(0, s);
467
+ return Tt(r, s, "0");
468
+ },
469
+ p: (t) => t.getHours() < 12 ? "AM" : "PM",
470
+ P: (t) => t.getHours() < 12 ? "am" : "pm",
471
+ q: (t) => Ct(t),
472
+ s: (t) => Math.round(t.getTime() / 1e3),
473
+ S: (t) => t.getSeconds(),
474
+ u: (t) => t.getDay() || 7,
475
+ U: (t) => Ee(t, 0),
476
+ w: (t) => t.getDay(),
477
+ W: (t) => Ee(t, 1),
478
+ x: (t) => t.toLocaleDateString(),
479
+ X: (t) => t.toLocaleTimeString(),
480
+ y: (t) => t.getFullYear().toString().slice(2, 4),
481
+ Y: (t) => t.getFullYear(),
482
+ z: ze,
483
+ Z: (t, e) => t.getTimeZoneName() || ze(t, e),
484
+ t: () => " ",
485
+ n: () => `
486
+ `,
487
+ "%": () => "%"
488
+ };
489
+ le.h = le.b;
490
+ function Z(t, e) {
491
+ let s = "", r = e, i;
492
+ for (; i = It.exec(r); )
493
+ s += r.slice(0, i.index), r = r.slice(i.index + i[0].length), s += jt(t, i);
494
+ return s + r;
495
+ }
496
+ function jt(t, e) {
497
+ const [s, r = "", i, n, o] = e, a = le[o];
498
+ if (!a)
499
+ return s;
500
+ const l = {};
501
+ for (const S of r)
502
+ l[S] = !0;
503
+ let h = String(a(t, { flags: l, width: i, modifier: n })), u = Bt.has(o) ? " " : "0", p = i || Vt[o] || 0;
504
+ return l["^"] ? h = h.toUpperCase() : l["#"] && (h = kt(h)), l._ ? u = " " : l[0] && (u = "0"), l["-"] && (p = 0), J(h, p, u);
505
+ }
506
+ function et() {
507
+ return typeof Intl < "u" ? Intl.DateTimeFormat : void 0;
508
+ }
509
+ const Ut = 6e4, Ht = /([zZ]|([+-])(\d{2}):(\d{2}))$/, tt = [
510
+ "January",
511
+ "February",
512
+ "March",
513
+ "April",
514
+ "May",
515
+ "June",
516
+ "July",
517
+ "August",
518
+ "September",
519
+ "October",
520
+ "November",
521
+ "December"
522
+ ], Wt = tt.map((t) => t.slice(0, 3)), st = [
523
+ "Sunday",
524
+ "Monday",
525
+ "Tuesday",
526
+ "Wednesday",
527
+ "Thursday",
528
+ "Friday",
529
+ "Saturday"
530
+ ], Yt = st.map((t) => t.slice(0, 3));
531
+ class R {
532
+ constructor(e, s, r) {
533
+ this.locale = s, this.DateTimeFormat = et(), this.date = new Date(e), this.timezoneFixed = r !== void 0, r === void 0 && (r = this.date.getTimezoneOffset()), this.timezoneOffset = _(r) ? R.getTimezoneOffset(r, this.date) : r, this.timezoneName = _(r) ? r : "";
534
+ const i = (this.date.getTimezoneOffset() - this.timezoneOffset) * Ut, n = this.date.getTime() + i;
535
+ this.displayDate = new Date(n);
536
+ }
537
+ getTime() {
538
+ return this.displayDate.getTime();
539
+ }
540
+ getMilliseconds() {
541
+ return this.displayDate.getMilliseconds();
542
+ }
543
+ getSeconds() {
544
+ return this.displayDate.getSeconds();
545
+ }
546
+ getMinutes() {
547
+ return this.displayDate.getMinutes();
548
+ }
549
+ getHours() {
550
+ return this.displayDate.getHours();
551
+ }
552
+ getDay() {
553
+ return this.displayDate.getDay();
554
+ }
555
+ getDate() {
556
+ return this.displayDate.getDate();
557
+ }
558
+ getMonth() {
559
+ return this.displayDate.getMonth();
560
+ }
561
+ getFullYear() {
562
+ return this.displayDate.getFullYear();
563
+ }
564
+ toLocaleString(e, s) {
565
+ return s != null && s.timeZone ? this.date.toLocaleString(e, s) : this.displayDate.toLocaleString(e, s);
566
+ }
567
+ toLocaleTimeString(e) {
568
+ return this.displayDate.toLocaleTimeString(e);
569
+ }
570
+ toLocaleDateString(e) {
571
+ return this.displayDate.toLocaleDateString(e);
572
+ }
573
+ getTimezoneOffset() {
574
+ return this.timezoneOffset;
575
+ }
576
+ getTimeZoneName() {
577
+ if (this.timezoneFixed)
578
+ return this.timezoneName;
579
+ if (this.DateTimeFormat)
580
+ return this.DateTimeFormat().resolvedOptions().timeZone;
581
+ }
582
+ getLongMonthName() {
583
+ var e;
584
+ return (e = this.format({ month: "long" })) !== null && e !== void 0 ? e : tt[this.getMonth()];
585
+ }
586
+ getShortMonthName() {
587
+ var e;
588
+ return (e = this.format({ month: "short" })) !== null && e !== void 0 ? e : Wt[this.getMonth()];
589
+ }
590
+ getLongWeekdayName() {
591
+ var e;
592
+ return (e = this.format({ weekday: "long" })) !== null && e !== void 0 ? e : st[this.displayDate.getDay()];
593
+ }
594
+ getShortWeekdayName() {
595
+ var e;
596
+ return (e = this.format({ weekday: "short" })) !== null && e !== void 0 ? e : Yt[this.displayDate.getDay()];
597
+ }
598
+ valid() {
599
+ return !isNaN(this.getTime());
600
+ }
601
+ format(e) {
602
+ return this.DateTimeFormat && this.DateTimeFormat(this.locale, e).format(this.displayDate);
603
+ }
604
+ /**
605
+ * Create a Date object fixed to it's declared Timezone. Both
606
+ * - 2021-08-06T02:29:00.000Z and
607
+ * - 2021-08-06T02:29:00.000+08:00
608
+ * will always be displayed as
609
+ * - 2021-08-06 02:29:00
610
+ * regardless timezoneOffset in JavaScript realm
611
+ *
612
+ * The implementation hack:
613
+ * Instead of calling `.getMonth()`/`.getUTCMonth()` respect to `preserveTimezones`,
614
+ * we create a different Date to trick strftime, it's both simpler and more performant.
615
+ * Given that a template is expected to be parsed fewer times than rendered.
616
+ */
617
+ static createDateFixedToTimezone(e, s) {
618
+ const r = e.match(Ht);
619
+ if (r && r[1] === "Z")
620
+ return new R(+new Date(e), s, 0);
621
+ if (r && r[2] && r[3] && r[4]) {
622
+ const [, , i, n, o] = r, a = (i === "+" ? -1 : 1) * (parseInt(n, 10) * 60 + parseInt(o, 10));
623
+ return new R(+new Date(e), s, a);
624
+ }
625
+ return new R(e, s);
626
+ }
627
+ static getTimezoneOffset(e, s) {
628
+ const r = s.toLocaleString("en-US", { timeZone: e }), i = s.toLocaleString("en-US", { timeZone: "UTC" }), n = new Date(r);
629
+ return (+new Date(i) - +n) / (60 * 1e3);
630
+ }
631
+ }
632
+ class he {
633
+ constructor(e, s) {
634
+ this.base = 0, this.message = `${e} limit exceeded`, this.limit = s;
635
+ }
636
+ use(e) {
637
+ e = xe(e), b(this.base + e <= this.limit, this.message), this.base += e;
638
+ }
639
+ check(e) {
640
+ e = xe(e), b(e <= this.limit, this.message);
641
+ }
642
+ }
643
+ class ge extends F {
644
+ constructor(e, [s, r], i, n, o, a, l, h) {
645
+ super(e, i, n, o, h), this.trimLeft = !1, this.trimRight = !1;
646
+ const u = i[s] === "-", p = i[r - 1] === "-";
647
+ let S = u ? s + 1 : s, Y = p ? r - 1 : r;
648
+ for (; S < Y && f[i.charCodeAt(S)] & H; )
649
+ S++;
650
+ for (; Y > S && f[i.charCodeAt(Y - 1)] & H; )
651
+ Y--;
652
+ this.contentRange = [S, Y], this.trimLeft = u || a, this.trimRight = p || l;
653
+ }
654
+ get content() {
655
+ return this.input.slice(this.contentRange[0], this.contentRange[1]);
656
+ }
657
+ }
658
+ class Ne extends ge {
659
+ constructor(e, s, r, i, n) {
660
+ const { trimTagLeft: o, trimTagRight: a, tagDelimiterLeft: l, tagDelimiterRight: h } = i, [u, p] = [s + l.length, r - h.length];
661
+ super(g.Tag, [u, p], e, s, r, o, a, n), this.tokenizer = new z(e, i.operators, n, this.contentRange), this.name = this.tokenizer.readTagName(), this.tokenizer.assert(this.name, "illegal tag syntax, tag name expected"), this.tokenizer.skipBlank();
662
+ }
663
+ get args() {
664
+ return this.tokenizer.input.slice(this.tokenizer.p, this.contentRange[1]);
665
+ }
666
+ }
667
+ class Jt extends ge {
668
+ constructor(e, s, r, i, n) {
669
+ const { trimOutputLeft: o, trimOutputRight: a, outputDelimiterLeft: l, outputDelimiterRight: h } = i, u = [s + l.length, r - h.length];
670
+ super(g.Output, u, e, s, r, o, a, n);
671
+ }
672
+ }
673
+ class De extends F {
674
+ constructor(e, s, r, i) {
675
+ super(g.HTML, e, s, r, i), this.input = e, this.begin = s, this.end = r, this.file = i, this.trimLeft = 0, this.trimRight = 0;
676
+ }
677
+ getContent() {
678
+ return this.input.slice(this.begin + this.trimLeft, this.end - this.trimRight);
679
+ }
680
+ }
681
+ class Qt extends F {
682
+ constructor(e, s, r, i) {
683
+ super(g.Number, e, s, r, i), this.input = e, this.begin = s, this.end = r, this.file = i, this.content = Number(this.getText());
684
+ }
685
+ }
686
+ class ne extends F {
687
+ constructor(e, s, r, i) {
688
+ super(g.Word, e, s, r, i), this.input = e, this.begin = s, this.end = r, this.file = i, this.content = this.getText();
689
+ }
690
+ }
691
+ class Zt extends F {
692
+ constructor(e, s, r, i) {
693
+ super(g.Literal, e, s, r, i), this.input = e, this.begin = s, this.end = r, this.file = i, this.literal = this.getText(), this.content = Xe[this.literal];
694
+ }
695
+ }
696
+ const qe = {
697
+ "==": 2,
698
+ "!=": 2,
699
+ ">": 2,
700
+ "<": 2,
701
+ ">=": 2,
702
+ "<=": 2,
703
+ contains: 2,
704
+ not: 1,
705
+ and: 0,
706
+ or: 0
707
+ }, Gt = {
708
+ "==": 0,
709
+ "!=": 0,
710
+ ">": 0,
711
+ "<": 0,
712
+ ">=": 0,
713
+ "<=": 0,
714
+ contains: 0,
715
+ not: 1,
716
+ and: 0,
717
+ or: 0
718
+ /* OperatorType.Binary */
719
+ };
720
+ class Xt extends F {
721
+ constructor(e, s, r, i) {
722
+ super(g.Operator, e, s, r, i), this.input = e, this.begin = s, this.end = r, this.file = i, this.operator = this.getText();
723
+ }
724
+ getPrecedence() {
725
+ const e = this.getText();
726
+ return e in qe ? qe[e] : 1;
727
+ }
728
+ }
729
+ class Me extends F {
730
+ constructor(e, s, r, i, n, o) {
731
+ super(g.PropertyAccess, r, i, n, o), this.variable = e, this.props = s;
732
+ }
733
+ }
734
+ class rt extends F {
735
+ constructor(e, s, r, i, n, o) {
736
+ super(g.Filter, r, i, n, o), this.name = e, this.args = s;
737
+ }
738
+ }
739
+ class Kt extends F {
740
+ constructor(e, s, r, i, n, o) {
741
+ super(g.Hash, e, s, r, o), this.input = e, this.begin = s, this.end = r, this.name = i, this.value = n, this.file = o;
742
+ }
743
+ }
744
+ const es = /[\da-fA-F]/, Ie = /[0-7]/, $e = {
745
+ b: "\b",
746
+ f: "\f",
747
+ n: `
748
+ `,
749
+ r: "\r",
750
+ t: " ",
751
+ v: "\v"
752
+ };
753
+ function Pe(t) {
754
+ const e = t.charCodeAt(0);
755
+ return e >= 97 ? e - 87 : e >= 65 ? e - 55 : e - 48;
756
+ }
757
+ function ts(t) {
758
+ let e = "";
759
+ for (let s = 1; s < t.length - 1; s++) {
760
+ if (t[s] !== "\\") {
761
+ e += t[s];
762
+ continue;
763
+ }
764
+ if ($e[t[s + 1]] !== void 0)
765
+ e += $e[t[++s]];
766
+ else if (t[s + 1] === "u") {
767
+ let r = 0, i = s + 2;
768
+ for (; i <= s + 5 && es.test(t[i]); )
769
+ r = r * 16 + Pe(t[i++]);
770
+ s = i - 1, e += String.fromCharCode(r);
771
+ } else if (!Ie.test(t[s + 1]))
772
+ e += t[++s];
773
+ else {
774
+ let r = s + 1, i = 0;
775
+ for (; r <= s + 3 && Ie.test(t[r]); )
776
+ i = i * 8 + Pe(t[r++]);
777
+ s = r - 1, e += String.fromCharCode(i);
778
+ }
779
+ }
780
+ return e;
781
+ }
782
+ class ss extends F {
783
+ constructor(e, s, r, i) {
784
+ super(g.Quoted, e, s, r, i), this.input = e, this.begin = s, this.end = r, this.file = i, this.content = ts(this.getText());
785
+ }
786
+ }
787
+ class rs extends F {
788
+ constructor(e, s, r, i, n, o) {
789
+ super(g.Range, e, s, r, o), this.input = e, this.begin = s, this.end = r, this.lhs = i, this.rhs = n, this.file = o;
790
+ }
791
+ }
792
+ class is extends ge {
793
+ constructor(e, s, r, i, n) {
794
+ super(g.Tag, [s, r], e, s, r, !1, !1, n), this.tokenizer = new z(e, i.operators, n, this.contentRange), this.name = this.tokenizer.readTagName(), this.tokenizer.assert(this.name, "illegal liquid tag syntax"), this.tokenizer.skipBlank(), this.args = this.tokenizer.remaining();
795
+ }
796
+ }
797
+ class ns extends F {
798
+ constructor(e, s, r, i, n, o) {
799
+ super(g.FilteredValue, r, i, n, o), this.initial = e, this.filters = s, this.input = r, this.begin = i, this.end = n, this.file = o;
800
+ }
801
+ }
802
+ const os = {
803
+ now: () => Date.now()
804
+ };
805
+ function it() {
806
+ return typeof global == "object" && global.performance || typeof window == "object" && window.performance || os;
807
+ }
808
+ class as {
809
+ constructor() {
810
+ this.buffer = "";
811
+ }
812
+ write(e) {
813
+ this.buffer += c(e);
814
+ }
815
+ }
816
+ class ls {
817
+ constructor() {
818
+ throw this.buffer = "", this.stream = null, new Error("streaming not supported in browser");
819
+ }
820
+ }
821
+ class hs {
822
+ constructor() {
823
+ this.buffer = "";
824
+ }
825
+ write(e) {
826
+ e = d(e), typeof e != "string" && this.buffer === "" ? this.buffer = e : this.buffer = c(this.buffer) + c(e);
827
+ }
828
+ }
829
+ class cs {
830
+ renderTemplatesToNodeStream(e, s) {
831
+ const r = new ls();
832
+ return Promise.resolve().then(() => N(this.renderTemplates(e, s, r))).then(() => r.end(), (i) => r.error(i)), r.stream;
833
+ }
834
+ *renderTemplates(e, s, r) {
835
+ r || (r = s.opts.keepOutputType ? new hs() : new as());
836
+ const i = [];
837
+ for (const n of e) {
838
+ s.renderLimit.check(it().now());
839
+ try {
840
+ const o = yield n.render(s, r);
841
+ if (o && r.write(o), r.break || r.continue)
842
+ break;
843
+ } catch (o) {
844
+ const a = B.is(o) ? o : new vt(o, n);
845
+ if (s.opts.catchAllErrors)
846
+ i.push(a);
847
+ else
848
+ throw a;
849
+ }
850
+ }
851
+ if (i.length)
852
+ throw new Ze(i);
853
+ return r.buffer;
854
+ }
855
+ }
856
+ class us {
857
+ constructor(e) {
858
+ this.postfix = [...ps(e)];
859
+ }
860
+ *evaluate(e, s) {
861
+ b(e, "unable to evaluate: context not defined");
862
+ const r = [];
863
+ for (const i of this.postfix)
864
+ if (ht(i)) {
865
+ const n = r.pop();
866
+ let o;
867
+ if (Gt[i.operator] === 1)
868
+ o = yield e.opts.operators[i.operator](n, e);
869
+ else {
870
+ const a = r.pop();
871
+ o = yield e.opts.operators[i.operator](a, n, e);
872
+ }
873
+ r.push(o);
874
+ } else
875
+ r.push(yield y(i, e, s));
876
+ return r[0];
877
+ }
878
+ valid() {
879
+ return !!this.postfix.length;
880
+ }
881
+ }
882
+ function* y(t, e, s = !1) {
883
+ if (t) {
884
+ if ("content" in t)
885
+ return t.content;
886
+ if (Xs(t))
887
+ return yield ds(t, e, s);
888
+ if (Ks(t))
889
+ return yield fs(t, e);
890
+ }
891
+ }
892
+ function* ds(t, e, s) {
893
+ const r = [];
894
+ for (const i of t.props)
895
+ r.push(yield y(i, e, !1));
896
+ try {
897
+ if (t.variable) {
898
+ const i = yield y(t.variable, e, s);
899
+ return yield e._getFromScope(i, r);
900
+ } else
901
+ return yield e._get(r);
902
+ } catch (i) {
903
+ if (s && i.name === "InternalUndefinedVariableError")
904
+ return null;
905
+ throw new Lt(i, t);
906
+ }
907
+ }
908
+ function nt(t) {
909
+ return t.content;
910
+ }
911
+ function* fs(t, e) {
912
+ const s = yield y(t.lhs, e), r = yield y(t.rhs, e);
913
+ return Ye(+s, +r + 1);
914
+ }
915
+ function* ps(t) {
916
+ const e = [];
917
+ for (const s of t)
918
+ if (ht(s)) {
919
+ for (; e.length && e[e.length - 1].getPrecedence() > s.getPrecedence(); )
920
+ yield e.pop();
921
+ e.push(s);
922
+ } else
923
+ yield s;
924
+ for (; e.length; )
925
+ yield e.pop();
926
+ }
927
+ function $(t, e) {
928
+ return !re(t, e);
929
+ }
930
+ function re(t, e) {
931
+ return t = d(t), e.opts.jsTruthy ? !t : t === !1 || t === void 0 || t === null;
932
+ }
933
+ const gs = {
934
+ "==": P,
935
+ "!=": (t, e) => !P(t, e),
936
+ ">": (t, e) => E(t) ? t.gt(e) : E(e) ? e.lt(t) : d(t) > d(e),
937
+ "<": (t, e) => E(t) ? t.lt(e) : E(e) ? e.gt(t) : d(t) < d(e),
938
+ ">=": (t, e) => E(t) ? t.geq(e) : E(e) ? e.leq(t) : d(t) >= d(e),
939
+ "<=": (t, e) => E(t) ? t.leq(e) : E(e) ? e.geq(t) : d(t) <= d(e),
940
+ contains: (t, e) => (t = d(t), k(t) ? t.some((s) => P(s, e)) : w(t == null ? void 0 : t.indexOf) ? t.indexOf(d(e)) > -1 : !1),
941
+ not: (t, e) => re(d(t), e),
942
+ and: (t, e, s) => $(d(t), s) && $(d(e), s),
943
+ or: (t, e, s) => $(d(t), s) || $(d(e), s)
944
+ };
945
+ function P(t, e) {
946
+ return E(t) ? t.equals(e) : E(e) ? e.equals(t) : (t = d(t), e = d(e), k(t) ? k(e) && ms(t, e) : t === e);
947
+ }
948
+ function ms(t, e) {
949
+ return t.length !== e.length ? !1 : !t.some((s, r) => !P(s, e[r]));
950
+ }
951
+ class oe {
952
+ constructor(e, s, r, i) {
953
+ this.key = e, this.value = s, this.next = r, this.prev = i;
954
+ }
955
+ }
956
+ class Ce {
957
+ constructor(e, s = 0) {
958
+ this.limit = e, this.size = s, this.cache = {}, this.head = new oe("HEAD", null, null, null), this.tail = new oe("TAIL", null, null, null), this.head.next = this.tail, this.tail.prev = this.head;
959
+ }
960
+ write(e, s) {
961
+ if (this.cache[e])
962
+ this.cache[e].value = s;
963
+ else {
964
+ const r = new oe(e, s, this.head.next, this.head);
965
+ this.head.next.prev = r, this.head.next = r, this.cache[e] = r, this.size++, this.ensureLimit();
966
+ }
967
+ }
968
+ read(e) {
969
+ if (!this.cache[e])
970
+ return;
971
+ const { value: s } = this.cache[e];
972
+ return this.remove(e), this.write(e, s), s;
973
+ }
974
+ remove(e) {
975
+ const s = this.cache[e];
976
+ s.prev.next = s.next, s.next.prev = s.prev, delete this.cache[e], this.size--;
977
+ }
978
+ clear() {
979
+ this.head.next = this.tail, this.tail.prev = this.head, this.size = 0, this.cache = {};
980
+ }
981
+ ensureLimit() {
982
+ this.size > this.limit && this.remove(this.tail.prev.key);
983
+ }
984
+ }
985
+ function ot(t, e) {
986
+ const s = document.createElement("base");
987
+ s.href = t;
988
+ const r = document.getElementsByTagName("head")[0];
989
+ r.insertBefore(s, r.firstChild);
990
+ const i = document.createElement("a");
991
+ i.href = e;
992
+ const n = i.href;
993
+ return r.removeChild(s), n;
994
+ }
995
+ function ys(t, e, s) {
996
+ return t.length && We(t) !== "/" && (t += "/"), ot(t, e).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/, (i, n, o) => {
997
+ const a = o.split("/").pop();
998
+ return /\.\w+$/.test(a) ? i : n + o + s;
999
+ });
1000
+ }
1001
+ function ws(t) {
1002
+ return O(this, void 0, void 0, function* () {
1003
+ return new Promise((e, s) => {
1004
+ const r = new XMLHttpRequest();
1005
+ r.onload = () => {
1006
+ r.status >= 200 && r.status < 300 ? e(r.responseText) : s(new Error(r.statusText));
1007
+ }, r.onerror = () => {
1008
+ s(new Error("An error occurred whilst receiving the response."));
1009
+ }, r.open("GET", t), r.send();
1010
+ });
1011
+ });
1012
+ }
1013
+ function Ts(t) {
1014
+ const e = new XMLHttpRequest();
1015
+ if (e.open("GET", t, !1), e.send(), e.status < 200 || e.status >= 300)
1016
+ throw new Error(e.statusText);
1017
+ return e.responseText;
1018
+ }
1019
+ function ks(t) {
1020
+ return O(this, void 0, void 0, function* () {
1021
+ return !0;
1022
+ });
1023
+ }
1024
+ function bs(t) {
1025
+ return !0;
1026
+ }
1027
+ function xs(t) {
1028
+ return ot(t, ".");
1029
+ }
1030
+ const _s = "/";
1031
+ var vs = /* @__PURE__ */ Object.freeze({
1032
+ __proto__: null,
1033
+ resolve: ys,
1034
+ readFile: ws,
1035
+ readFileSync: Ts,
1036
+ exists: ks,
1037
+ existsSync: bs,
1038
+ dirname: xs,
1039
+ sep: _s
1040
+ });
1041
+ function Ls(t, e, ...s) {
1042
+ return t = d(t), k(t) || _(t) ? t.length ? t : e : t === !1 && new Map(s).get("allow_false") ? !1 : re(t, this.context) ? e : t;
1043
+ }
1044
+ function Ae(t, e = 0) {
1045
+ return JSON.stringify(t, null, e);
1046
+ }
1047
+ function Fs(t, e = 0) {
1048
+ const s = [];
1049
+ return JSON.stringify(t, function(r, i) {
1050
+ if (typeof i != "object" || i === null)
1051
+ return i;
1052
+ for (; s.length > 0 && s[s.length - 1] !== this; )
1053
+ s.pop();
1054
+ return s.includes(i) ? "[Circular]" : (s.push(i), i);
1055
+ }, e);
1056
+ }
1057
+ function Ss(t) {
1058
+ return Number(t);
1059
+ }
1060
+ const Os = {
1061
+ raw: !0,
1062
+ handler: Qe
1063
+ };
1064
+ var at = {
1065
+ default: Ls,
1066
+ raw: Os,
1067
+ jsonify: Ae,
1068
+ to_integer: Ss,
1069
+ json: Ae,
1070
+ inspect: Fs
1071
+ };
1072
+ const Rs = {
1073
+ "&": "&amp;",
1074
+ "<": "&lt;",
1075
+ ">": "&gt;",
1076
+ '"': "&#34;",
1077
+ "'": "&#39;"
1078
+ }, Es = {
1079
+ "&amp;": "&",
1080
+ "&lt;": "<",
1081
+ "&gt;": ">",
1082
+ "&#34;": '"',
1083
+ "&#39;": "'"
1084
+ };
1085
+ function ie(t) {
1086
+ return t = c(t), this.context.memoryLimit.use(t.length), t.replace(/&|<|>|"|'/g, (e) => Rs[e]);
1087
+ }
1088
+ function zs(t) {
1089
+ return ie.call(this, t);
1090
+ }
1091
+ function Ns(t) {
1092
+ return t = c(t), this.context.memoryLimit.use(t.length), t.replace(/&(amp|lt|gt|#34|#39);/g, (e) => Es[e]);
1093
+ }
1094
+ function Ds(t) {
1095
+ return ie.call(this, Ns.call(this, t));
1096
+ }
1097
+ function qs(t) {
1098
+ const e = c(t);
1099
+ return this.context.memoryLimit.use(e.length), e.replace(/\r?\n/gm, `<br />
1100
+ `);
1101
+ }
1102
+ function Ms(t) {
1103
+ const e = c(t);
1104
+ return this.context.memoryLimit.use(e.length), e.replace(/<script[\s\S]*?<\/script>|<style[\s\S]*?<\/style>|<.*?>|<!--[\s\S]*?-->/g, "");
1105
+ }
1106
+ var Is = /* @__PURE__ */ Object.freeze({
1107
+ __proto__: null,
1108
+ escape: ie,
1109
+ xml_escape: zs,
1110
+ escape_once: Ds,
1111
+ newline_to_br: qs,
1112
+ strip_html: Ms
1113
+ });
1114
+ class $s {
1115
+ constructor(e) {
1116
+ this.mapping = e, this.sep = "/";
1117
+ }
1118
+ exists(e) {
1119
+ return O(this, void 0, void 0, function* () {
1120
+ return this.existsSync(e);
1121
+ });
1122
+ }
1123
+ existsSync(e) {
1124
+ return !v(this.mapping[e]);
1125
+ }
1126
+ readFile(e) {
1127
+ return O(this, void 0, void 0, function* () {
1128
+ return this.readFileSync(e);
1129
+ });
1130
+ }
1131
+ readFileSync(e) {
1132
+ const s = this.mapping[e];
1133
+ if (v(s))
1134
+ throw new Error(`ENOENT: ${e}`);
1135
+ return s;
1136
+ }
1137
+ dirname(e) {
1138
+ const s = e.split(this.sep);
1139
+ return s.pop(), s.join(this.sep);
1140
+ }
1141
+ resolve(e, s, r) {
1142
+ if (s += r, e === ".")
1143
+ return s;
1144
+ const i = e.split(/\/+/);
1145
+ for (const n of s.split(this.sep))
1146
+ n === "." || n === "" || (n === ".." ? (i.length > 1 || i[0] !== "") && i.pop() : i.push(n));
1147
+ return i.join(this.sep);
1148
+ }
1149
+ }
1150
+ const U = {
1151
+ root: ["."],
1152
+ layouts: ["."],
1153
+ partials: ["."],
1154
+ relativeReference: !0,
1155
+ jekyllInclude: !1,
1156
+ keyValueSeparator: ":",
1157
+ cache: void 0,
1158
+ extname: "",
1159
+ fs: vs,
1160
+ dynamicPartials: !0,
1161
+ jsTruthy: !1,
1162
+ dateFormat: "%A, %B %-e, %Y at %-l:%M %P %z",
1163
+ locale: "",
1164
+ trimTagRight: !1,
1165
+ trimTagLeft: !1,
1166
+ trimOutputRight: !1,
1167
+ trimOutputLeft: !1,
1168
+ greedy: !0,
1169
+ tagDelimiterLeft: "{%",
1170
+ tagDelimiterRight: "%}",
1171
+ outputDelimiterLeft: "{{",
1172
+ outputDelimiterRight: "}}",
1173
+ preserveTimezones: !1,
1174
+ strictFilters: !1,
1175
+ strictVariables: !1,
1176
+ ownPropertyOnly: !0,
1177
+ lenientIf: !1,
1178
+ globals: {},
1179
+ keepOutputType: !1,
1180
+ operators: gs,
1181
+ memoryLimit: 1 / 0,
1182
+ parseLimit: 1 / 0,
1183
+ renderLimit: 1 / 0
1184
+ };
1185
+ function Ps(t) {
1186
+ var e, s;
1187
+ if (t.hasOwnProperty("root") && (t.hasOwnProperty("partials") || (t.partials = t.root), t.hasOwnProperty("layouts") || (t.layouts = t.root)), t.hasOwnProperty("cache")) {
1188
+ let r;
1189
+ typeof t.cache == "number" ? r = t.cache > 0 ? new Ce(t.cache) : void 0 : typeof t.cache == "object" ? r = t.cache : r = t.cache ? new Ce(1024) : void 0, t.cache = r;
1190
+ }
1191
+ return t = Object.assign(Object.assign(Object.assign({}, U), t.jekyllInclude ? { dynamicPartials: !1 } : {}), t), (!t.fs.dirname || !t.fs.sep) && t.relativeReference && (console.warn("[LiquidJS] `fs.dirname` and `fs.sep` are required for relativeReference, set relativeReference to `false` to suppress this warning"), t.relativeReference = !1), t.root = G(t.root), t.partials = G(t.partials), t.layouts = G(t.layouts), t.outputEscape = t.outputEscape && Cs(t.outputEscape), t.locale || (t.locale = (s = (e = et()) === null || e === void 0 ? void 0 : e().resolvedOptions().locale) !== null && s !== void 0 ? s : "en-US"), t.templates && (t.fs = new $s(t.templates), t.relativeReference = !0, t.root = t.partials = t.layouts = "."), t;
1192
+ }
1193
+ function Cs(t) {
1194
+ return t === "escape" ? ie : t === "json" ? at.json : (b(w(t), "`outputEscape` need to be of type string or function"), t);
1195
+ }
1196
+ function G(t) {
1197
+ let e = [];
1198
+ return k(t) && (e = t), _(t) && (e = [t]), e;
1199
+ }
1200
+ function As(t, e) {
1201
+ let s = !1;
1202
+ for (let r = 0; r < t.length; r++) {
1203
+ const i = t[r];
1204
+ Qs(i) && (!s && i.trimLeft && Vs(t[r - 1], e.greedy), j(i) && (i.name === "raw" ? s = !0 : i.name === "endraw" && (s = !1)), !s && i.trimRight && Bs(t[r + 1], e.greedy));
1205
+ }
1206
+ }
1207
+ function Vs(t, e) {
1208
+ if (!t || !ye(t))
1209
+ return;
1210
+ const s = e ? H : Ge;
1211
+ for (; f[t.input.charCodeAt(t.end - 1 - t.trimRight)] & s; )
1212
+ t.trimRight++;
1213
+ }
1214
+ function Bs(t, e) {
1215
+ if (!t || !ye(t))
1216
+ return;
1217
+ const s = e ? H : Ge;
1218
+ for (; f[t.input.charCodeAt(t.begin + t.trimLeft)] & s; )
1219
+ t.trimLeft++;
1220
+ t.input.charAt(t.begin + t.trimLeft) === `
1221
+ ` && t.trimLeft++;
1222
+ }
1223
+ class z {
1224
+ constructor(e, s = U.operators, r, i) {
1225
+ this.input = e, this.file = r, this.rawBeginAt = -1, this.p = i ? i[0] : 0, this.N = i ? i[1] : e.length, this.opTrie = Re(s), this.literalTrie = Re(Xe);
1226
+ }
1227
+ readExpression() {
1228
+ return new us(this.readExpressionTokens());
1229
+ }
1230
+ *readExpressionTokens() {
1231
+ for (; this.p < this.N; ) {
1232
+ const e = this.readOperator();
1233
+ if (e) {
1234
+ yield e;
1235
+ continue;
1236
+ }
1237
+ const s = this.readValue();
1238
+ if (s) {
1239
+ yield s;
1240
+ continue;
1241
+ }
1242
+ return;
1243
+ }
1244
+ }
1245
+ readOperator() {
1246
+ this.skipBlank();
1247
+ const e = this.matchTrie(this.opTrie);
1248
+ if (e !== -1)
1249
+ return new Xt(this.input, this.p, this.p = e, this.file);
1250
+ }
1251
+ matchTrie(e) {
1252
+ let s = e, r = this.p, i;
1253
+ for (; s[this.input[r]] && r < this.N; )
1254
+ s = s[this.input[r++]], s.end && (i = s);
1255
+ return !i || i.needBoundary && Q(this.peek(r - this.p)) ? -1 : r;
1256
+ }
1257
+ readFilteredValue() {
1258
+ const e = this.p, s = this.readExpression();
1259
+ this.assert(s.valid(), `invalid value expression: ${this.snapshot()}`);
1260
+ const r = this.readFilters();
1261
+ return new ns(s, r, this.input, e, this.p, this.file);
1262
+ }
1263
+ readFilters() {
1264
+ const e = [];
1265
+ for (; ; ) {
1266
+ const s = this.readFilter();
1267
+ if (!s)
1268
+ return e;
1269
+ e.push(s);
1270
+ }
1271
+ }
1272
+ readFilter() {
1273
+ if (this.skipBlank(), this.end())
1274
+ return null;
1275
+ this.assert(this.read() === "|", 'expected "|" before filter');
1276
+ const e = this.readIdentifier();
1277
+ if (!e.size())
1278
+ return this.assert(this.end(), "expected filter name"), null;
1279
+ const s = [];
1280
+ if (this.skipBlank(), this.peek() === ":")
1281
+ do {
1282
+ ++this.p;
1283
+ const r = this.readFilterArg();
1284
+ r && s.push(r), this.skipBlank(), this.assert(this.end() || this.peek() === "," || this.peek() === "|", () => `unexpected character ${this.snapshot()}`);
1285
+ } while (this.peek() === ",");
1286
+ else if (!(this.peek() === "|" || this.end())) throw this.error('expected ":" after filter name');
1287
+ return new rt(e.getText(), s, this.input, e.begin, this.p, this.file);
1288
+ }
1289
+ readFilterArg() {
1290
+ const e = this.readValue();
1291
+ if (!e)
1292
+ return;
1293
+ if (this.skipBlank(), this.peek() !== ":")
1294
+ return e;
1295
+ ++this.p;
1296
+ const s = this.readValue();
1297
+ return [e.getText(), s];
1298
+ }
1299
+ readTopLevelTokens(e = U) {
1300
+ const s = [];
1301
+ for (; this.p < this.N; ) {
1302
+ const r = this.readTopLevelToken(e);
1303
+ s.push(r);
1304
+ }
1305
+ return As(s, e), s;
1306
+ }
1307
+ readTopLevelToken(e) {
1308
+ const { tagDelimiterLeft: s, outputDelimiterLeft: r } = e;
1309
+ return this.rawBeginAt > -1 ? this.readEndrawOrRawContent(e) : this.match(s) ? this.readTagToken(e) : this.match(r) ? this.readOutputToken(e) : this.readHTMLToken([s, r]);
1310
+ }
1311
+ readHTMLToken(e) {
1312
+ const s = this.p;
1313
+ for (; this.p < this.N && !e.some((r) => this.match(r)); )
1314
+ ++this.p;
1315
+ return new De(this.input, s, this.p, this.file);
1316
+ }
1317
+ readTagToken(e) {
1318
+ const { file: s, input: r } = this, i = this.p;
1319
+ if (this.readToDelimiter(e.tagDelimiterRight) === -1)
1320
+ throw this.error(`tag ${this.snapshot(i)} not closed`, i);
1321
+ const n = new Ne(r, i, this.p, e, s);
1322
+ return n.name === "raw" && (this.rawBeginAt = i), n;
1323
+ }
1324
+ readToDelimiter(e, s = !1) {
1325
+ for (this.skipBlank(); this.p < this.N; ) {
1326
+ if (s && this.peekType() & Fe) {
1327
+ this.readQuoted();
1328
+ continue;
1329
+ }
1330
+ if (++this.p, this.rmatch(e))
1331
+ return this.p;
1332
+ }
1333
+ return -1;
1334
+ }
1335
+ readOutputToken(e = U) {
1336
+ const { file: s, input: r } = this, { outputDelimiterRight: i } = e, n = this.p;
1337
+ if (this.readToDelimiter(i, !0) === -1)
1338
+ throw this.error(`output ${this.snapshot(n)} not closed`, n);
1339
+ return new Jt(r, n, this.p, e, s);
1340
+ }
1341
+ readEndrawOrRawContent(e) {
1342
+ const { tagDelimiterLeft: s, tagDelimiterRight: r } = e, i = this.p;
1343
+ let n = this.readTo(s) - s.length;
1344
+ for (; this.p < this.N; ) {
1345
+ if (this.readIdentifier().getText() !== "endraw") {
1346
+ n = this.readTo(s) - s.length;
1347
+ continue;
1348
+ }
1349
+ for (; this.p <= this.N; ) {
1350
+ if (this.rmatch(r)) {
1351
+ const o = this.p;
1352
+ return i === n ? (this.rawBeginAt = -1, new Ne(this.input, i, o, e, this.file)) : (this.p = n, new De(this.input, i, n, this.file));
1353
+ }
1354
+ if (this.rmatch(s))
1355
+ break;
1356
+ this.p++;
1357
+ }
1358
+ }
1359
+ throw this.error(`raw ${this.snapshot(this.rawBeginAt)} not closed`, i);
1360
+ }
1361
+ readLiquidTagTokens(e = U) {
1362
+ const s = [];
1363
+ for (; this.p < this.N; ) {
1364
+ const r = this.readLiquidTagToken(e);
1365
+ r && s.push(r);
1366
+ }
1367
+ return s;
1368
+ }
1369
+ readLiquidTagToken(e) {
1370
+ if (this.skipBlank(), this.end())
1371
+ return;
1372
+ const s = this.p;
1373
+ this.readToDelimiter(`
1374
+ `);
1375
+ const r = this.p;
1376
+ return new is(this.input, s, r, e, this.file);
1377
+ }
1378
+ error(e, s = this.p) {
1379
+ return new xt(e, new ne(this.input, s, this.N, this.file));
1380
+ }
1381
+ assert(e, s, r) {
1382
+ if (!e)
1383
+ throw this.error(typeof s == "function" ? s() : s, r);
1384
+ }
1385
+ snapshot(e = this.p) {
1386
+ return JSON.stringify(bt(this.input.slice(e, this.N), 32));
1387
+ }
1388
+ /**
1389
+ * @deprecated use #readIdentifier instead
1390
+ */
1391
+ readWord() {
1392
+ return this.readIdentifier();
1393
+ }
1394
+ readIdentifier() {
1395
+ this.skipBlank();
1396
+ const e = this.p;
1397
+ for (; !this.end() && Q(this.peek()); )
1398
+ ++this.p;
1399
+ return new ne(this.input, e, this.p, this.file);
1400
+ }
1401
+ readNonEmptyIdentifier() {
1402
+ const e = this.readIdentifier();
1403
+ return e.size() ? e : void 0;
1404
+ }
1405
+ readTagName() {
1406
+ return this.skipBlank(), this.input[this.p] === "#" ? this.input.slice(this.p, ++this.p) : this.readIdentifier().getText();
1407
+ }
1408
+ readHashes(e) {
1409
+ const s = [];
1410
+ for (; ; ) {
1411
+ const r = this.readHash(e);
1412
+ if (!r)
1413
+ return s;
1414
+ s.push(r);
1415
+ }
1416
+ }
1417
+ readHash(e) {
1418
+ this.skipBlank(), this.peek() === "," && ++this.p;
1419
+ const s = this.p, r = this.readNonEmptyIdentifier();
1420
+ if (!r)
1421
+ return;
1422
+ let i;
1423
+ this.skipBlank();
1424
+ const n = _(e) ? e : e ? "=" : ":";
1425
+ return this.peek() === n && (++this.p, i = this.readValue()), new Kt(this.input, s, this.p, r, i, this.file);
1426
+ }
1427
+ remaining() {
1428
+ return this.input.slice(this.p, this.N);
1429
+ }
1430
+ advance(e = 1) {
1431
+ this.p += e;
1432
+ }
1433
+ end() {
1434
+ return this.p >= this.N;
1435
+ }
1436
+ read() {
1437
+ return this.input[this.p++];
1438
+ }
1439
+ readTo(e) {
1440
+ for (; this.p < this.N; )
1441
+ if (++this.p, this.rmatch(e))
1442
+ return this.p;
1443
+ return -1;
1444
+ }
1445
+ readValue() {
1446
+ this.skipBlank();
1447
+ const e = this.p, s = this.readLiteral() || this.readQuoted() || this.readRange() || this.readNumber(), r = this.readProperties(!s);
1448
+ return r.length ? new Me(s, r, this.input, e, this.p) : s;
1449
+ }
1450
+ readScopeValue() {
1451
+ this.skipBlank();
1452
+ const e = this.p, s = this.readProperties();
1453
+ if (s.length)
1454
+ return new Me(void 0, s, this.input, e, this.p);
1455
+ }
1456
+ readProperties(e = !0) {
1457
+ const s = [];
1458
+ for (; ; ) {
1459
+ if (this.peek() === "[") {
1460
+ this.p++;
1461
+ const r = this.readValue() || new ne(this.input, this.p, this.p, this.file);
1462
+ this.assert(this.readTo("]") !== -1, "[ not closed"), s.push(r);
1463
+ continue;
1464
+ }
1465
+ if (e && !s.length) {
1466
+ const r = this.readNonEmptyIdentifier();
1467
+ if (r) {
1468
+ s.push(r);
1469
+ continue;
1470
+ }
1471
+ }
1472
+ if (this.peek() === "." && this.peek(1) !== ".") {
1473
+ this.p++;
1474
+ const r = this.readNonEmptyIdentifier();
1475
+ if (!r)
1476
+ break;
1477
+ s.push(r);
1478
+ continue;
1479
+ }
1480
+ break;
1481
+ }
1482
+ return s;
1483
+ }
1484
+ readNumber() {
1485
+ this.skipBlank();
1486
+ let e = !1, s = !1, r = 0;
1487
+ for (this.peekType() & Nt && r++; this.p + r <= this.N; )
1488
+ if (this.peekType(r) & zt)
1489
+ s = !0, r++;
1490
+ else if (this.peek(r) === "." && this.peek(r + 1) !== ".") {
1491
+ if (e || !s)
1492
+ return;
1493
+ e = !0, r++;
1494
+ } else
1495
+ break;
1496
+ if (s && !Q(this.peek(r))) {
1497
+ const i = new Qt(this.input, this.p, this.p + r, this.file);
1498
+ return this.advance(r), i;
1499
+ }
1500
+ }
1501
+ readLiteral() {
1502
+ this.skipBlank();
1503
+ const e = this.matchTrie(this.literalTrie);
1504
+ if (e === -1)
1505
+ return;
1506
+ const s = new Zt(this.input, this.p, e, this.file);
1507
+ return this.p = e, s;
1508
+ }
1509
+ readRange() {
1510
+ this.skipBlank();
1511
+ const e = this.p;
1512
+ if (this.peek() !== "(")
1513
+ return;
1514
+ ++this.p;
1515
+ const s = this.readValueOrThrow();
1516
+ this.p += 2;
1517
+ const r = this.readValueOrThrow();
1518
+ return ++this.p, new rs(this.input, e, this.p, s, r, this.file);
1519
+ }
1520
+ readValueOrThrow() {
1521
+ const e = this.readValue();
1522
+ return this.assert(e, () => `unexpected token ${this.snapshot()}, value expected`), e;
1523
+ }
1524
+ readQuoted() {
1525
+ this.skipBlank();
1526
+ const e = this.p;
1527
+ if (!(this.peekType() & Fe))
1528
+ return;
1529
+ ++this.p;
1530
+ let s = !1;
1531
+ for (; this.p < this.N && (++this.p, !(this.input[this.p - 1] === this.input[e] && !s)); )
1532
+ s ? s = !1 : this.input[this.p - 1] === "\\" && (s = !0);
1533
+ return new ss(this.input, e, this.p, this.file);
1534
+ }
1535
+ *readFileNameTemplate(e) {
1536
+ const { outputDelimiterLeft: s } = e, r = [",", " ", s], i = new Set(r);
1537
+ for (; this.p < this.N && !i.has(this.peek()); )
1538
+ yield this.match(s) ? this.readOutputToken(e) : this.readHTMLToken(r);
1539
+ }
1540
+ match(e) {
1541
+ for (let s = 0; s < e.length; s++)
1542
+ if (e[s] !== this.input[this.p + s])
1543
+ return !1;
1544
+ return !0;
1545
+ }
1546
+ rmatch(e) {
1547
+ for (let s = 0; s < e.length; s++)
1548
+ if (e[e.length - 1 - s] !== this.input[this.p - 1 - s])
1549
+ return !1;
1550
+ return !0;
1551
+ }
1552
+ peekType(e = 0) {
1553
+ return this.p + e >= this.N ? 0 : f[this.input.charCodeAt(this.p + e)];
1554
+ }
1555
+ peek(e = 0) {
1556
+ return this.p + e >= this.N ? "" : this.input[this.p + e];
1557
+ }
1558
+ skipBlank() {
1559
+ for (; this.peekType() & H; )
1560
+ ++this.p;
1561
+ }
1562
+ }
1563
+ class js {
1564
+ constructor(e, s) {
1565
+ this.handlers = {}, this.stopRequested = !1, this.tokens = e, this.parseToken = s;
1566
+ }
1567
+ on(e, s) {
1568
+ return this.handlers[e] = s, this;
1569
+ }
1570
+ trigger(e, s) {
1571
+ const r = this.handlers[e];
1572
+ return r ? (r.call(this, s), !0) : !1;
1573
+ }
1574
+ start() {
1575
+ this.trigger("start");
1576
+ let e;
1577
+ for (; !this.stopRequested && (e = this.tokens.shift()); ) {
1578
+ if (this.trigger("token", e) || j(e) && this.trigger(`tag:${e.name}`, e))
1579
+ continue;
1580
+ const s = this.parseToken(e, this.tokens);
1581
+ this.trigger("template", s);
1582
+ }
1583
+ return this.stopRequested || this.trigger("end"), this;
1584
+ }
1585
+ stop() {
1586
+ return this.stopRequested = !0, this;
1587
+ }
1588
+ }
1589
+ class me {
1590
+ constructor(e) {
1591
+ this.token = e;
1592
+ }
1593
+ }
1594
+ class m extends me {
1595
+ constructor(e, s, r) {
1596
+ super(e), this.name = e.name, this.liquid = r, this.tokenizer = e.tokenizer;
1597
+ }
1598
+ }
1599
+ class W {
1600
+ constructor(e, s) {
1601
+ this.hash = {};
1602
+ const r = new z(e, {});
1603
+ for (const i of r.readHashes(s))
1604
+ this.hash[i.name.content] = i.value;
1605
+ }
1606
+ *render(e) {
1607
+ const s = {};
1608
+ for (const r of Object.keys(this.hash))
1609
+ s[r] = this.hash[r] === void 0 ? !0 : yield y(this.hash[r], e);
1610
+ return s;
1611
+ }
1612
+ }
1613
+ function Us(t) {
1614
+ return class extends m {
1615
+ constructor(e, s, r) {
1616
+ super(e, s, r), w(t.parse) && t.parse.call(this, e, s);
1617
+ }
1618
+ *render(e, s) {
1619
+ const r = yield new W(this.token.args, e.opts.keyValueSeparator).render(e);
1620
+ return yield t.render.call(this, e, s, r);
1621
+ }
1622
+ };
1623
+ }
1624
+ function Hs(t) {
1625
+ return k(t);
1626
+ }
1627
+ class lt {
1628
+ constructor(e, s, r) {
1629
+ this.token = e, this.name = e.name, this.handler = w(s) ? s : w(s == null ? void 0 : s.handler) ? s.handler : Qe, this.raw = !w(s) && !!(s != null && s.raw), this.args = e.args, this.liquid = r;
1630
+ }
1631
+ *render(e, s) {
1632
+ const r = [];
1633
+ for (const i of this.args)
1634
+ Hs(i) ? r.push([i[0], yield y(i[1], s)]) : r.push(yield y(i, s));
1635
+ return yield this.handler.apply({ context: s, token: this.token, liquid: this.liquid }, [e, ...r]);
1636
+ }
1637
+ }
1638
+ class L {
1639
+ /**
1640
+ * @param str the value to be valuated, eg.: "foobar" | truncate: 3
1641
+ */
1642
+ constructor(e, s) {
1643
+ this.filters = [];
1644
+ const r = typeof e == "string" ? new z(e, s.options.operators).readFilteredValue() : e;
1645
+ this.initial = r.initial, this.filters = r.filters.map((i) => new lt(i, this.getFilter(s, i.name), s));
1646
+ }
1647
+ *value(e, s) {
1648
+ s = s || e.opts.lenientIf && this.filters.length > 0 && this.filters[0].name === "default";
1649
+ let r = yield this.initial.evaluate(e, s);
1650
+ for (const i of this.filters)
1651
+ r = yield i.render(r, e);
1652
+ return r;
1653
+ }
1654
+ getFilter(e, s) {
1655
+ const r = e.filters[s];
1656
+ return b(r || !e.options.strictFilters, () => `undefined filter: ${s}`), r;
1657
+ }
1658
+ }
1659
+ class Ws extends me {
1660
+ constructor(e, s) {
1661
+ var r;
1662
+ super(e);
1663
+ const i = new z(e.input, s.options.operators, e.file, e.contentRange);
1664
+ this.value = new L(i.readFilteredValue(), s);
1665
+ const n = this.value.filters, o = s.options.outputEscape;
1666
+ if (!(!((r = n[n.length - 1]) === null || r === void 0) && r.raw) && o) {
1667
+ const a = new rt(toString.call(o), [], "", 0, 0);
1668
+ n.push(new lt(a, o, s));
1669
+ }
1670
+ }
1671
+ *render(e, s) {
1672
+ const r = yield this.value.value(e, !1);
1673
+ s.write(r);
1674
+ }
1675
+ }
1676
+ class Ys extends me {
1677
+ constructor(e) {
1678
+ super(e), this.str = e.getContent();
1679
+ }
1680
+ *render(e, s) {
1681
+ s.write(this.str);
1682
+ }
1683
+ }
1684
+ var A;
1685
+ (function(t) {
1686
+ t.Partials = "partials", t.Layouts = "layouts", t.Root = "root";
1687
+ })(A || (A = {}));
1688
+ class Js {
1689
+ constructor(e) {
1690
+ if (this.options = e, e.relativeReference) {
1691
+ const s = e.fs.sep;
1692
+ b(s, "`fs.sep` is required for relative reference");
1693
+ const r = new RegExp(["." + s, ".." + s, "./", "../"].map((i) => mt(i)).join("|"));
1694
+ this.shouldLoadRelative = (i) => r.test(i);
1695
+ } else
1696
+ this.shouldLoadRelative = (s) => !1;
1697
+ this.contains = this.options.fs.contains || (() => !0);
1698
+ }
1699
+ *lookup(e, s, r, i) {
1700
+ const { fs: n } = this.options, o = this.options[s];
1701
+ for (const a of this.candidates(e, o, i, s !== A.Root))
1702
+ if (r ? n.existsSync(a) : yield n.exists(a))
1703
+ return a;
1704
+ throw this.lookupError(e, o);
1705
+ }
1706
+ *candidates(e, s, r, i) {
1707
+ const { fs: n, extname: o } = this.options;
1708
+ if (this.shouldLoadRelative(e) && r) {
1709
+ const a = n.resolve(this.dirname(r), e, o);
1710
+ for (const l of s)
1711
+ if (!i || this.contains(l, a)) {
1712
+ yield a;
1713
+ break;
1714
+ }
1715
+ }
1716
+ for (const a of s) {
1717
+ const l = n.resolve(a, e, o);
1718
+ (!i || this.contains(a, l)) && (yield l);
1719
+ }
1720
+ if (n.fallback !== void 0) {
1721
+ const a = n.fallback(e);
1722
+ a !== void 0 && (yield a);
1723
+ }
1724
+ }
1725
+ dirname(e) {
1726
+ const s = this.options.fs;
1727
+ return b(s.dirname, "`fs.dirname` is required for relative reference"), s.dirname(e);
1728
+ }
1729
+ lookupError(e, s) {
1730
+ const r = new Error("ENOENT");
1731
+ return r.message = `ENOENT: Failed to lookup "${e}" in "${s}"`, r.code = "ENOENT", r;
1732
+ }
1733
+ }
1734
+ class M {
1735
+ constructor(e) {
1736
+ this.liquid = e, this.cache = this.liquid.options.cache, this.fs = this.liquid.options.fs, this.parseFile = this.cache ? this._parseFileCached : this._parseFile, this.loader = new Js(this.liquid.options), this.parseLimit = new he("parse length", e.options.parseLimit);
1737
+ }
1738
+ parse(e, s) {
1739
+ e = String(e), this.parseLimit.use(e.length);
1740
+ const i = new z(e, this.liquid.options.operators, s).readTopLevelTokens(this.liquid.options);
1741
+ return this.parseTokens(i);
1742
+ }
1743
+ parseTokens(e) {
1744
+ let s;
1745
+ const r = [], i = [];
1746
+ for (; s = e.shift(); )
1747
+ try {
1748
+ r.push(this.parseToken(s, e));
1749
+ } catch (n) {
1750
+ if (this.liquid.options.catchAllErrors)
1751
+ i.push(n);
1752
+ else
1753
+ throw n;
1754
+ }
1755
+ if (i.length)
1756
+ throw new Ze(i);
1757
+ return r;
1758
+ }
1759
+ parseToken(e, s) {
1760
+ try {
1761
+ if (j(e)) {
1762
+ const r = this.liquid.tags[e.name];
1763
+ return b(r, `tag "${e.name}" not found`), new r(e, s, this.liquid, this);
1764
+ }
1765
+ return Zs(e) ? new Ws(e, this.liquid) : new Ys(e);
1766
+ } catch (r) {
1767
+ throw B.is(r) ? r : new _t(r, e);
1768
+ }
1769
+ }
1770
+ parseStream(e) {
1771
+ return new js(e, (s, r) => this.parseToken(s, r));
1772
+ }
1773
+ *_parseFileCached(e, s, r = A.Root, i) {
1774
+ const n = this.cache, o = this.loader.shouldLoadRelative(e) ? i + "," + e : r + ":" + e, a = yield n.read(o);
1775
+ if (a)
1776
+ return a;
1777
+ const l = this._parseFile(e, s, r, i), h = s ? yield l : N(l);
1778
+ n.write(o, h);
1779
+ try {
1780
+ return yield h;
1781
+ } catch (u) {
1782
+ throw n.remove(o), u;
1783
+ }
1784
+ }
1785
+ *_parseFile(e, s, r = A.Root, i) {
1786
+ const n = yield this.loader.lookup(e, r, s, i);
1787
+ return this.parse(s ? this.fs.readFileSync(n) : yield this.fs.readFile(n), n);
1788
+ }
1789
+ }
1790
+ var g;
1791
+ (function(t) {
1792
+ t[t.Number = 1] = "Number", t[t.Literal = 2] = "Literal", t[t.Tag = 4] = "Tag", t[t.Output = 8] = "Output", t[t.HTML = 16] = "HTML", t[t.Filter = 32] = "Filter", t[t.Hash = 64] = "Hash", t[t.PropertyAccess = 128] = "PropertyAccess", t[t.Word = 256] = "Word", t[t.Range = 512] = "Range", t[t.Quoted = 1024] = "Quoted", t[t.Operator = 2048] = "Operator", t[t.FilteredValue = 4096] = "FilteredValue", t[t.Delimited = 12] = "Delimited";
1793
+ })(g || (g = {}));
1794
+ function Qs(t) {
1795
+ return !!(q(t) & g.Delimited);
1796
+ }
1797
+ function ht(t) {
1798
+ return q(t) === g.Operator;
1799
+ }
1800
+ function ye(t) {
1801
+ return q(t) === g.HTML;
1802
+ }
1803
+ function Zs(t) {
1804
+ return q(t) === g.Output;
1805
+ }
1806
+ function j(t) {
1807
+ return q(t) === g.Tag;
1808
+ }
1809
+ function Gs(t) {
1810
+ return q(t) === g.Quoted;
1811
+ }
1812
+ function Xs(t) {
1813
+ return q(t) === g.PropertyAccess;
1814
+ }
1815
+ function Ks(t) {
1816
+ return q(t) === g.Range;
1817
+ }
1818
+ function q(t) {
1819
+ return t ? t.kind : -1;
1820
+ }
1821
+ class I {
1822
+ constructor(e = {}, s = U, r = {}, { memoryLimit: i, renderLimit: n } = {}) {
1823
+ var o, a, l, h, u;
1824
+ this.scopes = [{}], this.registers = {}, this.sync = !!r.sync, this.opts = s, this.globals = (o = r.globals) !== null && o !== void 0 ? o : s.globals, this.environments = te(e) ? e : Object(e), this.strictVariables = (a = r.strictVariables) !== null && a !== void 0 ? a : this.opts.strictVariables, this.ownPropertyOnly = (l = r.ownPropertyOnly) !== null && l !== void 0 ? l : s.ownPropertyOnly, this.memoryLimit = i ?? new he("memory alloc", (h = r.memoryLimit) !== null && h !== void 0 ? h : s.memoryLimit), this.renderLimit = n ?? new he("template render", it().now() + ((u = r.renderLimit) !== null && u !== void 0 ? u : s.renderLimit));
1825
+ }
1826
+ getRegister(e) {
1827
+ return this.registers[e] = this.registers[e] || {};
1828
+ }
1829
+ setRegister(e, s) {
1830
+ return this.registers[e] = s;
1831
+ }
1832
+ saveRegister(...e) {
1833
+ return e.map((s) => [s, this.getRegister(s)]);
1834
+ }
1835
+ restoreRegister(e) {
1836
+ return e.forEach(([s, r]) => this.setRegister(s, r));
1837
+ }
1838
+ getAll() {
1839
+ return [this.globals, this.environments, ...this.scopes].reduce((e, s) => ee(e, s), {});
1840
+ }
1841
+ /**
1842
+ * @deprecated use `_get()` or `getSync()` instead
1843
+ */
1844
+ get(e) {
1845
+ return this.getSync(e);
1846
+ }
1847
+ getSync(e) {
1848
+ return D(this._get(e));
1849
+ }
1850
+ *_get(e) {
1851
+ const s = this.findScope(e[0]);
1852
+ return yield this._getFromScope(s, e);
1853
+ }
1854
+ /**
1855
+ * @deprecated use `_get()` instead
1856
+ */
1857
+ getFromScope(e, s) {
1858
+ return D(this._getFromScope(e, s));
1859
+ }
1860
+ *_getFromScope(e, s, r = this.strictVariables) {
1861
+ _(s) && (s = s.split("."));
1862
+ for (let i = 0; i < s.length; i++)
1863
+ if (e = yield er(e, s[i], this.ownPropertyOnly), r && yt(e))
1864
+ throw new Ft(s.slice(0, i + 1).join("."));
1865
+ return e;
1866
+ }
1867
+ push(e) {
1868
+ return this.scopes.push(e);
1869
+ }
1870
+ pop() {
1871
+ return this.scopes.pop();
1872
+ }
1873
+ bottom() {
1874
+ return this.scopes[0];
1875
+ }
1876
+ spawn(e = {}) {
1877
+ return new I(e, this.opts, {
1878
+ sync: this.sync,
1879
+ globals: this.globals,
1880
+ strictVariables: this.strictVariables
1881
+ }, {
1882
+ renderLimit: this.renderLimit,
1883
+ memoryLimit: this.memoryLimit
1884
+ });
1885
+ }
1886
+ findScope(e) {
1887
+ for (let s = this.scopes.length - 1; s >= 0; s--) {
1888
+ const r = this.scopes[s];
1889
+ if (e in r)
1890
+ return r;
1891
+ }
1892
+ return e in this.environments ? this.environments : this.globals;
1893
+ }
1894
+ }
1895
+ function er(t, e, s) {
1896
+ if (t = He(t), v(t))
1897
+ return t;
1898
+ if (k(t) && e < 0)
1899
+ return t[t.length + +e];
1900
+ const r = tr(t, e, s);
1901
+ return r === void 0 && t instanceof V ? t.liquidMethodMissing(e) : w(r) ? r.call(t) : e === "size" ? ir(t) : e === "first" ? sr(t) : e === "last" ? rr(t) : r;
1902
+ }
1903
+ function tr(t, e, s) {
1904
+ if (!(s && !ce.call(t, e) && !(t instanceof V)))
1905
+ return t[e];
1906
+ }
1907
+ function sr(t) {
1908
+ return k(t) ? t[0] : t.first;
1909
+ }
1910
+ function rr(t) {
1911
+ return k(t) ? t[t.length - 1] : t.last;
1912
+ }
1913
+ function ir(t) {
1914
+ if (ce.call(t, "size") || t.size !== void 0)
1915
+ return t.size;
1916
+ if (k(t) || _(t))
1917
+ return t.length;
1918
+ if (typeof t == "object")
1919
+ return Object.keys(t).length;
1920
+ }
1921
+ var C;
1922
+ (function(t) {
1923
+ t[t.OUTPUT = 0] = "OUTPUT", t[t.STORE = 1] = "STORE";
1924
+ })(C || (C = {}));
1925
+ const nr = x(Math.abs), or = x(Math.max), ar = x(Math.min), lr = x(Math.ceil), hr = x((t, e, s = !1) => s ? Math.floor(t / e) : t / e), cr = x(Math.floor), ur = x((t, e) => t - e), dr = x((t, e) => t % e), fr = x((t, e) => t * e);
1926
+ function pr(t, e = 0) {
1927
+ t = d(t), e = d(e);
1928
+ const s = Math.pow(10, e);
1929
+ return Math.round(t * s) / s;
1930
+ }
1931
+ function gr(t, e) {
1932
+ return t = d(t), e = d(e), Number(t) + Number(e);
1933
+ }
1934
+ var mr = /* @__PURE__ */ Object.freeze({
1935
+ __proto__: null,
1936
+ abs: nr,
1937
+ at_least: or,
1938
+ at_most: ar,
1939
+ ceil: lr,
1940
+ divided_by: hr,
1941
+ floor: cr,
1942
+ minus: ur,
1943
+ modulo: dr,
1944
+ times: fr,
1945
+ round: pr,
1946
+ plus: gr
1947
+ });
1948
+ const yr = (t) => decodeURIComponent(c(t)).replace(/\+/g, " "), wr = (t) => encodeURIComponent(c(t)).replace(/%20/g, "+"), Tr = (t) => encodeURIComponent(c(t)).replace(/%20/g, "+").replace(/[!'()*]/g, (e) => "%" + e.charCodeAt(0).toString(16).toUpperCase()), kr = (t) => encodeURI(c(t)).replace(/%5B/g, "[").replace(/%5D/g, "]"), Ve = /[^\p{M}\p{L}\p{Nd}]+/ug, br = {
1949
+ raw: /\s+/g,
1950
+ default: Ve,
1951
+ pretty: /[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/ug,
1952
+ ascii: /[^A-Za-z0-9]+/g,
1953
+ latin: Ve,
1954
+ none: null
1955
+ };
1956
+ function xr(t, e = "default", s = !1) {
1957
+ t = c(t);
1958
+ const r = br[e];
1959
+ return r && (e === "latin" && (t = _r(t)), t = t.replace(r, "-").replace(/^-|-$/g, "")), s ? t : t.toLowerCase();
1960
+ }
1961
+ function _r(t) {
1962
+ return t.replace(/[àáâãäå]/g, "a").replace(/[æ]/g, "ae").replace(/[ç]/g, "c").replace(/[èéêë]/g, "e").replace(/[ìíîï]/g, "i").replace(/[ð]/g, "d").replace(/[ñ]/g, "n").replace(/[òóôõöø]/g, "o").replace(/[ùúûü]/g, "u").replace(/[ýÿ]/g, "y").replace(/[ß]/g, "ss").replace(/[œ]/g, "oe").replace(/[þ]/g, "th").replace(/[ẞ]/g, "SS").replace(/[Œ]/g, "OE").replace(/[Þ]/g, "TH");
1963
+ }
1964
+ var vr = /* @__PURE__ */ Object.freeze({
1965
+ __proto__: null,
1966
+ url_decode: yr,
1967
+ url_encode: wr,
1968
+ cgi_escape: Tr,
1969
+ uri_escape: kr,
1970
+ slugify: xr
1971
+ });
1972
+ const Lr = x(function(t, e) {
1973
+ const s = T(t), r = v(e) ? " " : c(e), i = s.length * (1 + r.length);
1974
+ return this.context.memoryLimit.use(i), s.join(r);
1975
+ }), Fr = x((t) => k(t) ? We(t) : ""), Sr = x((t) => k(t) ? t[0] : ""), Or = x(function(t) {
1976
+ const e = T(t);
1977
+ return this.context.memoryLimit.use(e.length), [...e].reverse();
1978
+ });
1979
+ function* Rr(t, e) {
1980
+ const s = [], r = T(t);
1981
+ this.context.memoryLimit.use(r.length);
1982
+ for (const i of r)
1983
+ s.push([
1984
+ i,
1985
+ e ? yield this.context._getFromScope(i, c(e).split("."), !1) : i
1986
+ ]);
1987
+ return s.sort((i, n) => {
1988
+ const o = i[1], a = n[1];
1989
+ return o < a ? -1 : o > a ? 1 : 0;
1990
+ }).map((i) => i[0]);
1991
+ }
1992
+ function Er(t, e) {
1993
+ const s = c(e), r = e === void 0 ? ve : (n, o) => ve(n[s], o[s]), i = T(t);
1994
+ return this.context.memoryLimit.use(i.length), [...i].sort(r);
1995
+ }
1996
+ const zr = (t) => t && t.length || 0;
1997
+ function* Nr(t, e) {
1998
+ const s = [], r = T(t);
1999
+ this.context.memoryLimit.use(r.length);
2000
+ for (const i of r)
2001
+ s.push(yield this.context._getFromScope(i, c(e), !1));
2002
+ return s;
2003
+ }
2004
+ function* Dr(t, e) {
2005
+ let s = 0;
2006
+ const r = T(t);
2007
+ for (const i of r) {
2008
+ const n = Number(e ? yield this.context._getFromScope(i, c(e), !1) : i);
2009
+ s += Number.isNaN(n) ? 0 : n;
2010
+ }
2011
+ return s;
2012
+ }
2013
+ function qr(t) {
2014
+ const e = T(t);
2015
+ return this.context.memoryLimit.use(e.length), e.filter((s) => !v(d(s)));
2016
+ }
2017
+ function ct(t, e = []) {
2018
+ const s = T(t), r = T(e);
2019
+ return this.context.memoryLimit.use(s.length + r.length), s.concat(r);
2020
+ }
2021
+ function Mr(t, e) {
2022
+ return ct.call(this, t, [e]);
2023
+ }
2024
+ function Ir(t, e) {
2025
+ const s = T(t);
2026
+ this.context.memoryLimit.use(s.length);
2027
+ const r = [...s];
2028
+ return r.unshift(e), r;
2029
+ }
2030
+ function $r(t) {
2031
+ const e = [...T(t)];
2032
+ return e.pop(), e;
2033
+ }
2034
+ function Pr(t) {
2035
+ const e = T(t);
2036
+ this.context.memoryLimit.use(e.length);
2037
+ const s = [...e];
2038
+ return s.shift(), s;
2039
+ }
2040
+ function Cr(t, e, s = 1) {
2041
+ return t = d(t), v(t) ? [] : (k(t) || (t = c(t)), e = e < 0 ? t.length + e : e, this.context.memoryLimit.use(s), t.slice(e, e + s));
2042
+ }
2043
+ function* Ar(t, e, s) {
2044
+ const r = [];
2045
+ t = T(t), this.context.memoryLimit.use(t.length);
2046
+ const i = new z(c(e)).readScopeValue();
2047
+ for (const n of t)
2048
+ r.push(yield y(i, this.context.spawn(n)));
2049
+ return t.filter((n, o) => s === void 0 ? $(r[o], this.context) : P(r[o], s));
2050
+ }
2051
+ function* Vr(t, e, s) {
2052
+ const r = [], i = new L(c(s), this.liquid), n = T(t);
2053
+ this.context.memoryLimit.use(n.length);
2054
+ for (const o of n)
2055
+ (yield i.value(this.context.spawn({ [e]: o }))) && r.push(o);
2056
+ return r;
2057
+ }
2058
+ function* Br(t, e) {
2059
+ const s = /* @__PURE__ */ new Map();
2060
+ t = T(t);
2061
+ const r = new z(c(e)).readScopeValue();
2062
+ this.context.memoryLimit.use(t.length);
2063
+ for (const i of t) {
2064
+ const n = yield y(r, this.context.spawn(i));
2065
+ s.has(n) || s.set(n, []), s.get(n).push(i);
2066
+ }
2067
+ return [...s.entries()].map(([i, n]) => ({ name: i, items: n }));
2068
+ }
2069
+ function* jr(t, e, s) {
2070
+ const r = /* @__PURE__ */ new Map(), i = new L(c(s), this.liquid);
2071
+ t = T(t), this.context.memoryLimit.use(t.length);
2072
+ for (const n of t) {
2073
+ const o = yield i.value(this.context.spawn({ [e]: n }));
2074
+ r.has(o) || r.set(o, []), r.get(o).push(n);
2075
+ }
2076
+ return [...r.entries()].map(([n, o]) => ({ name: n, items: o }));
2077
+ }
2078
+ function* Ur(t, e, s) {
2079
+ const r = new z(c(e)).readScopeValue(), i = T(t);
2080
+ for (const n of i) {
2081
+ const o = yield y(r, this.context.spawn(n));
2082
+ if (P(o, s))
2083
+ return n;
2084
+ }
2085
+ }
2086
+ function* Hr(t, e, s) {
2087
+ const r = new L(c(s), this.liquid), i = T(t);
2088
+ for (const n of i)
2089
+ if (yield r.value(this.context.spawn({ [e]: n })))
2090
+ return n;
2091
+ }
2092
+ function Wr(t) {
2093
+ return t = T(t), this.context.memoryLimit.use(t.length), [...new Set(t)];
2094
+ }
2095
+ function Yr(t, e = 1) {
2096
+ if (t = d(t), v(t))
2097
+ return [];
2098
+ k(t) || (t = c(t)), this.context.memoryLimit.use(e);
2099
+ const s = [...t].sort(() => Math.random() - 0.5);
2100
+ return e === 1 ? s[0] : s.slice(0, e);
2101
+ }
2102
+ var Jr = /* @__PURE__ */ Object.freeze({
2103
+ __proto__: null,
2104
+ join: Lr,
2105
+ last: Fr,
2106
+ first: Sr,
2107
+ reverse: Or,
2108
+ sort: Rr,
2109
+ sort_natural: Er,
2110
+ size: zr,
2111
+ map: Nr,
2112
+ sum: Dr,
2113
+ compact: qr,
2114
+ concat: ct,
2115
+ push: Mr,
2116
+ unshift: Ir,
2117
+ pop: $r,
2118
+ shift: Pr,
2119
+ slice: Cr,
2120
+ where: Ar,
2121
+ where_exp: Vr,
2122
+ group_by: Br,
2123
+ group_by_exp: jr,
2124
+ find: Ur,
2125
+ find_exp: Hr,
2126
+ uniq: Wr,
2127
+ sample: Yr
2128
+ });
2129
+ function we(t, e, s) {
2130
+ var r, i, n;
2131
+ const o = ((r = t == null ? void 0 : t.length) !== null && r !== void 0 ? r : 0) + ((i = e == null ? void 0 : e.length) !== null && i !== void 0 ? i : 0) + ((n = s == null ? void 0 : s.length) !== null && n !== void 0 ? n : 0);
2132
+ this.context.memoryLimit.use(o);
2133
+ const a = dt(t, this.context.opts, s);
2134
+ return a ? (e = d(e), e = v(e) ? this.context.opts.dateFormat : c(e), Z(a, e)) : t;
2135
+ }
2136
+ function Qr(t) {
2137
+ return we.call(this, t, "%Y-%m-%dT%H:%M:%S%:z");
2138
+ }
2139
+ function Zr(t) {
2140
+ return we.call(this, t, "%a, %d %b %Y %H:%M:%S %z");
2141
+ }
2142
+ function Gr(t, e, s) {
2143
+ return ut.call(this, t, "%b", e, s);
2144
+ }
2145
+ function Xr(t, e, s) {
2146
+ return ut.call(this, t, "%B", e, s);
2147
+ }
2148
+ function ut(t, e, s, r) {
2149
+ const i = dt(t, this.context.opts);
2150
+ if (!i)
2151
+ return t;
2152
+ if (s === "ordinal") {
2153
+ const n = i.getDate();
2154
+ return r === "US" ? Z(i, `${e} ${n}%q, %Y`) : Z(i, `${n}%q ${e} %Y`);
2155
+ }
2156
+ return Z(i, `%d ${e} %Y`);
2157
+ }
2158
+ function dt(t, e, s) {
2159
+ let r;
2160
+ const i = s ?? e.timezoneOffset, n = e.locale;
2161
+ return t = d(t), t === "now" || t === "today" ? r = new R(Date.now(), n, i) : de(t) ? r = new R(t * 1e3, n, i) : _(t) ? /^\d+$/.test(t) ? r = new R(+t * 1e3, n, i) : e.preserveTimezones && s === void 0 ? r = R.createDateFixedToTimezone(t, n) : r = new R(t, n, i) : r = new R(t, n, i), r.valid() ? r : void 0;
2162
+ }
2163
+ var Kr = /* @__PURE__ */ Object.freeze({
2164
+ __proto__: null,
2165
+ date: we,
2166
+ date_to_xmlschema: Qr,
2167
+ date_to_rfc822: Zr,
2168
+ date_to_string: Gr,
2169
+ date_to_long_string: Xr
2170
+ });
2171
+ const ae = /[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu, Be = /[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu;
2172
+ function ei(t, e) {
2173
+ b(arguments.length === 2, "append expect 2 arguments");
2174
+ const s = c(t), r = c(e);
2175
+ return this.context.memoryLimit.use(s.length + r.length), s + r;
2176
+ }
2177
+ function ti(t, e) {
2178
+ b(arguments.length === 2, "prepend expect 2 arguments");
2179
+ const s = c(t), r = c(e);
2180
+ return this.context.memoryLimit.use(s.length + r.length), r + s;
2181
+ }
2182
+ function si(t, e) {
2183
+ const s = c(t);
2184
+ return this.context.memoryLimit.use(s.length), e ? (e = fe(c(e)), s.replace(new RegExp(`^[${e}]+`, "g"), "")) : s.replace(/^\s+/, "");
2185
+ }
2186
+ function ri(t) {
2187
+ const e = c(t);
2188
+ return this.context.memoryLimit.use(e.length), e.toLowerCase();
2189
+ }
2190
+ function ii(t) {
2191
+ const e = c(t);
2192
+ return this.context.memoryLimit.use(e.length), c(e).toUpperCase();
2193
+ }
2194
+ function ni(t, e) {
2195
+ const s = c(t);
2196
+ return this.context.memoryLimit.use(s.length), s.split(c(e)).join("");
2197
+ }
2198
+ function oi(t, e) {
2199
+ const s = c(t);
2200
+ return this.context.memoryLimit.use(s.length), s.replace(c(e), "");
2201
+ }
2202
+ function ai(t, e) {
2203
+ const s = c(t);
2204
+ this.context.memoryLimit.use(s.length);
2205
+ const r = c(e), i = s.lastIndexOf(r);
2206
+ return i === -1 ? s : s.substring(0, i) + s.substring(i + r.length);
2207
+ }
2208
+ function li(t, e) {
2209
+ return t = c(t), this.context.memoryLimit.use(t.length), e ? (e = fe(c(e)), t.replace(new RegExp(`[${e}]+$`, "g"), "")) : t.replace(/\s+$/, "");
2210
+ }
2211
+ function hi(t, e) {
2212
+ const s = c(t);
2213
+ this.context.memoryLimit.use(s.length);
2214
+ const r = s.split(c(e));
2215
+ for (; r.length && r[r.length - 1] === ""; )
2216
+ r.pop();
2217
+ return r;
2218
+ }
2219
+ function ci(t, e) {
2220
+ const s = c(t);
2221
+ return this.context.memoryLimit.use(s.length), e ? (e = fe(c(e)), s.replace(new RegExp(`^[${e}]+`, "g"), "").replace(new RegExp(`[${e}]+$`, "g"), "")) : s.trim();
2222
+ }
2223
+ function ui(t) {
2224
+ const e = c(t);
2225
+ return this.context.memoryLimit.use(e.length), e.replace(/\r?\n/gm, "");
2226
+ }
2227
+ function di(t) {
2228
+ return t = c(t), this.context.memoryLimit.use(t.length), t.charAt(0).toUpperCase() + t.slice(1).toLowerCase();
2229
+ }
2230
+ function fi(t, e, s) {
2231
+ const r = c(t);
2232
+ return this.context.memoryLimit.use(r.length), r.split(c(e)).join(s);
2233
+ }
2234
+ function pi(t, e, s) {
2235
+ const r = c(t);
2236
+ return this.context.memoryLimit.use(r.length), r.replace(c(e), s);
2237
+ }
2238
+ function gi(t, e, s) {
2239
+ const r = c(t);
2240
+ this.context.memoryLimit.use(r.length);
2241
+ const i = c(e), n = r.lastIndexOf(i);
2242
+ if (n === -1)
2243
+ return r;
2244
+ const o = c(s);
2245
+ return r.substring(0, n) + o + r.substring(n + i.length);
2246
+ }
2247
+ function mi(t, e = 50, s = "...") {
2248
+ const r = c(t);
2249
+ return this.context.memoryLimit.use(r.length), r.length <= e ? t : r.substring(0, e - s.length) + s;
2250
+ }
2251
+ function yi(t, e = 15, s = "...") {
2252
+ const r = c(t);
2253
+ this.context.memoryLimit.use(r.length);
2254
+ const i = r.split(/\s+/);
2255
+ e <= 0 && (e = 1);
2256
+ let n = i.slice(0, e).join(" ");
2257
+ return i.length >= e && (n += s), n;
2258
+ }
2259
+ function wi(t) {
2260
+ const e = c(t);
2261
+ return this.context.memoryLimit.use(e.length), e.replace(/\s+/g, " ");
2262
+ }
2263
+ function Ti(t, e) {
2264
+ const s = c(t);
2265
+ if (this.context.memoryLimit.use(s.length), t = s.trim(), !t)
2266
+ return 0;
2267
+ switch (e) {
2268
+ case "cjk":
2269
+ return (t.match(ae) || []).length + (t.match(Be) || []).length;
2270
+ case "auto":
2271
+ return ae.test(t) ? t.match(ae).length + (t.match(Be) || []).length : t.split(/\s+/).length;
2272
+ default:
2273
+ return t.split(/\s+/).length;
2274
+ }
2275
+ }
2276
+ function ki(t, e = "and") {
2277
+ switch (this.context.memoryLimit.use(t.length), t.length) {
2278
+ case 0:
2279
+ return "";
2280
+ case 1:
2281
+ return t[0];
2282
+ case 2:
2283
+ return `${t[0]} ${e} ${t[1]}`;
2284
+ default:
2285
+ return `${t.slice(0, -1).join(", ")}, ${e} ${t[t.length - 1]}`;
2286
+ }
2287
+ }
2288
+ var bi = /* @__PURE__ */ Object.freeze({
2289
+ __proto__: null,
2290
+ append: ei,
2291
+ prepend: ti,
2292
+ lstrip: si,
2293
+ downcase: ri,
2294
+ upcase: ii,
2295
+ remove: ni,
2296
+ remove_first: oi,
2297
+ remove_last: ai,
2298
+ rstrip: li,
2299
+ split: hi,
2300
+ strip: ci,
2301
+ strip_newlines: ui,
2302
+ capitalize: di,
2303
+ replace: fi,
2304
+ replace_first: pi,
2305
+ replace_last: gi,
2306
+ truncate: mi,
2307
+ truncatewords: yi,
2308
+ normalize_whitespace: wi,
2309
+ number_of_words: Ti,
2310
+ array_to_sentence_string: ki
2311
+ });
2312
+ const xi = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Is), mr), vr), Jr), Kr), bi), at);
2313
+ class _i extends m {
2314
+ constructor(e, s, r) {
2315
+ super(e, s, r), this.key = this.tokenizer.readIdentifier().content, this.tokenizer.assert(this.key, "expected variable name"), this.tokenizer.skipBlank(), this.tokenizer.assert(this.tokenizer.peek() === "=", 'expected "="'), this.tokenizer.advance(), this.value = new L(this.tokenizer.readFilteredValue(), this.liquid);
2316
+ }
2317
+ *render(e) {
2318
+ e.bottom()[this.key] = yield this.value.value(e, this.liquid.options.lenientIf);
2319
+ }
2320
+ }
2321
+ const je = ["offset", "limit", "reversed"];
2322
+ class vi extends m {
2323
+ constructor(e, s, r, i) {
2324
+ super(e, s, r);
2325
+ const n = this.tokenizer.readIdentifier(), o = this.tokenizer.readIdentifier(), a = this.tokenizer.readValue();
2326
+ if (!n.size() || o.content !== "in" || !a)
2327
+ throw new Error(`illegal tag: ${e.getText()}`);
2328
+ this.variable = n.content, this.collection = a, this.hash = new W(this.tokenizer.remaining(), r.options.keyValueSeparator), this.templates = [], this.elseTemplates = [];
2329
+ let l;
2330
+ const h = i.parseStream(s).on("start", () => l = this.templates).on("tag:else", (u) => {
2331
+ K(u.args), l = this.elseTemplates;
2332
+ }).on("tag:endfor", (u) => {
2333
+ K(u.args), h.stop();
2334
+ }).on("template", (u) => l.push(u)).on("end", () => {
2335
+ throw new Error(`tag ${e.getText()} not closed`);
2336
+ });
2337
+ h.start();
2338
+ }
2339
+ *render(e, s) {
2340
+ const r = this.liquid.renderer;
2341
+ let i = ue(yield y(this.collection, e));
2342
+ if (!i.length) {
2343
+ yield r.renderTemplates(this.elseTemplates, e, s);
2344
+ return;
2345
+ }
2346
+ const n = "continue-" + this.variable + "-" + this.collection.getText();
2347
+ e.push({ continue: e.getRegister(n) });
2348
+ const o = yield this.hash.render(e);
2349
+ e.pop(), i = (this.liquid.options.orderedFilterParameters ? Object.keys(o).filter((h) => je.includes(h)) : je.filter((h) => o[h] !== void 0)).reduce((h, u) => u === "offset" ? Fi(h, o.offset) : u === "limit" ? Si(h, o.limit) : Li(h), i), e.setRegister(n, (o.offset || 0) + i.length);
2350
+ const l = { forloop: new pe(i.length, this.collection.getText(), this.variable) };
2351
+ e.push(l);
2352
+ for (const h of i) {
2353
+ if (l[this.variable] = h, yield r.renderTemplates(this.templates, e, s), s.break) {
2354
+ s.break = !1;
2355
+ break;
2356
+ }
2357
+ s.continue = !1, l.forloop.next();
2358
+ }
2359
+ e.pop();
2360
+ }
2361
+ }
2362
+ function Li(t) {
2363
+ return [...t].reverse();
2364
+ }
2365
+ function Fi(t, e) {
2366
+ return t.slice(e);
2367
+ }
2368
+ function Si(t, e) {
2369
+ return t.slice(0, e);
2370
+ }
2371
+ class Oi extends m {
2372
+ constructor(e, s, r, i) {
2373
+ for (super(e, s, r), this.templates = [], this.variable = this.readVariableName(); s.length; ) {
2374
+ const n = s.shift();
2375
+ if (j(n) && n.name === "endcapture")
2376
+ return;
2377
+ this.templates.push(i.parseToken(n, s));
2378
+ }
2379
+ throw new Error(`tag ${e.getText()} not closed`);
2380
+ }
2381
+ *render(e) {
2382
+ const r = yield this.liquid.renderer.renderTemplates(this.templates, e);
2383
+ e.bottom()[this.variable] = r;
2384
+ }
2385
+ readVariableName() {
2386
+ const e = this.tokenizer.readIdentifier().content;
2387
+ if (e)
2388
+ return e;
2389
+ const s = this.tokenizer.readQuoted();
2390
+ if (s)
2391
+ return nt(s);
2392
+ throw this.tokenizer.error("invalid capture name");
2393
+ }
2394
+ }
2395
+ class Ri extends m {
2396
+ constructor(e, s, r, i) {
2397
+ super(e, s, r), this.branches = [], this.elseTemplates = [], this.value = new L(this.tokenizer.readFilteredValue(), this.liquid), this.elseTemplates = [];
2398
+ let n = [], o = 0;
2399
+ const a = i.parseStream(s).on("tag:when", (l) => {
2400
+ if (o > 0)
2401
+ return;
2402
+ n = [];
2403
+ const h = [];
2404
+ for (; !l.tokenizer.end(); )
2405
+ h.push(l.tokenizer.readValueOrThrow()), l.tokenizer.skipBlank(), l.tokenizer.peek() === "," ? l.tokenizer.readTo(",") : l.tokenizer.readTo("or");
2406
+ this.branches.push({
2407
+ values: h,
2408
+ templates: n
2409
+ });
2410
+ }).on("tag:else", () => {
2411
+ o++, n = this.elseTemplates;
2412
+ }).on("tag:endcase", () => a.stop()).on("template", (l) => {
2413
+ (n !== this.elseTemplates || o === 1) && n.push(l);
2414
+ }).on("end", () => {
2415
+ throw new Error(`tag ${e.getText()} not closed`);
2416
+ });
2417
+ a.start();
2418
+ }
2419
+ *render(e, s) {
2420
+ const r = this.liquid.renderer, i = d(yield this.value.value(e, e.opts.lenientIf));
2421
+ let n = !1;
2422
+ for (const o of this.branches)
2423
+ for (const a of o.values) {
2424
+ const l = yield y(a, e, e.opts.lenientIf);
2425
+ if (P(i, l)) {
2426
+ yield r.renderTemplates(o.templates, e, s), n = !0;
2427
+ break;
2428
+ }
2429
+ }
2430
+ n || (yield r.renderTemplates(this.elseTemplates, e, s));
2431
+ }
2432
+ }
2433
+ class Ei extends m {
2434
+ constructor(e, s, r) {
2435
+ for (super(e, s, r); s.length; ) {
2436
+ const i = s.shift();
2437
+ if (j(i) && i.name === "endcomment")
2438
+ return;
2439
+ }
2440
+ throw new Error(`tag ${e.getText()} not closed`);
2441
+ }
2442
+ render() {
2443
+ }
2444
+ }
2445
+ class zi extends m {
2446
+ constructor(e, s, r, i) {
2447
+ super(e, s, r);
2448
+ const n = this.tokenizer;
2449
+ for (this.file = Te(n, this.liquid, i), this.currentFile = e.file; !n.end(); ) {
2450
+ n.skipBlank();
2451
+ const o = n.p, a = n.readIdentifier();
2452
+ if ((a.content === "with" || a.content === "for") && (n.skipBlank(), n.peek() !== ":")) {
2453
+ const l = n.readValue();
2454
+ if (l) {
2455
+ const h = n.p, u = n.readIdentifier();
2456
+ let p;
2457
+ u.content === "as" ? p = n.readIdentifier() : n.p = h, this[a.content] = { value: l, alias: p && p.content }, n.skipBlank(), n.peek() === "," && n.advance();
2458
+ continue;
2459
+ }
2460
+ }
2461
+ n.p = o;
2462
+ break;
2463
+ }
2464
+ this.hash = new W(n.remaining(), r.options.keyValueSeparator);
2465
+ }
2466
+ *render(e, s) {
2467
+ const { liquid: r, hash: i } = this, n = yield ke(this.file, e, r);
2468
+ b(n, () => `illegal file path "${n}"`);
2469
+ const o = e.spawn(), a = o.bottom();
2470
+ if (ee(a, yield i.render(e)), this.with) {
2471
+ const { value: l, alias: h } = this.with;
2472
+ a[h || n] = yield y(l, e);
2473
+ }
2474
+ if (this.for) {
2475
+ const { value: l, alias: h } = this.for, u = ue(yield y(l, e));
2476
+ a.forloop = new pe(u.length, l.getText(), h);
2477
+ for (const p of u) {
2478
+ a[h] = p;
2479
+ const S = yield r._parsePartialFile(n, o.sync, this.currentFile);
2480
+ yield r.renderer.renderTemplates(S, o, s), a.forloop.next();
2481
+ }
2482
+ } else {
2483
+ const l = yield r._parsePartialFile(n, o.sync, this.currentFile);
2484
+ yield r.renderer.renderTemplates(l, o, s);
2485
+ }
2486
+ }
2487
+ }
2488
+ function Te(t, e, s) {
2489
+ if (e.options.dynamicPartials) {
2490
+ const n = t.readValue();
2491
+ if (t.assert(n, "illegal file path"), n.getText() === "none")
2492
+ return;
2493
+ if (Gs(n)) {
2494
+ const o = s.parse(nt(n));
2495
+ return Ue(o);
2496
+ }
2497
+ return n;
2498
+ }
2499
+ const r = [...t.readFileNameTemplate(e.options)], i = Ue(s.parseTokens(r));
2500
+ return i === "none" ? void 0 : i;
2501
+ }
2502
+ function Ue(t) {
2503
+ return t.length === 1 && ye(t[0].token) ? t[0].token.getContent() : t;
2504
+ }
2505
+ function* ke(t, e, s) {
2506
+ return typeof t == "string" ? t : Array.isArray(t) ? s.renderer.renderTemplates(t, e) : yield y(t, e);
2507
+ }
2508
+ class Ni extends m {
2509
+ constructor(e, s, r, i) {
2510
+ super(e, s, r);
2511
+ const { tokenizer: n } = e;
2512
+ this.file = Te(n, this.liquid, i), this.currentFile = e.file;
2513
+ const o = n.p;
2514
+ n.readIdentifier().content === "with" ? (n.skipBlank(), n.peek() !== ":" ? this.withVar = n.readValue() : n.p = o) : n.p = o, this.hash = new W(n.remaining(), r.options.jekyllInclude || r.options.keyValueSeparator);
2515
+ }
2516
+ *render(e, s) {
2517
+ const { liquid: r, hash: i, withVar: n } = this, { renderer: o } = r, a = yield ke(this.file, e, r);
2518
+ b(a, () => `illegal file path "${a}"`);
2519
+ const l = e.saveRegister("blocks", "blockMode");
2520
+ e.setRegister("blocks", {}), e.setRegister("blockMode", C.OUTPUT);
2521
+ const h = yield i.render(e);
2522
+ n && (h[a] = yield y(n, e));
2523
+ const u = yield r._parsePartialFile(a, e.sync, this.currentFile);
2524
+ e.push(e.opts.jekyllInclude ? { include: h } : h), yield o.renderTemplates(u, e, s), e.pop(), e.restoreRegister(l);
2525
+ }
2526
+ }
2527
+ class Di extends m {
2528
+ constructor(e, s, r) {
2529
+ super(e, s, r), this.variable = this.tokenizer.readIdentifier().content;
2530
+ }
2531
+ render(e, s) {
2532
+ const r = e.environments;
2533
+ de(r[this.variable]) || (r[this.variable] = 0), s.write(c(--r[this.variable]));
2534
+ }
2535
+ }
2536
+ class qi extends m {
2537
+ constructor(e, s, r) {
2538
+ super(e, s, r), this.candidates = [];
2539
+ const i = this.tokenizer.readValue();
2540
+ for (this.tokenizer.skipBlank(), i && (this.tokenizer.peek() === ":" ? (this.group = i, this.tokenizer.advance()) : this.candidates.push(i)); !this.tokenizer.end(); ) {
2541
+ const n = this.tokenizer.readValue();
2542
+ n && this.candidates.push(n), this.tokenizer.readTo(",");
2543
+ }
2544
+ this.tokenizer.assert(this.candidates.length, () => `empty candidates: "${e.getText()}"`);
2545
+ }
2546
+ *render(e, s) {
2547
+ const i = `cycle:${yield y(this.group, e)}:` + this.candidates.join(","), n = e.getRegister("cycle");
2548
+ let o = n[i];
2549
+ o === void 0 && (o = n[i] = 0);
2550
+ const a = this.candidates[o];
2551
+ return o = (o + 1) % this.candidates.length, n[i] = o, yield y(a, e);
2552
+ }
2553
+ }
2554
+ class Mi extends m {
2555
+ constructor(e, s, r, i) {
2556
+ super(e, s, r), this.branches = [];
2557
+ let n = [];
2558
+ i.parseStream(s).on("start", () => this.branches.push({
2559
+ value: new L(e.args, this.liquid),
2560
+ templates: n = []
2561
+ })).on("tag:elsif", (o) => {
2562
+ b(!this.elseTemplates, "unexpected elsif after else"), this.branches.push({
2563
+ value: new L(o.args, this.liquid),
2564
+ templates: n = []
2565
+ });
2566
+ }).on("tag:else", (o) => {
2567
+ K(o.args), b(!this.elseTemplates, "duplicated else"), n = this.elseTemplates = [];
2568
+ }).on("tag:endif", function(o) {
2569
+ K(o.args), this.stop();
2570
+ }).on("template", (o) => n.push(o)).on("end", () => {
2571
+ throw new Error(`tag ${e.getText()} not closed`);
2572
+ }).start();
2573
+ }
2574
+ *render(e, s) {
2575
+ const r = this.liquid.renderer;
2576
+ for (const { value: i, templates: n } of this.branches) {
2577
+ const o = yield i.value(e, e.opts.lenientIf);
2578
+ if ($(o, e)) {
2579
+ yield r.renderTemplates(n, e, s);
2580
+ return;
2581
+ }
2582
+ }
2583
+ yield r.renderTemplates(this.elseTemplates || [], e, s);
2584
+ }
2585
+ }
2586
+ class Ii extends m {
2587
+ constructor(e, s, r) {
2588
+ super(e, s, r), this.variable = this.tokenizer.readIdentifier().content;
2589
+ }
2590
+ render(e, s) {
2591
+ const r = e.environments;
2592
+ de(r[this.variable]) || (r[this.variable] = 0);
2593
+ const i = r[this.variable];
2594
+ r[this.variable]++, s.write(c(i));
2595
+ }
2596
+ }
2597
+ class $i extends m {
2598
+ constructor(e, s, r, i) {
2599
+ super(e, s, r), this.file = Te(this.tokenizer, this.liquid, i), this.currentFile = e.file, this.args = new W(this.tokenizer.remaining(), r.options.keyValueSeparator), this.templates = i.parseTokens(s);
2600
+ }
2601
+ *render(e, s) {
2602
+ const { liquid: r, args: i, file: n } = this, { renderer: o } = r;
2603
+ if (n === void 0) {
2604
+ e.setRegister("blockMode", C.OUTPUT), yield o.renderTemplates(this.templates, e, s);
2605
+ return;
2606
+ }
2607
+ const a = yield ke(this.file, e, r);
2608
+ b(a, () => `illegal file path "${a}"`);
2609
+ const l = yield r._parseLayoutFile(a, e.sync, this.currentFile);
2610
+ e.setRegister("blockMode", C.STORE);
2611
+ const h = yield o.renderTemplates(this.templates, e), u = e.getRegister("blocks");
2612
+ u[""] === void 0 && (u[""] = (p, S) => S.write(h)), e.setRegister("blockMode", C.OUTPUT), e.push(yield i.render(e)), yield o.renderTemplates(l, e, s), e.pop();
2613
+ }
2614
+ }
2615
+ class Pi extends m {
2616
+ constructor(e, s, r, i) {
2617
+ super(e, s, r), this.templates = [];
2618
+ const n = /\w+/.exec(e.args);
2619
+ for (this.block = n ? n[0] : ""; s.length; ) {
2620
+ const o = s.shift();
2621
+ if (j(o) && o.name === "endblock")
2622
+ return;
2623
+ const a = i.parseToken(o, s);
2624
+ this.templates.push(a);
2625
+ }
2626
+ throw new Error(`tag ${e.getText()} not closed`);
2627
+ }
2628
+ *render(e, s) {
2629
+ const r = this.getBlockRender(e);
2630
+ e.getRegister("blockMode") === C.STORE ? e.getRegister("blocks")[this.block] = r : yield r(new Se(), s);
2631
+ }
2632
+ getBlockRender(e) {
2633
+ const { liquid: s, templates: r } = this, i = e.getRegister("blocks")[this.block], n = function* (o, a) {
2634
+ e.push({ block: o }), yield s.renderer.renderTemplates(r, e, a), e.pop();
2635
+ };
2636
+ return i ? (o, a) => i(new Se(() => n(o, a)), a) : n;
2637
+ }
2638
+ }
2639
+ class Ci extends m {
2640
+ constructor(e, s, r) {
2641
+ for (super(e, s, r), this.tokens = []; s.length; ) {
2642
+ const i = s.shift();
2643
+ if (j(i) && i.name === "endraw")
2644
+ return;
2645
+ this.tokens.push(i);
2646
+ }
2647
+ throw new Error(`tag ${e.getText()} not closed`);
2648
+ }
2649
+ render() {
2650
+ return this.tokens.map((e) => e.getText()).join("");
2651
+ }
2652
+ }
2653
+ class Ai extends pe {
2654
+ constructor(e, s, r, i) {
2655
+ super(e, r, i), this.length = e, this.cols = s;
2656
+ }
2657
+ row() {
2658
+ return Math.floor(this.i / this.cols) + 1;
2659
+ }
2660
+ col0() {
2661
+ return this.i % this.cols;
2662
+ }
2663
+ col() {
2664
+ return this.col0() + 1;
2665
+ }
2666
+ col_first() {
2667
+ return this.col0() === 0;
2668
+ }
2669
+ col_last() {
2670
+ return this.col() === this.cols;
2671
+ }
2672
+ }
2673
+ class Vi extends m {
2674
+ constructor(e, s, r, i) {
2675
+ super(e, s, r);
2676
+ const n = this.tokenizer.readIdentifier();
2677
+ this.tokenizer.skipBlank();
2678
+ const o = this.tokenizer.readIdentifier(), a = this.tokenizer.readValue();
2679
+ if (o.content !== "in" || !a)
2680
+ throw new Error(`illegal tag: ${e.getText()}`);
2681
+ this.variable = n.content, this.collection = a, this.args = new W(this.tokenizer.remaining(), r.options.keyValueSeparator), this.templates = [];
2682
+ let l;
2683
+ const h = i.parseStream(s).on("start", () => l = this.templates).on("tag:endtablerow", () => h.stop()).on("template", (u) => l.push(u)).on("end", () => {
2684
+ throw new Error(`tag ${e.getText()} not closed`);
2685
+ });
2686
+ h.start();
2687
+ }
2688
+ *render(e, s) {
2689
+ let r = ue(yield y(this.collection, e));
2690
+ const i = yield this.args.render(e), n = i.offset || 0, o = i.limit === void 0 ? r.length : i.limit;
2691
+ r = r.slice(n, n + o);
2692
+ const a = i.cols || r.length, l = this.liquid.renderer, h = new Ai(r.length, a, this.collection.getText(), this.variable), u = { tablerowloop: h };
2693
+ e.push(u);
2694
+ for (let p = 0; p < r.length; p++, h.next())
2695
+ u[this.variable] = r[p], h.col0() === 0 && (h.row() !== 1 && s.write("</tr>"), s.write(`<tr class="row${h.row()}">`)), s.write(`<td class="col${h.col()}">`), yield l.renderTemplates(this.templates, e, s), s.write("</td>");
2696
+ r.length && s.write("</tr>"), e.pop();
2697
+ }
2698
+ }
2699
+ class Bi extends m {
2700
+ constructor(e, s, r, i) {
2701
+ super(e, s, r), this.branches = [], this.elseTemplates = [];
2702
+ let n = [], o = 0;
2703
+ i.parseStream(s).on("start", () => this.branches.push({
2704
+ value: new L(e.args, this.liquid),
2705
+ test: re,
2706
+ templates: n = []
2707
+ })).on("tag:elsif", (a) => {
2708
+ if (o > 0) {
2709
+ n = [];
2710
+ return;
2711
+ }
2712
+ this.branches.push({
2713
+ value: new L(a.args, this.liquid),
2714
+ test: $,
2715
+ templates: n = []
2716
+ });
2717
+ }).on("tag:else", () => {
2718
+ o++, n = this.elseTemplates;
2719
+ }).on("tag:endunless", function() {
2720
+ this.stop();
2721
+ }).on("template", (a) => {
2722
+ (n !== this.elseTemplates || o === 1) && n.push(a);
2723
+ }).on("end", () => {
2724
+ throw new Error(`tag ${e.getText()} not closed`);
2725
+ }).start();
2726
+ }
2727
+ *render(e, s) {
2728
+ const r = this.liquid.renderer;
2729
+ for (const { value: i, test: n, templates: o } of this.branches) {
2730
+ const a = yield i.value(e, e.opts.lenientIf);
2731
+ if (n(a, e)) {
2732
+ yield r.renderTemplates(o, e, s);
2733
+ return;
2734
+ }
2735
+ }
2736
+ yield r.renderTemplates(this.elseTemplates, e, s);
2737
+ }
2738
+ }
2739
+ class ji extends m {
2740
+ render(e, s) {
2741
+ s.break = !0;
2742
+ }
2743
+ }
2744
+ class Ui extends m {
2745
+ render(e, s) {
2746
+ s.continue = !0;
2747
+ }
2748
+ }
2749
+ class Hi extends m {
2750
+ constructor(e, s, r) {
2751
+ super(e, s, r), this.tokenizer.skipBlank(), this.tokenizer.end() || (this.value = new L(this.tokenizer.readFilteredValue(), this.liquid));
2752
+ }
2753
+ *render(e, s) {
2754
+ if (!this.value)
2755
+ return;
2756
+ const r = yield this.value.value(e, !1);
2757
+ s.write(r);
2758
+ }
2759
+ }
2760
+ class Wi extends m {
2761
+ constructor(e, s, r, i) {
2762
+ super(e, s, r);
2763
+ const n = this.tokenizer.readLiquidTagTokens(this.liquid.options);
2764
+ this.templates = i.parseTokens(n);
2765
+ }
2766
+ *render(e, s) {
2767
+ yield this.liquid.renderer.renderTemplates(this.templates, e, s);
2768
+ }
2769
+ }
2770
+ class Yi extends m {
2771
+ constructor(e, s, r) {
2772
+ if (super(e, s, r), e.args.search(/\n\s*[^#\s]/g) !== -1)
2773
+ throw new Error("every line of an inline comment must start with a '#' character");
2774
+ }
2775
+ render() {
2776
+ }
2777
+ }
2778
+ const Ji = {
2779
+ assign: _i,
2780
+ for: vi,
2781
+ capture: Oi,
2782
+ case: Ri,
2783
+ comment: Ei,
2784
+ include: Ni,
2785
+ render: zi,
2786
+ decrement: Di,
2787
+ increment: Ii,
2788
+ cycle: qi,
2789
+ if: Mi,
2790
+ layout: $i,
2791
+ block: Pi,
2792
+ raw: Ci,
2793
+ tablerow: Vi,
2794
+ unless: Bi,
2795
+ break: ji,
2796
+ continue: Ui,
2797
+ echo: Hi,
2798
+ liquid: Wi,
2799
+ "#": Yi
2800
+ };
2801
+ class ft {
2802
+ constructor(e = {}) {
2803
+ this.renderer = new cs(), this.filters = {}, this.tags = {}, this.options = Ps(e), this.parser = new M(this), _e(Ji, (s, r) => this.registerTag(r, s)), _e(xi, (s, r) => this.registerFilter(r, s));
2804
+ }
2805
+ parse(e, s) {
2806
+ return new M(this).parse(e, s);
2807
+ }
2808
+ _render(e, s, r) {
2809
+ const i = s instanceof I ? s : new I(s, this.options, r);
2810
+ return this.renderer.renderTemplates(e, i);
2811
+ }
2812
+ render(e, s, r) {
2813
+ return O(this, void 0, void 0, function* () {
2814
+ return N(this._render(e, s, Object.assign(Object.assign({}, r), { sync: !1 })));
2815
+ });
2816
+ }
2817
+ renderSync(e, s, r) {
2818
+ return D(this._render(e, s, Object.assign(Object.assign({}, r), { sync: !0 })));
2819
+ }
2820
+ renderToNodeStream(e, s, r = {}) {
2821
+ const i = new I(s, this.options, r);
2822
+ return this.renderer.renderTemplatesToNodeStream(e, i);
2823
+ }
2824
+ _parseAndRender(e, s, r) {
2825
+ const i = this.parse(e);
2826
+ return this._render(i, s, r);
2827
+ }
2828
+ parseAndRender(e, s, r) {
2829
+ return O(this, void 0, void 0, function* () {
2830
+ return N(this._parseAndRender(e, s, Object.assign(Object.assign({}, r), { sync: !1 })));
2831
+ });
2832
+ }
2833
+ parseAndRenderSync(e, s, r) {
2834
+ return D(this._parseAndRender(e, s, Object.assign(Object.assign({}, r), { sync: !0 })));
2835
+ }
2836
+ _parsePartialFile(e, s, r) {
2837
+ return new M(this).parseFile(e, s, A.Partials, r);
2838
+ }
2839
+ _parseLayoutFile(e, s, r) {
2840
+ return new M(this).parseFile(e, s, A.Layouts, r);
2841
+ }
2842
+ _parseFile(e, s, r, i) {
2843
+ return new M(this).parseFile(e, s, r, i);
2844
+ }
2845
+ parseFile(e, s) {
2846
+ return O(this, void 0, void 0, function* () {
2847
+ return N(new M(this).parseFile(e, !1, s));
2848
+ });
2849
+ }
2850
+ parseFileSync(e, s) {
2851
+ return D(new M(this).parseFile(e, !0, s));
2852
+ }
2853
+ *_renderFile(e, s, r) {
2854
+ const i = yield this._parseFile(e, r.sync, r.lookupType);
2855
+ return yield this._render(i, s, r);
2856
+ }
2857
+ renderFile(e, s, r) {
2858
+ return O(this, void 0, void 0, function* () {
2859
+ return N(this._renderFile(e, s, Object.assign(Object.assign({}, r), { sync: !1 })));
2860
+ });
2861
+ }
2862
+ renderFileSync(e, s, r) {
2863
+ return D(this._renderFile(e, s, Object.assign(Object.assign({}, r), { sync: !0 })));
2864
+ }
2865
+ renderFileToNodeStream(e, s, r) {
2866
+ return O(this, void 0, void 0, function* () {
2867
+ const i = yield this.parseFile(e);
2868
+ return this.renderToNodeStream(i, s, r);
2869
+ });
2870
+ }
2871
+ _evalValue(e, s) {
2872
+ const r = new L(e, this), i = s instanceof I ? s : new I(s, this.options);
2873
+ return r.value(i);
2874
+ }
2875
+ evalValue(e, s) {
2876
+ return O(this, void 0, void 0, function* () {
2877
+ return N(this._evalValue(e, s));
2878
+ });
2879
+ }
2880
+ evalValueSync(e, s) {
2881
+ return D(this._evalValue(e, s));
2882
+ }
2883
+ registerFilter(e, s) {
2884
+ this.filters[e] = s;
2885
+ }
2886
+ registerTag(e, s) {
2887
+ this.tags[e] = w(s) ? s : Us(s);
2888
+ }
2889
+ plugin(e) {
2890
+ return e.call(this, ft);
2891
+ }
2892
+ express() {
2893
+ const e = this;
2894
+ let s = !0;
2895
+ return function(r, i, n) {
2896
+ if (s) {
2897
+ s = !1;
2898
+ const o = G(this.root);
2899
+ e.options.root.unshift(...o), e.options.layouts.unshift(...o), e.options.partials.unshift(...o);
2900
+ }
2901
+ e.renderFile(r, i).then((o) => n(null, o), n);
2902
+ };
2903
+ }
2904
+ }
2905
+ export {
2906
+ ft as L
2907
+ };