@templatical/editor 0.14.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-J8iO_sX7.js → AiChatSidebar-BIKvYREk.js} +57 -56
- package/dist/{AiFeatureMenu-F2diEDgV.js → AiFeatureMenu-CU6kTMTf.js} +20 -20
- package/dist/{BlockIssueBadge-a-qlByxF.js → BlockIssueBadge-B3xVgMTh.js} +11 -11
- package/dist/{CloudEditor-CDjtwb4i.js → CloudEditor-DRPxvUEj.js} +470 -468
- package/dist/{CollaboratorBar-B_EnJLtW.js → CollaboratorBar-DMSjd3HZ.js} +20 -20
- package/dist/{CommentsSidebar-DaP9BA_r.js → CommentsSidebar-D_tSGvTX.js} +154 -153
- package/dist/CountdownBlock-apiYUhkQ.js +92 -0
- package/dist/CountdownToolbar-CS0axcjz.js +210 -0
- package/dist/{DesignReferenceSidebar-BHRlTqlT.js → DesignReferenceSidebar-DWYK9nTk.js} +58 -57
- package/dist/{IssuesPanel-u7ee3Wrl.js → IssuesPanel-CR1MPaDE.js} +40 -40
- package/dist/{LoadingTrack-CV3ID80N.js → LoadingTrack-DsecR8Rw.js} +1 -1
- package/dist/MergeTagSuggestion-CH2SUxBo.js +1327 -0
- package/dist/{ModuleBrowserModal-DOsdaS6s.js → ModuleBrowserModal-BOzleijA.js} +60 -59
- package/dist/{ModulePreviewCanvas-Cx4MOJ0X.js → ModulePreviewCanvas-Cg99Pbde.js} +29 -29
- package/dist/{NumberWithSuffix-D2mW_DhT.js → NumberWithSuffix-CrA6quxx.js} +143 -142
- package/dist/{ParagraphEditor-DMzkVnST.js → ParagraphEditor-8jnzoL0A.js} +250 -247
- package/dist/{RichTextEditorContent-CRCxCwKf.js → RichTextEditorContent-BqLHIZY7.js} +45 -44
- package/dist/{SaveModuleDialog-DuEKgumL.js → SaveModuleDialog-Cy2XyjYT.js} +38 -37
- package/dist/{SnapshotHistory-CVgiNJtE.js → SnapshotHistory-cfxmOsJu.js} +34 -33
- package/dist/{TemplateScoringPanel-lm0_9nYi.js → TemplateScoringPanel-CZ62rGHz.js} +83 -82
- package/dist/{TestEmailModal-WBMdiW5S.js → TestEmailModal-sr1MaMVX.js} +22 -21
- package/dist/{TitleEditor-eyT0h-Sa.js → TitleEditor-CvGTprIg.js} +46 -45
- package/dist/{TplModal-tjQ7OB0g.js → TplModal-BtKB-0Bx.js} +14 -13
- package/dist/{blockTypeIcons-DdB3uTKD.js → blockTypeIcons-BxEbbev5.js} +2 -2
- package/dist/bundle-stats.json +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-D7rB2SBs.js → AiFeatureMenu-fDUpv_-s.js} +5 -5
- package/dist/cdn/chunks/{AiFeatureMenu-D7rB2SBs.js.map → AiFeatureMenu-fDUpv_-s.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-DHOe0pgx.js → BlockIssueBadge-Byce0j0W.js} +3 -3
- package/dist/cdn/chunks/{BlockIssueBadge-DHOe0pgx.js.map → BlockIssueBadge-Byce0j0W.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-DNed_Ym0.js → CloudEditor-B4m8ldiE.js} +89 -89
- package/dist/cdn/chunks/{CloudEditor-DNed_Ym0.js.map → CloudEditor-B4m8ldiE.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-sj_9Lee3.js → CollaboratorBar-LnLmjxw_.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-sj_9Lee3.js.map → CollaboratorBar-LnLmjxw_.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-C1Ikjpn4.js → CountdownBlock-DxTuMRBM.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-C1Ikjpn4.js.map → CountdownBlock-DxTuMRBM.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-j1G_X8rB.js → CountdownToolbar-DUrVfQZH.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-j1G_X8rB.js.map → CountdownToolbar-DUrVfQZH.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CTOf3PsH.js → IssuesPanel-CHl90k4h.js} +4 -4
- package/dist/cdn/chunks/{IssuesPanel-CTOf3PsH.js.map → IssuesPanel-CHl90k4h.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js +213 -0
- package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js.map +1 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-DCh88-rr.js → ModuleBrowserModal-DW0iQW0J.js} +6 -6
- package/dist/cdn/chunks/{ModuleBrowserModal-DCh88-rr.js.map → ModuleBrowserModal-DW0iQW0J.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DJqvTKmg.js → ModulePreviewCanvas-Cxo8v8t1.js} +3 -3
- package/dist/cdn/chunks/{ModulePreviewCanvas-DJqvTKmg.js.map → ModulePreviewCanvas-Cxo8v8t1.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-Bu45XWSl.js → NumberWithSuffix-CnSRmUMK.js} +6 -6
- package/dist/cdn/chunks/{NumberWithSuffix-Bu45XWSl.js.map → NumberWithSuffix-CnSRmUMK.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DwZqLJp2.js → ParagraphEditor-iG5cDjH0.js} +25 -23
- package/dist/cdn/chunks/{ParagraphEditor-DwZqLJp2.js.map → ParagraphEditor-iG5cDjH0.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-CIuZ-2DV.js → RichTextEditorContent-DQpgeGMj.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-CIuZ-2DV.js.map → RichTextEditorContent-DQpgeGMj.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-Bep0X2s_.js → SaveModuleDialog-sJQXg2Mh.js} +3 -3
- package/dist/cdn/chunks/{SaveModuleDialog-Bep0X2s_.js.map → SaveModuleDialog-sJQXg2Mh.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-DO1-h3RY.js → TitleEditor-C8qIn9Oi.js} +12 -11
- package/dist/cdn/chunks/TitleEditor-C8qIn9Oi.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-8o24HVJu.js → blockTypeIcons-DySnOpPo.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-8o24HVJu.js.map → blockTypeIcons-DySnOpPo.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-kPCz_3zM.js → draggable-kG-D5Xsm.js} +6 -6
- package/dist/cdn/chunks/draggable-kG-D5Xsm.js.map +1 -0
- package/dist/cdn/chunks/extensions-C2pTX899.js +421 -0
- package/dist/cdn/chunks/extensions-C2pTX899.js.map +1 -0
- package/dist/cdn/chunks/{features-CkTMVylx.js → features-CHE3YjQE.js} +886 -837
- package/dist/cdn/chunks/features-CHE3YjQE.js.map +1 -0
- package/dist/cdn/chunks/{icons-9zjCuoJx.js → icons-M4uqBV-_.js} +26 -26
- package/dist/cdn/chunks/{icons-9zjCuoJx.js.map → icons-M4uqBV-_.js.map} +1 -1
- package/dist/cdn/chunks/{liquid.browser-DKKBzRQu.js → liquid.browser-BJOEu6Cg.js} +693 -678
- package/dist/cdn/chunks/liquid.browser-BJOEu6Cg.js.map +1 -0
- package/dist/cdn/chunks/{media-library-DMRIPx4g.js → media-library-Bqr15VN2.js} +33 -33
- package/dist/cdn/chunks/{media-library-DMRIPx4g.js.map → media-library-Bqr15VN2.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-CdEqyLwF.js → pusher-CIwiKF8H.js} +4 -4
- package/dist/cdn/chunks/{pusher-CdEqyLwF.js.map → pusher-CIwiKF8H.js.map} +1 -1
- package/dist/cdn/chunks/{quality-CyeUgs_c.js → quality-DJZ_fqc2.js} +112 -112
- package/dist/cdn/chunks/{quality-CyeUgs_c.js.map → quality-DJZ_fqc2.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-BIKUEKDD.js → renderer-CyzTR1Vq.js} +20 -20
- package/dist/cdn/chunks/renderer-CyzTR1Vq.js.map +1 -0
- package/dist/cdn/chunks/{src-pDy_imWG.js → src-q-SBgWx7.js} +5 -5
- package/dist/cdn/chunks/{src-pDy_imWG.js.map → src-q-SBgWx7.js.map} +1 -1
- package/dist/cdn/chunks/{styles-D4Bd3SCx.js → styles-PWISdaws.js} +1484 -1344
- package/dist/cdn/chunks/styles-PWISdaws.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-BlLFFU3M.js → tiptap-DF9PEiqH.js} +6859 -6823
- package/dist/cdn/chunks/tiptap-DF9PEiqH.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +35 -35
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-CYJwFmjy.js → check-rl7ok6uJ.js} +1 -1
- package/dist/{chevron-down-C5l-DzAA.js → chevron-down-BKe__NOD.js} +1 -1
- package/dist/{circle-alert-wf5HUFZY.js → circle-alert-C8xmpMsK.js} +1 -1
- package/dist/{clock-Bj0bQw-K.js → clock-BW4JuDCN.js} +1 -1
- package/dist/{cloud-CoFDm9YA.js → cloud-BQusL53H.js} +208 -208
- package/dist/createLucideIcon-Dx-EjR9r.js +43 -0
- package/dist/{dist-CLpPNKy9.js → dist-B5Sov3sS.js} +7 -7
- package/dist/dist-BEWiuOMi.js +251 -0
- package/dist/{dist-CrQZ_af9.js → dist-BFmE-7hB.js} +2 -2
- package/dist/{dist-U5vfDdYI.js → dist-BMoa33wT.js} +2 -2
- package/dist/{dist-BctFrpeA.js → dist-BibU4HNl.js} +74 -65
- package/dist/{dist-Dd3ibRZm.js → dist-BsCGIDSt.js} +103 -102
- package/dist/dist-CNLKj9wa.js +5 -0
- package/dist/{dist-BX3gGwL8.js → dist-CNXDNYQn.js} +728 -694
- package/dist/{dist-Bn703mnA.js → dist-COG3IdPK.js} +3 -3
- package/dist/{dist-B7w6xTU6.js → dist-CQZxDvFw.js} +3 -3
- package/dist/{dist-34OcyoK1.js → dist-CRsjOQM-.js} +2 -2
- package/dist/dist-CTT6WYJ6.js +134 -0
- package/dist/dist-Cqa6aeAJ.js +5 -0
- package/dist/{dist-ChMninLH.js → dist-SXJJ2v41.js} +2 -2
- package/dist/{dist-CyjyYg52.js → dist-itdjZraK.js} +28 -23
- package/dist/extensions-DwaZAqm6.js +423 -0
- package/dist/{image-up-x8-WXfsx.js → image-up-BwBCmQ4P.js} +1 -1
- package/dist/{info-RS_fGcGi.js → info-TCn7uWR5.js} +1 -1
- package/dist/{keys-DgYXDafq.js → keys-Cv8-8GsD.js} +1 -1
- package/dist/{liquid.browser-CVjP5Mex.js → liquid.browser-DZLtv26k.js} +692 -677
- package/dist/{list-checks-Bf7XdDyv.js → list-checks-CSrOWNgq.js} +1 -1
- package/dist/{loader-circle-CLZ0_FvW.js → loader-circle-BLmicnPG.js} +1 -1
- package/dist/{message-circle-B-1bN9ab.js → message-circle-C9hHMQCI.js} +1 -1
- package/dist/{refresh-cw-CWKWqJYG.js → refresh-cw-D1JQ1LNa.js} +1 -1
- package/dist/runtime-dom.esm-bundler-BzuoCyNp.js +523 -0
- package/dist/{scan-line-BtK5dEai.js → scan-line-DgijVq9y.js} +1 -1
- package/dist/{send-Cn1IUdzh.js → send-DjPdq69F.js} +1 -1
- package/dist/{shield-check-CrvMk4Ea.js → shield-check-Bqluu8FS.js} +1 -1
- package/dist/{sparkles-CgfjwvnG.js → sparkles-M4azPVSP.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styles-B2OrgEnn.js +4164 -0
- package/dist/templatical-editor.js +127 -126
- package/dist/{text-align-start-C3r_Rnvy.js → text-align-start-CMya5pCQ.js} +11 -11
- package/dist/{trash-2-CjERg4x9.js → trash-2-C-81rkLS.js} +1 -1
- package/dist/{triangle-alert-Chkny574.js → triangle-alert-BuRWnynk.js} +1 -1
- package/dist/{upload-e5kDRkPb.js → upload-CWBIoLd4.js} +1 -1
- package/dist/{useAliveFlag-cUQj9rmB.js → useAliveFlag-CECL_OUb.js} +1 -1
- package/dist/{useCloudI18n-CYJKqXtI.js → useCloudI18n-AKCy98qD.js} +2 -2
- package/dist/{useEditorCore-8JxXDOA4.js → useEditorCore-DJeOXVxQ.js} +1407 -1365
- package/dist/{useI18n-BWqM8i78.js → useI18n-C-TDeJBt.js} +2 -2
- package/dist/{useMergeTag-NHC4ylza.js → useMergeTag-DSrBY0-2.js} +5 -5
- package/dist/usePopoverRoot-DKUDnr55.js +8 -0
- package/dist/{vue.runtime.esm-bundler-BPa483TZ.js → vue.runtime.esm-bundler-l0XAqiyv.js} +626 -1147
- package/dist/{x-DiPIbccg.js → x-CQSvXnGR.js} +1 -1
- package/package.json +26 -26
- package/dist/CountdownBlock-DtAokAVw.js +0 -92
- package/dist/CountdownToolbar-Dtqgwy0g.js +0 -210
- package/dist/cdn/chunks/TitleEditor-DO1-h3RY.js.map +0 -1
- package/dist/cdn/chunks/draggable-kPCz_3zM.js.map +0 -1
- package/dist/cdn/chunks/extensions-iwBXnEwq.js +0 -605
- package/dist/cdn/chunks/extensions-iwBXnEwq.js.map +0 -1
- package/dist/cdn/chunks/features-CkTMVylx.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +0 -1
- package/dist/cdn/chunks/renderer-BIKUEKDD.js.map +0 -1
- package/dist/cdn/chunks/styles-D4Bd3SCx.js.map +0 -1
- package/dist/cdn/chunks/tiptap-BlLFFU3M.js.map +0 -1
- package/dist/createLucideIcon-Bad2kKE0.js +0 -43
- package/dist/dist-CADDCv0o.js +0 -5
- package/dist/dist-CGvz7vkq.js +0 -5
- package/dist/dist-DuCzdgDA.js +0 -382
- package/dist/extensions-J439b7y7.js +0 -1720
- package/dist/styles-BUwDOWd3.js +0 -4022
- package/dist/usePopoverRoot-B1sdY4es.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/liquidjs@10.27.
|
|
1
|
+
//#region ../../node_modules/.pnpm/liquidjs@10.27.2/node_modules/liquidjs/dist/liquid.browser.mjs
|
|
2
2
|
var e = class {
|
|
3
3
|
constructor(e, t, n, r, i) {
|
|
4
4
|
this.kind = e, this.input = t, this.begin = n, this.end = r, this.file = i;
|
|
@@ -30,102 +30,105 @@ function c(e) {
|
|
|
30
30
|
return e && o(e.next) && o(e.throw) && o(e.return);
|
|
31
31
|
}
|
|
32
32
|
function l(e) {
|
|
33
|
-
return e =
|
|
33
|
+
return e = p(e), a(e) ? e : h(e) ? "" : g(e) ? e.map((e) => l(e)).join("") : String(e);
|
|
34
34
|
}
|
|
35
|
-
function u(e) {
|
|
36
|
-
|
|
35
|
+
function u(e, t, n) {
|
|
36
|
+
if (t < 0 && (t = e.length + t), !(n && !i.call(e, t))) return e[t];
|
|
37
37
|
}
|
|
38
38
|
function d(e) {
|
|
39
|
-
return e =
|
|
39
|
+
return e = p(e), g(e) ? e : a(e) && e.length > 0 ? [e] : ie(e) ? Array.from(e) : _(e) ? Object.keys(e).map((t) => [t, e[t]]) : [];
|
|
40
40
|
}
|
|
41
41
|
function f(e) {
|
|
42
|
+
return e = p(e), h(e) ? [] : g(e) ? e : [e];
|
|
43
|
+
}
|
|
44
|
+
function p(e) {
|
|
42
45
|
return e instanceof t && o(e.valueOf) ? e.valueOf() : e;
|
|
43
46
|
}
|
|
44
47
|
function ee(e) {
|
|
45
|
-
return +
|
|
48
|
+
return +p(e) || 0;
|
|
46
49
|
}
|
|
47
|
-
function
|
|
50
|
+
function m(e) {
|
|
48
51
|
return typeof e == "number";
|
|
49
52
|
}
|
|
50
|
-
function
|
|
51
|
-
return e && o(e.toLiquid) ?
|
|
53
|
+
function te(e) {
|
|
54
|
+
return e && o(e.toLiquid) ? te(e.toLiquid()) : e;
|
|
52
55
|
}
|
|
53
|
-
function
|
|
56
|
+
function h(e) {
|
|
54
57
|
return e == null;
|
|
55
58
|
}
|
|
56
|
-
function
|
|
59
|
+
function ne(e) {
|
|
57
60
|
return e === void 0;
|
|
58
61
|
}
|
|
59
|
-
function
|
|
62
|
+
function g(e) {
|
|
60
63
|
return n.call(e) === "[object Array]";
|
|
61
64
|
}
|
|
62
|
-
function
|
|
63
|
-
return e &&
|
|
65
|
+
function re(e) {
|
|
66
|
+
return e && m(e.length);
|
|
64
67
|
}
|
|
65
|
-
function
|
|
66
|
-
return
|
|
68
|
+
function ie(e) {
|
|
69
|
+
return _(e) && Symbol.iterator in e;
|
|
67
70
|
}
|
|
68
|
-
function
|
|
71
|
+
function ae(e, t) {
|
|
69
72
|
e ||= {};
|
|
70
73
|
for (let n in e) if (i.call(e, n) && t(e[n], n, e) === !1) break;
|
|
71
74
|
return e;
|
|
72
75
|
}
|
|
73
|
-
function
|
|
76
|
+
function oe(e) {
|
|
74
77
|
return e[e.length - 1];
|
|
75
78
|
}
|
|
76
|
-
function
|
|
79
|
+
function _(e) {
|
|
77
80
|
let t = typeof e;
|
|
78
81
|
return e !== null && (t === "object" || t === "function");
|
|
79
82
|
}
|
|
80
|
-
function
|
|
83
|
+
function se(e, t, n = 1) {
|
|
81
84
|
let r = [];
|
|
82
85
|
for (let i = e; i < t; i += n) r.push(i);
|
|
83
86
|
return r;
|
|
84
87
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
88
|
+
function v(e, t, n = " ") {
|
|
89
|
+
return le(e, t, n, (e, t) => t + e);
|
|
87
90
|
}
|
|
88
|
-
function
|
|
89
|
-
return
|
|
91
|
+
function ce(e, t, n = " ") {
|
|
92
|
+
return le(e, t, n, (e, t) => e + t);
|
|
90
93
|
}
|
|
91
|
-
function
|
|
94
|
+
function le(e, t, n, r) {
|
|
92
95
|
e = String(e);
|
|
93
96
|
let i = t - e.length;
|
|
94
97
|
return i <= 0 ? e : r(e, n.repeat(i));
|
|
95
98
|
}
|
|
96
|
-
function
|
|
99
|
+
function ue(e) {
|
|
97
100
|
return e;
|
|
98
101
|
}
|
|
99
|
-
function
|
|
102
|
+
function de(e) {
|
|
100
103
|
return [...e].some((e) => e >= "a" && e <= "z") ? e.toUpperCase() : e.toLowerCase();
|
|
101
104
|
}
|
|
102
|
-
function
|
|
105
|
+
function fe(e, t) {
|
|
103
106
|
return e.length > t ? e.slice(0, t - 3) + "..." : e;
|
|
104
107
|
}
|
|
105
|
-
function
|
|
106
|
-
return
|
|
108
|
+
function pe(e, t) {
|
|
109
|
+
return h(e) && h(t) ? 0 : h(e) ? 1 : h(t) || e < t ? -1 : +(e > t);
|
|
107
110
|
}
|
|
108
|
-
function
|
|
109
|
-
return
|
|
111
|
+
function me(e, t) {
|
|
112
|
+
return h(e) && h(t) ? 0 : h(e) ? 1 : h(t) || (e = r.call(e), t = r.call(t), e < t) ? -1 : +(e > t);
|
|
110
113
|
}
|
|
111
|
-
function
|
|
114
|
+
function he(e) {
|
|
112
115
|
return function(...t) {
|
|
113
|
-
return e.call(this, ...t.map(
|
|
116
|
+
return e.call(this, ...t.map(p));
|
|
114
117
|
};
|
|
115
118
|
}
|
|
116
|
-
function
|
|
119
|
+
function y(e) {
|
|
117
120
|
return function(...t) {
|
|
118
121
|
return e.call(this, ...t.map(ee));
|
|
119
122
|
};
|
|
120
123
|
}
|
|
121
|
-
function*
|
|
124
|
+
function* b(e) {
|
|
122
125
|
let t = /* @__PURE__ */ new Set();
|
|
123
126
|
for (let n of e) {
|
|
124
127
|
let e = JSON.stringify(n);
|
|
125
128
|
t.has(e) || (t.add(e), yield n);
|
|
126
129
|
}
|
|
127
130
|
}
|
|
128
|
-
var
|
|
131
|
+
var ge = "__liquidClass__", x = class extends Error {
|
|
129
132
|
constructor(e, t) {
|
|
130
133
|
super(typeof e == "string" ? e : e.message), this.context = "", typeof e != "string" && Object.defineProperty(this, "originalError", {
|
|
131
134
|
value: e,
|
|
@@ -133,36 +136,36 @@ var _e = "__liquidClass__", y = class extends Error {
|
|
|
133
136
|
}), Object.defineProperty(this, "token", {
|
|
134
137
|
value: t,
|
|
135
138
|
enumerable: !1
|
|
136
|
-
}), Object.defineProperty(this,
|
|
139
|
+
}), Object.defineProperty(this, ge, {
|
|
137
140
|
value: "LiquidError",
|
|
138
141
|
enumerable: !1
|
|
139
142
|
});
|
|
140
143
|
}
|
|
141
144
|
update() {
|
|
142
145
|
Object.defineProperty(this, "context", {
|
|
143
|
-
value:
|
|
146
|
+
value: we(this.token),
|
|
144
147
|
enumerable: !1
|
|
145
|
-
}), this.message =
|
|
148
|
+
}), this.message = Te(this.message, this.token), this.stack = this.message + "\n" + this.context + "\n" + this.stack, this.originalError && (this.stack += "\nFrom " + this.originalError.stack);
|
|
146
149
|
}
|
|
147
150
|
static is(e) {
|
|
148
|
-
return e?.[
|
|
151
|
+
return e?.[ge] === "LiquidError";
|
|
149
152
|
}
|
|
150
|
-
},
|
|
153
|
+
}, _e = class extends x {
|
|
151
154
|
constructor(e, t) {
|
|
152
155
|
super(e, t), this.name = "TokenizationError", super.update();
|
|
153
156
|
}
|
|
154
|
-
},
|
|
157
|
+
}, ve = class extends x {
|
|
155
158
|
constructor(e, t) {
|
|
156
159
|
super(e, t), this.name = "ParseError", this.message = e.message, super.update();
|
|
157
160
|
}
|
|
158
|
-
},
|
|
161
|
+
}, ye = class extends x {
|
|
159
162
|
constructor(e, t) {
|
|
160
163
|
super(e, t.token), this.name = "RenderError", this.message = e.message, super.update();
|
|
161
164
|
}
|
|
162
165
|
static is(e) {
|
|
163
166
|
return e.name === "RenderError";
|
|
164
167
|
}
|
|
165
|
-
},
|
|
168
|
+
}, be = class extends x {
|
|
166
169
|
constructor(e) {
|
|
167
170
|
super(e[0], e[0].token), this.errors = e, this.name = "LiquidErrors";
|
|
168
171
|
let t = e.length > 1 ? "s" : "";
|
|
@@ -171,32 +174,32 @@ var _e = "__liquidClass__", y = class extends Error {
|
|
|
171
174
|
static is(e) {
|
|
172
175
|
return e.name === "LiquidErrors";
|
|
173
176
|
}
|
|
174
|
-
},
|
|
177
|
+
}, xe = class extends x {
|
|
175
178
|
constructor(e, t) {
|
|
176
179
|
super(e, t), this.name = "UndefinedVariableError", this.message = e.message, super.update();
|
|
177
180
|
}
|
|
178
|
-
},
|
|
181
|
+
}, Se = class extends Error {
|
|
179
182
|
constructor(e) {
|
|
180
183
|
super(`undefined variable: ${e}`), this.name = "InternalUndefinedVariableError", this.variableName = e;
|
|
181
184
|
}
|
|
182
|
-
},
|
|
185
|
+
}, Ce = class extends Error {
|
|
183
186
|
constructor(e) {
|
|
184
187
|
super(e), this.name = "AssertionError", this.message = e + "";
|
|
185
188
|
}
|
|
186
189
|
};
|
|
187
|
-
function
|
|
190
|
+
function we(e) {
|
|
188
191
|
let [t, n] = e.getPosition(), r = e.input.split("\n"), i = Math.max(t - 2, 1), a = Math.min(t + 3, r.length);
|
|
189
|
-
return
|
|
190
|
-
let i = `${e === t ? ">> " : " "}${
|
|
192
|
+
return se(i, a + 1).map((e) => {
|
|
193
|
+
let i = `${e === t ? ">> " : " "}${v(String(e), String(a).length)}| `, o = e === t ? "\n" + v("^", n + i.length) : "";
|
|
191
194
|
return i += r[e - 1], i += o, i;
|
|
192
195
|
}).join("\n");
|
|
193
196
|
}
|
|
194
|
-
function
|
|
197
|
+
function Te(e, t) {
|
|
195
198
|
t.file && (e += `, file:${t.file}`);
|
|
196
199
|
let [n, r] = t.getPosition();
|
|
197
200
|
return e += `, line:${n}, col:${r}`, e;
|
|
198
201
|
}
|
|
199
|
-
var
|
|
202
|
+
var S = [
|
|
200
203
|
0,
|
|
201
204
|
0,
|
|
202
205
|
0,
|
|
@@ -325,21 +328,21 @@ var b = [
|
|
|
325
328
|
0,
|
|
326
329
|
0,
|
|
327
330
|
0
|
|
328
|
-
],
|
|
329
|
-
function
|
|
331
|
+
], Ee = 1, C = 4, De = 8, Oe = 16, ke = 32, Ae = 64, je = 128;
|
|
332
|
+
function Me(e) {
|
|
330
333
|
let t = e.charCodeAt(0);
|
|
331
|
-
return t >= 128 ? !
|
|
334
|
+
return t >= 128 ? !S[t] : !!(S[t] & Ee);
|
|
332
335
|
}
|
|
333
|
-
|
|
334
|
-
function
|
|
335
|
-
if (!e) throw new
|
|
336
|
+
S[160] = S[5760] = S[6158] = S[8192] = S[8193] = S[8194] = S[8195] = S[8196] = S[8197] = S[8198] = S[8199] = S[8200] = S[8201] = S[8202] = S[8232] = S[8233] = S[8239] = S[8287] = S[12288] = C, S[8220] = S[8221] = je;
|
|
337
|
+
function w(e, t) {
|
|
338
|
+
if (!e) throw new Ce(typeof t == "function" ? t() : t || `expect ${e} to be true`);
|
|
336
339
|
}
|
|
337
|
-
function
|
|
338
|
-
|
|
340
|
+
function T(e, t = `unexpected ${JSON.stringify(e)}`) {
|
|
341
|
+
w(!e, t);
|
|
339
342
|
}
|
|
340
343
|
var Ne = class extends t {
|
|
341
344
|
equals(e) {
|
|
342
|
-
return p(
|
|
345
|
+
return h(p(e));
|
|
343
346
|
}
|
|
344
347
|
gt() {
|
|
345
348
|
return !1;
|
|
@@ -358,7 +361,7 @@ var Ne = class extends t {
|
|
|
358
361
|
}
|
|
359
362
|
}, Pe = class e extends t {
|
|
360
363
|
equals(t) {
|
|
361
|
-
return t instanceof e ? !1 : (t =
|
|
364
|
+
return t instanceof e ? !1 : (t = p(t), a(t) || g(t) ? t.length === 0 : _(t) ? Object.keys(t).length === 0 : !1);
|
|
362
365
|
}
|
|
363
366
|
gt() {
|
|
364
367
|
return !1;
|
|
@@ -380,7 +383,7 @@ var Ne = class extends t {
|
|
|
380
383
|
}
|
|
381
384
|
}, Fe = class e extends Pe {
|
|
382
385
|
equals(e) {
|
|
383
|
-
return e === !1 || p(
|
|
386
|
+
return e === !1 || h(p(e)) ? !0 : a(e) ? /^\s*$/.test(e) : super.equals(e);
|
|
384
387
|
}
|
|
385
388
|
static is(t) {
|
|
386
389
|
return t instanceof e;
|
|
@@ -429,7 +432,7 @@ var Ne = class extends t {
|
|
|
429
432
|
this.buffer = "";
|
|
430
433
|
}
|
|
431
434
|
write(e) {
|
|
432
|
-
e =
|
|
435
|
+
e = p(e), typeof e != "string" && this.buffer === "" ? this.buffer = e : this.buffer = l(this.buffer) + l(e);
|
|
433
436
|
}
|
|
434
437
|
}, Be = class extends t {
|
|
435
438
|
constructor(e = () => "") {
|
|
@@ -440,7 +443,7 @@ var Ne = class extends t {
|
|
|
440
443
|
return yield this.superBlockRender(e), e.buffer;
|
|
441
444
|
}
|
|
442
445
|
};
|
|
443
|
-
function
|
|
446
|
+
function E(e) {
|
|
444
447
|
return e && o(e.equals) && o(e.gt) && o(e.geq) && o(e.lt) && o(e.leq);
|
|
445
448
|
}
|
|
446
449
|
var Ve = new Ne(), He = {
|
|
@@ -459,7 +462,7 @@ function We(e) {
|
|
|
459
462
|
let e = n;
|
|
460
463
|
for (let n = 0; n < t.length; n++) {
|
|
461
464
|
let r = t[n];
|
|
462
|
-
e[r] = e[r] || {}, n === t.length - 1 &&
|
|
465
|
+
e[r] = e[r] || {}, n === t.length - 1 && Me(t[n]) && (e[r].needBoundary = !0), e = e[r];
|
|
463
466
|
}
|
|
464
467
|
e.data = r, e.end = !0;
|
|
465
468
|
}
|
|
@@ -471,7 +474,7 @@ var Ge = function() {
|
|
|
471
474
|
return e;
|
|
472
475
|
}, Ge.apply(this, arguments);
|
|
473
476
|
};
|
|
474
|
-
function
|
|
477
|
+
function D(e, t, n, r) {
|
|
475
478
|
function i(e) {
|
|
476
479
|
return e instanceof n ? e : new n(function(t) {
|
|
477
480
|
t(e);
|
|
@@ -502,15 +505,15 @@ function Ke(e, t) {
|
|
|
502
505
|
let n = t || e;
|
|
503
506
|
return (t, ...r) => t ? n(...r) : e(...r);
|
|
504
507
|
}
|
|
505
|
-
function
|
|
506
|
-
return
|
|
508
|
+
function O(e) {
|
|
509
|
+
return D(this, void 0, void 0, function* () {
|
|
507
510
|
if (!c(e)) return e;
|
|
508
511
|
let t, n = !1, r = "next";
|
|
509
512
|
do {
|
|
510
513
|
let i = e[r](t);
|
|
511
514
|
n = !!i.done, t = i.value, r = "next";
|
|
512
515
|
try {
|
|
513
|
-
c(t) && (t =
|
|
516
|
+
c(t) && (t = O(t)), s(t) && (t = yield t);
|
|
514
517
|
} catch (e) {
|
|
515
518
|
r = "throw", t = e;
|
|
516
519
|
}
|
|
@@ -518,13 +521,13 @@ function D(e) {
|
|
|
518
521
|
return t;
|
|
519
522
|
});
|
|
520
523
|
}
|
|
521
|
-
function
|
|
524
|
+
function k(e) {
|
|
522
525
|
if (!c(e)) return e;
|
|
523
526
|
let t, n = !1, r = "next";
|
|
524
527
|
do {
|
|
525
528
|
let i = e[r](t);
|
|
526
529
|
if (n = !!i.done, t = i.value, r = "next", c(t)) try {
|
|
527
|
-
t =
|
|
530
|
+
t = k(t);
|
|
528
531
|
} catch (e) {
|
|
529
532
|
r = "throw", t = e;
|
|
530
533
|
}
|
|
@@ -595,7 +598,7 @@ var et = {
|
|
|
595
598
|
}, tt = /* @__PURE__ */ new Set("aAbBceklpP");
|
|
596
599
|
function nt(e, t) {
|
|
597
600
|
let n = Math.abs(e.getTimezoneOffset()), r = Math.floor(n / 60), i = n % 60;
|
|
598
|
-
return (e.getTimezoneOffset() > 0 ? "-" : "+") +
|
|
601
|
+
return (e.getTimezoneOffset() > 0 ? "-" : "+") + v(r, 2, "0") + (t.flags[":"] ? ":" : "") + v(i, 2, "0");
|
|
599
602
|
}
|
|
600
603
|
var rt = {
|
|
601
604
|
a: (e) => e.getShortWeekdayName(),
|
|
@@ -616,8 +619,8 @@ var rt = {
|
|
|
616
619
|
M: (e) => e.getMinutes(),
|
|
617
620
|
N: (e, t) => {
|
|
618
621
|
var n;
|
|
619
|
-
let r = Number(t.width) || 9, i = String(e.getMilliseconds()).slice(0, r);
|
|
620
|
-
return (n = t.memoryLimit) == null || n.use(r - i.length),
|
|
622
|
+
let r = Number(t.width) || 9, i = v(String(e.getMilliseconds()), 3, "0").slice(0, r);
|
|
623
|
+
return (n = t.memoryLimit) == null || n.use(r - i.length), ce(i, r, "0");
|
|
621
624
|
},
|
|
622
625
|
p: (e) => e.getHours() < 12 ? "AM" : "PM",
|
|
623
626
|
P: (e) => e.getHours() < 12 ? "am" : "pm",
|
|
@@ -655,7 +658,7 @@ function at(e, t, n) {
|
|
|
655
658
|
modifier: o,
|
|
656
659
|
memoryLimit: n
|
|
657
660
|
})), d = tt.has(s) ? " " : "0", f = Number(a) || et[s] || 0;
|
|
658
|
-
return l["^"] ? u = u.toUpperCase() : l["#"] && (u =
|
|
661
|
+
return l["^"] ? u = u.toUpperCase() : l["#"] && (u = de(u)), l._ ? d = " " : l[0] && (d = "0"), l["-"] && (f = 0), n?.use(Number(f) - u.length), v(u, f, d);
|
|
659
662
|
}
|
|
660
663
|
function ot() {
|
|
661
664
|
return typeof Intl < "u" ? Intl.DateTimeFormat : void 0;
|
|
@@ -681,7 +684,7 @@ var st = 6e4, ct = /([zZ]|([+-])(\d{2}):?(\d{2}))$/, lt = [
|
|
|
681
684
|
"Thursday",
|
|
682
685
|
"Friday",
|
|
683
686
|
"Saturday"
|
|
684
|
-
], ft = dt.map((e) => e.slice(0, 3)),
|
|
687
|
+
], ft = dt.map((e) => e.slice(0, 3)), A = class e {
|
|
685
688
|
constructor(t, n, r) {
|
|
686
689
|
this.locale = n, this.DateTimeFormat = ot(), this.date = new Date(t), this.timezoneFixed = r !== void 0, r === void 0 && (r = this.date.getTimezoneOffset()), this.timezoneOffset = a(r) ? e.getTimezoneOffset(r, this.date) : r, this.timezoneName = a(r) ? r : "";
|
|
687
690
|
let i = (this.date.getTimezoneOffset() - this.timezoneOffset) * st, o = this.date.getTime() + i;
|
|
@@ -766,17 +769,17 @@ var st = 6e4, ct = /([zZ]|([+-])(\d{2}):?(\d{2}))$/, lt = [
|
|
|
766
769
|
this.base = 0, this.message = `${e} limit exceeded`, this.limit = t;
|
|
767
770
|
}
|
|
768
771
|
use(e) {
|
|
769
|
-
+e > 0 && (
|
|
772
|
+
+e > 0 && (w(this.base + +e <= this.limit, this.message), this.base += +e);
|
|
770
773
|
}
|
|
771
774
|
check(e) {
|
|
772
|
-
+e > 0 &&
|
|
775
|
+
+e > 0 && w(+e <= this.limit, this.message);
|
|
773
776
|
}
|
|
774
777
|
}, mt = class extends e {
|
|
775
778
|
constructor(e, [t, n], r, i, a, o, s, c) {
|
|
776
779
|
super(e, r, i, a, c), this.trimLeft = !1, this.trimRight = !1;
|
|
777
780
|
let l = r[t] === "-", u = r[n - 1] === "-", d = l ? t + 1 : t, f = u ? n - 1 : n;
|
|
778
|
-
for (; d < f &&
|
|
779
|
-
for (; f > d &&
|
|
781
|
+
for (; d < f && S[r.charCodeAt(d)] & C;) d++;
|
|
782
|
+
for (; f > d && S[r.charCodeAt(f - 1)] & C;) f--;
|
|
780
783
|
this.contentRange = [d, f], this.trimLeft = l || o, this.trimRight = u || s;
|
|
781
784
|
}
|
|
782
785
|
get content() {
|
|
@@ -785,7 +788,7 @@ var st = 6e4, ct = /([zZ]|([+-])(\d{2}):?(\d{2}))$/, lt = [
|
|
|
785
788
|
}, ht = class extends mt {
|
|
786
789
|
constructor(e, t, n, r, i) {
|
|
787
790
|
let { trimTagLeft: a, trimTagRight: o, tagDelimiterLeft: s, tagDelimiterRight: c } = r, [l, u] = [t + s.length, n - c.length];
|
|
788
|
-
super(q.Tag, [l, u], e, t, n, a, o, i), this.tokenizer = new
|
|
791
|
+
super(q.Tag, [l, u], e, t, n, a, o, i), this.tokenizer = new L(e, r.operators, i, 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]);
|
|
789
792
|
}
|
|
790
793
|
}, gt = class extends mt {
|
|
791
794
|
constructor(e, t, n, r, i) {
|
|
@@ -895,7 +898,7 @@ var Mt = class extends e {
|
|
|
895
898
|
}
|
|
896
899
|
}, Pt = class extends mt {
|
|
897
900
|
constructor(e, t, n, r, i) {
|
|
898
|
-
super(q.Tag, [t, n], e, t, n, !1, !1, i), this.tokenizer = new
|
|
901
|
+
super(q.Tag, [t, n], e, t, n, !1, !1, i), this.tokenizer = new L(e, r.operators, i, this.contentRange), this.name = this.tokenizer.readTagName(), this.tokenizer.assert(this.name, "illegal liquid tag syntax"), this.tokenizer.skipBlank();
|
|
899
902
|
}
|
|
900
903
|
get args() {
|
|
901
904
|
return this.tokenizer.input.slice(this.tokenizer.p, this.contentRange[1]);
|
|
@@ -911,7 +914,7 @@ function Lt() {
|
|
|
911
914
|
var Rt = class {
|
|
912
915
|
renderTemplatesToNodeStream(e, t) {
|
|
913
916
|
let n = new Re();
|
|
914
|
-
return Promise.resolve().then(() =>
|
|
917
|
+
return Promise.resolve().then(() => O(this.renderTemplates(e, t, n))).then(() => n.end(), (e) => n.error(e)), n.stream;
|
|
915
918
|
}
|
|
916
919
|
*renderTemplates(e, t, n) {
|
|
917
920
|
n ||= t.opts.keepOutputType ? new ze() : new Le(), t.renderLimit.check(Lt().now());
|
|
@@ -922,12 +925,12 @@ var Rt = class {
|
|
|
922
925
|
let e = yield i.render(t, n);
|
|
923
926
|
if (e && n.write(e), t.breakCalled || t.continueCalled) break;
|
|
924
927
|
} catch (e) {
|
|
925
|
-
let n =
|
|
928
|
+
let n = x.is(e) ? e : new ye(e, i);
|
|
926
929
|
if (t.opts.catchAllErrors) r.push(n);
|
|
927
930
|
else throw n;
|
|
928
931
|
}
|
|
929
932
|
}
|
|
930
|
-
if (r.length) throw new
|
|
933
|
+
if (r.length) throw new be(r);
|
|
931
934
|
return n.buffer;
|
|
932
935
|
}
|
|
933
936
|
}, zt = class {
|
|
@@ -935,9 +938,9 @@ var Rt = class {
|
|
|
935
938
|
this.postfix = [...Ut(e)];
|
|
936
939
|
}
|
|
937
940
|
*evaluate(e, t) {
|
|
938
|
-
|
|
941
|
+
w(e, "unable to evaluate: context not defined");
|
|
939
942
|
let n = [];
|
|
940
|
-
for (let r of this.postfix) if (
|
|
943
|
+
for (let r of this.postfix) if (Un(r)) {
|
|
941
944
|
let t = n.pop(), i;
|
|
942
945
|
if (St[r.operator] === 1) i = yield e.opts.operators[r.operator](t, e);
|
|
943
946
|
else {
|
|
@@ -945,87 +948,87 @@ var Rt = class {
|
|
|
945
948
|
i = yield e.opts.operators[r.operator](a, t, e);
|
|
946
949
|
}
|
|
947
950
|
n.push(i);
|
|
948
|
-
} else n.push(yield
|
|
951
|
+
} else n.push(yield j(r, e, t));
|
|
949
952
|
return n[0];
|
|
950
953
|
}
|
|
951
954
|
valid() {
|
|
952
955
|
return !!this.postfix.length;
|
|
953
956
|
}
|
|
954
957
|
};
|
|
955
|
-
function*
|
|
958
|
+
function* j(e, t, n = !1) {
|
|
956
959
|
if (e) {
|
|
957
960
|
if ("content" in e) return e.content;
|
|
958
|
-
if (
|
|
959
|
-
if (
|
|
961
|
+
if (Jn(e)) return yield Bt(e, t, n);
|
|
962
|
+
if (Xn(e)) return yield Ht(e, t);
|
|
960
963
|
}
|
|
961
964
|
}
|
|
962
965
|
function* Bt(e, t, n) {
|
|
963
966
|
let r = [];
|
|
964
|
-
for (let n of e.props) r.push(yield
|
|
967
|
+
for (let n of e.props) r.push(yield j(n, t, !1));
|
|
965
968
|
try {
|
|
966
969
|
if (e.variable) {
|
|
967
|
-
let i = yield
|
|
970
|
+
let i = yield j(e.variable, t, n);
|
|
968
971
|
return yield t._getFromScope(i, r);
|
|
969
972
|
} else return yield t._get(r);
|
|
970
973
|
} catch (t) {
|
|
971
974
|
if (n && t.name === "InternalUndefinedVariableError") return null;
|
|
972
|
-
throw new
|
|
975
|
+
throw new xe(t, e);
|
|
973
976
|
}
|
|
974
977
|
}
|
|
975
978
|
function Vt(e) {
|
|
976
979
|
return e.content;
|
|
977
980
|
}
|
|
978
981
|
function* Ht(e, t) {
|
|
979
|
-
let n = yield
|
|
980
|
-
return t.memoryLimit.use(r - n + 1),
|
|
982
|
+
let n = yield j(e.lhs, t), r = yield j(e.rhs, t);
|
|
983
|
+
return t.memoryLimit.use(r - n + 1), se(+n, +r + 1);
|
|
981
984
|
}
|
|
982
985
|
function* Ut(e) {
|
|
983
986
|
let t = [];
|
|
984
|
-
for (let n of e) if (
|
|
987
|
+
for (let n of e) if (Un(n)) {
|
|
985
988
|
for (; t.length && t[t.length - 1].getPrecedence() > n.getPrecedence();) yield t.pop();
|
|
986
989
|
t.push(n);
|
|
987
990
|
} else yield n;
|
|
988
991
|
for (; t.length;) yield t.pop();
|
|
989
992
|
}
|
|
990
|
-
function j(e, t) {
|
|
991
|
-
return !M(e, t);
|
|
992
|
-
}
|
|
993
993
|
function M(e, t) {
|
|
994
|
-
return
|
|
994
|
+
return !Wt(e, t);
|
|
995
995
|
}
|
|
996
|
-
|
|
996
|
+
function Wt(e, t) {
|
|
997
|
+
return e = p(e), t.opts.jsTruthy ? !e : e === !1 || e == null;
|
|
998
|
+
}
|
|
999
|
+
var Gt = {
|
|
997
1000
|
"==": N,
|
|
998
1001
|
"!=": (e, t) => !N(e, t),
|
|
999
|
-
">": (e, t) =>
|
|
1000
|
-
"<": (e, t) =>
|
|
1001
|
-
">=": (e, t) =>
|
|
1002
|
-
"<=": (e, t) =>
|
|
1003
|
-
contains: (e, t) => (e =
|
|
1004
|
-
not: (e, t) =>
|
|
1005
|
-
and: (e, t, n) =>
|
|
1006
|
-
or: (e, t, n) =>
|
|
1002
|
+
">": (e, t) => E(e) ? e.gt(t) : E(t) ? t.lt(e) : p(e) > p(t),
|
|
1003
|
+
"<": (e, t) => E(e) ? e.lt(t) : E(t) ? t.gt(e) : p(e) < p(t),
|
|
1004
|
+
">=": (e, t) => E(e) ? e.geq(t) : E(t) ? t.leq(e) : p(e) >= p(t),
|
|
1005
|
+
"<=": (e, t) => E(e) ? e.leq(t) : E(t) ? t.geq(e) : p(e) <= p(t),
|
|
1006
|
+
contains: (e, t) => (e = p(e), g(e) ? e.some((e) => N(e, t)) : o(e?.indexOf) ? e.indexOf(p(t)) > -1 : !1),
|
|
1007
|
+
not: (e, t) => Wt(p(e), t),
|
|
1008
|
+
and: (e, t, n) => M(p(e), n) && M(p(t), n),
|
|
1009
|
+
or: (e, t, n) => M(p(e), n) || M(p(t), n)
|
|
1007
1010
|
};
|
|
1008
1011
|
function N(e, t) {
|
|
1009
|
-
return
|
|
1010
|
-
}
|
|
1011
|
-
function Gt(e, t) {
|
|
1012
|
-
return e.length === t.length ? !e.some((e, n) => !N(e, t[n])) : !1;
|
|
1012
|
+
return E(e) ? e.equals(t) : E(t) ? t.equals(e) : (e = p(e), t = p(t), g(e) ? g(t) && Kt(e, t) : e === t);
|
|
1013
1013
|
}
|
|
1014
1014
|
function Kt(e, t) {
|
|
1015
|
+
return e.length === t.length && !e.some((e, n) => !N(e, t[n]));
|
|
1016
|
+
}
|
|
1017
|
+
function qt(e, t) {
|
|
1015
1018
|
return e.some((e) => N(e, t));
|
|
1016
1019
|
}
|
|
1017
|
-
var
|
|
1020
|
+
var Jt = class {
|
|
1018
1021
|
constructor(e, t, n, r) {
|
|
1019
1022
|
this.key = e, this.value = t, this.next = n, this.prev = r;
|
|
1020
1023
|
}
|
|
1021
|
-
},
|
|
1024
|
+
}, Yt = class {
|
|
1022
1025
|
constructor(e, t = 0) {
|
|
1023
|
-
this.limit = e, this.size = t, this.cache = {}, this.head = new
|
|
1026
|
+
this.limit = e, this.size = t, this.cache = {}, this.head = new Jt("HEAD", null, null, null), this.tail = new Jt("TAIL", null, null, null), this.head.next = this.tail, this.tail.prev = this.head;
|
|
1024
1027
|
}
|
|
1025
1028
|
write(e, t) {
|
|
1026
1029
|
if (this.cache[e]) this.cache[e].value = t;
|
|
1027
1030
|
else {
|
|
1028
|
-
let n = new
|
|
1031
|
+
let n = new Jt(e, t, this.head.next, this.head);
|
|
1029
1032
|
this.head.next.prev = n, this.head.next = n, this.cache[e] = n, this.size++, this.ensureLimit();
|
|
1030
1033
|
}
|
|
1031
1034
|
}
|
|
@@ -1045,7 +1048,7 @@ var qt = class {
|
|
|
1045
1048
|
this.size > this.limit && this.remove(this.tail.prev.key);
|
|
1046
1049
|
}
|
|
1047
1050
|
};
|
|
1048
|
-
function
|
|
1051
|
+
function Xt(e, t) {
|
|
1049
1052
|
let n = document.createElement("base");
|
|
1050
1053
|
n.href = e;
|
|
1051
1054
|
let r = document.getElementsByTagName("head")[0];
|
|
@@ -1055,14 +1058,14 @@ function Yt(e, t) {
|
|
|
1055
1058
|
let a = i.href;
|
|
1056
1059
|
return r.removeChild(n), a;
|
|
1057
1060
|
}
|
|
1058
|
-
function
|
|
1059
|
-
return e.length &&
|
|
1061
|
+
function Zt(e, t, n) {
|
|
1062
|
+
return e.length && oe(e) !== "/" && (e += "/"), Xt(e, t).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/, (e, t, r) => {
|
|
1060
1063
|
let i = r.split("/").pop();
|
|
1061
1064
|
return /\.\w+$/.test(i) ? e : t + r + n;
|
|
1062
1065
|
});
|
|
1063
1066
|
}
|
|
1064
|
-
function
|
|
1065
|
-
return
|
|
1067
|
+
function Qt(e) {
|
|
1068
|
+
return D(this, void 0, void 0, function* () {
|
|
1066
1069
|
return new Promise((t, n) => {
|
|
1067
1070
|
let r = new XMLHttpRequest();
|
|
1068
1071
|
r.onload = () => {
|
|
@@ -1073,89 +1076,93 @@ function Zt(e) {
|
|
|
1073
1076
|
});
|
|
1074
1077
|
});
|
|
1075
1078
|
}
|
|
1076
|
-
function
|
|
1079
|
+
function $t(e) {
|
|
1077
1080
|
let t = new XMLHttpRequest();
|
|
1078
1081
|
if (t.open("GET", e, !1), t.send(), t.status < 200 || t.status >= 300) throw Error(t.statusText);
|
|
1079
1082
|
return t.responseText;
|
|
1080
1083
|
}
|
|
1081
|
-
function
|
|
1082
|
-
return
|
|
1084
|
+
function en(e) {
|
|
1085
|
+
return D(this, void 0, void 0, function* () {
|
|
1083
1086
|
return !0;
|
|
1084
1087
|
});
|
|
1085
1088
|
}
|
|
1086
|
-
function
|
|
1089
|
+
function tn(e) {
|
|
1087
1090
|
return !0;
|
|
1088
1091
|
}
|
|
1089
|
-
function
|
|
1090
|
-
return
|
|
1092
|
+
function nn(e) {
|
|
1093
|
+
return Xt(e, ".");
|
|
1091
1094
|
}
|
|
1092
|
-
var
|
|
1095
|
+
var rn = /*#__PURE__*/ Object.freeze({
|
|
1093
1096
|
__proto__: null,
|
|
1094
|
-
resolve:
|
|
1095
|
-
readFile:
|
|
1096
|
-
readFileSync:
|
|
1097
|
-
exists:
|
|
1098
|
-
existsSync:
|
|
1099
|
-
dirname:
|
|
1097
|
+
resolve: Zt,
|
|
1098
|
+
readFile: Qt,
|
|
1099
|
+
readFileSync: $t,
|
|
1100
|
+
exists: en,
|
|
1101
|
+
existsSync: tn,
|
|
1102
|
+
dirname: nn,
|
|
1100
1103
|
sep: "/"
|
|
1101
1104
|
});
|
|
1102
|
-
function
|
|
1103
|
-
|
|
1105
|
+
function an(e, t) {
|
|
1106
|
+
typeof t == "string" ? e.use(t.length) : t === null || typeof t == "number" || typeof t == "boolean" ? e.use(JSON.stringify(t).length) : Array.isArray(t) ? e.use(t.length + 1) : typeof t == "object" && e.use(2);
|
|
1104
1107
|
}
|
|
1105
|
-
function
|
|
1106
|
-
return
|
|
1108
|
+
function on(e, t, ...n) {
|
|
1109
|
+
return e = p(e), g(e) || a(e) ? e.length ? e : t : e === !1 && new Map(n).get("allow_false") ? !1 : Wt(e, this.context) ? t : e;
|
|
1107
1110
|
}
|
|
1108
|
-
function
|
|
1109
|
-
let n =
|
|
1111
|
+
function sn(e, t = 0) {
|
|
1112
|
+
let n = this.context.memoryLimit;
|
|
1113
|
+
return JSON.stringify(e, (e, t) => (an(n, t), t), t);
|
|
1114
|
+
}
|
|
1115
|
+
function cn(e, t = 0) {
|
|
1116
|
+
let n = this.context.memoryLimit, r = [];
|
|
1110
1117
|
return JSON.stringify(e, function(e, t) {
|
|
1111
|
-
if (typeof t != "object" || !t) return t;
|
|
1112
|
-
for (;
|
|
1113
|
-
return
|
|
1118
|
+
if (typeof t != "object" || !t) return an(n, t), t;
|
|
1119
|
+
for (; r.length > 0 && r[r.length - 1] !== this;) r.pop();
|
|
1120
|
+
return r.includes(t) ? (n.use(10), "[Circular]") : (r.push(t), an(n, t), t);
|
|
1114
1121
|
}, t);
|
|
1115
1122
|
}
|
|
1116
|
-
function
|
|
1123
|
+
function ln(e) {
|
|
1117
1124
|
return Number(e);
|
|
1118
1125
|
}
|
|
1119
|
-
var
|
|
1120
|
-
default:
|
|
1126
|
+
var un = {
|
|
1127
|
+
default: on,
|
|
1121
1128
|
raw: {
|
|
1122
1129
|
raw: !0,
|
|
1123
|
-
handler:
|
|
1130
|
+
handler: ue
|
|
1124
1131
|
},
|
|
1125
|
-
jsonify:
|
|
1126
|
-
to_integer:
|
|
1127
|
-
json:
|
|
1128
|
-
inspect:
|
|
1129
|
-
},
|
|
1132
|
+
jsonify: sn,
|
|
1133
|
+
to_integer: ln,
|
|
1134
|
+
json: sn,
|
|
1135
|
+
inspect: cn
|
|
1136
|
+
}, dn = {
|
|
1130
1137
|
"&": "&",
|
|
1131
1138
|
"<": "<",
|
|
1132
1139
|
">": ">",
|
|
1133
1140
|
"\"": """,
|
|
1134
1141
|
"'": "'"
|
|
1135
|
-
},
|
|
1142
|
+
}, fn = {
|
|
1136
1143
|
"&": "&",
|
|
1137
1144
|
"<": "<",
|
|
1138
1145
|
">": ">",
|
|
1139
1146
|
""": "\"",
|
|
1140
1147
|
"'": "'"
|
|
1141
1148
|
};
|
|
1142
|
-
function
|
|
1143
|
-
return e = l(e), this.context.memoryLimit.use(e.length), e.replace(/&|<|>|"|'/g, (e) =>
|
|
1144
|
-
}
|
|
1145
|
-
function fn(e) {
|
|
1146
|
-
return dn.call(this, e);
|
|
1149
|
+
function P(e) {
|
|
1150
|
+
return e = l(e), this.context.memoryLimit.use(e.length), e.replace(/&|<|>|"|'/g, (e) => dn[e]);
|
|
1147
1151
|
}
|
|
1148
1152
|
function pn(e) {
|
|
1149
|
-
return
|
|
1153
|
+
return P.call(this, e);
|
|
1150
1154
|
}
|
|
1151
1155
|
function mn(e) {
|
|
1152
|
-
return
|
|
1156
|
+
return e = l(e), this.context.memoryLimit.use(e.length), e.replace(/&(amp|lt|gt|#34|#39);/g, (e) => fn[e]);
|
|
1153
1157
|
}
|
|
1154
1158
|
function hn(e) {
|
|
1159
|
+
return P.call(this, mn.call(this, e));
|
|
1160
|
+
}
|
|
1161
|
+
function gn(e) {
|
|
1155
1162
|
let t = l(e);
|
|
1156
1163
|
return this.context.memoryLimit.use(t.length), t.replace(/\r?\n/gm, "<br />\n");
|
|
1157
1164
|
}
|
|
1158
|
-
function
|
|
1165
|
+
function _n(e) {
|
|
1159
1166
|
let t = l(e);
|
|
1160
1167
|
this.context.memoryLimit.use(t.length);
|
|
1161
1168
|
let n = /* @__PURE__ */ new Map([
|
|
@@ -1181,33 +1188,33 @@ function gn(e) {
|
|
|
1181
1188
|
}
|
|
1182
1189
|
return r;
|
|
1183
1190
|
}
|
|
1184
|
-
var
|
|
1191
|
+
var vn = /*#__PURE__*/ Object.freeze({
|
|
1185
1192
|
__proto__: null,
|
|
1186
|
-
escape:
|
|
1187
|
-
xml_escape:
|
|
1188
|
-
escape_once:
|
|
1189
|
-
newline_to_br:
|
|
1190
|
-
strip_html:
|
|
1191
|
-
}),
|
|
1193
|
+
escape: P,
|
|
1194
|
+
xml_escape: pn,
|
|
1195
|
+
escape_once: hn,
|
|
1196
|
+
newline_to_br: gn,
|
|
1197
|
+
strip_html: _n
|
|
1198
|
+
}), yn = class {
|
|
1192
1199
|
constructor(e) {
|
|
1193
1200
|
this.mapping = e, this.sep = "/";
|
|
1194
1201
|
}
|
|
1195
1202
|
exists(e) {
|
|
1196
|
-
return
|
|
1203
|
+
return D(this, void 0, void 0, function* () {
|
|
1197
1204
|
return this.existsSync(e);
|
|
1198
1205
|
});
|
|
1199
1206
|
}
|
|
1200
1207
|
existsSync(e) {
|
|
1201
|
-
return !
|
|
1208
|
+
return !h(this.mapping[e]);
|
|
1202
1209
|
}
|
|
1203
1210
|
readFile(e) {
|
|
1204
|
-
return
|
|
1211
|
+
return D(this, void 0, void 0, function* () {
|
|
1205
1212
|
return this.readFileSync(e);
|
|
1206
1213
|
});
|
|
1207
1214
|
}
|
|
1208
1215
|
readFileSync(e) {
|
|
1209
1216
|
let t = this.mapping[e];
|
|
1210
|
-
if (
|
|
1217
|
+
if (h(t)) throw Error(`ENOENT: ${e}`);
|
|
1211
1218
|
return t;
|
|
1212
1219
|
}
|
|
1213
1220
|
dirname(e) {
|
|
@@ -1221,7 +1228,7 @@ var _n = /*#__PURE__*/ Object.freeze({
|
|
|
1221
1228
|
else e === ".." ? (r.length > 1 || r[0] !== "") && r.pop() : r.push(e);
|
|
1222
1229
|
return r.join(this.sep);
|
|
1223
1230
|
}
|
|
1224
|
-
},
|
|
1231
|
+
}, F = {
|
|
1225
1232
|
root: ["."],
|
|
1226
1233
|
layouts: ["."],
|
|
1227
1234
|
partials: ["."],
|
|
@@ -1230,7 +1237,7 @@ var _n = /*#__PURE__*/ Object.freeze({
|
|
|
1230
1237
|
keyValueSeparator: ":",
|
|
1231
1238
|
cache: void 0,
|
|
1232
1239
|
extname: "",
|
|
1233
|
-
fs:
|
|
1240
|
+
fs: rn,
|
|
1234
1241
|
dynamicPartials: !0,
|
|
1235
1242
|
jsTruthy: !1,
|
|
1236
1243
|
dateFormat: "%A, %B %-e, %Y at %-l:%M %P %z",
|
|
@@ -1251,45 +1258,45 @@ var _n = /*#__PURE__*/ Object.freeze({
|
|
|
1251
1258
|
lenientIf: !1,
|
|
1252
1259
|
globals: {},
|
|
1253
1260
|
keepOutputType: !1,
|
|
1254
|
-
operators:
|
|
1261
|
+
operators: Gt,
|
|
1255
1262
|
memoryLimit: Infinity,
|
|
1256
1263
|
parseLimit: Infinity,
|
|
1257
1264
|
renderLimit: Infinity
|
|
1258
1265
|
};
|
|
1259
|
-
function
|
|
1266
|
+
function bn(e) {
|
|
1260
1267
|
if (e.hasOwnProperty("root") && (e.hasOwnProperty("partials") || (e.partials = e.root), e.hasOwnProperty("layouts") || (e.layouts = e.root)), e.hasOwnProperty("cache")) {
|
|
1261
1268
|
let t;
|
|
1262
|
-
t = typeof e.cache == "number" ? e.cache > 0 ? new
|
|
1269
|
+
t = typeof e.cache == "number" ? e.cache > 0 ? new Yt(e.cache) : void 0 : typeof e.cache == "object" ? e.cache : e.cache ? new Yt(1024) : void 0, e.cache = t;
|
|
1263
1270
|
}
|
|
1264
|
-
return e = Object.assign(Object.assign(Object.assign({},
|
|
1271
|
+
return e = Object.assign(Object.assign(Object.assign({}, F), e.jekyllInclude ? { dynamicPartials: !1 } : {}), e), (!e.fs.dirname || !e.fs.sep) && e.relativeReference && (console.warn("[LiquidJS] `fs.dirname` and `fs.sep` are required for relativeReference, set relativeReference to `false` to suppress this warning"), e.relativeReference = !1), e.root = I(e.root), e.partials = I(e.partials), e.layouts = I(e.layouts), e.outputEscape = e.outputEscape && xn(e.outputEscape), e.locale ||= ot()?.().resolvedOptions().locale ?? "en-US", e.templates && (e.fs = new yn(e.templates), e.relativeReference = !0, e.root = e.partials = e.layouts = "."), e;
|
|
1265
1272
|
}
|
|
1266
|
-
function
|
|
1267
|
-
return e === "escape" ?
|
|
1273
|
+
function xn(e) {
|
|
1274
|
+
return e === "escape" ? P : e === "json" ? un.json : (w(o(e), "`outputEscape` need to be of type string or function"), e);
|
|
1268
1275
|
}
|
|
1269
|
-
function
|
|
1276
|
+
function I(e) {
|
|
1270
1277
|
let t = [];
|
|
1271
|
-
return
|
|
1278
|
+
return g(e) && (t = e), a(e) && (t = [e]), t;
|
|
1272
1279
|
}
|
|
1273
|
-
function
|
|
1280
|
+
function Sn(e, t) {
|
|
1274
1281
|
let n = !1;
|
|
1275
1282
|
for (let r = 0; r < e.length; r++) {
|
|
1276
1283
|
let i = e[r];
|
|
1277
|
-
|
|
1284
|
+
Hn(i) && (!n && i.trimLeft && Cn(e[r - 1], t.greedy), J(i) && (i.name === "raw" ? n = !0 : i.name === "endraw" && (n = !1)), !n && i.trimRight && wn(e[r + 1], t.greedy));
|
|
1278
1285
|
}
|
|
1279
1286
|
}
|
|
1280
|
-
function Sn(e, t) {
|
|
1281
|
-
if (!e || !Hn(e)) return;
|
|
1282
|
-
let n = t ? x : ke;
|
|
1283
|
-
for (; b[e.input.charCodeAt(e.end - 1 - e.trimRight)] & n;) e.trimRight++;
|
|
1284
|
-
}
|
|
1285
1287
|
function Cn(e, t) {
|
|
1286
|
-
if (!e || !
|
|
1287
|
-
let n = t ?
|
|
1288
|
-
for (;
|
|
1288
|
+
if (!e || !Wn(e)) return;
|
|
1289
|
+
let n = t ? C : Oe;
|
|
1290
|
+
for (; S[e.input.charCodeAt(e.end - 1 - e.trimRight)] & n;) e.trimRight++;
|
|
1291
|
+
}
|
|
1292
|
+
function wn(e, t) {
|
|
1293
|
+
if (!e || !Wn(e)) return;
|
|
1294
|
+
let n = t ? C : Oe;
|
|
1295
|
+
for (; S[e.input.charCodeAt(e.begin + e.trimLeft)] & n;) e.trimLeft++;
|
|
1289
1296
|
e.input.charAt(e.begin + e.trimLeft) === "\n" && e.trimLeft++;
|
|
1290
1297
|
}
|
|
1291
|
-
var
|
|
1292
|
-
constructor(e, t =
|
|
1298
|
+
var L = class {
|
|
1299
|
+
constructor(e, t = F.operators, n, r) {
|
|
1293
1300
|
this.input = e, this.file = n, this.rawBeginAt = -1, this.p = r ? r[0] : 0, this.N = r ? r[1] : e.length, this.opTrie = We(t), this.literalTrie = We(He);
|
|
1294
1301
|
}
|
|
1295
1302
|
readExpression() {
|
|
@@ -1318,7 +1325,7 @@ var I = class {
|
|
|
1318
1325
|
matchTrie(e) {
|
|
1319
1326
|
let t = e, n = this.p, r;
|
|
1320
1327
|
for (; t[this.input[n]] && n < this.N;) t = t[this.input[n++]], t.end && (r = t);
|
|
1321
|
-
return !r || r.needBoundary &&
|
|
1328
|
+
return !r || r.needBoundary && Me(this.peek(n - this.p)) ? -1 : n;
|
|
1322
1329
|
}
|
|
1323
1330
|
readFilteredValue() {
|
|
1324
1331
|
let e = this.p, t = this.readExpression();
|
|
@@ -1354,13 +1361,13 @@ var I = class {
|
|
|
1354
1361
|
let t = this.readValue();
|
|
1355
1362
|
return [e.getText(), t];
|
|
1356
1363
|
}
|
|
1357
|
-
readTopLevelTokens(e =
|
|
1364
|
+
readTopLevelTokens(e = F) {
|
|
1358
1365
|
let t = [];
|
|
1359
1366
|
for (; this.p < this.N;) {
|
|
1360
1367
|
let n = this.readTopLevelToken(e);
|
|
1361
1368
|
t.push(n);
|
|
1362
1369
|
}
|
|
1363
|
-
return
|
|
1370
|
+
return Sn(t, e), t;
|
|
1364
1371
|
}
|
|
1365
1372
|
readTopLevelToken(e) {
|
|
1366
1373
|
let { tagDelimiterLeft: t, outputDelimiterLeft: n } = e;
|
|
@@ -1379,7 +1386,7 @@ var I = class {
|
|
|
1379
1386
|
}
|
|
1380
1387
|
readToDelimiter(e, t = !1) {
|
|
1381
1388
|
for (this.skipBlank(); this.p < this.N;) {
|
|
1382
|
-
if (t && this.peekType() &
|
|
1389
|
+
if (t && this.peekType() & De) {
|
|
1383
1390
|
this.readQuoted();
|
|
1384
1391
|
continue;
|
|
1385
1392
|
}
|
|
@@ -1387,7 +1394,7 @@ var I = class {
|
|
|
1387
1394
|
}
|
|
1388
1395
|
return -1;
|
|
1389
1396
|
}
|
|
1390
|
-
readOutputToken(e =
|
|
1397
|
+
readOutputToken(e = F) {
|
|
1391
1398
|
let { file: t, input: n } = this, { outputDelimiterRight: r } = e, i = this.p;
|
|
1392
1399
|
if (this.readToDelimiter(r, !0) === -1) throw this.error(`output ${this.snapshot(i)} not closed`, i);
|
|
1393
1400
|
return new gt(n, i, this.p, e, t);
|
|
@@ -1410,7 +1417,7 @@ var I = class {
|
|
|
1410
1417
|
}
|
|
1411
1418
|
throw this.error(`raw ${this.snapshot(this.rawBeginAt)} not closed`, r);
|
|
1412
1419
|
}
|
|
1413
|
-
readLiquidTagTokens(e =
|
|
1420
|
+
readLiquidTagTokens(e = F) {
|
|
1414
1421
|
let t = [];
|
|
1415
1422
|
for (; this.p < this.N;) {
|
|
1416
1423
|
let n = this.readLiquidTagToken(e);
|
|
@@ -1426,13 +1433,13 @@ var I = class {
|
|
|
1426
1433
|
return new Pt(this.input, t, n, e, this.file);
|
|
1427
1434
|
}
|
|
1428
1435
|
error(e, t = this.p) {
|
|
1429
|
-
return new
|
|
1436
|
+
return new _e(e, new yt(this.input, t, this.N, this.file));
|
|
1430
1437
|
}
|
|
1431
1438
|
assert(e, t, n) {
|
|
1432
1439
|
if (!e) throw this.error(typeof t == "function" ? t() : t, n);
|
|
1433
1440
|
}
|
|
1434
1441
|
snapshot(e = this.p) {
|
|
1435
|
-
return JSON.stringify(
|
|
1442
|
+
return JSON.stringify(fe(this.input.slice(e, this.N), 32));
|
|
1436
1443
|
}
|
|
1437
1444
|
readWord() {
|
|
1438
1445
|
return this.readIdentifier();
|
|
@@ -1440,7 +1447,7 @@ var I = class {
|
|
|
1440
1447
|
readIdentifier() {
|
|
1441
1448
|
this.skipBlank();
|
|
1442
1449
|
let e = this.p;
|
|
1443
|
-
for (; !this.end() &&
|
|
1450
|
+
for (; !this.end() && Me(this.peek());) ++this.p;
|
|
1444
1451
|
return new yt(this.input, e, this.p, this.file);
|
|
1445
1452
|
}
|
|
1446
1453
|
readNonEmptyIdentifier() {
|
|
@@ -1523,12 +1530,12 @@ var I = class {
|
|
|
1523
1530
|
readNumber() {
|
|
1524
1531
|
this.skipBlank();
|
|
1525
1532
|
let e = !1, t = !1, n = 0;
|
|
1526
|
-
for (this.peekType() &
|
|
1533
|
+
for (this.peekType() & Ae && n++; this.p + n <= this.N;) if (this.peekType(n) & ke) t = !0, n++;
|
|
1527
1534
|
else if (this.peek(n) === "." && this.peek(n + 1) !== ".") {
|
|
1528
1535
|
if (e || !t) return;
|
|
1529
1536
|
e = !0, n++;
|
|
1530
1537
|
} else break;
|
|
1531
|
-
if (t && !
|
|
1538
|
+
if (t && !Me(this.peek(n))) {
|
|
1532
1539
|
let e = new vt(this.input, this.p, this.p + n, this.file);
|
|
1533
1540
|
return this.advance(n), e;
|
|
1534
1541
|
}
|
|
@@ -1557,7 +1564,7 @@ var I = class {
|
|
|
1557
1564
|
readQuoted() {
|
|
1558
1565
|
this.skipBlank();
|
|
1559
1566
|
let e = this.p;
|
|
1560
|
-
if (!(this.peekType() &
|
|
1567
|
+
if (!(this.peekType() & De)) return;
|
|
1561
1568
|
++this.p;
|
|
1562
1569
|
let t = !1;
|
|
1563
1570
|
for (; this.p < this.N && (++this.p, !(this.input[this.p - 1] === this.input[e] && !t));) t ? t = !1 : this.input[this.p - 1] === "\\" && (t = !0);
|
|
@@ -1583,15 +1590,15 @@ var I = class {
|
|
|
1583
1590
|
return !0;
|
|
1584
1591
|
}
|
|
1585
1592
|
peekType(e = 0) {
|
|
1586
|
-
return this.p + e >= this.N ? 0 :
|
|
1593
|
+
return this.p + e >= this.N ? 0 : S[this.input.charCodeAt(this.p + e)];
|
|
1587
1594
|
}
|
|
1588
1595
|
peek(e = 0) {
|
|
1589
1596
|
return this.p + e >= this.N ? "" : this.input[this.p + e];
|
|
1590
1597
|
}
|
|
1591
1598
|
skipBlank() {
|
|
1592
|
-
for (; this.peekType() &
|
|
1599
|
+
for (; this.peekType() & C;) ++this.p;
|
|
1593
1600
|
}
|
|
1594
|
-
},
|
|
1601
|
+
}, Tn = class {
|
|
1595
1602
|
constructor(e, t) {
|
|
1596
1603
|
this.handlers = {}, this.stopRequested = !1, this.tokens = e, this.parseToken = t;
|
|
1597
1604
|
}
|
|
@@ -1615,58 +1622,58 @@ var I = class {
|
|
|
1615
1622
|
stop() {
|
|
1616
1623
|
return this.stopRequested = !0, this;
|
|
1617
1624
|
}
|
|
1618
|
-
},
|
|
1625
|
+
}, En = class {
|
|
1619
1626
|
constructor(e) {
|
|
1620
1627
|
this.token = e;
|
|
1621
1628
|
}
|
|
1622
|
-
},
|
|
1629
|
+
}, R = class extends En {
|
|
1623
1630
|
constructor(e, t, n) {
|
|
1624
1631
|
super(e), this.name = e.name, this.liquid = n, this.tokenizer = e.tokenizer;
|
|
1625
1632
|
}
|
|
1626
|
-
},
|
|
1633
|
+
}, z = class {
|
|
1627
1634
|
constructor(e, t) {
|
|
1628
1635
|
this.hash = {};
|
|
1629
|
-
let n = e instanceof
|
|
1636
|
+
let n = e instanceof L ? e : new L(e, {});
|
|
1630
1637
|
for (let e of n.readHashes(t)) this.hash[e.name.content] = e.value;
|
|
1631
1638
|
}
|
|
1632
1639
|
*render(e) {
|
|
1633
1640
|
let t = {};
|
|
1634
|
-
for (let n of Object.keys(this.hash)) t[n] = this.hash[n] === void 0 ? !0 : yield
|
|
1641
|
+
for (let n of Object.keys(this.hash)) t[n] = this.hash[n] === void 0 ? !0 : yield j(this.hash[n], e);
|
|
1635
1642
|
return t;
|
|
1636
1643
|
}
|
|
1637
1644
|
};
|
|
1638
|
-
function
|
|
1639
|
-
return class extends
|
|
1645
|
+
function Dn(e) {
|
|
1646
|
+
return class extends R {
|
|
1640
1647
|
constructor(t, n, r) {
|
|
1641
1648
|
super(t, n, r), o(e.parse) && e.parse.call(this, t, n);
|
|
1642
1649
|
}
|
|
1643
1650
|
*render(t, n) {
|
|
1644
|
-
let r = yield new
|
|
1651
|
+
let r = yield new z(this.token.args, t.opts.keyValueSeparator).render(t);
|
|
1645
1652
|
return yield e.render.call(this, t, n, r);
|
|
1646
1653
|
}
|
|
1647
1654
|
};
|
|
1648
1655
|
}
|
|
1649
|
-
function
|
|
1650
|
-
return
|
|
1656
|
+
function On(e) {
|
|
1657
|
+
return g(e);
|
|
1651
1658
|
}
|
|
1652
|
-
var
|
|
1659
|
+
var kn = class {
|
|
1653
1660
|
constructor(e, t, n) {
|
|
1654
|
-
this.token = e, this.name = e.name, this.handler = o(t) ? t : o(t?.handler) ? t.handler :
|
|
1661
|
+
this.token = e, this.name = e.name, this.handler = o(t) ? t : o(t?.handler) ? t.handler : ue, this.raw = !o(t) && !!t?.raw, this.args = e.args, this.liquid = n;
|
|
1655
1662
|
}
|
|
1656
1663
|
*render(e, t) {
|
|
1657
1664
|
let n = [];
|
|
1658
|
-
for (let e of this.args)
|
|
1665
|
+
for (let e of this.args) On(e) ? n.push([e[0], yield j(e[1], t)]) : n.push(yield j(e, t));
|
|
1659
1666
|
return yield this.handler.apply({
|
|
1660
1667
|
context: t,
|
|
1661
1668
|
token: this.token,
|
|
1662
1669
|
liquid: this.liquid
|
|
1663
1670
|
}, [e, ...n]);
|
|
1664
1671
|
}
|
|
1665
|
-
},
|
|
1672
|
+
}, B = class {
|
|
1666
1673
|
constructor(e, t) {
|
|
1667
1674
|
this.filters = [];
|
|
1668
|
-
let n = typeof e == "string" ? new
|
|
1669
|
-
this.initial = n.initial, this.filters = n.filters.map((e) => new
|
|
1675
|
+
let n = typeof e == "string" ? new L(e, t.options.operators).readFilteredValue() : e;
|
|
1676
|
+
this.initial = n.initial, this.filters = n.filters.map((e) => new kn(e, this.getFilter(t, e.name), t));
|
|
1670
1677
|
}
|
|
1671
1678
|
*value(e, t) {
|
|
1672
1679
|
t ||= e.opts.lenientIf && this.filters.length > 0 && this.filters[0].name === "default";
|
|
@@ -1676,17 +1683,17 @@ var On = class {
|
|
|
1676
1683
|
}
|
|
1677
1684
|
getFilter(e, t) {
|
|
1678
1685
|
let n = e.filters[t];
|
|
1679
|
-
return
|
|
1686
|
+
return w(n || !e.options.strictFilters, () => `undefined filter: ${t}`), n;
|
|
1680
1687
|
}
|
|
1681
|
-
},
|
|
1688
|
+
}, An = class extends En {
|
|
1682
1689
|
constructor(e, t) {
|
|
1683
1690
|
super(e);
|
|
1684
|
-
let n = new
|
|
1685
|
-
this.value = new
|
|
1691
|
+
let n = new L(e.input, t.options.operators, e.file, e.contentRange);
|
|
1692
|
+
this.value = new B(n.readFilteredValue(), t);
|
|
1686
1693
|
let r = this.value.filters, i = t.options.outputEscape;
|
|
1687
1694
|
if (!r[r.length - 1]?.raw && i) {
|
|
1688
1695
|
let e = new Tt(toString.call(i), [], "", 0, 0);
|
|
1689
|
-
r.push(new
|
|
1696
|
+
r.push(new kn(e, i, t));
|
|
1690
1697
|
}
|
|
1691
1698
|
}
|
|
1692
1699
|
*render(e, t) {
|
|
@@ -1696,19 +1703,19 @@ var On = class {
|
|
|
1696
1703
|
*arguments() {
|
|
1697
1704
|
yield this.value;
|
|
1698
1705
|
}
|
|
1699
|
-
},
|
|
1706
|
+
}, jn = class extends En {
|
|
1700
1707
|
constructor(e) {
|
|
1701
1708
|
super(e), this.str = e.getContent();
|
|
1702
1709
|
}
|
|
1703
1710
|
*render(e, t) {
|
|
1704
1711
|
t.write(this.str);
|
|
1705
1712
|
}
|
|
1706
|
-
},
|
|
1713
|
+
}, V = class e {
|
|
1707
1714
|
constructor(e, t) {
|
|
1708
1715
|
this.segments = e, this.location = t;
|
|
1709
1716
|
}
|
|
1710
1717
|
toString() {
|
|
1711
|
-
return
|
|
1718
|
+
return Bn(this.segments, !0);
|
|
1712
1719
|
}
|
|
1713
1720
|
toArray() {
|
|
1714
1721
|
function* t(...n) {
|
|
@@ -1716,16 +1723,16 @@ var On = class {
|
|
|
1716
1723
|
}
|
|
1717
1724
|
return Array.from(t(...this.segments));
|
|
1718
1725
|
}
|
|
1719
|
-
},
|
|
1726
|
+
}, Mn = class {
|
|
1720
1727
|
constructor() {
|
|
1721
1728
|
this.map = /* @__PURE__ */ new Map();
|
|
1722
1729
|
}
|
|
1723
1730
|
get(e) {
|
|
1724
|
-
let t =
|
|
1731
|
+
let t = Bn([e.segments[0]]);
|
|
1725
1732
|
return this.map.has(t) || this.map.set(t, []), this.map.get(t);
|
|
1726
1733
|
}
|
|
1727
1734
|
has(e) {
|
|
1728
|
-
return this.map.has(
|
|
1735
|
+
return this.map.has(Bn([e.segments[0]]));
|
|
1729
1736
|
}
|
|
1730
1737
|
push(e) {
|
|
1731
1738
|
this.get(e).push(e);
|
|
@@ -1733,9 +1740,9 @@ var On = class {
|
|
|
1733
1740
|
asObject() {
|
|
1734
1741
|
return Object.fromEntries(this.map);
|
|
1735
1742
|
}
|
|
1736
|
-
},
|
|
1737
|
-
function*
|
|
1738
|
-
let r = new
|
|
1743
|
+
}, Nn = { partials: !0 };
|
|
1744
|
+
function* Pn(e, t, n) {
|
|
1745
|
+
let r = new Mn(), i = new Mn(), o = new Mn(), s = new Fn(/* @__PURE__ */ new Set()), c = /* @__PURE__ */ new Set();
|
|
1739
1746
|
function l(e, t) {
|
|
1740
1747
|
r.push(e);
|
|
1741
1748
|
let n = t.alias(e);
|
|
@@ -1746,14 +1753,14 @@ function* Nn(e, t, n) {
|
|
|
1746
1753
|
let n = e.segments[0];
|
|
1747
1754
|
a(n) && !t.has(n) && i.push(e);
|
|
1748
1755
|
}
|
|
1749
|
-
for (let n of e.segments) n instanceof
|
|
1756
|
+
for (let n of e.segments) n instanceof V && l(n, t);
|
|
1750
1757
|
}
|
|
1751
1758
|
function* u(e, r) {
|
|
1752
|
-
if (e.arguments) for (let t of e.arguments()) for (let e of
|
|
1759
|
+
if (e.arguments) for (let t of e.arguments()) for (let e of In(t)) l(e, r);
|
|
1753
1760
|
if (e.localScope) for (let t of e.localScope()) {
|
|
1754
1761
|
r.add(t.content), r.deleteAlias(t.content);
|
|
1755
1762
|
let [e, n] = t.getPosition();
|
|
1756
|
-
o.push(new
|
|
1763
|
+
o.push(new V([t.content], {
|
|
1757
1764
|
row: e,
|
|
1758
1765
|
col: n,
|
|
1759
1766
|
file: t.file
|
|
@@ -1766,12 +1773,12 @@ function* Nn(e, t, n) {
|
|
|
1766
1773
|
return;
|
|
1767
1774
|
}
|
|
1768
1775
|
if (c.has(i.name)) return;
|
|
1769
|
-
let o = /* @__PURE__ */ new Set(), s = i.isolated ? new
|
|
1776
|
+
let o = /* @__PURE__ */ new Set(), s = i.isolated ? new Fn(o) : r.push(o);
|
|
1770
1777
|
for (let e of i.scope) if (a(e)) o.add(e);
|
|
1771
1778
|
else {
|
|
1772
1779
|
let [t, n] = e;
|
|
1773
1780
|
o.add(t);
|
|
1774
|
-
let r = Array.from(
|
|
1781
|
+
let r = Array.from(In(n));
|
|
1775
1782
|
r.length && s.setAlias(t, r[0].segments);
|
|
1776
1783
|
}
|
|
1777
1784
|
for (let r of yield e.children(t, n)) yield u(r, s), c.add(i.name);
|
|
@@ -1789,13 +1796,13 @@ function* Nn(e, t, n) {
|
|
|
1789
1796
|
locals: o.asObject()
|
|
1790
1797
|
};
|
|
1791
1798
|
}
|
|
1792
|
-
function V(e, t = {}) {
|
|
1793
|
-
return D(Nn(e, Object.assign(Object.assign({}, Mn), t).partials, !1));
|
|
1794
|
-
}
|
|
1795
1799
|
function H(e, t = {}) {
|
|
1796
|
-
return O(
|
|
1800
|
+
return O(Pn(e, Object.assign(Object.assign({}, Nn), t).partials, !1));
|
|
1801
|
+
}
|
|
1802
|
+
function U(e, t = {}) {
|
|
1803
|
+
return k(Pn(e, Object.assign(Object.assign({}, Nn), t).partials, !0));
|
|
1797
1804
|
}
|
|
1798
|
-
var
|
|
1805
|
+
var Fn = class {
|
|
1799
1806
|
constructor(e) {
|
|
1800
1807
|
this.stack = [{
|
|
1801
1808
|
names: e,
|
|
@@ -1822,7 +1829,7 @@ var Pn = class {
|
|
|
1822
1829
|
let t = e.segments[0];
|
|
1823
1830
|
if (!a(t)) return;
|
|
1824
1831
|
let n = this.getAlias(t);
|
|
1825
|
-
if (n !== void 0) return new
|
|
1832
|
+
if (n !== void 0) return new V([...n, ...e.segments.slice(1)], e.location);
|
|
1826
1833
|
}
|
|
1827
1834
|
setAlias(e, t) {
|
|
1828
1835
|
this.stack[this.stack.length - 1].aliases.set(e, t);
|
|
@@ -1837,43 +1844,43 @@ var Pn = class {
|
|
|
1837
1844
|
}
|
|
1838
1845
|
}
|
|
1839
1846
|
};
|
|
1840
|
-
function* Fn(e) {
|
|
1841
|
-
Y(e) ? yield* U(e) : e instanceof z && (yield* In(e));
|
|
1842
|
-
}
|
|
1843
1847
|
function* In(e) {
|
|
1844
|
-
|
|
1845
|
-
|
|
1848
|
+
Y(e) ? yield* W(e) : e instanceof B && (yield* Ln(e));
|
|
1849
|
+
}
|
|
1850
|
+
function* Ln(e) {
|
|
1851
|
+
for (let t of e.initial.postfix) Y(t) && (yield* W(t));
|
|
1852
|
+
for (let t of e.filters) for (let e of t.args) On(e) && e[1] ? yield* W(e[1]) : Y(e) && (yield* W(e));
|
|
1846
1853
|
}
|
|
1847
|
-
function*
|
|
1848
|
-
|
|
1854
|
+
function* W(e) {
|
|
1855
|
+
Xn(e) ? (yield* W(e.lhs), yield* W(e.rhs)) : Jn(e) && (yield Rn(e));
|
|
1849
1856
|
}
|
|
1850
|
-
function
|
|
1857
|
+
function Rn(e) {
|
|
1851
1858
|
let t = [], n = e.file, r = e.props[0];
|
|
1852
|
-
n ||= r.file,
|
|
1853
|
-
for (let r of e.props.slice(1)) n ||= r.file,
|
|
1859
|
+
n ||= r.file, Kn(r) || qn(r) || Yn(r) ? t.push(r.content) : Jn(r) && t.push(...Rn(r).segments);
|
|
1860
|
+
for (let r of e.props.slice(1)) n ||= r.file, Kn(r) || qn(r) || Yn(r) ? t.push(r.content) : Jn(r) && t.push(Rn(r));
|
|
1854
1861
|
let [i, a] = e.getPosition();
|
|
1855
|
-
return new
|
|
1862
|
+
return new V(t, {
|
|
1856
1863
|
row: i,
|
|
1857
1864
|
col: a,
|
|
1858
1865
|
file: n
|
|
1859
1866
|
});
|
|
1860
1867
|
}
|
|
1861
|
-
var
|
|
1862
|
-
function
|
|
1868
|
+
var zn = /^[\u0080-\uFFFFa-zA-Z_][\u0080-\uFFFFa-zA-Z0-9_-]*$/;
|
|
1869
|
+
function Bn(e, t = !1) {
|
|
1863
1870
|
let n = [], r = e[0];
|
|
1864
|
-
a(r) && (!t || r.match(
|
|
1865
|
-
for (let t of e.slice(1)) t instanceof
|
|
1871
|
+
a(r) && (!t || r.match(zn) ? n.push(`${r}`) : n.push(`['${r}']`));
|
|
1872
|
+
for (let t of e.slice(1)) t instanceof V ? n.push(`[${Bn(t.segments)}]`) : a(t) ? t.match(zn) ? n.push(`.${t}`) : n.push(`['${t}']`) : n.push(`[${t}]`);
|
|
1866
1873
|
return n.join("");
|
|
1867
1874
|
}
|
|
1868
1875
|
var G;
|
|
1869
1876
|
(function(e) {
|
|
1870
1877
|
e.Partials = "partials", e.Layouts = "layouts", e.Root = "root";
|
|
1871
1878
|
})(G ||= {});
|
|
1872
|
-
var
|
|
1879
|
+
var Vn = class {
|
|
1873
1880
|
constructor(e) {
|
|
1874
1881
|
if (this.options = e, e.relativeReference) {
|
|
1875
1882
|
let t = e.fs.sep;
|
|
1876
|
-
|
|
1883
|
+
w(t, "`fs.sep` is required for relative reference");
|
|
1877
1884
|
let n = [
|
|
1878
1885
|
"." + t,
|
|
1879
1886
|
".." + t,
|
|
@@ -1883,9 +1890,9 @@ var zn = class {
|
|
|
1883
1890
|
this.shouldLoadRelative = (e) => n.some((t) => e.startsWith(t));
|
|
1884
1891
|
} else this.shouldLoadRelative = (e) => !1;
|
|
1885
1892
|
let t = e.fs;
|
|
1886
|
-
this.contains = Ke(t.contains?.bind(t) || (() =>
|
|
1893
|
+
this.contains = Ke(t.contains?.bind(t) || (() => D(this, void 0, void 0, function* () {
|
|
1887
1894
|
return !0;
|
|
1888
|
-
})), t.containsSync?.bind(t) || (() => !0)), this.exists = Ke(t.exists?.bind(t) || (() =>
|
|
1895
|
+
})), t.containsSync?.bind(t) || (() => !0)), this.exists = Ke(t.exists?.bind(t) || (() => D(this, void 0, void 0, function* () {
|
|
1889
1896
|
return !1;
|
|
1890
1897
|
})), t.existsSync?.bind(t));
|
|
1891
1898
|
}
|
|
@@ -1912,7 +1919,7 @@ var zn = class {
|
|
|
1912
1919
|
}
|
|
1913
1920
|
dirname(e) {
|
|
1914
1921
|
let t = this.options.fs;
|
|
1915
|
-
return
|
|
1922
|
+
return w(t.dirname, "`fs.dirname` is required for relative reference"), t.dirname(e);
|
|
1916
1923
|
}
|
|
1917
1924
|
lookupError(e, t) {
|
|
1918
1925
|
let n = /* @__PURE__ */ Error("ENOENT");
|
|
@@ -1920,13 +1927,13 @@ var zn = class {
|
|
|
1920
1927
|
}
|
|
1921
1928
|
}, K = class {
|
|
1922
1929
|
constructor(e) {
|
|
1923
|
-
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
|
|
1930
|
+
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 Vn(this.liquid.options), this.parseLimit = new pt("parse length", e.options.parseLimit), this.readFile = Ke(this.fs.readFile?.bind(this.fs) || (() => D(this, void 0, void 0, function* () {
|
|
1924
1931
|
throw Error("readFile not implemented");
|
|
1925
1932
|
})), this.fs.readFileSync?.bind(this.fs));
|
|
1926
1933
|
}
|
|
1927
1934
|
parse(e, t) {
|
|
1928
1935
|
e = String(e), this.parseLimit.use(e.length);
|
|
1929
|
-
let n = new
|
|
1936
|
+
let n = new L(e, this.liquid.options.operators, t).readTopLevelTokens(this.liquid.options);
|
|
1930
1937
|
return this.parseTokens(n);
|
|
1931
1938
|
}
|
|
1932
1939
|
parseTokens(e) {
|
|
@@ -1937,27 +1944,27 @@ var zn = class {
|
|
|
1937
1944
|
if (this.liquid.options.catchAllErrors) r.push(e);
|
|
1938
1945
|
else throw e;
|
|
1939
1946
|
}
|
|
1940
|
-
if (r.length) throw new
|
|
1947
|
+
if (r.length) throw new be(r);
|
|
1941
1948
|
return n;
|
|
1942
1949
|
}
|
|
1943
1950
|
parseToken(e, t) {
|
|
1944
1951
|
try {
|
|
1945
1952
|
if (J(e)) {
|
|
1946
1953
|
let n = this.liquid.tags[e.name];
|
|
1947
|
-
return
|
|
1954
|
+
return w(n, `tag "${e.name}" not found`), new n(e, t, this.liquid, this);
|
|
1948
1955
|
}
|
|
1949
|
-
return
|
|
1956
|
+
return Gn(e) ? new An(e, this.liquid) : new jn(e);
|
|
1950
1957
|
} catch (t) {
|
|
1951
|
-
throw
|
|
1958
|
+
throw x.is(t) ? t : new ve(t, e);
|
|
1952
1959
|
}
|
|
1953
1960
|
}
|
|
1954
1961
|
parseStream(e) {
|
|
1955
|
-
return new
|
|
1962
|
+
return new Tn(e, (e, t) => this.parseToken(e, t));
|
|
1956
1963
|
}
|
|
1957
1964
|
*_parseFileCached(e, t, n = G.Root, r) {
|
|
1958
1965
|
let i = this.cache, a = this.loader.shouldLoadRelative(e) ? r + "," + e : n + ":" + e, o = yield i.read(a);
|
|
1959
1966
|
if (o) return o;
|
|
1960
|
-
let s = this._parseFile(e, t, n, r), c = t ? yield s :
|
|
1967
|
+
let s = this._parseFile(e, t, n, r), c = t ? yield s : O(s);
|
|
1961
1968
|
i.write(a, c);
|
|
1962
1969
|
try {
|
|
1963
1970
|
return yield c;
|
|
@@ -1973,34 +1980,34 @@ var zn = class {
|
|
|
1973
1980
|
(function(e) {
|
|
1974
1981
|
e[e.Number = 1] = "Number", e[e.Literal = 2] = "Literal", e[e.Tag = 4] = "Tag", e[e.Output = 8] = "Output", e[e.HTML = 16] = "HTML", e[e.Filter = 32] = "Filter", e[e.Hash = 64] = "Hash", e[e.PropertyAccess = 128] = "PropertyAccess", e[e.Word = 256] = "Word", e[e.Range = 512] = "Range", e[e.Quoted = 1024] = "Quoted", e[e.Operator = 2048] = "Operator", e[e.FilteredValue = 4096] = "FilteredValue", e[e.Delimited = 12] = "Delimited";
|
|
1975
1982
|
})(q ||= {});
|
|
1976
|
-
function
|
|
1983
|
+
function Hn(e) {
|
|
1977
1984
|
return !!(X(e) & q.Delimited);
|
|
1978
1985
|
}
|
|
1979
|
-
function
|
|
1986
|
+
function Un(e) {
|
|
1980
1987
|
return X(e) === q.Operator;
|
|
1981
1988
|
}
|
|
1982
|
-
function
|
|
1989
|
+
function Wn(e) {
|
|
1983
1990
|
return X(e) === q.HTML;
|
|
1984
1991
|
}
|
|
1985
|
-
function
|
|
1992
|
+
function Gn(e) {
|
|
1986
1993
|
return X(e) === q.Output;
|
|
1987
1994
|
}
|
|
1988
1995
|
function J(e) {
|
|
1989
1996
|
return X(e) === q.Tag;
|
|
1990
1997
|
}
|
|
1991
|
-
function
|
|
1998
|
+
function Kn(e) {
|
|
1992
1999
|
return X(e) === q.Quoted;
|
|
1993
2000
|
}
|
|
1994
|
-
function
|
|
2001
|
+
function qn(e) {
|
|
1995
2002
|
return X(e) === q.Number;
|
|
1996
2003
|
}
|
|
1997
|
-
function
|
|
2004
|
+
function Jn(e) {
|
|
1998
2005
|
return X(e) === q.PropertyAccess;
|
|
1999
2006
|
}
|
|
2000
|
-
function
|
|
2007
|
+
function Yn(e) {
|
|
2001
2008
|
return X(e) === q.Word;
|
|
2002
2009
|
}
|
|
2003
|
-
function
|
|
2010
|
+
function Xn(e) {
|
|
2004
2011
|
return X(e) === q.Range;
|
|
2005
2012
|
}
|
|
2006
2013
|
function Y(e) {
|
|
@@ -2014,8 +2021,8 @@ function Z(e) {
|
|
|
2014
2021
|
return e && Object.assign(t, e), t;
|
|
2015
2022
|
}
|
|
2016
2023
|
var Q = class e {
|
|
2017
|
-
constructor(e = {}, t =
|
|
2018
|
-
this.scopes = [Z()], this.registers = {}, this.breakCalled = !1, this.continueCalled = !1, this.sync = !!n.sync, this.opts = t, this.globals = n.globals ?? t.globals, this.environments =
|
|
2024
|
+
constructor(e = {}, t = F, n = {}, { memoryLimit: r, renderLimit: i } = {}) {
|
|
2025
|
+
this.scopes = [Z()], this.registers = {}, this.breakCalled = !1, this.continueCalled = !1, this.sync = !!n.sync, this.opts = t, this.globals = n.globals ?? t.globals, this.environments = _(e) ? e : Object(e), this.strictVariables = n.strictVariables ?? this.opts.strictVariables, this.ownPropertyOnly = n.ownPropertyOnly ?? t.ownPropertyOnly, this.memoryLimit = r ?? new pt("memory alloc", n.memoryLimit ?? t.memoryLimit), this.renderLimit = i ?? new pt("template render", Lt().now() + (n.renderLimit ?? t.renderLimit));
|
|
2019
2026
|
}
|
|
2020
2027
|
getRegister(e, t = void 0) {
|
|
2021
2028
|
return this.registers[e] = this.registers[e] || t;
|
|
@@ -2040,18 +2047,18 @@ var Q = class e {
|
|
|
2040
2047
|
return this.getSync(e);
|
|
2041
2048
|
}
|
|
2042
2049
|
getSync(e) {
|
|
2043
|
-
return
|
|
2050
|
+
return k(this._get(e));
|
|
2044
2051
|
}
|
|
2045
2052
|
*_get(e) {
|
|
2046
2053
|
let t = this.findScope(e[0]);
|
|
2047
2054
|
return yield this._getFromScope(t, e);
|
|
2048
2055
|
}
|
|
2049
2056
|
getFromScope(e, t) {
|
|
2050
|
-
return
|
|
2057
|
+
return k(this._getFromScope(e, t));
|
|
2051
2058
|
}
|
|
2052
2059
|
*_getFromScope(e, t, n = this.strictVariables) {
|
|
2053
2060
|
a(t) && (t = t.split("."));
|
|
2054
|
-
for (let r = 0; r < t.length; r++) if (e = yield this.readProperty(e, t[r]), n &&
|
|
2061
|
+
for (let r = 0; r < t.length; r++) if (e = yield this.readProperty(e, t[r]), n && ne(e)) throw new Se(t.slice(0, r + 1).join("."));
|
|
2055
2062
|
return e;
|
|
2056
2063
|
}
|
|
2057
2064
|
push(e) {
|
|
@@ -2082,151 +2089,156 @@ var Q = class e {
|
|
|
2082
2089
|
return e in this.environments ? this.environments : this.globals;
|
|
2083
2090
|
}
|
|
2084
2091
|
readProperty(e, n) {
|
|
2085
|
-
if (e =
|
|
2086
|
-
if (
|
|
2087
|
-
let r =
|
|
2088
|
-
return r === void 0 && e instanceof t ? e.liquidMethodMissing(n, this) : o(r) ? r.call(e) : n === "size" ?
|
|
2092
|
+
if (e = te(e), n = p(n), h(e)) return e;
|
|
2093
|
+
if (g(e) && m(n)) return u(e, n, this.ownPropertyOnly);
|
|
2094
|
+
let r = Zn(e, n, this.ownPropertyOnly);
|
|
2095
|
+
return r === void 0 && e instanceof t ? e.liquidMethodMissing(n, this) : o(r) ? r.call(e) : n === "size" ? er(e) : n === "first" ? Qn(e, this.ownPropertyOnly) : n === "last" ? $n(e, this.ownPropertyOnly) : r;
|
|
2089
2096
|
}
|
|
2090
2097
|
};
|
|
2091
|
-
function
|
|
2098
|
+
function Zn(e, n, r) {
|
|
2092
2099
|
if (!(r && !i.call(e, n) && !(e instanceof t))) return e[n];
|
|
2093
2100
|
}
|
|
2094
|
-
function
|
|
2095
|
-
return
|
|
2101
|
+
function Qn(e, t) {
|
|
2102
|
+
return g(e) ? u(e, 0, t) : Zn(e, "first", t);
|
|
2096
2103
|
}
|
|
2097
|
-
function
|
|
2098
|
-
return
|
|
2104
|
+
function $n(e, t) {
|
|
2105
|
+
return g(e) ? u(e, -1, t) : Zn(e, "last", t);
|
|
2099
2106
|
}
|
|
2100
|
-
function
|
|
2107
|
+
function er(e) {
|
|
2101
2108
|
if (i.call(e, "size") || e.size !== void 0) return e.size;
|
|
2102
|
-
if (
|
|
2109
|
+
if (g(e) || a(e)) return e.length;
|
|
2103
2110
|
if (typeof e == "object") return Object.keys(e).length;
|
|
2104
2111
|
}
|
|
2105
2112
|
var $;
|
|
2106
2113
|
(function(e) {
|
|
2107
2114
|
e[e.OUTPUT = 0] = "OUTPUT", e[e.STORE = 1] = "STORE";
|
|
2108
2115
|
})($ ||= {});
|
|
2109
|
-
var
|
|
2110
|
-
function
|
|
2116
|
+
var tr = y(Math.abs), nr = y(Math.max), rr = y(Math.min), ir = y(Math.ceil), ar = y((e, t, n = !1) => n ? Math.floor(e / t) : e / t), or = y(Math.floor), sr = y((e, t) => e - t), cr = y((e, t) => e + t), lr = y((e, t) => (e % t + t) % t), ur = y((e, t) => e * t);
|
|
2117
|
+
function dr(e, t = 0) {
|
|
2111
2118
|
e = ee(e), t = ee(t);
|
|
2112
2119
|
let n = 10 ** t, r = e * n * (1 + 2 ** -52);
|
|
2113
2120
|
return Math.round(r) / n;
|
|
2114
2121
|
}
|
|
2115
|
-
var
|
|
2122
|
+
var fr = /*#__PURE__*/ Object.freeze({
|
|
2116
2123
|
__proto__: null,
|
|
2117
|
-
abs:
|
|
2118
|
-
at_least:
|
|
2119
|
-
at_most:
|
|
2120
|
-
ceil:
|
|
2121
|
-
divided_by:
|
|
2122
|
-
floor:
|
|
2123
|
-
minus:
|
|
2124
|
-
plus:
|
|
2125
|
-
modulo:
|
|
2126
|
-
times:
|
|
2127
|
-
round:
|
|
2128
|
-
}),
|
|
2124
|
+
abs: tr,
|
|
2125
|
+
at_least: nr,
|
|
2126
|
+
at_most: rr,
|
|
2127
|
+
ceil: ir,
|
|
2128
|
+
divided_by: ar,
|
|
2129
|
+
floor: or,
|
|
2130
|
+
minus: sr,
|
|
2131
|
+
plus: cr,
|
|
2132
|
+
modulo: lr,
|
|
2133
|
+
times: ur,
|
|
2134
|
+
round: dr
|
|
2135
|
+
}), pr = (e) => decodeURIComponent(l(e)).replace(/\+/g, " "), mr = (e) => encodeURIComponent(l(e)).replace(/%20/g, "+"), hr = (e) => encodeURIComponent(l(e)).replace(/%20/g, "+").replace(/[!'()*]/g, (e) => "%" + e.charCodeAt(0).toString(16).toUpperCase()), gr = (e) => encodeURI(l(e)).replace(/%5B/g, "[").replace(/%5D/g, "]"), _r = /[^\p{M}\p{L}\p{Nd}]+/gu, vr = {
|
|
2129
2136
|
raw: /\s+/g,
|
|
2130
|
-
default:
|
|
2137
|
+
default: _r,
|
|
2131
2138
|
pretty: /[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/gu,
|
|
2132
2139
|
ascii: /[^A-Za-z0-9]+/g,
|
|
2133
|
-
latin:
|
|
2140
|
+
latin: _r,
|
|
2134
2141
|
none: null
|
|
2135
2142
|
};
|
|
2136
|
-
function
|
|
2143
|
+
function yr(e, t = "default", n = !1) {
|
|
2137
2144
|
e = l(e);
|
|
2138
|
-
let r =
|
|
2139
|
-
return r && (t === "latin" && (e =
|
|
2145
|
+
let r = vr[t];
|
|
2146
|
+
return r && (t === "latin" && (e = br(e)), e = e.replace(r, "-").replace(/^-|-$/g, "")), n ? e : e.toLowerCase();
|
|
2140
2147
|
}
|
|
2141
|
-
function
|
|
2148
|
+
function br(e) {
|
|
2142
2149
|
return e.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");
|
|
2143
2150
|
}
|
|
2144
|
-
var
|
|
2151
|
+
var xr = /*#__PURE__*/ Object.freeze({
|
|
2145
2152
|
__proto__: null,
|
|
2146
|
-
url_decode:
|
|
2147
|
-
url_encode:
|
|
2148
|
-
cgi_escape:
|
|
2149
|
-
uri_escape:
|
|
2150
|
-
slugify:
|
|
2151
|
-
}),
|
|
2152
|
-
let n =
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2153
|
+
url_decode: pr,
|
|
2154
|
+
url_encode: mr,
|
|
2155
|
+
cgi_escape: hr,
|
|
2156
|
+
uri_escape: gr,
|
|
2157
|
+
slugify: yr
|
|
2158
|
+
}), Sr = he(function(e, t) {
|
|
2159
|
+
let n = f(e), r = h(t) ? " " : l(t), i = r.length * Math.max(n.length - 1, 0);
|
|
2160
|
+
for (let e = 0; e < n.length; e++) i += String(n[e]).length;
|
|
2161
|
+
return this.context.memoryLimit.use(i), Array.prototype.join.call(n, r);
|
|
2162
|
+
}), Cr = he(function(e) {
|
|
2163
|
+
return re(e) ? u(e, -1, this.context.ownPropertyOnly) : "";
|
|
2164
|
+
}), wr = he(function(e) {
|
|
2165
|
+
return re(e) ? u(e, 0, this.context.ownPropertyOnly) : "";
|
|
2166
|
+
}), Tr = he(function(e) {
|
|
2167
|
+
let t = f(e);
|
|
2156
2168
|
return this.context.memoryLimit.use(t.length), [...t].reverse();
|
|
2157
2169
|
});
|
|
2158
|
-
function*
|
|
2159
|
-
let r = [], i =
|
|
2170
|
+
function* Er(e, t, n) {
|
|
2171
|
+
let r = [], i = f(e);
|
|
2160
2172
|
this.context.memoryLimit.use(i.length);
|
|
2161
2173
|
for (let e of i) r.push([e, t ? yield this.context._getFromScope(e, l(t).split("."), !1) : e]);
|
|
2162
2174
|
return r.sort((e, t) => n(e[1], t[1])).map((e) => e[0]);
|
|
2163
2175
|
}
|
|
2164
|
-
function*
|
|
2165
|
-
return yield*
|
|
2166
|
-
}
|
|
2167
|
-
function* Er(e, t) {
|
|
2168
|
-
return yield* wr.call(this, e, t, he);
|
|
2176
|
+
function* Dr(e, t) {
|
|
2177
|
+
return yield* Er.call(this, e, t, pe);
|
|
2169
2178
|
}
|
|
2170
|
-
var Dr = (e) => e && e.length || 0;
|
|
2171
2179
|
function* Or(e, t) {
|
|
2172
|
-
|
|
2180
|
+
return yield* Er.call(this, e, t, me);
|
|
2181
|
+
}
|
|
2182
|
+
var kr = (e) => e && e.length || 0;
|
|
2183
|
+
function* Ar(e, t) {
|
|
2184
|
+
let n = [], r = f(e);
|
|
2173
2185
|
this.context.memoryLimit.use(r.length);
|
|
2174
2186
|
for (let e of r) n.push(yield this.context._getFromScope(e, l(t), !1));
|
|
2175
2187
|
return n;
|
|
2176
2188
|
}
|
|
2177
|
-
function*
|
|
2178
|
-
let n = 0, r =
|
|
2189
|
+
function* jr(e, t) {
|
|
2190
|
+
let n = 0, r = f(e);
|
|
2179
2191
|
for (let e of r) {
|
|
2180
2192
|
let r = Number(t ? yield this.context._getFromScope(e, l(t), !1) : e);
|
|
2181
2193
|
n += Number.isNaN(r) ? 0 : r;
|
|
2182
2194
|
}
|
|
2183
2195
|
return n;
|
|
2184
2196
|
}
|
|
2185
|
-
function
|
|
2186
|
-
let t =
|
|
2187
|
-
return this.context.memoryLimit.use(t.length),
|
|
2197
|
+
function Mr(e) {
|
|
2198
|
+
let t = f(e);
|
|
2199
|
+
return this.context.memoryLimit.use(t.length), Array.prototype.filter.call(t, (e) => !h(p(e)));
|
|
2188
2200
|
}
|
|
2189
|
-
function
|
|
2190
|
-
let n =
|
|
2191
|
-
return this.context.memoryLimit.use(n.length + r.length),
|
|
2201
|
+
function Nr(e, t = []) {
|
|
2202
|
+
let n = f(e), r = f(t);
|
|
2203
|
+
return this.context.memoryLimit.use(n.length + r.length), Array.prototype.concat.call(n, r);
|
|
2192
2204
|
}
|
|
2193
|
-
function
|
|
2194
|
-
return
|
|
2205
|
+
function Pr(e, t) {
|
|
2206
|
+
return Nr.call(this, e, [t]);
|
|
2195
2207
|
}
|
|
2196
|
-
function
|
|
2197
|
-
let n =
|
|
2208
|
+
function Fr(e, t) {
|
|
2209
|
+
let n = f(e);
|
|
2198
2210
|
this.context.memoryLimit.use(n.length);
|
|
2199
2211
|
let r = [...n];
|
|
2200
2212
|
return r.unshift(t), r;
|
|
2201
2213
|
}
|
|
2202
|
-
function
|
|
2203
|
-
let t =
|
|
2214
|
+
function Ir(e) {
|
|
2215
|
+
let t = f(e);
|
|
2204
2216
|
this.context.memoryLimit.use(t.length);
|
|
2205
2217
|
let n = [...t];
|
|
2206
2218
|
return n.pop(), n;
|
|
2207
2219
|
}
|
|
2208
|
-
function
|
|
2209
|
-
let t =
|
|
2220
|
+
function Lr(e) {
|
|
2221
|
+
let t = f(e);
|
|
2210
2222
|
this.context.memoryLimit.use(t.length);
|
|
2211
2223
|
let n = [...t];
|
|
2212
2224
|
return n.shift(), n;
|
|
2213
2225
|
}
|
|
2214
|
-
function
|
|
2215
|
-
return e =
|
|
2226
|
+
function Rr(e, t, n = 1) {
|
|
2227
|
+
return e = p(e), h(e) ? [] : (g(e) || (e = l(e)), t = t < 0 ? e.length + t : t, t < 0 || n < 0 ? g(e) ? [] : "" : (this.context.memoryLimit.use(n), g(e) ? Array.prototype.slice.call(e, t, t + n) : String.prototype.slice.call(e, t, t + n)));
|
|
2216
2228
|
}
|
|
2217
|
-
function
|
|
2218
|
-
return this.context.opts.jekyllWhere ? (t) => Pe.is(e) ? N(t, e) :
|
|
2229
|
+
function zr(e) {
|
|
2230
|
+
return this.context.opts.jekyllWhere ? (t) => Pe.is(e) ? N(t, e) : g(t) ? qt(t, e) : N(t, e) : e === void 0 ? (e) => M(e, this.context) : (t) => N(t, e);
|
|
2219
2231
|
}
|
|
2220
|
-
function*
|
|
2232
|
+
function* Br(e, t, n, r) {
|
|
2221
2233
|
let i = [];
|
|
2222
|
-
t =
|
|
2223
|
-
let a = new
|
|
2224
|
-
for (let e of t) i.push(yield
|
|
2225
|
-
let o =
|
|
2226
|
-
return
|
|
2227
|
-
}
|
|
2228
|
-
function*
|
|
2229
|
-
let i = [], a = new
|
|
2234
|
+
t = f(t), this.context.memoryLimit.use(t.length);
|
|
2235
|
+
let a = new L(l(n)).readScopeValue();
|
|
2236
|
+
for (let e of t) i.push(yield j(a, this.context.spawn(e)));
|
|
2237
|
+
let o = zr.call(this, r);
|
|
2238
|
+
return Array.prototype.filter.call(t, (t, n) => o(i[n]) === e);
|
|
2239
|
+
}
|
|
2240
|
+
function* Vr(e, t, n, r) {
|
|
2241
|
+
let i = [], a = new B(l(r), this.liquid), o = f(t);
|
|
2230
2242
|
this.context.memoryLimit.use(o.length);
|
|
2231
2243
|
for (let t of o) {
|
|
2232
2244
|
this.context.push({ [n]: t });
|
|
@@ -2235,25 +2247,25 @@ function* zr(e, t, n, r) {
|
|
|
2235
2247
|
}
|
|
2236
2248
|
return i;
|
|
2237
2249
|
}
|
|
2238
|
-
function* Br(e, t, n) {
|
|
2239
|
-
return yield* Rr.call(this, !0, e, t, n);
|
|
2240
|
-
}
|
|
2241
|
-
function* Vr(e, t, n) {
|
|
2242
|
-
return yield* Rr.call(this, !1, e, t, n);
|
|
2243
|
-
}
|
|
2244
2250
|
function* Hr(e, t, n) {
|
|
2245
|
-
return yield*
|
|
2251
|
+
return yield* Br.call(this, !0, e, t, n);
|
|
2246
2252
|
}
|
|
2247
2253
|
function* Ur(e, t, n) {
|
|
2248
|
-
return yield*
|
|
2254
|
+
return yield* Br.call(this, !1, e, t, n);
|
|
2255
|
+
}
|
|
2256
|
+
function* Wr(e, t, n) {
|
|
2257
|
+
return yield* Vr.call(this, !0, e, t, n);
|
|
2249
2258
|
}
|
|
2250
|
-
function*
|
|
2259
|
+
function* Gr(e, t, n) {
|
|
2260
|
+
return yield* Vr.call(this, !1, e, t, n);
|
|
2261
|
+
}
|
|
2262
|
+
function* Kr(e, t) {
|
|
2251
2263
|
let n = /* @__PURE__ */ new Map();
|
|
2252
|
-
e =
|
|
2253
|
-
let r = new
|
|
2264
|
+
e = d(e);
|
|
2265
|
+
let r = new L(l(t)).readScopeValue();
|
|
2254
2266
|
this.context.memoryLimit.use(e.length);
|
|
2255
2267
|
for (let t of e) {
|
|
2256
|
-
let e = yield
|
|
2268
|
+
let e = yield j(r, this.context.spawn(t));
|
|
2257
2269
|
n.has(e) || n.set(e, []), n.get(e).push(t);
|
|
2258
2270
|
}
|
|
2259
2271
|
return [...n.entries()].map(([e, t]) => ({
|
|
@@ -2261,9 +2273,9 @@ function* Wr(e, t) {
|
|
|
2261
2273
|
items: t
|
|
2262
2274
|
}));
|
|
2263
2275
|
}
|
|
2264
|
-
function*
|
|
2265
|
-
let r = /* @__PURE__ */ new Map(), i = new
|
|
2266
|
-
e =
|
|
2276
|
+
function* qr(e, t, n) {
|
|
2277
|
+
let r = /* @__PURE__ */ new Map(), i = new B(l(n), this.liquid);
|
|
2278
|
+
e = d(e), this.context.memoryLimit.use(e.length);
|
|
2267
2279
|
for (let n of e) {
|
|
2268
2280
|
this.context.push({ [t]: n });
|
|
2269
2281
|
let e = yield i.value(this.context);
|
|
@@ -2274,102 +2286,102 @@ function* Gr(e, t, n) {
|
|
|
2274
2286
|
items: t
|
|
2275
2287
|
}));
|
|
2276
2288
|
}
|
|
2277
|
-
function*
|
|
2278
|
-
let r = new
|
|
2279
|
-
for (let e = 0; e < i.length; e++) if (a(yield
|
|
2289
|
+
function* Jr(e, t, n) {
|
|
2290
|
+
let r = new L(l(t)).readScopeValue(), i = f(e), a = zr.call(this, n);
|
|
2291
|
+
for (let e = 0; e < i.length; e++) if (a(yield j(r, this.context.spawn(i[e])))) return [e, i[e]];
|
|
2280
2292
|
}
|
|
2281
|
-
function*
|
|
2282
|
-
let r = new
|
|
2293
|
+
function* Yr(e, t, n) {
|
|
2294
|
+
let r = new B(l(n), this.liquid), i = f(e);
|
|
2283
2295
|
for (let e = 0; e < i.length; e++) {
|
|
2284
2296
|
this.context.push({ [t]: i[e] });
|
|
2285
2297
|
let n = yield r.value(this.context);
|
|
2286
2298
|
if (this.context.pop(), n) return [e, i[e]];
|
|
2287
2299
|
}
|
|
2288
2300
|
}
|
|
2289
|
-
function*
|
|
2290
|
-
return !!(yield*
|
|
2301
|
+
function* Xr(e, t, n) {
|
|
2302
|
+
return !!(yield* Jr.call(this, e, t, n));
|
|
2291
2303
|
}
|
|
2292
|
-
function*
|
|
2293
|
-
return !!(yield*
|
|
2304
|
+
function* Zr(e, t, n) {
|
|
2305
|
+
return !!(yield* Yr.call(this, e, t, n));
|
|
2294
2306
|
}
|
|
2295
|
-
function*
|
|
2296
|
-
let r = yield*
|
|
2307
|
+
function* Qr(e, t, n) {
|
|
2308
|
+
let r = yield* Jr.call(this, e, t, n);
|
|
2297
2309
|
return r ? r[0] : void 0;
|
|
2298
2310
|
}
|
|
2299
|
-
function*
|
|
2300
|
-
let r = yield*
|
|
2311
|
+
function* $r(e, t, n) {
|
|
2312
|
+
let r = yield* Yr.call(this, e, t, n);
|
|
2301
2313
|
return r ? r[0] : void 0;
|
|
2302
2314
|
}
|
|
2303
|
-
function*
|
|
2304
|
-
let r = yield*
|
|
2315
|
+
function* ei(e, t, n) {
|
|
2316
|
+
let r = yield* Jr.call(this, e, t, n);
|
|
2305
2317
|
return r ? r[1] : void 0;
|
|
2306
2318
|
}
|
|
2307
|
-
function*
|
|
2308
|
-
let r = yield*
|
|
2319
|
+
function* ti(e, t, n) {
|
|
2320
|
+
let r = yield* Yr.call(this, e, t, n);
|
|
2309
2321
|
return r ? r[1] : void 0;
|
|
2310
2322
|
}
|
|
2311
|
-
function
|
|
2312
|
-
return e =
|
|
2323
|
+
function ni(e) {
|
|
2324
|
+
return e = f(e), this.context.memoryLimit.use(e.length), [...new Set(e)];
|
|
2313
2325
|
}
|
|
2314
|
-
function
|
|
2315
|
-
if (e =
|
|
2316
|
-
|
|
2326
|
+
function ri(e, t = 1) {
|
|
2327
|
+
if (e = p(e), h(e)) return [];
|
|
2328
|
+
g(e) || (e = l(e)), this.context.memoryLimit.use(e.length);
|
|
2317
2329
|
let n = [...e].sort(() => Math.random() - .5);
|
|
2318
2330
|
return t === 1 ? n[0] : n.slice(0, t);
|
|
2319
2331
|
}
|
|
2320
|
-
var
|
|
2332
|
+
var ii = /*#__PURE__*/ Object.freeze({
|
|
2321
2333
|
__proto__: null,
|
|
2322
|
-
join:
|
|
2323
|
-
last:
|
|
2324
|
-
first:
|
|
2325
|
-
reverse:
|
|
2326
|
-
sort:
|
|
2327
|
-
sort_natural:
|
|
2328
|
-
size:
|
|
2329
|
-
map:
|
|
2330
|
-
sum:
|
|
2331
|
-
compact:
|
|
2332
|
-
concat:
|
|
2333
|
-
push:
|
|
2334
|
-
unshift:
|
|
2335
|
-
pop:
|
|
2336
|
-
shift:
|
|
2337
|
-
slice:
|
|
2338
|
-
where:
|
|
2339
|
-
reject:
|
|
2340
|
-
where_exp:
|
|
2341
|
-
reject_exp:
|
|
2342
|
-
group_by:
|
|
2343
|
-
group_by_exp:
|
|
2344
|
-
has:
|
|
2345
|
-
has_exp:
|
|
2346
|
-
find_index:
|
|
2347
|
-
find_index_exp:
|
|
2348
|
-
find:
|
|
2349
|
-
find_exp:
|
|
2350
|
-
uniq:
|
|
2351
|
-
sample:
|
|
2334
|
+
join: Sr,
|
|
2335
|
+
last: Cr,
|
|
2336
|
+
first: wr,
|
|
2337
|
+
reverse: Tr,
|
|
2338
|
+
sort: Dr,
|
|
2339
|
+
sort_natural: Or,
|
|
2340
|
+
size: kr,
|
|
2341
|
+
map: Ar,
|
|
2342
|
+
sum: jr,
|
|
2343
|
+
compact: Mr,
|
|
2344
|
+
concat: Nr,
|
|
2345
|
+
push: Pr,
|
|
2346
|
+
unshift: Fr,
|
|
2347
|
+
pop: Ir,
|
|
2348
|
+
shift: Lr,
|
|
2349
|
+
slice: Rr,
|
|
2350
|
+
where: Hr,
|
|
2351
|
+
reject: Ur,
|
|
2352
|
+
where_exp: Wr,
|
|
2353
|
+
reject_exp: Gr,
|
|
2354
|
+
group_by: Kr,
|
|
2355
|
+
group_by_exp: qr,
|
|
2356
|
+
has: Xr,
|
|
2357
|
+
has_exp: Zr,
|
|
2358
|
+
find_index: Qr,
|
|
2359
|
+
find_index_exp: $r,
|
|
2360
|
+
find: ei,
|
|
2361
|
+
find_exp: ti,
|
|
2362
|
+
uniq: ni,
|
|
2363
|
+
sample: ri
|
|
2352
2364
|
});
|
|
2353
|
-
function
|
|
2365
|
+
function ai(e, t, n) {
|
|
2354
2366
|
let r = (e?.length ?? 0) + (n?.length ?? 0);
|
|
2355
2367
|
this.context.memoryLimit.use(r);
|
|
2356
|
-
let i =
|
|
2357
|
-
return i ? (t =
|
|
2368
|
+
let i = di(e, this.context.opts, n);
|
|
2369
|
+
return i ? (t = p(t), t = h(t) ? this.context.opts.dateFormat : l(t), this.context.memoryLimit.use(t.length), it(i, t, this.context.memoryLimit)) : e;
|
|
2358
2370
|
}
|
|
2359
|
-
function
|
|
2360
|
-
return
|
|
2371
|
+
function oi(e) {
|
|
2372
|
+
return ai.call(this, e, "%Y-%m-%dT%H:%M:%S%:z");
|
|
2361
2373
|
}
|
|
2362
|
-
function
|
|
2363
|
-
return
|
|
2374
|
+
function si(e) {
|
|
2375
|
+
return ai.call(this, e, "%a, %d %b %Y %H:%M:%S %z");
|
|
2364
2376
|
}
|
|
2365
|
-
function
|
|
2366
|
-
return
|
|
2377
|
+
function ci(e, t, n) {
|
|
2378
|
+
return ui.call(this, e, "%b", t, n);
|
|
2367
2379
|
}
|
|
2368
|
-
function
|
|
2369
|
-
return
|
|
2380
|
+
function li(e, t, n) {
|
|
2381
|
+
return ui.call(this, e, "%B", t, n);
|
|
2370
2382
|
}
|
|
2371
|
-
function
|
|
2372
|
-
let i =
|
|
2383
|
+
function ui(e, t, n, r) {
|
|
2384
|
+
let i = di(e, this.context.opts);
|
|
2373
2385
|
if (!i) return e;
|
|
2374
2386
|
let a = this.context.memoryLimit;
|
|
2375
2387
|
if (n === "ordinal") {
|
|
@@ -2378,29 +2390,29 @@ function ci(e, t, n, r) {
|
|
|
2378
2390
|
}
|
|
2379
2391
|
return it(i, `%d ${t} %Y`, a);
|
|
2380
2392
|
}
|
|
2381
|
-
function
|
|
2393
|
+
function di(e, t, n) {
|
|
2382
2394
|
let r, i = n ?? t.timezoneOffset, o = t.locale;
|
|
2383
|
-
if (e =
|
|
2395
|
+
if (e = p(e), !h(e)) return r = e === "now" || e === "today" ? new A(Date.now(), o, i) : m(e) ? new A(e * 1e3, o, i) : a(e) ? /^\d+$/.test(e) ? new A(e * 1e3, o, i) : t.preserveTimezones && n === void 0 ? A.createDateFixedToTimezone(e, o) : new A(e, o, i) : new A(e, o, i), r.valid() ? r : void 0;
|
|
2384
2396
|
}
|
|
2385
|
-
var
|
|
2397
|
+
var fi = /*#__PURE__*/ Object.freeze({
|
|
2386
2398
|
__proto__: null,
|
|
2387
|
-
date:
|
|
2388
|
-
date_to_xmlschema:
|
|
2389
|
-
date_to_rfc822:
|
|
2390
|
-
date_to_string:
|
|
2391
|
-
date_to_long_string:
|
|
2392
|
-
}),
|
|
2393
|
-
function
|
|
2394
|
-
|
|
2399
|
+
date: ai,
|
|
2400
|
+
date_to_xmlschema: oi,
|
|
2401
|
+
date_to_rfc822: si,
|
|
2402
|
+
date_to_string: ci,
|
|
2403
|
+
date_to_long_string: li
|
|
2404
|
+
}), pi = /[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu, mi = /[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu;
|
|
2405
|
+
function hi(e, t) {
|
|
2406
|
+
w(arguments.length === 2, "append expect 2 arguments");
|
|
2395
2407
|
let n = l(e), r = l(t);
|
|
2396
2408
|
return this.context.memoryLimit.use(n.length + r.length), n + r;
|
|
2397
2409
|
}
|
|
2398
|
-
function
|
|
2399
|
-
|
|
2410
|
+
function gi(e, t) {
|
|
2411
|
+
w(arguments.length === 2, "prepend expect 2 arguments");
|
|
2400
2412
|
let n = l(e), r = l(t);
|
|
2401
2413
|
return this.context.memoryLimit.use(n.length + r.length), r + n;
|
|
2402
2414
|
}
|
|
2403
|
-
function
|
|
2415
|
+
function _i(e, t) {
|
|
2404
2416
|
let n = l(e);
|
|
2405
2417
|
if (this.context.memoryLimit.use(n.length), t) {
|
|
2406
2418
|
t = l(t), this.context.memoryLimit.use(t.length);
|
|
@@ -2409,29 +2421,29 @@ function hi(e, t) {
|
|
|
2409
2421
|
}
|
|
2410
2422
|
return n.trimStart();
|
|
2411
2423
|
}
|
|
2412
|
-
function
|
|
2424
|
+
function vi(e) {
|
|
2413
2425
|
let t = l(e);
|
|
2414
2426
|
return this.context.memoryLimit.use(t.length), t.toLowerCase();
|
|
2415
2427
|
}
|
|
2416
|
-
function
|
|
2428
|
+
function yi(e) {
|
|
2417
2429
|
let t = l(e);
|
|
2418
2430
|
return this.context.memoryLimit.use(t.length), l(t).toUpperCase();
|
|
2419
2431
|
}
|
|
2420
|
-
function
|
|
2432
|
+
function bi(e, t) {
|
|
2421
2433
|
let n = l(e);
|
|
2422
2434
|
return t = l(t), this.context.memoryLimit.use(n.length + t.length), n.split(t).join("");
|
|
2423
2435
|
}
|
|
2424
|
-
function
|
|
2436
|
+
function xi(e, t) {
|
|
2425
2437
|
let n = l(e);
|
|
2426
2438
|
return t = l(t), this.context.memoryLimit.use(n.length + t.length), n.replace(t, "");
|
|
2427
2439
|
}
|
|
2428
|
-
function
|
|
2440
|
+
function Si(e, t) {
|
|
2429
2441
|
let n = l(e), r = l(t);
|
|
2430
2442
|
this.context.memoryLimit.use(n.length + r.length);
|
|
2431
2443
|
let i = n.lastIndexOf(r);
|
|
2432
2444
|
return i === -1 ? n : n.substring(0, i) + n.substring(i + r.length);
|
|
2433
2445
|
}
|
|
2434
|
-
function
|
|
2446
|
+
function Ci(e, t) {
|
|
2435
2447
|
if (e = l(e), this.context.memoryLimit.use(e.length), t) {
|
|
2436
2448
|
t = l(t), this.context.memoryLimit.use(t.length);
|
|
2437
2449
|
for (let n = e.length - 1, r = new Set(t); n >= 0; n--) if (!r.has(e[n])) return e.slice(0, n + 1);
|
|
@@ -2439,14 +2451,14 @@ function xi(e, t) {
|
|
|
2439
2451
|
}
|
|
2440
2452
|
return e.trimEnd();
|
|
2441
2453
|
}
|
|
2442
|
-
function
|
|
2454
|
+
function wi(e, t) {
|
|
2443
2455
|
let n = l(e);
|
|
2444
2456
|
this.context.memoryLimit.use(n.length);
|
|
2445
2457
|
let r = n.split(l(t));
|
|
2446
2458
|
for (; r.length && r[r.length - 1] === "";) r.pop();
|
|
2447
2459
|
return r;
|
|
2448
2460
|
}
|
|
2449
|
-
function
|
|
2461
|
+
function Ti(e, t) {
|
|
2450
2462
|
let n = l(e);
|
|
2451
2463
|
if (this.context.memoryLimit.use(n.length), t) {
|
|
2452
2464
|
let e = new Set(l(t));
|
|
@@ -2458,34 +2470,34 @@ function Ci(e, t) {
|
|
|
2458
2470
|
}
|
|
2459
2471
|
return n.trim();
|
|
2460
2472
|
}
|
|
2461
|
-
function
|
|
2473
|
+
function Ei(e) {
|
|
2462
2474
|
let t = l(e);
|
|
2463
2475
|
return this.context.memoryLimit.use(t.length), t.replace(/\r?\n/gm, "");
|
|
2464
2476
|
}
|
|
2465
|
-
function
|
|
2477
|
+
function Di(e) {
|
|
2466
2478
|
return e = l(e), this.context.memoryLimit.use(e.length), e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
|
|
2467
2479
|
}
|
|
2468
|
-
function
|
|
2480
|
+
function Oi(e, t, n) {
|
|
2469
2481
|
let r = l(e);
|
|
2470
2482
|
t = l(t), n = l(n);
|
|
2471
2483
|
let i = r.split(t), a = r.length + (i.length - 1) * (n.length - t.length);
|
|
2472
2484
|
return this.context.memoryLimit.use(a), i.join(n);
|
|
2473
2485
|
}
|
|
2474
|
-
function
|
|
2486
|
+
function ki(e, t, n) {
|
|
2475
2487
|
let r = l(e);
|
|
2476
2488
|
return t = l(t), n = l(n), this.context.memoryLimit.use(r.length + t.length + n.length), r.replace(t, () => n);
|
|
2477
2489
|
}
|
|
2478
|
-
function
|
|
2490
|
+
function Ai(e, t, n) {
|
|
2479
2491
|
let r = l(e), i = l(t), a = l(n);
|
|
2480
2492
|
this.context.memoryLimit.use(r.length + i.length + a.length);
|
|
2481
2493
|
let o = r.lastIndexOf(i);
|
|
2482
2494
|
return o === -1 ? r : r.substring(0, o) + a + r.substring(o + i.length);
|
|
2483
2495
|
}
|
|
2484
|
-
function
|
|
2496
|
+
function ji(e, t = 50, n = "...") {
|
|
2485
2497
|
let r = l(e);
|
|
2486
2498
|
return n = l(n), this.context.memoryLimit.use(r.length + n.length), r.length <= t ? e : r.substring(0, t - n.length) + n;
|
|
2487
2499
|
}
|
|
2488
|
-
function
|
|
2500
|
+
function Mi(e, t = 15, n = "...") {
|
|
2489
2501
|
let r = l(e);
|
|
2490
2502
|
n = l(n), this.context.memoryLimit.use(r.length + n.length);
|
|
2491
2503
|
let i = r.split(/\s+/);
|
|
@@ -2493,106 +2505,109 @@ function Ai(e, t = 15, n = "...") {
|
|
|
2493
2505
|
let a = i.slice(0, t).join(" ");
|
|
2494
2506
|
return i.length >= t && (a += n), a;
|
|
2495
2507
|
}
|
|
2496
|
-
function
|
|
2508
|
+
function Ni(e) {
|
|
2497
2509
|
let t = l(e);
|
|
2498
2510
|
return this.context.memoryLimit.use(t.length), t.replace(/\s+/g, " ");
|
|
2499
2511
|
}
|
|
2500
|
-
function
|
|
2512
|
+
function Pi(e, t) {
|
|
2501
2513
|
let n = l(e);
|
|
2502
2514
|
if (this.context.memoryLimit.use(n.length), e = n.trim(), !e) return 0;
|
|
2503
2515
|
switch (t) {
|
|
2504
|
-
case "cjk": return (e.match(
|
|
2505
|
-
case "auto": return
|
|
2516
|
+
case "cjk": return (e.match(pi) || []).length + (e.match(mi) || []).length;
|
|
2517
|
+
case "auto": return pi.test(e) ? e.match(pi).length + (e.match(mi) || []).length : e.split(/\s+/).length;
|
|
2506
2518
|
default: return e.split(/\s+/).length;
|
|
2507
2519
|
}
|
|
2508
2520
|
}
|
|
2509
|
-
function
|
|
2510
|
-
|
|
2521
|
+
function Fi(e, t = "and") {
|
|
2522
|
+
t = l(t);
|
|
2523
|
+
let n = t.length + e.length * 2;
|
|
2524
|
+
for (let t = 0; t < e.length; t++) n += l(e[t]).length;
|
|
2525
|
+
switch (this.context.memoryLimit.use(n), e.length) {
|
|
2511
2526
|
case 0: return "";
|
|
2512
2527
|
case 1: return e[0];
|
|
2513
2528
|
case 2: return `${e[0]} ${t} ${e[1]}`;
|
|
2514
2529
|
default: return `${e.slice(0, -1).join(", ")}, ${t} ${e[e.length - 1]}`;
|
|
2515
2530
|
}
|
|
2516
2531
|
}
|
|
2517
|
-
var
|
|
2532
|
+
var Ii = /*#__PURE__*/ Object.freeze({
|
|
2518
2533
|
__proto__: null,
|
|
2519
|
-
append:
|
|
2520
|
-
prepend:
|
|
2521
|
-
lstrip:
|
|
2522
|
-
downcase:
|
|
2523
|
-
upcase:
|
|
2524
|
-
remove:
|
|
2525
|
-
remove_first:
|
|
2526
|
-
remove_last:
|
|
2527
|
-
rstrip:
|
|
2528
|
-
split:
|
|
2529
|
-
strip:
|
|
2530
|
-
strip_newlines:
|
|
2531
|
-
capitalize:
|
|
2532
|
-
replace:
|
|
2533
|
-
replace_first:
|
|
2534
|
-
replace_last:
|
|
2535
|
-
truncate:
|
|
2536
|
-
truncatewords:
|
|
2537
|
-
normalize_whitespace:
|
|
2538
|
-
number_of_words:
|
|
2539
|
-
array_to_sentence_string:
|
|
2534
|
+
append: hi,
|
|
2535
|
+
prepend: gi,
|
|
2536
|
+
lstrip: _i,
|
|
2537
|
+
downcase: vi,
|
|
2538
|
+
upcase: yi,
|
|
2539
|
+
remove: bi,
|
|
2540
|
+
remove_first: xi,
|
|
2541
|
+
remove_last: Si,
|
|
2542
|
+
rstrip: Ci,
|
|
2543
|
+
split: wi,
|
|
2544
|
+
strip: Ti,
|
|
2545
|
+
strip_newlines: Ei,
|
|
2546
|
+
capitalize: Di,
|
|
2547
|
+
replace: Oi,
|
|
2548
|
+
replace_first: ki,
|
|
2549
|
+
replace_last: Ai,
|
|
2550
|
+
truncate: ji,
|
|
2551
|
+
truncatewords: Mi,
|
|
2552
|
+
normalize_whitespace: Ni,
|
|
2553
|
+
number_of_words: Pi,
|
|
2554
|
+
array_to_sentence_string: Fi
|
|
2540
2555
|
});
|
|
2541
|
-
function
|
|
2556
|
+
function Li(e) {
|
|
2542
2557
|
return btoa(String.fromCharCode(...new TextEncoder().encode(e)));
|
|
2543
2558
|
}
|
|
2544
|
-
function
|
|
2559
|
+
function Ri(e) {
|
|
2545
2560
|
return new TextDecoder().decode(Uint8Array.from(atob(e), (e) => e.charCodeAt(0)));
|
|
2546
2561
|
}
|
|
2547
|
-
function
|
|
2562
|
+
function zi(e) {
|
|
2548
2563
|
if (typeof Buffer < "u" && Buffer.isBuffer(e)) return this.context.memoryLimit.use(e.byteLength), e.toString("base64");
|
|
2549
2564
|
let t = l(e);
|
|
2550
|
-
return this.context.memoryLimit.use(t.length),
|
|
2565
|
+
return this.context.memoryLimit.use(t.length), Li(t);
|
|
2551
2566
|
}
|
|
2552
|
-
function
|
|
2567
|
+
function Bi(e) {
|
|
2553
2568
|
let t = l(e);
|
|
2554
|
-
return this.context.memoryLimit.use(t.length),
|
|
2569
|
+
return this.context.memoryLimit.use(t.length), Ri(t);
|
|
2555
2570
|
}
|
|
2556
|
-
var
|
|
2571
|
+
var Vi = /*#__PURE__*/ Object.freeze({
|
|
2557
2572
|
__proto__: null,
|
|
2558
|
-
base64_encode:
|
|
2559
|
-
base64_decode:
|
|
2573
|
+
base64_encode: zi,
|
|
2574
|
+
base64_decode: Bi
|
|
2560
2575
|
});
|
|
2561
|
-
function
|
|
2576
|
+
function Hi(e) {
|
|
2562
2577
|
let t = new Uint8Array(e), n = "";
|
|
2563
2578
|
for (let e = 0; e < t.length; e++) n += t[e].toString(16).padStart(2, "0");
|
|
2564
2579
|
return n;
|
|
2565
2580
|
}
|
|
2566
|
-
function
|
|
2567
|
-
return
|
|
2581
|
+
function Ui(e) {
|
|
2582
|
+
return D(this, void 0, void 0, function* () {
|
|
2568
2583
|
let t = new TextEncoder().encode(e);
|
|
2569
|
-
return
|
|
2584
|
+
return Hi(yield crypto.subtle.digest("SHA-256", t));
|
|
2570
2585
|
});
|
|
2571
2586
|
}
|
|
2572
|
-
function
|
|
2573
|
-
return
|
|
2587
|
+
function Wi(e, t) {
|
|
2588
|
+
return D(this, void 0, void 0, function* () {
|
|
2574
2589
|
let n = new TextEncoder(), r = yield crypto.subtle.importKey("raw", n.encode(t), {
|
|
2575
2590
|
name: "HMAC",
|
|
2576
2591
|
hash: "SHA-256"
|
|
2577
2592
|
}, !1, ["sign"]);
|
|
2578
|
-
return
|
|
2593
|
+
return Hi(yield crypto.subtle.sign("HMAC", r, n.encode(e)));
|
|
2579
2594
|
});
|
|
2580
2595
|
}
|
|
2581
|
-
function
|
|
2596
|
+
function Gi(e) {
|
|
2582
2597
|
let t = l(e);
|
|
2583
|
-
return this.context.memoryLimit.use(t.length),
|
|
2598
|
+
return this.context.memoryLimit.use(t.length), Ui(t);
|
|
2584
2599
|
}
|
|
2585
|
-
function
|
|
2600
|
+
function Ki(e, t) {
|
|
2586
2601
|
let n = l(e), r = l(t);
|
|
2587
|
-
return this.context.memoryLimit.use(n.length + r.length),
|
|
2602
|
+
return this.context.memoryLimit.use(n.length + r.length), Wi(n, r);
|
|
2588
2603
|
}
|
|
2589
|
-
var
|
|
2604
|
+
var qi = /*#__PURE__*/ Object.freeze({
|
|
2590
2605
|
__proto__: null,
|
|
2591
|
-
sha256:
|
|
2592
|
-
hmac_sha256:
|
|
2593
|
-
}),
|
|
2606
|
+
sha256: Gi,
|
|
2607
|
+
hmac_sha256: Ki
|
|
2608
|
+
}), Ji = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, vn), fr), xr), ii), fi), Ii), Vi), qi), un), Yi = class extends R {
|
|
2594
2609
|
constructor(e, t, n) {
|
|
2595
|
-
super(e, t, n), 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
|
|
2610
|
+
super(e, t, n), 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 B(this.tokenizer.readFilteredValue(), this.liquid);
|
|
2596
2611
|
}
|
|
2597
2612
|
*render(e) {
|
|
2598
2613
|
e.bottom()[this.key] = yield this.value.value(e, this.liquid.options.lenientIf);
|
|
@@ -2603,27 +2618,27 @@ var Gi = /*#__PURE__*/ Object.freeze({
|
|
|
2603
2618
|
*localScope() {
|
|
2604
2619
|
yield this.identifier;
|
|
2605
2620
|
}
|
|
2606
|
-
},
|
|
2621
|
+
}, Xi = [
|
|
2607
2622
|
"offset",
|
|
2608
2623
|
"limit",
|
|
2609
2624
|
"reversed"
|
|
2610
|
-
],
|
|
2625
|
+
], Zi = class extends R {
|
|
2611
2626
|
constructor(e, t, n, r) {
|
|
2612
2627
|
super(e, t, n);
|
|
2613
2628
|
let i = this.tokenizer.readIdentifier(), a = this.tokenizer.readIdentifier(), o = this.tokenizer.readValue();
|
|
2614
2629
|
if (!i.size() || a.content !== "in" || !o) throw Error(`illegal tag: ${e.getText()}`);
|
|
2615
|
-
this.variable = i.content, this.collection = o, this.hash = new
|
|
2630
|
+
this.variable = i.content, this.collection = o, this.hash = new z(this.tokenizer, n.options.keyValueSeparator), this.templates = [], this.elseTemplates = [];
|
|
2616
2631
|
let s, c = r.parseStream(t).on("start", () => s = this.templates).on("tag:else", (e) => {
|
|
2617
|
-
|
|
2632
|
+
T(e.args), s = this.elseTemplates;
|
|
2618
2633
|
}).on("tag:endfor", (e) => {
|
|
2619
|
-
|
|
2634
|
+
T(e.args), c.stop();
|
|
2620
2635
|
}).on("template", (e) => s.push(e)).on("end", () => {
|
|
2621
2636
|
throw Error(`tag ${e.getText()} not closed`);
|
|
2622
2637
|
});
|
|
2623
2638
|
c.start();
|
|
2624
2639
|
}
|
|
2625
2640
|
*render(e, t) {
|
|
2626
|
-
let n = this.liquid.renderer, r =
|
|
2641
|
+
let n = this.liquid.renderer, r = d(yield j(this.collection, e));
|
|
2627
2642
|
if (!r.length) {
|
|
2628
2643
|
yield n.renderTemplates(this.elseTemplates, e, t);
|
|
2629
2644
|
return;
|
|
@@ -2631,7 +2646,7 @@ var Gi = /*#__PURE__*/ Object.freeze({
|
|
|
2631
2646
|
let i = "continue-" + this.variable + "-" + this.collection.getText();
|
|
2632
2647
|
e.push(Z({ continue: e.getRegister(i, {}) }));
|
|
2633
2648
|
let a = yield this.hash.render(e);
|
|
2634
|
-
e.pop(), r = (this.liquid.options.orderedFilterParameters ? Object.keys(a).filter((e) =>
|
|
2649
|
+
e.pop(), r = (this.liquid.options.orderedFilterParameters ? Object.keys(a).filter((e) => Xi.includes(e)) : Xi.filter((e) => a[e] !== void 0)).reduce((e, t) => t === "offset" ? $i(e, a.offset) : t === "limit" ? ea(e, a.limit) : Qi(e), r), e.setRegister(i, (a.offset || 0) + r.length);
|
|
2635
2650
|
let o = Z({ forloop: new Ie(r.length, this.collection.getText(), this.variable) });
|
|
2636
2651
|
e.push(o);
|
|
2637
2652
|
for (let i of r) {
|
|
@@ -2652,16 +2667,16 @@ var Gi = /*#__PURE__*/ Object.freeze({
|
|
|
2652
2667
|
return [this.variable, "forloop"];
|
|
2653
2668
|
}
|
|
2654
2669
|
};
|
|
2655
|
-
function
|
|
2670
|
+
function Qi(e) {
|
|
2656
2671
|
return [...e].reverse();
|
|
2657
2672
|
}
|
|
2658
|
-
function
|
|
2673
|
+
function $i(e, t) {
|
|
2659
2674
|
return e.slice(t);
|
|
2660
2675
|
}
|
|
2661
|
-
function
|
|
2676
|
+
function ea(e, t) {
|
|
2662
2677
|
return e.slice(0, t);
|
|
2663
2678
|
}
|
|
2664
|
-
var
|
|
2679
|
+
var ta = class extends R {
|
|
2665
2680
|
constructor(e, t, n, r) {
|
|
2666
2681
|
for (super(e, t, n), this.templates = [], this.identifier = this.readVariable(), this.variable = this.identifier.content; t.length;) {
|
|
2667
2682
|
let e = t.shift();
|
|
@@ -2685,9 +2700,9 @@ var $i = class extends L {
|
|
|
2685
2700
|
*localScope() {
|
|
2686
2701
|
yield this.identifier;
|
|
2687
2702
|
}
|
|
2688
|
-
},
|
|
2703
|
+
}, na = class extends R {
|
|
2689
2704
|
constructor(e, t, n, r) {
|
|
2690
|
-
super(e, t, n), this.branches = [], this.elseTemplates = [], this.value = new
|
|
2705
|
+
super(e, t, n), this.branches = [], this.elseTemplates = [], this.value = new B(this.tokenizer.readFilteredValue(), this.liquid), this.elseTemplates = [];
|
|
2691
2706
|
let i = [], a = 0, o = r.parseStream(t).on("tag:when", (e) => {
|
|
2692
2707
|
if (a > 0) return;
|
|
2693
2708
|
i = [];
|
|
@@ -2707,8 +2722,8 @@ var $i = class extends L {
|
|
|
2707
2722
|
o.start();
|
|
2708
2723
|
}
|
|
2709
2724
|
*render(e, t) {
|
|
2710
|
-
let n = this.liquid.renderer, r =
|
|
2711
|
-
for (let a of this.branches) for (let o of a.values) if (N(r, yield
|
|
2725
|
+
let n = this.liquid.renderer, r = p(yield this.value.value(e, e.opts.lenientIf)), i = !1;
|
|
2726
|
+
for (let a of this.branches) for (let o of a.values) if (N(r, yield j(o, e, e.opts.lenientIf))) {
|
|
2712
2727
|
yield n.renderTemplates(a.templates, e, t), i = !0;
|
|
2713
2728
|
break;
|
|
2714
2729
|
}
|
|
@@ -2721,7 +2736,7 @@ var $i = class extends L {
|
|
|
2721
2736
|
let e = this.branches.flatMap((e) => e.templates);
|
|
2722
2737
|
return this.elseTemplates && e.push(...this.elseTemplates), e;
|
|
2723
2738
|
}
|
|
2724
|
-
},
|
|
2739
|
+
}, ra = class extends R {
|
|
2725
2740
|
constructor(e, t, n) {
|
|
2726
2741
|
for (super(e, t, n); t.length;) {
|
|
2727
2742
|
let e = t.shift();
|
|
@@ -2730,11 +2745,11 @@ var $i = class extends L {
|
|
|
2730
2745
|
throw Error(`tag ${e.getText()} not closed`);
|
|
2731
2746
|
}
|
|
2732
2747
|
render() {}
|
|
2733
|
-
},
|
|
2748
|
+
}, ia = class extends R {
|
|
2734
2749
|
constructor(e, t, n, r) {
|
|
2735
2750
|
super(e, t, n);
|
|
2736
2751
|
let i = this.tokenizer;
|
|
2737
|
-
for (this.file =
|
|
2752
|
+
for (this.file = aa(i, this.liquid, r), this.currentFile = e.file; !i.end();) {
|
|
2738
2753
|
i.skipBlank();
|
|
2739
2754
|
let e = i.p, t = i.readIdentifier();
|
|
2740
2755
|
if ((t.content === "with" || t.content === "for") && (i.skipBlank(), i.peek() !== ":")) {
|
|
@@ -2753,18 +2768,18 @@ var $i = class extends L {
|
|
|
2753
2768
|
i.p = e;
|
|
2754
2769
|
break;
|
|
2755
2770
|
}
|
|
2756
|
-
this.hash = new
|
|
2771
|
+
this.hash = new z(i, n.options.keyValueSeparator);
|
|
2757
2772
|
}
|
|
2758
2773
|
*render(e, t) {
|
|
2759
|
-
let { liquid: n, hash: r } = this, i = yield
|
|
2760
|
-
|
|
2774
|
+
let { liquid: n, hash: r } = this, i = yield sa(this.file, e, n);
|
|
2775
|
+
w(i, () => `illegal file path "${i}"`);
|
|
2761
2776
|
let a = e.spawn(), o = a.bottom();
|
|
2762
2777
|
if (Ge(o, yield r.render(e)), this.with) {
|
|
2763
2778
|
let { value: t, alias: n } = this.with;
|
|
2764
|
-
o[n || i] = yield
|
|
2779
|
+
o[n || i] = yield j(t, e);
|
|
2765
2780
|
}
|
|
2766
2781
|
if (this.forBinding) {
|
|
2767
|
-
let { value: r, alias: s } = this.forBinding, c =
|
|
2782
|
+
let { value: r, alias: s } = this.forBinding, c = d(yield j(r, e));
|
|
2768
2783
|
o.forloop = new Ie(c.length, r.getText(), s);
|
|
2769
2784
|
for (let e of c) {
|
|
2770
2785
|
o[s] = e;
|
|
@@ -2809,35 +2824,35 @@ var $i = class extends L {
|
|
|
2809
2824
|
}
|
|
2810
2825
|
}
|
|
2811
2826
|
};
|
|
2812
|
-
function
|
|
2827
|
+
function aa(e, t, n) {
|
|
2813
2828
|
if (t.options.dynamicPartials) {
|
|
2814
2829
|
let t = e.readValue();
|
|
2815
|
-
return e.assert(t, "illegal file path"), t.getText() === "none" ? void 0 :
|
|
2830
|
+
return e.assert(t, "illegal file path"), t.getText() === "none" ? void 0 : Kn(t) ? oa(n.parse(Vt(t))) : t;
|
|
2816
2831
|
}
|
|
2817
|
-
let r = [...e.readFileNameTemplate(t.options)], i =
|
|
2832
|
+
let r = [...e.readFileNameTemplate(t.options)], i = oa(n.parseTokens(r));
|
|
2818
2833
|
return i === "none" ? void 0 : i;
|
|
2819
2834
|
}
|
|
2820
|
-
function
|
|
2821
|
-
return e.length === 1 &&
|
|
2835
|
+
function oa(e) {
|
|
2836
|
+
return e.length === 1 && Wn(e[0].token) ? e[0].token.getContent() : e;
|
|
2822
2837
|
}
|
|
2823
|
-
function*
|
|
2824
|
-
return typeof e == "string" ? e : Array.isArray(e) ? n.renderer.renderTemplates(e, t) : yield
|
|
2838
|
+
function* sa(e, t, n) {
|
|
2839
|
+
return typeof e == "string" ? e : Array.isArray(e) ? n.renderer.renderTemplates(e, t) : yield j(e, t);
|
|
2825
2840
|
}
|
|
2826
|
-
var
|
|
2841
|
+
var ca = class extends R {
|
|
2827
2842
|
constructor(e, t, n, r) {
|
|
2828
2843
|
super(e, t, n);
|
|
2829
2844
|
let { tokenizer: i } = e;
|
|
2830
|
-
this.file =
|
|
2845
|
+
this.file = aa(i, this.liquid, r), this.currentFile = e.file;
|
|
2831
2846
|
let a = i.p;
|
|
2832
|
-
i.readIdentifier().content === "with" ? (i.skipBlank(), i.peek() === ":" ? i.p = a : this.withVar = i.readValue()) : i.p = a, this.hash = new
|
|
2847
|
+
i.readIdentifier().content === "with" ? (i.skipBlank(), i.peek() === ":" ? i.p = a : this.withVar = i.readValue()) : i.p = a, this.hash = new z(i, n.options.jekyllInclude || n.options.keyValueSeparator);
|
|
2833
2848
|
}
|
|
2834
2849
|
*render(e, t) {
|
|
2835
|
-
let { liquid: n, hash: r, withVar: i } = this, { renderer: a } = n, o = yield
|
|
2836
|
-
|
|
2850
|
+
let { liquid: n, hash: r, withVar: i } = this, { renderer: a } = n, o = yield sa(this.file, e, n);
|
|
2851
|
+
w(o, () => `illegal file path "${o}"`);
|
|
2837
2852
|
let s = e.saveRegister("blocks", "blockMode");
|
|
2838
2853
|
e.setRegister("blocks", {}), e.setRegister("blockMode", $.OUTPUT);
|
|
2839
2854
|
let c = Z(yield r.render(e));
|
|
2840
|
-
i && (c[o] = yield
|
|
2855
|
+
i && (c[o] = yield j(i, e));
|
|
2841
2856
|
let l = yield n._parsePartialFile(o, e.sync, this.currentFile);
|
|
2842
2857
|
e.push(e.opts.jekyllInclude ? Z({ include: c }) : c), yield a.renderTemplates(l, e, t), e.pop(), e.restoreRegister(s);
|
|
2843
2858
|
}
|
|
@@ -2857,18 +2872,18 @@ var oa = class extends L {
|
|
|
2857
2872
|
*arguments() {
|
|
2858
2873
|
yield* Object.values(this.hash.hash).filter(Y), Y(this.file) && (yield this.file), Y(this.withVar) && (yield this.withVar);
|
|
2859
2874
|
}
|
|
2860
|
-
},
|
|
2875
|
+
}, la = class extends R {
|
|
2861
2876
|
constructor(e, t, n) {
|
|
2862
2877
|
super(e, t, n), this.identifier = this.tokenizer.readIdentifier(), this.variable = this.identifier.content;
|
|
2863
2878
|
}
|
|
2864
2879
|
render(e, t) {
|
|
2865
2880
|
let n = e.environments;
|
|
2866
|
-
|
|
2881
|
+
m(n[this.variable]) || (n[this.variable] = 0), t.write(l(--n[this.variable]));
|
|
2867
2882
|
}
|
|
2868
2883
|
*localScope() {
|
|
2869
2884
|
yield this.identifier;
|
|
2870
2885
|
}
|
|
2871
|
-
},
|
|
2886
|
+
}, ua = class extends R {
|
|
2872
2887
|
constructor(e, t, n) {
|
|
2873
2888
|
super(e, t, n), this.candidates = [];
|
|
2874
2889
|
let r = this.tokenizer.readValue();
|
|
@@ -2879,37 +2894,37 @@ var oa = class extends L {
|
|
|
2879
2894
|
this.tokenizer.assert(this.candidates.length, () => `empty candidates: "${e.getText()}"`);
|
|
2880
2895
|
}
|
|
2881
2896
|
*render(e, t) {
|
|
2882
|
-
let n = `cycle:${yield
|
|
2897
|
+
let n = `cycle:${yield j(this.group, e)}:` + this.candidates.join(","), r = e.getRegister("cycle", {}), i = r[n];
|
|
2883
2898
|
i === void 0 && (i = r[n] = 0);
|
|
2884
2899
|
let a = this.candidates[i];
|
|
2885
|
-
return i = (i + 1) % this.candidates.length, r[n] = i, yield
|
|
2900
|
+
return i = (i + 1) % this.candidates.length, r[n] = i, yield j(a, e);
|
|
2886
2901
|
}
|
|
2887
2902
|
*arguments() {
|
|
2888
2903
|
yield* this.candidates, this.group && (yield this.group);
|
|
2889
2904
|
}
|
|
2890
|
-
},
|
|
2905
|
+
}, da = class extends R {
|
|
2891
2906
|
constructor(e, t, n, r) {
|
|
2892
2907
|
super(e, t, n), this.branches = [];
|
|
2893
2908
|
let i = [];
|
|
2894
2909
|
r.parseStream(t).on("start", () => this.branches.push({
|
|
2895
|
-
value: new
|
|
2910
|
+
value: new B(e.tokenizer.readFilteredValue(), this.liquid),
|
|
2896
2911
|
templates: i = []
|
|
2897
2912
|
})).on("tag:elsif", (e) => {
|
|
2898
|
-
|
|
2899
|
-
value: new
|
|
2913
|
+
w(!this.elseTemplates, "unexpected elsif after else"), this.branches.push({
|
|
2914
|
+
value: new B(e.tokenizer.readFilteredValue(), this.liquid),
|
|
2900
2915
|
templates: i = []
|
|
2901
2916
|
});
|
|
2902
2917
|
}).on("tag:else", (e) => {
|
|
2903
|
-
|
|
2918
|
+
T(e.args), w(!this.elseTemplates, "duplicated else"), i = this.elseTemplates = [];
|
|
2904
2919
|
}).on("tag:endif", function(e) {
|
|
2905
|
-
|
|
2920
|
+
T(e.args), this.stop();
|
|
2906
2921
|
}).on("template", (e) => i.push(e)).on("end", () => {
|
|
2907
2922
|
throw Error(`tag ${e.getText()} not closed`);
|
|
2908
2923
|
}).start();
|
|
2909
2924
|
}
|
|
2910
2925
|
*render(e, t) {
|
|
2911
2926
|
let n = this.liquid.renderer;
|
|
2912
|
-
for (let { value: r, templates: i } of this.branches) if (
|
|
2927
|
+
for (let { value: r, templates: i } of this.branches) if (M(yield r.value(e, e.opts.lenientIf), e)) {
|
|
2913
2928
|
yield n.renderTemplates(i, e, t);
|
|
2914
2929
|
return;
|
|
2915
2930
|
}
|
|
@@ -2922,22 +2937,22 @@ var oa = class extends L {
|
|
|
2922
2937
|
arguments() {
|
|
2923
2938
|
return this.branches.map((e) => e.value);
|
|
2924
2939
|
}
|
|
2925
|
-
},
|
|
2940
|
+
}, fa = class extends R {
|
|
2926
2941
|
constructor(e, t, n) {
|
|
2927
2942
|
super(e, t, n), this.identifier = this.tokenizer.readIdentifier(), this.variable = this.identifier.content;
|
|
2928
2943
|
}
|
|
2929
2944
|
render(e, t) {
|
|
2930
2945
|
let n = e.environments;
|
|
2931
|
-
|
|
2946
|
+
m(n[this.variable]) || (n[this.variable] = 0);
|
|
2932
2947
|
let r = n[this.variable];
|
|
2933
2948
|
n[this.variable]++, t.write(l(r));
|
|
2934
2949
|
}
|
|
2935
2950
|
*localScope() {
|
|
2936
2951
|
yield this.identifier;
|
|
2937
2952
|
}
|
|
2938
|
-
},
|
|
2953
|
+
}, pa = class extends R {
|
|
2939
2954
|
constructor(e, t, n, r) {
|
|
2940
|
-
super(e, t, n), this.file =
|
|
2955
|
+
super(e, t, n), this.file = aa(this.tokenizer, this.liquid, r), this.currentFile = e.file, this.args = new z(this.tokenizer, n.options.keyValueSeparator), this.templates = r.parseTokens(t);
|
|
2941
2956
|
}
|
|
2942
2957
|
*render(e, t) {
|
|
2943
2958
|
let { liquid: n, args: r, file: i } = this, { renderer: a } = n;
|
|
@@ -2945,8 +2960,8 @@ var oa = class extends L {
|
|
|
2945
2960
|
e.setRegister("blockMode", $.OUTPUT), yield a.renderTemplates(this.templates, e, t);
|
|
2946
2961
|
return;
|
|
2947
2962
|
}
|
|
2948
|
-
let o = yield
|
|
2949
|
-
|
|
2963
|
+
let o = yield sa(this.file, e, n);
|
|
2964
|
+
w(o, () => `illegal file path "${o}"`);
|
|
2950
2965
|
let s = yield n._parseLayoutFile(o, e.sync, this.currentFile);
|
|
2951
2966
|
e.setRegister("blockMode", $.STORE);
|
|
2952
2967
|
let c = yield a.renderTemplates(this.templates, e), l = e.getRegister("blocks", {});
|
|
@@ -2967,7 +2982,7 @@ var oa = class extends L {
|
|
|
2967
2982
|
scope: Object.keys(this.args.hash)
|
|
2968
2983
|
};
|
|
2969
2984
|
}
|
|
2970
|
-
},
|
|
2985
|
+
}, ma = class extends R {
|
|
2971
2986
|
constructor(e, t, n, r) {
|
|
2972
2987
|
super(e, t, n), this.templates = [];
|
|
2973
2988
|
let i = /\w+/.exec(e.args);
|
|
@@ -2997,7 +3012,7 @@ var oa = class extends L {
|
|
|
2997
3012
|
blockScope() {
|
|
2998
3013
|
return ["block"];
|
|
2999
3014
|
}
|
|
3000
|
-
},
|
|
3015
|
+
}, ha = class extends R {
|
|
3001
3016
|
constructor(e, t, n) {
|
|
3002
3017
|
for (super(e, t, n), this.tokens = []; t.length;) {
|
|
3003
3018
|
let e = t.shift();
|
|
@@ -3009,7 +3024,7 @@ var oa = class extends L {
|
|
|
3009
3024
|
render() {
|
|
3010
3025
|
return this.tokens.map((e) => e.getText()).join("");
|
|
3011
3026
|
}
|
|
3012
|
-
},
|
|
3027
|
+
}, ga = class extends Ie {
|
|
3013
3028
|
constructor(e, t, n, r) {
|
|
3014
3029
|
super(e, n, r), this.length = e, this.cols = t;
|
|
3015
3030
|
}
|
|
@@ -3028,38 +3043,38 @@ var oa = class extends L {
|
|
|
3028
3043
|
col_last() {
|
|
3029
3044
|
return this.col() === this.cols;
|
|
3030
3045
|
}
|
|
3031
|
-
},
|
|
3032
|
-
assign:
|
|
3033
|
-
for:
|
|
3034
|
-
capture:
|
|
3035
|
-
case:
|
|
3036
|
-
comment:
|
|
3037
|
-
include:
|
|
3038
|
-
render:
|
|
3039
|
-
decrement:
|
|
3040
|
-
increment:
|
|
3041
|
-
cycle:
|
|
3042
|
-
if:
|
|
3043
|
-
layout:
|
|
3044
|
-
block:
|
|
3045
|
-
raw:
|
|
3046
|
-
tablerow: class extends
|
|
3046
|
+
}, _a = {
|
|
3047
|
+
assign: Yi,
|
|
3048
|
+
for: Zi,
|
|
3049
|
+
capture: ta,
|
|
3050
|
+
case: na,
|
|
3051
|
+
comment: ra,
|
|
3052
|
+
include: ca,
|
|
3053
|
+
render: ia,
|
|
3054
|
+
decrement: la,
|
|
3055
|
+
increment: fa,
|
|
3056
|
+
cycle: ua,
|
|
3057
|
+
if: da,
|
|
3058
|
+
layout: pa,
|
|
3059
|
+
block: ma,
|
|
3060
|
+
raw: ha,
|
|
3061
|
+
tablerow: class extends R {
|
|
3047
3062
|
constructor(e, t, n, r) {
|
|
3048
3063
|
super(e, t, n);
|
|
3049
3064
|
let i = this.tokenizer.readIdentifier();
|
|
3050
3065
|
this.tokenizer.skipBlank();
|
|
3051
3066
|
let a = this.tokenizer.readIdentifier(), o = this.tokenizer.readValue();
|
|
3052
3067
|
if (a.content !== "in" || !o) throw Error(`illegal tag: ${e.getText()}`);
|
|
3053
|
-
this.variable = i.content, this.collection = o, this.args = new
|
|
3068
|
+
this.variable = i.content, this.collection = o, this.args = new z(this.tokenizer, n.options.keyValueSeparator), this.templates = [];
|
|
3054
3069
|
let s, c = r.parseStream(t).on("start", () => s = this.templates).on("tag:endtablerow", () => c.stop()).on("template", (e) => s.push(e)).on("end", () => {
|
|
3055
3070
|
throw Error(`tag ${e.getText()} not closed`);
|
|
3056
3071
|
});
|
|
3057
3072
|
c.start();
|
|
3058
3073
|
}
|
|
3059
3074
|
*render(e, t) {
|
|
3060
|
-
let n =
|
|
3075
|
+
let n = d(yield j(this.collection, e)), r = yield this.args.render(e), i = r.offset || 0;
|
|
3061
3076
|
n = n.slice(i, i + (r.limit === void 0 ? n.length : r.limit));
|
|
3062
|
-
let a = r.cols || n.length, o = this.liquid.renderer, s = new
|
|
3077
|
+
let a = r.cols || n.length, o = this.liquid.renderer, s = new ga(n.length, a, this.collection.getText(), this.variable), c = Z({ tablerowloop: s });
|
|
3063
3078
|
e.push(c);
|
|
3064
3079
|
for (let r = 0; r < n.length; r++, s.next()) c[this.variable] = n[r], s.col0() === 0 && (s.row() !== 1 && t.write("</tr>"), t.write(`<tr class="row${s.row()}">`)), t.write(`<td class="col${s.col()}">`), yield o.renderTemplates(this.templates, e, t), t.write("</td>");
|
|
3065
3080
|
n.length && t.write("</tr>"), e.pop();
|
|
@@ -3075,13 +3090,13 @@ var oa = class extends L {
|
|
|
3075
3090
|
return [this.variable, "tablerowloop"];
|
|
3076
3091
|
}
|
|
3077
3092
|
},
|
|
3078
|
-
unless: class extends
|
|
3093
|
+
unless: class extends R {
|
|
3079
3094
|
constructor(e, t, n, r) {
|
|
3080
3095
|
super(e, t, n), this.branches = [], this.elseTemplates = [];
|
|
3081
3096
|
let i = [], a = 0;
|
|
3082
3097
|
r.parseStream(t).on("start", () => this.branches.push({
|
|
3083
|
-
value: new
|
|
3084
|
-
test:
|
|
3098
|
+
value: new B(e.tokenizer.readFilteredValue(), this.liquid),
|
|
3099
|
+
test: Wt,
|
|
3085
3100
|
templates: i = []
|
|
3086
3101
|
})).on("tag:elsif", (e) => {
|
|
3087
3102
|
if (a > 0) {
|
|
@@ -3089,8 +3104,8 @@ var oa = class extends L {
|
|
|
3089
3104
|
return;
|
|
3090
3105
|
}
|
|
3091
3106
|
this.branches.push({
|
|
3092
|
-
value: new
|
|
3093
|
-
test:
|
|
3107
|
+
value: new B(e.tokenizer.readFilteredValue(), this.liquid),
|
|
3108
|
+
test: M,
|
|
3094
3109
|
templates: i = []
|
|
3095
3110
|
});
|
|
3096
3111
|
}).on("tag:else", () => {
|
|
@@ -3119,19 +3134,19 @@ var oa = class extends L {
|
|
|
3119
3134
|
return this.branches.map((e) => e.value);
|
|
3120
3135
|
}
|
|
3121
3136
|
},
|
|
3122
|
-
break: class extends
|
|
3137
|
+
break: class extends R {
|
|
3123
3138
|
render(e, t) {
|
|
3124
3139
|
e.breakCalled = !0;
|
|
3125
3140
|
}
|
|
3126
3141
|
},
|
|
3127
|
-
continue: class extends
|
|
3142
|
+
continue: class extends R {
|
|
3128
3143
|
render(e, t) {
|
|
3129
3144
|
e.continueCalled = !0;
|
|
3130
3145
|
}
|
|
3131
3146
|
},
|
|
3132
|
-
echo: class extends
|
|
3147
|
+
echo: class extends R {
|
|
3133
3148
|
constructor(e, t, n) {
|
|
3134
|
-
super(e, t, n), this.tokenizer.skipBlank(), this.tokenizer.end() || (this.value = new
|
|
3149
|
+
super(e, t, n), this.tokenizer.skipBlank(), this.tokenizer.end() || (this.value = new B(this.tokenizer.readFilteredValue(), this.liquid));
|
|
3135
3150
|
}
|
|
3136
3151
|
*render(e, t) {
|
|
3137
3152
|
if (!this.value) return;
|
|
@@ -3142,7 +3157,7 @@ var oa = class extends L {
|
|
|
3142
3157
|
this.value && (yield this.value);
|
|
3143
3158
|
}
|
|
3144
3159
|
},
|
|
3145
|
-
liquid: class extends
|
|
3160
|
+
liquid: class extends R {
|
|
3146
3161
|
constructor(e, t, n, r) {
|
|
3147
3162
|
super(e, t, n);
|
|
3148
3163
|
let i = this.tokenizer.readLiquidTagTokens(this.liquid.options);
|
|
@@ -3155,15 +3170,15 @@ var oa = class extends L {
|
|
|
3155
3170
|
return this.templates;
|
|
3156
3171
|
}
|
|
3157
3172
|
},
|
|
3158
|
-
"#": class extends
|
|
3173
|
+
"#": class extends R {
|
|
3159
3174
|
constructor(e, t, n) {
|
|
3160
3175
|
if (super(e, t, n), e.args.search(/\n\s*[^#\s]/g) !== -1) throw Error("every line of an inline comment must start with a '#' character");
|
|
3161
3176
|
}
|
|
3162
3177
|
render() {}
|
|
3163
3178
|
}
|
|
3164
|
-
},
|
|
3179
|
+
}, va = class e {
|
|
3165
3180
|
constructor(e = {}) {
|
|
3166
|
-
this.renderer = new Rt(), this.filters = Object.create(null), this.tags = Object.create(null), this.options =
|
|
3181
|
+
this.renderer = new Rt(), this.filters = Object.create(null), this.tags = Object.create(null), this.options = bn(e), this.parser = new K(this), ae(_a, (e, t) => this.registerTag(t, e)), ae(Ji, (e, t) => this.registerFilter(t, e));
|
|
3167
3182
|
}
|
|
3168
3183
|
parse(e, t) {
|
|
3169
3184
|
return new K(this).parse(e, t);
|
|
@@ -3173,12 +3188,12 @@ var oa = class extends L {
|
|
|
3173
3188
|
return this.renderer.renderTemplates(e, r);
|
|
3174
3189
|
}
|
|
3175
3190
|
render(e, t, n) {
|
|
3176
|
-
return
|
|
3177
|
-
return
|
|
3191
|
+
return D(this, void 0, void 0, function* () {
|
|
3192
|
+
return O(this._render(e, t, Object.assign(Object.assign({}, n), { sync: !1 })));
|
|
3178
3193
|
});
|
|
3179
3194
|
}
|
|
3180
3195
|
renderSync(e, t, n) {
|
|
3181
|
-
return
|
|
3196
|
+
return k(this._render(e, t, Object.assign(Object.assign({}, n), { sync: !0 })));
|
|
3182
3197
|
}
|
|
3183
3198
|
renderToNodeStream(e, t, n = {}) {
|
|
3184
3199
|
let r = new Q(t, this.options, n);
|
|
@@ -3189,12 +3204,12 @@ var oa = class extends L {
|
|
|
3189
3204
|
return this._render(r, t, n);
|
|
3190
3205
|
}
|
|
3191
3206
|
parseAndRender(e, t, n) {
|
|
3192
|
-
return
|
|
3193
|
-
return
|
|
3207
|
+
return D(this, void 0, void 0, function* () {
|
|
3208
|
+
return O(this._parseAndRender(e, t, Object.assign(Object.assign({}, n), { sync: !1 })));
|
|
3194
3209
|
});
|
|
3195
3210
|
}
|
|
3196
3211
|
parseAndRenderSync(e, t, n) {
|
|
3197
|
-
return
|
|
3212
|
+
return k(this._parseAndRender(e, t, Object.assign(Object.assign({}, n), { sync: !0 })));
|
|
3198
3213
|
}
|
|
3199
3214
|
_parsePartialFile(e, t, n) {
|
|
3200
3215
|
return new K(this).parseFile(e, t, G.Partials, n);
|
|
@@ -3206,48 +3221,48 @@ var oa = class extends L {
|
|
|
3206
3221
|
return new K(this).parseFile(e, t, n, r);
|
|
3207
3222
|
}
|
|
3208
3223
|
parseFile(e, t) {
|
|
3209
|
-
return
|
|
3210
|
-
return
|
|
3224
|
+
return D(this, void 0, void 0, function* () {
|
|
3225
|
+
return O(new K(this).parseFile(e, !1, t));
|
|
3211
3226
|
});
|
|
3212
3227
|
}
|
|
3213
3228
|
parseFileSync(e, t) {
|
|
3214
|
-
return
|
|
3229
|
+
return k(new K(this).parseFile(e, !0, t));
|
|
3215
3230
|
}
|
|
3216
3231
|
*_renderFile(e, t, n) {
|
|
3217
3232
|
let r = yield this._parseFile(e, n.sync, n.lookupType);
|
|
3218
3233
|
return yield this._render(r, t, n);
|
|
3219
3234
|
}
|
|
3220
3235
|
renderFile(e, t, n) {
|
|
3221
|
-
return
|
|
3222
|
-
return
|
|
3236
|
+
return D(this, void 0, void 0, function* () {
|
|
3237
|
+
return O(this._renderFile(e, t, Object.assign(Object.assign({}, n), { sync: !1 })));
|
|
3223
3238
|
});
|
|
3224
3239
|
}
|
|
3225
3240
|
renderFileSync(e, t, n) {
|
|
3226
|
-
return
|
|
3241
|
+
return k(this._renderFile(e, t, Object.assign(Object.assign({}, n), { sync: !0 })));
|
|
3227
3242
|
}
|
|
3228
3243
|
renderFileToNodeStream(e, t, n) {
|
|
3229
|
-
return
|
|
3244
|
+
return D(this, void 0, void 0, function* () {
|
|
3230
3245
|
let r = yield this.parseFile(e);
|
|
3231
3246
|
return this.renderToNodeStream(r, t, n);
|
|
3232
3247
|
});
|
|
3233
3248
|
}
|
|
3234
3249
|
_evalValue(e, t) {
|
|
3235
|
-
let n = new
|
|
3250
|
+
let n = new B(e, this), r = t instanceof Q ? t : new Q(t, this.options);
|
|
3236
3251
|
return n.value(r);
|
|
3237
3252
|
}
|
|
3238
3253
|
evalValue(e, t) {
|
|
3239
|
-
return
|
|
3240
|
-
return
|
|
3254
|
+
return D(this, void 0, void 0, function* () {
|
|
3255
|
+
return O(this._evalValue(e, t));
|
|
3241
3256
|
});
|
|
3242
3257
|
}
|
|
3243
3258
|
evalValueSync(e, t) {
|
|
3244
|
-
return
|
|
3259
|
+
return k(this._evalValue(e, t));
|
|
3245
3260
|
}
|
|
3246
3261
|
registerFilter(e, t) {
|
|
3247
3262
|
this.filters[e] = t;
|
|
3248
3263
|
}
|
|
3249
3264
|
registerTag(e, t) {
|
|
3250
|
-
this.tags[e] = o(t) ? t :
|
|
3265
|
+
this.tags[e] = o(t) ? t : Dn(t);
|
|
3251
3266
|
}
|
|
3252
3267
|
plugin(t) {
|
|
3253
3268
|
return t.call(this, e);
|
|
@@ -3257,90 +3272,90 @@ var oa = class extends L {
|
|
|
3257
3272
|
return function(n, r, i) {
|
|
3258
3273
|
if (t) {
|
|
3259
3274
|
t = !1;
|
|
3260
|
-
let n =
|
|
3275
|
+
let n = I(this.root);
|
|
3261
3276
|
e.options.root.unshift(...n), e.options.layouts.unshift(...n), e.options.partials.unshift(...n);
|
|
3262
3277
|
}
|
|
3263
3278
|
e.renderFile(n, r).then((e) => i(null, e), i);
|
|
3264
3279
|
};
|
|
3265
3280
|
}
|
|
3266
3281
|
analyze(e, t = {}) {
|
|
3267
|
-
return
|
|
3268
|
-
return
|
|
3282
|
+
return D(this, void 0, void 0, function* () {
|
|
3283
|
+
return H(e, t);
|
|
3269
3284
|
});
|
|
3270
3285
|
}
|
|
3271
3286
|
analyzeSync(e, t = {}) {
|
|
3272
|
-
return
|
|
3287
|
+
return U(e, t);
|
|
3273
3288
|
}
|
|
3274
3289
|
parseAndAnalyze(e, t, n = {}) {
|
|
3275
|
-
return
|
|
3276
|
-
return
|
|
3290
|
+
return D(this, void 0, void 0, function* () {
|
|
3291
|
+
return H(this.parse(e, t), n);
|
|
3277
3292
|
});
|
|
3278
3293
|
}
|
|
3279
3294
|
parseAndAnalyzeSync(e, t, n = {}) {
|
|
3280
|
-
return
|
|
3295
|
+
return U(this.parse(e, t), n);
|
|
3281
3296
|
}
|
|
3282
3297
|
variables(e, t = {}) {
|
|
3283
|
-
return
|
|
3284
|
-
let n = yield
|
|
3298
|
+
return D(this, void 0, void 0, function* () {
|
|
3299
|
+
let n = yield H(a(e) ? this.parse(e) : e, t);
|
|
3285
3300
|
return Object.keys(n.variables);
|
|
3286
3301
|
});
|
|
3287
3302
|
}
|
|
3288
3303
|
variablesSync(e, t = {}) {
|
|
3289
|
-
let n =
|
|
3304
|
+
let n = U(a(e) ? this.parse(e) : e, t);
|
|
3290
3305
|
return Object.keys(n.variables);
|
|
3291
3306
|
}
|
|
3292
3307
|
fullVariables(e, t = {}) {
|
|
3293
|
-
return
|
|
3294
|
-
let n = yield
|
|
3308
|
+
return D(this, void 0, void 0, function* () {
|
|
3309
|
+
let n = yield H(a(e) ? this.parse(e) : e, t);
|
|
3295
3310
|
return Array.from(new Set(Object.values(n.variables).flatMap((e) => e.map((e) => String(e)))));
|
|
3296
3311
|
});
|
|
3297
3312
|
}
|
|
3298
3313
|
fullVariablesSync(e, t = {}) {
|
|
3299
|
-
let n =
|
|
3314
|
+
let n = U(a(e) ? this.parse(e) : e, t);
|
|
3300
3315
|
return Array.from(new Set(Object.values(n.variables).flatMap((e) => e.map((e) => String(e)))));
|
|
3301
3316
|
}
|
|
3302
3317
|
variableSegments(e, t = {}) {
|
|
3303
|
-
return
|
|
3304
|
-
let n = yield
|
|
3305
|
-
return Array.from(
|
|
3318
|
+
return D(this, void 0, void 0, function* () {
|
|
3319
|
+
let n = yield H(a(e) ? this.parse(e) : e, t);
|
|
3320
|
+
return Array.from(b(Object.values(n.variables).flatMap((e) => e.map((e) => e.toArray()))));
|
|
3306
3321
|
});
|
|
3307
3322
|
}
|
|
3308
3323
|
variableSegmentsSync(e, t = {}) {
|
|
3309
|
-
let n =
|
|
3310
|
-
return Array.from(
|
|
3324
|
+
let n = U(a(e) ? this.parse(e) : e, t);
|
|
3325
|
+
return Array.from(b(Object.values(n.variables).flatMap((e) => e.map((e) => e.toArray()))));
|
|
3311
3326
|
}
|
|
3312
3327
|
globalVariables(e, t = {}) {
|
|
3313
|
-
return
|
|
3314
|
-
let n = yield
|
|
3328
|
+
return D(this, void 0, void 0, function* () {
|
|
3329
|
+
let n = yield H(a(e) ? this.parse(e) : e, t);
|
|
3315
3330
|
return Object.keys(n.globals);
|
|
3316
3331
|
});
|
|
3317
3332
|
}
|
|
3318
3333
|
globalVariablesSync(e, t = {}) {
|
|
3319
|
-
let n =
|
|
3334
|
+
let n = U(a(e) ? this.parse(e) : e, t);
|
|
3320
3335
|
return Object.keys(n.globals);
|
|
3321
3336
|
}
|
|
3322
3337
|
globalFullVariables(e, t = {}) {
|
|
3323
|
-
return
|
|
3324
|
-
let n = yield
|
|
3338
|
+
return D(this, void 0, void 0, function* () {
|
|
3339
|
+
let n = yield H(a(e) ? this.parse(e) : e, t);
|
|
3325
3340
|
return Array.from(new Set(Object.values(n.globals).flatMap((e) => e.map((e) => String(e)))));
|
|
3326
3341
|
});
|
|
3327
3342
|
}
|
|
3328
3343
|
globalFullVariablesSync(e, t = {}) {
|
|
3329
|
-
let n =
|
|
3344
|
+
let n = U(a(e) ? this.parse(e) : e, t);
|
|
3330
3345
|
return Array.from(new Set(Object.values(n.globals).flatMap((e) => e.map((e) => String(e)))));
|
|
3331
3346
|
}
|
|
3332
3347
|
globalVariableSegments(e, t = {}) {
|
|
3333
|
-
return
|
|
3334
|
-
let n = yield
|
|
3335
|
-
return Array.from(
|
|
3348
|
+
return D(this, void 0, void 0, function* () {
|
|
3349
|
+
let n = yield H(a(e) ? this.parse(e) : e, t);
|
|
3350
|
+
return Array.from(b(Object.values(n.globals).flatMap((e) => e.map((e) => e.toArray()))));
|
|
3336
3351
|
});
|
|
3337
3352
|
}
|
|
3338
3353
|
globalVariableSegmentsSync(e, t = {}) {
|
|
3339
|
-
let n =
|
|
3340
|
-
return Array.from(
|
|
3354
|
+
let n = U(a(e) ? this.parse(e) : e, t);
|
|
3355
|
+
return Array.from(b(Object.values(n.globals).flatMap((e) => e.map((e) => e.toArray()))));
|
|
3341
3356
|
}
|
|
3342
3357
|
};
|
|
3343
3358
|
//#endregion
|
|
3344
|
-
export {
|
|
3359
|
+
export { va as Liquid };
|
|
3345
3360
|
|
|
3346
|
-
//# sourceMappingURL=liquid.browser-
|
|
3361
|
+
//# sourceMappingURL=liquid.browser-BJOEu6Cg.js.map
|