gather-vue 8.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/README.md +64 -0
  2. package/dist/.htaccess +1 -0
  3. package/dist/App-B7KWoHRH.js +160 -0
  4. package/dist/App-B7KWoHRH.js.gz +0 -0
  5. package/dist/App-C03tW0-W.js +405 -0
  6. package/dist/App-C03tW0-W.js.gz +0 -0
  7. package/dist/BannerExample-CRj1iMwh.js +77 -0
  8. package/dist/BannerExample-CRj1iMwh.js.gz +0 -0
  9. package/dist/BannerExample-DLN6d9M0.js +84 -0
  10. package/dist/BannerExample-DLN6d9M0.js.gz +0 -0
  11. package/dist/CallToAction-BbJ-zDFa.js +3493 -0
  12. package/dist/CallToAction-BbJ-zDFa.js.gz +0 -0
  13. package/dist/CallToAction-jAi8aaI-.js +35 -0
  14. package/dist/CallToAction-jAi8aaI-.js.gz +0 -0
  15. package/dist/Card-B1Pdd5BL.js +202 -0
  16. package/dist/Card-B1Pdd5BL.js.gz +0 -0
  17. package/dist/Card-qMo1jrfb.js +699 -0
  18. package/dist/Card-qMo1jrfb.js.gz +0 -0
  19. package/dist/CloseCardButton-CL_3xkAF.js +71 -0
  20. package/dist/CloseCardButton-CL_3xkAF.js.gz +0 -0
  21. package/dist/Editor-DXSZFkEM.js +149 -0
  22. package/dist/Editor-DXSZFkEM.js.gz +0 -0
  23. package/dist/EmailExistsView-CX1ijN0R.js +72 -0
  24. package/dist/EmailExistsView-CX1ijN0R.js.gz +0 -0
  25. package/dist/EmailInvitation-BVFicmrK.js +22 -0
  26. package/dist/EmailView-DdaSnKFq.js +84 -0
  27. package/dist/EmailView-DdaSnKFq.js.gz +0 -0
  28. package/dist/FriendBannerExample-C8QmPZyP.js +76 -0
  29. package/dist/FriendBannerExample-C8QmPZyP.js.gz +0 -0
  30. package/dist/FriendConfirmation-B-RemAoP.js +22 -0
  31. package/dist/FriendForm-CunLFX_H.js +255 -0
  32. package/dist/FriendForm-CunLFX_H.js.gz +0 -0
  33. package/dist/FriendOptIn-bp4udUYv.js +27 -0
  34. package/dist/FriendPending-cFjgyL8g.js +22 -0
  35. package/dist/FriendPitch-BhSs2eLR.js +19 -0
  36. package/dist/FriendPitch-CAS1c3Co.js +33 -0
  37. package/dist/FriendSuccess-uxEdomAY.js +22 -0
  38. package/dist/Invitations-hprUCIvW.js +27 -0
  39. package/dist/InviteRoot-Dima8d2G.js +252 -0
  40. package/dist/InviteRoot-Dima8d2G.js.gz +0 -0
  41. package/dist/LaunchButton-BQw42WVn.js +18 -0
  42. package/dist/MazBtn.1qp5aQ4N-DU0ii1Xr.js +103 -0
  43. package/dist/MazBtn.1qp5aQ4N-DU0ii1Xr.js.gz +0 -0
  44. package/dist/MazCheckbox.UAnkvAoS-pse3PCQf.js +149 -0
  45. package/dist/MazCheckbox.UAnkvAoS-pse3PCQf.js.gz +0 -0
  46. package/dist/MazIcon.B5hPzeLk-C20gse35.js +103 -0
  47. package/dist/MazIcon.B5hPzeLk-C20gse35.js.gz +0 -0
  48. package/dist/MazPhoneNumberInput-Cz50Ts4U.js +4751 -0
  49. package/dist/MazPhoneNumberInput-Cz50Ts4U.js.gz +0 -0
  50. package/dist/MazSpinner.DZT5jj-c-y1IYJMcd.js +34 -0
  51. package/dist/MazSpinner.DZT5jj-c-y1IYJMcd.js.gz +0 -0
  52. package/dist/Menu-BsKr40BO.js +21377 -0
  53. package/dist/Menu-BsKr40BO.js.gz +0 -0
  54. package/dist/Message-D4PAgcHO.js +22 -0
  55. package/dist/MessageCard-CC74qCir.js +74 -0
  56. package/dist/MessageCard-CC74qCir.js.gz +0 -0
  57. package/dist/MessageView-BKAIrwj7.js +88 -0
  58. package/dist/MessageView-BKAIrwj7.js.gz +0 -0
  59. package/dist/PendingApprovalCard-Dzs0UxBO.js +48 -0
  60. package/dist/PendingApprovalCard-Dzs0UxBO.js.gz +0 -0
  61. package/dist/PendingApprovalView-V-OUYSnK.js +33 -0
  62. package/dist/ReferralButton-CEue5qud.js +18 -0
  63. package/dist/ReferralFailedView-3Ua13t4V.js +74 -0
  64. package/dist/ReferralFailedView-3Ua13t4V.js.gz +0 -0
  65. package/dist/ReferredConfirmCard-iwgkcZCm.js +48 -0
  66. package/dist/ReferredConfirmCard-iwgkcZCm.js.gz +0 -0
  67. package/dist/ReferredConfirmView-DS1RNBwP.js +33 -0
  68. package/dist/ReferredSuccessCard-Dg-a4FYr.js +209 -0
  69. package/dist/ReferredSuccessCard-Dg-a4FYr.js.gz +0 -0
  70. package/dist/ReferredSuccessView-ChVztlUr.js +33 -0
  71. package/dist/ReferredView-7HezoVIA.js +98 -0
  72. package/dist/ReferredView-7HezoVIA.js.gz +0 -0
  73. package/dist/RewardCard-CwU2X2Yo.js +197 -0
  74. package/dist/RewardCard-CwU2X2Yo.js.gz +0 -0
  75. package/dist/Rewards-DdyEwCyy.js +27 -0
  76. package/dist/RewardsRoot-CnQfyjC6.js +198 -0
  77. package/dist/RewardsRoot-CnQfyjC6.js.gz +0 -0
  78. package/dist/Root-bUfnZpPP.js +17 -0
  79. package/dist/ShareInvitation-SAgC-8YA.js +22 -0
  80. package/dist/SignIn-CroW3mY6.js +36 -0
  81. package/dist/SignIn-CroW3mY6.js.gz +0 -0
  82. package/dist/SignIn-g32Hg2or.js +17 -0
  83. package/dist/SignInTextArea-DBRk6x09.js +17 -0
  84. package/dist/SignUpFormCard-Cail4V4M.js +287 -0
  85. package/dist/SignUpFormCard-Cail4V4M.js.gz +0 -0
  86. package/dist/SignUpView-a7LPgEeX.js +368 -0
  87. package/dist/SignUpView-a7LPgEeX.js.gz +0 -0
  88. package/dist/SignUpView-uujOX5hN.js +103 -0
  89. package/dist/SignUpView-uujOX5hN.js.gz +0 -0
  90. package/dist/SocialView-CbBZTB7Z.js +87 -0
  91. package/dist/SocialView-CbBZTB7Z.js.gz +0 -0
  92. package/dist/Stats-DtS-GXsI.js +22 -0
  93. package/dist/StatsView-fX-VznRc.js +90 -0
  94. package/dist/StatsView-fX-VznRc.js.gz +0 -0
  95. package/dist/Success-k06CZz0K.js +40 -0
  96. package/dist/Success-k06CZz0K.js.gz +0 -0
  97. package/dist/SuccessCard-C1iF1j2W.js +219 -0
  98. package/dist/SuccessCard-C1iF1j2W.js.gz +0 -0
  99. package/dist/SuccessView-CDUVkpSQ.js +77 -0
  100. package/dist/SuccessView-CDUVkpSQ.js.gz +0 -0
  101. package/dist/TextArea-DFfa9A93.js +17 -0
  102. package/dist/TextAreaCard-D_VfEHME.js +34 -0
  103. package/dist/TextAreaCard-D_VfEHME.js.gz +0 -0
  104. package/dist/UserView-DnD929IT.js +96 -0
  105. package/dist/UserView-DnD929IT.js.gz +0 -0
  106. package/dist/WhatsAppShare-B40Ouvds.js +59 -0
  107. package/dist/WhatsAppShare-B40Ouvds.js.gz +0 -0
  108. package/dist/agent-session-Xh6dZlhc.js +298 -0
  109. package/dist/agent-session-Xh6dZlhc.js.gz +0 -0
  110. package/dist/aggregate-base-C6N8Ymd5.js +830 -0
  111. package/dist/aggregate-base-C6N8Ymd5.js.gz +0 -0
  112. package/dist/bel-serializer-DMbFBZ6U.js +51 -0
  113. package/dist/bel-serializer-DMbFBZ6U.js.gz +0 -0
  114. package/dist/browser-q7cvfJ-2.js +366 -0
  115. package/dist/browser-q7cvfJ-2.js.gz +0 -0
  116. package/dist/cart.js +5 -0
  117. package/dist/cart.js.gz +0 -0
  118. package/dist/check.C9Q_W85g-DmgtOx7Q.js +30 -0
  119. package/dist/chevron-down.BkvtON3b-RNrTKYcy.js +30 -0
  120. package/dist/content-5VAQ1vQ0.js +4 -0
  121. package/dist/event-origin-BSW5uum9.js +13 -0
  122. package/dist/examples.mobile.json.tW3aL0qI-tW3aL0qI.js +4 -0
  123. package/dist/examples.mobile.json.tW3aL0qI-tW3aL0qI.js.gz +0 -0
  124. package/dist/eye-slash.BoO00xzs-CULY_lvM.js +30 -0
  125. package/dist/eye.f8zAUc30-Yr89kafZ.js +43 -0
  126. package/dist/eye.f8zAUc30-Yr89kafZ.js.gz +0 -0
  127. package/dist/favicon.ico +0 -0
  128. package/dist/first-paint-B61SrVKm.js +453 -0
  129. package/dist/first-paint-B61SrVKm.js.gz +0 -0
  130. package/dist/gather-vue.css +5 -0
  131. package/dist/gather-vue.css.gz +0 -0
  132. package/dist/gather-widget.es.js +5 -0
  133. package/dist/gather-widget.umd.js +263 -0
  134. package/dist/gather-widget.umd.js.gz +0 -0
  135. package/dist/gather_widget.css +58 -0
  136. package/dist/gather_widget.css.gz +0 -0
  137. package/dist/gather_widget.js +72 -0
  138. package/dist/gather_widget.js.gz +0 -0
  139. package/dist/iframe-BELrOJ1p.js +6 -0
  140. package/dist/index-3lvNtPTE.js +327 -0
  141. package/dist/index-3lvNtPTE.js.gz +0 -0
  142. package/dist/index-BDyGxL1x.js +255 -0
  143. package/dist/index-BDyGxL1x.js.gz +0 -0
  144. package/dist/index-BF9haAFD.js +343 -0
  145. package/dist/index-BF9haAFD.js.gz +0 -0
  146. package/dist/index-BMIST_QA.js +128 -0
  147. package/dist/index-BMIST_QA.js.gz +0 -0
  148. package/dist/index-BdWnMhAc.js +235 -0
  149. package/dist/index-BdWnMhAc.js.gz +0 -0
  150. package/dist/index-BioZsJbf.js +190 -0
  151. package/dist/index-BioZsJbf.js.gz +0 -0
  152. package/dist/index-BzOcD8v-.js +166 -0
  153. package/dist/index-BzOcD8v-.js.gz +0 -0
  154. package/dist/index-C8pB9mUQ.js +147 -0
  155. package/dist/index-C8pB9mUQ.js.gz +0 -0
  156. package/dist/index-C_ougoWd.js +426 -0
  157. package/dist/index-C_ougoWd.js.gz +0 -0
  158. package/dist/index-CoRlIGDo.js +513 -0
  159. package/dist/index-CoRlIGDo.js.gz +0 -0
  160. package/dist/index-CyWBxUBS.js +291 -0
  161. package/dist/index-CyWBxUBS.js.gz +0 -0
  162. package/dist/index-DijQHge7.js +325 -0
  163. package/dist/index-DijQHge7.js.gz +0 -0
  164. package/dist/magnifying-glass.-nBiyXot-CuA_mltt.js +30 -0
  165. package/dist/main-DPldah1M.js +40243 -0
  166. package/dist/main-DPldah1M.js.gz +0 -0
  167. package/dist/nav-timing-B-TNQpyK.js +31 -0
  168. package/dist/nav-timing-B-TNQpyK.js.gz +0 -0
  169. package/dist/no-photography.BJX8HSus-BJX8HSus.js +4 -0
  170. package/dist/no-symbol.CIgKzsrB-3PuxVsDY.js +30 -0
  171. package/dist/recorder-PHZWRV-S.js +8271 -0
  172. package/dist/recorder-PHZWRV-S.js.gz +0 -0
  173. package/dist/stylesheet-evaluator-B4P289vW.js +86 -0
  174. package/dist/stylesheet-evaluator-B4P289vW.js.gz +0 -0
  175. package/dist/time-to-first-byte-kiwh1xjs.js +29 -0
  176. package/dist/traverse-Bw4y1x4D.js +8 -0
  177. package/dist/type-check-Bp684oBR.js +6 -0
  178. package/package.json +89 -0
@@ -0,0 +1,3493 @@
1
+ import { C as He } from "./content-5VAQ1vQ0.js";
2
+ import { defineComponent as Xt, resolveComponent as re, createBlock as ke, createCommentVNode as ne, openBlock as oe, withCtx as ae, createVNode as Kt, createElementBlock as es, toDisplayString as We, createElementVNode as ts, createTextVNode as ss } from "vue";
3
+ import { _ as is } from "./main-DPldah1M.js";
4
+ class z {
5
+ constructor(e, s, i, r, n) {
6
+ this.kind = e, this.input = s, this.begin = i, this.end = r, this.file = n;
7
+ }
8
+ getText() {
9
+ return this.input.slice(this.begin, this.end);
10
+ }
11
+ getPosition() {
12
+ let [e, s] = [1, 1];
13
+ for (let i = 0; i < this.begin; i++)
14
+ this.input[i] === `
15
+ ` ? (e++, s = 1) : s++;
16
+ return [e, s];
17
+ }
18
+ size() {
19
+ return this.end - this.begin;
20
+ }
21
+ }
22
+ class Y {
23
+ liquidMethodMissing(e) {
24
+ }
25
+ }
26
+ const rs = Object.prototype.toString, Ye = String.prototype.toLowerCase, ze = Object.hasOwnProperty;
27
+ function f(t) {
28
+ return typeof t == "string";
29
+ }
30
+ function v(t) {
31
+ return typeof t == "function";
32
+ }
33
+ function ns(t) {
34
+ return t && v(t.then);
35
+ }
36
+ function fe(t) {
37
+ return t && v(t.next) && v(t.throw) && v(t.return);
38
+ }
39
+ function os(t) {
40
+ return t.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
41
+ }
42
+ function u(t) {
43
+ return t = d(t), f(t) ? t : R(t) ? "" : S(t) ? t.map((e) => u(e)).join("") : String(t);
44
+ }
45
+ function ie(t) {
46
+ return t = d(t), S(t) ? t : f(t) && t.length > 0 ? [t] : ls(t) ? Array.from(t) : we(t) ? Object.keys(t).map((e) => [e, t[e]]) : [];
47
+ }
48
+ function _(t) {
49
+ return t = d(t), R(t) ? [] : S(t) ? t : [t];
50
+ }
51
+ function d(t) {
52
+ return t instanceof Y && v(t.valueOf) ? t.valueOf() : t;
53
+ }
54
+ function Je(t) {
55
+ return t = Number(t), isNaN(t) ? 0 : t;
56
+ }
57
+ function ye(t) {
58
+ return typeof t == "number";
59
+ }
60
+ function vt(t) {
61
+ return t && v(t.toLiquid) ? vt(t.toLiquid()) : t;
62
+ }
63
+ function R(t) {
64
+ return t == null;
65
+ }
66
+ function as(t) {
67
+ return t === void 0;
68
+ }
69
+ function S(t) {
70
+ return rs.call(t) === "[object Array]";
71
+ }
72
+ function _t(t) {
73
+ return t && ye(t.length);
74
+ }
75
+ function ls(t) {
76
+ return we(t) && Symbol.iterator in t;
77
+ }
78
+ function Ze(t, e) {
79
+ t = t || {};
80
+ for (const s in t)
81
+ if (ze.call(t, s) && e(t[s], s, t) === !1)
82
+ break;
83
+ return t;
84
+ }
85
+ function St(t) {
86
+ return t[t.length - 1];
87
+ }
88
+ function we(t) {
89
+ const e = typeof t;
90
+ return t !== null && (e === "object" || e === "function");
91
+ }
92
+ function xt(t, e, s = 1) {
93
+ const i = [];
94
+ for (let r = t; r < e; r += s)
95
+ i.push(r);
96
+ return i;
97
+ }
98
+ function se(t, e, s = " ") {
99
+ return Lt(t, e, s, (i, r) => r + i);
100
+ }
101
+ function cs(t, e, s = " ") {
102
+ return Lt(t, e, s, (i, r) => i + r);
103
+ }
104
+ function Lt(t, e, s, i) {
105
+ t = String(t);
106
+ let r = e - t.length;
107
+ for (; r-- > 0; )
108
+ t = i(t, s);
109
+ return t;
110
+ }
111
+ function Ft(t) {
112
+ return t;
113
+ }
114
+ function hs(t) {
115
+ return [...t].some((s) => s >= "a" && s <= "z") ? t.toUpperCase() : t.toLowerCase();
116
+ }
117
+ function us(t, e) {
118
+ return t.length > e ? t.slice(0, e - 3) + "..." : t;
119
+ }
120
+ function Qe(t, e) {
121
+ return t == null && e == null ? 0 : t == null ? 1 : e == null || (t = Ye.call(t), e = Ye.call(e), t < e) ? -1 : t > e ? 1 : 0;
122
+ }
123
+ function O(t) {
124
+ return function(...e) {
125
+ return t.call(this, ...e.map(d));
126
+ };
127
+ }
128
+ function Ee(t) {
129
+ return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
130
+ }
131
+ function* le(t) {
132
+ const e = /* @__PURE__ */ new Set();
133
+ for (const s of t) {
134
+ const i = JSON.stringify(s);
135
+ e.has(i) || (e.add(i), yield s);
136
+ }
137
+ }
138
+ const Ge = "__liquidClass__";
139
+ class J extends Error {
140
+ constructor(e, s) {
141
+ 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, Ge, { value: "LiquidError", enumerable: !1 });
142
+ }
143
+ update() {
144
+ Object.defineProperty(this, "context", { value: ws(this.token), enumerable: !1 }), this.message = bs(this.message, this.token), this.stack = this.message + `
145
+ ` + this.context + `
146
+ ` + this.stack, this.originalError && (this.stack += `
147
+ From ` + this.originalError.stack);
148
+ }
149
+ static is(e) {
150
+ return (e == null ? void 0 : e[Ge]) === "LiquidError";
151
+ }
152
+ }
153
+ class fs extends J {
154
+ constructor(e, s) {
155
+ super(e, s), this.name = "TokenizationError", super.update();
156
+ }
157
+ }
158
+ class ds extends J {
159
+ constructor(e, s) {
160
+ super(e, s), this.name = "ParseError", this.message = e.message, super.update();
161
+ }
162
+ }
163
+ class ps extends J {
164
+ constructor(e, s) {
165
+ super(e, s.token), this.name = "RenderError", this.message = e.message, super.update();
166
+ }
167
+ static is(e) {
168
+ return e.name === "RenderError";
169
+ }
170
+ }
171
+ class Ot extends J {
172
+ constructor(e) {
173
+ super(e[0], e[0].token), this.errors = e, this.name = "LiquidErrors";
174
+ const s = e.length > 1 ? "s" : "";
175
+ this.message = `${e.length} error${s} found`, super.update();
176
+ }
177
+ static is(e) {
178
+ return e.name === "LiquidErrors";
179
+ }
180
+ }
181
+ class gs extends J {
182
+ constructor(e, s) {
183
+ super(e, s), this.name = "UndefinedVariableError", this.message = e.message, super.update();
184
+ }
185
+ }
186
+ class ms extends Error {
187
+ constructor(e) {
188
+ super(`undefined variable: ${e}`), this.name = "InternalUndefinedVariableError", this.variableName = e;
189
+ }
190
+ }
191
+ class ys extends Error {
192
+ constructor(e) {
193
+ super(e), this.name = "AssertionError", this.message = e + "";
194
+ }
195
+ }
196
+ function ws(t) {
197
+ const [e, s] = t.getPosition(), i = t.input.split(`
198
+ `), r = Math.max(e - 2, 1), n = Math.min(e + 3, i.length);
199
+ return xt(r, n + 1).map((a) => {
200
+ const l = a === e ? ">> " : " ", h = se(String(a), String(n).length);
201
+ let c = `${l}${h}| `;
202
+ const p = a === e ? `
203
+ ` + se("^", s + c.length) : "";
204
+ return c += i[a - 1], c += p, c;
205
+ }).join(`
206
+ `);
207
+ }
208
+ function bs(t, e) {
209
+ e.file && (t += `, file:${e.file}`);
210
+ const [s, i] = e.getPosition();
211
+ return t += `, line:${s}, col:${i}`, t;
212
+ }
213
+ const m = [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], Ts = 1, X = 4, Xe = 8, Rt = 16, ks = 32, vs = 64, _s = 128;
214
+ function ce(t) {
215
+ const e = t.charCodeAt(0);
216
+ return e >= 128 ? !m[e] : !!(m[e] & Ts);
217
+ }
218
+ m[160] = m[5760] = m[6158] = m[8192] = m[8193] = m[8194] = m[8195] = m[8196] = m[8197] = m[8198] = m[8199] = m[8200] = m[8201] = m[8202] = m[8232] = m[8233] = m[8239] = m[8287] = m[12288] = X;
219
+ m[8220] = m[8221] = _s;
220
+ function x(t, e) {
221
+ if (!t) {
222
+ const s = typeof e == "function" ? e() : e || `expect ${t} to be true`;
223
+ throw new ys(s);
224
+ }
225
+ }
226
+ function de(t, e = `unexpected ${JSON.stringify(t)}`) {
227
+ x(!t, e);
228
+ }
229
+ class Ss extends Y {
230
+ equals(e) {
231
+ return R(d(e));
232
+ }
233
+ gt() {
234
+ return !1;
235
+ }
236
+ geq() {
237
+ return !1;
238
+ }
239
+ lt() {
240
+ return !1;
241
+ }
242
+ leq() {
243
+ return !1;
244
+ }
245
+ valueOf() {
246
+ return null;
247
+ }
248
+ }
249
+ class K extends Y {
250
+ equals(e) {
251
+ return e instanceof K ? !1 : (e = d(e), f(e) || S(e) ? e.length === 0 : we(e) ? Object.keys(e).length === 0 : !1);
252
+ }
253
+ gt() {
254
+ return !1;
255
+ }
256
+ geq() {
257
+ return !1;
258
+ }
259
+ lt() {
260
+ return !1;
261
+ }
262
+ leq() {
263
+ return !1;
264
+ }
265
+ valueOf() {
266
+ return "";
267
+ }
268
+ static is(e) {
269
+ return e instanceof K;
270
+ }
271
+ }
272
+ class Ne extends K {
273
+ equals(e) {
274
+ return e === !1 || R(d(e)) ? !0 : f(e) ? /^\s*$/.test(e) : super.equals(e);
275
+ }
276
+ static is(e) {
277
+ return e instanceof Ne;
278
+ }
279
+ }
280
+ class Ae extends Y {
281
+ constructor(e, s, i) {
282
+ super(), this.i = 0, this.length = e, this.name = `${i}-${s}`;
283
+ }
284
+ next() {
285
+ this.i++;
286
+ }
287
+ index0() {
288
+ return this.i;
289
+ }
290
+ index() {
291
+ return this.i + 1;
292
+ }
293
+ first() {
294
+ return this.i === 0;
295
+ }
296
+ last() {
297
+ return this.i === this.length - 1;
298
+ }
299
+ rindex() {
300
+ return this.length - this.i;
301
+ }
302
+ rindex0() {
303
+ return this.length - this.i - 1;
304
+ }
305
+ valueOf() {
306
+ return JSON.stringify(this);
307
+ }
308
+ }
309
+ class Ke extends Y {
310
+ constructor(e = () => "") {
311
+ super(), this.superBlockRender = e;
312
+ }
313
+ /**
314
+ * Provide parent access in child block by
315
+ * {{ block.super }}
316
+ */
317
+ super() {
318
+ return this.superBlockRender();
319
+ }
320
+ }
321
+ function A(t) {
322
+ return t && v(t.equals) && v(t.gt) && v(t.geq) && v(t.lt) && v(t.leq);
323
+ }
324
+ const et = new Ss(), zt = {
325
+ true: !0,
326
+ false: !1,
327
+ nil: et,
328
+ null: et,
329
+ empty: new K(),
330
+ blank: new Ne()
331
+ };
332
+ function tt(t) {
333
+ const e = {};
334
+ for (const [s, i] of Object.entries(t)) {
335
+ let r = e;
336
+ for (let n = 0; n < s.length; n++) {
337
+ const o = s[n];
338
+ r[o] = r[o] || {}, n === s.length - 1 && ce(s[n]) && (r[o].needBoundary = !0), r = r[o];
339
+ }
340
+ r.data = i, r.end = !0;
341
+ }
342
+ return e;
343
+ }
344
+ var pe = function() {
345
+ return pe = Object.assign || function(e) {
346
+ for (var s, i = 1, r = arguments.length; i < r; i++) {
347
+ s = arguments[i];
348
+ for (var n in s) Object.prototype.hasOwnProperty.call(s, n) && (e[n] = s[n]);
349
+ }
350
+ return e;
351
+ }, pe.apply(this, arguments);
352
+ };
353
+ function k(t, e, s, i) {
354
+ function r(n) {
355
+ return n instanceof s ? n : new s(function(o) {
356
+ o(n);
357
+ });
358
+ }
359
+ return new (s || (s = Promise))(function(n, o) {
360
+ function a(c) {
361
+ try {
362
+ h(i.next(c));
363
+ } catch (p) {
364
+ o(p);
365
+ }
366
+ }
367
+ function l(c) {
368
+ try {
369
+ h(i.throw(c));
370
+ } catch (p) {
371
+ o(p);
372
+ }
373
+ }
374
+ function h(c) {
375
+ c.done ? n(c.value) : r(c.value).then(a, l);
376
+ }
377
+ h((i = i.apply(t, [])).next());
378
+ });
379
+ }
380
+ function V(t) {
381
+ return k(this, void 0, void 0, function* () {
382
+ if (!fe(t))
383
+ return t;
384
+ let e, s = !1, i = "next";
385
+ do {
386
+ const r = t[i](e);
387
+ s = r.done, e = r.value, i = "next";
388
+ try {
389
+ fe(e) && (e = V(e)), ns(e) && (e = yield e);
390
+ } catch (n) {
391
+ i = "throw", e = n;
392
+ }
393
+ } while (!s);
394
+ return e;
395
+ });
396
+ }
397
+ function M(t) {
398
+ if (!fe(t))
399
+ return t;
400
+ let e, s = !1, i = "next";
401
+ do {
402
+ const r = t[i](e);
403
+ if (s = r.done, e = r.value, i = "next", fe(e))
404
+ try {
405
+ e = M(e);
406
+ } catch (n) {
407
+ i = "throw", e = n;
408
+ }
409
+ } while (!s);
410
+ return e;
411
+ }
412
+ const xs = /%([-_0^#:]+)?(\d+)?([EO])?(.)/;
413
+ function Ls(t) {
414
+ return [31, Fs(t) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
415
+ }
416
+ function Et(t) {
417
+ let e = 0;
418
+ for (let s = 0; s < t.getMonth(); ++s)
419
+ e += Ls(t)[s];
420
+ return e + t.getDate();
421
+ }
422
+ function st(t, e) {
423
+ const s = Et(t) + (e - t.getDay()), r = 7 - new Date(t.getFullYear(), 0, 1).getDay() + e;
424
+ return String(Math.floor((s - r) / 7) + 1);
425
+ }
426
+ function Fs(t) {
427
+ const e = t.getFullYear();
428
+ return !!((e & 3) === 0 && (e % 100 || e % 400 === 0 && e));
429
+ }
430
+ function Os(t) {
431
+ const e = t.getDate();
432
+ if ([11, 12, 13].includes(e))
433
+ return "th";
434
+ switch (e % 10) {
435
+ case 1:
436
+ return "st";
437
+ case 2:
438
+ return "nd";
439
+ case 3:
440
+ return "rd";
441
+ default:
442
+ return "th";
443
+ }
444
+ }
445
+ function Rs(t) {
446
+ return parseInt(t.getFullYear().toString().substring(0, 2), 10);
447
+ }
448
+ const zs = {
449
+ d: 2,
450
+ e: 2,
451
+ H: 2,
452
+ I: 2,
453
+ j: 3,
454
+ k: 2,
455
+ l: 2,
456
+ L: 3,
457
+ m: 2,
458
+ M: 2,
459
+ S: 2,
460
+ U: 2,
461
+ W: 2
462
+ }, Es = new Set("aAbBceklpP");
463
+ function it(t, e) {
464
+ const s = Math.abs(t.getTimezoneOffset()), i = Math.floor(s / 60), r = s % 60;
465
+ return (t.getTimezoneOffset() > 0 ? "-" : "+") + se(i, 2, "0") + (e.flags[":"] ? ":" : "") + se(r, 2, "0");
466
+ }
467
+ const Le = {
468
+ a: (t) => t.getShortWeekdayName(),
469
+ A: (t) => t.getLongWeekdayName(),
470
+ b: (t) => t.getShortMonthName(),
471
+ B: (t) => t.getLongMonthName(),
472
+ c: (t) => t.toLocaleString(),
473
+ C: (t) => Rs(t),
474
+ d: (t) => t.getDate(),
475
+ e: (t) => t.getDate(),
476
+ H: (t) => t.getHours(),
477
+ I: (t) => String(t.getHours() % 12 || 12),
478
+ j: (t) => Et(t),
479
+ k: (t) => t.getHours(),
480
+ l: (t) => String(t.getHours() % 12 || 12),
481
+ L: (t) => t.getMilliseconds(),
482
+ m: (t) => t.getMonth() + 1,
483
+ M: (t) => t.getMinutes(),
484
+ N: (t, e) => {
485
+ const s = Number(e.width) || 9, i = String(t.getMilliseconds()).slice(0, s);
486
+ return cs(i, s, "0");
487
+ },
488
+ p: (t) => t.getHours() < 12 ? "AM" : "PM",
489
+ P: (t) => t.getHours() < 12 ? "am" : "pm",
490
+ q: (t) => Os(t),
491
+ s: (t) => Math.round(t.getTime() / 1e3),
492
+ S: (t) => t.getSeconds(),
493
+ u: (t) => t.getDay() || 7,
494
+ U: (t) => st(t, 0),
495
+ w: (t) => t.getDay(),
496
+ W: (t) => st(t, 1),
497
+ x: (t) => t.toLocaleDateString(),
498
+ X: (t) => t.toLocaleTimeString(),
499
+ y: (t) => t.getFullYear().toString().slice(2, 4),
500
+ Y: (t) => t.getFullYear(),
501
+ z: it,
502
+ Z: (t, e) => t.getTimeZoneName() || it(t, e),
503
+ t: () => " ",
504
+ n: () => `
505
+ `,
506
+ "%": () => "%"
507
+ };
508
+ Le.h = Le.b;
509
+ function he(t, e) {
510
+ let s = "", i = e, r;
511
+ for (; r = xs.exec(i); )
512
+ s += i.slice(0, r.index), i = i.slice(r.index + r[0].length), s += Ns(t, r);
513
+ return s + i;
514
+ }
515
+ function Ns(t, e) {
516
+ const [s, i = "", r, n, o] = e, a = Le[o];
517
+ if (!a)
518
+ return s;
519
+ const l = {};
520
+ for (const g of i)
521
+ l[g] = !0;
522
+ let h = String(a(t, { flags: l, width: r, modifier: n })), c = Es.has(o) ? " " : "0", p = r || zs[o] || 0;
523
+ return l["^"] ? h = h.toUpperCase() : l["#"] && (h = hs(h)), l._ ? c = " " : l[0] && (c = "0"), l["-"] && (p = 0), se(h, p, c);
524
+ }
525
+ function Nt() {
526
+ return typeof Intl < "u" ? Intl.DateTimeFormat : void 0;
527
+ }
528
+ const As = 6e4, Ds = /([zZ]|([+-])(\d{2}):?(\d{2}))$/, At = [
529
+ "January",
530
+ "February",
531
+ "March",
532
+ "April",
533
+ "May",
534
+ "June",
535
+ "July",
536
+ "August",
537
+ "September",
538
+ "October",
539
+ "November",
540
+ "December"
541
+ ], Vs = At.map((t) => t.slice(0, 3)), Dt = [
542
+ "Sunday",
543
+ "Monday",
544
+ "Tuesday",
545
+ "Wednesday",
546
+ "Thursday",
547
+ "Friday",
548
+ "Saturday"
549
+ ], Ms = Dt.map((t) => t.slice(0, 3));
550
+ class E {
551
+ constructor(e, s, i) {
552
+ this.locale = s, this.DateTimeFormat = Nt(), this.date = new Date(e), this.timezoneFixed = i !== void 0, i === void 0 && (i = this.date.getTimezoneOffset()), this.timezoneOffset = f(i) ? E.getTimezoneOffset(i, this.date) : i, this.timezoneName = f(i) ? i : "";
553
+ const r = (this.date.getTimezoneOffset() - this.timezoneOffset) * As, n = this.date.getTime() + r;
554
+ this.displayDate = new Date(n);
555
+ }
556
+ getTime() {
557
+ return this.displayDate.getTime();
558
+ }
559
+ getMilliseconds() {
560
+ return this.displayDate.getMilliseconds();
561
+ }
562
+ getSeconds() {
563
+ return this.displayDate.getSeconds();
564
+ }
565
+ getMinutes() {
566
+ return this.displayDate.getMinutes();
567
+ }
568
+ getHours() {
569
+ return this.displayDate.getHours();
570
+ }
571
+ getDay() {
572
+ return this.displayDate.getDay();
573
+ }
574
+ getDate() {
575
+ return this.displayDate.getDate();
576
+ }
577
+ getMonth() {
578
+ return this.displayDate.getMonth();
579
+ }
580
+ getFullYear() {
581
+ return this.displayDate.getFullYear();
582
+ }
583
+ toLocaleString(e, s) {
584
+ return s != null && s.timeZone ? this.date.toLocaleString(e, s) : this.displayDate.toLocaleString(e, s);
585
+ }
586
+ toLocaleTimeString(e) {
587
+ return this.displayDate.toLocaleTimeString(e);
588
+ }
589
+ toLocaleDateString(e) {
590
+ return this.displayDate.toLocaleDateString(e);
591
+ }
592
+ getTimezoneOffset() {
593
+ return this.timezoneOffset;
594
+ }
595
+ getTimeZoneName() {
596
+ if (this.timezoneFixed)
597
+ return this.timezoneName;
598
+ if (this.DateTimeFormat)
599
+ return this.DateTimeFormat().resolvedOptions().timeZone;
600
+ }
601
+ getLongMonthName() {
602
+ var e;
603
+ return (e = this.format({ month: "long" })) !== null && e !== void 0 ? e : At[this.getMonth()];
604
+ }
605
+ getShortMonthName() {
606
+ var e;
607
+ return (e = this.format({ month: "short" })) !== null && e !== void 0 ? e : Vs[this.getMonth()];
608
+ }
609
+ getLongWeekdayName() {
610
+ var e;
611
+ return (e = this.format({ weekday: "long" })) !== null && e !== void 0 ? e : Dt[this.displayDate.getDay()];
612
+ }
613
+ getShortWeekdayName() {
614
+ var e;
615
+ return (e = this.format({ weekday: "short" })) !== null && e !== void 0 ? e : Ms[this.displayDate.getDay()];
616
+ }
617
+ valid() {
618
+ return !isNaN(this.getTime());
619
+ }
620
+ format(e) {
621
+ return this.DateTimeFormat && this.DateTimeFormat(this.locale, e).format(this.displayDate);
622
+ }
623
+ /**
624
+ * Create a Date object fixed to it's declared Timezone. Both
625
+ * - 2021-08-06T02:29:00.000Z and
626
+ * - 2021-08-06T02:29:00.000+08:00
627
+ * will always be displayed as
628
+ * - 2021-08-06 02:29:00
629
+ * regardless timezoneOffset in JavaScript realm
630
+ *
631
+ * The implementation hack:
632
+ * Instead of calling `.getMonth()`/`.getUTCMonth()` respect to `preserveTimezones`,
633
+ * we create a different Date to trick strftime, it's both simpler and more performant.
634
+ * Given that a template is expected to be parsed fewer times than rendered.
635
+ */
636
+ static createDateFixedToTimezone(e, s) {
637
+ const i = e.match(Ds);
638
+ if (i && i[1] === "Z")
639
+ return new E(+new Date(e), s, 0);
640
+ if (i && i[2] && i[3] && i[4]) {
641
+ const [, , r, n, o] = i, a = (r === "+" ? -1 : 1) * (parseInt(n, 10) * 60 + parseInt(o, 10));
642
+ return new E(+new Date(e), s, a);
643
+ }
644
+ return new E(e, s);
645
+ }
646
+ static getTimezoneOffset(e, s) {
647
+ const i = s.toLocaleString("en-US", { timeZone: e }), r = s.toLocaleString("en-US", { timeZone: "UTC" }), n = new Date(i);
648
+ return (+new Date(r) - +n) / (60 * 1e3);
649
+ }
650
+ }
651
+ class Fe {
652
+ constructor(e, s) {
653
+ this.base = 0, this.message = `${e} limit exceeded`, this.limit = s;
654
+ }
655
+ use(e) {
656
+ e = Je(e), x(this.base + e <= this.limit, this.message), this.base += e;
657
+ }
658
+ check(e) {
659
+ e = Je(e), x(e <= this.limit, this.message);
660
+ }
661
+ }
662
+ class De extends z {
663
+ constructor(e, [s, i], r, n, o, a, l, h) {
664
+ super(e, r, n, o, h), this.trimLeft = !1, this.trimRight = !1;
665
+ const c = r[s] === "-", p = r[i - 1] === "-";
666
+ let g = c ? s + 1 : s, w = p ? i - 1 : i;
667
+ for (; g < w && m[r.charCodeAt(g)] & X; )
668
+ g++;
669
+ for (; w > g && m[r.charCodeAt(w - 1)] & X; )
670
+ w--;
671
+ this.contentRange = [g, w], this.trimLeft = c || a, this.trimRight = p || l;
672
+ }
673
+ get content() {
674
+ return this.input.slice(this.contentRange[0], this.contentRange[1]);
675
+ }
676
+ }
677
+ class rt extends De {
678
+ constructor(e, s, i, r, n) {
679
+ const { trimTagLeft: o, trimTagRight: a, tagDelimiterLeft: l, tagDelimiterRight: h } = r, [c, p] = [s + l.length, i - h.length];
680
+ super(y.Tag, [c, p], e, s, i, o, a, n), this.tokenizer = new D(e, r.operators, n, this.contentRange), this.name = this.tokenizer.readTagName(), this.tokenizer.assert(this.name, "illegal tag syntax, tag name expected"), this.tokenizer.skipBlank(), this.args = this.tokenizer.input.slice(this.tokenizer.p, this.contentRange[1]);
681
+ }
682
+ }
683
+ class Cs extends De {
684
+ constructor(e, s, i, r, n) {
685
+ const { trimOutputLeft: o, trimOutputRight: a, outputDelimiterLeft: l, outputDelimiterRight: h } = r, c = [s + l.length, i - h.length];
686
+ super(y.Output, c, e, s, i, o, a, n);
687
+ }
688
+ }
689
+ class nt extends z {
690
+ constructor(e, s, i, r) {
691
+ super(y.HTML, e, s, i, r), this.input = e, this.begin = s, this.end = i, this.file = r, this.trimLeft = 0, this.trimRight = 0;
692
+ }
693
+ getContent() {
694
+ return this.input.slice(this.begin + this.trimLeft, this.end - this.trimRight);
695
+ }
696
+ }
697
+ class js extends z {
698
+ constructor(e, s, i, r) {
699
+ super(y.Number, e, s, i, r), this.input = e, this.begin = s, this.end = i, this.file = r, this.content = Number(this.getText());
700
+ }
701
+ }
702
+ class ve extends z {
703
+ constructor(e, s, i, r) {
704
+ super(y.Word, e, s, i, r), this.input = e, this.begin = s, this.end = i, this.file = r, this.content = this.getText();
705
+ }
706
+ }
707
+ class $s extends z {
708
+ constructor(e, s, i, r) {
709
+ super(y.Literal, e, s, i, r), this.input = e, this.begin = s, this.end = i, this.file = r, this.literal = this.getText(), this.content = zt[this.literal];
710
+ }
711
+ }
712
+ const ot = {
713
+ "==": 2,
714
+ "!=": 2,
715
+ ">": 2,
716
+ "<": 2,
717
+ ">=": 2,
718
+ "<=": 2,
719
+ contains: 2,
720
+ not: 1,
721
+ and: 0,
722
+ or: 0
723
+ }, qs = {
724
+ "==": 0,
725
+ "!=": 0,
726
+ ">": 0,
727
+ "<": 0,
728
+ ">=": 0,
729
+ "<=": 0,
730
+ contains: 0,
731
+ not: 1,
732
+ and: 0,
733
+ or: 0
734
+ /* OperatorType.Binary */
735
+ };
736
+ class Is extends z {
737
+ constructor(e, s, i, r) {
738
+ super(y.Operator, e, s, i, r), this.input = e, this.begin = s, this.end = i, this.file = r, this.operator = this.getText();
739
+ }
740
+ getPrecedence() {
741
+ const e = this.getText();
742
+ return e in ot ? ot[e] : 1;
743
+ }
744
+ }
745
+ class at extends z {
746
+ constructor(e, s, i, r, n, o) {
747
+ super(y.PropertyAccess, i, r, n, o), this.variable = e, this.props = s;
748
+ }
749
+ }
750
+ class Vt extends z {
751
+ constructor(e, s, i, r, n, o) {
752
+ super(y.Filter, i, r, n, o), this.name = e, this.args = s;
753
+ }
754
+ }
755
+ class Ps extends z {
756
+ constructor(e, s, i, r, n, o) {
757
+ super(y.Hash, e, s, i, o), this.input = e, this.begin = s, this.end = i, this.name = r, this.value = n, this.file = o;
758
+ }
759
+ }
760
+ const Bs = /[\da-fA-F]/, lt = /[0-7]/, ct = {
761
+ b: "\b",
762
+ f: "\f",
763
+ n: `
764
+ `,
765
+ r: "\r",
766
+ t: " ",
767
+ v: "\v"
768
+ };
769
+ function ht(t) {
770
+ const e = t.charCodeAt(0);
771
+ return e >= 97 ? e - 87 : e >= 65 ? e - 55 : e - 48;
772
+ }
773
+ function Us(t) {
774
+ let e = "";
775
+ for (let s = 1; s < t.length - 1; s++) {
776
+ if (t[s] !== "\\") {
777
+ e += t[s];
778
+ continue;
779
+ }
780
+ if (ct[t[s + 1]] !== void 0)
781
+ e += ct[t[++s]];
782
+ else if (t[s + 1] === "u") {
783
+ let i = 0, r = s + 2;
784
+ for (; r <= s + 5 && Bs.test(t[r]); )
785
+ i = i * 16 + ht(t[r++]);
786
+ s = r - 1, e += String.fromCharCode(i);
787
+ } else if (!lt.test(t[s + 1]))
788
+ e += t[++s];
789
+ else {
790
+ let i = s + 1, r = 0;
791
+ for (; i <= s + 3 && lt.test(t[i]); )
792
+ r = r * 8 + ht(t[i++]);
793
+ s = i - 1, e += String.fromCharCode(r);
794
+ }
795
+ }
796
+ return e;
797
+ }
798
+ class Hs extends z {
799
+ constructor(e, s, i, r) {
800
+ super(y.Quoted, e, s, i, r), this.input = e, this.begin = s, this.end = i, this.file = r, this.content = Us(this.getText());
801
+ }
802
+ }
803
+ class Ws extends z {
804
+ constructor(e, s, i, r, n, o) {
805
+ super(y.Range, e, s, i, o), this.input = e, this.begin = s, this.end = i, this.lhs = r, this.rhs = n, this.file = o;
806
+ }
807
+ }
808
+ class Ys extends De {
809
+ constructor(e, s, i, r, n) {
810
+ super(y.Tag, [s, i], e, s, i, !1, !1, n), this.tokenizer = new D(e, r.operators, n, this.contentRange), this.name = this.tokenizer.readTagName(), this.tokenizer.assert(this.name, "illegal liquid tag syntax"), this.tokenizer.skipBlank();
811
+ }
812
+ get args() {
813
+ return this.tokenizer.input.slice(this.tokenizer.p, this.contentRange[1]);
814
+ }
815
+ }
816
+ class Js extends z {
817
+ constructor(e, s, i, r, n, o) {
818
+ super(y.FilteredValue, i, r, n, o), this.initial = e, this.filters = s, this.input = i, this.begin = r, this.end = n, this.file = o;
819
+ }
820
+ }
821
+ const Zs = {
822
+ now: () => Date.now()
823
+ };
824
+ function Mt() {
825
+ return typeof global == "object" && global.performance || typeof window == "object" && window.performance || Zs;
826
+ }
827
+ class Qs {
828
+ constructor() {
829
+ this.buffer = "";
830
+ }
831
+ write(e) {
832
+ this.buffer += u(e);
833
+ }
834
+ }
835
+ class Gs {
836
+ constructor() {
837
+ throw this.buffer = "", this.stream = null, new Error("streaming not supported in browser");
838
+ }
839
+ }
840
+ class Xs {
841
+ constructor() {
842
+ this.buffer = "";
843
+ }
844
+ write(e) {
845
+ e = d(e), typeof e != "string" && this.buffer === "" ? this.buffer = e : this.buffer = u(this.buffer) + u(e);
846
+ }
847
+ }
848
+ class Ks {
849
+ renderTemplatesToNodeStream(e, s) {
850
+ const i = new Gs();
851
+ return Promise.resolve().then(() => V(this.renderTemplates(e, s, i))).then(() => i.end(), (r) => i.error(r)), i.stream;
852
+ }
853
+ *renderTemplates(e, s, i) {
854
+ i || (i = s.opts.keepOutputType ? new Xs() : new Qs());
855
+ const r = [];
856
+ for (const n of e) {
857
+ s.renderLimit.check(Mt().now());
858
+ try {
859
+ const o = yield n.render(s, i);
860
+ if (o && i.write(o), s.breakCalled || s.continueCalled)
861
+ break;
862
+ } catch (o) {
863
+ const a = J.is(o) ? o : new ps(o, n);
864
+ if (s.opts.catchAllErrors)
865
+ r.push(a);
866
+ else
867
+ throw a;
868
+ }
869
+ }
870
+ if (r.length)
871
+ throw new Ot(r);
872
+ return i.buffer;
873
+ }
874
+ }
875
+ class ei {
876
+ constructor(e) {
877
+ this.postfix = [...ri(e)];
878
+ }
879
+ *evaluate(e, s) {
880
+ x(e, "unable to evaluate: context not defined");
881
+ const i = [];
882
+ for (const r of this.postfix)
883
+ if (Bt(r)) {
884
+ const n = i.pop();
885
+ let o;
886
+ if (qs[r.operator] === 1)
887
+ o = yield e.opts.operators[r.operator](n, e);
888
+ else {
889
+ const a = i.pop();
890
+ o = yield e.opts.operators[r.operator](a, n, e);
891
+ }
892
+ i.push(o);
893
+ } else
894
+ i.push(yield T(r, e, s));
895
+ return i[0];
896
+ }
897
+ valid() {
898
+ return !!this.postfix.length;
899
+ }
900
+ }
901
+ function* T(t, e, s = !1) {
902
+ if (t) {
903
+ if ("content" in t)
904
+ return t.content;
905
+ if (me(t))
906
+ return yield ti(t, e, s);
907
+ if (Ut(t))
908
+ return yield ii(t, e);
909
+ }
910
+ }
911
+ function* ti(t, e, s) {
912
+ const i = [];
913
+ for (const r of t.props)
914
+ i.push(yield T(r, e, !1));
915
+ try {
916
+ if (t.variable) {
917
+ const r = yield T(t.variable, e, s);
918
+ return yield e._getFromScope(r, i);
919
+ } else
920
+ return yield e._get(i);
921
+ } catch (r) {
922
+ if (s && r.name === "InternalUndefinedVariableError")
923
+ return null;
924
+ throw new gs(r, t);
925
+ }
926
+ }
927
+ function si(t) {
928
+ return t.content;
929
+ }
930
+ function* ii(t, e) {
931
+ const s = yield T(t.lhs, e), i = yield T(t.rhs, e);
932
+ return e.memoryLimit.use(i - s + 1), xt(+s, +i + 1);
933
+ }
934
+ function* ri(t) {
935
+ const e = [];
936
+ for (const s of t)
937
+ if (Bt(s)) {
938
+ for (; e.length && e[e.length - 1].getPrecedence() > s.getPrecedence(); )
939
+ yield e.pop();
940
+ e.push(s);
941
+ } else
942
+ yield s;
943
+ for (; e.length; )
944
+ yield e.pop();
945
+ }
946
+ function B(t, e) {
947
+ return !be(t, e);
948
+ }
949
+ function be(t, e) {
950
+ return t = d(t), e.opts.jsTruthy ? !t : t === !1 || t === void 0 || t === null;
951
+ }
952
+ const ni = {
953
+ "==": C,
954
+ "!=": (t, e) => !C(t, e),
955
+ ">": (t, e) => A(t) ? t.gt(e) : A(e) ? e.lt(t) : d(t) > d(e),
956
+ "<": (t, e) => A(t) ? t.lt(e) : A(e) ? e.gt(t) : d(t) < d(e),
957
+ ">=": (t, e) => A(t) ? t.geq(e) : A(e) ? e.leq(t) : d(t) >= d(e),
958
+ "<=": (t, e) => A(t) ? t.leq(e) : A(e) ? e.geq(t) : d(t) <= d(e),
959
+ contains: (t, e) => (t = d(t), S(t) ? t.some((s) => C(s, e)) : v(t == null ? void 0 : t.indexOf) ? t.indexOf(d(e)) > -1 : !1),
960
+ not: (t, e) => be(d(t), e),
961
+ and: (t, e, s) => B(d(t), s) && B(d(e), s),
962
+ or: (t, e, s) => B(d(t), s) || B(d(e), s)
963
+ };
964
+ function C(t, e) {
965
+ return A(t) ? t.equals(e) : A(e) ? e.equals(t) : (t = d(t), e = d(e), S(t) ? S(e) && oi(t, e) : t === e);
966
+ }
967
+ function oi(t, e) {
968
+ return t.length !== e.length ? !1 : !t.some((s, i) => !C(s, e[i]));
969
+ }
970
+ function ai(t, e) {
971
+ return t.some((s) => C(s, e));
972
+ }
973
+ class _e {
974
+ constructor(e, s, i, r) {
975
+ this.key = e, this.value = s, this.next = i, this.prev = r;
976
+ }
977
+ }
978
+ class ut {
979
+ constructor(e, s = 0) {
980
+ this.limit = e, this.size = s, this.cache = {}, this.head = new _e("HEAD", null, null, null), this.tail = new _e("TAIL", null, null, null), this.head.next = this.tail, this.tail.prev = this.head;
981
+ }
982
+ write(e, s) {
983
+ if (this.cache[e])
984
+ this.cache[e].value = s;
985
+ else {
986
+ const i = new _e(e, s, this.head.next, this.head);
987
+ this.head.next.prev = i, this.head.next = i, this.cache[e] = i, this.size++, this.ensureLimit();
988
+ }
989
+ }
990
+ read(e) {
991
+ if (!this.cache[e])
992
+ return;
993
+ const { value: s } = this.cache[e];
994
+ return this.remove(e), this.write(e, s), s;
995
+ }
996
+ remove(e) {
997
+ const s = this.cache[e];
998
+ s.prev.next = s.next, s.next.prev = s.prev, delete this.cache[e], this.size--;
999
+ }
1000
+ clear() {
1001
+ this.head.next = this.tail, this.tail.prev = this.head, this.size = 0, this.cache = {};
1002
+ }
1003
+ ensureLimit() {
1004
+ this.size > this.limit && this.remove(this.tail.prev.key);
1005
+ }
1006
+ }
1007
+ function Ct(t, e) {
1008
+ const s = document.createElement("base");
1009
+ s.href = t;
1010
+ const i = document.getElementsByTagName("head")[0];
1011
+ i.insertBefore(s, i.firstChild);
1012
+ const r = document.createElement("a");
1013
+ r.href = e;
1014
+ const n = r.href;
1015
+ return i.removeChild(s), n;
1016
+ }
1017
+ function li(t, e, s) {
1018
+ return t.length && St(t) !== "/" && (t += "/"), Ct(t, e).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/, (r, n, o) => {
1019
+ const a = o.split("/").pop();
1020
+ return /\.\w+$/.test(a) ? r : n + o + s;
1021
+ });
1022
+ }
1023
+ function ci(t) {
1024
+ return k(this, void 0, void 0, function* () {
1025
+ return new Promise((e, s) => {
1026
+ const i = new XMLHttpRequest();
1027
+ i.onload = () => {
1028
+ i.status >= 200 && i.status < 300 ? e(i.responseText) : s(new Error(i.statusText));
1029
+ }, i.onerror = () => {
1030
+ s(new Error("An error occurred whilst receiving the response."));
1031
+ }, i.open("GET", t), i.send();
1032
+ });
1033
+ });
1034
+ }
1035
+ function hi(t) {
1036
+ const e = new XMLHttpRequest();
1037
+ if (e.open("GET", t, !1), e.send(), e.status < 200 || e.status >= 300)
1038
+ throw new Error(e.statusText);
1039
+ return e.responseText;
1040
+ }
1041
+ function ui(t) {
1042
+ return k(this, void 0, void 0, function* () {
1043
+ return !0;
1044
+ });
1045
+ }
1046
+ function fi(t) {
1047
+ return !0;
1048
+ }
1049
+ function di(t) {
1050
+ return Ct(t, ".");
1051
+ }
1052
+ const pi = "/";
1053
+ var gi = /* @__PURE__ */ Object.freeze({
1054
+ __proto__: null,
1055
+ resolve: li,
1056
+ readFile: ci,
1057
+ readFileSync: hi,
1058
+ exists: ui,
1059
+ existsSync: fi,
1060
+ dirname: di,
1061
+ sep: pi
1062
+ });
1063
+ function mi(t, e, ...s) {
1064
+ return t = d(t), S(t) || f(t) ? t.length ? t : e : t === !1 && new Map(s).get("allow_false") ? !1 : be(t, this.context) ? e : t;
1065
+ }
1066
+ function ft(t, e = 0) {
1067
+ return JSON.stringify(t, null, e);
1068
+ }
1069
+ function yi(t, e = 0) {
1070
+ const s = [];
1071
+ return JSON.stringify(t, function(i, r) {
1072
+ if (typeof r != "object" || r === null)
1073
+ return r;
1074
+ for (; s.length > 0 && s[s.length - 1] !== this; )
1075
+ s.pop();
1076
+ return s.includes(r) ? "[Circular]" : (s.push(r), r);
1077
+ }, e);
1078
+ }
1079
+ function wi(t) {
1080
+ return Number(t);
1081
+ }
1082
+ const bi = {
1083
+ raw: !0,
1084
+ handler: Ft
1085
+ };
1086
+ var jt = {
1087
+ default: mi,
1088
+ raw: bi,
1089
+ jsonify: ft,
1090
+ to_integer: wi,
1091
+ json: ft,
1092
+ inspect: yi
1093
+ };
1094
+ const Ti = {
1095
+ "&": "&amp;",
1096
+ "<": "&lt;",
1097
+ ">": "&gt;",
1098
+ '"': "&#34;",
1099
+ "'": "&#39;"
1100
+ }, ki = {
1101
+ "&amp;": "&",
1102
+ "&lt;": "<",
1103
+ "&gt;": ">",
1104
+ "&#34;": '"',
1105
+ "&#39;": "'"
1106
+ };
1107
+ function Te(t) {
1108
+ return t = u(t), this.context.memoryLimit.use(t.length), t.replace(/&|<|>|"|'/g, (e) => Ti[e]);
1109
+ }
1110
+ function vi(t) {
1111
+ return Te.call(this, t);
1112
+ }
1113
+ function _i(t) {
1114
+ return t = u(t), this.context.memoryLimit.use(t.length), t.replace(/&(amp|lt|gt|#34|#39);/g, (e) => ki[e]);
1115
+ }
1116
+ function Si(t) {
1117
+ return Te.call(this, _i.call(this, t));
1118
+ }
1119
+ function xi(t) {
1120
+ const e = u(t);
1121
+ return this.context.memoryLimit.use(e.length), e.replace(/\r?\n/gm, `<br />
1122
+ `);
1123
+ }
1124
+ function Li(t) {
1125
+ const e = u(t);
1126
+ return this.context.memoryLimit.use(e.length), e.replace(/<script[\s\S]*?<\/script>|<style[\s\S]*?<\/style>|<.*?>|<!--[\s\S]*?-->/g, "");
1127
+ }
1128
+ var Fi = /* @__PURE__ */ Object.freeze({
1129
+ __proto__: null,
1130
+ escape: Te,
1131
+ xml_escape: vi,
1132
+ escape_once: Si,
1133
+ newline_to_br: xi,
1134
+ strip_html: Li
1135
+ });
1136
+ class Oi {
1137
+ constructor(e) {
1138
+ this.mapping = e, this.sep = "/";
1139
+ }
1140
+ exists(e) {
1141
+ return k(this, void 0, void 0, function* () {
1142
+ return this.existsSync(e);
1143
+ });
1144
+ }
1145
+ existsSync(e) {
1146
+ return !R(this.mapping[e]);
1147
+ }
1148
+ readFile(e) {
1149
+ return k(this, void 0, void 0, function* () {
1150
+ return this.readFileSync(e);
1151
+ });
1152
+ }
1153
+ readFileSync(e) {
1154
+ const s = this.mapping[e];
1155
+ if (R(s))
1156
+ throw new Error(`ENOENT: ${e}`);
1157
+ return s;
1158
+ }
1159
+ dirname(e) {
1160
+ const s = e.split(this.sep);
1161
+ return s.pop(), s.join(this.sep);
1162
+ }
1163
+ resolve(e, s, i) {
1164
+ if (s += i, e === ".")
1165
+ return s;
1166
+ const r = e.split(/\/+/);
1167
+ for (const n of s.split(this.sep))
1168
+ n === "." || n === "" || (n === ".." ? (r.length > 1 || r[0] !== "") && r.pop() : r.push(n));
1169
+ return r.join(this.sep);
1170
+ }
1171
+ }
1172
+ const Q = {
1173
+ root: ["."],
1174
+ layouts: ["."],
1175
+ partials: ["."],
1176
+ relativeReference: !0,
1177
+ jekyllInclude: !1,
1178
+ keyValueSeparator: ":",
1179
+ cache: void 0,
1180
+ extname: "",
1181
+ fs: gi,
1182
+ dynamicPartials: !0,
1183
+ jsTruthy: !1,
1184
+ dateFormat: "%A, %B %-e, %Y at %-l:%M %P %z",
1185
+ locale: "",
1186
+ trimTagRight: !1,
1187
+ trimTagLeft: !1,
1188
+ trimOutputRight: !1,
1189
+ trimOutputLeft: !1,
1190
+ greedy: !0,
1191
+ tagDelimiterLeft: "{%",
1192
+ tagDelimiterRight: "%}",
1193
+ outputDelimiterLeft: "{{",
1194
+ outputDelimiterRight: "}}",
1195
+ preserveTimezones: !1,
1196
+ strictFilters: !1,
1197
+ strictVariables: !1,
1198
+ ownPropertyOnly: !0,
1199
+ lenientIf: !1,
1200
+ globals: {},
1201
+ keepOutputType: !1,
1202
+ operators: ni,
1203
+ memoryLimit: 1 / 0,
1204
+ parseLimit: 1 / 0,
1205
+ renderLimit: 1 / 0
1206
+ };
1207
+ function Ri(t) {
1208
+ var e, s;
1209
+ if (t.hasOwnProperty("root") && (t.hasOwnProperty("partials") || (t.partials = t.root), t.hasOwnProperty("layouts") || (t.layouts = t.root)), t.hasOwnProperty("cache")) {
1210
+ let i;
1211
+ typeof t.cache == "number" ? i = t.cache > 0 ? new ut(t.cache) : void 0 : typeof t.cache == "object" ? i = t.cache : i = t.cache ? new ut(1024) : void 0, t.cache = i;
1212
+ }
1213
+ return t = Object.assign(Object.assign(Object.assign({}, Q), 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 = ue(t.root), t.partials = ue(t.partials), t.layouts = ue(t.layouts), t.outputEscape = t.outputEscape && zi(t.outputEscape), t.locale || (t.locale = (s = (e = Nt()) === null || e === void 0 ? void 0 : e().resolvedOptions().locale) !== null && s !== void 0 ? s : "en-US"), t.templates && (t.fs = new Oi(t.templates), t.relativeReference = !0, t.root = t.partials = t.layouts = "."), t;
1214
+ }
1215
+ function zi(t) {
1216
+ return t === "escape" ? Te : t === "json" ? jt.json : (x(v(t), "`outputEscape` need to be of type string or function"), t);
1217
+ }
1218
+ function ue(t) {
1219
+ let e = [];
1220
+ return S(t) && (e = t), f(t) && (e = [t]), e;
1221
+ }
1222
+ function Ei(t, e) {
1223
+ let s = !1;
1224
+ for (let i = 0; i < t.length; i++) {
1225
+ const r = t[i];
1226
+ qi(r) && (!s && r.trimLeft && Ni(t[i - 1], e.greedy), Z(r) && (r.name === "raw" ? s = !0 : r.name === "endraw" && (s = !1)), !s && r.trimRight && Ai(t[i + 1], e.greedy));
1227
+ }
1228
+ }
1229
+ function Ni(t, e) {
1230
+ if (!t || !Me(t))
1231
+ return;
1232
+ const s = e ? X : Rt;
1233
+ for (; m[t.input.charCodeAt(t.end - 1 - t.trimRight)] & s; )
1234
+ t.trimRight++;
1235
+ }
1236
+ function Ai(t, e) {
1237
+ if (!t || !Me(t))
1238
+ return;
1239
+ const s = e ? X : Rt;
1240
+ for (; m[t.input.charCodeAt(t.begin + t.trimLeft)] & s; )
1241
+ t.trimLeft++;
1242
+ t.input.charAt(t.begin + t.trimLeft) === `
1243
+ ` && t.trimLeft++;
1244
+ }
1245
+ class D {
1246
+ constructor(e, s = Q.operators, i, r) {
1247
+ this.input = e, this.file = i, this.rawBeginAt = -1, this.p = r ? r[0] : 0, this.N = r ? r[1] : e.length, this.opTrie = tt(s), this.literalTrie = tt(zt);
1248
+ }
1249
+ readExpression() {
1250
+ return new ei(this.readExpressionTokens());
1251
+ }
1252
+ *readExpressionTokens() {
1253
+ for (; this.p < this.N; ) {
1254
+ const e = this.readOperator();
1255
+ if (e) {
1256
+ yield e;
1257
+ continue;
1258
+ }
1259
+ const s = this.readValue();
1260
+ if (s) {
1261
+ yield s;
1262
+ continue;
1263
+ }
1264
+ return;
1265
+ }
1266
+ }
1267
+ readOperator() {
1268
+ this.skipBlank();
1269
+ const e = this.matchTrie(this.opTrie);
1270
+ if (e !== -1)
1271
+ return new Is(this.input, this.p, this.p = e, this.file);
1272
+ }
1273
+ matchTrie(e) {
1274
+ let s = e, i = this.p, r;
1275
+ for (; s[this.input[i]] && i < this.N; )
1276
+ s = s[this.input[i++]], s.end && (r = s);
1277
+ return !r || r.needBoundary && ce(this.peek(i - this.p)) ? -1 : i;
1278
+ }
1279
+ readFilteredValue() {
1280
+ const e = this.p, s = this.readExpression();
1281
+ this.assert(s.valid(), `invalid value expression: ${this.snapshot()}`);
1282
+ const i = this.readFilters();
1283
+ return new Js(s, i, this.input, e, this.p, this.file);
1284
+ }
1285
+ readFilters() {
1286
+ const e = [];
1287
+ for (; ; ) {
1288
+ const s = this.readFilter();
1289
+ if (!s)
1290
+ return e;
1291
+ e.push(s);
1292
+ }
1293
+ }
1294
+ readFilter() {
1295
+ if (this.skipBlank(), this.end())
1296
+ return null;
1297
+ this.assert(this.read() === "|", 'expected "|" before filter');
1298
+ const e = this.readIdentifier();
1299
+ if (!e.size())
1300
+ return this.assert(this.end(), "expected filter name"), null;
1301
+ const s = [];
1302
+ if (this.skipBlank(), this.peek() === ":")
1303
+ do {
1304
+ ++this.p;
1305
+ const i = this.readFilterArg();
1306
+ i && s.push(i), this.skipBlank(), this.assert(this.end() || this.peek() === "," || this.peek() === "|", () => `unexpected character ${this.snapshot()}`);
1307
+ } while (this.peek() === ",");
1308
+ else if (!(this.peek() === "|" || this.end())) throw this.error('expected ":" after filter name');
1309
+ return new Vt(e.getText(), s, this.input, e.begin, this.p, this.file);
1310
+ }
1311
+ readFilterArg() {
1312
+ const e = this.readValue();
1313
+ if (!e)
1314
+ return;
1315
+ if (this.skipBlank(), this.peek() !== ":")
1316
+ return e;
1317
+ ++this.p;
1318
+ const s = this.readValue();
1319
+ return [e.getText(), s];
1320
+ }
1321
+ readTopLevelTokens(e = Q) {
1322
+ const s = [];
1323
+ for (; this.p < this.N; ) {
1324
+ const i = this.readTopLevelToken(e);
1325
+ s.push(i);
1326
+ }
1327
+ return Ei(s, e), s;
1328
+ }
1329
+ readTopLevelToken(e) {
1330
+ const { tagDelimiterLeft: s, outputDelimiterLeft: i } = e;
1331
+ return this.rawBeginAt > -1 ? this.readEndrawOrRawContent(e) : this.match(s) ? this.readTagToken(e) : this.match(i) ? this.readOutputToken(e) : this.readHTMLToken([s, i]);
1332
+ }
1333
+ readHTMLToken(e) {
1334
+ const s = this.p;
1335
+ for (; this.p < this.N && !e.some((i) => this.match(i)); )
1336
+ ++this.p;
1337
+ return new nt(this.input, s, this.p, this.file);
1338
+ }
1339
+ readTagToken(e) {
1340
+ const { file: s, input: i } = this, r = this.p;
1341
+ if (this.readToDelimiter(e.tagDelimiterRight) === -1)
1342
+ throw this.error(`tag ${this.snapshot(r)} not closed`, r);
1343
+ const n = new rt(i, r, this.p, e, s);
1344
+ return n.name === "raw" && (this.rawBeginAt = r), n;
1345
+ }
1346
+ readToDelimiter(e, s = !1) {
1347
+ for (this.skipBlank(); this.p < this.N; ) {
1348
+ if (s && this.peekType() & Xe) {
1349
+ this.readQuoted();
1350
+ continue;
1351
+ }
1352
+ if (++this.p, this.rmatch(e))
1353
+ return this.p;
1354
+ }
1355
+ return -1;
1356
+ }
1357
+ readOutputToken(e = Q) {
1358
+ const { file: s, input: i } = this, { outputDelimiterRight: r } = e, n = this.p;
1359
+ if (this.readToDelimiter(r, !0) === -1)
1360
+ throw this.error(`output ${this.snapshot(n)} not closed`, n);
1361
+ return new Cs(i, n, this.p, e, s);
1362
+ }
1363
+ readEndrawOrRawContent(e) {
1364
+ const { tagDelimiterLeft: s, tagDelimiterRight: i } = e, r = this.p;
1365
+ let n = this.readTo(s) - s.length;
1366
+ for (; this.p < this.N; ) {
1367
+ if (this.readIdentifier().getText() !== "endraw") {
1368
+ n = this.readTo(s) - s.length;
1369
+ continue;
1370
+ }
1371
+ for (; this.p <= this.N; ) {
1372
+ if (this.rmatch(i)) {
1373
+ const o = this.p;
1374
+ return r === n ? (this.rawBeginAt = -1, new rt(this.input, r, o, e, this.file)) : (this.p = n, new nt(this.input, r, n, this.file));
1375
+ }
1376
+ if (this.rmatch(s))
1377
+ break;
1378
+ this.p++;
1379
+ }
1380
+ }
1381
+ throw this.error(`raw ${this.snapshot(this.rawBeginAt)} not closed`, r);
1382
+ }
1383
+ readLiquidTagTokens(e = Q) {
1384
+ const s = [];
1385
+ for (; this.p < this.N; ) {
1386
+ const i = this.readLiquidTagToken(e);
1387
+ i && s.push(i);
1388
+ }
1389
+ return s;
1390
+ }
1391
+ readLiquidTagToken(e) {
1392
+ if (this.skipBlank(), this.end())
1393
+ return;
1394
+ const s = this.p;
1395
+ this.readToDelimiter(`
1396
+ `);
1397
+ const i = this.p;
1398
+ return new Ys(this.input, s, i, e, this.file);
1399
+ }
1400
+ error(e, s = this.p) {
1401
+ return new fs(e, new ve(this.input, s, this.N, this.file));
1402
+ }
1403
+ assert(e, s, i) {
1404
+ if (!e)
1405
+ throw this.error(typeof s == "function" ? s() : s, i);
1406
+ }
1407
+ snapshot(e = this.p) {
1408
+ return JSON.stringify(us(this.input.slice(e, this.N), 32));
1409
+ }
1410
+ /**
1411
+ * @deprecated use #readIdentifier instead
1412
+ */
1413
+ readWord() {
1414
+ return this.readIdentifier();
1415
+ }
1416
+ readIdentifier() {
1417
+ this.skipBlank();
1418
+ const e = this.p;
1419
+ for (; !this.end() && ce(this.peek()); )
1420
+ ++this.p;
1421
+ return new ve(this.input, e, this.p, this.file);
1422
+ }
1423
+ readNonEmptyIdentifier() {
1424
+ const e = this.readIdentifier();
1425
+ return e.size() ? e : void 0;
1426
+ }
1427
+ readTagName() {
1428
+ return this.skipBlank(), this.input[this.p] === "#" ? this.input.slice(this.p, ++this.p) : this.readIdentifier().getText();
1429
+ }
1430
+ readHashes(e) {
1431
+ const s = [];
1432
+ for (; ; ) {
1433
+ const i = this.readHash(e);
1434
+ if (!i)
1435
+ return s;
1436
+ s.push(i);
1437
+ }
1438
+ }
1439
+ readHash(e) {
1440
+ this.skipBlank(), this.peek() === "," && ++this.p;
1441
+ const s = this.p, i = this.readNonEmptyIdentifier();
1442
+ if (!i)
1443
+ return;
1444
+ let r;
1445
+ this.skipBlank();
1446
+ const n = f(e) ? e : e ? "=" : ":";
1447
+ return this.peek() === n && (++this.p, r = this.readValue()), new Ps(this.input, s, this.p, i, r, this.file);
1448
+ }
1449
+ remaining() {
1450
+ return this.input.slice(this.p, this.N);
1451
+ }
1452
+ advance(e = 1) {
1453
+ this.p += e;
1454
+ }
1455
+ end() {
1456
+ return this.p >= this.N;
1457
+ }
1458
+ read() {
1459
+ return this.input[this.p++];
1460
+ }
1461
+ readTo(e) {
1462
+ for (; this.p < this.N; )
1463
+ if (++this.p, this.rmatch(e))
1464
+ return this.p;
1465
+ return -1;
1466
+ }
1467
+ readValue() {
1468
+ this.skipBlank();
1469
+ const e = this.p, s = this.readLiteral() || this.readQuoted() || this.readRange() || this.readNumber(), i = this.readProperties(!s);
1470
+ return i.length ? new at(s, i, this.input, e, this.p) : s;
1471
+ }
1472
+ readScopeValue() {
1473
+ this.skipBlank();
1474
+ const e = this.p, s = this.readProperties();
1475
+ if (s.length)
1476
+ return new at(void 0, s, this.input, e, this.p);
1477
+ }
1478
+ readProperties(e = !0) {
1479
+ const s = [];
1480
+ for (; ; ) {
1481
+ if (this.peek() === "[") {
1482
+ this.p++;
1483
+ const i = this.readValue() || new ve(this.input, this.p, this.p, this.file);
1484
+ this.assert(this.readTo("]") !== -1, "[ not closed"), s.push(i);
1485
+ continue;
1486
+ }
1487
+ if (e && !s.length) {
1488
+ const i = this.readNonEmptyIdentifier();
1489
+ if (i) {
1490
+ s.push(i);
1491
+ continue;
1492
+ }
1493
+ }
1494
+ if (this.peek() === "." && this.peek(1) !== ".") {
1495
+ this.p++;
1496
+ const i = this.readNonEmptyIdentifier();
1497
+ if (!i)
1498
+ break;
1499
+ s.push(i);
1500
+ continue;
1501
+ }
1502
+ break;
1503
+ }
1504
+ return s;
1505
+ }
1506
+ readNumber() {
1507
+ this.skipBlank();
1508
+ let e = !1, s = !1, i = 0;
1509
+ for (this.peekType() & vs && i++; this.p + i <= this.N; )
1510
+ if (this.peekType(i) & ks)
1511
+ s = !0, i++;
1512
+ else if (this.peek(i) === "." && this.peek(i + 1) !== ".") {
1513
+ if (e || !s)
1514
+ return;
1515
+ e = !0, i++;
1516
+ } else
1517
+ break;
1518
+ if (s && !ce(this.peek(i))) {
1519
+ const r = new js(this.input, this.p, this.p + i, this.file);
1520
+ return this.advance(i), r;
1521
+ }
1522
+ }
1523
+ readLiteral() {
1524
+ this.skipBlank();
1525
+ const e = this.matchTrie(this.literalTrie);
1526
+ if (e === -1)
1527
+ return;
1528
+ const s = new $s(this.input, this.p, e, this.file);
1529
+ return this.p = e, s;
1530
+ }
1531
+ readRange() {
1532
+ this.skipBlank();
1533
+ const e = this.p;
1534
+ if (this.peek() !== "(")
1535
+ return;
1536
+ ++this.p;
1537
+ const s = this.readValueOrThrow();
1538
+ this.skipBlank(), this.assert(this.read() === "." && this.read() === ".", "invalid range syntax");
1539
+ const i = this.readValueOrThrow();
1540
+ return this.skipBlank(), this.assert(this.read() === ")", "invalid range syntax"), new Ws(this.input, e, this.p, s, i, this.file);
1541
+ }
1542
+ readValueOrThrow() {
1543
+ const e = this.readValue();
1544
+ return this.assert(e, () => `unexpected token ${this.snapshot()}, value expected`), e;
1545
+ }
1546
+ readQuoted() {
1547
+ this.skipBlank();
1548
+ const e = this.p;
1549
+ if (!(this.peekType() & Xe))
1550
+ return;
1551
+ ++this.p;
1552
+ let s = !1;
1553
+ for (; this.p < this.N && (++this.p, !(this.input[this.p - 1] === this.input[e] && !s)); )
1554
+ s ? s = !1 : this.input[this.p - 1] === "\\" && (s = !0);
1555
+ return new Hs(this.input, e, this.p, this.file);
1556
+ }
1557
+ *readFileNameTemplate(e) {
1558
+ const { outputDelimiterLeft: s } = e, i = [",", " ", s], r = new Set(i);
1559
+ for (; this.p < this.N && !r.has(this.peek()); )
1560
+ yield this.match(s) ? this.readOutputToken(e) : this.readHTMLToken(i);
1561
+ }
1562
+ match(e) {
1563
+ for (let s = 0; s < e.length; s++)
1564
+ if (e[s] !== this.input[this.p + s])
1565
+ return !1;
1566
+ return !0;
1567
+ }
1568
+ rmatch(e) {
1569
+ for (let s = 0; s < e.length; s++)
1570
+ if (e[e.length - 1 - s] !== this.input[this.p - 1 - s])
1571
+ return !1;
1572
+ return !0;
1573
+ }
1574
+ peekType(e = 0) {
1575
+ return this.p + e >= this.N ? 0 : m[this.input.charCodeAt(this.p + e)];
1576
+ }
1577
+ peek(e = 0) {
1578
+ return this.p + e >= this.N ? "" : this.input[this.p + e];
1579
+ }
1580
+ skipBlank() {
1581
+ for (; this.peekType() & X; )
1582
+ ++this.p;
1583
+ }
1584
+ }
1585
+ class Di {
1586
+ constructor(e, s) {
1587
+ this.handlers = {}, this.stopRequested = !1, this.tokens = e, this.parseToken = s;
1588
+ }
1589
+ on(e, s) {
1590
+ return this.handlers[e] = s, this;
1591
+ }
1592
+ trigger(e, s) {
1593
+ const i = this.handlers[e];
1594
+ return i ? (i.call(this, s), !0) : !1;
1595
+ }
1596
+ start() {
1597
+ this.trigger("start");
1598
+ let e;
1599
+ for (; !this.stopRequested && (e = this.tokens.shift()); ) {
1600
+ if (this.trigger("token", e) || Z(e) && this.trigger(`tag:${e.name}`, e))
1601
+ continue;
1602
+ const s = this.parseToken(e, this.tokens);
1603
+ this.trigger("template", s);
1604
+ }
1605
+ return this.stopRequested || this.trigger("end"), this;
1606
+ }
1607
+ stop() {
1608
+ return this.stopRequested = !0, this;
1609
+ }
1610
+ }
1611
+ class Ve {
1612
+ constructor(e) {
1613
+ this.token = e;
1614
+ }
1615
+ }
1616
+ class b extends Ve {
1617
+ constructor(e, s, i) {
1618
+ super(e), this.name = e.name, this.liquid = i, this.tokenizer = e.tokenizer;
1619
+ }
1620
+ }
1621
+ class ee {
1622
+ constructor(e, s) {
1623
+ this.hash = {};
1624
+ const i = e instanceof D ? e : new D(e, {});
1625
+ for (const r of i.readHashes(s))
1626
+ this.hash[r.name.content] = r.value;
1627
+ }
1628
+ *render(e) {
1629
+ const s = {};
1630
+ for (const i of Object.keys(this.hash))
1631
+ s[i] = this.hash[i] === void 0 ? !0 : yield T(this.hash[i], e);
1632
+ return s;
1633
+ }
1634
+ }
1635
+ function Vi(t) {
1636
+ return class extends b {
1637
+ constructor(e, s, i) {
1638
+ super(e, s, i), v(t.parse) && t.parse.call(this, e, s);
1639
+ }
1640
+ *render(e, s) {
1641
+ const i = yield new ee(this.token.args, e.opts.keyValueSeparator).render(e);
1642
+ return yield t.render.call(this, e, s, i);
1643
+ }
1644
+ };
1645
+ }
1646
+ function $t(t) {
1647
+ return S(t);
1648
+ }
1649
+ class qt {
1650
+ constructor(e, s, i) {
1651
+ this.token = e, this.name = e.name, this.handler = v(s) ? s : v(s == null ? void 0 : s.handler) ? s.handler : Ft, this.raw = !v(s) && !!(s != null && s.raw), this.args = e.args, this.liquid = i;
1652
+ }
1653
+ *render(e, s) {
1654
+ const i = [];
1655
+ for (const r of this.args)
1656
+ $t(r) ? i.push([r[0], yield T(r[1], s)]) : i.push(yield T(r, s));
1657
+ return yield this.handler.apply({ context: s, token: this.token, liquid: this.liquid }, [e, ...i]);
1658
+ }
1659
+ }
1660
+ class F {
1661
+ /**
1662
+ * @param str the value to be valuated, eg.: "foobar" | truncate: 3
1663
+ */
1664
+ constructor(e, s) {
1665
+ this.filters = [];
1666
+ const i = typeof e == "string" ? new D(e, s.options.operators).readFilteredValue() : e;
1667
+ this.initial = i.initial, this.filters = i.filters.map((r) => new qt(r, this.getFilter(s, r.name), s));
1668
+ }
1669
+ *value(e, s) {
1670
+ s = s || e.opts.lenientIf && this.filters.length > 0 && this.filters[0].name === "default";
1671
+ let i = yield this.initial.evaluate(e, s);
1672
+ for (const r of this.filters)
1673
+ i = yield r.render(i, e);
1674
+ return i;
1675
+ }
1676
+ getFilter(e, s) {
1677
+ const i = e.filters[s];
1678
+ return x(i || !e.options.strictFilters, () => `undefined filter: ${s}`), i;
1679
+ }
1680
+ }
1681
+ class Mi extends Ve {
1682
+ constructor(e, s) {
1683
+ var i;
1684
+ super(e);
1685
+ const r = new D(e.input, s.options.operators, e.file, e.contentRange);
1686
+ this.value = new F(r.readFilteredValue(), s);
1687
+ const n = this.value.filters, o = s.options.outputEscape;
1688
+ if (!(!((i = n[n.length - 1]) === null || i === void 0) && i.raw) && o) {
1689
+ const a = new Vt(toString.call(o), [], "", 0, 0);
1690
+ n.push(new qt(a, o, s));
1691
+ }
1692
+ }
1693
+ *render(e, s) {
1694
+ const i = yield this.value.value(e, !1);
1695
+ s.write(i);
1696
+ }
1697
+ *arguments() {
1698
+ yield this.value;
1699
+ }
1700
+ }
1701
+ class Ci extends Ve {
1702
+ constructor(e) {
1703
+ super(e), this.str = e.getContent();
1704
+ }
1705
+ *render(e, s) {
1706
+ s.write(this.str);
1707
+ }
1708
+ }
1709
+ class H {
1710
+ constructor(e, s) {
1711
+ this.segments = e, this.location = s;
1712
+ }
1713
+ toString() {
1714
+ return ge(this.segments, !0);
1715
+ }
1716
+ /** Return this variable's segments as an array, possibly with nested arrays for nested paths. */
1717
+ toArray() {
1718
+ function* e(...s) {
1719
+ for (const i of s)
1720
+ i instanceof H ? yield Array.from(e(...i.segments)) : yield i;
1721
+ }
1722
+ return Array.from(e(...this.segments));
1723
+ }
1724
+ }
1725
+ class Se {
1726
+ constructor() {
1727
+ this.map = /* @__PURE__ */ new Map();
1728
+ }
1729
+ get(e) {
1730
+ const s = ge([e.segments[0]]);
1731
+ return this.map.has(s) || this.map.set(s, []), this.map.get(s);
1732
+ }
1733
+ has(e) {
1734
+ return this.map.has(ge([e.segments[0]]));
1735
+ }
1736
+ push(e) {
1737
+ this.get(e).push(e);
1738
+ }
1739
+ asObject() {
1740
+ return Object.fromEntries(this.map);
1741
+ }
1742
+ }
1743
+ const It = {
1744
+ partials: !0
1745
+ };
1746
+ function* Pt(t, e, s) {
1747
+ const i = new Se(), r = new Se(), n = new Se(), o = new dt(/* @__PURE__ */ new Set()), a = /* @__PURE__ */ new Set();
1748
+ function l(c, p) {
1749
+ i.push(c);
1750
+ const g = p.alias(c);
1751
+ if (g !== void 0) {
1752
+ const w = g.segments[0];
1753
+ f(w) && !o.has(w) && r.push(g);
1754
+ } else {
1755
+ const w = c.segments[0];
1756
+ f(w) && !p.has(w) && r.push(c);
1757
+ }
1758
+ for (const w of c.segments)
1759
+ w instanceof H && l(w, p);
1760
+ }
1761
+ function* h(c, p) {
1762
+ if (c.arguments)
1763
+ for (const g of c.arguments())
1764
+ for (const w of pt(g))
1765
+ l(w, p);
1766
+ if (c.localScope)
1767
+ for (const g of c.localScope()) {
1768
+ p.add(g.content), p.deleteAlias(g.content);
1769
+ const [w, te] = g.getPosition();
1770
+ n.push(new H([g.content], { row: w, col: te, file: g.file }));
1771
+ }
1772
+ if (c.children)
1773
+ if (c.partialScope) {
1774
+ const g = c.partialScope();
1775
+ if (g === void 0) {
1776
+ for (const q of yield c.children(e, s))
1777
+ yield h(q, p);
1778
+ return;
1779
+ }
1780
+ if (a.has(g.name))
1781
+ return;
1782
+ const w = /* @__PURE__ */ new Set(), te = g.isolated ? new dt(w) : p.push(w);
1783
+ for (const q of g.scope)
1784
+ if (f(q))
1785
+ w.add(q);
1786
+ else {
1787
+ const [Be, Gt] = q;
1788
+ w.add(Be);
1789
+ const Ue = Array.from(pt(Gt));
1790
+ Ue.length && te.setAlias(Be, Ue[0].segments);
1791
+ }
1792
+ for (const q of yield c.children(e, s))
1793
+ yield h(q, te), a.add(g.name);
1794
+ te.pop();
1795
+ } else {
1796
+ c.blockScope && p.push(new Set(c.blockScope()));
1797
+ for (const g of yield c.children(e, s))
1798
+ yield h(g, p);
1799
+ c.blockScope && p.pop();
1800
+ }
1801
+ }
1802
+ for (const c of t)
1803
+ yield h(c, o);
1804
+ return {
1805
+ variables: i.asObject(),
1806
+ globals: r.asObject(),
1807
+ locals: n.asObject()
1808
+ };
1809
+ }
1810
+ function j(t, e = {}) {
1811
+ const s = Object.assign(Object.assign({}, It), e);
1812
+ return V(Pt(t, s.partials, !1));
1813
+ }
1814
+ function $(t, e = {}) {
1815
+ const s = Object.assign(Object.assign({}, It), e);
1816
+ return M(Pt(t, s.partials, !0));
1817
+ }
1818
+ class dt {
1819
+ constructor(e) {
1820
+ this.stack = [{ names: e, aliases: /* @__PURE__ */ new Map() }];
1821
+ }
1822
+ /** Return true if `name` is in scope. */
1823
+ has(e) {
1824
+ for (const s of this.stack)
1825
+ if (s.names.has(e))
1826
+ return !0;
1827
+ return !1;
1828
+ }
1829
+ push(e) {
1830
+ return this.stack.push({ names: e, aliases: /* @__PURE__ */ new Map() }), this;
1831
+ }
1832
+ pop() {
1833
+ var e;
1834
+ return (e = this.stack.pop()) === null || e === void 0 ? void 0 : e.names;
1835
+ }
1836
+ // Add a name to the template scope.
1837
+ add(e) {
1838
+ this.stack[0].names.add(e);
1839
+ }
1840
+ /** Return the variable that `variable` aliases, or `variable` if it doesn't alias anything. */
1841
+ alias(e) {
1842
+ const s = e.segments[0];
1843
+ if (!f(s))
1844
+ return;
1845
+ const i = this.getAlias(s);
1846
+ if (i !== void 0)
1847
+ return new H([...i, ...e.segments.slice(1)], e.location);
1848
+ }
1849
+ // TODO: `from` could be a path with multiple segments, like `include.x`.
1850
+ setAlias(e, s) {
1851
+ this.stack[this.stack.length - 1].aliases.set(e, s);
1852
+ }
1853
+ deleteAlias(e) {
1854
+ this.stack[this.stack.length - 1].aliases.delete(e);
1855
+ }
1856
+ getAlias(e) {
1857
+ for (const s of this.stack) {
1858
+ if (s.aliases.has(e))
1859
+ return s.aliases.get(e);
1860
+ if (s.names.has(e))
1861
+ return;
1862
+ }
1863
+ }
1864
+ }
1865
+ function* pt(t) {
1866
+ L(t) ? yield* G(t) : t instanceof F && (yield* ji(t));
1867
+ }
1868
+ function* ji(t) {
1869
+ for (const e of t.initial.postfix)
1870
+ L(e) && (yield* G(e));
1871
+ for (const e of t.filters)
1872
+ for (const s of e.args)
1873
+ $t(s) && s[1] ? yield* G(s[1]) : L(s) && (yield* G(s));
1874
+ }
1875
+ function* G(t) {
1876
+ Ut(t) ? (yield* G(t.lhs), yield* G(t.rhs)) : me(t) && (yield Oe(t));
1877
+ }
1878
+ function Oe(t) {
1879
+ const e = [];
1880
+ let s = t.file;
1881
+ const i = t.props[0];
1882
+ s = s || i.file, Re(i) || mt(i) || yt(i) ? e.push(i.content) : me(i) && e.push(...Oe(i).segments);
1883
+ for (const o of t.props.slice(1))
1884
+ s = s || o.file, Re(o) || mt(o) || yt(o) ? e.push(o.content) : me(o) && e.push(Oe(o));
1885
+ const [r, n] = t.getPosition();
1886
+ return new H(e, {
1887
+ row: r,
1888
+ col: n,
1889
+ file: s
1890
+ });
1891
+ }
1892
+ const gt = /^[\u0080-\uFFFFa-zA-Z_][\u0080-\uFFFFa-zA-Z0-9_-]*$/;
1893
+ function ge(t, e = !1) {
1894
+ const s = [], i = t[0];
1895
+ f(i) && (!e || i.match(gt) ? s.push(`${i}`) : s.push(`['${i}']`));
1896
+ for (const r of t.slice(1))
1897
+ r instanceof H ? s.push(`[${ge(r.segments)}]`) : f(r) ? r.match(gt) ? s.push(`.${r}`) : s.push(`['${r}']`) : s.push(`[${r}]`);
1898
+ return s.join("");
1899
+ }
1900
+ var W;
1901
+ (function(t) {
1902
+ t.Partials = "partials", t.Layouts = "layouts", t.Root = "root";
1903
+ })(W || (W = {}));
1904
+ class $i {
1905
+ constructor(e) {
1906
+ if (this.options = e, e.relativeReference) {
1907
+ const s = e.fs.sep;
1908
+ x(s, "`fs.sep` is required for relative reference");
1909
+ const i = new RegExp(["." + s, ".." + s, "./", "../"].map((r) => os(r)).join("|"));
1910
+ this.shouldLoadRelative = (r) => i.test(r);
1911
+ } else
1912
+ this.shouldLoadRelative = (s) => !1;
1913
+ this.contains = this.options.fs.contains || (() => !0);
1914
+ }
1915
+ *lookup(e, s, i, r) {
1916
+ const { fs: n } = this.options, o = this.options[s];
1917
+ for (const a of this.candidates(e, o, r, s !== W.Root))
1918
+ if (i ? n.existsSync(a) : yield n.exists(a))
1919
+ return a;
1920
+ throw this.lookupError(e, o);
1921
+ }
1922
+ *candidates(e, s, i, r) {
1923
+ const { fs: n, extname: o } = this.options;
1924
+ if (this.shouldLoadRelative(e) && i) {
1925
+ const a = n.resolve(this.dirname(i), e, o);
1926
+ for (const l of s)
1927
+ if (!r || this.contains(l, a)) {
1928
+ yield a;
1929
+ break;
1930
+ }
1931
+ }
1932
+ for (const a of s) {
1933
+ const l = n.resolve(a, e, o);
1934
+ (!r || this.contains(a, l)) && (yield l);
1935
+ }
1936
+ if (n.fallback !== void 0) {
1937
+ const a = n.fallback(e);
1938
+ a !== void 0 && (yield a);
1939
+ }
1940
+ }
1941
+ dirname(e) {
1942
+ const s = this.options.fs;
1943
+ return x(s.dirname, "`fs.dirname` is required for relative reference"), s.dirname(e);
1944
+ }
1945
+ lookupError(e, s) {
1946
+ const i = new Error("ENOENT");
1947
+ return i.message = `ENOENT: Failed to lookup "${e}" in "${s}"`, i.code = "ENOENT", i;
1948
+ }
1949
+ }
1950
+ class I {
1951
+ constructor(e) {
1952
+ 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 $i(this.liquid.options), this.parseLimit = new Fe("parse length", e.options.parseLimit);
1953
+ }
1954
+ parse(e, s) {
1955
+ e = String(e), this.parseLimit.use(e.length);
1956
+ const r = new D(e, this.liquid.options.operators, s).readTopLevelTokens(this.liquid.options);
1957
+ return this.parseTokens(r);
1958
+ }
1959
+ parseTokens(e) {
1960
+ let s;
1961
+ const i = [], r = [];
1962
+ for (; s = e.shift(); )
1963
+ try {
1964
+ i.push(this.parseToken(s, e));
1965
+ } catch (n) {
1966
+ if (this.liquid.options.catchAllErrors)
1967
+ r.push(n);
1968
+ else
1969
+ throw n;
1970
+ }
1971
+ if (r.length)
1972
+ throw new Ot(r);
1973
+ return i;
1974
+ }
1975
+ parseToken(e, s) {
1976
+ try {
1977
+ if (Z(e)) {
1978
+ const i = this.liquid.tags[e.name];
1979
+ return x(i, `tag "${e.name}" not found`), new i(e, s, this.liquid, this);
1980
+ }
1981
+ return Ii(e) ? new Mi(e, this.liquid) : new Ci(e);
1982
+ } catch (i) {
1983
+ throw J.is(i) ? i : new ds(i, e);
1984
+ }
1985
+ }
1986
+ parseStream(e) {
1987
+ return new Di(e, (s, i) => this.parseToken(s, i));
1988
+ }
1989
+ *_parseFileCached(e, s, i = W.Root, r) {
1990
+ const n = this.cache, o = this.loader.shouldLoadRelative(e) ? r + "," + e : i + ":" + e, a = yield n.read(o);
1991
+ if (a)
1992
+ return a;
1993
+ const l = this._parseFile(e, s, i, r), h = s ? yield l : V(l);
1994
+ n.write(o, h);
1995
+ try {
1996
+ return yield h;
1997
+ } catch (c) {
1998
+ throw n.remove(o), c;
1999
+ }
2000
+ }
2001
+ *_parseFile(e, s, i = W.Root, r) {
2002
+ const n = yield this.loader.lookup(e, i, s, r);
2003
+ return this.parse(s ? this.fs.readFileSync(n) : yield this.fs.readFile(n), n);
2004
+ }
2005
+ }
2006
+ var y;
2007
+ (function(t) {
2008
+ 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";
2009
+ })(y || (y = {}));
2010
+ function qi(t) {
2011
+ return !!(N(t) & y.Delimited);
2012
+ }
2013
+ function Bt(t) {
2014
+ return N(t) === y.Operator;
2015
+ }
2016
+ function Me(t) {
2017
+ return N(t) === y.HTML;
2018
+ }
2019
+ function Ii(t) {
2020
+ return N(t) === y.Output;
2021
+ }
2022
+ function Z(t) {
2023
+ return N(t) === y.Tag;
2024
+ }
2025
+ function Re(t) {
2026
+ return N(t) === y.Quoted;
2027
+ }
2028
+ function mt(t) {
2029
+ return N(t) === y.Number;
2030
+ }
2031
+ function me(t) {
2032
+ return N(t) === y.PropertyAccess;
2033
+ }
2034
+ function yt(t) {
2035
+ return N(t) === y.Word;
2036
+ }
2037
+ function Ut(t) {
2038
+ return N(t) === y.Range;
2039
+ }
2040
+ function L(t) {
2041
+ return (N(t) & 1667) > 0;
2042
+ }
2043
+ function N(t) {
2044
+ return t ? t.kind : -1;
2045
+ }
2046
+ class P {
2047
+ constructor(e = {}, s = Q, i = {}, { memoryLimit: r, renderLimit: n } = {}) {
2048
+ var o, a, l, h, c;
2049
+ this.scopes = [{}], this.registers = {}, this.breakCalled = !1, this.continueCalled = !1, this.sync = !!i.sync, this.opts = s, this.globals = (o = i.globals) !== null && o !== void 0 ? o : s.globals, this.environments = we(e) ? e : Object(e), this.strictVariables = (a = i.strictVariables) !== null && a !== void 0 ? a : this.opts.strictVariables, this.ownPropertyOnly = (l = i.ownPropertyOnly) !== null && l !== void 0 ? l : s.ownPropertyOnly, this.memoryLimit = r ?? new Fe("memory alloc", (h = i.memoryLimit) !== null && h !== void 0 ? h : s.memoryLimit), this.renderLimit = n ?? new Fe("template render", Mt().now() + ((c = i.renderLimit) !== null && c !== void 0 ? c : s.renderLimit));
2050
+ }
2051
+ getRegister(e) {
2052
+ return this.registers[e] = this.registers[e] || {};
2053
+ }
2054
+ setRegister(e, s) {
2055
+ return this.registers[e] = s;
2056
+ }
2057
+ saveRegister(...e) {
2058
+ return e.map((s) => [s, this.getRegister(s)]);
2059
+ }
2060
+ restoreRegister(e) {
2061
+ return e.forEach(([s, i]) => this.setRegister(s, i));
2062
+ }
2063
+ getAll() {
2064
+ return [this.globals, this.environments, ...this.scopes].reduce((e, s) => pe(e, s), {});
2065
+ }
2066
+ /**
2067
+ * @deprecated use `_get()` or `getSync()` instead
2068
+ */
2069
+ get(e) {
2070
+ return this.getSync(e);
2071
+ }
2072
+ getSync(e) {
2073
+ return M(this._get(e));
2074
+ }
2075
+ *_get(e) {
2076
+ const s = this.findScope(e[0]);
2077
+ return yield this._getFromScope(s, e);
2078
+ }
2079
+ /**
2080
+ * @deprecated use `_get()` instead
2081
+ */
2082
+ getFromScope(e, s) {
2083
+ return M(this._getFromScope(e, s));
2084
+ }
2085
+ *_getFromScope(e, s, i = this.strictVariables) {
2086
+ f(s) && (s = s.split("."));
2087
+ for (let r = 0; r < s.length; r++)
2088
+ if (e = yield Pi(e, s[r], this.ownPropertyOnly), i && as(e))
2089
+ throw new ms(s.slice(0, r + 1).join("."));
2090
+ return e;
2091
+ }
2092
+ push(e) {
2093
+ return this.scopes.push(e);
2094
+ }
2095
+ pop() {
2096
+ return this.scopes.pop();
2097
+ }
2098
+ bottom() {
2099
+ return this.scopes[0];
2100
+ }
2101
+ spawn(e = {}) {
2102
+ return new P(e, this.opts, {
2103
+ sync: this.sync,
2104
+ globals: this.globals,
2105
+ strictVariables: this.strictVariables
2106
+ }, {
2107
+ renderLimit: this.renderLimit,
2108
+ memoryLimit: this.memoryLimit
2109
+ });
2110
+ }
2111
+ findScope(e) {
2112
+ for (let s = this.scopes.length - 1; s >= 0; s--) {
2113
+ const i = this.scopes[s];
2114
+ if (e in i)
2115
+ return i;
2116
+ }
2117
+ return e in this.environments ? this.environments : this.globals;
2118
+ }
2119
+ }
2120
+ function Pi(t, e, s) {
2121
+ if (t = vt(t), e = d(e), R(t))
2122
+ return t;
2123
+ if (S(t) && e < 0)
2124
+ return t[t.length + +e];
2125
+ const i = Bi(t, e, s);
2126
+ return i === void 0 && t instanceof Y ? t.liquidMethodMissing(e) : v(i) ? i.call(t) : e === "size" ? Wi(t) : e === "first" ? Ui(t) : e === "last" ? Hi(t) : i;
2127
+ }
2128
+ function Bi(t, e, s) {
2129
+ if (!(s && !ze.call(t, e) && !(t instanceof Y)))
2130
+ return t[e];
2131
+ }
2132
+ function Ui(t) {
2133
+ return S(t) ? t[0] : t.first;
2134
+ }
2135
+ function Hi(t) {
2136
+ return S(t) ? t[t.length - 1] : t.last;
2137
+ }
2138
+ function Wi(t) {
2139
+ if (ze.call(t, "size") || t.size !== void 0)
2140
+ return t.size;
2141
+ if (S(t) || f(t))
2142
+ return t.length;
2143
+ if (typeof t == "object")
2144
+ return Object.keys(t).length;
2145
+ }
2146
+ var U;
2147
+ (function(t) {
2148
+ t[t.OUTPUT = 0] = "OUTPUT", t[t.STORE = 1] = "STORE";
2149
+ })(U || (U = {}));
2150
+ const Yi = O(Math.abs), Ji = O(Math.max), Zi = O(Math.min), Qi = O(Math.ceil), Gi = O((t, e, s = !1) => s ? Math.floor(t / e) : t / e), Xi = O(Math.floor), Ki = O((t, e) => t - e), er = O((t, e) => t % e), tr = O((t, e) => t * e);
2151
+ function sr(t, e = 0) {
2152
+ t = d(t), e = d(e);
2153
+ const s = Math.pow(10, e);
2154
+ return Math.round(t * s) / s;
2155
+ }
2156
+ function ir(t, e) {
2157
+ return t = d(t), e = d(e), Number(t) + Number(e);
2158
+ }
2159
+ var rr = /* @__PURE__ */ Object.freeze({
2160
+ __proto__: null,
2161
+ abs: Yi,
2162
+ at_least: Ji,
2163
+ at_most: Zi,
2164
+ ceil: Qi,
2165
+ divided_by: Gi,
2166
+ floor: Xi,
2167
+ minus: Ki,
2168
+ modulo: er,
2169
+ times: tr,
2170
+ round: sr,
2171
+ plus: ir
2172
+ });
2173
+ const nr = (t) => decodeURIComponent(u(t)).replace(/\+/g, " "), or = (t) => encodeURIComponent(u(t)).replace(/%20/g, "+"), ar = (t) => encodeURIComponent(u(t)).replace(/%20/g, "+").replace(/[!'()*]/g, (e) => "%" + e.charCodeAt(0).toString(16).toUpperCase()), lr = (t) => encodeURI(u(t)).replace(/%5B/g, "[").replace(/%5D/g, "]"), wt = /[^\p{M}\p{L}\p{Nd}]+/ug, cr = {
2174
+ raw: /\s+/g,
2175
+ default: wt,
2176
+ pretty: /[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/ug,
2177
+ ascii: /[^A-Za-z0-9]+/g,
2178
+ latin: wt,
2179
+ none: null
2180
+ };
2181
+ function hr(t, e = "default", s = !1) {
2182
+ t = u(t);
2183
+ const i = cr[e];
2184
+ return i && (e === "latin" && (t = ur(t)), t = t.replace(i, "-").replace(/^-|-$/g, "")), s ? t : t.toLowerCase();
2185
+ }
2186
+ function ur(t) {
2187
+ 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");
2188
+ }
2189
+ var fr = /* @__PURE__ */ Object.freeze({
2190
+ __proto__: null,
2191
+ url_decode: nr,
2192
+ url_encode: or,
2193
+ cgi_escape: ar,
2194
+ uri_escape: lr,
2195
+ slugify: hr
2196
+ });
2197
+ const dr = O(function(t, e) {
2198
+ const s = _(t), i = R(e) ? " " : u(e), r = s.length * (1 + i.length);
2199
+ return this.context.memoryLimit.use(r), s.join(i);
2200
+ }), pr = O((t) => _t(t) ? St(t) : ""), gr = O((t) => _t(t) ? t[0] : ""), mr = O(function(t) {
2201
+ const e = _(t);
2202
+ return this.context.memoryLimit.use(e.length), [...e].reverse();
2203
+ });
2204
+ function* yr(t, e) {
2205
+ const s = [], i = _(t);
2206
+ this.context.memoryLimit.use(i.length);
2207
+ for (const r of i)
2208
+ s.push([
2209
+ r,
2210
+ e ? yield this.context._getFromScope(r, u(e).split("."), !1) : r
2211
+ ]);
2212
+ return s.sort((r, n) => {
2213
+ const o = r[1], a = n[1];
2214
+ return o < a ? -1 : o > a ? 1 : 0;
2215
+ }).map((r) => r[0]);
2216
+ }
2217
+ function wr(t, e) {
2218
+ const s = u(e), i = e === void 0 ? Qe : (n, o) => Qe(n[s], o[s]), r = _(t);
2219
+ return this.context.memoryLimit.use(r.length), [...r].sort(i);
2220
+ }
2221
+ const br = (t) => t && t.length || 0;
2222
+ function* Tr(t, e) {
2223
+ const s = [], i = _(t);
2224
+ this.context.memoryLimit.use(i.length);
2225
+ for (const r of i)
2226
+ s.push(yield this.context._getFromScope(r, u(e), !1));
2227
+ return s;
2228
+ }
2229
+ function* kr(t, e) {
2230
+ let s = 0;
2231
+ const i = _(t);
2232
+ for (const r of i) {
2233
+ const n = Number(e ? yield this.context._getFromScope(r, u(e), !1) : r);
2234
+ s += Number.isNaN(n) ? 0 : n;
2235
+ }
2236
+ return s;
2237
+ }
2238
+ function vr(t) {
2239
+ const e = _(t);
2240
+ return this.context.memoryLimit.use(e.length), e.filter((s) => !R(d(s)));
2241
+ }
2242
+ function Ht(t, e = []) {
2243
+ const s = _(t), i = _(e);
2244
+ return this.context.memoryLimit.use(s.length + i.length), s.concat(i);
2245
+ }
2246
+ function _r(t, e) {
2247
+ return Ht.call(this, t, [e]);
2248
+ }
2249
+ function Sr(t, e) {
2250
+ const s = _(t);
2251
+ this.context.memoryLimit.use(s.length);
2252
+ const i = [...s];
2253
+ return i.unshift(e), i;
2254
+ }
2255
+ function xr(t) {
2256
+ const e = [..._(t)];
2257
+ return e.pop(), e;
2258
+ }
2259
+ function Lr(t) {
2260
+ const e = _(t);
2261
+ this.context.memoryLimit.use(e.length);
2262
+ const s = [...e];
2263
+ return s.shift(), s;
2264
+ }
2265
+ function Fr(t, e, s = 1) {
2266
+ return t = d(t), R(t) ? [] : (S(t) || (t = u(t)), e = e < 0 ? t.length + e : e, this.context.memoryLimit.use(s), t.slice(e, e + s));
2267
+ }
2268
+ function Wt(t) {
2269
+ return this.context.opts.jekyllWhere ? (e) => K.is(t) ? C(e, t) : S(e) ? ai(e, t) : C(e, t) : t === void 0 ? (e) => B(e, this.context) : (e) => C(e, t);
2270
+ }
2271
+ function* Yt(t, e, s, i) {
2272
+ const r = [];
2273
+ e = _(e), this.context.memoryLimit.use(e.length);
2274
+ const n = new D(u(s)).readScopeValue();
2275
+ for (const a of e)
2276
+ r.push(yield T(n, this.context.spawn(a)));
2277
+ const o = Wt.call(this, i);
2278
+ return e.filter((a, l) => o(r[l]) === t);
2279
+ }
2280
+ function* Jt(t, e, s, i) {
2281
+ const r = [], n = new F(u(i), this.liquid), o = _(e);
2282
+ this.context.memoryLimit.use(o.length);
2283
+ for (const a of o) {
2284
+ this.context.push({ [s]: a });
2285
+ const l = yield n.value(this.context);
2286
+ this.context.pop(), l === t && r.push(a);
2287
+ }
2288
+ return r;
2289
+ }
2290
+ function* Or(t, e, s) {
2291
+ return yield* Yt.call(this, !0, t, e, s);
2292
+ }
2293
+ function* Rr(t, e, s) {
2294
+ return yield* Yt.call(this, !1, t, e, s);
2295
+ }
2296
+ function* zr(t, e, s) {
2297
+ return yield* Jt.call(this, !0, t, e, s);
2298
+ }
2299
+ function* Er(t, e, s) {
2300
+ return yield* Jt.call(this, !1, t, e, s);
2301
+ }
2302
+ function* Nr(t, e) {
2303
+ const s = /* @__PURE__ */ new Map();
2304
+ t = ie(t);
2305
+ const i = new D(u(e)).readScopeValue();
2306
+ this.context.memoryLimit.use(t.length);
2307
+ for (const r of t) {
2308
+ const n = yield T(i, this.context.spawn(r));
2309
+ s.has(n) || s.set(n, []), s.get(n).push(r);
2310
+ }
2311
+ return [...s.entries()].map(([r, n]) => ({ name: r, items: n }));
2312
+ }
2313
+ function* Ar(t, e, s) {
2314
+ const i = /* @__PURE__ */ new Map(), r = new F(u(s), this.liquid);
2315
+ t = ie(t), this.context.memoryLimit.use(t.length);
2316
+ for (const n of t) {
2317
+ this.context.push({ [e]: n });
2318
+ const o = yield r.value(this.context);
2319
+ this.context.pop(), i.has(o) || i.set(o, []), i.get(o).push(n);
2320
+ }
2321
+ return [...i.entries()].map(([n, o]) => ({ name: n, items: o }));
2322
+ }
2323
+ function* Ce(t, e, s) {
2324
+ const i = new D(u(e)).readScopeValue(), r = _(t), n = Wt.call(this, s);
2325
+ for (let o = 0; o < r.length; o++) {
2326
+ const a = yield T(i, this.context.spawn(r[o]));
2327
+ if (n(a))
2328
+ return [o, r[o]];
2329
+ }
2330
+ }
2331
+ function* je(t, e, s) {
2332
+ const i = new F(u(s), this.liquid), r = _(t);
2333
+ for (let n = 0; n < r.length; n++) {
2334
+ this.context.push({ [e]: r[n] });
2335
+ const o = yield i.value(this.context);
2336
+ if (this.context.pop(), o)
2337
+ return [n, r[n]];
2338
+ }
2339
+ }
2340
+ function* Dr(t, e, s) {
2341
+ return !!(yield* Ce.call(this, t, e, s));
2342
+ }
2343
+ function* Vr(t, e, s) {
2344
+ return !!(yield* je.call(this, t, e, s));
2345
+ }
2346
+ function* Mr(t, e, s) {
2347
+ const i = yield* Ce.call(this, t, e, s);
2348
+ return i ? i[0] : void 0;
2349
+ }
2350
+ function* Cr(t, e, s) {
2351
+ const i = yield* je.call(this, t, e, s);
2352
+ return i ? i[0] : void 0;
2353
+ }
2354
+ function* jr(t, e, s) {
2355
+ const i = yield* Ce.call(this, t, e, s);
2356
+ return i ? i[1] : void 0;
2357
+ }
2358
+ function* $r(t, e, s) {
2359
+ const i = yield* je.call(this, t, e, s);
2360
+ return i ? i[1] : void 0;
2361
+ }
2362
+ function qr(t) {
2363
+ return t = _(t), this.context.memoryLimit.use(t.length), [...new Set(t)];
2364
+ }
2365
+ function Ir(t, e = 1) {
2366
+ if (t = d(t), R(t))
2367
+ return [];
2368
+ S(t) || (t = u(t)), this.context.memoryLimit.use(e);
2369
+ const s = [...t].sort(() => Math.random() - 0.5);
2370
+ return e === 1 ? s[0] : s.slice(0, e);
2371
+ }
2372
+ var Pr = /* @__PURE__ */ Object.freeze({
2373
+ __proto__: null,
2374
+ join: dr,
2375
+ last: pr,
2376
+ first: gr,
2377
+ reverse: mr,
2378
+ sort: yr,
2379
+ sort_natural: wr,
2380
+ size: br,
2381
+ map: Tr,
2382
+ sum: kr,
2383
+ compact: vr,
2384
+ concat: Ht,
2385
+ push: _r,
2386
+ unshift: Sr,
2387
+ pop: xr,
2388
+ shift: Lr,
2389
+ slice: Fr,
2390
+ where: Or,
2391
+ reject: Rr,
2392
+ where_exp: zr,
2393
+ reject_exp: Er,
2394
+ group_by: Nr,
2395
+ group_by_exp: Ar,
2396
+ has: Dr,
2397
+ has_exp: Vr,
2398
+ find_index: Mr,
2399
+ find_index_exp: Cr,
2400
+ find: jr,
2401
+ find_exp: $r,
2402
+ uniq: qr,
2403
+ sample: Ir
2404
+ });
2405
+ function $e(t, e, s) {
2406
+ var i, r, n;
2407
+ const o = ((i = t == null ? void 0 : t.length) !== null && i !== void 0 ? i : 0) + ((r = e == null ? void 0 : e.length) !== null && r !== void 0 ? r : 0) + ((n = s == null ? void 0 : s.length) !== null && n !== void 0 ? n : 0);
2408
+ this.context.memoryLimit.use(o);
2409
+ const a = Qt(t, this.context.opts, s);
2410
+ return a ? (e = d(e), e = R(e) ? this.context.opts.dateFormat : u(e), he(a, e)) : t;
2411
+ }
2412
+ function Br(t) {
2413
+ return $e.call(this, t, "%Y-%m-%dT%H:%M:%S%:z");
2414
+ }
2415
+ function Ur(t) {
2416
+ return $e.call(this, t, "%a, %d %b %Y %H:%M:%S %z");
2417
+ }
2418
+ function Hr(t, e, s) {
2419
+ return Zt.call(this, t, "%b", e, s);
2420
+ }
2421
+ function Wr(t, e, s) {
2422
+ return Zt.call(this, t, "%B", e, s);
2423
+ }
2424
+ function Zt(t, e, s, i) {
2425
+ const r = Qt(t, this.context.opts);
2426
+ if (!r)
2427
+ return t;
2428
+ if (s === "ordinal") {
2429
+ const n = r.getDate();
2430
+ return i === "US" ? he(r, `${e} ${n}%q, %Y`) : he(r, `${n}%q ${e} %Y`);
2431
+ }
2432
+ return he(r, `%d ${e} %Y`);
2433
+ }
2434
+ function Qt(t, e, s) {
2435
+ let i;
2436
+ const r = s ?? e.timezoneOffset, n = e.locale;
2437
+ return t = d(t), t === "now" || t === "today" ? i = new E(Date.now(), n, r) : ye(t) ? i = new E(t * 1e3, n, r) : f(t) ? /^\d+$/.test(t) ? i = new E(+t * 1e3, n, r) : e.preserveTimezones && s === void 0 ? i = E.createDateFixedToTimezone(t, n) : i = new E(t, n, r) : i = new E(t, n, r), i.valid() ? i : void 0;
2438
+ }
2439
+ var Yr = /* @__PURE__ */ Object.freeze({
2440
+ __proto__: null,
2441
+ date: $e,
2442
+ date_to_xmlschema: Br,
2443
+ date_to_rfc822: Ur,
2444
+ date_to_string: Hr,
2445
+ date_to_long_string: Wr
2446
+ });
2447
+ const xe = /[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu, bt = /[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu;
2448
+ function Jr(t, e) {
2449
+ x(arguments.length === 2, "append expect 2 arguments");
2450
+ const s = u(t), i = u(e);
2451
+ return this.context.memoryLimit.use(s.length + i.length), s + i;
2452
+ }
2453
+ function Zr(t, e) {
2454
+ x(arguments.length === 2, "prepend expect 2 arguments");
2455
+ const s = u(t), i = u(e);
2456
+ return this.context.memoryLimit.use(s.length + i.length), i + s;
2457
+ }
2458
+ function Qr(t, e) {
2459
+ const s = u(t);
2460
+ return this.context.memoryLimit.use(s.length), e ? (e = Ee(u(e)), s.replace(new RegExp(`^[${e}]+`, "g"), "")) : s.replace(/^\s+/, "");
2461
+ }
2462
+ function Gr(t) {
2463
+ const e = u(t);
2464
+ return this.context.memoryLimit.use(e.length), e.toLowerCase();
2465
+ }
2466
+ function Xr(t) {
2467
+ const e = u(t);
2468
+ return this.context.memoryLimit.use(e.length), u(e).toUpperCase();
2469
+ }
2470
+ function Kr(t, e) {
2471
+ const s = u(t);
2472
+ return this.context.memoryLimit.use(s.length), s.split(u(e)).join("");
2473
+ }
2474
+ function en(t, e) {
2475
+ const s = u(t);
2476
+ return this.context.memoryLimit.use(s.length), s.replace(u(e), "");
2477
+ }
2478
+ function tn(t, e) {
2479
+ const s = u(t);
2480
+ this.context.memoryLimit.use(s.length);
2481
+ const i = u(e), r = s.lastIndexOf(i);
2482
+ return r === -1 ? s : s.substring(0, r) + s.substring(r + i.length);
2483
+ }
2484
+ function sn(t, e) {
2485
+ return t = u(t), this.context.memoryLimit.use(t.length), e ? (e = Ee(u(e)), t.replace(new RegExp(`[${e}]+$`, "g"), "")) : t.replace(/\s+$/, "");
2486
+ }
2487
+ function rn(t, e) {
2488
+ const s = u(t);
2489
+ this.context.memoryLimit.use(s.length);
2490
+ const i = s.split(u(e));
2491
+ for (; i.length && i[i.length - 1] === ""; )
2492
+ i.pop();
2493
+ return i;
2494
+ }
2495
+ function nn(t, e) {
2496
+ const s = u(t);
2497
+ return this.context.memoryLimit.use(s.length), e ? (e = Ee(u(e)), s.replace(new RegExp(`^[${e}]+`, "g"), "").replace(new RegExp(`[${e}]+$`, "g"), "")) : s.trim();
2498
+ }
2499
+ function on(t) {
2500
+ const e = u(t);
2501
+ return this.context.memoryLimit.use(e.length), e.replace(/\r?\n/gm, "");
2502
+ }
2503
+ function an(t) {
2504
+ return t = u(t), this.context.memoryLimit.use(t.length), t.charAt(0).toUpperCase() + t.slice(1).toLowerCase();
2505
+ }
2506
+ function ln(t, e, s) {
2507
+ const i = u(t);
2508
+ return this.context.memoryLimit.use(i.length), i.split(u(e)).join(s);
2509
+ }
2510
+ function cn(t, e, s) {
2511
+ const i = u(t);
2512
+ return this.context.memoryLimit.use(i.length), i.replace(u(e), s);
2513
+ }
2514
+ function hn(t, e, s) {
2515
+ const i = u(t);
2516
+ this.context.memoryLimit.use(i.length);
2517
+ const r = u(e), n = i.lastIndexOf(r);
2518
+ if (n === -1)
2519
+ return i;
2520
+ const o = u(s);
2521
+ return i.substring(0, n) + o + i.substring(n + r.length);
2522
+ }
2523
+ function un(t, e = 50, s = "...") {
2524
+ const i = u(t);
2525
+ return this.context.memoryLimit.use(i.length), i.length <= e ? t : i.substring(0, e - s.length) + s;
2526
+ }
2527
+ function fn(t, e = 15, s = "...") {
2528
+ const i = u(t);
2529
+ this.context.memoryLimit.use(i.length);
2530
+ const r = i.split(/\s+/);
2531
+ e <= 0 && (e = 1);
2532
+ let n = r.slice(0, e).join(" ");
2533
+ return r.length >= e && (n += s), n;
2534
+ }
2535
+ function dn(t) {
2536
+ const e = u(t);
2537
+ return this.context.memoryLimit.use(e.length), e.replace(/\s+/g, " ");
2538
+ }
2539
+ function pn(t, e) {
2540
+ const s = u(t);
2541
+ if (this.context.memoryLimit.use(s.length), t = s.trim(), !t)
2542
+ return 0;
2543
+ switch (e) {
2544
+ case "cjk":
2545
+ return (t.match(xe) || []).length + (t.match(bt) || []).length;
2546
+ case "auto":
2547
+ return xe.test(t) ? t.match(xe).length + (t.match(bt) || []).length : t.split(/\s+/).length;
2548
+ default:
2549
+ return t.split(/\s+/).length;
2550
+ }
2551
+ }
2552
+ function gn(t, e = "and") {
2553
+ switch (this.context.memoryLimit.use(t.length), t.length) {
2554
+ case 0:
2555
+ return "";
2556
+ case 1:
2557
+ return t[0];
2558
+ case 2:
2559
+ return `${t[0]} ${e} ${t[1]}`;
2560
+ default:
2561
+ return `${t.slice(0, -1).join(", ")}, ${e} ${t[t.length - 1]}`;
2562
+ }
2563
+ }
2564
+ var mn = /* @__PURE__ */ Object.freeze({
2565
+ __proto__: null,
2566
+ append: Jr,
2567
+ prepend: Zr,
2568
+ lstrip: Qr,
2569
+ downcase: Gr,
2570
+ upcase: Xr,
2571
+ remove: Kr,
2572
+ remove_first: en,
2573
+ remove_last: tn,
2574
+ rstrip: sn,
2575
+ split: rn,
2576
+ strip: nn,
2577
+ strip_newlines: on,
2578
+ capitalize: an,
2579
+ replace: ln,
2580
+ replace_first: cn,
2581
+ replace_last: hn,
2582
+ truncate: un,
2583
+ truncatewords: fn,
2584
+ normalize_whitespace: dn,
2585
+ number_of_words: pn,
2586
+ array_to_sentence_string: gn
2587
+ });
2588
+ const yn = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Fi), rr), fr), Pr), Yr), mn), jt);
2589
+ class wn extends b {
2590
+ constructor(e, s, i) {
2591
+ super(e, s, i), this.identifier = this.tokenizer.readIdentifier(), this.key = this.identifier.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 F(this.tokenizer.readFilteredValue(), this.liquid);
2592
+ }
2593
+ *render(e) {
2594
+ e.bottom()[this.key] = yield this.value.value(e, this.liquid.options.lenientIf);
2595
+ }
2596
+ *arguments() {
2597
+ yield this.value;
2598
+ }
2599
+ *localScope() {
2600
+ yield this.identifier;
2601
+ }
2602
+ }
2603
+ const Tt = ["offset", "limit", "reversed"];
2604
+ class bn extends b {
2605
+ constructor(e, s, i, r) {
2606
+ super(e, s, i);
2607
+ const n = this.tokenizer.readIdentifier(), o = this.tokenizer.readIdentifier(), a = this.tokenizer.readValue();
2608
+ if (!n.size() || o.content !== "in" || !a)
2609
+ throw new Error(`illegal tag: ${e.getText()}`);
2610
+ this.variable = n.content, this.collection = a, this.hash = new ee(this.tokenizer, i.options.keyValueSeparator), this.templates = [], this.elseTemplates = [];
2611
+ let l;
2612
+ const h = r.parseStream(s).on("start", () => l = this.templates).on("tag:else", (c) => {
2613
+ de(c.args), l = this.elseTemplates;
2614
+ }).on("tag:endfor", (c) => {
2615
+ de(c.args), h.stop();
2616
+ }).on("template", (c) => l.push(c)).on("end", () => {
2617
+ throw new Error(`tag ${e.getText()} not closed`);
2618
+ });
2619
+ h.start();
2620
+ }
2621
+ *render(e, s) {
2622
+ const i = this.liquid.renderer;
2623
+ let r = ie(yield T(this.collection, e));
2624
+ if (!r.length) {
2625
+ yield i.renderTemplates(this.elseTemplates, e, s);
2626
+ return;
2627
+ }
2628
+ const n = "continue-" + this.variable + "-" + this.collection.getText();
2629
+ e.push({ continue: e.getRegister(n) });
2630
+ const o = yield this.hash.render(e);
2631
+ e.pop(), r = (this.liquid.options.orderedFilterParameters ? Object.keys(o).filter((h) => Tt.includes(h)) : Tt.filter((h) => o[h] !== void 0)).reduce((h, c) => c === "offset" ? kn(h, o.offset) : c === "limit" ? vn(h, o.limit) : Tn(h), r), e.setRegister(n, (o.offset || 0) + r.length);
2632
+ const l = { forloop: new Ae(r.length, this.collection.getText(), this.variable) };
2633
+ e.push(l);
2634
+ for (const h of r) {
2635
+ if (l[this.variable] = h, e.continueCalled = e.breakCalled = !1, yield i.renderTemplates(this.templates, e, s), e.breakCalled)
2636
+ break;
2637
+ l.forloop.next();
2638
+ }
2639
+ e.continueCalled = e.breakCalled = !1, e.pop();
2640
+ }
2641
+ *children() {
2642
+ const e = this.templates.slice();
2643
+ return this.elseTemplates && e.push(...this.elseTemplates), e;
2644
+ }
2645
+ *arguments() {
2646
+ yield this.collection;
2647
+ for (const e of Object.values(this.hash.hash))
2648
+ L(e) && (yield e);
2649
+ }
2650
+ blockScope() {
2651
+ return [this.variable, "forloop"];
2652
+ }
2653
+ }
2654
+ function Tn(t) {
2655
+ return [...t].reverse();
2656
+ }
2657
+ function kn(t, e) {
2658
+ return t.slice(e);
2659
+ }
2660
+ function vn(t, e) {
2661
+ return t.slice(0, e);
2662
+ }
2663
+ class _n extends b {
2664
+ constructor(e, s, i, r) {
2665
+ for (super(e, s, i), this.templates = [], this.identifier = this.readVariable(), this.variable = this.identifier.content; s.length; ) {
2666
+ const n = s.shift();
2667
+ if (Z(n) && n.name === "endcapture")
2668
+ return;
2669
+ this.templates.push(r.parseToken(n, s));
2670
+ }
2671
+ throw new Error(`tag ${e.getText()} not closed`);
2672
+ }
2673
+ readVariable() {
2674
+ let e = this.tokenizer.readIdentifier();
2675
+ if (e.content || (e = this.tokenizer.readQuoted(), e))
2676
+ return e;
2677
+ throw this.tokenizer.error("invalid capture name");
2678
+ }
2679
+ *render(e) {
2680
+ const i = yield this.liquid.renderer.renderTemplates(this.templates, e);
2681
+ e.bottom()[this.variable] = i;
2682
+ }
2683
+ *children() {
2684
+ return this.templates;
2685
+ }
2686
+ *localScope() {
2687
+ yield this.identifier;
2688
+ }
2689
+ }
2690
+ class Sn extends b {
2691
+ constructor(e, s, i, r) {
2692
+ super(e, s, i), this.branches = [], this.elseTemplates = [], this.value = new F(this.tokenizer.readFilteredValue(), this.liquid), this.elseTemplates = [];
2693
+ let n = [], o = 0;
2694
+ const a = r.parseStream(s).on("tag:when", (l) => {
2695
+ if (o > 0)
2696
+ return;
2697
+ n = [];
2698
+ const h = [];
2699
+ for (; !l.tokenizer.end(); )
2700
+ h.push(l.tokenizer.readValueOrThrow()), l.tokenizer.skipBlank(), l.tokenizer.peek() === "," ? l.tokenizer.readTo(",") : l.tokenizer.readTo("or");
2701
+ this.branches.push({
2702
+ values: h,
2703
+ templates: n
2704
+ });
2705
+ }).on("tag:else", () => {
2706
+ o++, n = this.elseTemplates;
2707
+ }).on("tag:endcase", () => a.stop()).on("template", (l) => {
2708
+ (n !== this.elseTemplates || o === 1) && n.push(l);
2709
+ }).on("end", () => {
2710
+ throw new Error(`tag ${e.getText()} not closed`);
2711
+ });
2712
+ a.start();
2713
+ }
2714
+ *render(e, s) {
2715
+ const i = this.liquid.renderer, r = d(yield this.value.value(e, e.opts.lenientIf));
2716
+ let n = !1;
2717
+ for (const o of this.branches)
2718
+ for (const a of o.values) {
2719
+ const l = yield T(a, e, e.opts.lenientIf);
2720
+ if (C(r, l)) {
2721
+ yield i.renderTemplates(o.templates, e, s), n = !0;
2722
+ break;
2723
+ }
2724
+ }
2725
+ n || (yield i.renderTemplates(this.elseTemplates, e, s));
2726
+ }
2727
+ *arguments() {
2728
+ yield this.value, yield* this.branches.flatMap((e) => e.values);
2729
+ }
2730
+ *children() {
2731
+ const e = this.branches.flatMap((s) => s.templates);
2732
+ return this.elseTemplates && e.push(...this.elseTemplates), e;
2733
+ }
2734
+ }
2735
+ class xn extends b {
2736
+ constructor(e, s, i) {
2737
+ for (super(e, s, i); s.length; ) {
2738
+ const r = s.shift();
2739
+ if (Z(r) && r.name === "endcomment")
2740
+ return;
2741
+ }
2742
+ throw new Error(`tag ${e.getText()} not closed`);
2743
+ }
2744
+ render() {
2745
+ }
2746
+ }
2747
+ class Ln extends b {
2748
+ constructor(e, s, i, r) {
2749
+ super(e, s, i);
2750
+ const n = this.tokenizer;
2751
+ for (this.file = qe(n, this.liquid, r), this.currentFile = e.file; !n.end(); ) {
2752
+ n.skipBlank();
2753
+ const o = n.p, a = n.readIdentifier();
2754
+ if ((a.content === "with" || a.content === "for") && (n.skipBlank(), n.peek() !== ":")) {
2755
+ const l = n.readValue();
2756
+ if (l) {
2757
+ const h = n.p, c = n.readIdentifier();
2758
+ let p;
2759
+ c.content === "as" ? p = n.readIdentifier() : n.p = h, this[a.content] = { value: l, alias: p && p.content }, n.skipBlank(), n.peek() === "," && n.advance();
2760
+ continue;
2761
+ }
2762
+ }
2763
+ n.p = o;
2764
+ break;
2765
+ }
2766
+ this.hash = new ee(n, i.options.keyValueSeparator);
2767
+ }
2768
+ *render(e, s) {
2769
+ const { liquid: i, hash: r } = this, n = yield Ie(this.file, e, i);
2770
+ x(n, () => `illegal file path "${n}"`);
2771
+ const o = e.spawn(), a = o.bottom();
2772
+ if (pe(a, yield r.render(e)), this.with) {
2773
+ const { value: l, alias: h } = this.with;
2774
+ a[h || n] = yield T(l, e);
2775
+ }
2776
+ if (this.for) {
2777
+ const { value: l, alias: h } = this.for, c = ie(yield T(l, e));
2778
+ a.forloop = new Ae(c.length, l.getText(), h);
2779
+ for (const p of c) {
2780
+ a[h] = p;
2781
+ const g = yield i._parsePartialFile(n, o.sync, this.currentFile);
2782
+ yield i.renderer.renderTemplates(g, o, s), a.forloop.next();
2783
+ }
2784
+ } else {
2785
+ const l = yield i._parsePartialFile(n, o.sync, this.currentFile);
2786
+ yield i.renderer.renderTemplates(l, o, s);
2787
+ }
2788
+ }
2789
+ *children(e, s) {
2790
+ return e && f(this.file) ? yield this.liquid._parsePartialFile(this.file, s, this.currentFile) : [];
2791
+ }
2792
+ partialScope() {
2793
+ if (f(this.file)) {
2794
+ const e = Object.keys(this.hash.hash);
2795
+ if (this.with) {
2796
+ const { value: s, alias: i } = this.with;
2797
+ f(i) ? e.push([i, s]) : f(this.file) && e.push([this.file, s]);
2798
+ }
2799
+ if (this.for) {
2800
+ const { value: s, alias: i } = this.for;
2801
+ f(i) ? e.push([i, s]) : f(this.file) && e.push([this.file, s]);
2802
+ }
2803
+ return { name: this.file, isolated: !0, scope: e };
2804
+ }
2805
+ }
2806
+ *arguments() {
2807
+ for (const e of Object.values(this.hash.hash))
2808
+ L(e) && (yield e);
2809
+ if (this.with) {
2810
+ const { value: e } = this.with;
2811
+ L(e) && (yield e);
2812
+ }
2813
+ if (this.for) {
2814
+ const { value: e } = this.for;
2815
+ L(e) && (yield e);
2816
+ }
2817
+ }
2818
+ }
2819
+ function qe(t, e, s) {
2820
+ if (e.options.dynamicPartials) {
2821
+ const n = t.readValue();
2822
+ if (t.assert(n, "illegal file path"), n.getText() === "none")
2823
+ return;
2824
+ if (Re(n)) {
2825
+ const o = s.parse(si(n));
2826
+ return kt(o);
2827
+ }
2828
+ return n;
2829
+ }
2830
+ const i = [...t.readFileNameTemplate(e.options)], r = kt(s.parseTokens(i));
2831
+ return r === "none" ? void 0 : r;
2832
+ }
2833
+ function kt(t) {
2834
+ return t.length === 1 && Me(t[0].token) ? t[0].token.getContent() : t;
2835
+ }
2836
+ function* Ie(t, e, s) {
2837
+ return typeof t == "string" ? t : Array.isArray(t) ? s.renderer.renderTemplates(t, e) : yield T(t, e);
2838
+ }
2839
+ class Fn extends b {
2840
+ constructor(e, s, i, r) {
2841
+ super(e, s, i);
2842
+ const { tokenizer: n } = e;
2843
+ this.file = qe(n, this.liquid, r), this.currentFile = e.file;
2844
+ const o = n.p;
2845
+ n.readIdentifier().content === "with" ? (n.skipBlank(), n.peek() !== ":" ? this.withVar = n.readValue() : n.p = o) : n.p = o, this.hash = new ee(n, i.options.jekyllInclude || i.options.keyValueSeparator);
2846
+ }
2847
+ *render(e, s) {
2848
+ const { liquid: i, hash: r, withVar: n } = this, { renderer: o } = i, a = yield Ie(this.file, e, i);
2849
+ x(a, () => `illegal file path "${a}"`);
2850
+ const l = e.saveRegister("blocks", "blockMode");
2851
+ e.setRegister("blocks", {}), e.setRegister("blockMode", U.OUTPUT);
2852
+ const h = yield r.render(e);
2853
+ n && (h[a] = yield T(n, e));
2854
+ const c = yield i._parsePartialFile(a, e.sync, this.currentFile);
2855
+ e.push(e.opts.jekyllInclude ? { include: h } : h), yield o.renderTemplates(c, e, s), e.pop(), e.restoreRegister(l);
2856
+ }
2857
+ *children(e, s) {
2858
+ return e && f(this.file) ? yield this.liquid._parsePartialFile(this.file, s, this.currentFile) : [];
2859
+ }
2860
+ partialScope() {
2861
+ if (f(this.file)) {
2862
+ let e;
2863
+ return this.liquid.options.jekyllInclude ? e = ["include"] : (e = Object.keys(this.hash.hash), this.withVar && e.push([this.file, this.withVar])), { name: this.file, isolated: !1, scope: e };
2864
+ }
2865
+ }
2866
+ *arguments() {
2867
+ yield* Object.values(this.hash.hash).filter(L), L(this.file) && (yield this.file), L(this.withVar) && (yield this.withVar);
2868
+ }
2869
+ }
2870
+ class On extends b {
2871
+ constructor(e, s, i) {
2872
+ super(e, s, i), this.identifier = this.tokenizer.readIdentifier(), this.variable = this.identifier.content;
2873
+ }
2874
+ render(e, s) {
2875
+ const i = e.environments;
2876
+ ye(i[this.variable]) || (i[this.variable] = 0), s.write(u(--i[this.variable]));
2877
+ }
2878
+ *localScope() {
2879
+ yield this.identifier;
2880
+ }
2881
+ }
2882
+ class Rn extends b {
2883
+ constructor(e, s, i) {
2884
+ super(e, s, i), this.candidates = [];
2885
+ const r = this.tokenizer.readValue();
2886
+ for (this.tokenizer.skipBlank(), r && (this.tokenizer.peek() === ":" ? (this.group = r, this.tokenizer.advance()) : this.candidates.push(r)); !this.tokenizer.end(); ) {
2887
+ const n = this.tokenizer.readValue();
2888
+ n && this.candidates.push(n), this.tokenizer.readTo(",");
2889
+ }
2890
+ this.tokenizer.assert(this.candidates.length, () => `empty candidates: "${e.getText()}"`);
2891
+ }
2892
+ *render(e, s) {
2893
+ const r = `cycle:${yield T(this.group, e)}:` + this.candidates.join(","), n = e.getRegister("cycle");
2894
+ let o = n[r];
2895
+ o === void 0 && (o = n[r] = 0);
2896
+ const a = this.candidates[o];
2897
+ return o = (o + 1) % this.candidates.length, n[r] = o, yield T(a, e);
2898
+ }
2899
+ *arguments() {
2900
+ yield* this.candidates, this.group && (yield this.group);
2901
+ }
2902
+ }
2903
+ class zn extends b {
2904
+ constructor(e, s, i, r) {
2905
+ super(e, s, i), this.branches = [];
2906
+ let n = [];
2907
+ r.parseStream(s).on("start", () => this.branches.push({
2908
+ value: new F(e.tokenizer.readFilteredValue(), this.liquid),
2909
+ templates: n = []
2910
+ })).on("tag:elsif", (o) => {
2911
+ x(!this.elseTemplates, "unexpected elsif after else"), this.branches.push({
2912
+ value: new F(o.tokenizer.readFilteredValue(), this.liquid),
2913
+ templates: n = []
2914
+ });
2915
+ }).on("tag:else", (o) => {
2916
+ de(o.args), x(!this.elseTemplates, "duplicated else"), n = this.elseTemplates = [];
2917
+ }).on("tag:endif", function(o) {
2918
+ de(o.args), this.stop();
2919
+ }).on("template", (o) => n.push(o)).on("end", () => {
2920
+ throw new Error(`tag ${e.getText()} not closed`);
2921
+ }).start();
2922
+ }
2923
+ *render(e, s) {
2924
+ const i = this.liquid.renderer;
2925
+ for (const { value: r, templates: n } of this.branches) {
2926
+ const o = yield r.value(e, e.opts.lenientIf);
2927
+ if (B(o, e)) {
2928
+ yield i.renderTemplates(n, e, s);
2929
+ return;
2930
+ }
2931
+ }
2932
+ yield i.renderTemplates(this.elseTemplates || [], e, s);
2933
+ }
2934
+ *children() {
2935
+ const e = this.branches.flatMap((s) => s.templates);
2936
+ return this.elseTemplates && e.push(...this.elseTemplates), e;
2937
+ }
2938
+ arguments() {
2939
+ return this.branches.map((e) => e.value);
2940
+ }
2941
+ }
2942
+ class En extends b {
2943
+ constructor(e, s, i) {
2944
+ super(e, s, i), this.identifier = this.tokenizer.readIdentifier(), this.variable = this.identifier.content;
2945
+ }
2946
+ render(e, s) {
2947
+ const i = e.environments;
2948
+ ye(i[this.variable]) || (i[this.variable] = 0);
2949
+ const r = i[this.variable];
2950
+ i[this.variable]++, s.write(u(r));
2951
+ }
2952
+ *localScope() {
2953
+ yield this.identifier;
2954
+ }
2955
+ }
2956
+ class Nn extends b {
2957
+ constructor(e, s, i, r) {
2958
+ super(e, s, i), this.file = qe(this.tokenizer, this.liquid, r), this.currentFile = e.file, this.args = new ee(this.tokenizer, i.options.keyValueSeparator), this.templates = r.parseTokens(s);
2959
+ }
2960
+ *render(e, s) {
2961
+ const { liquid: i, args: r, file: n } = this, { renderer: o } = i;
2962
+ if (n === void 0) {
2963
+ e.setRegister("blockMode", U.OUTPUT), yield o.renderTemplates(this.templates, e, s);
2964
+ return;
2965
+ }
2966
+ const a = yield Ie(this.file, e, i);
2967
+ x(a, () => `illegal file path "${a}"`);
2968
+ const l = yield i._parseLayoutFile(a, e.sync, this.currentFile);
2969
+ e.setRegister("blockMode", U.STORE);
2970
+ const h = yield o.renderTemplates(this.templates, e), c = e.getRegister("blocks");
2971
+ c[""] === void 0 && (c[""] = (p, g) => g.write(h)), e.setRegister("blockMode", U.OUTPUT), e.push(yield r.render(e)), yield o.renderTemplates(l, e, s), e.pop();
2972
+ }
2973
+ *children(e) {
2974
+ const s = this.templates.slice();
2975
+ return e && f(this.file) && s.push(...yield this.liquid._parsePartialFile(this.file, !0, this.currentFile)), s;
2976
+ }
2977
+ *arguments() {
2978
+ for (const e of Object.values(this.args.hash))
2979
+ L(e) && (yield e);
2980
+ L(this.file) && (yield this.file);
2981
+ }
2982
+ partialScope() {
2983
+ if (f(this.file))
2984
+ return { name: this.file, isolated: !1, scope: Object.keys(this.args.hash) };
2985
+ }
2986
+ }
2987
+ class An extends b {
2988
+ constructor(e, s, i, r) {
2989
+ super(e, s, i), this.templates = [];
2990
+ const n = /\w+/.exec(e.args);
2991
+ for (this.block = n ? n[0] : ""; s.length; ) {
2992
+ const o = s.shift();
2993
+ if (Z(o) && o.name === "endblock")
2994
+ return;
2995
+ const a = r.parseToken(o, s);
2996
+ this.templates.push(a);
2997
+ }
2998
+ throw new Error(`tag ${e.getText()} not closed`);
2999
+ }
3000
+ *render(e, s) {
3001
+ const i = this.getBlockRender(e);
3002
+ e.getRegister("blockMode") === U.STORE ? e.getRegister("blocks")[this.block] = i : yield i(new Ke(), s);
3003
+ }
3004
+ getBlockRender(e) {
3005
+ const { liquid: s, templates: i } = this, r = e.getRegister("blocks")[this.block], n = function* (o, a) {
3006
+ e.push({ block: o }), yield s.renderer.renderTemplates(i, e, a), e.pop();
3007
+ };
3008
+ return r ? (o, a) => r(new Ke(() => n(o, a)), a) : n;
3009
+ }
3010
+ *children() {
3011
+ return this.templates;
3012
+ }
3013
+ blockScope() {
3014
+ return ["block"];
3015
+ }
3016
+ }
3017
+ class Dn extends b {
3018
+ constructor(e, s, i) {
3019
+ for (super(e, s, i), this.tokens = []; s.length; ) {
3020
+ const r = s.shift();
3021
+ if (Z(r) && r.name === "endraw")
3022
+ return;
3023
+ this.tokens.push(r);
3024
+ }
3025
+ throw new Error(`tag ${e.getText()} not closed`);
3026
+ }
3027
+ render() {
3028
+ return this.tokens.map((e) => e.getText()).join("");
3029
+ }
3030
+ }
3031
+ class Vn extends Ae {
3032
+ constructor(e, s, i, r) {
3033
+ super(e, i, r), this.length = e, this.cols = s;
3034
+ }
3035
+ row() {
3036
+ return Math.floor(this.i / this.cols) + 1;
3037
+ }
3038
+ col0() {
3039
+ return this.i % this.cols;
3040
+ }
3041
+ col() {
3042
+ return this.col0() + 1;
3043
+ }
3044
+ col_first() {
3045
+ return this.col0() === 0;
3046
+ }
3047
+ col_last() {
3048
+ return this.col() === this.cols;
3049
+ }
3050
+ }
3051
+ class Mn extends b {
3052
+ constructor(e, s, i, r) {
3053
+ super(e, s, i);
3054
+ const n = this.tokenizer.readIdentifier();
3055
+ this.tokenizer.skipBlank();
3056
+ const o = this.tokenizer.readIdentifier(), a = this.tokenizer.readValue();
3057
+ if (o.content !== "in" || !a)
3058
+ throw new Error(`illegal tag: ${e.getText()}`);
3059
+ this.variable = n.content, this.collection = a, this.args = new ee(this.tokenizer, i.options.keyValueSeparator), this.templates = [];
3060
+ let l;
3061
+ const h = r.parseStream(s).on("start", () => l = this.templates).on("tag:endtablerow", () => h.stop()).on("template", (c) => l.push(c)).on("end", () => {
3062
+ throw new Error(`tag ${e.getText()} not closed`);
3063
+ });
3064
+ h.start();
3065
+ }
3066
+ *render(e, s) {
3067
+ let i = ie(yield T(this.collection, e));
3068
+ const r = yield this.args.render(e), n = r.offset || 0, o = r.limit === void 0 ? i.length : r.limit;
3069
+ i = i.slice(n, n + o);
3070
+ const a = r.cols || i.length, l = this.liquid.renderer, h = new Vn(i.length, a, this.collection.getText(), this.variable), c = { tablerowloop: h };
3071
+ e.push(c);
3072
+ for (let p = 0; p < i.length; p++, h.next())
3073
+ c[this.variable] = i[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>");
3074
+ i.length && s.write("</tr>"), e.pop();
3075
+ }
3076
+ *children() {
3077
+ return this.templates;
3078
+ }
3079
+ *arguments() {
3080
+ yield this.collection;
3081
+ for (const e of Object.values(this.args.hash))
3082
+ L(e) && (yield e);
3083
+ }
3084
+ blockScope() {
3085
+ return [this.variable, "tablerowloop"];
3086
+ }
3087
+ }
3088
+ class Cn extends b {
3089
+ constructor(e, s, i, r) {
3090
+ super(e, s, i), this.branches = [], this.elseTemplates = [];
3091
+ let n = [], o = 0;
3092
+ r.parseStream(s).on("start", () => this.branches.push({
3093
+ value: new F(e.tokenizer.readFilteredValue(), this.liquid),
3094
+ test: be,
3095
+ templates: n = []
3096
+ })).on("tag:elsif", (a) => {
3097
+ if (o > 0) {
3098
+ n = [];
3099
+ return;
3100
+ }
3101
+ this.branches.push({
3102
+ value: new F(a.tokenizer.readFilteredValue(), this.liquid),
3103
+ test: B,
3104
+ templates: n = []
3105
+ });
3106
+ }).on("tag:else", () => {
3107
+ o++, n = this.elseTemplates;
3108
+ }).on("tag:endunless", function() {
3109
+ this.stop();
3110
+ }).on("template", (a) => {
3111
+ (n !== this.elseTemplates || o === 1) && n.push(a);
3112
+ }).on("end", () => {
3113
+ throw new Error(`tag ${e.getText()} not closed`);
3114
+ }).start();
3115
+ }
3116
+ *render(e, s) {
3117
+ const i = this.liquid.renderer;
3118
+ for (const { value: r, test: n, templates: o } of this.branches) {
3119
+ const a = yield r.value(e, e.opts.lenientIf);
3120
+ if (n(a, e)) {
3121
+ yield i.renderTemplates(o, e, s);
3122
+ return;
3123
+ }
3124
+ }
3125
+ yield i.renderTemplates(this.elseTemplates, e, s);
3126
+ }
3127
+ *children() {
3128
+ const e = this.branches.flatMap((s) => s.templates);
3129
+ return this.elseTemplates && e.push(...this.elseTemplates), e;
3130
+ }
3131
+ arguments() {
3132
+ return this.branches.map((e) => e.value);
3133
+ }
3134
+ }
3135
+ class jn extends b {
3136
+ render(e, s) {
3137
+ e.breakCalled = !0;
3138
+ }
3139
+ }
3140
+ class $n extends b {
3141
+ render(e, s) {
3142
+ e.continueCalled = !0;
3143
+ }
3144
+ }
3145
+ class qn extends b {
3146
+ constructor(e, s, i) {
3147
+ super(e, s, i), this.tokenizer.skipBlank(), this.tokenizer.end() || (this.value = new F(this.tokenizer.readFilteredValue(), this.liquid));
3148
+ }
3149
+ *render(e, s) {
3150
+ if (!this.value)
3151
+ return;
3152
+ const i = yield this.value.value(e, !1);
3153
+ s.write(i);
3154
+ }
3155
+ *arguments() {
3156
+ this.value && (yield this.value);
3157
+ }
3158
+ }
3159
+ class In extends b {
3160
+ constructor(e, s, i, r) {
3161
+ super(e, s, i);
3162
+ const n = this.tokenizer.readLiquidTagTokens(this.liquid.options);
3163
+ this.templates = r.parseTokens(n);
3164
+ }
3165
+ *render(e, s) {
3166
+ yield this.liquid.renderer.renderTemplates(this.templates, e, s);
3167
+ }
3168
+ *children() {
3169
+ return this.templates;
3170
+ }
3171
+ }
3172
+ class Pn extends b {
3173
+ constructor(e, s, i) {
3174
+ if (super(e, s, i), e.args.search(/\n\s*[^#\s]/g) !== -1)
3175
+ throw new Error("every line of an inline comment must start with a '#' character");
3176
+ }
3177
+ render() {
3178
+ }
3179
+ }
3180
+ const Bn = {
3181
+ assign: wn,
3182
+ for: bn,
3183
+ capture: _n,
3184
+ case: Sn,
3185
+ comment: xn,
3186
+ include: Fn,
3187
+ render: Ln,
3188
+ decrement: On,
3189
+ increment: En,
3190
+ cycle: Rn,
3191
+ if: zn,
3192
+ layout: Nn,
3193
+ block: An,
3194
+ raw: Dn,
3195
+ tablerow: Mn,
3196
+ unless: Cn,
3197
+ break: jn,
3198
+ continue: $n,
3199
+ echo: qn,
3200
+ liquid: In,
3201
+ "#": Pn
3202
+ };
3203
+ class Pe {
3204
+ constructor(e = {}) {
3205
+ this.renderer = new Ks(), this.filters = {}, this.tags = {}, this.options = Ri(e), this.parser = new I(this), Ze(Bn, (s, i) => this.registerTag(i, s)), Ze(yn, (s, i) => this.registerFilter(i, s));
3206
+ }
3207
+ parse(e, s) {
3208
+ return new I(this).parse(e, s);
3209
+ }
3210
+ _render(e, s, i) {
3211
+ const r = s instanceof P ? s : new P(s, this.options, i);
3212
+ return this.renderer.renderTemplates(e, r);
3213
+ }
3214
+ render(e, s, i) {
3215
+ return k(this, void 0, void 0, function* () {
3216
+ return V(this._render(e, s, Object.assign(Object.assign({}, i), { sync: !1 })));
3217
+ });
3218
+ }
3219
+ renderSync(e, s, i) {
3220
+ return M(this._render(e, s, Object.assign(Object.assign({}, i), { sync: !0 })));
3221
+ }
3222
+ renderToNodeStream(e, s, i = {}) {
3223
+ const r = new P(s, this.options, i);
3224
+ return this.renderer.renderTemplatesToNodeStream(e, r);
3225
+ }
3226
+ _parseAndRender(e, s, i) {
3227
+ const r = this.parse(e);
3228
+ return this._render(r, s, i);
3229
+ }
3230
+ parseAndRender(e, s, i) {
3231
+ return k(this, void 0, void 0, function* () {
3232
+ return V(this._parseAndRender(e, s, Object.assign(Object.assign({}, i), { sync: !1 })));
3233
+ });
3234
+ }
3235
+ parseAndRenderSync(e, s, i) {
3236
+ return M(this._parseAndRender(e, s, Object.assign(Object.assign({}, i), { sync: !0 })));
3237
+ }
3238
+ _parsePartialFile(e, s, i) {
3239
+ return new I(this).parseFile(e, s, W.Partials, i);
3240
+ }
3241
+ _parseLayoutFile(e, s, i) {
3242
+ return new I(this).parseFile(e, s, W.Layouts, i);
3243
+ }
3244
+ _parseFile(e, s, i, r) {
3245
+ return new I(this).parseFile(e, s, i, r);
3246
+ }
3247
+ parseFile(e, s) {
3248
+ return k(this, void 0, void 0, function* () {
3249
+ return V(new I(this).parseFile(e, !1, s));
3250
+ });
3251
+ }
3252
+ parseFileSync(e, s) {
3253
+ return M(new I(this).parseFile(e, !0, s));
3254
+ }
3255
+ *_renderFile(e, s, i) {
3256
+ const r = yield this._parseFile(e, i.sync, i.lookupType);
3257
+ return yield this._render(r, s, i);
3258
+ }
3259
+ renderFile(e, s, i) {
3260
+ return k(this, void 0, void 0, function* () {
3261
+ return V(this._renderFile(e, s, Object.assign(Object.assign({}, i), { sync: !1 })));
3262
+ });
3263
+ }
3264
+ renderFileSync(e, s, i) {
3265
+ return M(this._renderFile(e, s, Object.assign(Object.assign({}, i), { sync: !0 })));
3266
+ }
3267
+ renderFileToNodeStream(e, s, i) {
3268
+ return k(this, void 0, void 0, function* () {
3269
+ const r = yield this.parseFile(e);
3270
+ return this.renderToNodeStream(r, s, i);
3271
+ });
3272
+ }
3273
+ _evalValue(e, s) {
3274
+ const i = new F(e, this), r = s instanceof P ? s : new P(s, this.options);
3275
+ return i.value(r);
3276
+ }
3277
+ evalValue(e, s) {
3278
+ return k(this, void 0, void 0, function* () {
3279
+ return V(this._evalValue(e, s));
3280
+ });
3281
+ }
3282
+ evalValueSync(e, s) {
3283
+ return M(this._evalValue(e, s));
3284
+ }
3285
+ registerFilter(e, s) {
3286
+ this.filters[e] = s;
3287
+ }
3288
+ registerTag(e, s) {
3289
+ this.tags[e] = v(s) ? s : Vi(s);
3290
+ }
3291
+ plugin(e) {
3292
+ return e.call(this, Pe);
3293
+ }
3294
+ express() {
3295
+ const e = this;
3296
+ let s = !0;
3297
+ return function(i, r, n) {
3298
+ if (s) {
3299
+ s = !1;
3300
+ const o = ue(this.root);
3301
+ e.options.root.unshift(...o), e.options.layouts.unshift(...o), e.options.partials.unshift(...o);
3302
+ }
3303
+ e.renderFile(i, r).then((o) => n(null, o), n);
3304
+ };
3305
+ }
3306
+ analyze(e, s = {}) {
3307
+ return k(this, void 0, void 0, function* () {
3308
+ return j(e, s);
3309
+ });
3310
+ }
3311
+ analyzeSync(e, s = {}) {
3312
+ return $(e, s);
3313
+ }
3314
+ parseAndAnalyze(e, s, i = {}) {
3315
+ return k(this, void 0, void 0, function* () {
3316
+ return j(this.parse(e, s), i);
3317
+ });
3318
+ }
3319
+ parseAndAnalyzeSync(e, s, i = {}) {
3320
+ return $(this.parse(e, s), i);
3321
+ }
3322
+ /** Return an array of all variables without their properties. */
3323
+ variables(e, s = {}) {
3324
+ return k(this, void 0, void 0, function* () {
3325
+ const i = yield j(f(e) ? this.parse(e) : e, s);
3326
+ return Object.keys(i.variables);
3327
+ });
3328
+ }
3329
+ /** Return an array of all variables without their properties. */
3330
+ variablesSync(e, s = {}) {
3331
+ const i = $(f(e) ? this.parse(e) : e, s);
3332
+ return Object.keys(i.variables);
3333
+ }
3334
+ /** Return an array of all variables including their properties/paths. */
3335
+ fullVariables(e, s = {}) {
3336
+ return k(this, void 0, void 0, function* () {
3337
+ const i = yield j(f(e) ? this.parse(e) : e, s);
3338
+ return Array.from(new Set(Object.values(i.variables).flatMap((r) => r.map((n) => String(n)))));
3339
+ });
3340
+ }
3341
+ /** Return an array of all variables including their properties/paths. */
3342
+ fullVariablesSync(e, s = {}) {
3343
+ const i = $(f(e) ? this.parse(e) : e, s);
3344
+ return Array.from(new Set(Object.values(i.variables).flatMap((r) => r.map((n) => String(n)))));
3345
+ }
3346
+ /** Return an array of all variables, each as an array of properties/segments. */
3347
+ variableSegments(e, s = {}) {
3348
+ return k(this, void 0, void 0, function* () {
3349
+ const i = yield j(f(e) ? this.parse(e) : e, s);
3350
+ return Array.from(le(Object.values(i.variables).flatMap((r) => r.map((n) => n.toArray()))));
3351
+ });
3352
+ }
3353
+ /** Return an array of all variables, each as an array of properties/segments. */
3354
+ variableSegmentsSync(e, s = {}) {
3355
+ const i = $(f(e) ? this.parse(e) : e, s);
3356
+ return Array.from(le(Object.values(i.variables).flatMap((r) => r.map((n) => n.toArray()))));
3357
+ }
3358
+ /** Return an array of all expected context variables without their properties. */
3359
+ globalVariables(e, s = {}) {
3360
+ return k(this, void 0, void 0, function* () {
3361
+ const i = yield j(f(e) ? this.parse(e) : e, s);
3362
+ return Object.keys(i.globals);
3363
+ });
3364
+ }
3365
+ /** Return an array of all expected context variables without their properties. */
3366
+ globalVariablesSync(e, s = {}) {
3367
+ const i = $(f(e) ? this.parse(e) : e, s);
3368
+ return Object.keys(i.globals);
3369
+ }
3370
+ /** Return an array of all expected context variables including their properties/paths. */
3371
+ globalFullVariables(e, s = {}) {
3372
+ return k(this, void 0, void 0, function* () {
3373
+ const i = yield j(f(e) ? this.parse(e) : e, s);
3374
+ return Array.from(new Set(Object.values(i.globals).flatMap((r) => r.map((n) => String(n)))));
3375
+ });
3376
+ }
3377
+ /** Return an array of all expected context variables including their properties/paths. */
3378
+ globalFullVariablesSync(e, s = {}) {
3379
+ const i = $(f(e) ? this.parse(e) : e, s);
3380
+ return Array.from(new Set(Object.values(i.globals).flatMap((r) => r.map((n) => String(n)))));
3381
+ }
3382
+ /** Return an array of all expected context variables, each as an array of properties/segments. */
3383
+ globalVariableSegments(e, s = {}) {
3384
+ return k(this, void 0, void 0, function* () {
3385
+ const i = yield j(f(e) ? this.parse(e) : e, s);
3386
+ return Array.from(le(Object.values(i.globals).flatMap((r) => r.map((n) => n.toArray()))));
3387
+ });
3388
+ }
3389
+ /** Return an array of all expected context variables, each as an array of properties/segments. */
3390
+ globalVariableSegmentsSync(e, s = {}) {
3391
+ const i = $(f(e) ? this.parse(e) : e, s);
3392
+ return Array.from(le(Object.values(i.globals).flatMap((r) => r.map((n) => n.toArray()))));
3393
+ }
3394
+ }
3395
+ const Un = Xt({
3396
+ name: "CallToAction",
3397
+ props: {
3398
+ config: {
3399
+ type: Object
3400
+ },
3401
+ referredDetails: {
3402
+ type: Object
3403
+ }
3404
+ },
3405
+ data() {
3406
+ return {
3407
+ copied: !1
3408
+ };
3409
+ },
3410
+ computed: {
3411
+ isLink() {
3412
+ var t;
3413
+ return ((t = this.config) == null ? void 0 : t.link_preferences) === He.URL;
3414
+ },
3415
+ isButton() {
3416
+ var t;
3417
+ return ((t = this.config) == null ? void 0 : t.link_preferences) === He.BUTTON;
3418
+ },
3419
+ linkUrl() {
3420
+ var o, a, l, h;
3421
+ const t = (o = this.referredDetails) == null ? void 0 : o.email, e = (a = this.referredDetails) == null ? void 0 : a.name, s = (l = this.referredDetails) == null ? void 0 : l.redemptionCode, i = btoa(JSON.stringify({ email: t, name: e }));
3422
+ return new Pe().parseAndRenderSync(((h = this.config) == null ? void 0 : h.url) || "", {
3423
+ name: e,
3424
+ email: t,
3425
+ login_hash: i,
3426
+ reward_code: s
3427
+ });
3428
+ },
3429
+ buttonTitle() {
3430
+ var t;
3431
+ return (t = this.config) == null ? void 0 : t.button_title;
3432
+ },
3433
+ opensInNewTab() {
3434
+ var t;
3435
+ return (t = this.config) == null ? void 0 : t.open_in_new_tab;
3436
+ },
3437
+ isRewardLinkSelected() {
3438
+ return this.isLink || this.isButton;
3439
+ },
3440
+ showIcon() {
3441
+ var t;
3442
+ return (t = this.config) == null ? void 0 : t.show_icon;
3443
+ }
3444
+ }
3445
+ }), Hn = ["href", "target"];
3446
+ function Wn(t, e, s, i, r, n) {
3447
+ const o = re("v-icon"), a = re("v-btn"), l = re("v-row"), h = re("v-container");
3448
+ return t.isRewardLinkSelected ? (oe(), ke(h, {
3449
+ key: 0,
3450
+ class: "align-center mt-4"
3451
+ }, {
3452
+ default: ae(() => [
3453
+ Kt(l, null, {
3454
+ default: ae(() => [
3455
+ t.isLink ? (oe(), es("a", {
3456
+ key: 0,
3457
+ id: "friend-success-reward-link",
3458
+ href: t.linkUrl,
3459
+ class: "text-center mx-auto text-wrap",
3460
+ target: t.opensInNewTab ? "_blank" : "_top"
3461
+ }, We(t.linkUrl), 9, Hn)) : ne("", !0),
3462
+ t.isButton ? (oe(), ke(a, {
3463
+ key: 1,
3464
+ id: "friend-success-reward-btn",
3465
+ target: t.opensInNewTab ? "_blank" : "_top",
3466
+ class: "text-center mx-auto",
3467
+ href: t.linkUrl
3468
+ }, {
3469
+ default: ae(() => [
3470
+ t.showIcon ? (oe(), ke(o, {
3471
+ key: 0,
3472
+ class: "pe-2"
3473
+ }, {
3474
+ default: ae(() => e[0] || (e[0] = [
3475
+ ss("mdi-open-in-new")
3476
+ ])),
3477
+ _: 1
3478
+ })) : ne("", !0),
3479
+ ts("span", null, We(t.buttonTitle), 1)
3480
+ ]),
3481
+ _: 1
3482
+ }, 8, ["target", "href"])) : ne("", !0)
3483
+ ]),
3484
+ _: 1
3485
+ })
3486
+ ]),
3487
+ _: 1
3488
+ })) : ne("", !0);
3489
+ }
3490
+ const Qn = /* @__PURE__ */ is(Un, [["render", Wn], ["__file", "/Users/dominic/Code/gather-vue/src/components/atomic/molecules/CallToAction.vue"]]);
3491
+ export {
3492
+ Qn as C
3493
+ };